This patch should be applied to an un-modified XFree86 version 4.0.3 source tree. It is the third of four patches that will will convert the source tree to XFree86 version 4.1.0. To apply this patch, run the following from the directory containing your 'xc' directory: patch -p0 -E < 4.0.3-4.1.0.diff1 patch -p0 -E < 4.0.3-4.1.0.diff2 patch -p0 -E < 4.0.3-4.1.0.diff3 patch -p0 -E < 4.0.3-4.1.0.diff4 rm -f xc/programs/xieperf/images/image.012 rm -fr xc/fonts/bdf/latin2 rm -fr xc/fonts/bdf/100dpi rm -fr xc/fonts/bdf/75dpi gzip -d < 4.1.0.tgz | tar vxf - ------------------------------------------------------------------------------- Index: xc/include/DECkeysym.h diff -u xc/include/DECkeysym.h:1.1.1.2 xc/include/DECkeysym.h:1.1.1.3 --- xc/include/DECkeysym.h:1.1.1.2 Sun Sep 27 03:59:43 1998 +++ xc/include/DECkeysym.h Tue Jan 16 17:04:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: DECkeysym.h /main/5 1998/02/09 11:18:07 kaleb $ */ +/* $Xorg: DECkeysym.h,v 1.3 2000/08/18 04:05:43 coskrey Exp $ */ /*********************************************************** Index: xc/include/HPkeysym.h diff -u xc/include/HPkeysym.h:3.2 xc/include/HPkeysym.h:3.3 --- xc/include/HPkeysym.h:3.2 Fri Oct 2 03:38:48 1998 +++ xc/include/HPkeysym.h Wed Jan 17 12:53:07 2001 @@ -1,4 +1,4 @@ -/* $TOG: HPkeysym.h /main/5 1998/06/29 08:53:32 kaleb $ */ +/* $Xorg: HPkeysym.h,v 1.4 2000/08/18 04:05:43 coskrey Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -52,6 +52,10 @@ */ +#ifndef _HPKEYSYM_H + +#define _HPKEYSYM + #define hpXK_ClearLine 0x1000FF6F #define hpXK_InsertLine 0x1000FF70 #define hpXK_DeleteLine 0x1000FF71 @@ -153,3 +157,5 @@ #define XK_IO 0x100000ee #define XK_longminus 0x100000f6 #define XK_block 0x100000fc + +#endif /* _HPKEYSYM_H */ Index: xc/include/Imakefile diff -u xc/include/Imakefile:3.25 xc/include/Imakefile:3.28 --- xc/include/Imakefile:3.25 Sun Jul 2 15:23:34 2000 +++ xc/include/Imakefile Sat Apr 28 19:52:31 2001 @@ -1,13 +1,13 @@ -XCOMM $TOG: Imakefile /main/93 1997/06/13 15:34:58 kaleb $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/18 04:05:43 coskrey Exp $ -XCOMM $XFree86: xc/include/Imakefile,v 3.25 2000/07/02 19:23:34 dawes Exp $ +XCOMM $XFree86: xc/include/Imakefile,v 3.28 2001/04/28 23:52:31 dawes Exp $ #define IHaveSubdirs #define PassCDebugFlags /**/ -#if BuildGLXLibrary +#if BuildGlxExt || BuildGLXLibrary GLXDIR = GL #endif @@ -52,11 +52,7 @@ InstallMultipleFlags($(HEADERS),$(INCDIR)/X11,$(INSTINCFLAGS)) MakeSubdirs($(SUBDIRS)) - -depend:: - -clean:: - +DependSubdirs($(SUBDIRS)) InstallDriverSDKNonExecFile(X.h,$(DRIVERSDKINCLUDEDIR)) InstallDriverSDKNonExecFile(Xalloca.h,$(DRIVERSDKINCLUDEDIR)) Index: xc/include/Sunkeysym.h diff -u xc/include/Sunkeysym.h:1.1.1.2 xc/include/Sunkeysym.h:1.1.1.3 --- xc/include/Sunkeysym.h:1.1.1.2 Sun Sep 27 03:59:45 1998 +++ xc/include/Sunkeysym.h Tue Jan 16 17:04:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: Sunkeysym.h /main/6 1998/02/09 11:18:19 kaleb $ */ +/* $Xorg: Sunkeysym.h,v 1.3 2000/08/18 04:05:43 coskrey Exp $ */ /************************************************************ Index: xc/include/X.h diff -u xc/include/X.h:1.3 xc/include/X.h:1.4 --- xc/include/X.h:1.3 Sun Aug 22 04:58:48 1999 +++ xc/include/X.h Wed Jan 17 12:53:09 2001 @@ -1,5 +1,5 @@ /* - * $TOG: X.h /main/9 1998/02/09 11:18:23 kaleb $ + * $Xorg: X.h,v 1.3 2000/08/18 04:05:43 coskrey Exp $ */ /* Definitions for the X window system likely to be used by applications */ @@ -49,7 +49,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/include/X.h,v 1.3 1999/08/22 08:58:48 dawes Exp $ */ +/* $XFree86: xc/include/X.h,v 1.4 2001/01/17 17:53:09 dawes Exp $ */ #define X_PROTOCOL 11 /* current protocol version */ #define X_PROTOCOL_REVISION 0 /* current minor version */ Index: xc/include/XF86keysym.h diff -u xc/include/XF86keysym.h:1.6 xc/include/XF86keysym.h:1.11 --- xc/include/XF86keysym.h:1.6 Wed Nov 1 21:51:09 2000 +++ xc/include/XF86keysym.h Thu Apr 5 22:16:21 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/XF86keysym.h,v 1.6 2000/11/02 02:51:09 dawes Exp $ */ +/* $XFree86: xc/include/XF86keysym.h,v 1.11 2001/04/06 02:16:21 dawes Exp $ */ /* * XFree86 vendor specific keysyms. @@ -57,12 +57,12 @@ #define XF86XK_Forward 0x1008FF27 #define XF86XK_Stop 0x1008FF28 #define XF86XK_Refresh 0x1008FF29 -#define XF86XK_PowerOff 0x1008FF1A -#define XF86XK_WakeUp 0x1008FF1B - -/* Note, 0x1008FF2C - 0x1008FF2F are free and should be used next */ - -/* Some more ... */ +#define XF86XK_PowerOff 0x1008FF2A +#define XF86XK_WakeUp 0x1008FF2B +#define XF86XK_Eject 0x1008FF2C +#define XF86XK_ScreenSaver 0x1008FF2D +#define XF86XK_WWW 0x1008FF2E +#define XF86XK_Sleep 0x1008FF2F #define XF86XK_Favorites 0x1008FF30 #define XF86XK_AudioPause 0x1008FF31 #define XF86XK_AudioMedia 0x1008FF32 @@ -70,5 +70,27 @@ #define XF86XK_VendorHome 0x1008FF34 #define XF86XK_LightBulb 0x1008FF35 #define XF86XK_Shop 0x1008FF36 +#define XF86XK_History 0x1008FF37 +#define XF86XK_OpenURL 0x1008FF38 +#define XF86XK_AddFavorite 0x1008FF39 +#define XF86XK_HotLinks 0x1008FF3A +#define XF86XK_BrightnessAdjust 0x1008FF3B +/* Allocate 0x1008FF3C-F next */ +#define XF86XK_Launch0 0x1008FF40 +#define XF86XK_Launch1 0x1008FF41 +#define XF86XK_Launch2 0x1008FF42 +#define XF86XK_Launch3 0x1008FF43 +#define XF86XK_Launch4 0x1008FF44 +#define XF86XK_Launch5 0x1008FF45 +#define XF86XK_Launch6 0x1008FF46 +#define XF86XK_Launch7 0x1008FF47 +#define XF86XK_Launch8 0x1008FF48 +#define XF86XK_Launch9 0x1008FF49 +#define XF86XK_LaunchA 0x1008FF4A +#define XF86XK_LaunchB 0x1008FF4B +#define XF86XK_LaunchC 0x1008FF4C +#define XF86XK_LaunchD 0x1008FF4D +#define XF86XK_LaunchE 0x1008FF4E +#define XF86XK_LaunchF 0x1008FF4F Index: xc/include/XWDFile.h diff -u xc/include/XWDFile.h:1.1.1.3 xc/include/XWDFile.h:1.1.1.4 --- xc/include/XWDFile.h:1.1.1.3 Sun Sep 27 03:59:47 1998 +++ xc/include/XWDFile.h Tue Jan 16 17:04:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: XWDFile.h /main/19 1998/02/09 11:18:28 kaleb $ */ +/* $Xorg: XWDFile.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /* Copyright 1985, 1986, 1998 The Open Group Index: xc/include/Xalloca.h diff -u xc/include/Xalloca.h:3.8 xc/include/Xalloca.h:3.9 --- xc/include/Xalloca.h:3.8 Thu Feb 17 09:00:31 2000 +++ xc/include/Xalloca.h Wed Jan 17 12:53:10 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xalloca.h /main/7 1998/02/09 11:18:32 kaleb $ */ +/* $Xorg: Xalloca.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/include/Xalloca.h,v 3.8 2000/02/17 14:00:31 dawes Exp $ */ +/* $XFree86: xc/include/Xalloca.h,v 3.9 2001/01/17 17:53:10 dawes Exp $ */ /* * The purpose of this header is to define the macros ALLOCATE_LOCAL and Index: xc/include/Xfuncproto.h diff -u xc/include/Xfuncproto.h:3.1 xc/include/Xfuncproto.h:3.2 --- xc/include/Xfuncproto.h:3.1 Fri Oct 2 03:38:49 1998 +++ xc/include/Xfuncproto.h Wed Jan 17 12:53:10 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xfuncproto.h /main/10 1998/02/09 11:18:40 kaleb $ */ +/* $Xorg: Xfuncproto.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /* * Copyright 1989, 1991, 1998 The Open Group Index: xc/include/Xfuncs.h diff -u xc/include/Xfuncs.h:3.6 xc/include/Xfuncs.h:3.7 --- xc/include/Xfuncs.h:3.6 Sat Jan 22 10:34:22 2000 +++ xc/include/Xfuncs.h Wed Jan 17 12:53:11 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Xfuncs.h /main/17 1998/02/09 11:18:43 kaleb $ + * $Xorg: Xfuncs.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ * * Copyright 1990, 1998 The Open Group @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. * */ -/* $XFree86: xc/include/Xfuncs.h,v 3.6 2000/01/22 15:34:22 dawes Exp $ */ +/* $XFree86: xc/include/Xfuncs.h,v 3.7 2001/01/17 17:53:11 dawes Exp $ */ #ifndef _XFUNCS_H_ #define _XFUNCS_H_ Index: xc/include/Xmd.h diff -u xc/include/Xmd.h:3.8 xc/include/Xmd.h:3.9.2.1 --- xc/include/Xmd.h:3.8 Wed Aug 23 18:10:01 2000 +++ xc/include/Xmd.h Wed May 30 10:29:30 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/Xmd.h,v 3.8 2000/08/23 22:10:01 tsi Exp $ */ +/* $XFree86: xc/include/Xmd.h,v 3.9.2.1 2001/05/30 14:29:30 alanh Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -43,7 +43,7 @@ ******************************************************************/ #ifndef XMD_H #define XMD_H 1 -/* $TOG: Xmd.h /main/36 1998/02/09 11:18:48 kaleb $ */ +/* $Xorg: Xmd.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /* * Xmd.h: MACHINE DEPENDENT DECLARATIONS. */ @@ -146,26 +146,17 @@ typedef CARD32 BITS32; typedef CARD16 BITS16; -#ifndef __CYGWIN__ #ifndef __EMX__ typedef CARD8 BYTE; typedef CARD8 BOOL; -#else +#else /* __EMX__ */ /* * This is bad style, but the central include file declares them * as well */ #define BYTE CARD8 #define BOOL CARD8 -#endif -#endif - -#ifdef __CYGWIN__ -#undef BYTE -#undef BOOL -#define BYTE CARD8 -#define BOOL CARD8 -#endif +#endif /* __EMX__ */ /* * definitions for sign-extending bitfields on 64-bit architectures Index: xc/include/Xos.h diff -u xc/include/Xos.h:3.30.2.1 xc/include/Xos.h:3.33 --- xc/include/Xos.h:3.30.2.1 Wed Feb 28 10:59:11 2001 +++ xc/include/Xos.h Mon Apr 16 16:33:08 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Xos.h /main/71 1998/02/09 11:18:52 kaleb $ + * $Xorg: Xos.h,v 1.5 2000/08/18 04:05:44 coskrey Exp $ * * Copyright 1987, 1998 The Open Group @@ -23,7 +23,7 @@ * The X Window System is a Trademark of The Open Group. * */ -/* $XFree86: xc/include/Xos.h,v 3.30.2.1 2001/02/28 15:59:11 dawes Exp $ */ +/* $XFree86: xc/include/Xos.h,v 3.33 2001/04/16 20:33:08 tsi Exp $ */ /* This is a collection of things to try and minimize system dependencies * in a "signficant" number of source files. @@ -56,6 +56,14 @@ #endif #endif /* USG */ +#ifdef _SEQUENT_ +/* + * in_systm.h compatibility between SysV and BSD types u_char u_short u_long + * select.h for typedef of args to select, fd_set, may use SVR4 later + */ +#include +#include +#endif /* _SEQUENT_ */ /* * Just about everyone needs the strings routines. We provide both forms here, @@ -290,7 +298,10 @@ #define NGROUPS 16 #endif -#if defined(ISC) || (defined(__QNX__) && !defined(UNIXCONN)) || defined(__CYGWIN__) +#if defined(ISC) || \ + (defined(linux) && !defined(__GLIBC__)) || \ + (defined(__QNX__) && !defined(UNIXCONN)) || \ + defined(__CYGWIN__) /* * Some OS's may not have this */ Index: xc/include/Xos_r.h diff -u xc/include/Xos_r.h:1.7.2.1 xc/include/Xos_r.h:1.10 --- xc/include/Xos_r.h:1.7.2.1 Fri Mar 2 15:40:45 2001 +++ xc/include/Xos_r.h Sat Mar 3 04:53:00 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xos_r.h /main/7 1998/02/09 11:18:56 kaleb $ */ +/* $Xorg: Xos_r.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -18,7 +18,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/include/Xos_r.h,v 1.7.2.1 2001/03/02 20:40:45 herrb Exp $ */ +/* $XFree86: xc/include/Xos_r.h,v 1.10 2001/03/03 09:53:00 herrb Exp $ */ /* * Various and sundry Thread-Safe functions used by X11, Motif, and CDE. @@ -146,7 +146,7 @@ # endif # endif # elif defined(XOS_USE_XT_LOCKING) -extern void (*_XtProcessLock)(); +extern void (*_XtProcessLock)(void); # ifndef _XtintrinsicP_h # include /* for NeedFunctionPrototypes */ extern void XtProcessLock( @@ -243,9 +243,12 @@ size_t len; } _Xgetpwparams; -/* NetBSD, at least, is missing several of the unixware passwd fields. */ +/* + * NetBSD and FreeBSD, at least, are missing several of the unixware passwd + * fields. + */ -#if defined(__NetBSD__) || defined(__OpenBSD__) +#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) __inline__ void _Xpw_copyPasswd(_Xgetpwparams p) { memcpy(&(p).pws, (p).pwp, sizeof(struct passwd)); @@ -412,7 +415,7 @@ /* UnixWare 2.0, or other systems with thread support but no _r API. */ /* WARNING: The h_addr_list and s_aliases values are *not* copied! */ -#if defined(__NetBSD__) +#if defined(__NetBSD__) || defined(__FreeBSD__) #include #endif Index: xc/include/Xosdefs.h diff -u xc/include/Xosdefs.h:3.14.6.1 xc/include/Xosdefs.h:3.17 --- xc/include/Xosdefs.h:3.14.6.1 Wed Mar 7 11:04:15 2001 +++ xc/include/Xosdefs.h Wed Mar 7 10:54:11 2001 @@ -1,7 +1,7 @@ /* * O/S-dependent (mis)feature macro definitions * - * $TOG: Xosdefs.h /main/17 1998/02/09 11:19:02 kaleb $ + * $Xorg: Xosdefs.h,v 1.4 2000/08/18 04:05:44 coskrey Exp $ * Copyright 1991, 1998 The Open Group @@ -21,7 +21,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/include/Xosdefs.h,v 3.14.6.1 2001/03/07 16:04:15 dawes Exp $ */ +/* $XFree86: xc/include/Xosdefs.h,v 3.17 2001/03/07 15:54:11 dawes Exp $ */ #ifndef _XOSDEFS_H_ #define _XOSDEFS_H_ @@ -77,14 +77,12 @@ #ifdef i386 #ifdef SYSV -#if !(defined(ISC) && defined(_POSIX_SOURCE)) -#ifndef SCO -#ifndef _SCO_DS /* SCO 5.0 has SVR4 header files */ +#if !defined(ISC) && !defined(SCO) && !defined(_SEQUENT_) +#if !defined(_POSIX_SOURCE) && !defined(_SCO_DS) #define X_NOT_POSIX #endif #define X_NOT_STDC_ENV #endif -#endif /* !(defined(ISC) && defined(_POSIX_SOURCE)) */ #endif #endif @@ -114,6 +112,10 @@ #ifdef __EMX__ #define USGISH +#define NULL_NOT_ZERO +#endif + +#ifdef __DARWIN__ #define NULL_NOT_ZERO #endif Index: xc/include/Xpoll.h diff -u xc/include/Xpoll.h:3.7 xc/include/Xpoll.h:3.8 --- xc/include/Xpoll.h:3.7 Tue Sep 19 08:46:05 2000 +++ xc/include/Xpoll.h Wed Jan 17 12:53:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xpoll.h /main/8 1998/02/09 11:19:06 kaleb $ */ +/* $Xorg: Xpoll.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/include/Xpoll.h,v 3.7 2000/09/19 12:46:05 eich Exp $ */ +/* $XFree86: xc/include/Xpoll.h,v 3.8 2001/01/17 17:53:11 dawes Exp $ */ #ifndef _XPOLL_H_ #define _XPOLL_H_ Index: xc/include/Xproto.h diff -u xc/include/Xproto.h:1.1.1.4 xc/include/Xproto.h:1.1.1.5 --- xc/include/Xproto.h:1.1.1.4 Sun Sep 27 03:59:57 1998 +++ xc/include/Xproto.h Tue Jan 16 17:04:42 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Xproto.h /main/22 1998/02/09 11:19:10 kaleb $ + * $Xorg: Xproto.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /* Definitions for the X window system used by server and c bindings */ Index: xc/include/Xprotostr.h diff -u xc/include/Xprotostr.h:1.1.1.2 xc/include/Xprotostr.h:1.1.1.3 --- xc/include/Xprotostr.h:1.1.1.2 Sun Sep 27 03:59:58 1998 +++ xc/include/Xprotostr.h Tue Jan 16 17:04:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xprotostr.h /main/6 1998/02/09 11:19:17 kaleb $ */ +/* $Xorg: Xprotostr.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ #ifndef XPROTOSTRUCTS_H #define XPROTOSTRUCTS_H Index: xc/include/Xthreads.h diff -u xc/include/Xthreads.h:3.7 xc/include/Xthreads.h:3.8 --- xc/include/Xthreads.h:3.7 Sun Jun 25 12:03:43 2000 +++ xc/include/Xthreads.h Wed Jan 17 12:53:12 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Xthreads.h /main/37 1998/02/09 11:19:20 kaleb $ + * $Xorg: Xthreads.h,v 1.4 2000/08/18 04:05:44 coskrey Exp $ * * Copyright 1993, 1998 The Open Group @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. * * */ -/* $XFree86: xc/include/Xthreads.h,v 3.7 2000/06/25 16:03:43 tsi Exp $ */ +/* $XFree86: xc/include/Xthreads.h,v 3.8 2001/01/17 17:53:12 dawes Exp $ */ #ifndef _XTHREADS_H_ #define _XTHREADS_H_ @@ -59,7 +59,7 @@ #define xcondition_broadcast(cv) condition_broadcast(cv) #define xcondition_set_name(cv,str) condition_set_name(cv,str) #else /* !CTHREADS */ -#if defined(SVR4) && !defined(__sgi) +#if defined(SVR4) && !defined(__sgi) && !defined(_SEQUENT_) #include #include typedef thread_t xthread_t; Index: xc/include/Xw32defs.h diff -u xc/include/Xw32defs.h:1.1.1.2 xc/include/Xw32defs.h:1.1.1.3 --- xc/include/Xw32defs.h:1.1.1.2 Sat Dec 21 22:16:27 1996 +++ xc/include/Xw32defs.h Tue Jan 16 17:04:44 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: Xw32defs.h /main/5 1996/11/13 14:43:44 lehors $ */ +/* $Xorg: Xw32defs.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ #ifndef _XW32DEFS_H #define _XW32DEFS_H Index: xc/include/Xwinsock.h diff -u xc/include/Xwinsock.h:1.1.1.2 xc/include/Xwinsock.h:1.1.1.3 --- xc/include/Xwinsock.h:1.1.1.2 Sun Sep 27 04:00:03 1998 +++ xc/include/Xwinsock.h Tue Jan 16 17:04:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xwinsock.h /main/2 1998/02/09 11:19:29 kaleb $ */ +/* $Xorg: Xwinsock.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /* Copyright 1996, 1998 The Open Group Index: xc/include/keysym.h diff -u xc/include/keysym.h:1.2 xc/include/keysym.h:1.3 --- xc/include/keysym.h:1.2 Fri Oct 27 14:30:46 2000 +++ xc/include/keysym.h Wed Jan 17 12:53:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: keysym.h /main/9 1998/05/22 16:17:55 kaleb $ */ +/* $Xorg: keysym.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/include/keysym.h,v 1.2 2000/10/27 18:30:46 dawes Exp $ */ +/* $XFree86: xc/include/keysym.h,v 1.3 2001/01/17 17:53:12 dawes Exp $ */ /* default keysyms */ #define XK_MISCELLANY Index: xc/include/keysymdef.h diff -u xc/include/keysymdef.h:1.10 xc/include/keysymdef.h:1.11 --- xc/include/keysymdef.h:1.10 Fri Oct 27 14:30:46 2000 +++ xc/include/keysymdef.h Wed Jan 17 12:53:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: keysymdef.h /main/28 1998/05/22 16:18:01 kaleb $ */ +/* $Xorg: keysymdef.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /*********************************************************** Copyright 1987, 1994, 1998 The Open Group @@ -43,7 +43,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/include/keysymdef.h,v 1.10 2000/10/27 18:30:46 dawes Exp $ */ +/* $XFree86: xc/include/keysymdef.h,v 1.11 2001/01/17 17:53:12 dawes Exp $ */ #define XK_VoidSymbol 0xFFFFFF /* void symbol */ Index: xc/include/GL/Imakefile diff -u xc/include/GL/Imakefile:1.10 xc/include/GL/Imakefile:1.13 --- xc/include/GL/Imakefile:1.10 Thu Aug 3 23:51:40 2000 +++ xc/include/GL/Imakefile Mon Apr 30 10:58:48 2001 @@ -1,13 +1,11 @@ +XCOMM $XFree86: xc/include/GL/Imakefile,v 1.13 2001/04/30 14:58:48 dawes Exp $ -XCOMM $XFree86: xc/include/GL/Imakefile,v 1.10 2000/08/04 03:51:40 tsi Exp $ - LinkSourceFile(gl.h, ../../extras/Mesa/include/GL) LinkSourceFile(glext.h, ../../extras/Mesa/include/GL) LinkSourceFile(osmesa.h, ../../extras/Mesa/include/GL) -#if BuildGLXLibrary -GLXHEADERS = gl.h glext.h glx.h glxint.h glxtokens.h osmesa.h -#endif +GLXHEADERS = gl.h glext.h glu.h glx.h glxint.h glxmd.h glxproto.h \ + glxtokens.h osmesa.h HEADERS = $(GLXHEADERS) @@ -18,3 +16,4 @@ InstallDriverSDKNonExecFile(glxint.h,$(DRIVERSDKINCLUDEDIR)/GL) InstallDriverSDKNonExecFile(glxtokens.h,$(DRIVERSDKINCLUDEDIR)/GL) + Index: xc/include/GL/glu.h diff -u /dev/null xc/include/GL/glu.h:1.2 --- /dev/null Mon Jun 4 12:36:53 2001 +++ xc/include/GL/glu.h Mon Apr 2 22:18:39 2001 @@ -0,0 +1,325 @@ +/* $XFree86: xc/include/GL/glu.h,v 1.2 2001/04/03 02:18:39 dawes Exp $ */ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: This software was created using the +** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has +** not been independently verified as being compliant with the OpenGL(R) +** version 1.2.1 Specification. +*/ + +#ifndef __glu_h__ +#define __glu_h__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*************************************************************/ + +/* Extensions */ +#define GLU_EXT_object_space_tess 1 +#define GLU_EXT_nurbs_tessellator 1 + +/* Boolean */ +#define GLU_FALSE 0 +#define GLU_TRUE 1 + +/* Version */ +#define GLU_VERSION_1_1 1 +#define GLU_VERSION_1_2 1 +#define GLU_VERSION_1_3 1 + +/* StringName */ +#define GLU_VERSION 100800 +#define GLU_EXTENSIONS 100801 + +/* ErrorCode */ +#define GLU_INVALID_ENUM 100900 +#define GLU_INVALID_VALUE 100901 +#define GLU_OUT_OF_MEMORY 100902 +#define GLU_INVALID_OPERATION 100904 + +/* NurbsDisplay */ +/* GLU_FILL */ +#define GLU_OUTLINE_POLYGON 100240 +#define GLU_OUTLINE_PATCH 100241 + +/* NurbsCallback */ +#define GLU_NURBS_ERROR 100103 +#define GLU_ERROR 100103 +#define GLU_NURBS_BEGIN 100164 +#define GLU_NURBS_BEGIN_EXT 100164 +#define GLU_NURBS_VERTEX 100165 +#define GLU_NURBS_VERTEX_EXT 100165 +#define GLU_NURBS_NORMAL 100166 +#define GLU_NURBS_NORMAL_EXT 100166 +#define GLU_NURBS_COLOR 100167 +#define GLU_NURBS_COLOR_EXT 100167 +#define GLU_NURBS_TEXTURE_COORD 100168 +#define GLU_NURBS_TEX_COORD_EXT 100168 +#define GLU_NURBS_END 100169 +#define GLU_NURBS_END_EXT 100169 +#define GLU_NURBS_BEGIN_DATA 100170 +#define GLU_NURBS_BEGIN_DATA_EXT 100170 +#define GLU_NURBS_VERTEX_DATA 100171 +#define GLU_NURBS_VERTEX_DATA_EXT 100171 +#define GLU_NURBS_NORMAL_DATA 100172 +#define GLU_NURBS_NORMAL_DATA_EXT 100172 +#define GLU_NURBS_COLOR_DATA 100173 +#define GLU_NURBS_COLOR_DATA_EXT 100173 +#define GLU_NURBS_TEXTURE_COORD_DATA 100174 +#define GLU_NURBS_TEX_COORD_DATA_EXT 100174 +#define GLU_NURBS_END_DATA 100175 +#define GLU_NURBS_END_DATA_EXT 100175 + +/* NurbsError */ +#define GLU_NURBS_ERROR1 100251 +#define GLU_NURBS_ERROR2 100252 +#define GLU_NURBS_ERROR3 100253 +#define GLU_NURBS_ERROR4 100254 +#define GLU_NURBS_ERROR5 100255 +#define GLU_NURBS_ERROR6 100256 +#define GLU_NURBS_ERROR7 100257 +#define GLU_NURBS_ERROR8 100258 +#define GLU_NURBS_ERROR9 100259 +#define GLU_NURBS_ERROR10 100260 +#define GLU_NURBS_ERROR11 100261 +#define GLU_NURBS_ERROR12 100262 +#define GLU_NURBS_ERROR13 100263 +#define GLU_NURBS_ERROR14 100264 +#define GLU_NURBS_ERROR15 100265 +#define GLU_NURBS_ERROR16 100266 +#define GLU_NURBS_ERROR17 100267 +#define GLU_NURBS_ERROR18 100268 +#define GLU_NURBS_ERROR19 100269 +#define GLU_NURBS_ERROR20 100270 +#define GLU_NURBS_ERROR21 100271 +#define GLU_NURBS_ERROR22 100272 +#define GLU_NURBS_ERROR23 100273 +#define GLU_NURBS_ERROR24 100274 +#define GLU_NURBS_ERROR25 100275 +#define GLU_NURBS_ERROR26 100276 +#define GLU_NURBS_ERROR27 100277 +#define GLU_NURBS_ERROR28 100278 +#define GLU_NURBS_ERROR29 100279 +#define GLU_NURBS_ERROR30 100280 +#define GLU_NURBS_ERROR31 100281 +#define GLU_NURBS_ERROR32 100282 +#define GLU_NURBS_ERROR33 100283 +#define GLU_NURBS_ERROR34 100284 +#define GLU_NURBS_ERROR35 100285 +#define GLU_NURBS_ERROR36 100286 +#define GLU_NURBS_ERROR37 100287 + +/* NurbsProperty */ +#define GLU_AUTO_LOAD_MATRIX 100200 +#define GLU_CULLING 100201 +#define GLU_SAMPLING_TOLERANCE 100203 +#define GLU_DISPLAY_MODE 100204 +#define GLU_PARAMETRIC_TOLERANCE 100202 +#define GLU_SAMPLING_METHOD 100205 +#define GLU_U_STEP 100206 +#define GLU_V_STEP 100207 +#define GLU_NURBS_MODE 100160 +#define GLU_NURBS_MODE_EXT 100160 +#define GLU_NURBS_TESSELLATOR 100161 +#define GLU_NURBS_TESSELLATOR_EXT 100161 +#define GLU_NURBS_RENDERER 100162 +#define GLU_NURBS_RENDERER_EXT 100162 + +/* NurbsSampling */ +#define GLU_OBJECT_PARAMETRIC_ERROR 100208 +#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208 +#define GLU_OBJECT_PATH_LENGTH 100209 +#define GLU_OBJECT_PATH_LENGTH_EXT 100209 +#define GLU_PATH_LENGTH 100215 +#define GLU_PARAMETRIC_ERROR 100216 +#define GLU_DOMAIN_DISTANCE 100217 + +/* NurbsTrim */ +#define GLU_MAP1_TRIM_2 100210 +#define GLU_MAP1_TRIM_3 100211 + +/* QuadricDrawStyle */ +#define GLU_POINT 100010 +#define GLU_LINE 100011 +#define GLU_FILL 100012 +#define GLU_SILHOUETTE 100013 + +/* QuadricCallback */ +/* GLU_ERROR */ + +/* QuadricNormal */ +#define GLU_SMOOTH 100000 +#define GLU_FLAT 100001 +#define GLU_NONE 100002 + +/* QuadricOrientation */ +#define GLU_OUTSIDE 100020 +#define GLU_INSIDE 100021 + +/* TessCallback */ +#define GLU_TESS_BEGIN 100100 +#define GLU_BEGIN 100100 +#define GLU_TESS_VERTEX 100101 +#define GLU_VERTEX 100101 +#define GLU_TESS_END 100102 +#define GLU_END 100102 +#define GLU_TESS_ERROR 100103 +#define GLU_TESS_EDGE_FLAG 100104 +#define GLU_EDGE_FLAG 100104 +#define GLU_TESS_COMBINE 100105 +#define GLU_TESS_BEGIN_DATA 100106 +#define GLU_TESS_VERTEX_DATA 100107 +#define GLU_TESS_END_DATA 100108 +#define GLU_TESS_ERROR_DATA 100109 +#define GLU_TESS_EDGE_FLAG_DATA 100110 +#define GLU_TESS_COMBINE_DATA 100111 + +/* TessContour */ +#define GLU_CW 100120 +#define GLU_CCW 100121 +#define GLU_INTERIOR 100122 +#define GLU_EXTERIOR 100123 +#define GLU_UNKNOWN 100124 + +/* TessProperty */ +#define GLU_TESS_WINDING_RULE 100140 +#define GLU_TESS_BOUNDARY_ONLY 100141 +#define GLU_TESS_TOLERANCE 100142 + +/* TessError */ +#define GLU_TESS_ERROR1 100151 +#define GLU_TESS_ERROR2 100152 +#define GLU_TESS_ERROR3 100153 +#define GLU_TESS_ERROR4 100154 +#define GLU_TESS_ERROR5 100155 +#define GLU_TESS_ERROR6 100156 +#define GLU_TESS_ERROR7 100157 +#define GLU_TESS_ERROR8 100158 +#define GLU_TESS_MISSING_BEGIN_POLYGON 100151 +#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152 +#define GLU_TESS_MISSING_END_POLYGON 100153 +#define GLU_TESS_MISSING_END_CONTOUR 100154 +#define GLU_TESS_COORD_TOO_LARGE 100155 +#define GLU_TESS_NEED_COMBINE_CALLBACK 100156 + +/* TessWinding */ +#define GLU_TESS_WINDING_ODD 100130 +#define GLU_TESS_WINDING_NONZERO 100131 +#define GLU_TESS_WINDING_POSITIVE 100132 +#define GLU_TESS_WINDING_NEGATIVE 100133 +#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134 + +/*************************************************************/ + + +#ifdef __cplusplus +class GLUnurbs; +class GLUquadric; +class GLUtesselator; +#else +typedef struct GLUnurbs GLUnurbs; +typedef struct GLUquadric GLUquadric; +typedef struct GLUtesselator GLUtesselator; +#endif + +typedef struct GLUnurbs GLUnurbsObj; +typedef struct GLUquadric GLUquadricObj; +typedef struct GLUtesselator GLUtesselatorObj; +typedef struct GLUtesselator GLUtriangulatorObj; + +#define GLU_TESS_MAX_COORD 1.0e150 + +/* Internal convenience typedefs */ +typedef GLvoid (*_GLUfuncptr)(GLvoid); + +extern void gluBeginCurve (GLUnurbs* nurb); +extern void gluBeginPolygon (GLUtesselator* tess); +extern void gluBeginSurface (GLUnurbs* nurb); +extern void gluBeginTrim (GLUnurbs* nurb); +extern GLint gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data); +extern GLint gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data); +extern GLint gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data); +extern GLint gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data); +extern GLint gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data); +extern GLint gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); +extern GLboolean gluCheckExtension (const GLubyte *extName, const GLubyte *extString); +extern void gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks); +extern void gluDeleteNurbsRenderer (GLUnurbs* nurb); +extern void gluDeleteQuadric (GLUquadric* quad); +extern void gluDeleteTess (GLUtesselator* tess); +extern void gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops); +extern void gluEndCurve (GLUnurbs* nurb); +extern void gluEndPolygon (GLUtesselator* tess); +extern void gluEndSurface (GLUnurbs* nurb); +extern void gluEndTrim (GLUnurbs* nurb); +extern const GLubyte * gluErrorString (GLenum error); +extern void gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data); +extern const GLubyte * gluGetString (GLenum name); +extern void gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data); +extern void gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view); +extern void gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ); +extern GLUnurbs* gluNewNurbsRenderer (void); +extern GLUquadric* gluNewQuadric (void); +extern GLUtesselator* gluNewTess (void); +extern void gluNextContour (GLUtesselator* tess, GLenum type); +extern void gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc); +extern void gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData); +extern void gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData); +extern void gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type); +extern void gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value); +extern void gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type); +extern void gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top); +extern void gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep); +extern void gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar); +extern void gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport); +extern GLint gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ); +extern void gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type); +extern void gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc); +extern void gluQuadricDrawStyle (GLUquadric* quad, GLenum draw); +extern void gluQuadricNormals (GLUquadric* quad, GLenum normal); +extern void gluQuadricOrientation (GLUquadric* quad, GLenum orientation); +extern void gluQuadricTexture (GLUquadric* quad, GLboolean texture); +extern GLint gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut); +extern void gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks); +extern void gluTessBeginContour (GLUtesselator* tess); +extern void gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data); +extern void gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc); +extern void gluTessEndContour (GLUtesselator* tess); +extern void gluTessEndPolygon (GLUtesselator* tess); +extern void gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ); +extern void gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data); +extern void gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data); +extern GLint gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ); +extern GLint gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble near, GLdouble far, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW); + +#ifdef __cplusplus +} +#endif + +#endif /* __glu_h__ */ Index: xc/include/GL/glx.h diff -u xc/include/GL/glx.h:1.7 xc/include/GL/glx.h:1.8 --- xc/include/GL/glx.h:1.7 Fri Jun 30 14:27:00 2000 +++ xc/include/GL/glx.h Wed Mar 21 10:51:38 2001 @@ -1,11 +1,11 @@ #ifndef __GLX_glx_h__ #define __GLX_glx_h__ -/* $XFree86: xc/include/GL/glx.h,v 1.7 2000/06/30 18:27:00 dawes Exp $ */ +/* $XFree86: xc/include/GL/glx.h,v 1.8 2001/03/21 15:51:38 dawes Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.0 (the "License"), the contents of this +** Software License B, Version 1.1 (the "License"), the contents of this ** file are subject only to the provisions of the License. You may not use ** this file except in compliance with the License. You may obtain a copy ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Index: xc/include/GL/glxmd.h diff -u xc/include/GL/glxmd.h:1.2 xc/include/GL/glxmd.h:1.3 --- xc/include/GL/glxmd.h:1.2 Mon Jun 14 03:23:28 1999 +++ xc/include/GL/glxmd.h Wed Mar 21 10:51:38 2001 @@ -1,26 +1,39 @@ #ifndef _GLX_glxmd_h_ #define _GLX_glxmd_h_ -/* $XFree86: xc/include/GL/glxmd.h,v 1.2 1999/06/14 07:23:28 dawes Exp $ */ +/* $XFree86: xc/include/GL/glxmd.h,v 1.3 2001/03/21 15:51:38 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. +** http://oss.sgi.com/projects/FreeB ** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. ** -** $SGI$ +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. */ /* Index: xc/include/GL/glxproto.h diff -u xc/include/GL/glxproto.h:1.2 xc/include/GL/glxproto.h:1.4 --- xc/include/GL/glxproto.h:1.2 Mon Jun 14 03:23:29 1999 +++ xc/include/GL/glxproto.h Tue Apr 10 12:07:49 2001 @@ -1,26 +1,39 @@ #ifndef _GLX_glxproto_h_ #define _GLX_glxproto_h_ -/* $XFree86: xc/include/GL/glxproto.h,v 1.2 1999/06/14 07:23:29 dawes Exp $ */ +/* $XFree86: xc/include/GL/glxproto.h,v 1.4 2001/04/10 16:07:49 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. +** http://oss.sgi.com/projects/FreeB ** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. ** -** $SGI$ +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. */ #include "GL/glxmd.h" @@ -29,20 +42,33 @@ /* ** Errrors. -*/ -#define GLXBadContext 0 +*/ +#define GLXBadContext 0 #define GLXBadContextState 1 #define GLXBadDrawable 2 #define GLXBadPixmap 3 #define GLXBadContextTag 4 #define GLXBadCurrentWindow 5 -#define GLXBadRenderRequest 6 -#define GLXBadLargeRequest 7 +#define GLXBadRenderRequest 6 +#define GLXBadLargeRequest 7 #define GLXUnsupportedPrivateRequest 8 +#define GLXBadFBConfig 9 +#define GLXBadPbuffer 10 +#define GLXBadCurrentDrawable 11 +#define GLXBadWindow 12 -#define __GLX_NUMBER_ERRORS 8 -#define __GLX_NUMBER_EVENTS 1 +#define __GLX_NUMBER_ERRORS 12 +/* +** Events. +** __GLX_NUMBER_EVENTS is set to 17 to account for the BufferClobberSGIX +** event - this helps initialization if the server supports the pbuffer +** extension and the client doesn't. +*/ +#define GLX_PbufferClobber 0 + +#define __GLX_NUMBER_EVENTS 17 + #define GLX_EXTENSION_NAME "GLX" #define GLX_EXTENSION_ALIAS "SGI-GLX" @@ -62,6 +88,11 @@ #define GLXContextID CARD32 #define GLXPixmap CARD32 #define GLXDrawable CARD32 +#define GLXPbuffer CARD32 +#define GLXWindow CARD32 +#define GLXFBConfigID CARD32 +#define GLXFBConfigIDSGIX CARD32 +#define GLXPbufferSGIX CARD32 /* ** ContextTag is not exposed to the API. @@ -106,7 +137,7 @@ /* ** Large render command request. A single large rendering command -** is output in multiple X extension requests. The first packet +** is output in multiple X extension requests. The first packet ** contains an opcode dependent header (see below) that describes ** the data that follows. */ @@ -122,7 +153,7 @@ #define sz_xGLXRenderLargeReq 16 /* -** GLX single request. Commands that go over as single GLX protocol +** GLX single request. Commands that go over as single GLX protocol ** requests use this structure. The glxCode will be one of the X_GLsop ** opcodes. */ @@ -192,7 +223,7 @@ CARD8 reqType; CARD8 glxCode; CARD16 length B16; - GLXDrawable drawable B32; + GLXDrawable drawable B32; GLXContextID context B32; GLXContextTag oldContextTag B32; } xGLXMakeCurrentReq; @@ -242,7 +273,7 @@ CARD8 glxCode; CARD16 length B16; GLXContextTag contextTag B32; - GLXDrawable drawable B32; + GLXDrawable drawable B32; } xGLXSwapBuffersReq; #define sz_xGLXSwapBuffersReq 12 @@ -331,10 +362,10 @@ ** glXQueryExtensionsString request */ typedef struct GLXQueryExtensionsString { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 screen B32; + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; } xGLXQueryExtensionsStringReq; #define sz_xGLXQueryExtensionsStringReq 8 @@ -342,11 +373,11 @@ ** glXQueryServerString request */ typedef struct GLXQueryServerString { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 screen B32; - CARD32 name B32; + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; + CARD32 name B32; } xGLXQueryServerStringReq; #define sz_xGLXQueryServerStringReq 12 @@ -354,30 +385,175 @@ ** glXClientInfo request */ typedef struct GLXClientInfo { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 major B32; - CARD32 minor B32; - CARD32 numbytes B32; + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 major B32; + CARD32 minor B32; + CARD32 numbytes B32; } xGLXClientInfoReq; #define sz_xGLXClientInfoReq 16 +/*** Start of GLX 1.3 requests */ + /* -** glXQueryContextInfoEXT request +** glXGetFBConfigs request */ -typedef struct GLXQueryContextInfoEXT { +typedef struct GLXGetFBConfigs { CARD8 reqType; CARD8 glxCode; CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + CARD32 screen B32; +} xGLXGetFBConfigsReq; +#define sz_xGLXGetFBConfigsReq 8 + +/* +** glXCreatePixmap request +*/ +typedef struct GLXCreatePixmap { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; + GLXFBConfigID fbconfig B32; + CARD32 pixmap B32; + GLXPixmap glxpixmap B32; + CARD32 numAttribs B32; + /* followed by attribute list */ +} xGLXCreatePixmapReq; +#define sz_xGLXCreatePixmapReq 24 + +/* +** glXDestroyPixmap request +*/ +typedef struct GLXDestroyPixmap { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXPixmap glxpixmap B32; +} xGLXDestroyPixmapReq; +#define sz_xGLXDestroyPixmapReq 8 + +/* +** glXCreateNewContext request +*/ +typedef struct GLXCreateNewContext { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; GLXContextID context B32; -} xGLXQueryContextInfoEXTReq; -#define sz_xGLXQueryContextInfoEXTReq 16 + GLXFBConfigID fbconfig B32; + CARD32 screen B32; + CARD32 renderType; + GLXContextID shareList B32; + BOOL isDirect; + CARD8 reserved1; + CARD16 reserved2 B16; +} xGLXCreateNewContextReq; +#define sz_xGLXCreateNewContextReq 28 -/************************************************************************/ +/* +** glXQueryContext request +*/ +typedef struct GLXQueryContext { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextID context B32; +} xGLXQueryContextReq; +#define sz_xGLXQueryContextReq 8 + +/* +** glXMakeContextCurrent request +*/ +typedef struct GLXMakeContextCurrent { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextTag oldContextTag B32; + GLXDrawable drawable B32; + GLXDrawable readdrawable B32; + GLXContextID context B32; +} xGLXMakeContextCurrentReq; +#define sz_xGLXMakeContextCurrentReq 20 + +/* +** glXCreatePbuffer request +*/ +typedef struct GLXCreatePbuffer { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; + GLXFBConfigID fbconfig B32; + GLXPbuffer pbuffer B32; + CARD32 numAttribs B32; + /* followed by attribute list */ +} xGLXCreatePbufferReq; +#define sz_xGLXCreatePbufferReq 20 + +/* +** glXDestroyPbuffer request +*/ +typedef struct GLXDestroyPbuffer { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXPbuffer pbuffer B32; +} xGLXDestroyPbufferReq; +#define sz_xGLXDestroyPbufferReq 8 +/* +** glXGetDrawableAttributes request +*/ +typedef struct GLXGetDrawableAttributes { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXDrawable drawable B32; +} xGLXGetDrawableAttributesReq; +#define sz_xGLXGetDrawableAttributesReq 8 + +/* +** glXChangeDrawableAttributes request +*/ +typedef struct GLXChangeDrawableAttributes { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXDrawable drawable B32; + CARD32 numAttribs B32; + /* followed by attribute list */ +} xGLXChangeDrawableAttributesReq; +#define sz_xGLXChangeDrawableAttributesReq 12 + +/* +** glXCreateWindow request +*/ +typedef struct GLXCreateWindow { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; + GLXFBConfigID fbconfig B32; + CARD32 window B32; + GLXWindow glxwindow B32; + CARD32 numAttribs B32; + /* followed by attribute list */ +} xGLXCreateWindowReq; +#define sz_xGLXCreateWindowReq 24 + +/* +** glXDestroyWindow request +*/ +typedef struct GLXDestroyWindow { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXWindow glxwindow B32; +} xGLXDestroyWindowReq; +#define sz_xGLXDestroyWindowReq 8 + /* Replies */ typedef struct { @@ -431,7 +607,7 @@ CARD32 pad2 B32; CARD32 width B32; CARD32 height B32; - CARD32 pad5 B32; + CARD32 depth B32; CARD32 pad6 B32; } xGLXGetTexImageReply; #define sz_xGLXGetTexImageReply 32 @@ -441,6 +617,62 @@ CARD8 unused; /* not used */ CARD16 sequenceNumber B16; CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 width B32; + CARD32 height B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetSeparableFilterReply; +#define sz_xGLXGetSeparableFilterReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 width B32; + CARD32 height B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetConvolutionFilterReply; +#define sz_xGLXGetConvolutionFilterReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 width B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetHistogramReply; +#define sz_xGLXGetHistogramReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetMinmaxReply; +#define sz_xGLXGetMinmaxReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; CARD32 retval B32; CARD32 size B32; CARD32 newMode B32; @@ -520,16 +752,16 @@ ** the number of words of data which follow the header. */ typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 retval B32; - CARD32 size B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 retval B32; + CARD32 size B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; } xGLXVendorPrivReply; #define sz_xGLXVendorPrivReply 32 @@ -538,16 +770,16 @@ ** n indicates the number of bytes to be returned. */ typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 n B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 n B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; } xGLXQueryExtensionsStringReply; #define sz_xGLXQueryExtensionsStringReply 32 @@ -556,20 +788,143 @@ ** n indicates the number of bytes to be returned. */ typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 n B32; - CARD32 pad3 B32; /* NOTE: may hold a single value */ - CARD32 pad4 B32; /* NOTE: may hold half a double */ - CARD32 pad5 B32; - CARD32 pad6 B32; + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 n B32; + CARD32 pad3 B32; /* NOTE: may hold a single value */ + CARD32 pad4 B32; /* NOTE: may hold half a double */ + CARD32 pad5 B32; + CARD32 pad6 B32; } xGLXQueryServerStringReply; #define sz_xGLXQueryServerStringReply 32 +/*** Start of GLX 1.3 replies */ + +/* +** glXGetFBConfigs reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 numFBConfigs B32; + CARD32 numAttribs B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetFBConfigsReply; +#define sz_xGLXGetFBConfigsReply 32 + /* +** glXQueryContext reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 n B32; /* number of attribute/value pairs */ + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryContextReply; +#define sz_xGLXQueryContextReply 32 + +/* +** glXMakeContextCurrent reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + GLXContextTag contextTag B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXMakeContextCurrentReply; +#define sz_xGLXMakeContextCurrentReply 32 + +/* +** glXCreateGLXPbuffer reply +** This is used only in the direct rendering case on SGIs - otherwise +** CreateGLXPbuffer has no reply. It is not part of GLX 1.3. +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 success; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXCreateGLXPbufferReply; +#define sz_xGLXCreateGLXPbufferReply 32 + +/* +** glXGetDrawableAttributes reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 numAttribs B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetDrawableAttributesReply; +#define sz_xGLXGetDrawableAttributesReply 32 + +/* +** glXGetColorTable reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 width B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetColorTableReply; +#define sz_xGLXGetColorTableReply 32 + +/************************************************************************/ + +/* GLX extension requests and replies */ + +/* +** glXQueryContextInfoEXT request +*/ +typedef struct GLXQueryContextInfoEXT { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + GLXContextID context B32; +} xGLXQueryContextInfoEXTReq; +#define sz_xGLXQueryContextInfoEXTReq 16 + +/* ** glXQueryContextInfoEXT reply */ typedef struct { @@ -577,7 +932,7 @@ CARD8 unused; /* not used */ CARD16 sequenceNumber B16; CARD32 length B32; - CARD32 n B32; /* number of attribute/value pairs */ + CARD32 n B32; /* number of attribute/value pairs */ CARD32 pad2 B32; CARD32 pad3 B32; CARD32 pad4 B32; @@ -589,6 +944,29 @@ /************************************************************************/ /* +** Events +*/ + +typedef struct { + BYTE type; + BYTE pad; + CARD16 sequenceNumber B16; + CARD16 event_type B16; /*** was clobber_class */ + CARD16 draw_type B16; + CARD32 drawable B32; + CARD32 buffer_mask B32; /*** was mask */ + CARD16 aux_buffer B16; + CARD16 x B16; + CARD16 y B16; + CARD16 width B16; + CARD16 height B16; + CARD16 count B16; + CARD32 unused2 B32; +} xGLXPbufferClobberEvent; + +/************************************************************************/ + +/* ** Size of the standard X request header. */ #define __GLX_SINGLE_HDR_SIZE sz_xGLXSingleReq @@ -617,7 +995,8 @@ /* ** The glBitmap, glPolygonStipple, glTexImage[12]D, glTexSubImage[12]D ** and glDrawPixels calls all have a pixel header transmitted after the -** Render or RenderLarge header and before their own opcode specific headers. +** Render or RenderLarge header and before their own opcode specific +** headers. */ #define __GLX_PIXEL_HDR \ BOOL swapBytes; \ @@ -626,7 +1005,7 @@ CARD8 reserved1; \ CARD32 rowLength B32; \ CARD32 skipRows B32; \ - CARD32 skipPixels B32; \ + CARD32 skipPixels B32; \ CARD32 alignment B32 #define __GLX_PIXEL_HDR_SIZE 20 @@ -636,6 +1015,27 @@ } __GLXpixelHeader; /* +** glTexImage[34]D and glTexSubImage[34]D calls +** all have a pixel header transmitted after the Render or RenderLarge +** header and before their own opcode specific headers. +*/ +#define __GLX_PIXEL_3D_HDR \ + BOOL swapBytes; \ + BOOL lsbFirst; \ + CARD8 reserved0; \ + CARD8 reserved1; \ + CARD32 rowLength B32; \ + CARD32 imageHeight B32; \ + CARD32 imageDepth B32; \ + CARD32 skipRows B32; \ + CARD32 skipImages B32; \ + CARD32 skipVolumes B32; \ + CARD32 skipPixels B32; \ + CARD32 alignment B32 + +#define __GLX_PIXEL_3D_HDR_SIZE 36 + +/* ** Data that is specific to a glBitmap call. The data is sent in the ** following order: ** Render or RenderLarge header @@ -683,19 +1083,18 @@ #define __GLX_POLYGONSTIPPLE_CMD_HDR_SIZE \ (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE) - /* ** Data that is specific to a glTexImage1D or glTexImage2D call. The ** data is sent in the following order: -** Render or RenderLarge header -** Pixel header -** TexImage header +** Render or RenderLarge header +** Pixel header +** TexImage header ** When a glTexImage1D call the height field is unexamined by the server. */ #define __GLX_TEXIMAGE_HDR \ CARD32 target B32; \ CARD32 level B32; \ - CARD32 components B32; \ + CARD32 components B32; \ CARD32 width B32; \ CARD32 height B32; \ CARD32 border B32; \ @@ -727,13 +1126,63 @@ __GLX_TEXIMAGE_HDR; } __GLXdispatchTexImageHeader; +/* +** Data that is specific to a glTexImage3D or glTexImage4D call. The +** data is sent in the following order: +** Render or RenderLarge header +** Pixel 3D header +** TexImage 3D header +** When a glTexImage3D call the size4d and woffset fields are unexamined +** by the server. +** Could be used by all TexImage commands and perhaps should be in the +** future. +*/ +#define __GLX_TEXIMAGE_3D_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 internalformat B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 depth B32; \ + CARD32 size4d B32; \ + CARD32 border B32; \ + CARD32 format B32; \ + CARD32 type B32; \ + CARD32 nullimage B32 + +#define __GLX_TEXIMAGE_3D_HDR_SIZE 44 + +#define __GLX_TEXIMAGE_3D_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_3D_HDR_SIZE + \ + __GLX_TEXIMAGE_3D_HDR_SIZE) + +#define __GLX_TEXIMAGE_3D_CMD_DISPATCH_HDR_SIZE \ + (__GLX_PIXEL_3D_HDR_SIZE + __GLX_TEXIMAGE_3D_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_3D_HDR; + __GLX_TEXIMAGE_3D_HDR; +} __GLXtexImage3DHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_3D_HDR; + __GLX_TEXIMAGE_3D_HDR; +} __GLXtexImage3DLargeHeader; + +typedef struct { + __GLX_PIXEL_3D_HDR; + __GLX_TEXIMAGE_3D_HDR; +} __GLXdispatchTexImage3DHeader; + /* -** Data that is specific to a glTexSubImage1D or glTexSubImage2D call. The +** Data that is specific to a glTexSubImage1D or glTexSubImage2D call. The ** data is sent in the following order: -** Render or RenderLarge header -** Pixel header -** TexSubImage header -** When a glTexSubImage1D call is made, the yoffset and height fields +** Render or RenderLarge header +** Pixel header +** TexSubImage header +** When a glTexSubImage1D call is made, the yoffset and height fields ** are unexamined by the server and are considered to be padding. */ #define __GLX_TEXSUBIMAGE_HDR \ @@ -773,11 +1222,61 @@ } __GLXdispatchTexSubImageHeader; /* +** Data that is specific to a glTexSubImage3D and 4D calls. The +** data is sent in the following order: +** Render or RenderLarge header +** Pixel 3D header +** TexSubImage 3D header +** When a glTexSubImage3D call is made, the woffset and size4d fields +** are unexamined by the server and are considered to be padding. +*/ +#define __GLX_TEXSUBIMAGE_3D_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 xoffset B32; \ + CARD32 yoffset B32; \ + CARD32 zoffset B32; \ + CARD32 woffset B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 depth B32; \ + CARD32 size4d B32; \ + CARD32 format B32; \ + CARD32 type B32; \ + CARD32 nullImage \ + +#define __GLX_TEXSUBIMAGE_3D_HDR_SIZE 52 + +#define __GLX_TEXSUBIMAGE_3D_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_3D_HDR_SIZE + \ + __GLX_TEXSUBIMAGE_3D_HDR_SIZE) + +#define __GLX_TEXSUBIMAGE_3D_CMD_DISPATCH_HDR_SIZE \ + (__GLX_PIXEL_3D_HDR_SIZE + __GLX_TEXSUBIMAGE_3D_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_3D_HDR; + __GLX_TEXSUBIMAGE_3D_HDR; +} __GLXtexSubImage3DHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_3D_HDR; + __GLX_TEXSUBIMAGE_3D_HDR; +} __GLXtexSubImage3DLargeHeader; + +typedef struct { + __GLX_PIXEL_3D_HDR; + __GLX_TEXSUBIMAGE_3D_HDR; +} __GLXdispatchTexSubImage3DHeader; + +/* ** Data that is specific to a glDrawPixels call. The data is sent in the ** following order: ** Render or RenderLarge header ** Pixel header -** Bitmap header +** DrawPixels header */ #define __GLX_DRAWPIXELS_HDR \ CARD32 width B32; \ @@ -811,6 +1310,46 @@ } __GLXdispatchDrawPixelsHeader; /* +** Data that is specific to a glConvolutionFilter1D or glConvolutionFilter2D +** call. The data is sent in the following order: +** Render or RenderLarge header +** Pixel header +** ConvolutionFilter header +** When a glConvolutionFilter1D call the height field is unexamined by the server. +*/ +#define __GLX_CONV_FILT_HDR \ + CARD32 target B32; \ + CARD32 internalformat B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 format B32; \ + CARD32 type B32 + +#define __GLX_CONV_FILT_HDR_SIZE 24 + +#define __GLX_CONV_FILT_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_CONV_FILT_HDR_SIZE) + +#define __GLX_CONV_FILT_CMD_DISPATCH_HDR_SIZE \ + (__GLX_PIXEL_HDR_SIZE + __GLX_CONV_FILT_HDR_SIZE) +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; + __GLX_CONV_FILT_HDR; +} __GLXConvolutionFilterHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_HDR; + __GLX_CONV_FILT_HDR; +} __GLXConvolutionFilterLargeHeader; + +typedef struct { + __GLX_PIXEL_HDR; + __GLX_CONV_FILT_HDR; +} __GLXdispatchConvolutionFilterHeader; + +/* ** Data that is specific to a glDrawArraysEXT call. The data is sent in the ** following order: ** Render or RenderLarge header @@ -822,7 +1361,7 @@ #define __GLX_DRAWARRAYS_HDR \ CARD32 numVertexes B32; \ CARD32 numComponents B32; \ - CARD32 primType B32 + CARD32 primType B32 #define __GLX_DRAWARRAYS_HDR_SIZE 12 @@ -846,7 +1385,7 @@ #define __GLX_COMPONENT_HDR \ CARD32 datatype B32; \ INT32 numVals B32; \ - CARD32 component B32 + CARD32 component B32 typedef struct { __GLX_COMPONENT_HDR; @@ -854,6 +1393,81 @@ #define __GLX_COMPONENT_HDR_SIZE 12 +/* +** Data that is specific to a glColorTable call +** The data is sent in the following order: +** Render or RenderLarge header +** Pixel header +** ColorTable header +*/ + +#define __GLX_COLOR_TABLE_HDR \ + CARD32 target B32; \ + CARD32 internalformat B32; \ + CARD32 width B32; \ + CARD32 format B32; \ + CARD32 type B32 + +#define __GLX_COLOR_TABLE_HDR_SIZE 20 + +#define __GLX_COLOR_TABLE_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_COLOR_TABLE_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; + __GLX_COLOR_TABLE_HDR; +} __GLXColorTableHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_HDR; + __GLX_COLOR_TABLE_HDR; +} __GLXColorTableLargeHeader; + +typedef struct { + __GLX_PIXEL_HDR; + __GLX_COLOR_TABLE_HDR; +} __GLXdispatchColorTableHeader; + +/* +** Data that is specific to a glColorSubTable call +** The data is sent in the following order: +** Render or RenderLarge header +** Pixel header +** ColorTable header +*/ + +#define __GLX_COLOR_SUBTABLE_HDR \ + CARD32 target B32; \ + CARD32 start B32; \ + CARD32 count B32; \ + CARD32 format B32; \ + CARD32 type B32 + +#define __GLX_COLOR_SUBTABLE_HDR_SIZE 20 + +#define __GLX_COLOR_SUBTABLE_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + \ + __GLX_COLOR_SUBTABLE_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; + __GLX_COLOR_SUBTABLE_HDR; +} __GLXColorSubTableHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_HDR; + __GLX_COLOR_SUBTABLE_HDR; +} __GLXColorSubTableLargeHeader; + +typedef struct { + __GLX_PIXEL_HDR; + __GLX_COLOR_SUBTABLE_HDR; +} __GLXdispatchColorSubTableHeader; + /*****************************************************************************/ @@ -863,6 +1477,11 @@ #undef GLXContextID #undef GLXPixmap #undef GLXDrawable +#undef GLXPbuffer +#undef GLXWindow +#undef GLXFBConfigID +#undef GLXFBConfigIDSGIX +#undef GLXPbufferSGIX /* Opcodes for GLX commands */ @@ -933,6 +1552,23 @@ #define X_GLsop_GetTexLevelParameteriv 139 #define X_GLsop_IsEnabled 140 #define X_GLsop_IsList 141 +#define X_GLsop_AreTexturesResident 143 +#define X_GLsop_DeleteTextures 144 +#define X_GLsop_GenTextures 145 +#define X_GLsop_IsTexture 146 +#define X_GLsop_GetColorTable 147 +#define X_GLsop_GetColorTableParameterfv 148 +#define X_GLsop_GetColorTableParameteriv 149 +#define X_GLsop_GetConvolutionFilter 150 +#define X_GLsop_GetConvolutionParameterfv 151 +#define X_GLsop_GetConvolutionParameteriv 152 +#define X_GLsop_GetSeparableFilter 153 +#define X_GLsop_GetHistogram 154 +#define X_GLsop_GetHistogramParameterfv 155 +#define X_GLsop_GetHistogramParameteriv 156 +#define X_GLsop_GetMinmax 157 +#define X_GLsop_GetMinmaxParameterfv 158 +#define X_GLsop_GetMinmaxParameteriv 159 /* Opcodes for rendering commands */ @@ -1127,8 +1763,8 @@ #define X_GLrop_Translated 189 #define X_GLrop_Translatef 190 #define X_GLrop_Viewport 191 -#define X_GLrop_DrawArrays 4116 -#define X_GLrop_PolygonOffset 4098 +#define X_GLrop_DrawArrays 193 +#define X_GLrop_PolygonOffset 192 #define X_GLrop_CopyTexImage1D 4119 #define X_GLrop_CopyTexImage2D 4120 #define X_GLrop_CopyTexSubImage1D 4121 @@ -1138,14 +1774,56 @@ #define X_GLrop_BindTexture 4117 #define X_GLrop_PrioritizeTextures 4118 #define X_GLrop_Indexubv 194 +#define X_GLrop_BlendColor 4096 +#define X_GLrop_BlendEquation 4097 +#define X_GLrop_ColorTable 2053 +#define X_GLrop_ColorTableParameterfv 2054 +#define X_GLrop_ColorTableParameteriv 2055 +#define X_GLrop_CopyColorTable 2056 +#define X_GLrop_ColorSubTable 195 +#define X_GLrop_CopyColorSubTable 196 +#define X_GLrop_ConvolutionFilter1D 4101 +#define X_GLrop_ConvolutionFilter2D 4102 +#define X_GLrop_ConvolutionParameterf 4103 +#define X_GLrop_ConvolutionParameterfv 4104 +#define X_GLrop_ConvolutionParameteri 4105 +#define X_GLrop_ConvolutionParameteriv 4106 +#define X_GLrop_CopyConvolutionFilter1D 4107 +#define X_GLrop_CopyConvolutionFilter2D 4108 +#define X_GLrop_SeparableFilter2D 4109 +#define X_GLrop_Histogram 4110 +#define X_GLrop_Minmax 4111 +#define X_GLrop_ResetHistogram 4112 +#define X_GLrop_ResetMinmax 4113 +#define X_GLrop_TexImage3D 4114 +#define X_GLrop_TexSubImage3D 4115 +#define X_GLrop_CopyTexSubImage3D 4123 +#define X_GLrop_ActiveTextureARB 197 +#define X_GLrop_MultiTexCoord1dvARB 198 +#define X_GLrop_MultiTexCoord1fvARB 199 +#define X_GLrop_MultiTexCoord1ivARB 200 +#define X_GLrop_MultiTexCoord1svARB 201 +#define X_GLrop_MultiTexCoord2dvARB 202 +#define X_GLrop_MultiTexCoord2fvARB 203 +#define X_GLrop_MultiTexCoord2ivARB 204 +#define X_GLrop_MultiTexCoord2svARB 205 +#define X_GLrop_MultiTexCoord3dvARB 206 +#define X_GLrop_MultiTexCoord3fvARB 207 +#define X_GLrop_MultiTexCoord3ivARB 208 +#define X_GLrop_MultiTexCoord3svARB 209 +#define X_GLrop_MultiTexCoord4dvARB 210 +#define X_GLrop_MultiTexCoord4fvARB 211 +#define X_GLrop_MultiTexCoord4ivARB 212 +#define X_GLrop_MultiTexCoord4svARB 213 +#define X_GLrop_DrawArraysEXT 4116 /* Opcodes for Vendor Private commands */ -#define X_GLvop_AreTexturesResident 11 -#define X_GLvop_DeleteTextures 12 -#define X_GLvop_GenTextures 13 -#define X_GLvop_IsTexture 14 +#define X_GLvop_AreTexturesResidentEXT 11 +#define X_GLvop_DeleteTexturesEXT 12 +#define X_GLvop_GenTexturesEXT 13 +#define X_GLvop_IsTextureEXT 14 /* Opcodes for GLX vendor private commands */ Index: xc/include/GL/glxtokens.h diff -u xc/include/GL/glxtokens.h:1.4 xc/include/GL/glxtokens.h:1.5 --- xc/include/GL/glxtokens.h:1.4 Fri Jun 16 20:02:46 2000 +++ xc/include/GL/glxtokens.h Wed Mar 21 10:51:38 2001 @@ -1,11 +1,11 @@ #ifndef __GLX_glxtokens_h__ #define __GLX_glxtokens_h__ -/* $XFree86: xc/include/GL/glxtokens.h,v 1.4 2000/06/17 00:02:46 martin Exp $ */ +/* $XFree86: xc/include/GL/glxtokens.h,v 1.5 2001/03/21 15:51:38 dawes Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.0 (the "License"), the contents of this +** Software License B, Version 1.1 (the "License"), the contents of this ** file are subject only to the provisions of the License. You may not use ** this file except in compliance with the License. You may obtain a copy ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 @@ -222,7 +222,6 @@ #define GLX_EXT_visual_info 1 #define GLX_EXT_visual_rating 1 #define GLX_ARB_get_proc_address 1 - #ifdef __cplusplus } Index: xc/include/bitmaps/Imakefile diff -u xc/include/bitmaps/Imakefile:1.1.1.2 xc/include/bitmaps/Imakefile:1.1.1.3 --- xc/include/bitmaps/Imakefile:1.1.1.2 Sat Dec 21 22:16:32 1996 +++ xc/include/bitmaps/Imakefile Tue Jan 16 17:04:48 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: Imakefile /main/32 1996/09/28 16:17:53 rws $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/18 04:05:43 coskrey Exp $ HEADERS = \ 1x1 \ Index: xc/include/extensions/Imakefile diff -u xc/include/extensions/Imakefile:3.36 xc/include/extensions/Imakefile:3.41 --- xc/include/extensions/Imakefile:3.36 Sat Aug 26 12:15:52 2000 +++ xc/include/extensions/Imakefile Sat Apr 28 19:52:32 2001 @@ -1,44 +1,49 @@ -XCOMM $TOG: Imakefile /main/50 1997/11/24 16:47:55 kaleb $ -XCOMM $XFree86: xc/include/extensions/Imakefile,v 3.36 2000/08/26 16:15:52 keithp Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/18 04:05:44 coskrey Exp $ -#if BuildScreenSaverLibrary + + + +XCOMM $XFree86: xc/include/extensions/Imakefile,v 3.41 2001/04/28 23:52:32 dawes Exp $ + +#if BuildScreenSaverExt || BuildScreenSaveLibrary SCREENSAVERHEADERS = saver.h saverproto.h scrnsaver.h #endif -#if BuildXF86MiscLibrary +#if BuildXF86MiscExt || BuildXF86MiscLibrary XF86MISCHEADERS = xf86misc.h xf86mscstr.h #endif #if BuildXF86BigfontExt XF86BIGFONTHEADERS = xf86bigfont.h xf86bigfstr.h #endif -#if BuildXF86VidModeLibrary +#if BuildXF86VidModeExt || BuildXF86VidModeLibrary XF86VIDMODEHEADERS = xf86vmode.h xf86vmstr.h #endif -#if BuildXF86DGALibrary +#if BuildXF86DGA || BuildXF86DGALibrary XF86DGAHEADERS = xf86dga.h xf86dgastr.h xf86dga1.h xf86dga1str.h #endif #if BuildLBX LBXHEADERS = lbxbuf.h lbxbufstr.h lbxdeltastr.h lbximage.h lbxopts.h lbxstr.h lbxzlib.h #endif -#if BuildXvLibrary +#if BuildXvExt || BuildXvLibrary XVHEADERS = Xv.h Xvlib.h Xvproto.h +XVMCHEADERS = XvMC.h XvMClib.h XvMCproto.h #endif -#if BuildXF86RushLibrary +#if BuildXF86RushExt || BuildXF86RushLibrary XF86RUSHHEADERS = xf86rush.h xf86rushstr.h #endif #if BuildFontCache FONTCACHEHEADERS = fontcache.h fontcacheP.h fontcachstr.h #endif -#if BuildXinerama +#if BuildXinerama || BuildXineramaLibrary XINERAMAHEADERS = panoramiXext.h panoramiXproto.h Xinerama.h #endif -#if BuildRenderLibrary +#if BuildRender || BuildXftLibrary RENDERHEADERS = render.h renderproto.h #endif EXTRAHEADERS = $(SCREENSAVERHEADERS) $(XF86MISCHEADERS) $(XF86BIGFONTHEADERS) \ $(XF86VIDMODEHEADERS) $(XF86DGAHEADERS) $(XINERAMAHEADERS) \ - $(LBXHEADERS) $(XVHEADERS) $(XF86RUSHHEADERS) \ + $(LBXHEADERS) $(XVHEADERS) $(XVMCHEADERS) $(XF86RUSHHEADERS) \ $(FONTCACHEHEADERS) $(RENDERHEADERS) Index: xc/include/extensions/MITMisc.h diff -u xc/include/extensions/MITMisc.h:1.1.1.2 xc/include/extensions/MITMisc.h:1.1.1.3 --- xc/include/extensions/MITMisc.h:1.1.1.2 Sun Sep 27 04:00:23 1998 +++ xc/include/extensions/MITMisc.h Tue Jan 16 17:05:08 2001 @@ -22,7 +22,7 @@ /* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ -/* $TOG: MITMisc.h /main/6 1998/02/09 11:19:47 kaleb $ */ +/* $Xorg: MITMisc.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ #ifndef _XMITMISC_H_ #define _XMITMISC_H_ Index: xc/include/extensions/Print.h diff -u xc/include/extensions/Print.h:1.4 xc/include/extensions/Print.h:1.5 --- xc/include/extensions/Print.h:1.4 Tue Jan 25 13:37:31 2000 +++ xc/include/extensions/Print.h Wed Jan 17 12:53:15 2001 @@ -1,6 +1,4 @@ -/* $XFree86: xc/include/extensions/Print.h,v 1.4 2000/01/25 18:37:31 dawes Exp $ */ - -/* $XConsortium: Print.h /main/3 1996/12/10 14:59:02 rws $ */ +/* $Xorg: Print.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -59,6 +57,7 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/include/extensions/Print.h,v 1.5 2001/01/17 17:53:15 dawes Exp $ */ #ifndef _XpPrint_H_ #define _XpPrint_H_ Index: xc/include/extensions/Printstr.h diff -u xc/include/extensions/Printstr.h:1.3 xc/include/extensions/Printstr.h:1.4 --- xc/include/extensions/Printstr.h:1.3 Wed Dec 15 21:26:32 1999 +++ xc/include/extensions/Printstr.h Wed Jan 17 12:53:16 2001 @@ -1,6 +1,4 @@ -/* $XFree86: xc/include/extensions/Printstr.h,v 1.3 1999/12/16 02:26:32 robin Exp $ */ - -/* $XConsortium: Printstr.h /main/2 1996/11/16 15:20:15 rws $ */ +/* $Xorg: Printstr.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -45,6 +43,7 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/include/extensions/Printstr.h,v 1.4 2001/01/17 17:53:16 dawes Exp $ */ #ifndef _XpPrintstr_H_ Index: xc/include/extensions/XEVI.h diff -u xc/include/extensions/XEVI.h:3.3 xc/include/extensions/XEVI.h:3.4 --- xc/include/extensions/XEVI.h:3.3 Fri Oct 2 03:42:30 1998 +++ xc/include/extensions/XEVI.h Wed Jan 17 12:53:16 2001 @@ -1,4 +1,4 @@ -/* $TOG: XEVI.h /main/1 1997/11/24 16:48:01 kaleb $ */ +/* $Xorg: XEVI.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /************************************************************ Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. Permission to use, copy, modify, and distribute this Index: xc/include/extensions/XEVIstr.h diff -u xc/include/extensions/XEVIstr.h:3.3 xc/include/extensions/XEVIstr.h:3.4 --- xc/include/extensions/XEVIstr.h:3.3 Fri Oct 2 03:46:16 1998 +++ xc/include/extensions/XEVIstr.h Wed Jan 17 12:53:16 2001 @@ -1,4 +1,4 @@ -/* $TOG: XEVIstr.h /main/2 1997/12/11 18:46:06 kaleb $ */ +/* $Xorg: XEVIstr.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /************************************************************ Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. Permission to use, copy, modify, and distribute this Index: xc/include/extensions/XI.h diff -u xc/include/extensions/XI.h:1.3 xc/include/extensions/XI.h:1.4 --- xc/include/extensions/XI.h:1.3 Sun Dec 6 08:30:37 1998 +++ xc/include/extensions/XI.h Wed Jan 17 12:53:16 2001 @@ -1,4 +1,4 @@ -/* $TOG: XI.h /main/17 1998/02/09 11:20:09 kaleb $ */ +/* $Xorg: XI.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/include/extensions/XI.h,v 1.3 1998/12/06 13:30:37 dawes Exp $ */ +/* $XFree86: xc/include/extensions/XI.h,v 1.4 2001/01/17 17:53:16 dawes Exp $ */ /* Definitions used by the server, library and client */ Index: xc/include/extensions/XIE.h diff -u xc/include/extensions/XIE.h:1.1.1.2 xc/include/extensions/XIE.h:1.1.1.3 --- xc/include/extensions/XIE.h:1.1.1.2 Sun Sep 27 04:00:24 1998 +++ xc/include/extensions/XIE.h Tue Jan 16 17:05:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: XIE.h /main/6 1998/02/09 11:20:14 kaleb $ */ +/* $Xorg: XIE.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /****************************************************************************** Index: xc/include/extensions/XIEproto.h diff -u xc/include/extensions/XIEproto.h:1.1.1.2 xc/include/extensions/XIEproto.h:1.1.1.3 --- xc/include/extensions/XIEproto.h:1.1.1.2 Sun Sep 27 04:00:24 1998 +++ xc/include/extensions/XIEproto.h Tue Jan 16 17:05:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: XIEproto.h /main/7 1998/02/09 11:20:18 kaleb $ */ +/* $Xorg: XIEproto.h,v 1.5 2000/08/18 04:05:45 coskrey Exp $ */ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group @@ -577,7 +577,11 @@ CARD32 nameSpace B32; xieTypPhototag phototag B16; CARD16 type B16; +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_operator; +#else CARD8 operator; +#endif CARD8 pad[11]; } xieFloOperatorErr; Index: xc/include/extensions/XIEprotost.h diff -u xc/include/extensions/XIEprotost.h:1.1.1.2 xc/include/extensions/XIEprotost.h:1.1.1.3 --- xc/include/extensions/XIEprotost.h:1.1.1.2 Sun Sep 27 04:00:25 1998 +++ xc/include/extensions/XIEprotost.h Tue Jan 16 17:05:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: XIEprotost.h /main/7 1998/02/09 11:20:23 kaleb $ */ +/* $Xorg: XIEprotost.h,v 1.6 2000/08/18 04:05:45 coskrey Exp $ */ /****************************************************************************** @@ -228,7 +228,11 @@ typedef struct { CARD16 elemType B16; CARD16 elemLength B16; +#if defined(__cplusplus) || defined(c_plusplus) + xieTypDataClass c_class; +#else xieTypDataClass class; +#endif xieTypOrientation bandOrder; CARD16 pad B16; CARD32 length0 B32; @@ -243,7 +247,11 @@ CARD16 elemType B16; CARD16 elemLength B16; BOOL notify; +#if defined(__cplusplus) || defined(c_plusplus) + xieTypDataClass c_class; +#else xieTypDataClass class; +#endif CARD16 pad B16; CARD32 width0 B32; CARD32 width1 B32; @@ -324,7 +332,11 @@ INT32 domainOffsetX B32; INT32 domainOffsetY B32; xieTypPhototag domainPhototag B16; +#if defined(__cplusplus) || defined(c_plusplus) + xieTypArithmeticOp c_operator; +#else xieTypArithmeticOp operator; +#endif CARD8 bandMask; xieTypFloat constant0 B32; xieTypFloat constant1 B32; @@ -386,7 +398,11 @@ INT32 domainOffsetX B32; INT32 domainOffsetY B32; xieTypPhototag domainPhototag B16; +#if defined(__cplusplus) || defined(c_plusplus) + xieTypCompareOp c_operator; +#else xieTypCompareOp operator; +#endif BOOL combine; xieTypFloat constant0 B32; xieTypFloat constant1 B32; @@ -412,7 +428,11 @@ CARD16 elemType B16; CARD16 elemLength B16; xieTypPhototag src B16; +#if defined(__cplusplus) || defined(c_plusplus) + xieTypDataClass c_class; +#else xieTypDataClass class; +#endif CARD8 precision; Colormap colormap B32; } xieFloConvertFromIndex; @@ -510,7 +530,11 @@ INT32 domainOffsetX B32; INT32 domainOffsetY B32; xieTypPhototag domainPhototag B16; +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_operator; +#else CARD8 operator; +#endif CARD8 bandMask; xieTypFloat constant0 B32; xieTypFloat constant1 B32; @@ -539,7 +563,11 @@ INT32 domainOffsetX B32; INT32 domainOffsetY B32; xieTypPhototag domainPhototag B16; +#if defined(__cplusplus) || defined(c_plusplus) + xieTypMathOp c_operator; +#else xieTypMathOp operator; +#endif CARD8 bandMask; } xieFloMath; Index: xc/include/extensions/XInput.h diff -u xc/include/extensions/XInput.h:1.1.1.3 xc/include/extensions/XInput.h:1.1.1.4 --- xc/include/extensions/XInput.h:1.1.1.3 Sun Sep 27 07:04:39 1998 +++ xc/include/extensions/XInput.h Tue Jan 16 17:05:13 2001 @@ -1,4 +1,4 @@ -/* $TOG: XInput.h /main/24 1998/04/30 15:56:44 kaleb $ */ +/* $Xorg: XInput.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /************************************************************ Index: xc/include/extensions/XIproto.h diff -u xc/include/extensions/XIproto.h:1.3 xc/include/extensions/XIproto.h:1.4 --- xc/include/extensions/XIproto.h:1.3 Sun Dec 6 08:30:38 1998 +++ xc/include/extensions/XIproto.h Wed Jan 17 12:53:17 2001 @@ -1,4 +1,4 @@ -/* $TOG: XIproto.h /main/27 1998/02/09 11:20:33 kaleb $ */ +/* $Xorg: XIproto.h,v 1.4 2000/08/18 04:05:45 coskrey Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/include/extensions/XIproto.h,v 1.3 1998/12/06 13:30:38 dawes Exp $ */ +/* $XFree86: xc/include/extensions/XIproto.h,v 1.4 2001/01/17 17:53:17 dawes Exp $ */ #ifndef _XIPROTO_H #define _XIPROTO_H @@ -214,7 +214,11 @@ typedef struct _xAnyClassinfo *xAnyClassPtr; typedef struct _xAnyClassinfo { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else CARD8 class; +#endif CARD8 length; } xAnyClassInfo; @@ -229,7 +233,11 @@ typedef struct _xKeyInfo *xKeyInfoPtr; typedef struct _xKeyInfo { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else CARD8 class; +#endif CARD8 length; KeyCode min_keycode; KeyCode max_keycode; @@ -240,7 +248,11 @@ typedef struct _xButtonInfo *xButtonInfoPtr; typedef struct _xButtonInfo { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else CARD8 class; +#endif CARD8 length; CARD16 num_buttons B16; } xButtonInfo; @@ -248,7 +260,11 @@ typedef struct _xValuatorInfo *xValuatorInfoPtr; typedef struct _xValuatorInfo { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else CARD8 class; +#endif CARD8 length; CARD8 num_axes; CARD8 mode; @@ -292,7 +308,11 @@ } xOpenDeviceReply; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else CARD8 class; +#endif CARD8 event_type_base; } xInputClassInfo; @@ -732,13 +752,21 @@ } xGetFeedbackControlReply; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class */ +#else CARD8 class; /* feedback class */ +#endif CARD8 id; /* feedback id */ CARD16 length B16; /* feedback length */ } xFeedbackState; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else CARD8 class; +#endif CARD8 id; CARD16 length B16; CARD16 pitch B16; @@ -753,7 +781,11 @@ } xKbdFeedbackState; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else CARD8 class; +#endif CARD8 id; CARD16 length B16; CARD8 pad1,pad2; @@ -763,7 +795,11 @@ } xPtrFeedbackState; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else CARD8 class; /* feedback class id */ +#endif CARD8 id; CARD16 length B16; /* feedback length */ CARD32 resolution B32; @@ -772,7 +808,11 @@ } xIntegerFeedbackState; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else CARD8 class; /* feedback class id */ +#endif CARD8 id; CARD16 length B16; /* feedback length */ CARD16 max_symbols B16; @@ -780,7 +820,11 @@ } xStringFeedbackState; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else CARD8 class; /* feedback class id */ +#endif CARD8 id; CARD16 length B16; /* feedback length */ CARD8 percent; @@ -790,7 +834,11 @@ } xBellFeedbackState; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else CARD8 class; /* feedback class id */ +#endif CARD8 id; CARD16 length B16; /* feedback length */ CARD32 led_mask B32; @@ -814,13 +862,21 @@ } xChangeFeedbackControlReq; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else CARD8 class; /* feedback class id */ +#endif CARD8 id; /* feedback id */ CARD16 length B16; /* feedback length */ } xFeedbackCtl; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else CARD8 class; /* feedback class id */ +#endif CARD8 id; /* feedback length */ CARD16 length B16; /* feedback length */ KeyCode key; @@ -834,7 +890,11 @@ } xKbdFeedbackCtl; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else CARD8 class; /* feedback class id */ +#endif CARD8 id; /* feedback id */ CARD16 length B16; /* feedback length */ CARD8 pad1,pad2; @@ -844,14 +904,22 @@ } xPtrFeedbackCtl; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else CARD8 class; /* feedback class id */ +#endif CARD8 id; /* feedback id */ CARD16 length B16; /* feedback length */ INT32 int_to_display B32; } xIntegerFeedbackCtl; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else CARD8 class; /* feedback class id */ +#endif CARD8 id; /* feedback id */ CARD16 length B16; /* feedback length */ CARD8 pad1,pad2; @@ -859,7 +927,11 @@ } xStringFeedbackCtl; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else CARD8 class; /* feedback class id */ +#endif CARD8 id; /* feedback id */ CARD16 length B16; /* feedback length */ INT8 percent; @@ -869,7 +941,11 @@ } xBellFeedbackCtl; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else CARD8 class; /* feedback class id */ +#endif CARD8 id; /* feedback id */ CARD16 length B16; /* feedback length */ CARD32 led_mask B32; @@ -1070,7 +1146,11 @@ } xQueryDeviceStateReply; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else CARD8 class; +#endif CARD8 length; CARD8 num_keys; BYTE pad1; @@ -1078,7 +1158,11 @@ } xKeyState; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else CARD8 class; +#endif CARD8 length; CARD8 num_buttons; BYTE pad1; @@ -1086,7 +1170,11 @@ } xButtonState; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else CARD8 class; +#endif CARD8 length; CARD8 num_valuators; CARD8 mode; Index: xc/include/extensions/XKB.h diff -u xc/include/extensions/XKB.h:1.3 xc/include/extensions/XKB.h:1.4 --- xc/include/extensions/XKB.h:1.3 Tue Oct 24 18:45:01 2000 +++ xc/include/extensions/XKB.h Wed Jan 17 12:53:17 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKB.h /main/14 1996/02/05 10:19:11 kaleb $ */ +/* $Xorg: XKB.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/include/extensions/XKB.h,v 1.3 2000/10/24 22:45:01 dawes Exp $ */ +/* $XFree86: xc/include/extensions/XKB.h,v 1.4 2001/01/17 17:53:17 dawes Exp $ */ #ifndef _XKB_H_ #define _XKB_H_ Index: xc/include/extensions/XKBgeom.h diff -u xc/include/extensions/XKBgeom.h:3.6 xc/include/extensions/XKBgeom.h:3.7 --- xc/include/extensions/XKBgeom.h:3.6 Sat Mar 13 22:20:35 1999 +++ xc/include/extensions/XKBgeom.h Wed Jan 17 12:53:17 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKBgeom.h /main/7 1996/03/06 21:40:11 kaleb $ */ +/* $Xorg: XKBgeom.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/include/extensions/XKBgeom.h,v 3.6 1999/03/14 03:20:35 dawes Exp $ */ +/* $XFree86: xc/include/extensions/XKBgeom.h,v 3.7 2001/01/17 17:53:17 dawes Exp $ */ #ifndef _XKBGEOM_H_ #define _XKBGEOM_H_ Index: xc/include/extensions/XKBproto.h diff -u xc/include/extensions/XKBproto.h:3.2 xc/include/extensions/XKBproto.h:3.3 --- xc/include/extensions/XKBproto.h:3.2 Mon Dec 23 00:58:18 1996 +++ xc/include/extensions/XKBproto.h Wed Jan 17 12:53:18 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKBproto.h /main/22 1996/09/28 16:18:24 rws $ */ +/* $Xorg: XKBproto.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. Index: xc/include/extensions/XKBsrv.h diff -u xc/include/extensions/XKBsrv.h:3.17 xc/include/extensions/XKBsrv.h:3.19 --- xc/include/extensions/XKBsrv.h:3.17 Sat Aug 26 11:11:23 2000 +++ xc/include/extensions/XKBsrv.h Sun Mar 25 00:31:59 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKBsrv.h /main/25 1996/09/28 16:32:19 rws $ */ +/* $Xorg: XKBsrv.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/include/extensions/XKBsrv.h,v 3.17 2000/08/26 15:11:23 dawes Exp $ */ +/* $XFree86: xc/include/extensions/XKBsrv.h,v 3.19 2001/03/25 05:31:59 tsi Exp $ */ #ifndef _XKBSRV_H_ #define _XKBSRV_H_ @@ -291,6 +291,7 @@ (c)->curKeySyms.minKeyCode+1) #define XConvertCase(s,l,u) XkbConvertCase(s,l,u) +#undef IsKeypadKey #define IsKeypadKey(s) XkbKSIsKeypad(s) #define Status int Index: xc/include/extensions/XKBstr.h diff -u xc/include/extensions/XKBstr.h:3.1 xc/include/extensions/XKBstr.h:3.2 --- xc/include/extensions/XKBstr.h:3.1 Sun Jun 22 06:16:49 1997 +++ xc/include/extensions/XKBstr.h Wed Jan 17 12:53:18 2001 @@ -1,4 +1,4 @@ -/* $TOG: XKBstr.h /main/16 1997/06/10 06:53:12 kaleb $ */ +/* $Xorg: XKBstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. Index: xc/include/extensions/XLbx.h diff -u xc/include/extensions/XLbx.h:1.1.1.1 xc/include/extensions/XLbx.h:1.1.1.2 --- xc/include/extensions/XLbx.h:1.1.1.1 Sat Dec 21 22:17:31 1996 +++ xc/include/extensions/XLbx.h Tue Jan 16 17:05:17 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XLbx.h /main/21 1996/12/15 21:23:54 rws $ */ +/* $Xorg: XLbx.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /* * Copyright 1992 Network Computing Devices * Index: xc/include/extensions/XShm.h diff -u xc/include/extensions/XShm.h:1.4 xc/include/extensions/XShm.h:1.5 --- xc/include/extensions/XShm.h:1.4 Thu Apr 29 05:13:26 1999 +++ xc/include/extensions/XShm.h Wed Jan 17 12:53:19 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/XShm.h,v 1.4 1999/04/29 09:13:26 dawes Exp $ */ +/* $XFree86: xc/include/extensions/XShm.h,v 1.5 2001/01/17 17:53:19 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ -/* $TOG: XShm.h /main/9 1998/02/09 11:21:08 kaleb $ */ +/* $Xorg: XShm.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ #ifndef _XSHM_H_ #define _XSHM_H_ Index: xc/include/extensions/XTest.h diff -u xc/include/extensions/XTest.h:3.1 xc/include/extensions/XTest.h:3.2 --- xc/include/extensions/XTest.h:3.1 Fri Oct 2 03:39:15 1998 +++ xc/include/extensions/XTest.h Wed Jan 17 12:53:19 2001 @@ -1,4 +1,4 @@ -/* $TOG: XTest.h /main/10 1998/02/09 11:21:12 kaleb $ */ +/* $Xorg: XTest.h,v 1.4 2000/08/18 04:05:45 coskrey Exp $ */ /* Copyright 1992, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/include/extensions/XTest.h,v 3.1 1998/10/02 07:39:15 dawes Exp $ */ +/* $XFree86: xc/include/extensions/XTest.h,v 3.2 2001/01/17 17:53:19 dawes Exp $ */ #ifndef _XTEST_H_ #define _XTEST_H_ Index: xc/include/extensions/Xag.h diff -u xc/include/extensions/Xag.h:1.1.1.2 xc/include/extensions/Xag.h:1.1.1.3 --- xc/include/extensions/Xag.h:1.1.1.2 Sun Sep 27 04:00:39 1998 +++ xc/include/extensions/Xag.h Tue Jan 16 17:05:18 2001 @@ -19,7 +19,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $TOG: Xag.h /main/3 1998/02/09 11:21:17 kaleb $ */ +/* $Xorg: Xag.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ #ifndef _XAG_H_ #define _XAG_H_ Index: xc/include/extensions/Xagsrv.h diff -u xc/include/extensions/Xagsrv.h:1.1.1.2 xc/include/extensions/Xagsrv.h:1.1.1.3 --- xc/include/extensions/Xagsrv.h:1.1.1.2 Sun Sep 27 04:00:39 1998 +++ xc/include/extensions/Xagsrv.h Tue Jan 16 17:05:18 2001 @@ -19,7 +19,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $TOG: Xagsrv.h /main/8 1998/02/09 11:21:22 kaleb $ */ +/* $Xorg: Xagsrv.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ #ifndef _XAGSRV_H_ #define _XAGSRV_H_ Index: xc/include/extensions/Xagstr.h diff -u xc/include/extensions/Xagstr.h:1.1.1.2 xc/include/extensions/Xagstr.h:1.1.1.3 --- xc/include/extensions/Xagstr.h:1.1.1.2 Sun Sep 27 04:00:39 1998 +++ xc/include/extensions/Xagstr.h Tue Jan 16 17:05:19 2001 @@ -19,7 +19,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $TOG: Xagstr.h /main/4 1998/02/09 11:21:26 kaleb $ */ +/* $Xorg: Xagstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ #ifndef _XAGSTR_H_ /* { */ #define _XAGSTR_H_ Index: xc/include/extensions/Xcup.h diff -u xc/include/extensions/Xcup.h:3.3 xc/include/extensions/Xcup.h:3.4 --- xc/include/extensions/Xcup.h:3.3 Fri Oct 2 03:46:17 1998 +++ xc/include/extensions/Xcup.h Wed Jan 17 12:53:19 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xcup.h /main/3 1998/02/09 11:21:30 kaleb $ */ +/* $Xorg: Xcup.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group Index: xc/include/extensions/Xcupstr.h diff -u xc/include/extensions/Xcupstr.h:3.3 xc/include/extensions/Xcupstr.h:3.4 --- xc/include/extensions/Xcupstr.h:3.3 Fri Oct 2 03:46:17 1998 +++ xc/include/extensions/Xcupstr.h Wed Jan 17 12:53:19 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xcupstr.h /main/3 1998/02/09 11:21:34 kaleb $ */ +/* $Xorg: Xcupstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /* Index: xc/include/extensions/Xdbe.h diff -u xc/include/extensions/Xdbe.h:3.0 xc/include/extensions/Xdbe.h:3.1 --- xc/include/extensions/Xdbe.h:3.0 Fri Jan 5 08:10:05 1996 +++ xc/include/extensions/Xdbe.h Wed Jan 17 12:53:20 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: Xdbe.h /main/3 1995/09/22 10:20:01 dpw $ */ +/* $Xorg: Xdbe.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company Index: xc/include/extensions/Xdbeproto.h diff -u xc/include/extensions/Xdbeproto.h:3.0 xc/include/extensions/Xdbeproto.h:3.1 --- xc/include/extensions/Xdbeproto.h:3.0 Fri Jan 5 08:10:06 1996 +++ xc/include/extensions/Xdbeproto.h Wed Jan 17 12:53:20 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: Xdbeproto.h /main/3 1995/09/22 10:20:16 dpw $ */ +/* $Xorg: Xdbeproto.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company Index: xc/include/extensions/Xext.h diff -u xc/include/extensions/Xext.h:1.1.1.2 xc/include/extensions/Xext.h:1.3 --- xc/include/extensions/Xext.h:1.1.1.2 Sun Sep 27 04:00:28 1998 +++ xc/include/extensions/Xext.h Sun Apr 1 09:59:59 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Xext.h /main/5 1998/02/09 11:21:47 kaleb $ + * $Xorg: Xext.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ * Copyright 1989, 1998 The Open Group @@ -19,6 +19,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/include/extensions/Xext.h,v 1.3 2001/04/01 13:59:59 tsi Exp $ */ #ifndef _XEXT_H_ #define _XEXT_H_ @@ -37,7 +38,13 @@ #endif ) #endif -))(); +))( +#if NeedNestedPrototypes + Display *, + char *, + char * +#endif +); extern int XMissingExtension( #if NeedFunctionPrototypes Index: xc/include/extensions/XvMC.h diff -u /dev/null xc/include/extensions/XvMC.h:1.3 --- /dev/null Mon Jun 4 12:37:00 2001 +++ xc/include/extensions/XvMC.h Sun Apr 1 09:59:59 2001 @@ -0,0 +1,117 @@ +/* $XFree86: xc/include/extensions/XvMC.h,v 1.3 2001/04/01 13:59:59 tsi Exp $ */ + +#ifndef _XVMC_H_ +#define _XVMC_H_ + +#include +#include + +#define XvMCName "XVideo-MotionCompensation" +#define XvMCNumEvents 0 +#define XvMCNumErrors 3 +#define XvMCVersion 0 +#define XvMCRevision 1 + +#define XvMCBadContext 0 +#define XvMCBadSurface 1 +#define XvMCBadSubpicture 2 + +/* Chroma formats */ +#define XVMC_CHROMA_FORMAT_420 0x00000001 +#define XVMC_CHROMA_FORMAT_422 0x00000002 +#define XVMC_CHROMA_FORMAT_444 0x00000003 + +/* XvMCSurfaceInfo Flags */ +#define XVMC_OVERLAID_SURFACE 0x00000001 +#define XVMC_BACKEND_SUBPICTURE 0x00000002 +#define XVMC_SUBPICTURE_INDEPENDENT_SCALING 0x00000004 + +/* Motion Compensation types */ +#define XVMC_IDCT 0x00010000 + +#define XVMC_MPEG_1 0x00000001 +#define XVMC_MPEG_2 0x00000002 +#define XVMC_H263 0x00000003 +#define XVMC_MPEG_4 0x00000004 + +#define XVMC_MB_TYPE_QUANT 0x01 +#define XVMC_MB_TYPE_MOTION_FORWARD 0x02 +#define XVMC_MB_TYPE_MOTION_BACKWARD 0x04 +#define XVMC_MB_TYPE_PATTERN 0x08 +#define XVMC_MB_TYPE_INTRA 0x10 + +#define XVMC_PREDICTION_FIELD 0x01 +#define XVMC_PREDICTION_FRAME 0x02 +#define XVMC_PREDICTION_DUAL_PRIME 0x03 +#define XVMC_PREDICTION_16x8 0x02 +#define XVMC_PREDICTION_4MV 0x04 + +#define XVMC_SELECT_FIRST_FORWARD 0x01 +#define XVMC_SELECT_FIRST_BACKWARD 0x02 +#define XVMC_SELECT_SECOND_FORWARD 0x04 +#define XVMC_SELECT_SECOND_BACKWARD 0x08 + +#define XVMC_DCT_TYPE_FRAME 0x00 +#define XVMC_DCT_TYPE_FIELD 0x01 + +#define XVMC_TOP_FIELD 0x00000001 +#define XVMC_BOTTOM_FIELD 0x00000002 +#define XVMC_FRAME_PICTURE (XVMC_TOP_FIELD | XVMC_BOTTOM_FIELD) +#define XVMC_TOP_FIELD_FIRST 0x00000001 +#define XVMC_PROGRESSIVE_FRAME 0x00000002 + +#define XVMC_DIRECT 0x00000001 + +#define XVMC_SCAN_ORDER_ZIG_ZAG 0x00000000 +#define XVMC_SCAN_ORDER_ALTERNATIVE_HORIZONTAL 0x00000001 +#define XVMC_SCAN_ORDER_ALTERNATIVE_VERTICAL 0x00000002 +#define XVMC_SCAN_ORDER_RASTER 0x00000003 + +#define XVMC_RENDERING 0x00000001 +#define XVMC_DISPLAYING 0x00000002 + + +typedef struct { + int surface_type_id; + int chroma_format; + int color_description; + unsigned short max_width; + unsigned short max_height; + unsigned short subpicture_max_width; + unsigned short subpicture_max_height; + int mc_type; + int flags; +} XvMCSurfaceInfo; + +typedef struct { + XID context_id; + int surface_type_id; + unsigned short width; + unsigned short height; + XvPortID port; + int flags; + void * privData; /* private to the library */ +} XvMCContext; + +typedef struct { + XID surface_id; + XID context_id; + int surface_type_id; + unsigned short width; + unsigned short height; + void *privData; /* private to the library */ +} XvMCSurface; + +typedef struct { + XID subpicture_id; + XID context_id; + int xvimage_id; + unsigned short width; + unsigned short height; + int num_palette_entries; + int entry_bytes; + char component_order[4]; + void *privData; /* private to the library */ +} XvMCSubpicture; + +#endif Index: xc/include/extensions/XvMClib.h diff -u /dev/null xc/include/extensions/XvMClib.h:1.3 --- /dev/null Mon Jun 4 12:37:00 2001 +++ xc/include/extensions/XvMClib.h Sun Apr 1 09:59:59 2001 @@ -0,0 +1,145 @@ +/* $XFree86: xc/include/extensions/XvMClib.h,v 1.3 2001/04/01 13:59:59 tsi Exp $ */ + +#ifndef _XVMCLIB_H_ +#define _XVMCLIB_H_ + +#include +#include + +Bool XvMCQueryExtension (Display *display, int *eventBase, int *errBase); +Status XvMCQueryVersion (Display *display, int *major, int *minor); + +XvMCSurfaceInfo * XvMCListSurfaceTypes(Display *dpy, XvPortID port, int *num); + +Status XvMCCreateContext ( + Display *display, + XvPortID port, + int surface_type_id, + int width, + int height, + int flags, + XvMCContext * context +); + +Status XvMCDestroyContext (Display *display, XvMCContext * context); + +Status +XvMCCreateSurface( + Display *display, + XvMCContext * context, + XvMCSurface * surface +); + +Status XvMCDestroySurface(Display *display, XvMCSurface *surface); + +XvImageFormatValues * XvMCListSubpictureTypes ( + Display * display, + XvPortID port, + int surface_type_id, + int *count_return +); + +Status +XvMCPutSurface( + Display *display, + XvMCSurface *surface, + Drawable draw, + short srcx, + short srcy, + unsigned short srcw, + unsigned short srch, + short destx, + short desty, + unsigned short destw, + unsigned short desth, + int flags +); + +Status XvMCHideSurface(Display *display, XvMCSurface *surface); + +Status +XvMCCreateSubpicture ( + Display *display, + XvMCContext *context, + XvMCSubpicture *subpicture, + unsigned short width, + unsigned short height, + int xvimage_id +); + + +Status +XvMCClearSubpicture ( + Display *display, + XvMCSubpicture *subpicture, + short x, + short y, + unsigned short width, + unsigned short height, + unsigned int color +); + +Status +XvMCCompositeSubpicture ( + Display *display, + XvMCSubpicture *subpicture, + XvImage *image, + short srcx, + short srcy, + unsigned short width, + unsigned short height, + short dstx, + short dsty +); + +Status +XvMCDestroySubpicture (Display *display, XvMCSubpicture *subpicture); + +Status +XvMCSetSubpicturePalette ( + Display *display, + XvMCSubpicture *subpicture, + unsigned char *palette +); + +Status +XvMCBlendSubpicture ( + Display *display, + XvMCSurface *target_surface, + XvMCSubpicture *subpicture, + short subx, + short suby, + unsigned short subw, + unsigned short subh, + short surfx, + short surfy, + unsigned short surfw, + unsigned short surfh +); + +Status +XvMCBlendSubpicture2 ( + Display *display, + XvMCSurface *source_surface, + XvMCSurface *target_surface, + XvMCSubpicture *subpicture, + short subx, + short suby, + unsigned short subw, + unsigned short subh, + short surfx, + short surfy, + unsigned short surfw, + unsigned short surfh +); + +Status XvMCSyncSurface (Display *display, XvMCSurface *surface); +Status XvMCFlushSurface (Display *display, XvMCSurface *surface); +Status XvMCGetSurfaceStatus (Display *display, XvMCSurface *surface, int *stat); + +Status XvMCSyncSubpicture (Display *display, XvMCSubpicture *subpicture); +Status XvMCFlushSubpicture (Display *display, XvMCSubpicture *subpicture); +Status +XvMCGetSubpictureStatus (Display *display, XvMCSubpicture *subpic, int *stat); + +#endif Index: xc/include/extensions/XvMCproto.h diff -u /dev/null xc/include/extensions/XvMCproto.h:1.4 --- /dev/null Mon Jun 4 12:37:00 2001 +++ xc/include/extensions/XvMCproto.h Mon Apr 9 20:28:24 2001 @@ -0,0 +1,203 @@ +/* $XFree86: xc/include/extensions/XvMCproto.h,v 1.4 2001/04/10 00:28:24 mvojkovi Exp $ */ + +#ifndef _XVMCPROTO_H_ +#define _XVMCPROTO_H_ + +#define xvmc_QueryVersion 0 +#define xvmc_ListSurfaceTypes 1 +#define xvmc_CreateContext 2 +#define xvmc_DestroyContext 3 +#define xvmc_CreateSurface 4 +#define xvmc_DestroySurface 5 +#define xvmc_CreateSubpicture 6 +#define xvmc_DestroySubpicture 7 +#define xvmc_ListSubpictureTypes 8 +#define xvmc_LastRequest xvmc_ListSubpictureTypes + +#define xvmcNumRequest (xvmc_LastRequest + 1) + + +typedef struct { + CARD32 surface_type_id B32; + CARD16 chroma_format B16; + CARD16 color_description B16; + CARD16 max_width B16; + CARD16 max_height B16; + CARD16 subpicture_max_width B16; + CARD16 subpicture_max_height B16; + CARD32 mc_type B32; + CARD32 flags B32; +} xvmcSurfaceInfo; +#define sz_xvmcSurfaceInfo 24; + +typedef struct { + CARD8 reqType; + CARD8 xvmcReqType; + CARD16 length B16; +} xvmcQueryVersionReq; +#define sz_xvmcQueryVersionReq 4; + +typedef struct { + BYTE type; /* X_Reply */ + BYTE padb1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 major B32; + CARD32 minor B32; + CARD32 padl4 B32; + CARD32 padl5 B32; + CARD32 padl6 B32; + CARD32 padl7 B32; +} xvmcQueryVersionReply; +#define sz_xvmcQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xvmcReqType; + CARD16 length B16; + CARD32 port B32; +} xvmcListSurfaceTypesReq; +#define sz_xvmcListSurfaceTypesReq 8; + +typedef struct { + BYTE type; /* X_Reply */ + BYTE padb1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 num B32; + CARD32 padl3 B32; + CARD32 padl4 B32; + CARD32 padl5 B32; + CARD32 padl6 B32; + CARD32 padl7 B32; +} xvmcListSurfaceTypesReply; +#define sz_xvmcListSurfaceTypesReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xvmcReqType; + CARD16 length B16; + CARD32 context_id B32; + CARD32 port B32; + CARD32 surface_type_id B32; + CARD16 width B16; + CARD16 height B16; + CARD32 flags B32; +} xvmcCreateContextReq; +#define sz_xvmcCreateContextReq 24; + +typedef struct { + BYTE type; /* X_Reply */ + BYTE padb1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 width_actual B16; + CARD16 height_actual B16; + CARD32 flags_return B32; + CARD32 padl4 B32; + CARD32 padl5 B32; + CARD32 padl6 B32; + CARD32 padl7 B32; +} xvmcCreateContextReply; +#define sz_xvmcCreateContextReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xvmcReqType; + CARD16 length B16; + CARD32 context_id B32; +} xvmcDestroyContextReq; +#define sz_xvmcDestroyContextReq 8; + +typedef struct { + CARD8 reqType; + CARD8 xvmcReqType; + CARD16 length B16; + CARD32 surface_id B32; + CARD32 context_id B32; +} xvmcCreateSurfaceReq; +#define sz_xvmcCreateSurfaceReq 12; + +typedef struct { + BYTE type; /* X_Reply */ + BYTE padb1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 padl2 B32; + CARD32 padl3 B32; + CARD32 padl4 B32; + CARD32 padl5 B32; + CARD32 padl6 B32; + CARD32 padl7 B32; +} xvmcCreateSurfaceReply; +#define sz_xvmcCreateSurfaceReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xvmcReqType; + CARD16 length B16; + CARD32 surface_id B32; +} xvmcDestroySurfaceReq; +#define sz_xvmcDestroySurfaceReq 8; + + +typedef struct { + CARD8 reqType; + CARD8 xvmcReqType; + CARD16 length B16; + CARD32 subpicture_id B32; + CARD32 context_id B32; + CARD32 xvimage_id B32; + CARD16 width B16; + CARD16 height B16; +} xvmcCreateSubpictureReq; +#define sz_xvmcCreateSubpictureReq 20; + +typedef struct { + BYTE type; /* X_Reply */ + BYTE padb1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 width_actual B16; + CARD16 height_actual B16; + CARD16 num_palette_entries B16; + CARD16 entry_bytes B16; + CARD8 component_order[4]; + CARD32 padl5 B32; + CARD32 padl6 B32; + CARD32 padl7 B32; +} xvmcCreateSubpictureReply; +#define sz_xvmcCreateSubpictureReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xvmcReqType; + CARD16 length B16; + CARD32 subpicture_id B32; +} xvmcDestroySubpictureReq; +#define sz_xvmcDestroySubpictureReq 8; + +typedef struct { + CARD8 reqType; + CARD8 xvmcReqType; + CARD16 length B16; + CARD32 port B32; + CARD32 surface_type_id B32; +} xvmcListSubpictureTypesReq; +#define sz_xvmcListSubpictureTypesReq 12; + +typedef struct { + BYTE type; /* X_Reply */ + BYTE padb1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 num B32; + CARD32 padl2 B32; + CARD32 padl3 B32; + CARD32 padl4 B32; + CARD32 padl5 B32; + CARD32 padl6 B32; +} xvmcListSubpictureTypesReply; +#define sz_xvmcListSubpictureTypesReply 32 + +#endif Index: xc/include/extensions/Xvproto.h diff -u xc/include/extensions/Xvproto.h:1.5 xc/include/extensions/Xvproto.h:1.6 --- xc/include/extensions/Xvproto.h:1.5 Mon Jan 24 19:08:07 2000 +++ xc/include/extensions/Xvproto.h Mon May 7 17:37:12 2001 @@ -21,7 +21,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/include/extensions/Xvproto.h,v 1.5 2000/01/25 00:08:07 mvojkovi Exp $ */ +/* $XFree86: xc/include/extensions/Xvproto.h,v 1.6 2001/05/07 21:37:12 tsi Exp $ */ #ifndef XVPROTO_H #define XVPROTO_H @@ -49,6 +49,7 @@ ** */ +#include /* Symbols: These are undefined at the end of this file to restore the values they have in Xv.h */ Index: xc/include/extensions/bigreqstr.h diff -u xc/include/extensions/bigreqstr.h:1.1.1.3 xc/include/extensions/bigreqstr.h:1.1.1.4 --- xc/include/extensions/bigreqstr.h:1.1.1.3 Sun Sep 27 04:00:29 1998 +++ xc/include/extensions/bigreqstr.h Tue Jan 16 17:05:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: bigreqstr.h /main/6 1998/02/09 11:21:51 kaleb $ */ +/* $Xorg: bigreqstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/include/extensions/dpms.h diff -u xc/include/extensions/dpms.h:3.4 xc/include/extensions/dpms.h:3.5 --- xc/include/extensions/dpms.h:3.4 Wed Mar 15 11:51:51 2000 +++ xc/include/extensions/dpms.h Wed Jan 17 12:53:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: dpms.h /main/1 1997/11/12 14:36:52 kaleb $ */ +/* $Xorg: dpms.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /***************************************************************** Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts. @@ -26,7 +26,7 @@ Equipment Corporation. ******************************************************************/ -/* $XFree86: xc/include/extensions/dpms.h,v 3.4 2000/03/15 16:51:51 tsi Exp $ */ +/* $XFree86: xc/include/extensions/dpms.h,v 3.5 2001/01/17 17:53:20 dawes Exp $ */ /* * HISTORY Index: xc/include/extensions/dpmsstr.h diff -u xc/include/extensions/dpmsstr.h:3.2 xc/include/extensions/dpmsstr.h:3.3 --- xc/include/extensions/dpmsstr.h:3.2 Sat Nov 22 01:50:08 1997 +++ xc/include/extensions/dpmsstr.h Wed Jan 17 12:53:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: dpmsstr.h /main/1 1997/11/12 14:36:58 kaleb $ */ +/* $Xorg: dpmsstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /***************************************************************** Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts. Index: xc/include/extensions/extutil.h diff -u xc/include/extensions/extutil.h:1.4 xc/include/extensions/extutil.h:1.5 --- xc/include/extensions/extutil.h:1.4 Tue Sep 26 11:56:45 2000 +++ xc/include/extensions/extutil.h Wed Jan 17 12:53:20 2001 @@ -1,5 +1,5 @@ /* - * $TOG: extutil.h /main/16 1998/02/09 11:22:04 kaleb $ + * $Xorg: extutil.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ * Copyright 1989, 1998 The Open Group @@ -27,7 +27,7 @@ * protocol extensions. THESE INTERFACES ARE NOT PART OF THE X STANDARD AND * ARE SUBJECT TO CHANGE! */ -/* $XFree86: xc/include/extensions/extutil.h,v 1.4 2000/09/26 15:56:45 tsi Exp $ */ +/* $XFree86: xc/include/extensions/extutil.h,v 1.5 2001/01/17 17:53:20 dawes Exp $ */ #ifndef _EXTUTIL_H_ #define _EXTUTIL_H_ Index: xc/include/extensions/lbxbuf.h diff -u xc/include/extensions/lbxbuf.h:1.2 xc/include/extensions/lbxbuf.h:1.3 --- xc/include/extensions/lbxbuf.h:1.2 Thu May 18 19:46:11 2000 +++ xc/include/extensions/lbxbuf.h Wed Jan 17 12:53:20 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lbxbuf.h /main/7 1996/11/15 21:33:12 rws $ */ +/* $Xorg: lbxbuf.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /* * Copyright 1988, 1989, 1990, 1994 Network Computing Devices, Inc. * Index: xc/include/extensions/lbxbufstr.h diff -u xc/include/extensions/lbxbufstr.h:1.1.1.1 xc/include/extensions/lbxbufstr.h:1.1.1.2 --- xc/include/extensions/lbxbufstr.h:1.1.1.1 Sat Dec 21 22:17:31 1996 +++ xc/include/extensions/lbxbufstr.h Tue Jan 16 17:05:23 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lbxbufstr.h /main/8 1996/11/15 21:33:20 rws $ */ +/* $Xorg: lbxbufstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /* * Copyright 1988, 1989, 1990, 1994 Network Computing Devices, Inc. * Index: xc/include/extensions/lbxdeltastr.h diff -u xc/include/extensions/lbxdeltastr.h:1.2 xc/include/extensions/lbxdeltastr.h:1.3 --- xc/include/extensions/lbxdeltastr.h:1.2 Thu May 18 19:46:11 2000 +++ xc/include/extensions/lbxdeltastr.h Wed Jan 17 12:53:21 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lbxdeltastr.h /main/7 1996/12/15 21:24:04 rws $ */ +/* $Xorg: lbxdeltastr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /* * Copyright 1993 Network Computing Devices * Index: xc/include/extensions/lbximage.h diff -u xc/include/extensions/lbximage.h:1.1.1.2 xc/include/extensions/lbximage.h:1.1.1.3 --- xc/include/extensions/lbximage.h:1.1.1.2 Sun Sep 27 04:00:37 1998 +++ xc/include/extensions/lbximage.h Tue Jan 16 17:05:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: lbximage.h /main/7 1998/02/09 11:22:21 kaleb $ */ +/* $Xorg: lbximage.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /****************************************************************************** Index: xc/include/extensions/lbxopts.h diff -u xc/include/extensions/lbxopts.h:1.4 xc/include/extensions/lbxopts.h:1.5 --- xc/include/extensions/lbxopts.h:1.4 Thu May 18 19:46:11 2000 +++ xc/include/extensions/lbxopts.h Wed Jan 17 12:53:21 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lbxopts.h /main/9 1996/11/15 21:33:35 rws $ */ +/* $Xorg: lbxopts.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /* * Copyright 1994 Network Computing Devices, Inc. * @@ -21,7 +21,7 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/include/extensions/lbxopts.h,v 1.4 2000/05/18 23:46:11 dawes Exp $ */ +/* $XFree86: xc/include/extensions/lbxopts.h,v 1.5 2001/01/17 17:53:21 dawes Exp $ */ #ifndef _LBX_OPTS_H_ #define _LBX_OPTS_H_ Index: xc/include/extensions/lbxstr.h diff -u xc/include/extensions/lbxstr.h:1.1.1.1 xc/include/extensions/lbxstr.h:1.1.1.2 --- xc/include/extensions/lbxstr.h:1.1.1.1 Sat Dec 21 22:17:31 1996 +++ xc/include/extensions/lbxstr.h Tue Jan 16 17:05:24 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lbxstr.h /main/27 1996/12/15 21:24:11 rws $ */ +/* $Xorg: lbxstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /* * Copyright 1992 Network Computing Devices * Index: xc/include/extensions/lbxzlib.h diff -u xc/include/extensions/lbxzlib.h:1.2 xc/include/extensions/lbxzlib.h:1.3 --- xc/include/extensions/lbxzlib.h:1.2 Thu May 18 19:46:11 2000 +++ xc/include/extensions/lbxzlib.h Wed Jan 17 12:53:21 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lbxzlib.h /main/2 1996/10/27 15:39:45 rws $ */ +/* $Xorg: lbxzlib.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ /* * Copyright 1993 Network Computing Devices * Index: xc/include/extensions/mitmiscstr.h diff -u xc/include/extensions/mitmiscstr.h:1.1.1.2 xc/include/extensions/mitmiscstr.h:1.1.1.3 --- xc/include/extensions/mitmiscstr.h:1.1.1.2 Sun Sep 27 04:00:29 1998 +++ xc/include/extensions/mitmiscstr.h Tue Jan 16 17:05:25 2001 @@ -22,7 +22,7 @@ /* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ -/* $TOG: mitmiscstr.h /main/5 1998/02/09 11:22:38 kaleb $ */ +/* $Xorg: mitmiscstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ #include "MITMisc.h" Index: xc/include/extensions/multibuf.h diff -u xc/include/extensions/multibuf.h:3.2 xc/include/extensions/multibuf.h:3.3 --- xc/include/extensions/multibuf.h:3.2 Sun Jan 31 07:21:17 1999 +++ xc/include/extensions/multibuf.h Wed Jan 17 12:53:21 2001 @@ -1,5 +1,5 @@ /* - * $TOG: multibuf.h /main/19 1998/02/09 11:22:42 kaleb $ + * $Xorg: multibuf.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ * Copyright 1989, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/include/extensions/multibuf.h,v 3.2 1999/01/31 12:21:17 dawes Exp $ */ +/* $XFree86: xc/include/extensions/multibuf.h,v 3.3 2001/01/17 17:53:21 dawes Exp $ */ #ifndef _MULTIBUF_H_ #define _MULTIBUF_H_ Index: xc/include/extensions/multibufst.h diff -u xc/include/extensions/multibufst.h:3.4 xc/include/extensions/multibufst.h:3.5 --- xc/include/extensions/multibufst.h:3.4 Sun Jan 31 07:21:17 1999 +++ xc/include/extensions/multibufst.h Wed Jan 17 12:53:22 2001 @@ -1,5 +1,5 @@ /* - * $TOG: multibufst.h /main/17 1998/02/09 11:22:47 kaleb $ + * $Xorg: multibufst.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ * Copyright 1989, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/include/extensions/multibufst.h,v 3.4 1999/01/31 12:21:17 dawes Exp $ */ +/* $XFree86: xc/include/extensions/multibufst.h,v 3.5 2001/01/17 17:53:22 dawes Exp $ */ #ifndef _MULTIBUFST_H_ #define _MULTIBUFST_H_ Index: xc/include/extensions/panoramiXext.h diff -u xc/include/extensions/panoramiXext.h:3.5 xc/include/extensions/panoramiXext.h:3.6 --- xc/include/extensions/panoramiXext.h:3.5 Tue Feb 29 20:04:21 2000 +++ xc/include/extensions/panoramiXext.h Wed Jan 17 12:53:22 2001 @@ -1,28 +1,32 @@ -/* $TOG: panoramiXext.h /main/3 1998/02/13 13:08:51 kaleb $ */ -/**************************************************************** -* * -* Copyright (c) Digital Equipment Corporation, 1991, 1997 * -* * -* All Rights Reserved. Unpublished rights reserved under * -* the copyright laws of the United States. * -* * -* The software contained on this media is proprietary to * -* and embodies the confidential technology of Digital * -* Equipment Corporation. Possession, use, duplication or * -* dissemination of the software and media is authorized only * -* pursuant to a valid written license from Digital Equipment * -* Corporation. * -* * -* RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure * -* by the U.S. Government is subject to restrictions as set * -* forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, * -* or in FAR 52.227-19, as applicable. * -* * -*****************************************************************/ +/* $Xorg: panoramiXext.h,v 1.4 2000/08/18 04:05:45 coskrey Exp $ */ +/***************************************************************** +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. +******************************************************************/ /* * PanoramiX definitions */ -/* $XFree86: xc/include/extensions/panoramiXext.h,v 3.5 2000/03/01 01:04:21 dawes Exp $ */ +/* $XFree86: xc/include/extensions/panoramiXext.h,v 3.6 2001/01/17 17:53:22 dawes Exp $ */ /* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */ Index: xc/include/extensions/panoramiXproto.h diff -u xc/include/extensions/panoramiXproto.h:3.5 xc/include/extensions/panoramiXproto.h:3.6 --- xc/include/extensions/panoramiXproto.h:3.5 Tue Feb 29 20:04:21 2000 +++ xc/include/extensions/panoramiXproto.h Wed Jan 17 12:53:22 2001 @@ -1,25 +1,29 @@ -/* $TOG: panoramiXproto.h /main/4 1998/02/13 13:08:58 kaleb $ */ -/**************************************************************** -* * -* Copyright (c) Digital Equipment Corporation, 1991, 1997 * -* * -* All Rights Reserved. Unpublished rights reserved under * -* the copyright laws of the United States. * -* * -* The software contained on this media is proprietary to * -* and embodies the confidential technology of Digital * -* Equipment Corporation. Possession, use, duplication or * -* dissemination of the software and media is authorized only * -* pursuant to a valid written license from Digital Equipment * -* Corporation. * -* * -* RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure * -* by the U.S. Government is subject to restrictions as set * -* forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, * -* or in FAR 52.227-19, as applicable. * -* * -*****************************************************************/ -/* $XFree86: xc/include/extensions/panoramiXproto.h,v 3.5 2000/03/01 01:04:21 dawes Exp $ */ +/* $Xorg: panoramiXproto.h,v 1.4 2000/08/18 04:05:45 coskrey Exp $ */ +/***************************************************************** +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. +******************************************************************/ +/* $XFree86: xc/include/extensions/panoramiXproto.h,v 3.6 2001/01/17 17:53:22 dawes Exp $ */ /* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */ Index: xc/include/extensions/record.h diff -u xc/include/extensions/record.h:1.1.1.2 xc/include/extensions/record.h:1.1.1.3 --- xc/include/extensions/record.h:1.1.1.2 Sun Feb 4 02:34:01 1996 +++ xc/include/extensions/record.h Tue Jan 16 17:05:28 2001 @@ -1,5 +1,5 @@ /* -$XConsortium: record.h /main/4 1996/01/31 20:28:22 dpw $ +$Xorg: record.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ /*************************************************************************** Index: xc/include/extensions/recordstr.h diff -u xc/include/extensions/recordstr.h:1.1.1.2 xc/include/extensions/recordstr.h:1.1.1.3 --- xc/include/extensions/recordstr.h:1.1.1.2 Wed Jan 10 23:42:22 1996 +++ xc/include/extensions/recordstr.h Tue Jan 16 17:05:28 2001 @@ -1,6 +1,6 @@ /* #ifndef lint -$XConsortium: recordstr.h /main/2 1996/01/09 18:15:19 gildea $ +$Xorg: recordstr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ static char sccsid[ ] = "@(#) recordstr.h 1.5 6/5/95 12:37:44"; #endif */ Index: xc/include/extensions/renderproto.h diff -u xc/include/extensions/renderproto.h:1.5 xc/include/extensions/renderproto.h:1.6 --- xc/include/extensions/renderproto.h:1.5 Mon Nov 20 02:13:09 2000 +++ xc/include/extensions/renderproto.h Sun Jan 21 16:19:08 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/include/extensions/renderproto.h,v 1.5 2000/11/20 07:13:09 keithp Exp $ + * $XFree86: xc/include/extensions/renderproto.h,v 1.6 2001/01/21 21:19:08 tsi Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -26,6 +26,7 @@ #ifndef _XRENDERP_H_ #define _XRENDERP_H_ +#include #include "render.h" #define Window CARD32 Index: xc/include/extensions/security.h diff -u xc/include/extensions/security.h:1.1.1.2 xc/include/extensions/security.h:1.1.1.3 --- xc/include/extensions/security.h:1.1.1.2 Sun Sep 27 04:00:38 1998 +++ xc/include/extensions/security.h Tue Jan 16 17:05:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: security.h /main/7 1998/02/09 11:23:13 kaleb $ */ +/* $Xorg: security.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ /* Copyright 1996, 1998 The Open Group Index: xc/include/extensions/securstr.h diff -u xc/include/extensions/securstr.h:1.1.1.2 xc/include/extensions/securstr.h:1.1.1.3 --- xc/include/extensions/securstr.h:1.1.1.2 Sun Sep 27 04:00:38 1998 +++ xc/include/extensions/securstr.h Tue Jan 16 17:05:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: securstr.h /main/5 1998/02/09 11:23:18 kaleb $ */ +/* $Xorg: securstr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ /* Copyright 1996, 1998 The Open Group Index: xc/include/extensions/shape.h diff -u xc/include/extensions/shape.h:1.1.1.2 xc/include/extensions/shape.h:1.1.1.3.2.1 --- xc/include/extensions/shape.h:1.1.1.2 Sun Sep 27 04:00:31 1998 +++ xc/include/extensions/shape.h Fri May 25 14:50:07 2001 @@ -1,3 +1,4 @@ +/* $XFree86: xc/include/extensions/shape.h,v 1.1.1.3.2.1 2001/05/25 18:50:07 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -20,7 +21,7 @@ ********************************************************/ -/* $TOG: shape.h /main/18 1998/02/09 11:23:22 kaleb $ */ +/* $Xorg: shape.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ #ifndef _SHAPE_H_ #define _SHAPE_H_ @@ -52,6 +53,9 @@ #define ShapeNumberEvents (ShapeNotify + 1) #ifndef _SHAPE_SERVER_ + +#include + typedef struct { int type; /* of event */ unsigned long serial; /* # of last request processed by server */ Index: xc/include/extensions/shapestr.h diff -u xc/include/extensions/shapestr.h:1.1.1.2 xc/include/extensions/shapestr.h:1.1.1.3 --- xc/include/extensions/shapestr.h:1.1.1.2 Sun Sep 27 04:00:31 1998 +++ xc/include/extensions/shapestr.h Tue Jan 16 17:05:30 2001 @@ -20,7 +20,7 @@ ********************************************************/ -/* $TOG: shapestr.h /main/14 1998/02/09 11:23:26 kaleb $ */ +/* $Xorg: shapestr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ #ifndef _SHAPESTR_H_ #define _SHAPESTR_H_ Index: xc/include/extensions/shmstr.h diff -u xc/include/extensions/shmstr.h:3.1 xc/include/extensions/shmstr.h:3.2 --- xc/include/extensions/shmstr.h:3.1 Fri Oct 2 03:39:18 1998 +++ xc/include/extensions/shmstr.h Wed Jan 17 12:53:22 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/shmstr.h,v 3.1 1998/10/02 07:39:18 dawes Exp $ */ +/* $XFree86: xc/include/extensions/shmstr.h,v 3.2 2001/01/17 17:53:22 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -26,7 +26,7 @@ #ifndef _SHMSTR_H_ #define _SHMSTR_H_ -/* $TOG: shmstr.h /main/11 1998/02/09 11:23:31 kaleb $ */ +/* $Xorg: shmstr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ #include "XShm.h" Index: xc/include/extensions/sync.h diff -u xc/include/extensions/sync.h:1.1.1.2 xc/include/extensions/sync.h:1.1.1.3 --- xc/include/extensions/sync.h:1.1.1.2 Sun Sep 27 04:00:32 1998 +++ xc/include/extensions/sync.h Tue Jan 16 17:05:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: sync.h /main/7 1998/02/09 11:23:35 kaleb $ */ +/* $Xorg: sync.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ /* Copyright 1991, 1993, 1994, 1998 The Open Group Index: xc/include/extensions/syncstr.h diff -u xc/include/extensions/syncstr.h:1.1.1.2 xc/include/extensions/syncstr.h:1.1.1.3 --- xc/include/extensions/syncstr.h:1.1.1.2 Sun Sep 27 04:00:33 1998 +++ xc/include/extensions/syncstr.h Tue Jan 16 17:05:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: syncstr.h /main/5 1998/02/09 11:23:39 kaleb $ */ +/* $Xorg: syncstr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ /* Copyright 1991, 1993, 1994, 1998 The Open Group Index: xc/include/extensions/xcmiscstr.h diff -u xc/include/extensions/xcmiscstr.h:1.1.1.2 xc/include/extensions/xcmiscstr.h:1.1.1.3 --- xc/include/extensions/xcmiscstr.h:1.1.1.2 Sun Sep 27 04:00:33 1998 +++ xc/include/extensions/xcmiscstr.h Tue Jan 16 17:05:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: xcmiscstr.h /main/5 1998/02/09 11:23:44 kaleb $ */ +/* $Xorg: xcmiscstr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group Index: xc/include/extensions/xf86dgastr.h diff -u xc/include/extensions/xf86dgastr.h:3.12 xc/include/extensions/xf86dgastr.h:3.13 --- xc/include/extensions/xf86dgastr.h:3.12 Sun Aug 22 01:57:23 1999 +++ xc/include/extensions/xf86dgastr.h Tue Dec 19 19:19:41 2000 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/xf86dgastr.h,v 3.12 1999/08/22 05:57:23 dawes Exp $ */ +/* $XFree86: xc/include/extensions/xf86dgastr.h,v 3.13 2000/12/20 00:19:41 mvojkovi Exp $ */ /* Copyright (c) 1995 Jon Tombs @@ -308,7 +308,7 @@ CARD8 dgaReqType; CARD16 length B16; CARD32 screen B32; - Colormap id B32; + CARD32 id B32; CARD32 mode B32; CARD8 alloc; CARD8 pad1; @@ -326,11 +326,11 @@ } u; struct { CARD32 pad0 B32; - Time time B32; + CARD32 time B32; INT16 dx B16; INT16 dy B16; INT16 screen B16; - KeyButMask state B16; + CARD16 state B16; CARD32 pad1 B32; CARD32 pad2 B32; CARD32 pad3 B32; Index: xc/include/extensions/xf86vmode.h diff -u xc/include/extensions/xf86vmode.h:3.27 xc/include/extensions/xf86vmode.h:3.30 --- xc/include/extensions/xf86vmode.h:3.27 Sun Mar 14 06:17:37 1999 +++ xc/include/extensions/xf86vmode.h Mon May 7 16:09:50 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/xf86vmode.h,v 3.27 1999/03/14 11:17:37 dawes Exp $ */ +/* $XFree86: xc/include/extensions/xf86vmode.h,v 3.30 2001/05/07 20:09:50 mvojkovi Exp $ */ /* Copyright 1995 Kaleb S. KEITHLEY @@ -28,7 +28,7 @@ from Kaleb S. KEITHLEY */ -/* $TOG: xf86vmode.h /main/11 1998/02/09 11:23:48 kaleb $ */ +/* $Xorg: xf86vmode.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ @@ -56,6 +56,9 @@ #define X_XF86VidModeSetClientVersion 14 #define X_XF86VidModeSetGamma 15 #define X_XF86VidModeGetGamma 16 +#define X_XF86VidModeGetGammaRamp 17 +#define X_XF86VidModeSetGammaRamp 18 +#define X_XF86VidModeGetGammaRampSize 19 #define CLKFLAG_PROGRAMABLE 1 @@ -277,6 +280,31 @@ int /* screen */, XF86VidModeGamma* /* Gamma */ ); + +Bool XF86VidModeSetGammaRamp( + Display* /* dpy */, + int /* screen */, + int /* size */, + unsigned short* /* red array */, + unsigned short* /* green array */, + unsigned short* /* blue array */ +); + +Bool XF86VidModeGetGammaRamp( + Display* /* dpy */, + int /* screen */, + int /* size */, + unsigned short* /* red array */, + unsigned short* /* green array */, + unsigned short* /* blue array */ +); + +Bool XF86VidModeGetGammaRampSize( + Display* /* dpy */, + int /* screen */, + int* /* size */ +); + _XFUNCPROTOEND Index: xc/include/extensions/xf86vmstr.h diff -u xc/include/extensions/xf86vmstr.h:3.23 xc/include/extensions/xf86vmstr.h:3.26 --- xc/include/extensions/xf86vmstr.h:3.23 Sun Mar 14 06:17:38 1999 +++ xc/include/extensions/xf86vmstr.h Sun May 6 17:59:47 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/xf86vmstr.h,v 3.23 1999/03/14 11:17:38 dawes Exp $ */ +/* $XFree86: xc/include/extensions/xf86vmstr.h,v 3.26 2001/05/06 21:59:47 mvojkovi Exp $ */ /* Copyright 1995 Kaleb S. KEITHLEY @@ -28,7 +28,7 @@ from Kaleb S. KEITHLEY */ -/* $TOG: xf86vmstr.h /main/11 1998/02/09 11:23:53 kaleb $ */ +/* $Xorg: xf86vmstr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ @@ -40,7 +40,7 @@ #define XF86VIDMODENAME "XFree86-VidModeExtension" #define XF86VIDMODE_MAJOR_VERSION 2 /* current version numbers */ -#define XF86VIDMODE_MINOR_VERSION 0 +#define XF86VIDMODE_MINOR_VERSION 1 /* * major version 0 == uses parameter-to-wire functions in XFree86 libXxf86vm. * major version 1 == uses parameter-to-wire functions hard-coded in xvidtune @@ -482,6 +482,65 @@ CARD32 pad3 B32; } xXF86VidModeSetGammaReq; #define sz_xXF86VidModeSetGammaReq 32 + + +typedef struct _XF86VidModeSetGammaRamp { + CARD8 reqType; /* always XF86VidModeReqCode */ + CARD8 xf86vidmodeReqType; + CARD16 length B16; + CARD16 screen B16; + CARD16 size B16; +} xXF86VidModeSetGammaRampReq; +#define sz_xXF86VidModeSetGammaRampReq 8 + +typedef struct _XF86VidModeGetGammaRamp { + CARD8 reqType; /* always XF86VidModeReqCode */ + CARD8 xf86vidmodeReqType; + CARD16 length B16; + CARD16 screen B16; + CARD16 size B16; +} xXF86VidModeGetGammaRampReq; +#define sz_xXF86VidModeGetGammaRampReq 8 + +typedef struct { + BYTE type; + BOOL pad; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 size B16; + CARD16 pad0 B16; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xXF86VidModeGetGammaRampReply; +#define sz_xXF86VidModeGetGammaRampReply 32 + +typedef struct _XF86VidModeGetGammaRampSize { + CARD8 reqType; /* always XF86VidModeReqCode */ + CARD8 xf86vidmodeReqType; + CARD16 length B16; + CARD16 screen B16; + CARD16 pad B16; +} xXF86VidModeGetGammaRampSizeReq; +#define sz_xXF86VidModeGetGammaRampSizeReq 8 + +typedef struct { + BYTE type; + BOOL pad; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 size B16; + CARD16 pad0 B16; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xXF86VidModeGetGammaRampSizeReply; +#define sz_xXF86VidModeGetGammaRampSizeReply 32 + #endif /* _XF86VIDMODESTR_H_ */ Index: xc/include/extensions/xtestext1.h diff -u xc/include/extensions/xtestext1.h:1.1.1.2 xc/include/extensions/xtestext1.h:1.1.1.3 --- xc/include/extensions/xtestext1.h:1.1.1.2 Sun Sep 27 04:00:34 1998 +++ xc/include/extensions/xtestext1.h Tue Jan 16 17:05:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: xtestext1.h /main/7 1998/02/15 16:20:42 kaleb $ */ +/* $Xorg: xtestext1.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ /* * xtestext1.h * Index: xc/include/extensions/xteststr.h diff -u xc/include/extensions/xteststr.h:1.1.1.2 xc/include/extensions/xteststr.h:1.1.1.3 --- xc/include/extensions/xteststr.h:1.1.1.2 Sun Sep 27 04:00:34 1998 +++ xc/include/extensions/xteststr.h Tue Jan 16 17:05:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: xteststr.h /main/10 1998/02/09 11:24:01 kaleb $ */ +/* $Xorg: xteststr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/include/fonts/FS.h diff -u xc/include/fonts/FS.h:1.5 xc/include/fonts/FS.h:1.6 --- xc/include/fonts/FS.h:1.5 Sun Aug 22 04:58:48 1999 +++ xc/include/fonts/FS.h Wed Jan 17 12:53:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: FS.h /main/10 1998/02/09 11:24:06 kaleb $ */ +/* $Xorg: FS.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; @@ -46,7 +46,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/include/fonts/FS.h,v 1.5 1999/08/22 08:58:48 dawes Exp $ */ +/* $XFree86: xc/include/fonts/FS.h,v 1.6 2001/01/17 17:53:25 dawes Exp $ */ #ifndef _FS_H_ #define _FS_H_ Index: xc/include/fonts/FSproto.h diff -u xc/include/fonts/FSproto.h:1.1.1.2 xc/include/fonts/FSproto.h:1.1.1.3 --- xc/include/fonts/FSproto.h:1.1.1.2 Sun Sep 27 04:00:19 1998 +++ xc/include/fonts/FSproto.h Tue Jan 16 17:05:04 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSproto.h /main/12 1998/02/09 11:24:10 kaleb $ */ +/* $Xorg: FSproto.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group Index: xc/include/fonts/Imakefile diff -u xc/include/fonts/Imakefile:3.6 xc/include/fonts/Imakefile:3.7 --- xc/include/fonts/Imakefile:3.6 Sat Aug 28 05:00:23 1999 +++ xc/include/fonts/Imakefile Wed Jan 17 12:53:26 2001 @@ -1,5 +1,9 @@ -XCOMM $XConsortium: Imakefile /main/6 1996/09/28 16:32:27 rws $ -XCOMM $XFree86: xc/include/fonts/Imakefile,v 3.6 1999/08/28 09:00:23 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/18 04:05:44 coskrey Exp $ + + + + +XCOMM $XFree86: xc/include/fonts/Imakefile,v 3.7 2001/01/17 17:53:26 dawes Exp $ HEADERS = FS.h FSproto.h fsmasks.h Index: xc/include/fonts/font.h diff -u xc/include/fonts/font.h:3.4 xc/include/fonts/font.h:3.5 --- xc/include/fonts/font.h:3.4 Sun Nov 26 19:10:02 2000 +++ xc/include/fonts/font.h Wed Jan 17 12:53:26 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: font.h /main/14 1996/09/28 16:32:33 rws $ */ +/* $Xorg: font.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /*********************************************************** Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. @@ -21,8 +21,8 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/include/fonts/font.h,v 3.4 2000/11/27 00:10:02 dawes Exp $ */ -/* $NCDId: @(#)font.h,v 1.7 1991/06/24 17:00:23 lemke Exp $ */ +/* $XFree86: xc/include/fonts/font.h,v 3.5 2001/01/17 17:53:26 dawes Exp $ */ +/* $NCDXorg: @(#)font.h,v 1.7 1991/06/24 17:00:23 lemke Exp $ */ #ifndef FONT_H #define FONT_H Index: xc/include/fonts/fontproto.h diff -u xc/include/fonts/fontproto.h:1.2 xc/include/fonts/fontproto.h:1.3 --- xc/include/fonts/fontproto.h:1.2 Sat Sep 4 05:14:08 1999 +++ xc/include/fonts/fontproto.h Thu Apr 5 13:42:26 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/fonts/fontproto.h,v 1.2 1999/09/04 09:14:08 dawes Exp $ */ +/* $XFree86: xc/include/fonts/fontproto.h,v 1.3 2001/04/05 17:42:26 dawes Exp $ */ /*********************************************************** @@ -25,7 +25,8 @@ #ifndef _FONTPROTO_H #define _FONTPROTO_H -/* Functions defined by the server and used in lib/fonts */ +/* Externally provided functions required by libXfont */ + extern int RegisterFPEFunctions ( NameCheckFunc name_func, InitFpeFunc init_func, FreeFpeFunc free_func, @@ -60,9 +61,15 @@ extern void DeleteFontClientID ( Font id ); extern Font GetNewFontClientID ( void ); extern int StoreFontClientFont ( FontPtr pfont, Font id ); +extern void FontFileRegisterFpeFunctions ( void ); +extern void FontFileCheckRegisterFpeFunctions ( void ); extern Bool XpClientIsBitmapClient ( ClientPtr client ); extern Bool XpClientIsPrintClient( ClientPtr client, FontPathElementPtr fpe ); +extern void PrinterFontRegisterFpeFunctions ( void ); + +extern void fs_register_fpe_functions ( void ); +extern void check_fs_register_fpe_functions ( void ); /* util/private.c */ extern FontPtr CreateFontRec (void); Index: xc/include/fonts/fontstruct.h diff -u xc/include/fonts/fontstruct.h:3.3 xc/include/fonts/fontstruct.h:3.4 --- xc/include/fonts/fontstruct.h:3.3 Sat Aug 21 09:47:34 1999 +++ xc/include/fonts/fontstruct.h Wed Jan 17 12:53:26 2001 @@ -1,5 +1,4 @@ -/* $XConsortium: fontstruct.h /main/17 1996/08/09 16:23:54 kaleb $ */ -/* $XFree86: xc/include/fonts/fontstruct.h,v 3.3 1999/08/21 13:47:34 dawes Exp $ */ +/* $Xorg: fontstruct.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /*********************************************************** Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. @@ -22,6 +21,7 @@ SOFTWARE. ******************************************************************/ +/* $XFree86: xc/include/fonts/fontstruct.h,v 3.4 2001/01/17 17:53:26 dawes Exp $ */ #ifndef FONTSTR_H #define FONTSTR_H Index: xc/include/fonts/fsmasks.h diff -u xc/include/fonts/fsmasks.h:1.1.1.2 xc/include/fonts/fsmasks.h:1.1.1.3 --- xc/include/fonts/fsmasks.h:1.1.1.2 Sun Sep 27 04:00:22 1998 +++ xc/include/fonts/fsmasks.h Tue Jan 16 17:05:07 2001 @@ -1,4 +1,4 @@ -/* $TOG: fsmasks.h /main/6 1998/02/09 11:24:23 kaleb $ */ +/* $Xorg: fsmasks.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation Index: xc/lib/Imakefile diff -u xc/lib/Imakefile:3.41.2.2 xc/lib/Imakefile:3.52 --- xc/lib/Imakefile:3.41.2.2 Mon Mar 12 13:32:59 2001 +++ xc/lib/Imakefile Tue Apr 3 13:36:28 2001 @@ -1,9 +1,14 @@ -XCOMM $TOG: Imakefile /main/39 1997/02/26 18:09:44 kaleb $ -XCOMM $XFree86: xc/lib/Imakefile,v 3.41.2.2 2001/03/12 18:32:59 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:44:00 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/Imakefile,v 3.52 2001/04/03 17:36:28 dawes Exp $ + #define IHaveSubdirs #define PassCDebugFlags -#if BuildXaw6 +#if BuildXaw6 && BuildLibraries XAW6LIBDIR = Xaw6 #endif @@ -23,10 +28,22 @@ XKBUILIBDIR = xkbui #endif -#if BuildThreadStubLibrary +#if BuildThreadStubLibrary && BuildLibraries THRSTUBLIBDIR = XThrStub #endif +#if BuildXIElib +XIELIBDIR = XIE +#endif + +#if BuildPexLib +PEX5LIBDIR = PEX5 +#endif + +#if BuildXInputLib +XINPUTLIBDIR = Xi +#endif + #if BuildScreenSaverLibrary SSLIBDIR = Xss #endif @@ -49,6 +66,7 @@ #if BuildXvLibrary XVLIBDIR = Xv +XVMCLIBDIR = XvMC #endif #if BuildXineramaLibrary @@ -60,6 +78,10 @@ GLWLIBDIR = GLw #endif +#if BuildGLULibrary +GLULIBDIR = GLU +#endif + #if BuildDPSLibrary DPSLIBDIR = dps #endif @@ -103,31 +125,49 @@ XALIBDIR = Xa #endif +#if BuildXprintLib +XPRINTLIBDIR = Xp +#endif + #if BuildFontCacheLib FONTCACHELIBDIR = Xfontcache #endif FONTSUBDIR = font -#if !BuildServersOnly -LINTSUBDIRS = Xau Xdmcp $(THRSTUBLIBDIR) X11 oldX ICE SM Xext Xt \ - $(SSLIBDIR) $(XF86MISCLIBDIR) $(XF86VMLIBDIR) $(XF86DGALIBDIR) \ - $(XF86RUSHLIBDIR) Xmu Xpm Xaw $(XAW6LIBDIR) XIE Xi Xtst FS \ - PEX5 $(XKBLIBDIR) $(XKBUILIBDIR) $(LBXUTILDIR) $(XALIBDIR) \ - Xp $(XVLIBDIR) $(GLXLIBDIR) $(GLWLIBDIR) $(DPSLIBDIR) \ - $(DPSTKLIBDIR) $(PSRESLIBDIR) $(XINERAMADIR) \ - $(ZLIBDIR) $(REGEXDIR) $(RENDERLIBDIR) $(FREETYPE2BUILDDIR) \ - $(XFTLIBDIR) -#else -#if XnestServer || BuildGLXLibrary -XEXTDIR = Xext +XAULIBDIR = Xau +XDMCPLIBDIR = Xdmcp +X11LIBDIR = X11 + +#if BuildLibraries || XnestServer || BuildGLXLibrary +XEXTLIBDIR = Xext +#endif + +#if BuildLibraries +OLDXLIBDIR = oldX +ICELIBDIR = ICE +SMLIBDIR = SM +XTLIBDIR = Xt +XMULIBDIR = Xmu +XMUULIBDIR = Xmuu +XPMLIBDIR = Xpm +XAWLIBDIR = Xaw +XTSTLIBDIR = Xtst +FSLIBDIR = FS #endif -LINTSUBDIRS = Xau Xdmcp X11 $(XINERAMADIR) $(XEXTDIR) $(XKBLIBDIR) \ - $(XKBUILIBDIR) $(LBXUTILDIR) $(XF86EXTLIBS) $(XVLIBDIR) \ - $(GLXLIBDIR) $(GLWLIBDIR) $(ZLIBDIR) $(REGEXDIR) $(RENDERLIBDIR) \ - $(FREETYPE2BUILDDIR) $(XFTLIBDIR) -#endif + +LINTSUBDIRS = $(XAULIBDIR) $(XDMCPLIBDIR) $(THRSTUBLIBDIR) $(X11LIBDIR) \ + $(OLDXLIBDIR) $(ICELIBDIR) $(SMLIBDIR) $(XEXTLIBDIR) $(XTLIBDIR) \ + $(SSLIBDIR) $(XF86MISCLIBDIR) $(XF86VMLIBDIR) $(XF86DGALIBDIR) \ + $(XF86RUSHLIBDIR) $(XMULIBDIR) $(XMUULIBDIR) $(XPMLIBDIR) \ + $(XAWLIBDIR) $(XAW6LIBDIR) $(XIELIBDIR) $(XINPUTLIBDIR) \ + $(XTSTLIBDIR) $(FSLIBDIR) $(PEX5LIBDIR) $(XKBLIBDIR) \ + $(XKBUILIBDIR) $(LBXUTILDIR) $(XALIBDIR) $(XPRINTLIBDIR) \ + $(XVLIBDIR) $(GLXLIBDIR) $(GLULIBDIR) $(GLWLIBDIR) \ + $(DPSLIBDIR) $(DPSTKLIBDIR) $(PSRESLIBDIR) $(XINERAMADIR) \ + $(ZLIBDIR) $(REGEXDIR) $(RENDERLIBDIR) $(FREETYPE2BUILDDIR) \ + $(XFTLIBDIR) $(XVMCLIBDIR) SUBDIRS = $(BERKDIR) xtrans $(LINTSUBDIRS) $(FONTSUBDIR) $(FONTCACHELIBDIR) Index: xc/lib/FS/FSClServ.c diff -u xc/lib/FS/FSClServ.c:1.3 xc/lib/FS/FSClServ.c:1.4 --- xc/lib/FS/FSClServ.c:1.3 Sat Feb 20 10:07:12 1999 +++ xc/lib/FS/FSClServ.c Wed Jan 17 14:41:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSClServ.c /main/9 1998/05/01 12:50:19 kaleb $ */ +/* $Xorg: FSClServ.c,v 1.3 2000/08/17 19:44:01 cpqbld Exp $ */ /* @(#)FSClServ.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -24,7 +24,7 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/FS/FSClServ.c,v 1.3 1999/02/20 15:07:12 hohndel Exp $ */ +/* $XFree86: xc/lib/FS/FSClServ.c,v 1.4 2001/01/17 19:41:27 dawes Exp $ */ /* Index: xc/lib/FS/FSCloseFt.c diff -u xc/lib/FS/FSCloseFt.c:1.1.1.3 xc/lib/FS/FSCloseFt.c:1.1.1.4 --- xc/lib/FS/FSCloseFt.c:1.1.1.3 Sun Sep 27 07:04:41 1998 +++ xc/lib/FS/FSCloseFt.c Tue Jan 16 17:05:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSCloseFt.c /main/7 1998/05/01 12:50:25 kaleb $ */ +/* $Xorg: FSCloseFt.c,v 1.3 2000/08/17 19:44:01 cpqbld Exp $ */ /* @(#)FSCloseFt.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; Index: xc/lib/FS/FSConnServ.c diff -u xc/lib/FS/FSConnServ.c:3.6 xc/lib/FS/FSConnServ.c:3.7 --- xc/lib/FS/FSConnServ.c:3.6 Sat Oct 3 04:41:06 1998 +++ xc/lib/FS/FSConnServ.c Wed Jan 17 14:41:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSConnServ.c /main/29 1998/05/01 11:34:29 kaleb $ */ +/* $Xorg: FSConnServ.c,v 1.3 2000/08/17 19:44:01 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -46,7 +46,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/FS/FSConnServ.c,v 3.6 1998/10/03 08:41:06 dawes Exp $ */ +/* $XFree86: xc/lib/FS/FSConnServ.c,v 3.7 2001/01/17 19:41:28 dawes Exp $ */ #include #include "FSlibint.h" Index: xc/lib/FS/FSErrDis.c diff -u xc/lib/FS/FSErrDis.c:1.1.1.3 xc/lib/FS/FSErrDis.c:1.1.1.4 --- xc/lib/FS/FSErrDis.c:1.1.1.3 Sun Sep 27 07:04:42 1998 +++ xc/lib/FS/FSErrDis.c Tue Jan 16 17:05:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSErrDis.c /main/8 1998/05/01 12:50:29 kaleb $ */ +/* $Xorg: FSErrDis.c,v 1.3 2000/08/17 19:44:01 cpqbld Exp $ */ /* @(#)FSErrDis.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; Index: xc/lib/FS/FSErrHndlr.c diff -u xc/lib/FS/FSErrHndlr.c:1.3 xc/lib/FS/FSErrHndlr.c:1.4 --- xc/lib/FS/FSErrHndlr.c:1.3 Sat Feb 20 10:07:12 1999 +++ xc/lib/FS/FSErrHndlr.c Wed Jan 17 14:41:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSErrHndlr.c /main/5 1998/02/06 13:42:28 kaleb $ */ +/* $Xorg: FSErrHndlr.c,v 1.3 2000/08/17 19:44:01 cpqbld Exp $ */ /* @(#)FSErrHndlr.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -24,7 +24,7 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/FS/FSErrHndlr.c,v 1.3 1999/02/20 15:07:12 hohndel Exp $ */ +/* $XFree86: xc/lib/FS/FSErrHndlr.c,v 1.4 2001/01/17 19:41:28 dawes Exp $ */ /* Index: xc/lib/FS/FSFlush.c diff -u xc/lib/FS/FSFlush.c:1.1.1.3 xc/lib/FS/FSFlush.c:1.1.1.4 --- xc/lib/FS/FSFlush.c:1.1.1.3 Sun Sep 27 07:04:42 1998 +++ xc/lib/FS/FSFlush.c Tue Jan 16 17:05:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSFlush.c /main/6 1998/05/01 11:34:38 kaleb $ */ +/* $Xorg: FSFlush.c,v 1.3 2000/08/17 19:44:01 cpqbld Exp $ */ /* @(#)FSFlush.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; Index: xc/lib/FS/FSFontInfo.c diff -u xc/lib/FS/FSFontInfo.c:1.1.1.3 xc/lib/FS/FSFontInfo.c:1.1.1.4 --- xc/lib/FS/FSFontInfo.c:1.1.1.3 Sun Sep 27 07:04:43 1998 +++ xc/lib/FS/FSFontInfo.c Tue Jan 16 17:05:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSFontInfo.c /main/9 1998/05/01 12:50:34 kaleb $ */ +/* $Xorg: FSFontInfo.c,v 1.3 2000/08/17 19:44:01 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation Index: xc/lib/FS/FSFtNames.c diff -u xc/lib/FS/FSFtNames.c:1.1.1.3 xc/lib/FS/FSFtNames.c:1.1.1.4 --- xc/lib/FS/FSFtNames.c:1.1.1.3 Sun Sep 27 07:04:43 1998 +++ xc/lib/FS/FSFtNames.c Tue Jan 16 17:05:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSFtNames.c /main/7 1998/05/01 11:34:42 kaleb $ */ +/* $Xorg: FSFtNames.c,v 1.3 2000/08/17 19:44:02 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices; Index: xc/lib/FS/FSGetCats.c diff -u xc/lib/FS/FSGetCats.c:1.1.1.2 xc/lib/FS/FSGetCats.c:1.1.1.3 --- xc/lib/FS/FSGetCats.c:1.1.1.2 Sun Sep 27 03:51:48 1998 +++ xc/lib/FS/FSGetCats.c Tue Jan 16 17:05:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSGetCats.c /main/4 1998/02/06 13:42:48 kaleb $ */ +/* $Xorg: FSGetCats.c,v 1.3 2000/08/17 19:44:02 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices; Index: xc/lib/FS/FSListCats.c diff -u xc/lib/FS/FSListCats.c:1.1.1.3 xc/lib/FS/FSListCats.c:1.1.1.4 --- xc/lib/FS/FSListCats.c:1.1.1.3 Sun Sep 27 07:04:44 1998 +++ xc/lib/FS/FSListCats.c Tue Jan 16 17:05:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSListCats.c /main/6 1998/05/01 12:58:31 kaleb $ */ +/* $Xorg: FSListCats.c,v 1.3 2000/08/17 19:44:02 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices; Index: xc/lib/FS/FSListExt.c diff -u xc/lib/FS/FSListExt.c:1.1.1.4 xc/lib/FS/FSListExt.c:1.1.1.5 --- xc/lib/FS/FSListExt.c:1.1.1.4 Sun Sep 27 07:04:44 1998 +++ xc/lib/FS/FSListExt.c Tue Jan 16 17:05:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSListExt.c /main/7 1998/05/01 11:34:51 kaleb $ */ +/* $Xorg: FSListExt.c,v 1.3 2000/08/17 19:44:02 cpqbld Exp $ */ /* @(#)FSListExt.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; Index: xc/lib/FS/FSMisc.c diff -u xc/lib/FS/FSMisc.c:1.1.1.2 xc/lib/FS/FSMisc.c:1.1.1.3 --- xc/lib/FS/FSMisc.c:1.1.1.2 Sun Sep 27 03:51:50 1998 +++ xc/lib/FS/FSMisc.c Tue Jan 16 17:05:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSMisc.c /main/5 1998/02/06 13:43:27 kaleb $ */ +/* $Xorg: FSMisc.c,v 1.3 2000/08/17 19:44:03 cpqbld Exp $ */ /* @(#)FSMisc.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; Index: xc/lib/FS/FSNextEv.c diff -u xc/lib/FS/FSNextEv.c:1.1.1.3 xc/lib/FS/FSNextEv.c:1.1.1.4 --- xc/lib/FS/FSNextEv.c:1.1.1.3 Sun Sep 27 07:04:45 1998 +++ xc/lib/FS/FSNextEv.c Tue Jan 16 17:05:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSNextEv.c /main/7 1998/05/01 11:34:56 kaleb $ */ +/* $Xorg: FSNextEv.c,v 1.3 2000/08/17 19:44:03 cpqbld Exp $ */ /* @(#)FSNextEv.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; Index: xc/lib/FS/FSOpenFont.c diff -u xc/lib/FS/FSOpenFont.c:1.4 xc/lib/FS/FSOpenFont.c:1.5 --- xc/lib/FS/FSOpenFont.c:1.4 Thu Feb 25 01:00:55 1999 +++ xc/lib/FS/FSOpenFont.c Wed Jan 17 14:41:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSOpenFont.c /main/8 1998/05/17 16:30:48 kaleb $ */ +/* $Xorg: FSOpenFont.c,v 1.3 2000/08/17 19:44:04 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -24,7 +24,7 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/FS/FSOpenFont.c,v 1.4 1999/02/25 06:00:55 dawes Exp $ */ +/* $XFree86: xc/lib/FS/FSOpenFont.c,v 1.5 2001/01/17 19:41:28 dawes Exp $ */ /* Index: xc/lib/FS/FSOpenServ.c diff -u xc/lib/FS/FSOpenServ.c:1.3 xc/lib/FS/FSOpenServ.c:1.4 --- xc/lib/FS/FSOpenServ.c:1.3 Sat Feb 20 10:07:13 1999 +++ xc/lib/FS/FSOpenServ.c Wed Jan 17 14:41:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSOpenServ.c /main/8 1998/05/01 11:35:00 kaleb $ */ +/* $Xorg: FSOpenServ.c,v 1.3 2000/08/17 19:44:04 cpqbld Exp $ */ /* @(#)FSOpenServ.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -24,7 +24,7 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/FS/FSOpenServ.c,v 1.3 1999/02/20 15:07:13 hohndel Exp $ */ +/* $XFree86: xc/lib/FS/FSOpenServ.c,v 1.4 2001/01/17 19:41:28 dawes Exp $ */ /* Index: xc/lib/FS/FSQGlyphs.c diff -u xc/lib/FS/FSQGlyphs.c:1.1.1.2 xc/lib/FS/FSQGlyphs.c:1.1.1.3 --- xc/lib/FS/FSQGlyphs.c:1.1.1.2 Sun Sep 27 03:51:52 1998 +++ xc/lib/FS/FSQGlyphs.c Tue Jan 16 17:05:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSQGlyphs.c /main/7 1998/02/06 13:43:46 kaleb $ */ +/* $Xorg: FSQGlyphs.c,v 1.3 2000/08/17 19:44:04 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices; Index: xc/lib/FS/FSQXExt.c diff -u xc/lib/FS/FSQXExt.c:1.3 xc/lib/FS/FSQXExt.c:1.4 --- xc/lib/FS/FSQXExt.c:1.3 Sat Feb 20 10:07:13 1999 +++ xc/lib/FS/FSQXExt.c Wed Jan 17 14:41:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSQXExt.c /main/7 1998/02/06 13:43:56 kaleb $ */ +/* $Xorg: FSQXExt.c,v 1.3 2000/08/17 19:44:04 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -24,7 +24,7 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/FS/FSQXExt.c,v 1.3 1999/02/20 15:07:13 hohndel Exp $ */ +/* $XFree86: xc/lib/FS/FSQXExt.c,v 1.4 2001/01/17 19:41:28 dawes Exp $ */ /* Index: xc/lib/FS/FSQXInfo.c diff -u xc/lib/FS/FSQXInfo.c:1.1.1.2 xc/lib/FS/FSQXInfo.c:1.1.1.3 --- xc/lib/FS/FSQXInfo.c:1.1.1.2 Sun Sep 27 03:51:53 1998 +++ xc/lib/FS/FSQXInfo.c Tue Jan 16 17:05:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSQXInfo.c /main/6 1998/02/06 13:44:01 kaleb $ */ +/* $Xorg: FSQXInfo.c,v 1.3 2000/08/17 19:44:04 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices; Index: xc/lib/FS/FSQuExt.c diff -u xc/lib/FS/FSQuExt.c:1.1.1.2 xc/lib/FS/FSQuExt.c:1.1.1.3 --- xc/lib/FS/FSQuExt.c:1.1.1.2 Sun Sep 27 03:51:53 1998 +++ xc/lib/FS/FSQuExt.c Tue Jan 16 17:05:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSQuExt.c /main/5 1998/02/06 13:43:52 kaleb $ */ +/* $Xorg: FSQuExt.c,v 1.3 2000/08/17 19:44:05 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices; Index: xc/lib/FS/FSServName.c diff -u xc/lib/FS/FSServName.c:1.1.1.2 xc/lib/FS/FSServName.c:1.1.1.3 --- xc/lib/FS/FSServName.c:1.1.1.2 Sun Sep 27 03:51:54 1998 +++ xc/lib/FS/FSServName.c Tue Jan 16 17:05:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSServName.c /main/6 1998/02/06 13:44:07 kaleb $ */ +/* $Xorg: FSServName.c,v 1.3 2000/08/17 19:44:05 cpqbld Exp $ */ /* @(#)FSServName.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; Index: xc/lib/FS/FSSetCats.c diff -u xc/lib/FS/FSSetCats.c:1.3 xc/lib/FS/FSSetCats.c:1.4 --- xc/lib/FS/FSSetCats.c:1.3 Sat Mar 13 22:20:36 1999 +++ xc/lib/FS/FSSetCats.c Wed Jan 17 14:41:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSSetCats.c /main/5 1998/05/17 16:30:54 kaleb $ */ +/* $Xorg: FSSetCats.c,v 1.3 2000/08/17 19:44:05 cpqbld Exp $ */ /* @(#)FSFlush.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -24,7 +24,7 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/FS/FSSetCats.c,v 1.3 1999/03/14 03:20:36 dawes Exp $ */ +/* $XFree86: xc/lib/FS/FSSetCats.c,v 1.4 2001/01/17 19:41:28 dawes Exp $ */ /* Index: xc/lib/FS/FSSync.c diff -u xc/lib/FS/FSSync.c:1.1.1.3 xc/lib/FS/FSSync.c:1.1.1.4 --- xc/lib/FS/FSSync.c:1.1.1.3 Sun Sep 27 07:04:47 1998 +++ xc/lib/FS/FSSync.c Tue Jan 16 17:05:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSSync.c /main/7 1998/05/01 11:35:05 kaleb $ */ +/* $Xorg: FSSync.c,v 1.3 2000/08/17 19:44:05 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices; Index: xc/lib/FS/FSSynchro.c diff -u xc/lib/FS/FSSynchro.c:1.3 xc/lib/FS/FSSynchro.c:1.4 --- xc/lib/FS/FSSynchro.c:1.3 Sat Feb 20 10:07:13 1999 +++ xc/lib/FS/FSSynchro.c Wed Jan 17 14:41:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSSynchro.c /main/7 1998/05/01 12:50:38 kaleb $ */ +/* $Xorg: FSSynchro.c,v 1.3 2000/08/17 19:44:05 cpqbld Exp $ */ /* @(#)FSSynchro.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -24,7 +24,7 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/FS/FSSynchro.c,v 1.3 1999/02/20 15:07:13 hohndel Exp $ */ +/* $XFree86: xc/lib/FS/FSSynchro.c,v 1.4 2001/01/17 19:41:28 dawes Exp $ */ /* Index: xc/lib/FS/FSlib.h diff -u xc/lib/FS/FSlib.h:1.3 xc/lib/FS/FSlib.h:1.5 --- xc/lib/FS/FSlib.h:1.3 Sat Feb 20 10:07:14 1999 +++ xc/lib/FS/FSlib.h Thu Apr 5 13:42:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSlib.h /main/10 1998/02/06 13:43:12 kaleb $ */ +/* $Xorg: FSlib.h,v 1.4 2000/08/17 19:44:05 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -24,7 +24,7 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/FS/FSlib.h,v 1.3 1999/02/20 15:07:14 hohndel Exp $ */ +/* $XFree86: xc/lib/FS/FSlib.h,v 1.5 2001/04/05 17:42:26 dawes Exp $ */ /* @@ -55,8 +55,8 @@ #ifndef _FSLIB_H_ #define _FSLIB_H_ -#include -#include +#include +#include #define Bool int #define Status int @@ -74,20 +74,10 @@ #define FSAuthorizationData(svr) ((svr)->auth_data) #define FSAlternateServers(svr) ((svr)->alternate_servers) #define FSNumAlternateServers(svr) ((svr)->num_alternates) +#define FSQLength(svr) ((svr)->qlen) +#define FSNextRequest(svr) ((svr)->request + 1) +#define FSLastKnownRequestProcessed(svr) ((svr)->last_request_read) -#ifdef QLength -#undef QLength -#endif -#define QLength(svr) ((svr)->qlen) -#ifdef NextRequest -#undef NextRequest -#endif -#define NextRequest(svr) ((svr)->request + 1) -#ifdef LastKnownRequestProcessed -#undef LastKnownRequestProcessed -#endif -#define LastKnownRequestProcessed(svr) ((svr)->last_request_read) - #define FSAllocID(svr) ((*(svr)->resource_alloc)((svr))) typedef struct _alternate { @@ -307,7 +297,6 @@ FSPropInfo *props, FSPropOffset **offsets, unsigned char **prop_data ); extern int FSSetCatalogues ( FSServer *svr, int num, char **cats ); -extern int FSSync ( FSServer *svr, int discard ); extern int FSFree ( char *data ); extern unsigned char * FSMalloc ( unsigned size ); Index: xc/lib/FS/FSlibInt.c diff -u xc/lib/FS/FSlibInt.c:3.7 xc/lib/FS/FSlibInt.c:3.9 --- xc/lib/FS/FSlibInt.c:3.7 Sun Dec 26 19:39:20 1999 +++ xc/lib/FS/FSlibInt.c Thu Apr 5 13:42:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSlibInt.c /main/23 1998/05/01 11:42:57 kaleb $ */ +/* $Xorg: FSlibInt.c,v 1.4 2000/08/17 19:44:05 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -46,7 +46,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/FS/FSlibInt.c,v 3.7 1999/12/27 00:39:20 robin Exp $ */ +/* $XFree86: xc/lib/FS/FSlibInt.c,v 3.9 2001/04/05 17:42:26 dawes Exp $ */ /* * FSlibInt.c - Internal support routines for the C subroutine @@ -961,15 +961,15 @@ FSServerString(svr)); (void) fprintf(stderr, " after %lu requests (%lu known processed) with %d events remaining.\r\n", - NextRequest(svr) - 1, LastKnownRequestProcessed(svr), - QLength(svr)); + FSNextRequest(svr) - 1, FSLastKnownRequestProcessed(svr), + FSQLength(svr)); if (ECHECK(EPIPE)) { (void) fprintf(stderr, " The connection was probably broken by a server shutdown.\r\n"); } exit(1); - return 0; + /* NOTREACHED */ } /* Index: xc/lib/FS/FSlibint.h diff -u xc/lib/FS/FSlibint.h:3.4 xc/lib/FS/FSlibint.h:3.5 --- xc/lib/FS/FSlibint.h:3.4 Fri Feb 19 16:26:52 1999 +++ xc/lib/FS/FSlibint.h Wed Jan 17 14:41:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSlibint.h /main/17 1998/05/01 12:50:43 kaleb $ */ +/* $Xorg: FSlibint.h,v 1.3 2000/08/17 19:44:06 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -46,7 +46,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/FS/FSlibint.h,v 3.4 1999/02/19 21:26:52 hohndel Exp $ */ +/* $XFree86: xc/lib/FS/FSlibint.h,v 3.5 2001/01/17 19:41:28 dawes Exp $ */ /* * FSlib internal decls Index: xc/lib/FS/FSlibos.h diff -u xc/lib/FS/FSlibos.h:3.5 xc/lib/FS/FSlibos.h:3.6 --- xc/lib/FS/FSlibos.h:3.5 Sun Dec 26 19:39:21 1999 +++ xc/lib/FS/FSlibos.h Wed Jan 17 14:41:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSlibos.h /main/24 1998/02/06 13:43:07 kaleb $ */ +/* $Xorg: FSlibos.h,v 1.3 2000/08/17 19:44:06 cpqbld Exp $ */ /* @(#)FSlibos.h 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -46,7 +46,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/FS/FSlibos.h,v 3.5 1999/12/27 00:39:21 robin Exp $ */ +/* $XFree86: xc/lib/FS/FSlibos.h,v 3.6 2001/01/17 19:41:28 dawes Exp $ */ /* * FSlib networking & os include file Index: xc/lib/FS/Imakefile diff -u xc/lib/FS/Imakefile:3.4 xc/lib/FS/Imakefile:3.6 --- xc/lib/FS/Imakefile:3.4 Fri Feb 19 16:26:52 1999 +++ xc/lib/FS/Imakefile Mon Apr 23 12:17:06 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/20 1996/09/28 16:32:46 rws $ -XCOMM $XFree86: xc/lib/FS/Imakefile,v 3.4 1999/02/19 21:26:52 hohndel Exp $ +XCOMM $Xorg: Imakefile,v 1.4 2000/08/17 19:44:07 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/FS/Imakefile,v 3.6 2001/04/23 16:17:06 tsi Exp $ + #define DoNormalLib NormalLibFS #define DoSharedLib SharedLibFS #define DoExtraLib SharedLibFS @@ -14,7 +19,7 @@ DEFINES = -DMALLOC_0_RETURNS_NULL #endif -DEPEND_DEFINES = $(TRANS_INCLUDES) $(CONN_DEFINES) +DEPEND_DEFINES = $(TRANS_INCLUDES) $(CONN_DEFINES) DependDefines HEADERS = FSlib.h Index: xc/lib/GL/GL-def.cpp diff -u xc/lib/GL/GL-def.cpp:1.1 xc/lib/GL/GL-def.cpp:removed --- xc/lib/GL/GL-def.cpp:1.1 Wed Aug 9 19:40:11 2000 +++ xc/lib/GL/GL-def.cpp Mon Jun 4 12:37:06 2001 @@ -1,431 +0,0 @@ -LIBRARY libGL -VERSION LIBRARY_VERSION -EXPORTS - glClearIndex @ 1 - glClearColor @ 2 - glClear @ 3 - glIndexMask @ 4 - glColorMask @ 5 - glAlphaFunc @ 6 - glBlendFunc @ 7 - glLogicOp @ 8 - glCullFace @ 9 - glFrontFace @ 10 - glPointSize @ 11 - glLineWidth @ 12 - glLineStipple @ 13 - glPolygonMode @ 14 - glPolygonStipple @ 15 - glGetPolygonStipple @ 16 - glEdgeFlag @ 17 - glEdgeFlagv @ 18 - glScissor @ 19 - glClipPlane @ 20 - glGetClipPlane @ 21 - glDrawBuffer @ 22 - glReadBuffer @ 23 - glEnable @ 24 - glDisable @ 25 - glIsEnabled @ 26 - glGetBooleanv @ 27 - glGetDoublev @ 28 - glGetFloatv @ 29 - glGetIntegerv @ 30 - glPushAttrib @ 31 - glPopAttrib @ 32 - glRenderMode @ 33 - glGetError @ 34 - glGetString @ 35 - glFinish @ 36 - glFlush @ 37 - glHint @ 38 - glClearDepth @ 39 - glDepthFunc @ 40 - glDepthMask @ 41 - glDepthRange @ 42 - glClearAccum @ 43 - glAccum @ 44 - glMatrixMode @ 45 - glOrtho @ 46 - glFrustum @ 47 - glViewport @ 48 - glPushMatrix @ 49 - glPopMatrix @ 50 - glLoadIdentity @ 51 - glLoadMatrixd @ 52 - glLoadMatrixf @ 53 - glMultMatrixd @ 54 - glMultMatrixf @ 55 - glRotated @ 56 - glRotatef @ 57 - glScaled @ 58 - glScalef @ 59 - glTranslated @ 60 - glTranslatef @ 61 - glIsList @ 62 - glDeleteLists @ 63 - glGenLists @ 64 - glNewList @ 65 - glEndList @ 66 - glCallList @ 67 - glCallLists @ 68 - glListBase @ 69 - glBegin @ 70 - glEnd @ 71 - glVertex2d @ 72 - glVertex2f @ 73 - glVertex2i @ 74 - glVertex2s @ 75 - glVertex3d @ 76 - glVertex3f @ 77 - glVertex3i @ 78 - glVertex3s @ 79 - glVertex4d @ 80 - glVertex4f @ 81 - glVertex4i @ 82 - glVertex4s @ 83 - glVertex2dv @ 84 - glVertex2fv @ 85 - glVertex2iv @ 86 - glVertex2sv @ 87 - glVertex3dv @ 88 - glVertex3fv @ 89 - glVertex3iv @ 90 - glVertex3sv @ 91 - glVertex4dv @ 92 - glVertex4fv @ 93 - glVertex4iv @ 94 - glVertex4sv @ 95 - glNormal3b @ 96 - glNormal3d @ 97 - glNormal3f @ 98 - glNormal3i @ 99 - glNormal3s @ 100 - glNormal3bv @ 101 - glNormal3dv @ 102 - glNormal3fv @ 103 - glNormal3iv @ 104 - glNormal3sv @ 105 - glIndexd @ 106 - glIndexf @ 107 - glIndexi @ 108 - glIndexs @ 109 - glIndexdv @ 110 - glIndexfv @ 111 - glIndexiv @ 112 - glIndexsv @ 113 - glColor3b @ 114 - glColor3d @ 115 - glColor3f @ 116 - glColor3i @ 117 - glColor3s @ 118 - glColor3ub @ 119 - glColor3ui @ 120 - glColor3us @ 121 - glColor4b @ 122 - glColor4d @ 123 - glColor4f @ 124 - glColor4i @ 125 - glColor4s @ 126 - glColor4ub @ 127 - glColor4ui @ 128 - glColor4us @ 129 - glColor3bv @ 130 - glColor3dv @ 131 - glColor3fv @ 132 - glColor3iv @ 133 - glColor3sv @ 134 - glColor3ubv @ 135 - glColor3uiv @ 136 - glColor3usv @ 137 - glColor4bv @ 138 - glColor4dv @ 139 - glColor4fv @ 140 - glColor4iv @ 141 - glColor4sv @ 142 - glColor4ubv @ 143 - glColor4uiv @ 144 - glColor4usv @ 145 - glTexCoord1d @ 146 - glTexCoord1f @ 147 - glTexCoord1i @ 148 - glTexCoord1s @ 149 - glTexCoord2d @ 150 - glTexCoord2f @ 151 - glTexCoord2i @ 152 - glTexCoord2s @ 153 - glTexCoord3d @ 154 - glTexCoord3f @ 155 - glTexCoord3i @ 156 - glTexCoord3s @ 157 - glTexCoord4d @ 158 - glTexCoord4f @ 159 - glTexCoord4i @ 160 - glTexCoord4s @ 161 - glTexCoord1dv @ 162 - glTexCoord1fv @ 163 - glTexCoord1iv @ 164 - glTexCoord1sv @ 165 - glTexCoord2dv @ 166 - glTexCoord2fv @ 167 - glTexCoord2iv @ 168 - glTexCoord2sv @ 169 - glTexCoord3dv @ 170 - glTexCoord3fv @ 171 - glTexCoord3iv @ 172 - glTexCoord3sv @ 173 - glTexCoord4dv @ 174 - glTexCoord4fv @ 175 - glTexCoord4iv @ 176 - glTexCoord4sv @ 177 - glRasterPos2d @ 178 - glRasterPos2f @ 179 - glRasterPos2i @ 180 - glRasterPos2s @ 181 - glRasterPos3d @ 182 - glRasterPos3f @ 183 - glRasterPos3i @ 184 - glRasterPos3s @ 185 - glRasterPos4d @ 186 - glRasterPos4f @ 187 - glRasterPos4i @ 188 - glRasterPos4s @ 189 - glRasterPos2dv @ 190 - glRasterPos2fv @ 191 - glRasterPos2iv @ 192 - glRasterPos2sv @ 193 - glRasterPos3dv @ 194 - glRasterPos3fv @ 195 - glRasterPos3iv @ 196 - glRasterPos3sv @ 197 - glRasterPos4dv @ 198 - glRasterPos4fv @ 199 - glRasterPos4iv @ 200 - glRasterPos4sv @ 201 - glRectd @ 202 - glRectf @ 203 - glRecti @ 204 - glRects @ 205 - glRectdv @ 206 - glRectfv @ 207 - glRectiv @ 208 - glRectsv @ 209 - glShadeModel @ 210 - glLightf @ 211 - glLighti @ 212 - glLightfv @ 213 - glLightiv @ 214 - glGetLightfv @ 215 - glGetLightiv @ 216 - glLightModelf @ 217 - glLightModeli @ 218 - glLightModelfv @ 219 - glLightModeliv @ 220 - glMaterialf @ 221 - glMateriali @ 222 - glMaterialfv @ 223 - glMaterialiv @ 224 - glGetMaterialfv @ 225 - glGetMaterialiv @ 226 - glColorMaterial @ 227 - glPixelZoom @ 228 - glPixelStoref @ 229 - glPixelStorei @ 230 - glPixelTransferf @ 231 - glPixelTransferi @ 232 - glPixelMapfv @ 233 - glPixelMapuiv @ 234 - glPixelMapusv @ 235 - glGetPixelMapfv @ 236 - glGetPixelMapuiv @ 237 - glGetPixelMapusv @ 238 - glBitmap @ 239 - glReadPixels @ 240 - glDrawPixels @ 241 - glCopyPixels @ 242 - glStencilFunc @ 243 - glStencilMask @ 244 - glStencilOp @ 245 - glClearStencil @ 246 - glTexGend @ 247 - glTexGenf @ 248 - glTexGeni @ 249 - glTexGendv @ 250 - glTexGenfv @ 251 - glTexGeniv @ 252 - glGetTexGendv @ 253 - glGetTexGenfv @ 254 - glGetTexGeniv @ 255 - glTexEnvf @ 256 - glTexEnvi @ 257 - glTexEnvfv @ 258 - glTexEnviv @ 259 - glGetTexEnvfv @ 260 - glGetTexEnviv @ 261 - glTexParameterf @ 262 - glTexParameteri @ 263 - glTexParameterfv @ 264 - glTexParameteriv @ 265 - glGetTexParameterfv @ 266 - glGetTexParameteriv @ 267 - glGetTexLevelParameterfv @ 268 - glGetTexLevelParameteriv @ 269 - glTexImage1D @ 270 - glTexImage2D @ 271 - glGetTexImage @ 272 - glMap1d @ 273 - glMap1f @ 274 - glMap2d @ 275 - glMap2f @ 276 - glGetMapdv @ 277 - glGetMapfv @ 278 - glGetMapiv @ 279 - glEvalCoord1d @ 280 - glEvalCoord1f @ 281 - glEvalCoord1dv @ 282 - glEvalCoord1fv @ 283 - glEvalCoord2d @ 284 - glEvalCoord2f @ 285 - glEvalCoord2dv @ 286 - glEvalCoord2fv @ 287 - glMapGrid1d @ 288 - glMapGrid1f @ 289 - glMapGrid2d @ 290 - glMapGrid2f @ 291 - glEvalPoint1 @ 292 - glEvalPoint2 @ 293 - glEvalMesh1 @ 294 - glEvalMesh2 @ 295 - glFogf @ 296 - glFogi @ 297 - glFogfv @ 298 - glFogiv @ 299 - glFeedbackBuffer @ 300 - glPassThrough @ 301 - glSelectBuffer @ 302 - glInitNames @ 303 - glLoadName @ 304 - glPushName @ 305 - glPopName @ 306 -; glBlendEquationEXT @ 307 -; glBlendColorEXT @ 308 - glPolygonOffset @ 309 -; glVertexPointerEXT @ 310 -; glNormalPointerEXT @ 311 -; glColorPointerEXT @ 312 -; glIndexPointerEXT @ 313 -; glTexCoordPointerEXT @ 314 -; glEdgeFlagPointerEXT @ 315 -; glGetPointervEXT @ 316 -; glArrayElementEXT @ 317 -; glDrawArraysEXT @ 318 -; OSMesaCreateContext @ 319 -; OSMesaDestroyContext @ 320 -; OSMesaMakeCurrent @ 321 -; XMesaCreateContext @ 322 -; XMesaDestroyContext @ 323 -; XMesaMakeCurrent @ 326 -; XMesaGetCurrentContext @ 327 -; XMesaSwapBuffers @ 328 -; XMesaGetBackBuffer @ 329 - glXChooseVisual @ 330 - glXCreateContext @ 331 - glXDestroyContext @ 332 - glXMakeCurrent @ 333 - glXCopyContext @ 334 - glXSwapBuffers @ 335 - glXCreateGLXPixmap @ 336 - glXDestroyGLXPixmap @ 337 - glXQueryExtension @ 338 - glXQueryVersion @ 339 - glXIsDirect @ 340 - glXGetConfig @ 341 - glXGetCurrentContext @ 342 - glXGetCurrentDrawable @ 343 - glXWaitGL @ 344 - glXWaitX @ 345 - glXUseXFont @ 346 - glXQueryExtensionsString @ 347 - glXQueryServerString @ 348 - glXGetClientString @ 349 - glPushClientAttrib @ 350 - glPopClientAttrib @ 351 - glIndexub @ 352 - glIndexubv @ 353 - glVertexPointer @ 354 - glNormalPointer @ 355 - glColorPointer @ 356 - glIndexPointer @ 357 - glTexCoordPointer @ 358 - glEdgeFlagPointer @ 359 - glGetPointerv @ 360 - glArrayElement @ 361 - glDrawArrays @ 362 - glDrawElements @ 363 - glInterleavedArrays @ 364 - glGenTextures @ 365 - glDeleteTextures @ 366 - glBindTexture @ 367 - glPrioritizeTextures @ 368 - glAreTexturesResident @ 369 - glIsTexture @ 370 - glTexSubImage1D @ 371 - glTexSubImage2D @ 372 - glCopyTexImage1D @ 373 - glCopyTexImage2D @ 374 - glCopyTexSubImage1D @ 375 - glCopyTexSubImage2D @ 376 -; glWindowPos2iMESA @ 377 -; glWindowPos2sMESA @ 378 -; glWindowPos2fMESA @ 379 -; glWindowPos2dMESA @ 380 -; glWindowPos2ivMESA @ 381 -; glWindowPos2svMESA @ 382 -; glWindowPos2fvMESA @ 383 -; glWindowPos2dvMESA @ 384 -; glWindowPos3iMESA @ 385 -; glWindowPos3sMESA @ 386 -; glWindowPos3fMESA @ 387 -; glWindowPos3dMESA @ 388 -; glWindowPos3ivMESA @ 389 -; glWindowPos3svMESA @ 390 -; glWindowPos3fvMESA @ 391 -; glWindowPos3dvMESA @ 392 -; glWindowPos4iMESA @ 393 -; glWindowPos4sMESA @ 394 -; glWindowPos4fMESA @ 395 -; glWindowPos4dMESA @ 396 -; glWindowPos4ivMESA @ 397 -; glWindowPos4svMESA @ 398 -; glWindowPos4fvMESA @ 399 -; glWindowPos4dvMESA @ 400 -; glXCreateGLXPixmapMESA @ 401 -; glXReleaseBuffersMESA @ 402 -; OSMesaGetCurrentContext @ 403 -; OSMesaPixelStore @ 404 -; OSMesaGetIntegerv @ 405 -; XMesaCreateVisual @ 406 -; XMesaDestroyVisual @ 407 -; XMesaCreateWindowBuffer @ 408 -; XMesaCreatePixmapBuffer @ 409 -; XMesaDestroyBuffer @ 410 -; XMesaGetCurrentBuffer @ 411 -; XMesaFlush @ 412 -; XMesaGetString @ 413 -; glPolygonOffsetEXT @ 414 - glDisableClientState @ 450 - glEnableClientState @ 451 - glXFreeContextEXT @ 452 - glXGetContextIDEXT @ 453 - glXGetCurrentDisplay @ 454 - glXImportContextEXT @ 455 - glXQueryContextInfoEXT @ 456 - glXGetCurrentDrawableEXT @ 457 - glCopyTexSubImage3D @ 458 - glDrawRangeElements @ 459 - glTexSubImage3D @ 460 - glBlendColorEXT @ 461 - glBlendEquationEXT @ 462 - glTexImage3D @ 463 - -/* $XFree86: xc/lib/GL/GL-def.cpp,v 1.1 2000/08/09 23:40:11 dawes Exp $ */ Index: xc/lib/GL/GLos2.def diff -u xc/lib/GL/GLos2.def:1.1 xc/lib/GL/GLos2.def:removed --- xc/lib/GL/GLos2.def:1.1 Thu Apr 29 05:13:26 1999 +++ xc/lib/GL/GLos2.def Mon Jun 4 12:37:06 2001 @@ -1,428 +0,0 @@ -LIBRARY GL -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/GL/GLos2.def,v 1.1 1999/04/29 09:13:26 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 131072 -EXPORTS - glClearIndex @ 1 - glClearColor @ 2 - glClear @ 3 - glIndexMask @ 4 - glColorMask @ 5 - glAlphaFunc @ 6 - glBlendFunc @ 7 - glLogicOp @ 8 - glCullFace @ 9 - glFrontFace @ 10 - glPointSize @ 11 - glLineWidth @ 12 - glLineStipple @ 13 - glPolygonMode @ 14 - glPolygonStipple @ 15 - glGetPolygonStipple @ 16 - glEdgeFlag @ 17 - glEdgeFlagv @ 18 - glScissor @ 19 - glClipPlane @ 20 - glGetClipPlane @ 21 - glDrawBuffer @ 22 - glReadBuffer @ 23 - glEnable @ 24 - glDisable @ 25 - glIsEnabled @ 26 - glGetBooleanv @ 27 - glGetDoublev @ 28 - glGetFloatv @ 29 - glGetIntegerv @ 30 - glPushAttrib @ 31 - glPopAttrib @ 32 - glRenderMode @ 33 - glGetError @ 34 - glGetString @ 35 - glFinish @ 36 - glFlush @ 37 - glHint @ 38 - glClearDepth @ 39 - glDepthFunc @ 40 - glDepthMask @ 41 - glDepthRange @ 42 - glClearAccum @ 43 - glAccum @ 44 - glMatrixMode @ 45 - glOrtho @ 46 - glFrustum @ 47 - glViewport @ 48 - glPushMatrix @ 49 - glPopMatrix @ 50 - glLoadIdentity @ 51 - glLoadMatrixd @ 52 - glLoadMatrixf @ 53 - glMultMatrixd @ 54 - glMultMatrixf @ 55 - glRotated @ 56 - glRotatef @ 57 - glScaled @ 58 - glScalef @ 59 - glTranslated @ 60 - glTranslatef @ 61 - glIsList @ 62 - glDeleteLists @ 63 - glGenLists @ 64 - glNewList @ 65 - glEndList @ 66 - glCallList @ 67 - glCallLists @ 68 - glListBase @ 69 - glBegin @ 70 - glEnd @ 71 - glVertex2d @ 72 - glVertex2f @ 73 - glVertex2i @ 74 - glVertex2s @ 75 - glVertex3d @ 76 - glVertex3f @ 77 - glVertex3i @ 78 - glVertex3s @ 79 - glVertex4d @ 80 - glVertex4f @ 81 - glVertex4i @ 82 - glVertex4s @ 83 - glVertex2dv @ 84 - glVertex2fv @ 85 - glVertex2iv @ 86 - glVertex2sv @ 87 - glVertex3dv @ 88 - glVertex3fv @ 89 - glVertex3iv @ 90 - glVertex3sv @ 91 - glVertex4dv @ 92 - glVertex4fv @ 93 - glVertex4iv @ 94 - glVertex4sv @ 95 - glNormal3b @ 96 - glNormal3d @ 97 - glNormal3f @ 98 - glNormal3i @ 99 - glNormal3s @ 100 - glNormal3bv @ 101 - glNormal3dv @ 102 - glNormal3fv @ 103 - glNormal3iv @ 104 - glNormal3sv @ 105 - glIndexd @ 106 - glIndexf @ 107 - glIndexi @ 108 - glIndexs @ 109 - glIndexdv @ 110 - glIndexfv @ 111 - glIndexiv @ 112 - glIndexsv @ 113 - glColor3b @ 114 - glColor3d @ 115 - glColor3f @ 116 - glColor3i @ 117 - glColor3s @ 118 - glColor3ub @ 119 - glColor3ui @ 120 - glColor3us @ 121 - glColor4b @ 122 - glColor4d @ 123 - glColor4f @ 124 - glColor4i @ 125 - glColor4s @ 126 - glColor4ub @ 127 - glColor4ui @ 128 - glColor4us @ 129 - glColor3bv @ 130 - glColor3dv @ 131 - glColor3fv @ 132 - glColor3iv @ 133 - glColor3sv @ 134 - glColor3ubv @ 135 - glColor3uiv @ 136 - glColor3usv @ 137 - glColor4bv @ 138 - glColor4dv @ 139 - glColor4fv @ 140 - glColor4iv @ 141 - glColor4sv @ 142 - glColor4ubv @ 143 - glColor4uiv @ 144 - glColor4usv @ 145 - glTexCoord1d @ 146 - glTexCoord1f @ 147 - glTexCoord1i @ 148 - glTexCoord1s @ 149 - glTexCoord2d @ 150 - glTexCoord2f @ 151 - glTexCoord2i @ 152 - glTexCoord2s @ 153 - glTexCoord3d @ 154 - glTexCoord3f @ 155 - glTexCoord3i @ 156 - glTexCoord3s @ 157 - glTexCoord4d @ 158 - glTexCoord4f @ 159 - glTexCoord4i @ 160 - glTexCoord4s @ 161 - glTexCoord1dv @ 162 - glTexCoord1fv @ 163 - glTexCoord1iv @ 164 - glTexCoord1sv @ 165 - glTexCoord2dv @ 166 - glTexCoord2fv @ 167 - glTexCoord2iv @ 168 - glTexCoord2sv @ 169 - glTexCoord3dv @ 170 - glTexCoord3fv @ 171 - glTexCoord3iv @ 172 - glTexCoord3sv @ 173 - glTexCoord4dv @ 174 - glTexCoord4fv @ 175 - glTexCoord4iv @ 176 - glTexCoord4sv @ 177 - glRasterPos2d @ 178 - glRasterPos2f @ 179 - glRasterPos2i @ 180 - glRasterPos2s @ 181 - glRasterPos3d @ 182 - glRasterPos3f @ 183 - glRasterPos3i @ 184 - glRasterPos3s @ 185 - glRasterPos4d @ 186 - glRasterPos4f @ 187 - glRasterPos4i @ 188 - glRasterPos4s @ 189 - glRasterPos2dv @ 190 - glRasterPos2fv @ 191 - glRasterPos2iv @ 192 - glRasterPos2sv @ 193 - glRasterPos3dv @ 194 - glRasterPos3fv @ 195 - glRasterPos3iv @ 196 - glRasterPos3sv @ 197 - glRasterPos4dv @ 198 - glRasterPos4fv @ 199 - glRasterPos4iv @ 200 - glRasterPos4sv @ 201 - glRectd @ 202 - glRectf @ 203 - glRecti @ 204 - glRects @ 205 - glRectdv @ 206 - glRectfv @ 207 - glRectiv @ 208 - glRectsv @ 209 - glShadeModel @ 210 - glLightf @ 211 - glLighti @ 212 - glLightfv @ 213 - glLightiv @ 214 - glGetLightfv @ 215 - glGetLightiv @ 216 - glLightModelf @ 217 - glLightModeli @ 218 - glLightModelfv @ 219 - glLightModeliv @ 220 - glMaterialf @ 221 - glMateriali @ 222 - glMaterialfv @ 223 - glMaterialiv @ 224 - glGetMaterialfv @ 225 - glGetMaterialiv @ 226 - glColorMaterial @ 227 - glPixelZoom @ 228 - glPixelStoref @ 229 - glPixelStorei @ 230 - glPixelTransferf @ 231 - glPixelTransferi @ 232 - glPixelMapfv @ 233 - glPixelMapuiv @ 234 - glPixelMapusv @ 235 - glGetPixelMapfv @ 236 - glGetPixelMapuiv @ 237 - glGetPixelMapusv @ 238 - glBitmap @ 239 - glReadPixels @ 240 - glDrawPixels @ 241 - glCopyPixels @ 242 - glStencilFunc @ 243 - glStencilMask @ 244 - glStencilOp @ 245 - glClearStencil @ 246 - glTexGend @ 247 - glTexGenf @ 248 - glTexGeni @ 249 - glTexGendv @ 250 - glTexGenfv @ 251 - glTexGeniv @ 252 - glGetTexGendv @ 253 - glGetTexGenfv @ 254 - glGetTexGeniv @ 255 - glTexEnvf @ 256 - glTexEnvi @ 257 - glTexEnvfv @ 258 - glTexEnviv @ 259 - glGetTexEnvfv @ 260 - glGetTexEnviv @ 261 - glTexParameterf @ 262 - glTexParameteri @ 263 - glTexParameterfv @ 264 - glTexParameteriv @ 265 - glGetTexParameterfv @ 266 - glGetTexParameteriv @ 267 - glGetTexLevelParameterfv @ 268 - glGetTexLevelParameteriv @ 269 - glTexImage1D @ 270 - glTexImage2D @ 271 - glGetTexImage @ 272 - glMap1d @ 273 - glMap1f @ 274 - glMap2d @ 275 - glMap2f @ 276 - glGetMapdv @ 277 - glGetMapfv @ 278 - glGetMapiv @ 279 - glEvalCoord1d @ 280 - glEvalCoord1f @ 281 - glEvalCoord1dv @ 282 - glEvalCoord1fv @ 283 - glEvalCoord2d @ 284 - glEvalCoord2f @ 285 - glEvalCoord2dv @ 286 - glEvalCoord2fv @ 287 - glMapGrid1d @ 288 - glMapGrid1f @ 289 - glMapGrid2d @ 290 - glMapGrid2f @ 291 - glEvalPoint1 @ 292 - glEvalPoint2 @ 293 - glEvalMesh1 @ 294 - glEvalMesh2 @ 295 - glFogf @ 296 - glFogi @ 297 - glFogfv @ 298 - glFogiv @ 299 - glFeedbackBuffer @ 300 - glPassThrough @ 301 - glSelectBuffer @ 302 - glInitNames @ 303 - glLoadName @ 304 - glPushName @ 305 - glPopName @ 306 -; glBlendEquationEXT @ 307 -; glBlendColorEXT @ 308 - glPolygonOffset @ 309 -; glVertexPointerEXT @ 310 -; glNormalPointerEXT @ 311 -; glColorPointerEXT @ 312 -; glIndexPointerEXT @ 313 -; glTexCoordPointerEXT @ 314 -; glEdgeFlagPointerEXT @ 315 -; glGetPointervEXT @ 316 -; glArrayElementEXT @ 317 -; glDrawArraysEXT @ 318 -; OSMesaCreateContext @ 319 -; OSMesaDestroyContext @ 320 -; OSMesaMakeCurrent @ 321 -; XMesaCreateContext @ 322 -; XMesaDestroyContext @ 323 -; XMesaMakeCurrent @ 326 -; XMesaGetCurrentContext @ 327 -; XMesaSwapBuffers @ 328 -; XMesaGetBackBuffer @ 329 - glXChooseVisual @ 330 - glXCreateContext @ 331 - glXDestroyContext @ 332 - glXMakeCurrent @ 333 - glXCopyContext @ 334 - glXSwapBuffers @ 335 - glXCreateGLXPixmap @ 336 - glXDestroyGLXPixmap @ 337 - glXQueryExtension @ 338 - glXQueryVersion @ 339 - glXIsDirect @ 340 - glXGetConfig @ 341 - glXGetCurrentContext @ 342 - glXGetCurrentDrawable @ 343 - glXWaitGL @ 344 - glXWaitX @ 345 - glXUseXFont @ 346 - glXQueryExtensionsString @ 347 - glXQueryServerString @ 348 - glXGetClientString @ 349 - glPushClientAttrib @ 350 - glPopClientAttrib @ 351 - glIndexub @ 352 - glIndexubv @ 353 - glVertexPointer @ 354 - glNormalPointer @ 355 - glColorPointer @ 356 - glIndexPointer @ 357 - glTexCoordPointer @ 358 - glEdgeFlagPointer @ 359 - glGetPointerv @ 360 - glArrayElement @ 361 - glDrawArrays @ 362 - glDrawElements @ 363 - glInterleavedArrays @ 364 - glGenTextures @ 365 - glDeleteTextures @ 366 - glBindTexture @ 367 - glPrioritizeTextures @ 368 - glAreTexturesResident @ 369 - glIsTexture @ 370 - glTexSubImage1D @ 371 - glTexSubImage2D @ 372 - glCopyTexImage1D @ 373 - glCopyTexImage2D @ 374 - glCopyTexSubImage1D @ 375 - glCopyTexSubImage2D @ 376 -; glWindowPos2iMESA @ 377 -; glWindowPos2sMESA @ 378 -; glWindowPos2fMESA @ 379 -; glWindowPos2dMESA @ 380 -; glWindowPos2ivMESA @ 381 -; glWindowPos2svMESA @ 382 -; glWindowPos2fvMESA @ 383 -; glWindowPos2dvMESA @ 384 -; glWindowPos3iMESA @ 385 -; glWindowPos3sMESA @ 386 -; glWindowPos3fMESA @ 387 -; glWindowPos3dMESA @ 388 -; glWindowPos3ivMESA @ 389 -; glWindowPos3svMESA @ 390 -; glWindowPos3fvMESA @ 391 -; glWindowPos3dvMESA @ 392 -; glWindowPos4iMESA @ 393 -; glWindowPos4sMESA @ 394 -; glWindowPos4fMESA @ 395 -; glWindowPos4dMESA @ 396 -; glWindowPos4ivMESA @ 397 -; glWindowPos4svMESA @ 398 -; glWindowPos4fvMESA @ 399 -; glWindowPos4dvMESA @ 400 -; glXCreateGLXPixmapMESA @ 401 -; glXReleaseBuffersMESA @ 402 -; OSMesaGetCurrentContext @ 403 -; OSMesaPixelStore @ 404 -; OSMesaGetIntegerv @ 405 -; XMesaCreateVisual @ 406 -; XMesaDestroyVisual @ 407 -; XMesaCreateWindowBuffer @ 408 -; XMesaCreatePixmapBuffer @ 409 -; XMesaDestroyBuffer @ 410 -; XMesaGetCurrentBuffer @ 411 -; XMesaFlush @ 412 -; XMesaGetString @ 413 -; glPolygonOffsetEXT @ 414 - glDisableClientState @ 450 - glEnableClientState @ 451 - glXFreeContextEXT @ 452 - glXGetContextIDEXT @ 453 - glXGetCurrentDisplay @ 454 - glXImportContextEXT @ 455 - glXQueryContextInfoEXT @ 456 - glXGetCurrentDrawableEXT @ 457 Index: xc/lib/GL/GLos2.rsp diff -u xc/lib/GL/GLos2.rsp:1.1 xc/lib/GL/GLos2.rsp:removed --- xc/lib/GL/GLos2.rsp:1.1 Thu Apr 29 05:13:26 1999 +++ xc/lib/GL/GLos2.rsp Mon Jun 4 12:37:06 2001 @@ -1,6 +0,0 @@ -glx\clientattrib.obj glx\compsize.obj glx\eval.obj glx\g_render.obj+ -glx\g_single.obj glx\g_vendpriv.obj glx\glxcmds.obj glx\glxext.obj+ -glx\pixel.obj glx\pixelstore.obj glx\render2.obj glx\renderpix.obj+ -glx\single2.obj glx\singlepix.obj glx\vertarr.obj /NOI /NOL /NOD /BAT -GL.dll -GL.map Index: xc/lib/GL/Imakefile diff -u xc/lib/GL/Imakefile:1.34 xc/lib/GL/Imakefile:1.37 --- xc/lib/GL/Imakefile:1.34 Tue Dec 12 18:24:26 2000 +++ xc/lib/GL/Imakefile Fri Mar 23 15:56:28 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/Imakefile,v 1.34 2000/12/12 23:24:26 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/Imakefile,v 1.37 2001/03/23 20:56:28 dawes Exp $ #include @@ -6,353 +6,28 @@ #define PassCDebugFlags -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx -#define DoExtraLib SharedLibGlx -#define DoDebugLib DebugLibGlx -#define DoProfileLib ProfileLibGlx +LIBGLBUILDDIR = GL + GLXDIRS = glx - LIBNAME = GL - SOREV = $(SOGLREV) - -#ifdef SharedGLReqs -REQUIREDLIBS = SharedGLReqs -#endif - -XCOMM -XCOMM Not related to ProfileLibGlx - I dont know how that works. KW. -XCOMM -#ifdef GlxSoProf - PROFSRC = lowpc.c highpc.c - PROFOBJ = lowpc.o highpc.o - -SubdirLibraryRule($(PROFOBJ)) -NormalLintTarget($(PROFSRC)) +#if BuildXF86DRI && !GlxUseSGISI && \ + (!GlxBuiltInMesa || !defined(GlxDriverUsesMesa)) + MESADIRS = mesa/src + OSMESADIRS = mesa/src/OSmesa #endif -#if BuildXF86DRI && defined(i386Architecture) - GLAPI_OBJ = glx/glapi_x86.o -#endif - - GLXOBJS = glx/?*.o - GLXUOBJS = glx/unshared/?*.o $(GLAPI_OBJ) - GLXDOBJS = glx/debugger/?*.o $(GLAPI_OBJ) - GLXPOBJS = glx/profiled/?*.o $(GLAPI_OBJ) - GLXDONES = glx/DONE - #if BuildXF86DRI - DRIOBJS = dri/XF86dri.o dri/dri_glx.o - DRIUOBJS = dri/unshared/XF86dri.o dri/unshared/dri_glx.o - DRIDOBJS = dri/debugger/XF86dri.o dri/debugger/dri_glx.o - DRIPOBJS = dri/profiled/XF86dri.o dri/profiled/dri_glx.o - DRIDONES = dri/DONE - - DRMOBJS = dri/drm/?*.o - DRMUOBJS = dri/drm/unshared/?*.o - DRMDOBJS = dri/drm/debugger/?*.o - DRMPOBJS = dri/drm/profiled/?*.o - DRMDONES = dri/drm/DONE - - MESAOBJS = mesa/src/?*.o -#ifdef i386Architecture -ASM_BASE_OBJS = mesa/src/X86/common_x86_asm.o \ - mesa/src/X86/x86_cliptest.o \ - mesa/src/X86/x86_vertex.o \ - mesa/src/X86/x86_xform_masked2.o \ - mesa/src/X86/x86_xform_masked3.o \ - mesa/src/X86/x86_xform_masked4.o \ - mesa/src/X86/x86_xform_raw2.o \ - mesa/src/X86/x86_xform_raw3.o \ - mesa/src/X86/x86_xform_raw4.o - -#if MesaUseMMX - MMX_OBJS = mesa/src/X86/mmx_blend.o -#endif - -#if MesaUse3DNow - 3DNOW_OBJS = mesa/src/X86/3dnow_norm_raw.o \ - mesa/src/X86/3dnow_vertex.o \ - mesa/src/X86/3dnow_xform_masked1.o \ - mesa/src/X86/3dnow_xform_masked2.o \ - mesa/src/X86/3dnow_xform_masked3.o \ - mesa/src/X86/3dnow_xform_masked4.o \ - mesa/src/X86/3dnow_xform_raw1.o \ - mesa/src/X86/3dnow_xform_raw2.o \ - mesa/src/X86/3dnow_xform_raw3.o \ - mesa/src/X86/3dnow_xform_raw4.o -#endif -#if MesaUseKatmai - KATMAI_OBJS = mesa/src/X86/katmai_norm_raw.o \ - mesa/src/X86/katmai_vertex.o \ - mesa/src/X86/katmai_xform_masked1.o \ - mesa/src/X86/katmai_xform_masked2.o \ - mesa/src/X86/katmai_xform_masked3.o \ - mesa/src/X86/katmai_xform_masked4.o \ - mesa/src/X86/katmai_xform_raw1.o \ - mesa/src/X86/katmai_xform_raw2.o \ - mesa/src/X86/katmai_xform_raw3.o \ - mesa/src/X86/katmai_xform_raw4.o + DRIDIRS = dri mesa/dri + MESADIRS = mesa/src + DRIVERDIRS = mesa/src/drv #endif - - ASM_OBJS = $(ASM_BASE_OBJS) $(MMX_OBJS) $(3DNOW_OBJS) $(KATMAI_OBJS) - - MESAOBJS = mesa/src/?*.o mesa/src/X86/?*.o -#endif - - MESAUOBJS = mesa/src/unshared/?*.o mesa/src/X86/unshared/?*.o $(ASM_OBJS) - MESADOBJS = mesa/src/debugger/?*.o mesa/src/X86/debugger/?*.o $(ASM_OBJS) - MESAPOBJS = mesa/src/profiled/?*.o mesa/src/X86/profiled/?*.o $(ASM_OBJS) - MESADONES = mesa/src/DONE mesa/src/X86/DONE - - DRIMESAOBJS = mesa/dri/?*.o -DRIMESAUOBJS = mesa/dri/unshared/?*.o -DRIMESADOBJS = mesa/dri/debugger/?*.o -DRIMESAPOBJS = mesa/dri/profiled/?*.o -DRIMESADONES = mesa/dri/DONE - - COMMONOBJS = mesa/src/drv/common/?*.o - COMMONUOBJS = mesa/src/drv/common/unshared/?*.o - COMMONDOBJS = mesa/src/drv/common/debugger/?*.o - COMMONPOBJS = mesa/src/drv/common/profiled/?*.o - COMMONDONES = mesa/src/drv/common/DONE - - -#if GlxUseSGISI - -XCOMM nothing - -#elif GlxBuiltInGamma - - GAMMAOBJS = mesa/src/drv/gamma/?*.o - GAMMAUOBJS = mesa/src/drv/gamma/unshared/?*.o - GAMMADOBJS = mesa/src/drv/gamma/debugger/?*.o - GAMMAPOBJS = mesa/src/drv/gamma/profiled/?*.o - GAMMADONES = mesa/src/drv/gamma/DONE - - DRVOBJS = $(GAMMAOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS) - DRVUOBJS = $(GAMMAUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) - DRVDOBJS = $(GAMMADOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) - DRVPOBJS = $(GAMMAPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) - DRVDONES = $(GAMMADONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES) - - GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src mesa/src/drv/gamma - -#elif GlxBuiltInTdfx - - TDFXOBJS = mesa/src/drv/tdfx/?*.o - TDFXUOBJS = mesa/src/drv/tdfx/unshared/?*.o - TDFXDOBJS = mesa/src/drv/tdfx/debugger/?*.o - TDFXPOBJS = mesa/src/drv/tdfx/profiled/?*.o - TDFXDONES = mesa/src/drv/tdfx/DONE - - DRVOBJS = $(TDFXOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS) - DRVUOBJS = $(TDFXUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) - DRVDOBJS = $(TDFXDOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) - DRVPOBJS = $(TDFXPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) - DRVDONES = $(TDFXDONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES) - -REQUIREDLIBS += -lglide3 -ldl - - GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src mesa/src/drv/tdfx - -#elif GlxBuiltInI810 - - I810OBJS = mesa/src/drv/i810/?*.o - I810UOBJS = mesa/src/drv/i810/unshared/?*.o - I810DOBJS = mesa/src/drv/i810/debugger/?*.o - I810POBJS = mesa/src/drv/i810/profiled/?*.o - I810DONES = mesa/src/drv/i810/DONE - - DRVOBJS = $(I810OBJS) $(COMMONOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS) - DRVUOBJS = $(I810UOBJS) $(COMMONUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) - DRVDOBJS = $(I810DOBJS) $(COMMONDOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) - DRVPOBJS = $(I810POBJS) $(COMMONPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) - DRVDONES = $(I810DONES) $(COMMONDONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES) - - GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src mesa/src/drv/i810 - -#elif GlxBuiltInMga - - MGAOBJS = mesa/src/drv/mga/?*.o - MGAUOBJS = mesa/src/drv/mga/unshared/?*.o - MGADOBJS = mesa/src/drv/mga/debugger/?*.o - MGAPOBJS = mesa/src/drv/mga/profiled/?*.o - MGADONES = mesa/src/drv/mga/DONE - - DRVOBJS = $(MGAOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS) - DRVUOBJS = $(MGAUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) - DRVDOBJS = $(MGADOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) - DRVPOBJS = $(MGAPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) - DRVDONES = $(MGADONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES) - - GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src mesa/src/drv/mga - -#elif GlxBuiltInR128 - - R128OBJS = mesa/src/drv/r128/?*.o - R128UOBJS = mesa/src/drv/r128/unshared/?*.o - R128DOBJS = mesa/src/drv/r128/debugger/?*.o - R128POBJS = mesa/src/drv/r128/profiled/?*.o - R128DONES = mesa/src/drv/r128/DONE - - DRVOBJS = $(R128OBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS) - DRVUOBJS = $(R128UOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) - DRVDOBJS = $(R128DOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) - DRVPOBJS = $(R128POBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) - DRVDONES = $(R128DONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES) - - GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src mesa/src/drv/r128 - -#elif GlxBuiltInFfb - - FFBOBJS = mesa/src/drv/ffb/?*.o - FFBUOBJS = mesa/src/drv/ffb/unshared/?*.o - FFBDOBJS = mesa/src/drv/ffb/debugger/?*.o - FFBPOBJS = mesa/src/drv/ffb/profiled/?*.o - FFBDONES = mesa/src/drv/ffb/DONE - - DRVOBJS = $(FFBOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS) - DRVUOBJS = $(FFBUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) - DRVDOBJS = $(FFBDOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) - DRVPOBJS = $(FFBPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) - DRVDONES = $(FFBDONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES) - - GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src mesa/src/drv/ffb - -#elif GlxBuiltInSIS - - SISOBJS = mesa/src/drv/sis/?*.o - SISUOBJS = mesa/src/drv/sis/unshared/?*.o - SISDOBJS = mesa/src/drv/sis/debugger/?*.o - SISPOBJS = mesa/src/drv/sis/profiled/?*.o - SISDONES = mesa/src/drv/sis/DONE - - DRVOBJS = $(SISOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS) - DRVUOBJS = $(SISUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) - DRVDOBJS = $(SISDOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) - DRVPOBJS = $(SISPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) - DRVDONES = $(SISDONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES) - GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src mesa/src/drv/sis - -#elif GlxBuiltInMesa - -#ifndef GlxDriverUsesMesa - DRVOBJS = mesa/src/?*.o - DRVUOBJS = mesa/src/unshared/?*.o - DRVDOBJS = mesa/src/debugger/?*.o - DRVPOBJS = mesa/src/profiled/?*.o - DRVDONES = mesa/src/DONE - - GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src -#endif - +#if GlxUseBuiltInDRIDriver +SUBDIRS = $(MESADIRS) $(DRIDIRS) $(DRIVERDIRS) $(GLXDIRS) $(LIBGLBUILDDIR) $(OSMESADIRS) #else - -XCOMM No built-in drivers. This is the usual case. -GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src - +SUBDIRS = $(MESADIRS) $(GLXDIRS) $(DRIDIRS) $(LIBGLBUILDDIR) $(OSMESADIRS) $(DRIVERDIRS) #endif -#else - -XCOMM BuildXF86DRI was not defined. Just build an indirect-only libGL. -GLXSUBDIRS = glx - -#endif - +MakeSubdirs($(SUBDIRS)) -#if !GlxUseSGISI && (!GlxBuiltInMesa || !defined(GlxDriverUsesMesa)) -MakeSubdirs($(GLXSUBDIRS)) -#endif - - -#ifdef OS2Architecture - OBJS = $(LIBNAME).a -#else - OBJS = $(GLXOBJS) $(DRIOBJS) $(DRVOBJS) -#endif - -#if HasSharedLibraries - UOBJS = $(GLXUOBJS) $(DRIUOBJS) $(DRVUOBJS) -#else - UOBJS = $(OBJS) -#endif - - DOBJS = $(GLXDOBJS) $(DRIDOBJS) $(DRVDOBJS) - POBJS = $(GLXPOBJS) $(DRIPOBJS) $(DRVPOBJS) - DONES = $(GLXDONES) $(DRIDONES) $(DRVDONES) - -#if LocalThreads - THREADOBJS = $(THREADS_LIBS) -#endif - -#if HasParallelMake -MakeMutex($(GLXSUBDIRS) $(DONES)) -#endif - -#if HasGnuMake || HasBsdMake -$(DONES): $(GLXSUBDIRS) -#endif - -#include - -#undef _LinkBuildLibrary -#define _LinkBuildLibrary(lib) LinkBuildLibrary(lib) - - -#if NormalLibGlx -NormalDepLibraryTarget($(LIBNAME),$(GLXSUBDIRS) $(DONES),$(UOBJS)) -InstallLibrary($(LIBNAME),$(USRLIBDIR)) -#endif -#if SharedLibGlx -SharedDepLibraryTarget($(LIBNAME),$(SOREV),$(GLXSUBDIRS) $(DONES),$(OBJS) $(THREADOBJS),.,.) -InstallSharedLibrary($(LIBNAME),$(SOREV),$(SHLIBDIR)) -#if LinkGLToUsrLib && AlternateUsrLibDir -install:: - MakeDir($(DESTDIR)$(SYSTEMUSRLIBDIR)) - $(RM) $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so - $(LN) $(SHLIBDIR)/lib$(LIBNAME).so $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so || true - $(RM) $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so.1 - $(LN) $(SHLIBDIR)/lib$(LIBNAME).so.1 $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so.1 || true -#endif -#endif -#if DebugLibGlx -DebuggedDepLibraryTarget($(LIBNAME),$(GLXSUBDIRS) $(DONES),$(DOBJS)) -InstallLibrary($(LIBNAME)_d,$(USRLIBDIR)) -#endif -#if ProfileLibGlx -ProfiledDepLibraryTarget($(LIBNAME),$(GLXSUBDIRS) $(DONES),$(POBJS)) -InstallLibrary($(LIBNAME)_p,$(USRLIBDIR)) -#endif - -XCOMM libOSmesa needs libGL, so build it now - -#if BuildXF86DRI && !GlxUseSGISI && (!GlxBuiltInMesa || !defined(GlxDriverUsesMesa)) -OSMESASUBDIRS = mesa/src/OSmesa -MakeSubdirs($(OSMESASUBDIRS)) -#endif - - -XCOMM libGL has now been made, continue with building the drivers. - -#if BuildXF86DRI && \ - !GlxUseSGISI && \ - !GlxBuiltInGamma && \ - !GlxBuiltInTdfx && \ - !GlxBuiltInI810 && \ - !GlxBuiltInMga && \ - !GlxBuiltInR128 && \ - !GlxBuiltInFfb && \ - !GlxBuiltInSIS && \ - !GlxBuiltInMesa - -DRIVERSUBDIRS = mesa/src/drv - -MakeSubdirs($(DRIVERSUBDIRS)) - -#endif - -SUBDIRS = $(GLXSUBDIRS) $(OSMESASUBDIRS) $(DRIVERSUBDIRS) - DependSubdirs($(SUBDIRS)) + Index: xc/lib/GL/GL/GL-def.cpp diff -u /dev/null xc/lib/GL/GL/GL-def.cpp:1.1 --- /dev/null Mon Jun 4 12:37:07 2001 +++ xc/lib/GL/GL/GL-def.cpp Thu Mar 22 16:47:56 2001 @@ -0,0 +1,431 @@ +LIBRARY libGL +VERSION LIBRARY_VERSION +EXPORTS + glClearIndex @ 1 + glClearColor @ 2 + glClear @ 3 + glIndexMask @ 4 + glColorMask @ 5 + glAlphaFunc @ 6 + glBlendFunc @ 7 + glLogicOp @ 8 + glCullFace @ 9 + glFrontFace @ 10 + glPointSize @ 11 + glLineWidth @ 12 + glLineStipple @ 13 + glPolygonMode @ 14 + glPolygonStipple @ 15 + glGetPolygonStipple @ 16 + glEdgeFlag @ 17 + glEdgeFlagv @ 18 + glScissor @ 19 + glClipPlane @ 20 + glGetClipPlane @ 21 + glDrawBuffer @ 22 + glReadBuffer @ 23 + glEnable @ 24 + glDisable @ 25 + glIsEnabled @ 26 + glGetBooleanv @ 27 + glGetDoublev @ 28 + glGetFloatv @ 29 + glGetIntegerv @ 30 + glPushAttrib @ 31 + glPopAttrib @ 32 + glRenderMode @ 33 + glGetError @ 34 + glGetString @ 35 + glFinish @ 36 + glFlush @ 37 + glHint @ 38 + glClearDepth @ 39 + glDepthFunc @ 40 + glDepthMask @ 41 + glDepthRange @ 42 + glClearAccum @ 43 + glAccum @ 44 + glMatrixMode @ 45 + glOrtho @ 46 + glFrustum @ 47 + glViewport @ 48 + glPushMatrix @ 49 + glPopMatrix @ 50 + glLoadIdentity @ 51 + glLoadMatrixd @ 52 + glLoadMatrixf @ 53 + glMultMatrixd @ 54 + glMultMatrixf @ 55 + glRotated @ 56 + glRotatef @ 57 + glScaled @ 58 + glScalef @ 59 + glTranslated @ 60 + glTranslatef @ 61 + glIsList @ 62 + glDeleteLists @ 63 + glGenLists @ 64 + glNewList @ 65 + glEndList @ 66 + glCallList @ 67 + glCallLists @ 68 + glListBase @ 69 + glBegin @ 70 + glEnd @ 71 + glVertex2d @ 72 + glVertex2f @ 73 + glVertex2i @ 74 + glVertex2s @ 75 + glVertex3d @ 76 + glVertex3f @ 77 + glVertex3i @ 78 + glVertex3s @ 79 + glVertex4d @ 80 + glVertex4f @ 81 + glVertex4i @ 82 + glVertex4s @ 83 + glVertex2dv @ 84 + glVertex2fv @ 85 + glVertex2iv @ 86 + glVertex2sv @ 87 + glVertex3dv @ 88 + glVertex3fv @ 89 + glVertex3iv @ 90 + glVertex3sv @ 91 + glVertex4dv @ 92 + glVertex4fv @ 93 + glVertex4iv @ 94 + glVertex4sv @ 95 + glNormal3b @ 96 + glNormal3d @ 97 + glNormal3f @ 98 + glNormal3i @ 99 + glNormal3s @ 100 + glNormal3bv @ 101 + glNormal3dv @ 102 + glNormal3fv @ 103 + glNormal3iv @ 104 + glNormal3sv @ 105 + glIndexd @ 106 + glIndexf @ 107 + glIndexi @ 108 + glIndexs @ 109 + glIndexdv @ 110 + glIndexfv @ 111 + glIndexiv @ 112 + glIndexsv @ 113 + glColor3b @ 114 + glColor3d @ 115 + glColor3f @ 116 + glColor3i @ 117 + glColor3s @ 118 + glColor3ub @ 119 + glColor3ui @ 120 + glColor3us @ 121 + glColor4b @ 122 + glColor4d @ 123 + glColor4f @ 124 + glColor4i @ 125 + glColor4s @ 126 + glColor4ub @ 127 + glColor4ui @ 128 + glColor4us @ 129 + glColor3bv @ 130 + glColor3dv @ 131 + glColor3fv @ 132 + glColor3iv @ 133 + glColor3sv @ 134 + glColor3ubv @ 135 + glColor3uiv @ 136 + glColor3usv @ 137 + glColor4bv @ 138 + glColor4dv @ 139 + glColor4fv @ 140 + glColor4iv @ 141 + glColor4sv @ 142 + glColor4ubv @ 143 + glColor4uiv @ 144 + glColor4usv @ 145 + glTexCoord1d @ 146 + glTexCoord1f @ 147 + glTexCoord1i @ 148 + glTexCoord1s @ 149 + glTexCoord2d @ 150 + glTexCoord2f @ 151 + glTexCoord2i @ 152 + glTexCoord2s @ 153 + glTexCoord3d @ 154 + glTexCoord3f @ 155 + glTexCoord3i @ 156 + glTexCoord3s @ 157 + glTexCoord4d @ 158 + glTexCoord4f @ 159 + glTexCoord4i @ 160 + glTexCoord4s @ 161 + glTexCoord1dv @ 162 + glTexCoord1fv @ 163 + glTexCoord1iv @ 164 + glTexCoord1sv @ 165 + glTexCoord2dv @ 166 + glTexCoord2fv @ 167 + glTexCoord2iv @ 168 + glTexCoord2sv @ 169 + glTexCoord3dv @ 170 + glTexCoord3fv @ 171 + glTexCoord3iv @ 172 + glTexCoord3sv @ 173 + glTexCoord4dv @ 174 + glTexCoord4fv @ 175 + glTexCoord4iv @ 176 + glTexCoord4sv @ 177 + glRasterPos2d @ 178 + glRasterPos2f @ 179 + glRasterPos2i @ 180 + glRasterPos2s @ 181 + glRasterPos3d @ 182 + glRasterPos3f @ 183 + glRasterPos3i @ 184 + glRasterPos3s @ 185 + glRasterPos4d @ 186 + glRasterPos4f @ 187 + glRasterPos4i @ 188 + glRasterPos4s @ 189 + glRasterPos2dv @ 190 + glRasterPos2fv @ 191 + glRasterPos2iv @ 192 + glRasterPos2sv @ 193 + glRasterPos3dv @ 194 + glRasterPos3fv @ 195 + glRasterPos3iv @ 196 + glRasterPos3sv @ 197 + glRasterPos4dv @ 198 + glRasterPos4fv @ 199 + glRasterPos4iv @ 200 + glRasterPos4sv @ 201 + glRectd @ 202 + glRectf @ 203 + glRecti @ 204 + glRects @ 205 + glRectdv @ 206 + glRectfv @ 207 + glRectiv @ 208 + glRectsv @ 209 + glShadeModel @ 210 + glLightf @ 211 + glLighti @ 212 + glLightfv @ 213 + glLightiv @ 214 + glGetLightfv @ 215 + glGetLightiv @ 216 + glLightModelf @ 217 + glLightModeli @ 218 + glLightModelfv @ 219 + glLightModeliv @ 220 + glMaterialf @ 221 + glMateriali @ 222 + glMaterialfv @ 223 + glMaterialiv @ 224 + glGetMaterialfv @ 225 + glGetMaterialiv @ 226 + glColorMaterial @ 227 + glPixelZoom @ 228 + glPixelStoref @ 229 + glPixelStorei @ 230 + glPixelTransferf @ 231 + glPixelTransferi @ 232 + glPixelMapfv @ 233 + glPixelMapuiv @ 234 + glPixelMapusv @ 235 + glGetPixelMapfv @ 236 + glGetPixelMapuiv @ 237 + glGetPixelMapusv @ 238 + glBitmap @ 239 + glReadPixels @ 240 + glDrawPixels @ 241 + glCopyPixels @ 242 + glStencilFunc @ 243 + glStencilMask @ 244 + glStencilOp @ 245 + glClearStencil @ 246 + glTexGend @ 247 + glTexGenf @ 248 + glTexGeni @ 249 + glTexGendv @ 250 + glTexGenfv @ 251 + glTexGeniv @ 252 + glGetTexGendv @ 253 + glGetTexGenfv @ 254 + glGetTexGeniv @ 255 + glTexEnvf @ 256 + glTexEnvi @ 257 + glTexEnvfv @ 258 + glTexEnviv @ 259 + glGetTexEnvfv @ 260 + glGetTexEnviv @ 261 + glTexParameterf @ 262 + glTexParameteri @ 263 + glTexParameterfv @ 264 + glTexParameteriv @ 265 + glGetTexParameterfv @ 266 + glGetTexParameteriv @ 267 + glGetTexLevelParameterfv @ 268 + glGetTexLevelParameteriv @ 269 + glTexImage1D @ 270 + glTexImage2D @ 271 + glGetTexImage @ 272 + glMap1d @ 273 + glMap1f @ 274 + glMap2d @ 275 + glMap2f @ 276 + glGetMapdv @ 277 + glGetMapfv @ 278 + glGetMapiv @ 279 + glEvalCoord1d @ 280 + glEvalCoord1f @ 281 + glEvalCoord1dv @ 282 + glEvalCoord1fv @ 283 + glEvalCoord2d @ 284 + glEvalCoord2f @ 285 + glEvalCoord2dv @ 286 + glEvalCoord2fv @ 287 + glMapGrid1d @ 288 + glMapGrid1f @ 289 + glMapGrid2d @ 290 + glMapGrid2f @ 291 + glEvalPoint1 @ 292 + glEvalPoint2 @ 293 + glEvalMesh1 @ 294 + glEvalMesh2 @ 295 + glFogf @ 296 + glFogi @ 297 + glFogfv @ 298 + glFogiv @ 299 + glFeedbackBuffer @ 300 + glPassThrough @ 301 + glSelectBuffer @ 302 + glInitNames @ 303 + glLoadName @ 304 + glPushName @ 305 + glPopName @ 306 +; glBlendEquationEXT @ 307 +; glBlendColorEXT @ 308 + glPolygonOffset @ 309 +; glVertexPointerEXT @ 310 +; glNormalPointerEXT @ 311 +; glColorPointerEXT @ 312 +; glIndexPointerEXT @ 313 +; glTexCoordPointerEXT @ 314 +; glEdgeFlagPointerEXT @ 315 +; glGetPointervEXT @ 316 +; glArrayElementEXT @ 317 +; glDrawArraysEXT @ 318 +; OSMesaCreateContext @ 319 +; OSMesaDestroyContext @ 320 +; OSMesaMakeCurrent @ 321 +; XMesaCreateContext @ 322 +; XMesaDestroyContext @ 323 +; XMesaMakeCurrent @ 326 +; XMesaGetCurrentContext @ 327 +; XMesaSwapBuffers @ 328 +; XMesaGetBackBuffer @ 329 + glXChooseVisual @ 330 + glXCreateContext @ 331 + glXDestroyContext @ 332 + glXMakeCurrent @ 333 + glXCopyContext @ 334 + glXSwapBuffers @ 335 + glXCreateGLXPixmap @ 336 + glXDestroyGLXPixmap @ 337 + glXQueryExtension @ 338 + glXQueryVersion @ 339 + glXIsDirect @ 340 + glXGetConfig @ 341 + glXGetCurrentContext @ 342 + glXGetCurrentDrawable @ 343 + glXWaitGL @ 344 + glXWaitX @ 345 + glXUseXFont @ 346 + glXQueryExtensionsString @ 347 + glXQueryServerString @ 348 + glXGetClientString @ 349 + glPushClientAttrib @ 350 + glPopClientAttrib @ 351 + glIndexub @ 352 + glIndexubv @ 353 + glVertexPointer @ 354 + glNormalPointer @ 355 + glColorPointer @ 356 + glIndexPointer @ 357 + glTexCoordPointer @ 358 + glEdgeFlagPointer @ 359 + glGetPointerv @ 360 + glArrayElement @ 361 + glDrawArrays @ 362 + glDrawElements @ 363 + glInterleavedArrays @ 364 + glGenTextures @ 365 + glDeleteTextures @ 366 + glBindTexture @ 367 + glPrioritizeTextures @ 368 + glAreTexturesResident @ 369 + glIsTexture @ 370 + glTexSubImage1D @ 371 + glTexSubImage2D @ 372 + glCopyTexImage1D @ 373 + glCopyTexImage2D @ 374 + glCopyTexSubImage1D @ 375 + glCopyTexSubImage2D @ 376 +; glWindowPos2iMESA @ 377 +; glWindowPos2sMESA @ 378 +; glWindowPos2fMESA @ 379 +; glWindowPos2dMESA @ 380 +; glWindowPos2ivMESA @ 381 +; glWindowPos2svMESA @ 382 +; glWindowPos2fvMESA @ 383 +; glWindowPos2dvMESA @ 384 +; glWindowPos3iMESA @ 385 +; glWindowPos3sMESA @ 386 +; glWindowPos3fMESA @ 387 +; glWindowPos3dMESA @ 388 +; glWindowPos3ivMESA @ 389 +; glWindowPos3svMESA @ 390 +; glWindowPos3fvMESA @ 391 +; glWindowPos3dvMESA @ 392 +; glWindowPos4iMESA @ 393 +; glWindowPos4sMESA @ 394 +; glWindowPos4fMESA @ 395 +; glWindowPos4dMESA @ 396 +; glWindowPos4ivMESA @ 397 +; glWindowPos4svMESA @ 398 +; glWindowPos4fvMESA @ 399 +; glWindowPos4dvMESA @ 400 +; glXCreateGLXPixmapMESA @ 401 +; glXReleaseBuffersMESA @ 402 +; OSMesaGetCurrentContext @ 403 +; OSMesaPixelStore @ 404 +; OSMesaGetIntegerv @ 405 +; XMesaCreateVisual @ 406 +; XMesaDestroyVisual @ 407 +; XMesaCreateWindowBuffer @ 408 +; XMesaCreatePixmapBuffer @ 409 +; XMesaDestroyBuffer @ 410 +; XMesaGetCurrentBuffer @ 411 +; XMesaFlush @ 412 +; XMesaGetString @ 413 +; glPolygonOffsetEXT @ 414 + glDisableClientState @ 450 + glEnableClientState @ 451 + glXFreeContextEXT @ 452 + glXGetContextIDEXT @ 453 + glXGetCurrentDisplay @ 454 + glXImportContextEXT @ 455 + glXQueryContextInfoEXT @ 456 + glXGetCurrentDrawableEXT @ 457 + glCopyTexSubImage3D @ 458 + glDrawRangeElements @ 459 + glTexSubImage3D @ 460 + glBlendColorEXT @ 461 + glBlendEquationEXT @ 462 + glTexImage3D @ 463 + +/* $XFree86: xc/lib/GL/GL/GL-def.cpp,v 1.1 2001/03/22 21:47:56 dawes Exp $ */ Index: xc/lib/GL/GL/GLos2.def diff -u /dev/null xc/lib/GL/GL/GLos2.def:1.1 --- /dev/null Mon Jun 4 12:37:07 2001 +++ xc/lib/GL/GL/GLos2.def Thu Mar 22 16:47:56 2001 @@ -0,0 +1,428 @@ +LIBRARY GL +DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/GL/GL/GLos2.def,v 1.1 2001/03/22 21:47:56 dawes Exp $" +CODE + PRELOAD +DATA + MULTIPLE NONSHARED +STACKSIZE 131072 +EXPORTS + glClearIndex @ 1 + glClearColor @ 2 + glClear @ 3 + glIndexMask @ 4 + glColorMask @ 5 + glAlphaFunc @ 6 + glBlendFunc @ 7 + glLogicOp @ 8 + glCullFace @ 9 + glFrontFace @ 10 + glPointSize @ 11 + glLineWidth @ 12 + glLineStipple @ 13 + glPolygonMode @ 14 + glPolygonStipple @ 15 + glGetPolygonStipple @ 16 + glEdgeFlag @ 17 + glEdgeFlagv @ 18 + glScissor @ 19 + glClipPlane @ 20 + glGetClipPlane @ 21 + glDrawBuffer @ 22 + glReadBuffer @ 23 + glEnable @ 24 + glDisable @ 25 + glIsEnabled @ 26 + glGetBooleanv @ 27 + glGetDoublev @ 28 + glGetFloatv @ 29 + glGetIntegerv @ 30 + glPushAttrib @ 31 + glPopAttrib @ 32 + glRenderMode @ 33 + glGetError @ 34 + glGetString @ 35 + glFinish @ 36 + glFlush @ 37 + glHint @ 38 + glClearDepth @ 39 + glDepthFunc @ 40 + glDepthMask @ 41 + glDepthRange @ 42 + glClearAccum @ 43 + glAccum @ 44 + glMatrixMode @ 45 + glOrtho @ 46 + glFrustum @ 47 + glViewport @ 48 + glPushMatrix @ 49 + glPopMatrix @ 50 + glLoadIdentity @ 51 + glLoadMatrixd @ 52 + glLoadMatrixf @ 53 + glMultMatrixd @ 54 + glMultMatrixf @ 55 + glRotated @ 56 + glRotatef @ 57 + glScaled @ 58 + glScalef @ 59 + glTranslated @ 60 + glTranslatef @ 61 + glIsList @ 62 + glDeleteLists @ 63 + glGenLists @ 64 + glNewList @ 65 + glEndList @ 66 + glCallList @ 67 + glCallLists @ 68 + glListBase @ 69 + glBegin @ 70 + glEnd @ 71 + glVertex2d @ 72 + glVertex2f @ 73 + glVertex2i @ 74 + glVertex2s @ 75 + glVertex3d @ 76 + glVertex3f @ 77 + glVertex3i @ 78 + glVertex3s @ 79 + glVertex4d @ 80 + glVertex4f @ 81 + glVertex4i @ 82 + glVertex4s @ 83 + glVertex2dv @ 84 + glVertex2fv @ 85 + glVertex2iv @ 86 + glVertex2sv @ 87 + glVertex3dv @ 88 + glVertex3fv @ 89 + glVertex3iv @ 90 + glVertex3sv @ 91 + glVertex4dv @ 92 + glVertex4fv @ 93 + glVertex4iv @ 94 + glVertex4sv @ 95 + glNormal3b @ 96 + glNormal3d @ 97 + glNormal3f @ 98 + glNormal3i @ 99 + glNormal3s @ 100 + glNormal3bv @ 101 + glNormal3dv @ 102 + glNormal3fv @ 103 + glNormal3iv @ 104 + glNormal3sv @ 105 + glIndexd @ 106 + glIndexf @ 107 + glIndexi @ 108 + glIndexs @ 109 + glIndexdv @ 110 + glIndexfv @ 111 + glIndexiv @ 112 + glIndexsv @ 113 + glColor3b @ 114 + glColor3d @ 115 + glColor3f @ 116 + glColor3i @ 117 + glColor3s @ 118 + glColor3ub @ 119 + glColor3ui @ 120 + glColor3us @ 121 + glColor4b @ 122 + glColor4d @ 123 + glColor4f @ 124 + glColor4i @ 125 + glColor4s @ 126 + glColor4ub @ 127 + glColor4ui @ 128 + glColor4us @ 129 + glColor3bv @ 130 + glColor3dv @ 131 + glColor3fv @ 132 + glColor3iv @ 133 + glColor3sv @ 134 + glColor3ubv @ 135 + glColor3uiv @ 136 + glColor3usv @ 137 + glColor4bv @ 138 + glColor4dv @ 139 + glColor4fv @ 140 + glColor4iv @ 141 + glColor4sv @ 142 + glColor4ubv @ 143 + glColor4uiv @ 144 + glColor4usv @ 145 + glTexCoord1d @ 146 + glTexCoord1f @ 147 + glTexCoord1i @ 148 + glTexCoord1s @ 149 + glTexCoord2d @ 150 + glTexCoord2f @ 151 + glTexCoord2i @ 152 + glTexCoord2s @ 153 + glTexCoord3d @ 154 + glTexCoord3f @ 155 + glTexCoord3i @ 156 + glTexCoord3s @ 157 + glTexCoord4d @ 158 + glTexCoord4f @ 159 + glTexCoord4i @ 160 + glTexCoord4s @ 161 + glTexCoord1dv @ 162 + glTexCoord1fv @ 163 + glTexCoord1iv @ 164 + glTexCoord1sv @ 165 + glTexCoord2dv @ 166 + glTexCoord2fv @ 167 + glTexCoord2iv @ 168 + glTexCoord2sv @ 169 + glTexCoord3dv @ 170 + glTexCoord3fv @ 171 + glTexCoord3iv @ 172 + glTexCoord3sv @ 173 + glTexCoord4dv @ 174 + glTexCoord4fv @ 175 + glTexCoord4iv @ 176 + glTexCoord4sv @ 177 + glRasterPos2d @ 178 + glRasterPos2f @ 179 + glRasterPos2i @ 180 + glRasterPos2s @ 181 + glRasterPos3d @ 182 + glRasterPos3f @ 183 + glRasterPos3i @ 184 + glRasterPos3s @ 185 + glRasterPos4d @ 186 + glRasterPos4f @ 187 + glRasterPos4i @ 188 + glRasterPos4s @ 189 + glRasterPos2dv @ 190 + glRasterPos2fv @ 191 + glRasterPos2iv @ 192 + glRasterPos2sv @ 193 + glRasterPos3dv @ 194 + glRasterPos3fv @ 195 + glRasterPos3iv @ 196 + glRasterPos3sv @ 197 + glRasterPos4dv @ 198 + glRasterPos4fv @ 199 + glRasterPos4iv @ 200 + glRasterPos4sv @ 201 + glRectd @ 202 + glRectf @ 203 + glRecti @ 204 + glRects @ 205 + glRectdv @ 206 + glRectfv @ 207 + glRectiv @ 208 + glRectsv @ 209 + glShadeModel @ 210 + glLightf @ 211 + glLighti @ 212 + glLightfv @ 213 + glLightiv @ 214 + glGetLightfv @ 215 + glGetLightiv @ 216 + glLightModelf @ 217 + glLightModeli @ 218 + glLightModelfv @ 219 + glLightModeliv @ 220 + glMaterialf @ 221 + glMateriali @ 222 + glMaterialfv @ 223 + glMaterialiv @ 224 + glGetMaterialfv @ 225 + glGetMaterialiv @ 226 + glColorMaterial @ 227 + glPixelZoom @ 228 + glPixelStoref @ 229 + glPixelStorei @ 230 + glPixelTransferf @ 231 + glPixelTransferi @ 232 + glPixelMapfv @ 233 + glPixelMapuiv @ 234 + glPixelMapusv @ 235 + glGetPixelMapfv @ 236 + glGetPixelMapuiv @ 237 + glGetPixelMapusv @ 238 + glBitmap @ 239 + glReadPixels @ 240 + glDrawPixels @ 241 + glCopyPixels @ 242 + glStencilFunc @ 243 + glStencilMask @ 244 + glStencilOp @ 245 + glClearStencil @ 246 + glTexGend @ 247 + glTexGenf @ 248 + glTexGeni @ 249 + glTexGendv @ 250 + glTexGenfv @ 251 + glTexGeniv @ 252 + glGetTexGendv @ 253 + glGetTexGenfv @ 254 + glGetTexGeniv @ 255 + glTexEnvf @ 256 + glTexEnvi @ 257 + glTexEnvfv @ 258 + glTexEnviv @ 259 + glGetTexEnvfv @ 260 + glGetTexEnviv @ 261 + glTexParameterf @ 262 + glTexParameteri @ 263 + glTexParameterfv @ 264 + glTexParameteriv @ 265 + glGetTexParameterfv @ 266 + glGetTexParameteriv @ 267 + glGetTexLevelParameterfv @ 268 + glGetTexLevelParameteriv @ 269 + glTexImage1D @ 270 + glTexImage2D @ 271 + glGetTexImage @ 272 + glMap1d @ 273 + glMap1f @ 274 + glMap2d @ 275 + glMap2f @ 276 + glGetMapdv @ 277 + glGetMapfv @ 278 + glGetMapiv @ 279 + glEvalCoord1d @ 280 + glEvalCoord1f @ 281 + glEvalCoord1dv @ 282 + glEvalCoord1fv @ 283 + glEvalCoord2d @ 284 + glEvalCoord2f @ 285 + glEvalCoord2dv @ 286 + glEvalCoord2fv @ 287 + glMapGrid1d @ 288 + glMapGrid1f @ 289 + glMapGrid2d @ 290 + glMapGrid2f @ 291 + glEvalPoint1 @ 292 + glEvalPoint2 @ 293 + glEvalMesh1 @ 294 + glEvalMesh2 @ 295 + glFogf @ 296 + glFogi @ 297 + glFogfv @ 298 + glFogiv @ 299 + glFeedbackBuffer @ 300 + glPassThrough @ 301 + glSelectBuffer @ 302 + glInitNames @ 303 + glLoadName @ 304 + glPushName @ 305 + glPopName @ 306 +; glBlendEquationEXT @ 307 +; glBlendColorEXT @ 308 + glPolygonOffset @ 309 +; glVertexPointerEXT @ 310 +; glNormalPointerEXT @ 311 +; glColorPointerEXT @ 312 +; glIndexPointerEXT @ 313 +; glTexCoordPointerEXT @ 314 +; glEdgeFlagPointerEXT @ 315 +; glGetPointervEXT @ 316 +; glArrayElementEXT @ 317 +; glDrawArraysEXT @ 318 +; OSMesaCreateContext @ 319 +; OSMesaDestroyContext @ 320 +; OSMesaMakeCurrent @ 321 +; XMesaCreateContext @ 322 +; XMesaDestroyContext @ 323 +; XMesaMakeCurrent @ 326 +; XMesaGetCurrentContext @ 327 +; XMesaSwapBuffers @ 328 +; XMesaGetBackBuffer @ 329 + glXChooseVisual @ 330 + glXCreateContext @ 331 + glXDestroyContext @ 332 + glXMakeCurrent @ 333 + glXCopyContext @ 334 + glXSwapBuffers @ 335 + glXCreateGLXPixmap @ 336 + glXDestroyGLXPixmap @ 337 + glXQueryExtension @ 338 + glXQueryVersion @ 339 + glXIsDirect @ 340 + glXGetConfig @ 341 + glXGetCurrentContext @ 342 + glXGetCurrentDrawable @ 343 + glXWaitGL @ 344 + glXWaitX @ 345 + glXUseXFont @ 346 + glXQueryExtensionsString @ 347 + glXQueryServerString @ 348 + glXGetClientString @ 349 + glPushClientAttrib @ 350 + glPopClientAttrib @ 351 + glIndexub @ 352 + glIndexubv @ 353 + glVertexPointer @ 354 + glNormalPointer @ 355 + glColorPointer @ 356 + glIndexPointer @ 357 + glTexCoordPointer @ 358 + glEdgeFlagPointer @ 359 + glGetPointerv @ 360 + glArrayElement @ 361 + glDrawArrays @ 362 + glDrawElements @ 363 + glInterleavedArrays @ 364 + glGenTextures @ 365 + glDeleteTextures @ 366 + glBindTexture @ 367 + glPrioritizeTextures @ 368 + glAreTexturesResident @ 369 + glIsTexture @ 370 + glTexSubImage1D @ 371 + glTexSubImage2D @ 372 + glCopyTexImage1D @ 373 + glCopyTexImage2D @ 374 + glCopyTexSubImage1D @ 375 + glCopyTexSubImage2D @ 376 +; glWindowPos2iMESA @ 377 +; glWindowPos2sMESA @ 378 +; glWindowPos2fMESA @ 379 +; glWindowPos2dMESA @ 380 +; glWindowPos2ivMESA @ 381 +; glWindowPos2svMESA @ 382 +; glWindowPos2fvMESA @ 383 +; glWindowPos2dvMESA @ 384 +; glWindowPos3iMESA @ 385 +; glWindowPos3sMESA @ 386 +; glWindowPos3fMESA @ 387 +; glWindowPos3dMESA @ 388 +; glWindowPos3ivMESA @ 389 +; glWindowPos3svMESA @ 390 +; glWindowPos3fvMESA @ 391 +; glWindowPos3dvMESA @ 392 +; glWindowPos4iMESA @ 393 +; glWindowPos4sMESA @ 394 +; glWindowPos4fMESA @ 395 +; glWindowPos4dMESA @ 396 +; glWindowPos4ivMESA @ 397 +; glWindowPos4svMESA @ 398 +; glWindowPos4fvMESA @ 399 +; glWindowPos4dvMESA @ 400 +; glXCreateGLXPixmapMESA @ 401 +; glXReleaseBuffersMESA @ 402 +; OSMesaGetCurrentContext @ 403 +; OSMesaPixelStore @ 404 +; OSMesaGetIntegerv @ 405 +; XMesaCreateVisual @ 406 +; XMesaDestroyVisual @ 407 +; XMesaCreateWindowBuffer @ 408 +; XMesaCreatePixmapBuffer @ 409 +; XMesaDestroyBuffer @ 410 +; XMesaGetCurrentBuffer @ 411 +; XMesaFlush @ 412 +; XMesaGetString @ 413 +; glPolygonOffsetEXT @ 414 + glDisableClientState @ 450 + glEnableClientState @ 451 + glXFreeContextEXT @ 452 + glXGetContextIDEXT @ 453 + glXGetCurrentDisplay @ 454 + glXImportContextEXT @ 455 + glXQueryContextInfoEXT @ 456 + glXGetCurrentDrawableEXT @ 457 Index: xc/lib/GL/GL/GLos2.rsp diff -u /dev/null xc/lib/GL/GL/GLos2.rsp:1.1 --- /dev/null Mon Jun 4 12:37:07 2001 +++ xc/lib/GL/GL/GLos2.rsp Thu Mar 22 16:47:56 2001 @@ -0,0 +1,6 @@ +glx\clientattrib.obj glx\compsize.obj glx\eval.obj glx\g_render.obj+ +glx\g_single.obj glx\g_vendpriv.obj glx\glxcmds.obj glx\glxext.obj+ +glx\pixel.obj glx\pixelstore.obj glx\render2.obj glx\renderpix.obj+ +glx\single2.obj glx\singlepix.obj glx\vertarr.obj /NOI /NOL /NOD /BAT +GL.dll +GL.map Index: xc/lib/GL/GL/Imakefile diff -u /dev/null xc/lib/GL/GL/Imakefile:1.7 --- /dev/null Mon Jun 4 12:37:07 2001 +++ xc/lib/GL/GL/Imakefile Mon Apr 2 22:29:31 2001 @@ -0,0 +1,243 @@ +XCOMM $XFree86: xc/lib/GL/GL/Imakefile,v 1.7 2001/04/03 02:29:31 dawes Exp $ + +#include + +#define DoNormalLib NormalLibGlx +#define DoSharedLib SharedLibGlx +#define DoExtraLib SharedLibGlx +#define DoDebugLib DebugLibGlx +#define DoProfileLib ProfileLibGlx + + LIBNAME = GL + SOREV = $(SOGLREV) + +#ifdef SharedGLReqs +BASEREQUIREDLIBS = SharedGLReqs +#endif + +#define MesaBuildDir $(GLXLIBSRC)/mesa/src/ +#include "../mesa/src/Imakefile.inc" +#define MesaX86BuildDir $(GLXLIBSRC)/mesa/src/X86/ +#ifdef i386Architecture +#include "../mesa/src/X86/Imakefile.inc" +#endif + +XCOMM +XCOMM Not related to ProfileLibGlx - I dont know how that works. KW. +XCOMM +#ifdef GlxSoProf + PROFSRC = lowpc.c highpc.c + PROFOBJ = lowpc.o highpc.o + +SubdirLibraryRule($(PROFOBJ)) +NormalLintTarget($(PROFSRC)) +#endif + +#if BuildXF86DRI && defined(i386Architecture) + GLAPI_OBJ = $(GLXLIBSRC)/glx/glapi_x86.o +#endif + + GLXOBJS = $(GLXLIBSRC)/glx/?*.o + GLXUOBJS = $(GLXLIBSRC)/glx/unshared/?*.o $(GLAPI_OBJ) + GLXDOBJS = $(GLXLIBSRC)/glx/debugger/?*.o $(GLAPI_OBJ) + GLXPOBJS = $(GLXLIBSRC)/glx/profiled/?*.o $(GLAPI_OBJ) + +#if BuildXF86DRI + DRIOBJS = $(GLXLIBSRC)/dri/XF86dri.o $(GLXLIBSRC)/dri/dri_glx.o + DRIUOBJS = $(GLXLIBSRC)/dri/unshared/XF86dri.o $(GLXLIBSRC)/dri/unshared/dri_glx.o + DRIDOBJS = $(GLXLIBSRC)/dri/debugger/XF86dri.o $(GLXLIBSRC)/dri/debugger/dri_glx.o + DRIPOBJS = $(GLXLIBSRC)/dri/profiled/XF86dri.o $(GLXLIBSRC)/dri/profiled/dri_glx.o + + DRMOBJS = $(GLXLIBSRC)/dri/drm/?*.o + DRMUOBJS = $(GLXLIBSRC)/dri/drm/unshared/?*.o + DRMDOBJS = $(GLXLIBSRC)/dri/drm/debugger/?*.o + DRMPOBJS = $(GLXLIBSRC)/dri/drm/profiled/?*.o + + MESAOBJS = $(COREMESAOBJS) $(MESA_ASM_OBJS) + MESAUOBJS = $(COREMESAUOBJS) $(MESA_ASM_UOBJS) + MESADOBJS = $(COREMESADOBJS) $(MESA_ASM_DOBJS) + MESAPOBJS = $(COREMESAPOBJS) $(MESA_ASM_POBJS) + + DRIMESAOBJS = $(GLXLIBSRC)/mesa/dri/?*.o +DRIMESAUOBJS = $(GLXLIBSRC)/mesa/dri/unshared/?*.o +DRIMESADOBJS = $(GLXLIBSRC)/mesa/dri/debugger/?*.o +DRIMESAPOBJS = $(GLXLIBSRC)/mesa/dri/profiled/?*.o + +#if GlxUseBuiltInDRIDriver +#include "../mesa/src/drv/common/Imakefile.inc" +#endif + + +#if GlxUseSGISI + +XCOMM nothing + +#elif GlxBuiltInGamma + +#define MesaDrvGammaBuildDir $(GLXLIBSRC)/mesa/src/drv/gamma/ +#include "../mesa/src/drv/gamma/Imakefile.inc" + + DRVOBJS = $(GAMMAOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS) + DRVUOBJS = $(GAMMAUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) + DRVDOBJS = $(GAMMADOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) + DRVPOBJS = $(GAMMAPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) + +#elif GlxBuiltInTdfx + +#define MesaDrvTdfxBuildDir $(GLXLIBSRC)/mesa/src/drv/tdfx/ +#include "../mesa/src/drv/tdfx/Imakefile.inc" + + DRVOBJS = $(TDFXOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS) + DRVUOBJS = $(TDFXUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) + DRVDOBJS = $(TDFXDOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) + DRVPOBJS = $(TDFXPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) + +OTHERREQUIREDLIBS = -lglide3 -ldl + +#elif GlxBuiltInI810 + +#define MesaDrvI810BuildDir $(GLXLIBSRC)/mesa/src/drv/i810/ +#include "../mesa/src/drv/i810/Imakefile.inc" + + DRVOBJS = $(I810OBJS) $(COMMONOBJS) $(MESAOBJS) $(DRIMESAOBJS) \ + $(DRMOBJS) + DRVUOBJS = $(I810UOBJS) $(COMMONUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) \ + $(DRMUOBJS) + DRVDOBJS = $(I810DOBJS) $(COMMONDOBJS) $(MESADOBJS) $(DRIMESADOBJS) \ + $(DRMDOBJS) + DRVPOBJS = $(I810POBJS) $(COMMONPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) \ + $(DRMPOBJS) + +#elif GlxBuiltInMga + +#define MesaDrvMgaBuildDir $(GLXLIBSRC)/mesa/src/drv/mga/ +#include "../mesa/src/drv/mga/Imakefile.inc" + + DRVOBJS = $(MGAOBJS) $(COMMONOBJS) $(MESAOBJS) $(DRIMESAOBJS) \ + $(DRMOBJS) + DRVUOBJS = $(MGAUOBJS) $(COMMONUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) \ + $(DRMUOBJS) + DRVDOBJS = $(MGADOBJS) $(COMMONDOBJS) $(MESADOBJS) $(DRIMESADOBJS) \ + $(DRMDOBJS) + DRVPOBJS = $(MGAPOBJS) $(COMMONPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) \ + $(DRMPOBJS) + +#elif GlxBuiltInR128 + +#define MesaDrvR128BuildDir $(GLXLIBSRC)/mesa/src/drv/r128/ +#include "../mesa/src/drv/r128/Imakefile.inc" + + DRVOBJS = $(R128OBJS) $(COMMONOBJS) $(MESAOBJS) $(DRIMESAOBJS) \ + $(DRMOBJS) + DRVUOBJS = $(R128UOBJS) $(COMMONUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) \ + $(DRMUOBJS) + DRVDOBJS = $(R128DOBJS) $(COMMONDOBJS) $(MESADOBJS) $(DRIMESADOBJS) \ + $(DRMDOBJS) + DRVPOBJS = $(R128POBJS) $(COMMONPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) \ + $(DRMPOBJS) + +#elif GlxBuiltInRadeon + +#define MesaDrvRadeonBuildDir $(GLXLIBSRC)/mesa/src/drv/radeon/ +#include "../mesa/src/drv/radeon/Imakefile.inc" + + DRVOBJS = $(RADEONOBJS) $(COMMONOBJS) $(MESAOBJS) $(DRIMESAOBJS) \ + $(DRMOBJS) + DRVUOBJS = $(RADEONUOBJS) $(COMMONUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) \ + $(DRMUOBJS) + DRVDOBJS = $(RADEONDOBJS) $(COMMONDOBJS) $(MESADOBJS) $(DRIMESADOBJS) \ + $(DRMDOBJS) + DRVPOBJS = $(RADEONPOBJS) $(COMMONPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) \ + $(DRMPOBJS) + +#elif GlxBuiltInFfb + +#define MesaDrvFfbBuildDir $(GLXLIBSRC)/mesa/src/drv/ffb/ +#include "../mesa/src/drv/ffb/Imakefile.inc" + + DRVOBJS = $(FFBOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS) + DRVUOBJS = $(FFBUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) + DRVDOBJS = $(FFBDOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) + DRVPOBJS = $(FFBPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) + +#elif GlxBuiltInSIS + +#define MesaDrvSisBuildDir $(GLXLIBSRC)/mesa/src/drv/sis/ +#include "../mesa/src/drv/sis/Imakefile.inc" + + DRVOBJS = $(SISOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS) + DRVUOBJS = $(SISUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) + DRVDOBJS = $(SISDOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) + DRVPOBJS = $(SISPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) + +#elif GlxBuiltInMesa + +#ifndef GlxDriverUsesMesa + + DRVOBJS = $(MESAOBJS) + DRVUOBJS = $(MESAUOBJS) + DRVDOBJS = $(MESADOBJS) + DRVPOBJS = $(MESAPOBJS) + +#endif + +#else + +XCOMM No built-in drivers. This is the usual case. + +#endif + +#endif /* BuildXF86DRI */ + +/* + * Note: DRIDIRS is empty for !BuildXF86DRI, and DRVSUBDIRS is empty + * for no built-in drivers. + */ + +REQUIREDLIBS = $(BASEREQUIREDLIBS) $(OTHERREQUIREDLIBS) + + OBJS = $(GLXOBJS) $(DRIOBJS) $(DRVOBJS) +#if HasSharedLibraries && !SharedLibGlxWithoutPIC + UOBJS = $(GLXUOBJS) $(DRIUOBJS) $(DRVUOBJS) +#else + UOBJS = $(OBJS) +#endif + DOBJS = $(GLXDOBJS) $(DRIDOBJS) $(DRVDOBJS) + POBJS = $(GLXPOBJS) $(DRIPOBJS) $(DRVPOBJS) + +#if LocalThreads + THREADOBJS = $(THREADS_LIBS) +#endif + +#include + +#undef _LinkBuildLibrary +#define _LinkBuildLibrary(lib) LinkBuildLibrary(lib) + + +#if NormalLibGlx +NormalLibraryTarget($(LIBNAME),$(UOBJS)) +InstallLibrary($(LIBNAME),$(USRLIBDIR)) +#endif +#if SharedLibGlx +SharedDepLibraryTarget($(LIBNAME),$(SOREV),$(OBJS),$(OBJS) $(THREADOBJS),.,.) +InstallSharedLibrary($(LIBNAME),$(SOREV),$(SHLIBDIR)) +#if LinkGLToUsrLib && AlternateUsrLibDir +install:: + MakeDir($(DESTDIR)$(SYSTEMUSRLIBDIR)) + $(RM) $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so + $(LN) $(SHLIBDIR)/lib$(LIBNAME).so $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so || true + $(RM) $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so.1 + $(LN) $(SHLIBDIR)/lib$(LIBNAME).so.1 $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so.1 || true +#endif +#endif +#if DebugLibGlx +DebuggedLibraryTarget($(LIBNAME),$(DOBJS)) +InstallLibrary($(LIBNAME)_d,$(USRLIBDIR)) +#endif +#if ProfileLibGlx +ProfiledLibraryTarget($(LIBNAME),$(POBJS)) +InstallLibrary($(LIBNAME)_p,$(USRLIBDIR)) +#endif + + Index: xc/lib/GL/dri/Imakefile diff -u xc/lib/GL/dri/Imakefile:1.5 xc/lib/GL/dri/Imakefile:1.9 --- xc/lib/GL/dri/Imakefile:1.5 Tue Feb 15 02:13:25 2000 +++ xc/lib/GL/dri/Imakefile Mon Apr 2 22:29:32 2001 @@ -1,9 +1,9 @@ -XCOMM $XFree86: xc/lib/GL/dri/Imakefile,v 1.5 2000/02/15 07:13:25 martin Exp $ +XCOMM $XFree86: xc/lib/GL/dri/Imakefile,v 1.9 2001/04/03 02:29:32 dawes Exp $ #include -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx +#define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) +#define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) #define DoExtraLib SharedLibGlx #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx @@ -15,9 +15,9 @@ #if !GlxUseSGISI DRI_SRCS = dri_glx.c DRI_OBJS = dri_glx.o - DRI_INCS = -I. -I../glx -I$(TOP)/include -I$(TOP)/include/GL \ - -I$(SERVERSRC)/GL/dri \ - -I../mesa/include -I../mesa/src -I../mesa/src/drv/gamma + DRI_INCS = -I. -I$(GLXLIBSRC)/glx -I$(INCLUDESRC) -I$(INCLUDESRC)/GL \ + -I$(XINCLUDESRC) -I$(SERVERSRC)/GL/dri \ + -I$(MESASRCDIR)/include -I$(MESASRCDIR)/src #endif #if GlxBuiltInTdfx @@ -51,3 +51,4 @@ DependSubdirs($(SUBDIRS)) DependTarget() + Index: xc/lib/GL/dri/dri_glx.c diff -u xc/lib/GL/dri/dri_glx.c:1.7 xc/lib/GL/dri/dri_glx.c:1.8 --- xc/lib/GL/dri/dri_glx.c:1.7 Tue Sep 26 11:56:45 2000 +++ xc/lib/GL/dri/dri_glx.c Tue Apr 10 12:07:49 2001 @@ -24,7 +24,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/lib/GL/dri/dri_glx.c,v 1.7 2000/09/26 15:56:45 tsi Exp $ */ +/* $XFree86: xc/lib/GL/dri/dri_glx.c,v 1.8 2001/04/10 16:07:49 dawes Exp $ */ /* * Authors: @@ -46,6 +46,7 @@ #include #include "dri_glx.h" #include +#include typedef void *(*CreateScreenFunc)(Display *dpy, int scrn, __DRIscreen *psc, @@ -68,6 +69,43 @@ #endif +static void InfoMessageF(const char *f, ...) +{ + va_list args; + const char *env; + + if ((env = getenv("LIBGL_DEBUG")) && strstr(env, "verbose")) { + fprintf(stderr, "libGL: "); + va_start(args, f); + vfprintf(stderr, f, args); + va_end(args); + } +} + +static void ErrorMessageF(const char *f, ...) +{ + va_list args; + + if (getenv("LIBGL_DEBUG")) { + fprintf(stderr, "libGL error: "); + va_start(args, f); + vfprintf(stderr, f, args); + va_end(args); + } +} + +static void PrintF(const char *f, ...) +{ + va_list args; + const char *env; + + if ((env = getenv("LIBGL_DEBUG")) && strstr(env, "verbose")) { + va_start(args, f); + vfprintf(stderr, f, args); + va_end(args); + } +} + static void ErrorMessage(const char *msg) { if (getenv("LIBGL_DEBUG")) { @@ -180,22 +218,19 @@ libPaths = DEFAULT_DRIVER_DIR; for (i = 0; ; i++) { - char libDir[1000], info[1000], realDriverName[100]; + char libDir[1000], realDriverName[200]; void *handle; ExtractDir(i, libPaths, 1000, libDir); if (!libDir[0]) return NULL; - sprintf(realDriverName, "%s/%s_dri.so", libDir, driverName); - sprintf(info, "trying %s", realDriverName); - InfoMessage(info); + snprintf(realDriverName, 200, "%s/%s_dri.so", libDir, driverName); + InfoMessageF("trying %s\n", realDriverName); handle = dlopen(realDriverName, RTLD_NOW | RTLD_GLOBAL); if (handle) { return handle; } else { - char message[1000]; - snprintf(message, 1000, "dlopen failed: %s", dlerror()); - ErrorMessage(message); + ErrorMessageF("dlopen failed: %s\n", dlerror()); } } @@ -246,9 +281,7 @@ b = XF86DRIGetClientDriverName(dpy, scrn, &driverMajor, &driverMinor, &driverPatch, &driverName); if (!b) { - char message[1000]; - snprintf(message, 1000, "Cannot determine driver name for screen %d", scrn); - ErrorMessage(message); + ErrorMessageF("Cannot determine driver name for screen %d\n", scrn); continue; } @@ -265,7 +298,7 @@ /* success! */ createFuncs[scrn] = createScreenFunc; libraryHandles[scrn] = handle; - break; /* onto the next screen */ + continue; /* onto the next screen */ } else { ErrorMessage("driCreateScreen() not defined in driver!"); @@ -366,7 +399,6 @@ static void register_extensions_on_screen(Display *dpy, int scrNum) { - GLboolean verbose = GL_FALSE; /* for debugging only */ int eventBase, errorBase; Bool b, b2; int driMajor, driMinor, driPatch; @@ -380,34 +412,29 @@ */ b = XF86DRIQueryExtension(dpy, &eventBase, &errorBase); if (!b) { - if (verbose) - fprintf(stderr, "XF86DRIQueryExtension failed\n"); + InfoMessage("XF86DRIQueryExtension failed"); return; } b = XF86DRIQueryDirectRenderingCapable(dpy, scrNum, &b2); if (!b || !b2) { - if (verbose) - fprintf(stderr, "XF86DRIQueryDirectRenderingCapable failed\n"); + InfoMessage("XF86DRIQueryDirectRenderingCapable failed"); return; } b = XF86DRIQueryVersion(dpy, &driMajor, &driMinor, &driPatch); if (!b) { - if (verbose) - fprintf(stderr, "XF86DRIQueryVersion failed\n"); - return; + InfoMessage("XF86DRIQueryVersion failed"); } b = XF86DRIGetClientDriverName(dpy, scrNum, &driverMajor, &driverMinor, &driverPatch, &driverName); if (!b) { - if (verbose) - fprintf(stderr, "XF86DRIGetClientDriverName failed\n"); + InfoMessage("XF86DRIGetClientDriverName failed"); return; } - else if (verbose) { - printf("XF86DRIGetClientDriverName: %d.%d.%d %s\n", driverMajor, + else { + InfoMessageF("XF86DRIGetClientDriverName: %d.%d.%d %s\n", driverMajor, driverMinor, driverPatch, driverName); } @@ -446,8 +473,10 @@ __glXRegisterExtensions(void) { static GLboolean alreadyCalled = GL_FALSE; - if (alreadyCalled) + + if (alreadyCalled) { return; + } #ifndef BUILT_IN_DRI_DRIVER { Index: xc/lib/GL/dri/xf86dristr.h diff -u xc/lib/GL/dri/xf86dristr.h:1.7 xc/lib/GL/dri/xf86dristr.h:1.9 --- xc/lib/GL/dri/xf86dristr.h:1.7 Thu Dec 7 15:26:02 2000 +++ xc/lib/GL/dri/xf86dristr.h Wed Mar 21 11:01:08 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/dri/xf86dristr.h,v 1.7 2000/12/07 20:26:02 dawes Exp $ */ +/* $XFree86: xc/lib/GL/dri/xf86dristr.h,v 1.9 2001/03/21 16:01:08 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -42,7 +42,7 @@ #define XF86DRINAME "XFree86-DRI" -#define XF86DRI_MAJOR_VERSION 3 /* current version numbers */ +#define XF86DRI_MAJOR_VERSION 4 /* current version numbers */ #define XF86DRI_MINOR_VERSION 0 #define XF86DRI_PATCH_VERSION 0 Index: xc/lib/GL/dri/drm/Imakefile diff -u xc/lib/GL/dri/drm/Imakefile:1.10 xc/lib/GL/dri/drm/Imakefile:1.16 --- xc/lib/GL/dri/drm/Imakefile:1.10 Sun Sep 24 09:51:00 2000 +++ xc/lib/GL/dri/drm/Imakefile Mon Apr 23 15:02:11 2001 @@ -1,24 +1,33 @@ -XCOMM $XFree86: xc/lib/GL/dri/drm/Imakefile,v 1.10 2000/09/24 13:51:00 alanh Exp $ +XCOMM $XFree86: xc/lib/GL/dri/drm/Imakefile,v 1.16 2001/04/23 19:02:11 alanh Exp $ -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx +#if GlxUseBuiltInDRIDriver +#define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) +#define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) #define DoExtraLib SharedLibGlx #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx +#else +#define DoNormalLib SharedLibGlxWithoutPIC +#define DoSharedLib !SharedLibGlxWithoutPIC +#define DoExtraLib NO +#define DoDebugLib NO +#define DoProfileLib NO +#endif #if Malloc0ReturnsNull ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL #endif DEFINES = $(ALLOC_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) -I. \ + INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) \ -I$(XF86OSSRC)/$(OS_SUBDIR)/drm \ -I$(XF86OSSRC)/$(OS_SUBDIR)/drm/kernel \ + -I$(XF86OSSRC)/$(OS_SUBDIR2)/drm/kernel \ -I$(XF86OSSRC) SRCS = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c \ - xf86drmR128.c + xf86drmMga.c xf86drmR128.c xf86drmRadeon.c OBJS = xf86drm.o xf86drmHash.o xf86drmRandom.o xf86drmSL.o \ - xf86drmR128.o + xf86drmMga.o xf86drmR128.o xf86drmRadeon.o #if defined(LinuxArchitecture) OS_SUBDIR = linux @@ -32,17 +41,21 @@ OS_SUBDIR = cygwin OS_SUBDIR2 = cygwin #endif + +LinkSourceFile(xf86drm.c,$(XF86OSSRC)/$(OS_SUBDIR2)/drm) -LinkSourceFile(xf86drm.c,$(XF86OSSRC)/$(OS_SUBDIR)/drm) LinkSourceFile(xf86drmHash.c,$(XF86OSSRC)/$(OS_SUBDIR2)/drm) LinkSourceFile(xf86drmRandom.c,$(XF86OSSRC)/$(OS_SUBDIR2)/drm) LinkSourceFile(xf86drmSL.c,$(XF86OSSRC)/$(OS_SUBDIR2)/drm) +LinkSourceFile(xf86drmMga.c,$(XF86OSSRC)/$(OS_SUBDIR2)/drm) LinkSourceFile(xf86drmR128.c,$(XF86OSSRC)/$(OS_SUBDIR2)/drm) +LinkSourceFile(xf86drmRadeon.c,$(XF86OSSRC)/$(OS_SUBDIR2)/drm) LinkSourceFile(drm.h,$(XF86OSSRC)/$(OS_SUBDIR2)/drm/kernel) LinkSourceFile(i810_drm.h,$(XF86OSSRC)/$(OS_SUBDIR2)/drm/kernel) LinkSourceFile(mga_drm.h,$(XF86OSSRC)/$(OS_SUBDIR2)/drm/kernel) LinkSourceFile(r128_drm.h,$(XF86OSSRC)/$(OS_SUBDIR2)/drm/kernel) +LinkSourceFile(radeon_drm.h,$(XF86OSSRC)/$(OS_SUBDIR2)/drm/kernel) LinkSourceFile(sis_drm.h,$(XF86OSSRC)/$(OS_SUBDIR2)/drm/kernel) #include Index: xc/lib/GL/glx/Imakefile diff -u xc/lib/GL/glx/Imakefile:1.11 xc/lib/GL/glx/Imakefile:1.14 --- xc/lib/GL/glx/Imakefile:1.11 Tue Aug 1 16:28:38 2000 +++ xc/lib/GL/glx/Imakefile Mon Apr 2 22:29:32 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/glx/Imakefile,v 1.11 2000/08/01 20:28:38 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/glx/Imakefile,v 1.14 2001/04/03 02:29:32 dawes Exp $ XCOMM The contents of this file are subject to the GLX Public License Version 1.0 XCOMM (the "License"). You may not use this file except in compliance with the XCOMM License. You may obtain a copy of the License at Silicon Graphics, Inc., @@ -18,8 +18,8 @@ #include -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx +#define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) +#define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) #define DoExtraLib SharedLibGlx #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx @@ -31,18 +31,15 @@ XCOMM glu \ XCOMM glw +# Files from Mesa + LinkSourceFile(glapi.c, $(MESASRCDIR)/src) -LinkSourceFile(glapi.h, $(MESASRCDIR)/src) LinkSourceFile(glapinoop.c, $(MESASRCDIR)/src) -LinkSourceFile(glapinoop.h, $(MESASRCDIR)/src) -LinkSourceFile(glapioffsets.h, $(MESASRCDIR)/src) -LinkSourceFile(glapitable.h, $(MESASRCDIR)/src) -LinkSourceFile(glapitemp.h, $(MESASRCDIR)/src) -LinkSourceFile(glheader.h, $(MESASRCDIR)/src) LinkSourceFile(glthread.c, $(MESASRCDIR)/src) -LinkSourceFile(glthread.h, $(MESASRCDIR)/src) LinkSourceFile(glapi_x86.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(assyntax.h, $(MESASRCDIR)/src/X86) + +# Maybe some of these could come from +# xc/extras/ogl-sample/main/glx/lib at some point. GLX_SRCS = \ clientattrib.c \ @@ -93,7 +90,7 @@ GLX_DEFS = GlxDefines #if BuildXF86DRI - DRI_INCS = -I../dri + DRI_INCS = -I$(GLXLIBSRC)/dri #if defined(i386Architecture) ASM_SRCS = glapi_x86.S ASM_OBJS = glapi_x86.o @@ -105,11 +102,14 @@ OBJS = $(GLX_OBJS) $(ASM_OBJS) DEFINES = $(GLX_DEFS) $(ASM_DEFS) - INCLUDES = -I$(TOP)/include \ - -I$(TOP)/include/extensions \ - -I$(TOP)/include/GL \ - -I$(INCLUDESRC) \ - -I../mesa/src \ + INCLUDES = -I$(INCLUDESRC) \ + -I$(XINCLUDESRC) \ + -I$(EXTINCSRC) \ + -I$(INCLUDESRC)/GL \ + -I$(GLXLIBSRC)/glx \ + -I$(MESASRCDIR)/src \ + -I$(MESASRCDIR)/src/X86 \ + -I$(MESASRCDIR)/include \ $(DRI_INCS) #include @@ -122,10 +122,5 @@ SubdirLibraryRule($(OBJS)) NormalLintTarget($(SRCS)) - -#if 0 -XCOMM MakeSubdirs($(SUBDIRS)) -XCOMM DependSubdirs($(SUBDIRS)) -#endif DependTarget() Index: xc/lib/GL/glx/clientattrib.c diff -u xc/lib/GL/glx/clientattrib.c:1.4 xc/lib/GL/glx/clientattrib.c:1.5 --- xc/lib/GL/glx/clientattrib.c:1.4 Fri Feb 18 11:23:09 2000 +++ xc/lib/GL/glx/clientattrib.c Wed Mar 21 11:04:39 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/lib/GL/glx/clientattrib.c,v 1.4 2000/02/18 16:23:09 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/clientattrib.c,v 1.5 2001/03/21 16:04:39 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #include @@ -32,22 +46,22 @@ switch (array) { case GL_COLOR_ARRAY: - gc->state.vertArray.colorEnable = GL_TRUE; + gc->state.vertArray.color.enable = GL_TRUE; break; case GL_EDGE_FLAG_ARRAY: - gc->state.vertArray.edgeFlagEnable = GL_TRUE; + gc->state.vertArray.edgeFlag.enable = GL_TRUE; break; case GL_INDEX_ARRAY: - gc->state.vertArray.indexEnable = GL_TRUE; + gc->state.vertArray.index.enable = GL_TRUE; break; case GL_NORMAL_ARRAY: - gc->state.vertArray.normalEnable = GL_TRUE; + gc->state.vertArray.normal.enable = GL_TRUE; break; case GL_TEXTURE_COORD_ARRAY: - gc->state.vertArray.texCoordEnable = GL_TRUE; + gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].enable = GL_TRUE; break; case GL_VERTEX_ARRAY: - gc->state.vertArray.vertexEnable = GL_TRUE; + gc->state.vertArray.vertex.enable = GL_TRUE; break; default: __glXSetError(gc, GL_INVALID_ENUM); @@ -60,22 +74,22 @@ switch (array) { case GL_COLOR_ARRAY: - gc->state.vertArray.colorEnable = GL_FALSE; + gc->state.vertArray.color.enable = GL_FALSE; break; case GL_EDGE_FLAG_ARRAY: - gc->state.vertArray.edgeFlagEnable = GL_FALSE; + gc->state.vertArray.edgeFlag.enable = GL_FALSE; break; case GL_INDEX_ARRAY: - gc->state.vertArray.indexEnable = GL_FALSE; + gc->state.vertArray.index.enable = GL_FALSE; break; case GL_NORMAL_ARRAY: - gc->state.vertArray.normalEnable = GL_FALSE; + gc->state.vertArray.normal.enable = GL_FALSE; break; case GL_TEXTURE_COORD_ARRAY: - gc->state.vertArray.texCoordEnable = GL_FALSE; + gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].enable = GL_FALSE; break; case GL_VERTEX_ARRAY: - gc->state.vertArray.vertexEnable = GL_FALSE; + gc->state.vertArray.vertex.enable = GL_FALSE; break; default: __glXSetError(gc, GL_INVALID_ENUM); Index: xc/lib/GL/glx/compsize.c diff -u xc/lib/GL/glx/compsize.c:1.2 xc/lib/GL/glx/compsize.c:1.3 --- xc/lib/GL/glx/compsize.c:1.2 Mon Jun 14 03:23:34 1999 +++ xc/lib/GL/glx/compsize.c Wed Mar 21 11:04:39 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/lib/GL/glx/compsize.c,v 1.2 1999/06/14 07:23:34 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/compsize.c,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #include @@ -106,15 +120,36 @@ case GL_UNSIGNED_BYTE: esize = 1; break; + case GL_UNSIGNED_BYTE_3_3_2: + case GL_UNSIGNED_BYTE_2_3_3_REV: + esize = 1; + elements = 1; + break; case GL_SHORT: case GL_UNSIGNED_SHORT: esize = 2; break; + case GL_UNSIGNED_SHORT_5_6_5: + case GL_UNSIGNED_SHORT_5_6_5_REV: + case GL_UNSIGNED_SHORT_4_4_4_4: + case GL_UNSIGNED_SHORT_4_4_4_4_REV: + case GL_UNSIGNED_SHORT_5_5_5_1: + case GL_UNSIGNED_SHORT_1_5_5_5_REV: + esize = 2; + elements = 1; + break; case GL_INT: case GL_UNSIGNED_INT: case GL_FLOAT: esize = 4; break; + case GL_UNSIGNED_INT_8_8_8_8: + case GL_UNSIGNED_INT_8_8_8_8_REV: + case GL_UNSIGNED_INT_10_10_10_2: + case GL_UNSIGNED_INT_2_10_10_10_REV: + esize = 4; + elements = 1; + break; default: return 0; } @@ -154,11 +189,19 @@ switch (e) { case GL_TEXTURE_WRAP_S: case GL_TEXTURE_WRAP_T: + case GL_TEXTURE_WRAP_R: case GL_TEXTURE_MIN_FILTER: case GL_TEXTURE_MAG_FILTER: return 1; case GL_TEXTURE_BORDER_COLOR: return 4; + case GL_TEXTURE_PRIORITY: + return 1; + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + return 1; default: return 0; } @@ -226,15 +269,36 @@ case GL_UNSIGNED_BYTE: esize = 1; break; + case GL_UNSIGNED_BYTE_3_3_2: + case GL_UNSIGNED_BYTE_2_3_3_REV: + esize = 1; + elements = 1; + break; case GL_SHORT: case GL_UNSIGNED_SHORT: esize = 2; break; + case GL_UNSIGNED_SHORT_5_6_5: + case GL_UNSIGNED_SHORT_5_6_5_REV: + case GL_UNSIGNED_SHORT_4_4_4_4: + case GL_UNSIGNED_SHORT_4_4_4_4_REV: + case GL_UNSIGNED_SHORT_5_5_5_1: + case GL_UNSIGNED_SHORT_1_5_5_5_REV: + esize = 2; + elements = 1; + break; case GL_INT: case GL_UNSIGNED_INT: case GL_FLOAT: esize = 4; break; + case GL_UNSIGNED_INT_8_8_8_8: + case GL_UNSIGNED_INT_8_8_8_8_REV: + case GL_UNSIGNED_INT_10_10_10_2: + case GL_UNSIGNED_INT_2_10_10_10_REV: + esize = 4; + elements = 1; + break; default: return 0; } @@ -282,21 +346,121 @@ case GL_UNSIGNED_BYTE: esize = 1; break; + case GL_UNSIGNED_BYTE_3_3_2: + case GL_UNSIGNED_BYTE_2_3_3_REV: + esize = 1; + elements = 1; + break; case GL_SHORT: case GL_UNSIGNED_SHORT: esize = 2; break; + case GL_UNSIGNED_SHORT_5_6_5: + case GL_UNSIGNED_SHORT_5_6_5_REV: + case GL_UNSIGNED_SHORT_4_4_4_4: + case GL_UNSIGNED_SHORT_4_4_4_4_REV: + case GL_UNSIGNED_SHORT_5_5_5_1: + case GL_UNSIGNED_SHORT_1_5_5_5_REV: + esize = 2; + elements = 1; + break; case GL_INT: case GL_UNSIGNED_INT: case GL_FLOAT: esize = 4; break; + case GL_UNSIGNED_INT_8_8_8_8: + case GL_UNSIGNED_INT_8_8_8_8_REV: + case GL_UNSIGNED_INT_10_10_10_2: + case GL_UNSIGNED_INT_2_10_10_10_REV: + esize = 4; + elements = 1; + break; default: return 0; } return (elements * esize * w * h); } +GLint __glTexImage3D_size(GLenum format, GLenum type, GLsizei w, GLsizei h, + GLsizei d) +{ + GLint elements, esize; + + if (w < 0) return 0; + if (h < 0) return 0; + if (d < 0) return 0; + switch (format) { + case GL_COLOR_INDEX: + elements = 1; + break; + case GL_RED: + case GL_GREEN: + case GL_BLUE: + case GL_ALPHA: + case GL_LUMINANCE: + elements = 1; + break; + case GL_LUMINANCE_ALPHA: + elements = 2; + break; + case GL_RGB: + elements = 3; + break; + case GL_RGBA: + case GL_ABGR_EXT: + elements = 4; + break; + default: + return 0; + } + switch (type) { + case GL_BITMAP: + if (format == GL_COLOR_INDEX) { + return (d * (h * ((w+7)/8))); + } else { + return 0; + } + case GL_BYTE: + case GL_UNSIGNED_BYTE: + esize = 1; + break; + case GL_UNSIGNED_BYTE_3_3_2: + case GL_UNSIGNED_BYTE_2_3_3_REV: + esize = 1; + elements = 1; + break; + case GL_SHORT: + case GL_UNSIGNED_SHORT: + esize = 2; + break; + case GL_UNSIGNED_SHORT_5_6_5: + case GL_UNSIGNED_SHORT_5_6_5_REV: + case GL_UNSIGNED_SHORT_4_4_4_4: + case GL_UNSIGNED_SHORT_4_4_4_4_REV: + case GL_UNSIGNED_SHORT_5_5_5_1: + case GL_UNSIGNED_SHORT_1_5_5_5_REV: + esize = 2; + elements = 1; + break; + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + esize = 4; + break; + case GL_UNSIGNED_INT_8_8_8_8: + case GL_UNSIGNED_INT_8_8_8_8_REV: + case GL_UNSIGNED_INT_10_10_10_2: + case GL_UNSIGNED_INT_2_10_10_10_REV: + esize = 4; + elements = 1; + break; + default: + return 0; + } + return (elements * esize * w * h * d); +} + GLint __glLightfv_size(GLenum pname) { switch (pname) { @@ -326,6 +490,7 @@ case GL_LIGHT_MODEL_AMBIENT: return 4; case GL_LIGHT_MODEL_LOCAL_VIEWER: return 1; case GL_LIGHT_MODEL_TWO_SIDE: return 1; + case GL_LIGHT_MODEL_COLOR_CONTROL: return 1; default: return 0; } @@ -356,3 +521,46 @@ return __glMaterialfv_size(pname); } +GLint __glColorTableParameterfv_size(GLenum pname) +{ + switch (pname) { + case GL_COLOR_TABLE_FORMAT: + case GL_COLOR_TABLE_WIDTH: + case GL_COLOR_TABLE_RED_SIZE: + case GL_COLOR_TABLE_GREEN_SIZE: + case GL_COLOR_TABLE_BLUE_SIZE: + case GL_COLOR_TABLE_ALPHA_SIZE: + case GL_COLOR_TABLE_LUMINANCE_SIZE: + case GL_COLOR_TABLE_INTENSITY_SIZE: + return 1; + case GL_COLOR_TABLE_SCALE: + case GL_COLOR_TABLE_BIAS: + return 4; + default: + return -1; + } +} + +GLint __glColorTableParameteriv_size(GLenum pname) +{ + return __glColorTableParameterfv_size(pname); +} + +GLint __glConvolutionParameterfv_size(GLenum pname) +{ + switch(pname) { + case GL_CONVOLUTION_BORDER_MODE: + return 1; + case GL_CONVOLUTION_BORDER_COLOR: + case GL_CONVOLUTION_FILTER_SCALE: + case GL_CONVOLUTION_FILTER_BIAS: + return 4; + default: /* error: bad enum value */ + return -1; + } +} + +GLint __glConvolutionParameteriv_size(GLenum pname) +{ + return __glConvolutionParameterfv_size(pname); +} Index: xc/lib/GL/glx/dispatch.c diff -u xc/lib/GL/glx/dispatch.c:1.2 xc/lib/GL/glx/dispatch.c:1.3 --- xc/lib/GL/glx/dispatch.c:1.2 Tue Feb 15 14:19:18 2000 +++ xc/lib/GL/glx/dispatch.c Wed Mar 21 11:04:39 2001 @@ -1,3 +1,4 @@ +/* $XFree86: xc/lib/GL/glx/dispatch.c,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Index: xc/lib/GL/glx/eval.c diff -u xc/lib/GL/glx/eval.c:1.2 xc/lib/GL/glx/eval.c:1.3 --- xc/lib/GL/glx/eval.c:1.2 Mon Jun 14 03:23:35 1999 +++ xc/lib/GL/glx/eval.c Wed Mar 21 11:04:39 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/lib/GL/glx/eval.c,v 1.2 1999/06/14 07:23:35 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/eval.c,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #include "packrender.h" Index: xc/lib/GL/glx/g_render.c diff -u xc/lib/GL/glx/g_render.c:1.2 xc/lib/GL/glx/g_render.c:1.3 --- xc/lib/GL/glx/g_render.c:1.2 Mon Jun 14 03:23:35 1999 +++ xc/lib/GL/glx/g_render.c Wed Mar 21 11:04:39 2001 @@ -1,21 +1,31 @@ -/* $XFree86: xc/lib/GL/glx/g_render.c,v 1.2 1999/06/14 07:23:35 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/g_render.c,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. +** http://oss.sgi.com/projects/FreeB ** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: This software was created using the +** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has +** not been independently verified as being compliant with the OpenGL(R) +** version 1.2.1 Specification. */ #include "packrender.h" @@ -2801,5 +2811,588 @@ __GLX_BEGIN(X_GLrop_Indexubv,8); __GLX_PUT_CHAR(4,c[0]); __GLX_END(8); +} + +void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_BlendColor,20); + __GLX_PUT_FLOAT(4,red); + __GLX_PUT_FLOAT(8,green); + __GLX_PUT_FLOAT(12,blue); + __GLX_PUT_FLOAT(16,alpha); + __GLX_END(20); +} + +void glBlendEquation(GLenum mode) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_BlendEquation,8); + __GLX_PUT_LONG(4,mode); + __GLX_END(8); +} + +void glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params) +{ + __GLX_DECLARE_VARIABLES(); + compsize = __glColorTableParameterfv_size(pname); + __GLX_LOAD_VARIABLES(); + cmdlen = 12+compsize*4; + __GLX_BEGIN(X_GLrop_ColorTableParameterfv,cmdlen); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,pname); + __GLX_PUT_FLOAT_ARRAY(12,params,compsize); + __GLX_END(cmdlen); +} + +void glColorTableParameteriv(GLenum target, GLenum pname, const GLint *params) +{ + __GLX_DECLARE_VARIABLES(); + compsize = __glColorTableParameteriv_size(pname); + __GLX_LOAD_VARIABLES(); + cmdlen = 12+compsize*4; + __GLX_BEGIN(X_GLrop_ColorTableParameteriv,cmdlen); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,pname); + __GLX_PUT_LONG_ARRAY(12,params,compsize); + __GLX_END(cmdlen); +} + +void glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_CopyColorTable,24); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,internalformat); + __GLX_PUT_LONG(12,x); + __GLX_PUT_LONG(16,y); + __GLX_PUT_LONG(20,width); + __GLX_END(24); +} + +void glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_CopyColorSubTable,24); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,start); + __GLX_PUT_LONG(12,x); + __GLX_PUT_LONG(16,y); + __GLX_PUT_LONG(20,width); + __GLX_END(24); +} + +void glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_ConvolutionParameterf,16); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,pname); + __GLX_PUT_FLOAT(12,params); + __GLX_END(16); +} + +void glConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params) +{ + __GLX_DECLARE_VARIABLES(); + compsize = __glConvolutionParameterfv_size(pname); + __GLX_LOAD_VARIABLES(); + cmdlen = 12+compsize*4; + __GLX_BEGIN(X_GLrop_ConvolutionParameterfv,cmdlen); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,pname); + __GLX_PUT_FLOAT_ARRAY(12,params,compsize); + __GLX_END(cmdlen); +} + +void glConvolutionParameteri(GLenum target, GLenum pname, GLint params) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_ConvolutionParameteri,16); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,pname); + __GLX_PUT_LONG(12,params); + __GLX_END(16); +} + +void glConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params) +{ + __GLX_DECLARE_VARIABLES(); + compsize = __glConvolutionParameteriv_size(pname); + __GLX_LOAD_VARIABLES(); + cmdlen = 12+compsize*4; + __GLX_BEGIN(X_GLrop_ConvolutionParameteriv,cmdlen); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,pname); + __GLX_PUT_LONG_ARRAY(12,params,compsize); + __GLX_END(cmdlen); +} + +void glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_CopyConvolutionFilter1D,24); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,internalformat); + __GLX_PUT_LONG(12,x); + __GLX_PUT_LONG(16,y); + __GLX_PUT_LONG(20,width); + __GLX_END(24); +} + +void glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_CopyConvolutionFilter2D,28); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,internalformat); + __GLX_PUT_LONG(12,x); + __GLX_PUT_LONG(16,y); + __GLX_PUT_LONG(20,width); + __GLX_PUT_LONG(24,height); + __GLX_END(28); +} + +void glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_Histogram,20); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,width); + __GLX_PUT_LONG(12,internalformat); + __GLX_PUT_CHAR(16,sink); + __GLX_END(20); +} + +void glMinmax(GLenum target, GLenum internalformat, GLboolean sink) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_Minmax,16); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,internalformat); + __GLX_PUT_CHAR(12,sink); + __GLX_END(16); +} + +void glResetHistogram(GLenum target) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_ResetHistogram,8); + __GLX_PUT_LONG(4,target); + __GLX_END(8); +} + +void glResetMinmax(GLenum target) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_ResetMinmax,8); + __GLX_PUT_LONG(4,target); + __GLX_END(8); +} + +void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_CopyTexSubImage3D,40); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,level); + __GLX_PUT_LONG(12,xoffset); + __GLX_PUT_LONG(16,yoffset); + __GLX_PUT_LONG(20,zoffset); + __GLX_PUT_LONG(24,x); + __GLX_PUT_LONG(28,y); + __GLX_PUT_LONG(32,width); + __GLX_PUT_LONG(36,height); + __GLX_END(40); +} + +void glActiveTextureARB(GLenum texture) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_ActiveTextureARB,8); + __GLX_PUT_LONG(4,texture); + __GLX_END(8); +} + +void glMultiTexCoord1dARB(GLenum target, GLdouble s) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord1dvARB,16); + __GLX_PUT_DOUBLE(4,s); + __GLX_PUT_LONG(12,target); + __GLX_END(16); +} + +void glMultiTexCoord1dvARB(GLenum target, const GLdouble *v) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord1dvARB,16); + __GLX_PUT_DOUBLE(4,v[0]); + __GLX_PUT_LONG(12,target); + __GLX_END(16); +} + +void glMultiTexCoord1fARB(GLenum target, GLfloat s) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord1fvARB,12); + __GLX_PUT_LONG(4,target); + __GLX_PUT_FLOAT(8,s); + __GLX_END(12); +} + +void glMultiTexCoord1fvARB(GLenum target, const GLfloat *v) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord1fvARB,12); + __GLX_PUT_LONG(4,target); + __GLX_PUT_FLOAT(8,v[0]); + __GLX_END(12); +} + +void glMultiTexCoord1iARB(GLenum target, GLint s) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord1ivARB,12); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,s); + __GLX_END(12); +} + +void glMultiTexCoord1ivARB(GLenum target, const GLint *v) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord1ivARB,12); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,v[0]); + __GLX_END(12); +} + +void glMultiTexCoord1sARB(GLenum target, GLshort s) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord1svARB,12); + __GLX_PUT_LONG(4,target); + __GLX_PUT_SHORT(8,s); + __GLX_END(12); +} + +void glMultiTexCoord1svARB(GLenum target, const GLshort *v) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord1svARB,12); + __GLX_PUT_LONG(4,target); + __GLX_PUT_SHORT(8,v[0]); + __GLX_END(12); +} + +void glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord2dvARB,24); + __GLX_PUT_DOUBLE(4,s); + __GLX_PUT_DOUBLE(12,t); + __GLX_PUT_LONG(20,target); + __GLX_END(24); +} + +void glMultiTexCoord2dvARB(GLenum target, const GLdouble *v) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord2dvARB,24); + __GLX_PUT_DOUBLE(4,v[0]); + __GLX_PUT_DOUBLE(12,v[1]); + __GLX_PUT_LONG(20,target); + __GLX_END(24); +} + +void glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord2fvARB,16); + __GLX_PUT_LONG(4,target); + __GLX_PUT_FLOAT(8,s); + __GLX_PUT_FLOAT(12,t); + __GLX_END(16); +} + +void glMultiTexCoord2fvARB(GLenum target, const GLfloat *v) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord2fvARB,16); + __GLX_PUT_LONG(4,target); + __GLX_PUT_FLOAT(8,v[0]); + __GLX_PUT_FLOAT(12,v[1]); + __GLX_END(16); +} + +void glMultiTexCoord2iARB(GLenum target, GLint s, GLint t) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord2ivARB,16); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,s); + __GLX_PUT_LONG(12,t); + __GLX_END(16); +} + +void glMultiTexCoord2ivARB(GLenum target, const GLint *v) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord2ivARB,16); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,v[0]); + __GLX_PUT_LONG(12,v[1]); + __GLX_END(16); +} + +void glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord2svARB,12); + __GLX_PUT_LONG(4,target); + __GLX_PUT_SHORT(8,s); + __GLX_PUT_SHORT(10,t); + __GLX_END(12); +} + +void glMultiTexCoord2svARB(GLenum target, const GLshort *v) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord2svARB,12); + __GLX_PUT_LONG(4,target); + __GLX_PUT_SHORT(8,v[0]); + __GLX_PUT_SHORT(10,v[1]); + __GLX_END(12); +} + +void glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord3dvARB,32); + __GLX_PUT_DOUBLE(4,s); + __GLX_PUT_DOUBLE(12,t); + __GLX_PUT_DOUBLE(20,r); + __GLX_PUT_LONG(28,target); + __GLX_END(32); +} + +void glMultiTexCoord3dvARB(GLenum target, const GLdouble *v) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord3dvARB,32); + __GLX_PUT_DOUBLE(4,v[0]); + __GLX_PUT_DOUBLE(12,v[1]); + __GLX_PUT_DOUBLE(20,v[2]); + __GLX_PUT_LONG(28,target); + __GLX_END(32); +} + +void glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord3fvARB,20); + __GLX_PUT_LONG(4,target); + __GLX_PUT_FLOAT(8,s); + __GLX_PUT_FLOAT(12,t); + __GLX_PUT_FLOAT(16,r); + __GLX_END(20); +} + +void glMultiTexCoord3fvARB(GLenum target, const GLfloat *v) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord3fvARB,20); + __GLX_PUT_LONG(4,target); + __GLX_PUT_FLOAT(8,v[0]); + __GLX_PUT_FLOAT(12,v[1]); + __GLX_PUT_FLOAT(16,v[2]); + __GLX_END(20); +} + +void glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord3ivARB,20); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,s); + __GLX_PUT_LONG(12,t); + __GLX_PUT_LONG(16,r); + __GLX_END(20); +} + +void glMultiTexCoord3ivARB(GLenum target, const GLint *v) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord3ivARB,20); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,v[0]); + __GLX_PUT_LONG(12,v[1]); + __GLX_PUT_LONG(16,v[2]); + __GLX_END(20); +} + +void glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord3svARB,16); + __GLX_PUT_LONG(4,target); + __GLX_PUT_SHORT(8,s); + __GLX_PUT_SHORT(10,t); + __GLX_PUT_SHORT(12,r); + __GLX_END(16); +} + +void glMultiTexCoord3svARB(GLenum target, const GLshort *v) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord3svARB,16); + __GLX_PUT_LONG(4,target); + __GLX_PUT_SHORT(8,v[0]); + __GLX_PUT_SHORT(10,v[1]); + __GLX_PUT_SHORT(12,v[2]); + __GLX_END(16); +} + +void glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord4dvARB,40); + __GLX_PUT_DOUBLE(4,s); + __GLX_PUT_DOUBLE(12,t); + __GLX_PUT_DOUBLE(20,r); + __GLX_PUT_DOUBLE(28,q); + __GLX_PUT_LONG(36,target); + __GLX_END(40); +} + +void glMultiTexCoord4dvARB(GLenum target, const GLdouble *v) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord4dvARB,40); + __GLX_PUT_DOUBLE(4,v[0]); + __GLX_PUT_DOUBLE(12,v[1]); + __GLX_PUT_DOUBLE(20,v[2]); + __GLX_PUT_DOUBLE(28,v[3]); + __GLX_PUT_LONG(36,target); + __GLX_END(40); +} + +void glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord4fvARB,24); + __GLX_PUT_LONG(4,target); + __GLX_PUT_FLOAT(8,s); + __GLX_PUT_FLOAT(12,t); + __GLX_PUT_FLOAT(16,r); + __GLX_PUT_FLOAT(20,q); + __GLX_END(24); +} + +void glMultiTexCoord4fvARB(GLenum target, const GLfloat *v) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord4fvARB,24); + __GLX_PUT_LONG(4,target); + __GLX_PUT_FLOAT(8,v[0]); + __GLX_PUT_FLOAT(12,v[1]); + __GLX_PUT_FLOAT(16,v[2]); + __GLX_PUT_FLOAT(20,v[3]); + __GLX_END(24); +} + +void glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord4ivARB,24); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,s); + __GLX_PUT_LONG(12,t); + __GLX_PUT_LONG(16,r); + __GLX_PUT_LONG(20,q); + __GLX_END(24); +} + +void glMultiTexCoord4ivARB(GLenum target, const GLint *v) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord4ivARB,24); + __GLX_PUT_LONG(4,target); + __GLX_PUT_LONG(8,v[0]); + __GLX_PUT_LONG(12,v[1]); + __GLX_PUT_LONG(16,v[2]); + __GLX_PUT_LONG(20,v[3]); + __GLX_END(24); +} + +void glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord4svARB,16); + __GLX_PUT_LONG(4,target); + __GLX_PUT_SHORT(8,s); + __GLX_PUT_SHORT(10,t); + __GLX_PUT_SHORT(12,r); + __GLX_PUT_SHORT(14,q); + __GLX_END(16); +} + +void glMultiTexCoord4svARB(GLenum target, const GLshort *v) +{ + __GLX_DECLARE_VARIABLES(); + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultiTexCoord4svARB,16); + __GLX_PUT_LONG(4,target); + __GLX_PUT_SHORT(8,v[0]); + __GLX_PUT_SHORT(10,v[1]); + __GLX_PUT_SHORT(12,v[2]); + __GLX_PUT_SHORT(14,v[3]); + __GLX_END(16); } Index: xc/lib/GL/glx/g_single.c diff -u xc/lib/GL/glx/g_single.c:1.2 xc/lib/GL/glx/g_single.c:1.3 --- xc/lib/GL/glx/g_single.c:1.2 Mon Jun 14 03:23:36 1999 +++ xc/lib/GL/glx/g_single.c Wed Mar 21 11:04:39 2001 @@ -1,21 +1,31 @@ -/* $XFree86: xc/lib/GL/glx/g_single.c,v 1.2 1999/06/14 07:23:36 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/g_single.c,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. +** http://oss.sgi.com/projects/FreeB ** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: This software was created using the +** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has +** not been independently verified as being compliant with the OpenGL(R) +** version 1.2.1 Specification. */ #include "packsingle.h" @@ -415,5 +425,239 @@ __GLX_SINGLE_GET_RETVAL(retval, GLboolean); __GLX_SINGLE_END(); return retval; +} + +/* + * Somewhere between GLX 1.2 and 1.3 (in SGI's code anyway) the + * protocol for glAreTexturesResident, glDeleteTextures, glGenTextures, + * and glIsTexture() was changed. Before, calls to these functions + * generated protocol for the old GL_EXT_texture_object versions of those + * calls. In the newer code, this is actually corrected; calls to the + * 1.1 functions generate 1.1 protocol and calls to the EXT functions + * generate EXT protocol. + * Unfortunately, this correction causes an incompatibility. Specifically, + * an updated libGL.so will send protocol requests that the server won't + * be able to handle. For example, calling glGenTextures will generate a + * BadRequest error. + * For now, we'll keep generating EXT protocol from libGL. We'll update + * the server to understand both the 1.1 and EXT protocol ASAP. At some point + * in the future we'll correct libGL.so as well. That should be a smoother + * transition path. + */ + +GLboolean glAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences) +{ +#if 0 /* see comments above */ + __GLX_SINGLE_DECLARE_VARIABLES(); + GLboolean retval = 0; + xGLXSingleReply reply; + __GLX_SINGLE_LOAD_VARIABLES(); + if (n < 0) return retval; + cmdlen = 4+n*4; + __GLX_SINGLE_BEGIN(X_GLsop_AreTexturesResident,cmdlen); + __GLX_SINGLE_PUT_LONG(0,n); + __GLX_PUT_LONG_ARRAY(4,textures,n); + __GLX_SINGLE_READ_XREPLY(); + __GLX_SINGLE_GET_RETVAL(retval, GLboolean); + __GLX_SINGLE_GET_CHAR_ARRAY(residences,n); + __GLX_SINGLE_END(); + return retval; +#else + return glAreTexturesResidentEXT(n, textures, residences); +#endif +} + +void glDeleteTextures(GLsizei n, const GLuint *textures) +{ +#if 0 /* see comments above */ + __GLX_SINGLE_DECLARE_VARIABLES(); + __GLX_SINGLE_LOAD_VARIABLES(); + if (n < 0) return; + cmdlen = 4+n*4; + __GLX_SINGLE_BEGIN(X_GLsop_DeleteTextures,cmdlen); + __GLX_SINGLE_PUT_LONG(0,n); + __GLX_PUT_LONG_ARRAY(4,textures,n); + __GLX_SINGLE_END(); +#else + glDeleteTexturesEXT(n, textures); +#endif +} + +void glGenTextures(GLsizei n, GLuint *textures) +{ +#if 0 /* see comments above */ + __GLX_SINGLE_DECLARE_VARIABLES(); + xGLXSingleReply reply; + __GLX_SINGLE_LOAD_VARIABLES(); + __GLX_SINGLE_BEGIN(X_GLsop_GenTextures,4); + __GLX_SINGLE_PUT_LONG(0,n); + __GLX_SINGLE_READ_XREPLY(); + __GLX_SINGLE_GET_LONG_ARRAY(textures,n); + __GLX_SINGLE_END(); +#else + glGenTexturesEXT(n, textures); +#endif +} + +GLboolean glIsTexture(GLuint texture) +{ +#if 0 /* see comments above */ + __GLX_SINGLE_DECLARE_VARIABLES(); + GLboolean retval = 0; + xGLXSingleReply reply; + __GLX_SINGLE_LOAD_VARIABLES(); + __GLX_SINGLE_BEGIN(X_GLsop_IsTexture,4); + __GLX_SINGLE_PUT_LONG(0,texture); + __GLX_SINGLE_READ_XREPLY(); + __GLX_SINGLE_GET_RETVAL(retval, GLboolean); + __GLX_SINGLE_END(); + return retval; +#else + return glIsTextureEXT(texture); +#endif +} + +void glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat *params) +{ + __GLX_SINGLE_DECLARE_VARIABLES(); + xGLXSingleReply reply; + __GLX_SINGLE_LOAD_VARIABLES(); + __GLX_SINGLE_BEGIN(X_GLsop_GetColorTableParameterfv,8); + __GLX_SINGLE_PUT_LONG(0,target); + __GLX_SINGLE_PUT_LONG(4,pname); + __GLX_SINGLE_READ_XREPLY(); + __GLX_SINGLE_GET_SIZE(compsize); + if (compsize == 1) { + __GLX_SINGLE_GET_FLOAT(params); + } else { + __GLX_SINGLE_GET_FLOAT_ARRAY(params,compsize); + } + __GLX_SINGLE_END(); +} + +void glGetColorTableParameteriv(GLenum target, GLenum pname, GLint *params) +{ + __GLX_SINGLE_DECLARE_VARIABLES(); + xGLXSingleReply reply; + __GLX_SINGLE_LOAD_VARIABLES(); + __GLX_SINGLE_BEGIN(X_GLsop_GetColorTableParameteriv,8); + __GLX_SINGLE_PUT_LONG(0,target); + __GLX_SINGLE_PUT_LONG(4,pname); + __GLX_SINGLE_READ_XREPLY(); + __GLX_SINGLE_GET_SIZE(compsize); + if (compsize == 1) { + __GLX_SINGLE_GET_LONG(params); + } else { + __GLX_SINGLE_GET_LONG_ARRAY(params,compsize); + } + __GLX_SINGLE_END(); +} + +void glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params) +{ + __GLX_SINGLE_DECLARE_VARIABLES(); + xGLXSingleReply reply; + __GLX_SINGLE_LOAD_VARIABLES(); + __GLX_SINGLE_BEGIN(X_GLsop_GetConvolutionParameterfv,8); + __GLX_SINGLE_PUT_LONG(0,target); + __GLX_SINGLE_PUT_LONG(4,pname); + __GLX_SINGLE_READ_XREPLY(); + __GLX_SINGLE_GET_SIZE(compsize); + if (compsize == 1) { + __GLX_SINGLE_GET_FLOAT(params); + } else { + __GLX_SINGLE_GET_FLOAT_ARRAY(params,compsize); + } + __GLX_SINGLE_END(); +} + +void glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params) +{ + __GLX_SINGLE_DECLARE_VARIABLES(); + xGLXSingleReply reply; + __GLX_SINGLE_LOAD_VARIABLES(); + __GLX_SINGLE_BEGIN(X_GLsop_GetConvolutionParameteriv,8); + __GLX_SINGLE_PUT_LONG(0,target); + __GLX_SINGLE_PUT_LONG(4,pname); + __GLX_SINGLE_READ_XREPLY(); + __GLX_SINGLE_GET_SIZE(compsize); + if (compsize == 1) { + __GLX_SINGLE_GET_LONG(params); + } else { + __GLX_SINGLE_GET_LONG_ARRAY(params,compsize); + } + __GLX_SINGLE_END(); +} + +void glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params) +{ + __GLX_SINGLE_DECLARE_VARIABLES(); + xGLXSingleReply reply; + __GLX_SINGLE_LOAD_VARIABLES(); + __GLX_SINGLE_BEGIN(X_GLsop_GetHistogramParameterfv,8); + __GLX_SINGLE_PUT_LONG(0,target); + __GLX_SINGLE_PUT_LONG(4,pname); + __GLX_SINGLE_READ_XREPLY(); + __GLX_SINGLE_GET_SIZE(compsize); + if (compsize == 1) { + __GLX_SINGLE_GET_FLOAT(params); + } else { + __GLX_SINGLE_GET_FLOAT_ARRAY(params,compsize); + } + __GLX_SINGLE_END(); +} + +void glGetHistogramParameteriv(GLenum target, GLenum pname, GLint *params) +{ + __GLX_SINGLE_DECLARE_VARIABLES(); + xGLXSingleReply reply; + __GLX_SINGLE_LOAD_VARIABLES(); + __GLX_SINGLE_BEGIN(X_GLsop_GetHistogramParameteriv,8); + __GLX_SINGLE_PUT_LONG(0,target); + __GLX_SINGLE_PUT_LONG(4,pname); + __GLX_SINGLE_READ_XREPLY(); + __GLX_SINGLE_GET_SIZE(compsize); + if (compsize == 1) { + __GLX_SINGLE_GET_LONG(params); + } else { + __GLX_SINGLE_GET_LONG_ARRAY(params,compsize); + } + __GLX_SINGLE_END(); +} + +void glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params) +{ + __GLX_SINGLE_DECLARE_VARIABLES(); + xGLXSingleReply reply; + __GLX_SINGLE_LOAD_VARIABLES(); + __GLX_SINGLE_BEGIN(X_GLsop_GetMinmaxParameterfv,8); + __GLX_SINGLE_PUT_LONG(0,target); + __GLX_SINGLE_PUT_LONG(4,pname); + __GLX_SINGLE_READ_XREPLY(); + __GLX_SINGLE_GET_SIZE(compsize); + if (compsize == 1) { + __GLX_SINGLE_GET_FLOAT(params); + } else { + __GLX_SINGLE_GET_FLOAT_ARRAY(params,compsize); + } + __GLX_SINGLE_END(); +} + +void glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params) +{ + __GLX_SINGLE_DECLARE_VARIABLES(); + xGLXSingleReply reply; + __GLX_SINGLE_LOAD_VARIABLES(); + __GLX_SINGLE_BEGIN(X_GLsop_GetMinmaxParameteriv,8); + __GLX_SINGLE_PUT_LONG(0,target); + __GLX_SINGLE_PUT_LONG(4,pname); + __GLX_SINGLE_READ_XREPLY(); + __GLX_SINGLE_GET_SIZE(compsize); + if (compsize == 1) { + __GLX_SINGLE_GET_LONG(params); + } else { + __GLX_SINGLE_GET_LONG_ARRAY(params,compsize); + } + __GLX_SINGLE_END(); } Index: xc/lib/GL/glx/g_vendpriv.c diff -u xc/lib/GL/glx/g_vendpriv.c:1.2 xc/lib/GL/glx/g_vendpriv.c:1.3 --- xc/lib/GL/glx/g_vendpriv.c:1.2 Mon Jun 14 03:23:36 1999 +++ xc/lib/GL/glx/g_vendpriv.c Wed Mar 21 11:04:39 2001 @@ -1,26 +1,36 @@ -/* $XFree86: xc/lib/GL/glx/g_vendpriv.c,v 1.2 1999/06/14 07:23:36 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/g_vendpriv.c,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. +** http://oss.sgi.com/projects/FreeB ** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: This software was created using the +** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has +** not been independently verified as being compliant with the OpenGL(R) +** version 1.2.1 Specification. */ #include "packvendpriv.h" -GLboolean glAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences) +GLboolean glAreTexturesResidentEXT(GLsizei n, const GLuint *textures, GLboolean *residences) { __GLX_VENDPRIV_DECLARE_VARIABLES(); GLboolean retval = 0; @@ -28,7 +38,7 @@ __GLX_VENDPRIV_LOAD_VARIABLES(); if (n < 0) return retval; cmdlen = 4+n*4; - __GLX_VENDPRIV_BEGIN(X_GLXVendorPrivateWithReply,X_GLvop_AreTexturesResident,cmdlen); + __GLX_VENDPRIV_BEGIN(X_GLXVendorPrivateWithReply,X_GLvop_AreTexturesResidentEXT,cmdlen); __GLX_VENDPRIV_PUT_LONG(0,n); __GLX_PUT_LONG_ARRAY(4,textures,n); __GLX_VENDPRIV_READ_XREPLY(); @@ -38,37 +48,37 @@ return retval; } -void glDeleteTextures(GLsizei n, const GLuint *textures) +void glDeleteTexturesEXT(GLsizei n, const GLuint *textures) { __GLX_VENDPRIV_DECLARE_VARIABLES(); __GLX_VENDPRIV_LOAD_VARIABLES(); if (n < 0) return; cmdlen = 4+n*4; - __GLX_VENDPRIV_BEGIN(X_GLXVendorPrivate,X_GLvop_DeleteTextures,cmdlen); + __GLX_VENDPRIV_BEGIN(X_GLXVendorPrivate,X_GLvop_DeleteTexturesEXT,cmdlen); __GLX_VENDPRIV_PUT_LONG(0,n); __GLX_PUT_LONG_ARRAY(4,textures,n); __GLX_VENDPRIV_END(); } -void glGenTextures(GLsizei n, GLuint *textures) +void glGenTexturesEXT(GLsizei n, GLuint *textures) { __GLX_VENDPRIV_DECLARE_VARIABLES(); xGLXVendorPrivReply reply; __GLX_VENDPRIV_LOAD_VARIABLES(); - __GLX_VENDPRIV_BEGIN(X_GLXVendorPrivateWithReply,X_GLvop_GenTextures,4); + __GLX_VENDPRIV_BEGIN(X_GLXVendorPrivateWithReply,X_GLvop_GenTexturesEXT,4); __GLX_VENDPRIV_PUT_LONG(0,n); __GLX_VENDPRIV_READ_XREPLY(); __GLX_VENDPRIV_GET_LONG_ARRAY(textures,n); __GLX_VENDPRIV_END(); } -GLboolean glIsTexture(GLuint texture) +GLboolean glIsTextureEXT(GLuint texture) { __GLX_VENDPRIV_DECLARE_VARIABLES(); GLboolean retval = 0; xGLXVendorPrivReply reply; __GLX_VENDPRIV_LOAD_VARIABLES(); - __GLX_VENDPRIV_BEGIN(X_GLXVendorPrivateWithReply,X_GLvop_IsTexture,4); + __GLX_VENDPRIV_BEGIN(X_GLXVendorPrivateWithReply,X_GLvop_IsTextureEXT,4); __GLX_VENDPRIV_PUT_LONG(0,texture); __GLX_VENDPRIV_READ_XREPLY(); __GLX_VENDPRIV_GET_RETVAL(retval, GLboolean); Index: xc/lib/GL/glx/glxclient.h diff -u xc/lib/GL/glx/glxclient.h:1.11 xc/lib/GL/glx/glxclient.h:1.13 --- xc/lib/GL/glx/glxclient.h:1.11 Thu Dec 7 15:26:03 2000 +++ xc/lib/GL/glx/glxclient.h Tue Apr 10 12:07:49 2001 @@ -1,24 +1,37 @@ - /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. -** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. */ -/* $XFree86: xc/lib/GL/glx/glxclient.h,v 1.11 2000/12/07 20:26:03 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/glxclient.h,v 1.13 2001/04/10 16:07:49 dawes Exp $ */ /* * Direct rendering support added by Precision Insight, Inc. @@ -32,12 +45,11 @@ #define _GLX_client_h_ #define NEED_REPLIES #define NEED_EVENTS -#include -#include #include #include -#include #include +#include +#include #include "glxint.h" #include "glxproto.h" #include "glapitable.h" @@ -54,6 +66,8 @@ #define __GL_BOOLEAN_ARRAY (GL_BYTE - 1) +#define __GLX_MAX_TEXTURE_UNITS 32 + typedef struct __GLXcontextRec __GLXcontext; typedef struct __GLXdisplayPrivateRec __GLXdisplayPrivate; typedef struct _glapi_table __GLapi; @@ -211,55 +225,34 @@ GLboolean swapEndian; GLboolean lsbFirst; GLuint rowLength; + GLuint imageHeight; + GLuint imageDepth; GLuint skipRows; GLuint skipPixels; + GLuint skipImages; GLuint alignment; } __GLXpixelStoreMode; +typedef struct __GLXvertexArrayPointerStateRec { + GLboolean enable; + void (*proc)(const void *); + const GLubyte *ptr; + GLsizei skip; + GLint size; + GLenum type; + GLsizei stride; +} __GLXvertexArrayPointerState; + typedef struct __GLXvertArrayStateRec { - GLboolean vertexEnable; - void (*vertexCall)(const char *); - const char *vertexPtr; - GLsizei vertexSkip; - GLint vertexSize; - GLenum vertexType; - GLsizei vertexStride; - - GLboolean normalEnable; - void (*normalCall)(const char *); - const char *normalPtr; - GLsizei normalSkip; - GLenum normalType; - GLsizei normalStride; - - GLboolean colorEnable; - void (*colorCall)(const char *); - const char *colorPtr; - GLsizei colorSkip; - GLint colorSize; - GLenum colorType; - GLsizei colorStride; - - GLboolean indexEnable; - void (*indexCall)(const char *); - const char *indexPtr; - GLsizei indexSkip; - GLenum indexType; - GLsizei indexStride; - - GLboolean texCoordEnable; - void (*texCoordCall)(const char *); - const char *texCoordPtr; - GLsizei texCoordSkip; - GLint texCoordSize; - GLenum texCoordType; - GLsizei texCoordStride; - - GLboolean edgeFlagEnable; - void (*edgeFlagCall)(const GLboolean *); - GLsizei edgeFlagSkip; - const GLboolean *edgeFlagPtr; - GLsizei edgeFlagStride; + __GLXvertexArrayPointerState vertex; + __GLXvertexArrayPointerState normal; + __GLXvertexArrayPointerState color; + __GLXvertexArrayPointerState index; + __GLXvertexArrayPointerState texCoord[__GLX_MAX_TEXTURE_UNITS]; + __GLXvertexArrayPointerState edgeFlag; + GLint maxElementsVertices; + GLint maxElementsIndices; + GLint activeTexture; } __GLXvertArrayState; typedef struct __GLXattributeRec { @@ -370,8 +363,8 @@ ** Fill newImage with the unpacked form of oldImage getting it ** ready for transport to the server. */ - void (*fillImage)(__GLXcontext*, GLint, GLint, GLenum, GLenum, - const GLvoid*, GLubyte*, GLubyte*); + void (*fillImage)(__GLXcontext*, GLint, GLint, GLint, GLint, GLenum, + GLenum, const GLvoid*, GLubyte*, GLubyte*); /* ** Client side attribs. @@ -587,7 +580,7 @@ */ /* Return the size, in bytes, of some pixel data */ -extern GLint __glImageSize(GLint, GLint, GLenum, GLenum); +extern GLint __glImageSize(GLint, GLint, GLint, GLenum, GLenum); /* Return the k value for a given map target */ extern GLint __glEvalComputeK(GLenum); @@ -599,10 +592,8 @@ ** updated to contain the modes needed by the server to decode the ** sent data. */ -extern void __glFillImage(__GLXcontext*, GLint, GLint, - GLenum, GLenum, - const GLvoid*, GLubyte*, - GLubyte*); +extern void __glFillImage(__GLXcontext*, GLint, GLint, GLint, GLint, GLenum, + GLenum, const GLvoid*, GLubyte*, GLubyte*); /* Copy map data with a stride into a packed buffer */ extern void __glFillMap1f(GLint, GLint, GLint, const GLfloat *, GLubyte *); @@ -616,8 +607,8 @@ ** Empty an image out of the reply buffer into the clients memory applying ** the pack modes to pack back into the clients requested format. */ -extern void __glEmptyImage(__GLXcontext*, GLint, GLint, GLenum, - GLenum, const GLubyte *, GLvoid *); +extern void __glEmptyImage(__GLXcontext*, GLint, GLint, GLint, GLint, GLenum, + GLenum, const GLubyte *, GLvoid *); /* @@ -637,6 +628,10 @@ ** is illegal these procedures return 0. */ extern GLint __glCallLists_size(GLint, GLenum); +extern GLint __glColorTableParameterfv_size(GLenum); +extern GLint __glColorTableParameteriv_size(GLenum); +extern GLint __glConvolutionParameterfv_size(GLenum); +extern GLint __glConvolutionParameteriv_size(GLenum); extern GLint __glDrawPixels_size(GLenum, GLenum, GLint, GLint); extern GLint __glReadPixels_size(GLenum, GLenum, GLint, GLint); extern GLint __glLightModelfv_size(GLenum); @@ -649,6 +644,7 @@ extern GLint __glFogiv_size(GLenum); extern GLint __glTexImage1D_size(GLenum, GLenum, GLint); extern GLint __glTexImage2D_size(GLenum, GLenum, GLint, GLint); +extern GLint __glTexImage3D_size(GLenum, GLenum, GLint, GLint, GLint); extern GLint __glTexEnvfv_size(GLenum); extern GLint __glTexEnviv_size(GLenum); extern GLint __glTexGenfv_size(GLenum); Index: xc/lib/GL/glx/glxcmds.c diff -u xc/lib/GL/glx/glxcmds.c:1.13 xc/lib/GL/glx/glxcmds.c:1.15 --- xc/lib/GL/glx/glxcmds.c:1.13 Mon Nov 13 18:31:23 2000 +++ xc/lib/GL/glx/glxcmds.c Fri Apr 6 21:39:39 2001 @@ -1,33 +1,39 @@ -/* $XFree86: xc/lib/GL/glx/glxcmds.c,v 1.13 2000/11/13 23:31:23 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/glxcmds.c,v 1.15 2001/04/07 01:39:39 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ -/* - * Direct rendering support added by Precision Insight, Inc. - * - * Authors: - * Kevin E. Martin - * Brian Paul - */ - #include "packsingle.h" #include "glxclient.h" #include @@ -38,19 +44,22 @@ #include "indirect_init.h" #endif -static const char GL_ClientExtensions[] = - "GL_EXT_abgr " - "GL_EXT_blend_color " - "GL_EXT_blend_minmax " - "GL_EXT_blend_subtract " ; - -static const char GLXClientVendorName[] = "SGI"; -static const char GLXClientVersion[] = "1.2"; -static const char GLXClientExtensions[] = - "GLX_EXT_visual_info " - "GLX_EXT_visual_rating " - "GLX_EXT_import_context " - "GLX_ARB_get_proc_address "; +static const char __glXGLClientExtensions[] = + "GL_ARB_multitexture " + "GL_ARB_imaging " + "GL_EXT_abgr " + "GL_EXT_blend_color " + "GL_EXT_blend_minmax " + "GL_EXT_blend_subtract " + ; + +static const char __glXGLXClientVendorName[] = "SGI"; +static const char __glXGLXClientVersion[] = "1.2"; +static const char __glXGLXClientExtensions[] = + "GLX_EXT_visual_info " + "GLX_EXT_visual_rating " + "GLX_EXT_import_context " + ; /* ** Create a new context. @@ -1275,7 +1284,7 @@ psc->serverGLXexts = QueryServerString(dpy, priv->majorOpcode, screen, GLX_EXTENSIONS); } - psc->effectiveGLXexts = combine_strings(GLXClientExtensions, + psc->effectiveGLXexts = combine_strings(__glXGLXClientExtensions, psc->serverGLXexts); } @@ -1286,11 +1295,11 @@ { switch(name) { case GLX_VENDOR: - return (GLXClientVendorName); + return (__glXGLXClientVendorName); case GLX_VERSION: - return (GLXClientVersion); + return (__glXGLXClientVersion); case GLX_EXTENSIONS: - return (GLXClientExtensions); + return (__glXGLXClientExtensions); default: return NULL; } @@ -1363,10 +1372,10 @@ req->major = GLX_MAJOR_VERSION; req->minor = GLX_MINOR_VERSION; - size = strlen(GL_ClientExtensions) + 1; + size = strlen(__glXGLClientExtensions) + 1; req->length += (size + 3) >> 2; req->numbytes = size; - Data(dpy, GL_ClientExtensions, size); + Data(dpy, __glXGLClientExtensions, size); UnlockDisplay(dpy); SyncHandle(); Index: xc/lib/GL/glx/glxext.c diff -u xc/lib/GL/glx/glxext.c:1.9 xc/lib/GL/glx/glxext.c:1.13 --- xc/lib/GL/glx/glxext.c:1.9 Thu Dec 7 15:26:03 2000 +++ xc/lib/GL/glx/glxext.c Tue Apr 10 12:07:49 2001 @@ -1,38 +1,53 @@ -/* $XFree86: xc/lib/GL/glx/glxext.c,v 1.9 2000/12/07 20:26:03 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/glxext.c,v 1.13 2001/04/10 16:07:49 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** */ -/* - * Direct rendering support added by Precision Insight, Inc. - * - * Authors: - * Kevin E. Martin - * - */ +/* < + * Direct rendering support added by Precision Insight, Inc. < + * < + * Authors: < + * Kevin E. Martin < + * < + */ #include "packrender.h" +#include #include #include #include -#include #include "indirect_init.h" #include "glapi.h" #ifdef XTHREADS @@ -211,7 +226,7 @@ psc->configs = 0; /* NOTE: just for paranoia */ } -#if 0 /* GLX_DIRECT_RENDERING */ +#ifdef GLX_DIRECT_RENDERING /* Free the direct rendering per screen data */ if (psc->driScreen.private) (*psc->driScreen.destroyScreen)(priv->dpy, i, @@ -433,11 +448,14 @@ #ifdef GLX_DIRECT_RENDERING /* Initialize the direct rendering per screen data and functions */ - if (priv->driDisplay.private) + if (priv->driDisplay.private && + priv->driDisplay.createScreen && + priv->driDisplay.createScreen[i]) { psc->driScreen.private = - (*priv->driDisplay.createScreen)(dpy, i, &psc->driScreen, + (*(priv->driDisplay.createScreen[i]))(dpy, i, &psc->driScreen, psc->numConfigs, psc->configs); + } #endif } SyncHandle(); @@ -557,9 +575,7 @@ XAddToExtensionList(privList, private); if (dpyPriv->majorVersion == 1 && dpyPriv->minorVersion >= 1) { -#if 0 __glXClientInfo(dpy, dpyPriv->majorOpcode); -#endif } __glXUnlock(); Index: xc/lib/GL/glx/indirect.h diff -u xc/lib/GL/glx/indirect.h:1.2 xc/lib/GL/glx/indirect.h:1.3 --- xc/lib/GL/glx/indirect.h:1.2 Tue Feb 15 14:19:18 2000 +++ xc/lib/GL/glx/indirect.h Wed Mar 21 11:04:39 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/indirect.h,v 1.2 2000/02/15 19:19:18 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/indirect.h,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -42,10 +42,13 @@ void __indirect_glAccum(GLenum op, GLfloat value); void __indirect_glAlphaFunc(GLenum func, GLclampf ref); GLboolean __indirect_glAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences); +GLboolean __indirect_glAreTexturesResidentEXT(GLsizei n, const GLuint *textures, GLboolean *residences); void __indirect_glArrayElement(GLint i); void __indirect_glBegin(GLenum mode); void __indirect_glBindTexture(GLenum target, GLuint texture); void __indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); +void __indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +void __indirect_glBlendEquation(GLenum mode); void __indirect_glBlendFunc(GLenum sfactor, GLenum dfactor); void __indirect_glCallList(GLuint list); void __indirect_glCallLists(GLsizei n, GLenum type, const GLvoid *lists); @@ -91,14 +94,30 @@ void __indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); void __indirect_glColorMaterial(GLenum face, GLenum mode); void __indirect_glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +void __indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *table); +void __indirect_glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +void __indirect_glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params); +void __indirect_glColorTableParameteriv(GLenum target, GLenum pname, const GLint *params); +void __indirect_glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +void __indirect_glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +void __indirect_glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params); +void __indirect_glConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params); +void __indirect_glConvolutionParameteri(GLenum target, GLenum pname, GLint params); +void __indirect_glConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params); +void __indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +void __indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +void __indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +void __indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); void __indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); void __indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); void __indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); void __indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); void __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +void __indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); void __indirect_glCullFace(GLenum mode); void __indirect_glDeleteLists(GLuint list, GLsizei range); void __indirect_glDeleteTextures(GLsizei n, const GLuint *textures); +void __indirect_glDeleteTexturesEXT(GLsizei n, const GLuint *textures); void __indirect_glDepthFunc(GLenum func); void __indirect_glDepthMask(GLboolean flag); void __indirect_glDepthRange(GLclampd zNear, GLclampd zFar); @@ -108,6 +127,7 @@ void __indirect_glDrawBuffer(GLenum mode); void __indirect_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); void __indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +void __indirect_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); void __indirect_glEdgeFlag(GLboolean flag); void __indirect_glEdgeFlagPointer(GLsizei stride, const GLvoid *pointer); void __indirect_glEdgeFlagv(const GLboolean *flag); @@ -138,11 +158,21 @@ void __indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); GLuint __indirect_glGenLists(GLsizei range); void __indirect_glGenTextures(GLsizei n, GLuint *textures); +void __indirect_glGenTexturesEXT(GLsizei n, GLuint *textures); void __indirect_glGetBooleanv(GLenum val, GLboolean *b); void __indirect_glGetClipPlane(GLenum plane, GLdouble *equation); +void __indirect_glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid *table); +void __indirect_glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat *params); +void __indirect_glGetColorTableParameteriv(GLenum target, GLenum pname, GLint *params); +void __indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid *image); +void __indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params); +void __indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params); void __indirect_glGetDoublev(GLenum val, GLdouble *d); GLenum __indirect_glGetError(void); void __indirect_glGetFloatv(GLenum val, GLfloat *f); +void __indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +void __indirect_glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params); +void __indirect_glGetHistogramParameteriv(GLenum target, GLenum pname, GLint *params); void __indirect_glGetIntegerv(GLenum val, GLint *i); void __indirect_glGetLightfv(GLenum light, GLenum pname, GLfloat *params); void __indirect_glGetLightiv(GLenum light, GLenum pname, GLint *params); @@ -151,12 +181,16 @@ void __indirect_glGetMapiv(GLenum target, GLenum query, GLint *v); void __indirect_glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params); void __indirect_glGetMaterialiv(GLenum face, GLenum pname, GLint *params); +void __indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +void __indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params); +void __indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params); void __indirect_glGetPixelMapfv(GLenum map, GLfloat *values); void __indirect_glGetPixelMapuiv(GLenum map, GLuint *values); void __indirect_glGetPixelMapusv(GLenum map, GLushort *values); void __indirect_glGetPointerv(GLenum pname, void **params); void __indirect_glGetPolygonStipple(GLubyte *mask); const GLubyte *__indirect_glGetString(GLenum name); +void __indirect_glGetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); void __indirect_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params); void __indirect_glGetTexEnviv(GLenum target, GLenum pname, GLint *params); void __indirect_glGetTexGendv(GLenum coord, GLenum pname, GLdouble *params); @@ -168,6 +202,7 @@ void __indirect_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params); void __indirect_glGetTexParameteriv(GLenum target, GLenum pname, GLint *params); void __indirect_glHint(GLenum target, GLenum mode); +void __indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); void __indirect_glIndexMask(GLuint mask); void __indirect_glIndexPointer(GLenum type, GLsizei stride, const GLvoid *pointer); void __indirect_glIndexd(GLdouble c); @@ -185,6 +220,7 @@ GLboolean __indirect_glIsEnabled(GLenum cap); GLboolean __indirect_glIsList(GLuint list); GLboolean __indirect_glIsTexture(GLuint texture); +GLboolean __indirect_glIsTextureEXT(GLuint texture); void __indirect_glLightModelf(GLenum pname, GLfloat param); void __indirect_glLightModelfv(GLenum pname, const GLfloat *params); void __indirect_glLightModeli(GLenum pname, GLint param); @@ -214,6 +250,7 @@ void __indirect_glMateriali(GLenum face, GLenum pname, GLint param); void __indirect_glMaterialiv(GLenum face, GLenum pname, const GLint *params); void __indirect_glMatrixMode(GLenum mode); +void __indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink); void __indirect_glMultMatrixd(const GLdouble *m); void __indirect_glMultMatrixf(const GLfloat *m); void __indirect_glNewList(GLuint list, GLenum mode); @@ -286,12 +323,15 @@ void __indirect_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2); void __indirect_glRectsv(const GLshort *v1, const GLshort *v2); GLint __indirect_glRenderMode(GLenum mode); +void __indirect_glResetHistogram(GLenum target); +void __indirect_glResetMinmax(GLenum target); void __indirect_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); void __indirect_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); void __indirect_glScaled(GLdouble x, GLdouble y, GLdouble z); void __indirect_glScalef(GLfloat x, GLfloat y, GLfloat z); void __indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height); void __indirect_glSelectBuffer(GLsizei numnames, GLuint *buffer); +void __indirect_glSeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); void __indirect_glShadeModel(GLenum mode); void __indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask); void __indirect_glStencilMask(GLuint mask); @@ -341,12 +381,14 @@ void __indirect_glTexGeniv(GLenum coord, GLenum pname, const GLint *params); void __indirect_glTexImage1D(GLenum target, GLint level, GLint components, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *image); void __indirect_glTexImage2D(GLenum target, GLint level, GLint components, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *image); +void __indirect_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *image); void __indirect_glTexParameterf(GLenum target, GLenum pname, GLfloat param); void __indirect_glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params); void __indirect_glTexParameteri(GLenum target, GLenum pname, GLint param); void __indirect_glTexParameteriv(GLenum target, GLenum pname, const GLint *params); void __indirect_glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *image); void __indirect_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +void __indirect_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *image); void __indirect_glTranslated(GLdouble x, GLdouble y, GLdouble z); void __indirect_glTranslatef(GLfloat x, GLfloat y, GLfloat z); void __indirect_glVertex2d(GLdouble x, GLdouble y); @@ -375,5 +417,42 @@ void __indirect_glVertex4sv(const GLshort *v); void __indirect_glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); void __indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height); + + +void __indirect_glActiveTextureARB(GLenum texture); +void __indirect_glClientActiveTextureARB(GLenum texture); +void __indirect_glMultiTexCoord1dARB(GLenum target, GLdouble s); +void __indirect_glMultiTexCoord1dvARB(GLenum target, const GLdouble *v); +void __indirect_glMultiTexCoord1fARB(GLenum target, GLfloat s); +void __indirect_glMultiTexCoord1fvARB(GLenum target, const GLfloat *v); +void __indirect_glMultiTexCoord1iARB(GLenum target, GLint s); +void __indirect_glMultiTexCoord1ivARB(GLenum target, const GLint *v); +void __indirect_glMultiTexCoord1sARB(GLenum target, GLshort s); +void __indirect_glMultiTexCoord1svARB(GLenum target, const GLshort *v); +void __indirect_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t); +void __indirect_glMultiTexCoord2dvARB(GLenum target, const GLdouble *v); +void __indirect_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t); +void __indirect_glMultiTexCoord2fvARB(GLenum target, const GLfloat *v); +void __indirect_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t); +void __indirect_glMultiTexCoord2ivARB(GLenum target, const GLint *v); +void __indirect_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t); +void __indirect_glMultiTexCoord2svARB(GLenum target, const GLshort *v); +void __indirect_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r); +void __indirect_glMultiTexCoord3dvARB(GLenum target, const GLdouble *v); +void __indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r); +void __indirect_glMultiTexCoord3fvARB(GLenum target, const GLfloat *v); +void __indirect_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r); +void __indirect_glMultiTexCoord3ivARB(GLenum target, const GLint *v); +void __indirect_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r); +void __indirect_glMultiTexCoord3svARB(GLenum target, const GLshort *v); +void __indirect_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +void __indirect_glMultiTexCoord4dvARB(GLenum target, const GLdouble *v); +void __indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +void __indirect_glMultiTexCoord4fvARB(GLenum target, const GLfloat *v); +void __indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q); +void __indirect_glMultiTexCoord4ivARB(GLenum target, const GLint *v); +void __indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +void __indirect_glMultiTexCoord4svARB(GLenum target, const GLshort *v); + #endif /* _INDIRECT_H_ */ Index: xc/lib/GL/glx/indirect_init.c diff -u xc/lib/GL/glx/indirect_init.c:1.5 xc/lib/GL/glx/indirect_init.c:1.6 --- xc/lib/GL/glx/indirect_init.c:1.5 Thu Mar 2 11:07:32 2000 +++ xc/lib/GL/glx/indirect_init.c Wed Mar 21 11:04:39 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/indirect_init.c,v 1.5 2000/03/02 16:07:32 martin Exp $ */ +/* $XFree86: xc/lib/GL/glx/indirect_init.c,v 1.6 2001/03/21 16:04:39 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -140,6 +140,7 @@ glAPI->DrawBuffer = __indirect_glDrawBuffer; glAPI->DrawElements = __indirect_glDrawElements; glAPI->DrawPixels = __indirect_glDrawPixels; + glAPI->DrawRangeElements = __indirect_glDrawRangeElements; glAPI->EdgeFlag = __indirect_glEdgeFlag; glAPI->EdgeFlagPointer = __indirect_glEdgeFlagPointer; glAPI->EdgeFlagv = __indirect_glEdgeFlagv; @@ -407,6 +408,84 @@ glAPI->Vertex4sv = __indirect_glVertex4sv; glAPI->VertexPointer = __indirect_glVertexPointer; glAPI->Viewport = __indirect_glViewport; + + /* 1.2 */ + glAPI->CopyTexSubImage3D = __indirect_glCopyTexSubImage3D; + glAPI->DrawRangeElements = __indirect_glDrawRangeElements; + glAPI->TexImage3D = __indirect_glTexImage3D; + glAPI->TexSubImage3D = __indirect_glTexSubImage3D; + + /* OpenGL 1.2 GL_ARB_imaging */ + glAPI->BlendColor = __indirect_glBlendColor; + glAPI->BlendEquation = __indirect_glBlendEquation; + glAPI->ColorSubTable = __indirect_glColorSubTable; + glAPI->ColorTable = __indirect_glColorTable; + glAPI->ColorTableParameterfv = __indirect_glColorTableParameterfv; + glAPI->ColorTableParameteriv = __indirect_glColorTableParameteriv; + glAPI->ConvolutionFilter1D = __indirect_glConvolutionFilter1D; + glAPI->ConvolutionFilter2D = __indirect_glConvolutionFilter2D; + glAPI->ConvolutionParameterf = __indirect_glConvolutionParameterf; + glAPI->ConvolutionParameterfv = __indirect_glConvolutionParameterfv; + glAPI->ConvolutionParameteri = __indirect_glConvolutionParameteri; + glAPI->ConvolutionParameteriv = __indirect_glConvolutionParameteriv; + glAPI->CopyColorSubTable = __indirect_glCopyColorSubTable; + glAPI->CopyColorTable = __indirect_glCopyColorTable; + glAPI->CopyConvolutionFilter1D = __indirect_glCopyConvolutionFilter1D; + glAPI->CopyConvolutionFilter2D = __indirect_glCopyConvolutionFilter2D; + glAPI->GetColorTable = __indirect_glGetColorTable; + glAPI->GetColorTableParameterfv = __indirect_glGetColorTableParameterfv; + glAPI->GetColorTableParameteriv = __indirect_glGetColorTableParameteriv; + glAPI->GetConvolutionFilter = __indirect_glGetConvolutionFilter; + glAPI->GetConvolutionParameterfv = __indirect_glGetConvolutionParameterfv; + glAPI->GetConvolutionParameteriv = __indirect_glGetConvolutionParameteriv; + glAPI->GetHistogram = __indirect_glGetHistogram; + glAPI->GetHistogramParameterfv = __indirect_glGetHistogramParameterfv; + glAPI->GetHistogramParameteriv = __indirect_glGetHistogramParameteriv; + glAPI->GetMinmax = __indirect_glGetMinmax; + glAPI->GetMinmaxParameterfv = __indirect_glGetMinmaxParameterfv; + glAPI->GetMinmaxParameteriv = __indirect_glGetMinmaxParameteriv; + glAPI->GetSeparableFilter = __indirect_glGetSeparableFilter; + glAPI->Histogram = __indirect_glHistogram; + glAPI->Minmax = __indirect_glMinmax; + glAPI->ResetHistogram = __indirect_glResetHistogram; + glAPI->ResetMinmax = __indirect_glResetMinmax; + glAPI->SeparableFilter2D = __indirect_glSeparableFilter2D; + + /* ARB 1. GL_ARB_multitexture */ + glAPI->ActiveTextureARB = __indirect_glActiveTextureARB; + glAPI->ClientActiveTextureARB = __indirect_glClientActiveTextureARB; + glAPI->MultiTexCoord1dARB = __indirect_glMultiTexCoord1dARB; + glAPI->MultiTexCoord1dvARB = __indirect_glMultiTexCoord1dvARB; + glAPI->MultiTexCoord1fARB = __indirect_glMultiTexCoord1fARB; + glAPI->MultiTexCoord1fvARB = __indirect_glMultiTexCoord1fvARB; + glAPI->MultiTexCoord1iARB = __indirect_glMultiTexCoord1iARB; + glAPI->MultiTexCoord1ivARB = __indirect_glMultiTexCoord1ivARB; + glAPI->MultiTexCoord1sARB = __indirect_glMultiTexCoord1sARB; + glAPI->MultiTexCoord1svARB = __indirect_glMultiTexCoord1svARB; + glAPI->MultiTexCoord2dARB = __indirect_glMultiTexCoord2dARB; + glAPI->MultiTexCoord2dvARB = __indirect_glMultiTexCoord2dvARB; + glAPI->MultiTexCoord2fARB = __indirect_glMultiTexCoord2fARB; + glAPI->MultiTexCoord2fvARB = __indirect_glMultiTexCoord2fvARB; + glAPI->MultiTexCoord2iARB = __indirect_glMultiTexCoord2iARB; + glAPI->MultiTexCoord2ivARB = __indirect_glMultiTexCoord2ivARB; + glAPI->MultiTexCoord2sARB = __indirect_glMultiTexCoord2sARB; + glAPI->MultiTexCoord2svARB = __indirect_glMultiTexCoord2svARB; + glAPI->MultiTexCoord3dARB = __indirect_glMultiTexCoord3dARB; + glAPI->MultiTexCoord3dvARB = __indirect_glMultiTexCoord3dvARB; + glAPI->MultiTexCoord3fARB = __indirect_glMultiTexCoord3fARB; + glAPI->MultiTexCoord3fvARB = __indirect_glMultiTexCoord3fvARB; + glAPI->MultiTexCoord3iARB = __indirect_glMultiTexCoord3iARB; + glAPI->MultiTexCoord3ivARB = __indirect_glMultiTexCoord3ivARB; + glAPI->MultiTexCoord3sARB = __indirect_glMultiTexCoord3sARB; + glAPI->MultiTexCoord3svARB = __indirect_glMultiTexCoord3svARB; + glAPI->MultiTexCoord4dARB = __indirect_glMultiTexCoord4dARB; + glAPI->MultiTexCoord4dvARB = __indirect_glMultiTexCoord4dvARB; + glAPI->MultiTexCoord4fARB = __indirect_glMultiTexCoord4fARB; + glAPI->MultiTexCoord4fvARB = __indirect_glMultiTexCoord4fvARB; + glAPI->MultiTexCoord4iARB = __indirect_glMultiTexCoord4iARB; + glAPI->MultiTexCoord4ivARB = __indirect_glMultiTexCoord4ivARB; + glAPI->MultiTexCoord4sARB = __indirect_glMultiTexCoord4sARB; + glAPI->MultiTexCoord4svARB = __indirect_glMultiTexCoord4svARB; return glAPI; } Index: xc/lib/GL/glx/packrender.h diff -u xc/lib/GL/glx/packrender.h:1.5 xc/lib/GL/glx/packrender.h:1.6 --- xc/lib/GL/glx/packrender.h:1.5 Fri Feb 18 11:23:10 2000 +++ xc/lib/GL/glx/packrender.h Wed Mar 21 11:04:39 2001 @@ -1,26 +1,40 @@ +/* $XFree86: xc/lib/GL/glx/packrender.h,v 1.6 2001/03/21 16:04:39 dawes Exp $ */ #ifndef __GLX_packrender_h__ #define __GLX_packrender_h__ -/* $XFree86: xc/lib/GL/glx/packrender.h,v 1.5 2000/02/18 16:23:10 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #define NEED_GL_FUNCS_WRAPPED @@ -54,9 +68,9 @@ #define __GLX_LOAD_VARIABLES() \ gc = __glXGetCurrentContext(); \ pc = gc->pc; \ - (void) pixelHeaderPC; \ + (void) cmdlen; \ (void) compsize; \ - (void) cmdlen + (void) pixelHeaderPC /* ** Variable sized command support macro. This macro is used by calls @@ -94,6 +108,24 @@ pc += __GLX_RENDER_LARGE_HDR_SIZE; \ pixelHeaderPC = pc; \ pc += __GLX_PIXEL_HDR_SIZE + +#define __GLX_BEGIN_VARIABLE_WITH_PIXEL_3D(opcode,size) \ + if (pc + (size) > gc->bufEnd) { \ + pc = __glXFlushRenderBuffer(gc, pc); \ + } \ + __GLX_PUT_SHORT(0,size); \ + __GLX_PUT_SHORT(2,opcode); \ + pc += __GLX_RENDER_HDR_SIZE; \ + pixelHeaderPC = pc; \ + pc += __GLX_PIXEL_3D_HDR_SIZE + +#define __GLX_BEGIN_VARIABLE_LARGE_WITH_PIXEL_3D(opcode,size) \ + pc = __glXFlushRenderBuffer(gc, pc); \ + __GLX_PUT_LONG(0,size); \ + __GLX_PUT_LONG(4,opcode); \ + pc += __GLX_RENDER_LARGE_HDR_SIZE; \ + pixelHeaderPC = pc; \ + pc += __GLX_PIXEL_3D_HDR_SIZE /* ** Fixed size command support macro. This macro is used by calls that Index: xc/lib/GL/glx/packsingle.h diff -u xc/lib/GL/glx/packsingle.h:1.4 xc/lib/GL/glx/packsingle.h:1.5 --- xc/lib/GL/glx/packsingle.h:1.4 Mon Aug 28 12:04:48 2000 +++ xc/lib/GL/glx/packsingle.h Wed Mar 21 11:04:39 2001 @@ -1,26 +1,40 @@ +/* $XFree86: xc/lib/GL/glx/packsingle.h,v 1.5 2001/03/21 16:04:39 dawes Exp $ */ #ifndef __GLX_packsingle_h__ #define __GLX_packsingle_h__ -/* $XFree86: xc/lib/GL/glx/packsingle.h,v 1.4 2000/08/28 16:04:48 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #include "packrender.h" Index: xc/lib/GL/glx/packvendpriv.h diff -u xc/lib/GL/glx/packvendpriv.h:1.3 xc/lib/GL/glx/packvendpriv.h:1.5 --- xc/lib/GL/glx/packvendpriv.h:1.3 Tue Feb 8 12:18:34 2000 +++ xc/lib/GL/glx/packvendpriv.h Sun Apr 1 09:59:59 2001 @@ -1,26 +1,40 @@ +/* $XFree86: xc/lib/GL/glx/packvendpriv.h,v 1.5 2001/04/01 13:59:59 tsi Exp $ */ #ifndef __GLX_packvendpriv_h__ #define __GLX_packvendpriv_h__ -/* $XFree86: xc/lib/GL/glx/packvendpriv.h,v 1.3 2000/02/08 17:18:34 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #include "packrender.h" @@ -86,7 +100,7 @@ *((FLOAT32 *) (pc + offset)) = a #else -#define __GLX_VENDPRIV_PUT_SHORT(offset,a) \ +#define __GLX_VENDPRIV_PUT_SHORT(offset,a) \ { GLubyte *cp = (pc+offset); \ int shift = (64-16) - ((int)(cp) >> (64-6)); \ *(int *)cp = (*(int *)cp & ~(0xffff << shift)) | ((a & 0xffff) << shift); } Index: xc/lib/GL/glx/pixel.c diff -u xc/lib/GL/glx/pixel.c:1.3 xc/lib/GL/glx/pixel.c:1.4 --- xc/lib/GL/glx/pixel.c:1.3 Tue Feb 8 12:18:34 2000 +++ xc/lib/GL/glx/pixel.c Wed Mar 21 11:04:39 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/lib/GL/glx/pixel.c,v 1.3 2000/02/08 17:18:34 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/pixel.c,v 1.4 2001/03/21 16:04:39 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #include "packrender.h" @@ -68,14 +82,38 @@ /* ** Return the number of elements per group of a specified format */ -static GLint ElementsPerGroup(GLenum format) +static GLint ElementsPerGroup(GLenum format, GLenum type) { + /* + ** To make row length computation valid for image extraction, + ** packed pixel types assume elements per group equals one. + */ + switch(type) { + case GL_UNSIGNED_BYTE_3_3_2: + case GL_UNSIGNED_BYTE_2_3_3_REV: + case GL_UNSIGNED_SHORT_5_6_5: + case GL_UNSIGNED_SHORT_5_6_5_REV: + case GL_UNSIGNED_SHORT_4_4_4_4: + case GL_UNSIGNED_SHORT_4_4_4_4_REV: + case GL_UNSIGNED_SHORT_5_5_5_1: + case GL_UNSIGNED_SHORT_1_5_5_5_REV: + case GL_UNSIGNED_INT_8_8_8_8: + case GL_UNSIGNED_INT_8_8_8_8_REV: + case GL_UNSIGNED_INT_10_10_10_2: + case GL_UNSIGNED_INT_2_10_10_10_REV: + return 1; + default: + break; + } + switch(format) { case GL_RGB: + case GL_BGR: return 3; case GL_LUMINANCE_ALPHA: return 2; case GL_RGBA: + case GL_BGRA: case GL_ABGR_EXT: return 4; case GL_COLOR_INDEX: @@ -101,13 +139,25 @@ switch(type) { case GL_UNSIGNED_SHORT: case GL_SHORT: + case GL_UNSIGNED_SHORT_5_6_5: + case GL_UNSIGNED_SHORT_5_6_5_REV: + case GL_UNSIGNED_SHORT_4_4_4_4: + case GL_UNSIGNED_SHORT_4_4_4_4_REV: + case GL_UNSIGNED_SHORT_5_5_5_1: + case GL_UNSIGNED_SHORT_1_5_5_5_REV: return 2; case GL_UNSIGNED_BYTE: case GL_BYTE: + case GL_UNSIGNED_BYTE_3_3_2: + case GL_UNSIGNED_BYTE_2_3_3_REV: return 1; case GL_INT: case GL_UNSIGNED_INT: case GL_FLOAT: + case GL_UNSIGNED_INT_8_8_8_8: + case GL_UNSIGNED_INT_8_8_8_8_REV: + case GL_UNSIGNED_INT_10_10_10_2: + case GL_UNSIGNED_INT_2_10_10_10_REV: return 4; default: return 0; @@ -118,24 +168,25 @@ ** Compute memory required for internal packed array of data of given type ** and format. */ -GLint __glImageSize(GLsizei width, GLsizei height, GLenum format, GLenum type) +GLint __glImageSize(GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLenum type) { int bytes_per_row; int components; - if (width < 0 || height < 0) { + if (width < 0 || height < 0 || depth < 0) { return 0; } /* ** Zero is returned if either format or type are invalid. */ - components = ElementsPerGroup(format); + components = ElementsPerGroup(format,type); if (type == GL_BITMAP) { bytes_per_row = (width + 7) >> 3; } else { bytes_per_row = BytesPerElement(type) * width; } - return bytes_per_row * height * components; + return bytes_per_row * height * depth * components; } /* @@ -148,6 +199,7 @@ GLubyte *destImage) { GLint rowLength = gc->state.storeUnpack.rowLength; + GLint imageHeight = gc->state.storeUnpack.imageHeight; GLint alignment = gc->state.storeUnpack.alignment; GLint skipPixels = gc->state.storeUnpack.skipPixels; GLint skipRows = gc->state.storeUnpack.skipRows; @@ -162,7 +214,7 @@ } else { groupsPerRow = width; } - components = ElementsPerGroup(format); + components = ElementsPerGroup(format,GL_BITMAP); rowSize = (groupsPerRow * components + 7) >> 3; padding = (rowSize % alignment); if (padding) { @@ -213,35 +265,43 @@ start += rowSize; } } + /* ** Extract array from user's data applying all pixel store modes. ** The internal packed array format used has LSB_FIRST = FALSE and ** ALIGNMENT = 1. */ -void __glFillImage(__GLXcontext *gc, GLint width, GLint height, GLenum format, - GLenum type, const GLvoid *userdata, GLubyte *newimage, - GLubyte *modes) +void __glFillImage(__GLXcontext *gc, GLint dim, GLint width, GLint height, + GLint depth, GLenum format, GLenum type, + const GLvoid *userdata, GLubyte *newimage, GLubyte *modes) { GLint rowLength = gc->state.storeUnpack.rowLength; + GLint imageHeight = gc->state.storeUnpack.imageHeight; + GLint imageDepth = gc->state.storeUnpack.imageDepth; GLint alignment = gc->state.storeUnpack.alignment; GLint skipPixels = gc->state.storeUnpack.skipPixels; GLint skipRows = gc->state.storeUnpack.skipRows; + GLint skipImages = gc->state.storeUnpack.skipImages; GLint swapBytes = gc->state.storeUnpack.swapEndian; GLint components, elementSize, rowSize, padding, groupsPerRow, groupSize; - GLint elementsPerRow, i, j, k; - const GLubyte *start, *iter; + GLint elementsPerRow, imageSize, rowsPerImage, h, i, j, k; + const GLubyte *start, *iter, *itera, *iterb, *iterc; GLubyte *iter2; if (type == GL_BITMAP) { - /* All formats except GL_BITMAP fall out trivially */ FillBitmap(gc, width, height, format, userdata, newimage); } else { - components = ElementsPerGroup(format); + components = ElementsPerGroup(format,type); if (rowLength > 0) { groupsPerRow = rowLength; } else { groupsPerRow = width; } + if (imageHeight > 0) { + rowsPerImage = imageHeight; + } else { + rowsPerImage = height; + } elementSize = BytesPerElement(type); groupSize = elementSize * components; @@ -252,50 +312,77 @@ if (padding) { rowSize += alignment - padding; } - start = ((const GLubyte*) userdata) + skipRows * rowSize - + skipPixels * groupSize; + imageSize = rowSize * rowsPerImage; + start = ((const GLubyte*) userdata) + skipImages * imageSize + + skipRows * rowSize + skipPixels * groupSize; iter2 = newimage; elementsPerRow = width * components; if (swapBytes) { - for (i = 0; i < height; i++) { - iter = start; - for (j = 0; j < elementsPerRow; j++) { - for (k = 1; k <= elementSize; k++) { - iter2[k-1] = iter[elementSize - k]; + itera = start; + for (h = 0; h < depth; h++) { + iterb = itera; + for (i = 0; i < height; i++) { + iterc = iterb; + for (j = 0; j < elementsPerRow; j++) { + for (k = 1; k <= elementSize; k++) { + iter2[k-1] = iterc[elementSize - k]; + } + iter2 += elementSize; + iterc += elementSize; } - iter2 += elementSize; - iter += elementSize; + iterb += rowSize; } - start += rowSize; + itera += imageSize; } } else { - if (rowSize == elementsPerRow * elementSize) { - /* Ha! This is mondo easy! */ - __GLX_MEM_COPY(iter2, start, - elementsPerRow * elementSize * height); - } else { - iter = start; - for (i = 0; i < height; i++) { - __GLX_MEM_COPY(iter2, iter, elementsPerRow * elementSize); - iter2 += elementsPerRow * elementSize; - iter += rowSize; + itera = start; + for (h = 0; h < depth; h++) { + if (rowSize == elementsPerRow * elementSize) { + /* Ha! This is mondo easy! */ + __GLX_MEM_COPY(iter2, itera, + elementsPerRow * elementSize * height); + iter2 += elementsPerRow * elementSize * height; + } else { + iter = itera; + for (i = 0; i < height; i++) { + __GLX_MEM_COPY(iter2, iter, elementsPerRow*elementSize); + iter2 += elementsPerRow * elementSize; + iter += rowSize; + } } - } + itera += imageSize; + } } } /* Setup store modes that describe what we just did */ if (modes) { - GLubyte *pc = modes; - __GLX_PUT_CHAR(0,GL_FALSE); - __GLX_PUT_CHAR(1,GL_FALSE); - __GLX_PUT_CHAR(2,0); - __GLX_PUT_CHAR(3,0); - __GLX_PUT_LONG(4,0); - __GLX_PUT_LONG(8,0); - __GLX_PUT_LONG(12,0); - __GLX_PUT_LONG(16,1); + if (dim == 3) { + GLubyte *pc = modes; + __GLX_PUT_CHAR(0,GL_FALSE); + __GLX_PUT_CHAR(1,GL_FALSE); + __GLX_PUT_CHAR(2,0); + __GLX_PUT_CHAR(3,0); + __GLX_PUT_LONG(4,0); + __GLX_PUT_LONG(8,0); + __GLX_PUT_LONG(12,0); + __GLX_PUT_LONG(16,0); + __GLX_PUT_LONG(20,0); + __GLX_PUT_LONG(24,0); + __GLX_PUT_LONG(28,0); + __GLX_PUT_LONG(32,1); + } else { + GLubyte *pc = modes; + __GLX_PUT_CHAR(0,GL_FALSE); + __GLX_PUT_CHAR(1,GL_FALSE); + __GLX_PUT_CHAR(2,0); + __GLX_PUT_CHAR(3,0); + __GLX_PUT_LONG(4,0); + __GLX_PUT_LONG(8,0); + __GLX_PUT_LONG(12,0); + __GLX_PUT_LONG(16,1); + } } } @@ -319,7 +406,7 @@ GLint writeMask, i; GLubyte writeByte; - components = ElementsPerGroup(format); + components = ElementsPerGroup(format,GL_BITMAP); if (rowLength > 0) { groupsPerRow = rowLength; } else { @@ -413,26 +500,37 @@ ** SWAP_BYTES = the current pixel storage pack mode, and ALIGNMENT = 4. ** Named __glEmptyImage() because it is the opposite of __glFillImage(). */ -void __glEmptyImage(__GLXcontext *gc, GLint width, GLint height, GLenum format, - GLenum type, const GLubyte *sourceImage, GLvoid *userdata) +/* ARGSUSED */ +void __glEmptyImage(__GLXcontext *gc, GLint dim, GLint width, GLint height, + GLint depth, GLenum format, GLenum type, + const GLubyte *sourceImage, GLvoid *userdata) { GLint rowLength = gc->state.storePack.rowLength; + GLint imageHeight = gc->state.storePack.imageHeight; + GLint imageDepth = gc->state.storePack.imageDepth; GLint alignment = gc->state.storePack.alignment; GLint skipPixels = gc->state.storePack.skipPixels; GLint skipRows = gc->state.storePack.skipRows; + GLint skipImages = gc->state.storePack.skipImages; GLint components, elementSize, rowSize, padding, groupsPerRow, groupSize; - GLint elementsPerRow, sourceRowSize, sourcePadding, i; - GLubyte *start, *iter; + GLint elementsPerRow, sourceRowSize, sourcePadding, g, h, i; + GLint imageSize, rowsPerImage; + GLubyte *start, *iter, *itera; if (type == GL_BITMAP) { EmptyBitmap(gc, width, height, format, sourceImage, userdata); } else { - components = ElementsPerGroup(format); + components = ElementsPerGroup(format,type); if (rowLength > 0) { groupsPerRow = rowLength; } else { groupsPerRow = width; } + if (imageHeight > 0) { + rowsPerImage = imageHeight; + } else { + rowsPerImage = height; + } elementSize = BytesPerElement(type); groupSize = elementSize * components; rowSize = groupsPerRow * groupSize; @@ -445,22 +543,28 @@ if (sourcePadding) { sourceRowSize += 4 - sourcePadding; } - start = ((GLubyte*) userdata) + skipRows * rowSize - + skipPixels * groupSize; + imageSize = sourceRowSize * rowsPerImage; + start = ((GLubyte*) userdata) + skipImages * imageSize + + skipRows * rowSize + skipPixels * groupSize; elementsPerRow = width * components; - if ((rowSize == sourceRowSize) && (sourcePadding == 0)) { - /* Ha! This is mondo easy! */ - __GLX_MEM_COPY(start, sourceImage, - elementsPerRow * elementSize * height); - } else { - iter = start; - for (i = 0; i < height; i++) { - __GLX_MEM_COPY(iter, sourceImage, - elementsPerRow * elementSize); - sourceImage += sourceRowSize; - iter += rowSize; + itera = start; + for (h = 0; h < depth; h++) { + if ((rowSize == sourceRowSize) && (sourcePadding == 0)) { + /* Ha! This is mondo easy! */ + __GLX_MEM_COPY(itera, sourceImage, + elementsPerRow * elementSize * height); + sourceImage += elementsPerRow * elementSize * height; + } else { + iter = itera; + for (i = 0; i < height; i++) { + __GLX_MEM_COPY(iter, sourceImage, + elementsPerRow * elementSize); + sourceImage += sourceRowSize; + iter += rowSize; + } } + itera += imageSize; } } } Index: xc/lib/GL/glx/pixelstore.c diff -u xc/lib/GL/glx/pixelstore.c:1.2 xc/lib/GL/glx/pixelstore.c:1.3 --- xc/lib/GL/glx/pixelstore.c:1.2 Mon Jun 14 03:23:39 1999 +++ xc/lib/GL/glx/pixelstore.c Wed Mar 21 11:04:39 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/lib/GL/glx/pixelstore.c,v 1.2 1999/06/14 07:23:39 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/pixelstore.c,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #include "packsingle.h" @@ -42,6 +56,14 @@ } gc->state.storePack.rowLength = a; break; + case GL_PACK_IMAGE_HEIGHT: + a = (GLuint) (param + 0.5); + if (((GLint) a) < 0) { + __glXSetError(gc, GL_INVALID_VALUE); + return; + } + gc->state.storePack.imageHeight = a; + break; case GL_PACK_SKIP_ROWS: a = (GLuint) (param + 0.5); if (((GLint) a) < 0) { @@ -58,6 +80,14 @@ } gc->state.storePack.skipPixels = a; break; + case GL_PACK_SKIP_IMAGES: + a = (GLuint) (param + 0.5); + if (((GLint) a) < 0) { + __glXSetError(gc, GL_INVALID_VALUE); + return; + } + gc->state.storePack.skipImages = a; + break; case GL_PACK_ALIGNMENT: a = (GLint) (param + 0.5); switch (a) { @@ -84,6 +114,14 @@ } gc->state.storeUnpack.rowLength = a; break; + case GL_UNPACK_IMAGE_HEIGHT: + a = (GLuint) (param + 0.5); + if (((GLint) a) < 0) { + __glXSetError(gc, GL_INVALID_VALUE); + return; + } + gc->state.storeUnpack.imageHeight = a; + break; case GL_UNPACK_SKIP_ROWS: a = (GLuint) (param + 0.5); if (((GLint) a) < 0) { @@ -100,6 +138,14 @@ } gc->state.storeUnpack.skipPixels = a; break; + case GL_UNPACK_SKIP_IMAGES: + a = (GLuint) (param + 0.5); + if (((GLint) a) < 0) { + __glXSetError(gc, GL_INVALID_VALUE); + return; + } + gc->state.storeUnpack.skipImages = a; + break; case GL_UNPACK_ALIGNMENT: a = (GLint) (param + 0.5); switch (a) { @@ -143,6 +189,13 @@ } gc->state.storePack.rowLength = param; break; + case GL_PACK_IMAGE_HEIGHT: + if (param < 0) { + __glXSetError(gc, GL_INVALID_VALUE); + return; + } + gc->state.storePack.imageHeight = param; + break; case GL_PACK_SKIP_ROWS: if (param < 0) { __glXSetError(gc, GL_INVALID_VALUE); @@ -157,6 +210,13 @@ } gc->state.storePack.skipPixels = param; break; + case GL_PACK_SKIP_IMAGES: + if (param < 0) { + __glXSetError(gc, GL_INVALID_VALUE); + return; + } + gc->state.storePack.skipImages = param; + break; case GL_PACK_ALIGNMENT: switch (param) { case 1: case 2: case 4: case 8: @@ -181,6 +241,13 @@ } gc->state.storeUnpack.rowLength = param; break; + case GL_UNPACK_IMAGE_HEIGHT: + if (param < 0) { + __glXSetError(gc, GL_INVALID_VALUE); + return; + } + gc->state.storeUnpack.imageHeight = param; + break; case GL_UNPACK_SKIP_ROWS: if (param < 0) { __glXSetError(gc, GL_INVALID_VALUE); @@ -195,6 +262,13 @@ } gc->state.storeUnpack.skipPixels = param; break; + case GL_UNPACK_SKIP_IMAGES: + if (param < 0) { + __glXSetError(gc, GL_INVALID_VALUE); + return; + } + gc->state.storeUnpack.skipImages = param; + break; case GL_UNPACK_ALIGNMENT: switch (param) { case 1: case 2: case 4: case 8: Index: xc/lib/GL/glx/render2.c diff -u xc/lib/GL/glx/render2.c:1.2 xc/lib/GL/glx/render2.c:1.3 --- xc/lib/GL/glx/render2.c:1.2 Mon Jun 14 03:23:39 1999 +++ xc/lib/GL/glx/render2.c Wed Mar 21 11:04:39 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/lib/GL/glx/render2.c,v 1.2 1999/06/14 07:23:39 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/render2.c,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #include "packrender.h" @@ -412,24 +426,26 @@ if (!gc->currentDpy) return; switch (cap) { - case GL_VERTEX_ARRAY: - gc->state.vertArray.vertexEnable = GL_TRUE; +#if 0 + case GL_VERTEX_ARRAY_EXT: + gc->state.vertArray.vertex.enable = GL_TRUE; return; - case GL_NORMAL_ARRAY: - gc->state.vertArray.normalEnable = GL_TRUE; + case GL_NORMAL_ARRAY_EXT: + gc->state.vertArray.normal.enable = GL_TRUE; return; - case GL_COLOR_ARRAY: - gc->state.vertArray.colorEnable = GL_TRUE; + case GL_COLOR_ARRAY_EXT: + gc->state.vertArray.color.enable = GL_TRUE; return; - case GL_INDEX_ARRAY: - gc->state.vertArray.indexEnable = GL_TRUE; + case GL_INDEX_ARRAY_EXT: + gc->state.vertArray.index.enable = GL_TRUE; return; - case GL_TEXTURE_COORD_ARRAY: - gc->state.vertArray.texCoordEnable = GL_TRUE; + case GL_TEXTURE_COORD_ARRAY_EXT: + gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].enable = GL_TRUE; return; - case GL_EDGE_FLAG_ARRAY: - gc->state.vertArray.edgeFlagEnable = GL_TRUE; + case GL_EDGE_FLAG_ARRAY_EXT: + gc->state.vertArray.edgeFlag.enable = GL_TRUE; return; +#endif } __GLX_BEGIN(X_GLrop_Enable,8); __GLX_PUT_LONG(4,cap); @@ -444,24 +460,26 @@ if (!gc->currentDpy) return; switch (cap) { - case GL_VERTEX_ARRAY: - gc->state.vertArray.vertexEnable = GL_FALSE; +#if 0 + case GL_VERTEX_ARRAY_EXT: + gc->state.vertArray.vertex.enable = GL_FALSE; return; - case GL_NORMAL_ARRAY: - gc->state.vertArray.normalEnable = GL_FALSE; + case GL_NORMAL_ARRAY_EXT: + gc->state.vertArray.normal.enable = GL_FALSE; return; - case GL_COLOR_ARRAY: - gc->state.vertArray.colorEnable = GL_FALSE; + case GL_COLOR_ARRAY_EXT: + gc->state.vertArray.color.enable = GL_FALSE; return; - case GL_INDEX_ARRAY: - gc->state.vertArray.indexEnable = GL_FALSE; + case GL_INDEX_ARRAY_EXT: + gc->state.vertArray.index.enable = GL_FALSE; return; - case GL_TEXTURE_COORD_ARRAY: - gc->state.vertArray.texCoordEnable = GL_FALSE; + case GL_TEXTURE_COORD_ARRAY_EXT: + gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].enable = GL_FALSE; return; - case GL_EDGE_FLAG_ARRAY: - gc->state.vertArray.edgeFlagEnable = GL_FALSE; + case GL_EDGE_FLAG_ARRAY_EXT: + gc->state.vertArray.edgeFlag.enable = GL_FALSE; return; +#endif } __GLX_BEGIN(X_GLrop_Disable,8); __GLX_PUT_LONG(4,cap); Index: xc/lib/GL/glx/renderpix.c diff -u xc/lib/GL/glx/renderpix.c:1.2 xc/lib/GL/glx/renderpix.c:1.3 --- xc/lib/GL/glx/renderpix.c:1.2 Mon Jun 14 03:23:39 1999 +++ xc/lib/GL/glx/renderpix.c Wed Mar 21 11:04:39 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/lib/GL/glx/renderpix.c,v 1.2 1999/06/14 07:23:39 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/renderpix.c,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #include "packrender.h" @@ -40,8 +54,8 @@ ** Send a large image to the server. If necessary, a buffer is allocated ** to hold the unpacked data that is copied from the clients memory. */ -static void SendLargeImage(__GLXcontext *gc, - GLint compsize, GLint width, GLint height, +static void SendLargeImage(__GLXcontext *gc, GLint compsize, GLint dim, + GLint width, GLint height, GLint depth, GLenum format, GLenum type, const GLvoid *src, GLubyte *pc, GLubyte *modes) { @@ -54,7 +68,8 @@ } /* Apply pixel store unpack modes to copy data into buf */ - (*gc->fillImage)(gc, width, height, format, type, src, buf, modes); + (*gc->fillImage)(gc, dim, width, height, depth, format, type, src, buf, + modes); /* Send large command */ __glXSendLargeCommand(gc, gc->pc, pc - gc->pc, buf, compsize); @@ -70,10 +85,10 @@ /* ** Send a large null image to the server. To be backwards compatible, ** data must be sent to the server even when the application has passed -** a null pointer into glTexImage1D or glTexImage2D. +** a null pointer into glTexImage1D, glTexImage2D or glTexImage3D. */ -static void SendLargeNULLImage(__GLXcontext *gc, - GLint compsize, GLint width, GLint height, +static void SendLargeNULLImage(__GLXcontext *gc, GLint compsize, + GLint width, GLint height, GLint depth, GLenum format, GLenum type, const GLvoid *src, GLubyte *pc, GLubyte *modes) { @@ -98,7 +113,7 @@ { __GLX_DECLARE_VARIABLES(); - compsize = __glImageSize(32, 32, GL_COLOR_INDEX, GL_BITMAP); + compsize = __glImageSize(32, 32, 1, GL_COLOR_INDEX, GL_BITMAP); cmdlen = __GLX_PAD(__GLX_POLYGONSTIPPLE_CMD_HDR_SIZE + compsize); __GLX_LOAD_VARIABLES(); if (!gc->currentDpy) return; @@ -107,7 +122,7 @@ pc += __GLX_RENDER_HDR_SIZE; pixelHeaderPC = pc; pc += __GLX_PIXEL_HDR_SIZE; - (*gc->fillImage)(gc, 32, 32, GL_COLOR_INDEX, GL_BITMAP, + (*gc->fillImage)(gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask, pc, pixelHeaderPC); __GLX_END(__GLX_PAD(compsize)); } @@ -117,7 +132,7 @@ { __GLX_DECLARE_VARIABLES(); - compsize = __glImageSize(width, height, GL_COLOR_INDEX, GL_BITMAP); + compsize = __glImageSize(width, height, 1, GL_COLOR_INDEX, GL_BITMAP); cmdlen = __GLX_PAD(__GLX_BITMAP_CMD_HDR_SIZE + compsize); __GLX_LOAD_VARIABLES(); if (!gc->currentDpy) return; @@ -133,8 +148,8 @@ __GLX_PUT_FLOAT(20,ymove); pc += __GLX_BITMAP_HDR_SIZE; if (compsize > 0) { - (*gc->fillImage)(gc, width, height, GL_COLOR_INDEX, GL_BITMAP, - bitmap, pc, pixelHeaderPC); + (*gc->fillImage)(gc, 2, width, height, 1, GL_COLOR_INDEX, + GL_BITMAP, bitmap, pc, pixelHeaderPC); } else { /* Setup default store modes */ GLubyte *pc = pixelHeaderPC; @@ -158,7 +173,7 @@ __GLX_PUT_FLOAT(16,xmove); __GLX_PUT_FLOAT(20,ymove); pc += __GLX_BITMAP_HDR_SIZE; - SendLargeImage(gc, compsize, width, height, GL_COLOR_INDEX, + SendLargeImage(gc, compsize, 2, width, height, 1, GL_COLOR_INDEX, GL_BITMAP, bitmap, pc, pixelHeaderPC); } } @@ -172,7 +187,7 @@ if (target == GL_PROXY_TEXTURE_1D) { compsize = 0; } else { - compsize = __glImageSize(width, 1, format, type); + compsize = __glImageSize(width, 1, 1, format, type); } cmdlen = __GLX_PAD(__GLX_TEXIMAGE_CMD_HDR_SIZE + compsize); __GLX_LOAD_VARIABLES(); @@ -190,7 +205,7 @@ __GLX_PUT_LONG(28,type); pc += __GLX_TEXIMAGE_HDR_SIZE; if (compsize > 0 && image != NULL) { - (*gc->fillImage)(gc, width, 1, format, type, + (*gc->fillImage)(gc, 1, width, 1, 1, format, type, image, pc, pixelHeaderPC); } else { /* Setup default store modes */ @@ -218,7 +233,7 @@ __GLX_PUT_LONG(28,type); pc += __GLX_TEXIMAGE_HDR_SIZE; if (image != NULL) { - SendLargeImage(gc, compsize, width, 1, format, + SendLargeImage(gc, compsize, 1, width, 1, 1, format, type, image, pc, pixelHeaderPC); } else { /* Setup default store modes */ @@ -233,7 +248,7 @@ __GLX_PUT_LONG(12,0); __GLX_PUT_LONG(16,1); } - SendLargeNULLImage(gc, compsize, width, 1, format, + SendLargeNULLImage(gc, compsize, width, 1, 1, format, type, image, pc, pixelHeaderPC); } } @@ -248,7 +263,7 @@ if (target == GL_PROXY_TEXTURE_2D) { compsize = 0; } else { - compsize = __glImageSize(width, height, format, type); + compsize = __glImageSize(width, height, 1, format, type); } cmdlen = __GLX_PAD(__GLX_TEXIMAGE_CMD_HDR_SIZE + compsize); __GLX_LOAD_VARIABLES(); @@ -267,7 +282,7 @@ __GLX_PUT_LONG(28,type); pc += __GLX_TEXIMAGE_HDR_SIZE; if (compsize > 0 && image != NULL) { - (*gc->fillImage)(gc, width, height, format, type, + (*gc->fillImage)(gc, 2, width, height, 1, format, type, image, pc, pixelHeaderPC); } else { /* Setup default store modes */ @@ -295,7 +310,7 @@ __GLX_PUT_LONG(28,type); pc += __GLX_TEXIMAGE_HDR_SIZE; if (image != NULL) { - SendLargeImage(gc, compsize, width, height, format, + SendLargeImage(gc, compsize, 2, width, height, 1, format, type, image, pc, pixelHeaderPC); } else { /* Setup default store modes */ @@ -310,7 +325,7 @@ __GLX_PUT_LONG(12,0); __GLX_PUT_LONG(16,1); } - SendLargeNULLImage(gc, compsize, width, height, format, + SendLargeNULLImage(gc, compsize, width, height, 1, format, type, image, pc, pixelHeaderPC); } } @@ -321,7 +336,7 @@ { __GLX_DECLARE_VARIABLES(); - compsize = __glImageSize(width, height, format, type); + compsize = __glImageSize(width, height, 1, format, type); cmdlen = __GLX_PAD(__GLX_DRAWPIXELS_CMD_HDR_SIZE + compsize); __GLX_LOAD_VARIABLES(); if (!gc->currentDpy) return; @@ -335,7 +350,7 @@ __GLX_PUT_LONG(12,type); pc += __GLX_DRAWPIXELS_HDR_SIZE; if (compsize > 0) { - (*gc->fillImage)(gc, width, height, format, type, + (*gc->fillImage)(gc, 2, width, height, 1, format, type, image, pc, pixelHeaderPC); } else { /* Setup default store modes */ @@ -358,7 +373,7 @@ __GLX_PUT_LONG(8,format); __GLX_PUT_LONG(12,type); pc += __GLX_DRAWPIXELS_HDR_SIZE; - SendLargeImage(gc, compsize, width, height, format, + SendLargeImage(gc, compsize, 2, width, height, 1, format, type, image, pc, pixelHeaderPC); } } @@ -366,14 +381,14 @@ static void __glx_TexSubImage1D2D(GLshort opcode, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, - const GLvoid *image) + const GLvoid *image, GLint dim) { __GLX_DECLARE_VARIABLES(); if (image == NULL) { compsize = 0; } else { - compsize = __glImageSize(width, height, format, type); + compsize = __glImageSize(width, height, 1, format, type); } cmdlen = __GLX_PAD(__GLX_TEXSUBIMAGE_CMD_HDR_SIZE + compsize); @@ -398,8 +413,8 @@ } pc += __GLX_TEXSUBIMAGE_HDR_SIZE; if (compsize > 0) { - (*gc->fillImage)(gc, width, height, format, type, image, - pc, pixelHeaderPC); + (*gc->fillImage)(gc, dim, width, height, 1, format, type, image, + pc, pixelHeaderPC); } else { /* Setup default store modes */ GLubyte *pc = pixelHeaderPC; @@ -430,7 +445,7 @@ __GLX_PUT_LONG(32,GL_FALSE); } pc += __GLX_TEXSUBIMAGE_HDR_SIZE; - SendLargeImage(gc, compsize, width, height, + SendLargeImage(gc, compsize, dim, width, height, 1, format, type, image, pc, pixelHeaderPC); } } @@ -440,7 +455,7 @@ const GLvoid *image) { __glx_TexSubImage1D2D(X_GLrop_TexSubImage1D, target, level, xoffset, - 0, width, 1, format, type, image); + 0, width, 1, format, type, image, 1); } void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, @@ -448,6 +463,442 @@ GLenum format, GLenum type, const GLvoid *image) { __glx_TexSubImage1D2D(X_GLrop_TexSubImage2D, target, level, xoffset, - yoffset, width, height, format, type, image); + yoffset, width, height, format, type, image, 2); +} + +void glColorTable(GLenum target, GLenum internalformat, GLsizei width, + GLenum format, GLenum type, const GLvoid *table) +{ + __GLX_DECLARE_VARIABLES(); + + switch (target) { + case GL_PROXY_TEXTURE_1D: + case GL_PROXY_TEXTURE_2D: + case GL_PROXY_TEXTURE_3D: + case GL_PROXY_COLOR_TABLE: + case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE: + case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE: + compsize = 0; + break; + default: + compsize = __glImageSize(width, 1, 1, format, type); + break; + } + cmdlen = __GLX_PAD(__GLX_COLOR_TABLE_CMD_HDR_SIZE + compsize); + __GLX_LOAD_VARIABLES(); + if (!gc->currentDpy) { + return; + } + + if (cmdlen <= gc->maxSmallRenderCommandSize) { + /* Use GLXRender protocol to send small command */ + __GLX_BEGIN_VARIABLE_WITH_PIXEL(X_GLrop_ColorTable, (short)cmdlen); + __GLX_PUT_LONG(0, (long)target); + __GLX_PUT_LONG(4, (long)internalformat); + __GLX_PUT_LONG(8, width); + __GLX_PUT_LONG(12, (long)format); + __GLX_PUT_LONG(16, (long)type); + pc += __GLX_COLOR_TABLE_HDR_SIZE; + if (compsize > 0 && table != NULL) { + (*gc->fillImage)(gc, 1, width, 1, 1, format, type, table, pc, + pixelHeaderPC); + } else { + /* Setup default store modes */ + GLubyte *pc = pixelHeaderPC; + __GLX_PUT_CHAR(0, GL_FALSE); + __GLX_PUT_CHAR(1, GL_FALSE); + __GLX_PUT_CHAR(2, 0); + __GLX_PUT_CHAR(3, 0); + __GLX_PUT_LONG(4, 0); + __GLX_PUT_LONG(8, 0); + __GLX_PUT_LONG(12, 0); + __GLX_PUT_LONG(16, 1); + } + __GLX_END(__GLX_PAD(compsize)); + } else { + /* Use GLXRenderLarge protocol to send command */ + __GLX_BEGIN_VARIABLE_LARGE_WITH_PIXEL(X_GLrop_ColorTable, cmdlen+4); + __GLX_PUT_LONG(0, (long)target); + __GLX_PUT_LONG(4, (long)internalformat); + __GLX_PUT_LONG(8, width); + __GLX_PUT_LONG(12, (long)format); + __GLX_PUT_LONG(16, (long)type); + pc += __GLX_COLOR_TABLE_HDR_SIZE; + SendLargeImage(gc, compsize, 1, width, 1, 1, format, + type, table, pc, pixelHeaderPC); + } +} + +void glColorSubTable(GLenum target, GLsizei start, GLsizei count, + GLenum format, GLenum type, const GLvoid *table) +{ + __GLX_DECLARE_VARIABLES(); + + compsize = __glImageSize(count, 1, 1, format, type); + cmdlen = __GLX_PAD(__GLX_COLOR_SUBTABLE_CMD_HDR_SIZE + compsize); + __GLX_LOAD_VARIABLES(); + if (!gc->currentDpy) { + return; + } + + if (cmdlen <= gc->maxSmallRenderCommandSize) { + /* Use GLXRender protocol to send small command */ + __GLX_BEGIN_VARIABLE_WITH_PIXEL(X_GLrop_ColorSubTable, (short)cmdlen); + __GLX_PUT_LONG(0, (long)target); + __GLX_PUT_LONG(4, start); + __GLX_PUT_LONG(8, count); + __GLX_PUT_LONG(12, (long)format); + __GLX_PUT_LONG(16, (long)type); + pc += __GLX_COLOR_SUBTABLE_HDR_SIZE; + if (compsize > 0 && table != NULL) { + (*gc->fillImage)(gc, 1, start+count, 1, 1, format, type, table, pc, + pixelHeaderPC); + } else { + /* Setup default store modes */ + GLubyte *pc = pixelHeaderPC; + __GLX_PUT_CHAR(0, GL_FALSE); + __GLX_PUT_CHAR(1, GL_FALSE); + __GLX_PUT_CHAR(2, 0); + __GLX_PUT_CHAR(3, 0); + __GLX_PUT_LONG(4, 0); + __GLX_PUT_LONG(8, 0); + __GLX_PUT_LONG(12, 0); + __GLX_PUT_LONG(16, 1); + } + __GLX_END(__GLX_PAD(compsize)); + } else { + /* Use GLXRenderLarge protocol to send command */ + __GLX_BEGIN_VARIABLE_LARGE_WITH_PIXEL(X_GLrop_ColorSubTable, cmdlen+4); + __GLX_PUT_LONG(0, (long)target); + __GLX_PUT_LONG(4, start); + __GLX_PUT_LONG(8, count); + __GLX_PUT_LONG(12, (long)format); + __GLX_PUT_LONG(16, (long)type); + pc += __GLX_COLOR_SUBTABLE_HDR_SIZE; + SendLargeImage(gc, compsize, 1, start+count, 1, 1, format, + type, table, pc, pixelHeaderPC); + } } +static void __glx_ConvolutionFilter1D2D(GLshort opcode, GLint dim, + GLenum target, + GLenum internalformat, + GLsizei width, GLsizei height, + GLenum format, GLenum type, const GLvoid *image) +{ + __GLX_DECLARE_VARIABLES(); + + compsize = __glImageSize(width, height, 1, format, type); + cmdlen = __GLX_PAD(__GLX_CONV_FILT_CMD_HDR_SIZE + compsize); + __GLX_LOAD_VARIABLES(); + if (!gc->currentDpy) return; + + if (cmdlen <= gc->maxSmallRenderCommandSize) { + /* Use GLXRender protocol to send small command */ + __GLX_BEGIN_VARIABLE_WITH_PIXEL(opcode, cmdlen); + __GLX_PUT_LONG(0,target); + __GLX_PUT_LONG(4,internalformat); + __GLX_PUT_LONG(8,width); + __GLX_PUT_LONG(12,height); + __GLX_PUT_LONG(16,format); + __GLX_PUT_LONG(20,type); + pc += __GLX_CONV_FILT_HDR_SIZE; + if (compsize > 0) { + (*gc->fillImage)(gc, dim, width, height, 1, format, type, + image, pc, pixelHeaderPC); + } else { + /* Setup default store modes */ + GLubyte *pc = pixelHeaderPC; + __GLX_PUT_CHAR(0,GL_FALSE); + __GLX_PUT_CHAR(1,GL_FALSE); + __GLX_PUT_CHAR(2,0); + __GLX_PUT_CHAR(3,0); + __GLX_PUT_LONG(4,0); + __GLX_PUT_LONG(8,0); + __GLX_PUT_LONG(12,0); + __GLX_PUT_LONG(16,1); + } + __GLX_END(__GLX_PAD(compsize)); + } else { + /* Use GLXRenderLarge protocol to send command */ + __GLX_BEGIN_VARIABLE_LARGE_WITH_PIXEL(opcode,cmdlen+4); + __GLX_PUT_LONG(0,target); + __GLX_PUT_LONG(4,internalformat); + __GLX_PUT_LONG(8,width); + __GLX_PUT_LONG(12,height); + __GLX_PUT_LONG(16,format); + __GLX_PUT_LONG(20,type); + pc += __GLX_CONV_FILT_HDR_SIZE; + SendLargeImage(gc, compsize, dim, width, height, 1, format, + type, image, pc, pixelHeaderPC); + } +} + +void glConvolutionFilter1D(GLenum target, GLenum internalformat, + GLsizei width, GLenum format, + GLenum type, const GLvoid *image) +{ + __glx_ConvolutionFilter1D2D(X_GLrop_ConvolutionFilter1D, 1, target, + internalformat, width, 1, format, type, + image); +} + +void glConvolutionFilter2D(GLenum target, GLenum internalformat, + GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *image) +{ + __glx_ConvolutionFilter1D2D(X_GLrop_ConvolutionFilter2D, 2, target, + internalformat, width, height, format, type, + image); +} + +void glSeparableFilter2D(GLenum target, GLenum internalformat, + GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *row, + const GLvoid *column) +{ + __GLX_DECLARE_VARIABLES(); + GLuint compsize2, hdrlen, totalhdrlen, image1len, image2len; + + compsize = __glImageSize(width, 1, 1, format, type); + compsize2 = __glImageSize(height, 1, 1, format, type); + totalhdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_HDR_SIZE); + hdrlen = __GLX_PAD(__GLX_CONV_FILT_HDR_SIZE); + image1len = __GLX_PAD(compsize); + image2len = __GLX_PAD(compsize2); + cmdlen = totalhdrlen + image1len + image2len; + __GLX_LOAD_VARIABLES(); + if (!gc->currentDpy) return; + + if (cmdlen <= gc->maxSmallRenderCommandSize) { + /* Use GLXRender protocol to send small command */ + __GLX_BEGIN_VARIABLE_WITH_PIXEL(X_GLrop_SeparableFilter2D, cmdlen); + __GLX_PUT_LONG(0,target); + __GLX_PUT_LONG(4,internalformat); + __GLX_PUT_LONG(8,width); + __GLX_PUT_LONG(12,height); + __GLX_PUT_LONG(16,format); + __GLX_PUT_LONG(20,type); + pc += hdrlen; + if (compsize > 0) { + (*gc->fillImage)(gc, 1, width, 1, 1, format, type, + row, pc, pixelHeaderPC); + pc += image1len; + } + if (compsize2 > 0) { + (*gc->fillImage)(gc, 1, height, 1, 1, format, type, + column, pc, NULL); + pc += image2len; + } + if ((compsize == 0) && (compsize2 == 0)) { + /* Setup default store modes */ + GLubyte *pc = pixelHeaderPC; + __GLX_PUT_CHAR(0,GL_FALSE); + __GLX_PUT_CHAR(1,GL_FALSE); + __GLX_PUT_CHAR(2,0); + __GLX_PUT_CHAR(3,0); + __GLX_PUT_LONG(4,0); + __GLX_PUT_LONG(8,0); + __GLX_PUT_LONG(12,0); + __GLX_PUT_LONG(16,1); + } + __GLX_END(0); + } else { + GLint bufsize; + + bufsize = image1len + image2len; + + /* Use GLXRenderLarge protocol to send command */ + __GLX_BEGIN_VARIABLE_LARGE_WITH_PIXEL(X_GLrop_SeparableFilter2D,cmdlen+4); + __GLX_PUT_LONG(0,target); + __GLX_PUT_LONG(4,internalformat); + __GLX_PUT_LONG(8,width); + __GLX_PUT_LONG(12,height); + __GLX_PUT_LONG(16,format); + __GLX_PUT_LONG(20,type); + pc += hdrlen; + + if (!gc->fastImageUnpack) { + /* Allocate a temporary holding buffer */ + GLubyte *buf = (GLubyte *) Xmalloc(bufsize); + if (!buf) { + __glXSetError(gc, GL_OUT_OF_MEMORY); + return; + } + (*gc->fillImage)(gc, 1, width, 1, 1, format, type, row, buf, pixelHeaderPC); + + (*gc->fillImage)(gc, 1, height, 1, 1, format, type, column, + buf + image1len, pixelHeaderPC); + + /* Send large command */ + __glXSendLargeCommand(gc, gc->pc, (GLint)(pc - gc->pc), buf, bufsize); + /* Free buffer */ + Xfree((char*) buf); + } else { + /* Just send the data straight as is */ + __glXSendLargeCommand(gc, gc->pc, (GLint)(pc - gc->pc), pc, bufsize); + } + } +} + +void glTexImage3D(GLenum target, GLint level, GLint internalformat, + GLsizei width, GLsizei height, GLsizei depth, GLint border, + GLenum format, GLenum type, const GLvoid *image) +{ + __GLX_DECLARE_VARIABLES(); + + if ((target == GL_PROXY_TEXTURE_3D) || (image == NULL)) { + compsize = 0; + } else { + compsize = __glImageSize(width, height, depth, format, type); + } + cmdlen = __GLX_PAD(__GLX_TEXIMAGE_3D_CMD_HDR_SIZE + compsize); + __GLX_LOAD_VARIABLES(); + if (!gc->currentDpy) return; + + if (cmdlen <= gc->maxSmallRenderCommandSize) { + /* Use GLXRender protocol to send small command */ + __GLX_BEGIN_VARIABLE_WITH_PIXEL_3D(X_GLrop_TexImage3D,cmdlen); + __GLX_PUT_LONG(0,target); + __GLX_PUT_LONG(4,level); + __GLX_PUT_LONG(8,internalformat); + __GLX_PUT_LONG(12,width); + __GLX_PUT_LONG(16,height); + __GLX_PUT_LONG(20,depth); + __GLX_PUT_LONG(24,0); /* size4d */ + __GLX_PUT_LONG(28,border); + __GLX_PUT_LONG(32,format); + __GLX_PUT_LONG(36,type); + if (image == NULL) { + __GLX_PUT_LONG(40,GL_TRUE); + } else { + __GLX_PUT_LONG(40,GL_FALSE); + } + pc += __GLX_TEXIMAGE_3D_HDR_SIZE; + if (compsize > 0 && image != NULL) { + (*gc->fillImage)(gc, 3, width, height, depth, format, type, + image, pc, pixelHeaderPC); + } else { + /* Setup default store modes */ + GLubyte *pc = pixelHeaderPC; + __GLX_PUT_CHAR(0,GL_FALSE); + __GLX_PUT_CHAR(1,GL_FALSE); + __GLX_PUT_CHAR(2,0); + __GLX_PUT_CHAR(3,0); + __GLX_PUT_LONG(4,0); + __GLX_PUT_LONG(8,0); + __GLX_PUT_LONG(12,0); + __GLX_PUT_LONG(16,0); + __GLX_PUT_LONG(20,0); + __GLX_PUT_LONG(24,0); + __GLX_PUT_LONG(28,0); + __GLX_PUT_LONG(32,1); + } + __GLX_END(__GLX_PAD(compsize)); + } else { + /* Use GLXRenderLarge protocol to send command */ + __GLX_BEGIN_VARIABLE_LARGE_WITH_PIXEL_3D(X_GLrop_TexImage3D,cmdlen+4); + __GLX_PUT_LONG(0,target); + __GLX_PUT_LONG(4,level); + __GLX_PUT_LONG(8,internalformat); + __GLX_PUT_LONG(12,width); + __GLX_PUT_LONG(16,height); + __GLX_PUT_LONG(20,depth); + __GLX_PUT_LONG(24,0); /* size4d */ + __GLX_PUT_LONG(28,border); + __GLX_PUT_LONG(32,format); + __GLX_PUT_LONG(36,type); + if (image == NULL) { + __GLX_PUT_LONG(40,GL_TRUE); + } else { + __GLX_PUT_LONG(40,GL_FALSE); + } + pc += __GLX_TEXIMAGE_3D_HDR_SIZE; + SendLargeImage(gc, compsize, 3, width, height, depth, format, + type, image, pc, pixelHeaderPC); + } +} + +void glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth, GLenum format, GLenum type, + const GLvoid *image) +{ + __GLX_DECLARE_VARIABLES(); + + if (image == NULL) { + compsize = 0; + } else { + compsize = __glImageSize(width, height, depth, format, type); + } + cmdlen = __GLX_PAD(__GLX_TEXSUBIMAGE_3D_CMD_HDR_SIZE + compsize); + __GLX_LOAD_VARIABLES(); + if (!gc->currentDpy) return; + + if (cmdlen <= gc->maxSmallRenderCommandSize) { + /* Use GLXRender protocol to send small command */ + __GLX_BEGIN_VARIABLE_WITH_PIXEL_3D(X_GLrop_TexSubImage3D,cmdlen); + __GLX_PUT_LONG(0,target); + __GLX_PUT_LONG(4,level); + __GLX_PUT_LONG(8,xoffset); + __GLX_PUT_LONG(12,yoffset); + __GLX_PUT_LONG(16,zoffset); + __GLX_PUT_LONG(20,0); /* woffset */ + __GLX_PUT_LONG(24,width); + __GLX_PUT_LONG(28,height); + __GLX_PUT_LONG(32,depth); + __GLX_PUT_LONG(36,0); /* size4d */ + __GLX_PUT_LONG(40,format); + __GLX_PUT_LONG(44,type); + if (image == NULL) { + __GLX_PUT_LONG(48,GL_TRUE); + } else { + __GLX_PUT_LONG(48,GL_FALSE); + } + pc += __GLX_TEXSUBIMAGE_3D_HDR_SIZE; + if (compsize > 0) { + (*gc->fillImage)(gc, 3, width, height, depth, format, type, image, + pc, pixelHeaderPC); + } else { + /* Setup default store modes */ + GLubyte *pc = pixelHeaderPC; + __GLX_PUT_CHAR(0,GL_FALSE); + __GLX_PUT_CHAR(1,GL_FALSE); + __GLX_PUT_CHAR(2,0); + __GLX_PUT_CHAR(3,0); + __GLX_PUT_LONG(4,0); + __GLX_PUT_LONG(8,0); + __GLX_PUT_LONG(12,0); + __GLX_PUT_LONG(16,0); + __GLX_PUT_LONG(20,0); + __GLX_PUT_LONG(24,0); + __GLX_PUT_LONG(28,0); + __GLX_PUT_LONG(32,1); + } + __GLX_END(__GLX_PAD(compsize)); + } else { + /* Use GLXRenderLarge protocol to send command */ + __GLX_BEGIN_VARIABLE_LARGE_WITH_PIXEL_3D(X_GLrop_TexSubImage3D, + cmdlen+4); + __GLX_PUT_LONG(0,target); + __GLX_PUT_LONG(4,level); + __GLX_PUT_LONG(8,xoffset); + __GLX_PUT_LONG(12,yoffset); + __GLX_PUT_LONG(16,zoffset); + __GLX_PUT_LONG(20,0); /* woffset */ + __GLX_PUT_LONG(24,width); + __GLX_PUT_LONG(28,height); + __GLX_PUT_LONG(32,depth); + __GLX_PUT_LONG(36,0); /* size4d */ + __GLX_PUT_LONG(40,format); + __GLX_PUT_LONG(44,type); + if (image == NULL) { + __GLX_PUT_LONG(48,GL_TRUE); + } else { + __GLX_PUT_LONG(48,GL_FALSE); + } + pc += __GLX_TEXSUBIMAGE_3D_HDR_SIZE; + SendLargeImage(gc, compsize, 3, width, height, depth, format, type, + image, pc, pixelHeaderPC); + } +} Index: xc/lib/GL/glx/single2.c diff -u xc/lib/GL/glx/single2.c:1.2 xc/lib/GL/glx/single2.c:1.3 --- xc/lib/GL/glx/single2.c:1.2 Mon Jun 14 03:23:39 1999 +++ xc/lib/GL/glx/single2.c Wed Mar 21 11:04:39 2001 @@ -1,27 +1,42 @@ -/* $XFree86: xc/lib/GL/glx/single2.c,v 1.2 1999/06/14 07:23:39 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/single2.c,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ -#include "packsingle.h" +#define NEED_GL_FUNCS_WRAPPED #include "glxclient.h" +#include "packsingle.h" GLenum glGetError(void) { @@ -86,12 +101,18 @@ case GL_PACK_ROW_LENGTH: *b = (GLboolean)gc->state.storePack.rowLength; break; + case GL_PACK_IMAGE_HEIGHT: + *b = (GLboolean)gc->state.storePack.imageHeight; + break; case GL_PACK_SKIP_ROWS: *b = (GLboolean)gc->state.storePack.skipRows; break; case GL_PACK_SKIP_PIXELS: *b = (GLboolean)gc->state.storePack.skipPixels; break; + case GL_PACK_SKIP_IMAGES: + *b = (GLboolean)gc->state.storePack.skipImages; + break; case GL_PACK_ALIGNMENT: *b = (GLboolean)gc->state.storePack.alignment; break; @@ -104,12 +125,18 @@ case GL_UNPACK_ROW_LENGTH: *b = (GLboolean)gc->state.storeUnpack.rowLength; break; + case GL_UNPACK_IMAGE_HEIGHT: + *b = (GLboolean)gc->state.storeUnpack.imageHeight; + break; case GL_UNPACK_SKIP_ROWS: *b = (GLboolean)gc->state.storeUnpack.skipRows; break; case GL_UNPACK_SKIP_PIXELS: *b = (GLboolean)gc->state.storeUnpack.skipPixels; break; + case GL_UNPACK_SKIP_IMAGES: + *b = (GLboolean)gc->state.storeUnpack.skipImages; + break; case GL_UNPACK_ALIGNMENT: *b = (GLboolean)gc->state.storeUnpack.alignment; break; @@ -120,68 +147,77 @@ *b = (GLboolean)gc->state.storeUnpack.lsbFirst; break; case GL_VERTEX_ARRAY: - *b = (GLboolean)gc->state.vertArray.vertexEnable; + *b = (GLboolean)gc->state.vertArray.vertex.enable; break; case GL_VERTEX_ARRAY_SIZE: - *b = (GLboolean)gc->state.vertArray.vertexSize; + *b = (GLboolean)gc->state.vertArray.vertex.size; break; case GL_VERTEX_ARRAY_TYPE: - *b = (GLboolean)gc->state.vertArray.vertexType; + *b = (GLboolean)gc->state.vertArray.vertex.type; break; case GL_VERTEX_ARRAY_STRIDE: - *b = (GLboolean)gc->state.vertArray.vertexStride; + *b = (GLboolean)gc->state.vertArray.vertex.stride; break; case GL_NORMAL_ARRAY: - *b = (GLboolean)gc->state.vertArray.normalEnable; + *b = (GLboolean)gc->state.vertArray.normal.enable; break; case GL_NORMAL_ARRAY_TYPE: - *b = (GLboolean)gc->state.vertArray.normalType; + *b = (GLboolean)gc->state.vertArray.normal.type; break; case GL_NORMAL_ARRAY_STRIDE: - *b = (GLboolean)gc->state.vertArray.normalStride; + *b = (GLboolean)gc->state.vertArray.normal.stride; break; case GL_COLOR_ARRAY: - *b = (GLboolean)gc->state.vertArray.colorEnable; + *b = (GLboolean)gc->state.vertArray.color.enable; break; case GL_COLOR_ARRAY_SIZE: - *b = (GLboolean)gc->state.vertArray.colorSize; + *b = (GLboolean)gc->state.vertArray.color.size; break; case GL_COLOR_ARRAY_TYPE: - *b = (GLboolean)gc->state.vertArray.colorType; + *b = (GLboolean)gc->state.vertArray.color.type; break; case GL_COLOR_ARRAY_STRIDE: - *b = (GLboolean)gc->state.vertArray.colorStride; + *b = (GLboolean)gc->state.vertArray.color.stride; break; case GL_INDEX_ARRAY: - *b = (GLboolean)gc->state.vertArray.indexEnable; + *b = (GLboolean)gc->state.vertArray.index.enable; break; case GL_INDEX_ARRAY_TYPE: - *b = (GLboolean)gc->state.vertArray.indexType; + *b = (GLboolean)gc->state.vertArray.index.type; break; case GL_INDEX_ARRAY_STRIDE: - *b = (GLboolean)gc->state.vertArray.indexStride; + *b = (GLboolean)gc->state.vertArray.index.stride; break; case GL_TEXTURE_COORD_ARRAY: - *b = (GLboolean)gc->state.vertArray.texCoordEnable; + *b = (GLboolean)gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].enable; break; case GL_TEXTURE_COORD_ARRAY_SIZE: - *b = (GLboolean)gc->state.vertArray.texCoordSize; + *b = (GLboolean)gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].size; break; case GL_TEXTURE_COORD_ARRAY_TYPE: - *b = (GLboolean)gc->state.vertArray.texCoordType; + *b = (GLboolean)gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].type; break; case GL_TEXTURE_COORD_ARRAY_STRIDE: - *b = (GLboolean)gc->state.vertArray.texCoordStride; + *b = (GLboolean)gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].stride; break; case GL_EDGE_FLAG_ARRAY: - *b = (GLboolean)gc->state.vertArray.edgeFlagEnable; + *b = (GLboolean)gc->state.vertArray.edgeFlag.enable; break; case GL_EDGE_FLAG_ARRAY_STRIDE: - *b = (GLboolean)gc->state.vertArray.edgeFlagStride; + *b = (GLboolean)gc->state.vertArray.edgeFlag.stride; + break; + case GL_MAX_ELEMENTS_VERTICES: + *b = (GLboolean)gc->state.vertArray.maxElementsVertices; break; + case GL_MAX_ELEMENTS_INDICES: + *b = (GLboolean)gc->state.vertArray.maxElementsIndices; + break; case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: *b = (GLboolean)__GL_CLIENT_ATTRIB_STACK_DEPTH; break; + case GL_CLIENT_ACTIVE_TEXTURE_ARB: + *b = (GLboolean)(gc->state.vertArray.activeTexture + GL_TEXTURE0_ARB); + break; default: /* ** Not a local value, so use what we got from the server. @@ -223,12 +259,18 @@ case GL_PACK_ROW_LENGTH: *d = (GLdouble)gc->state.storePack.rowLength; break; + case GL_PACK_IMAGE_HEIGHT: + *d = (GLdouble)gc->state.storePack.imageHeight; + break; case GL_PACK_SKIP_ROWS: *d = (GLdouble)gc->state.storePack.skipRows; break; case GL_PACK_SKIP_PIXELS: *d = (GLdouble)gc->state.storePack.skipPixels; break; + case GL_PACK_SKIP_IMAGES: + *d = (GLdouble)gc->state.storePack.skipImages; + break; case GL_PACK_ALIGNMENT: *d = (GLdouble)gc->state.storePack.alignment; break; @@ -241,12 +283,18 @@ case GL_UNPACK_ROW_LENGTH: *d = (GLdouble)gc->state.storeUnpack.rowLength; break; + case GL_UNPACK_IMAGE_HEIGHT: + *d = (GLdouble)gc->state.storeUnpack.imageHeight; + break; case GL_UNPACK_SKIP_ROWS: *d = (GLdouble)gc->state.storeUnpack.skipRows; break; case GL_UNPACK_SKIP_PIXELS: *d = (GLdouble)gc->state.storeUnpack.skipPixels; break; + case GL_UNPACK_SKIP_IMAGES: + *d = (GLdouble)gc->state.storeUnpack.skipImages; + break; case GL_UNPACK_ALIGNMENT: *d = (GLdouble)gc->state.storeUnpack.alignment; break; @@ -257,68 +305,77 @@ *d = (GLdouble)gc->state.storeUnpack.lsbFirst; break; case GL_VERTEX_ARRAY: - *d = (GLdouble)gc->state.vertArray.vertexEnable; + *d = (GLdouble)gc->state.vertArray.vertex.enable; break; case GL_VERTEX_ARRAY_SIZE: - *d = (GLdouble)gc->state.vertArray.vertexSize; + *d = (GLdouble)gc->state.vertArray.vertex.size; break; case GL_VERTEX_ARRAY_TYPE: - *d = (GLdouble)gc->state.vertArray.vertexType; + *d = (GLdouble)gc->state.vertArray.vertex.type; break; case GL_VERTEX_ARRAY_STRIDE: - *d = (GLdouble)gc->state.vertArray.vertexStride; + *d = (GLdouble)gc->state.vertArray.vertex.stride; break; case GL_NORMAL_ARRAY: - *d = (GLdouble)gc->state.vertArray.normalEnable; + *d = (GLdouble)gc->state.vertArray.normal.enable; break; case GL_NORMAL_ARRAY_TYPE: - *d = (GLdouble)gc->state.vertArray.normalType; + *d = (GLdouble)gc->state.vertArray.normal.type; break; case GL_NORMAL_ARRAY_STRIDE: - *d = (GLdouble)gc->state.vertArray.normalStride; + *d = (GLdouble)gc->state.vertArray.normal.stride; break; case GL_COLOR_ARRAY: - *d = (GLdouble)gc->state.vertArray.colorEnable; + *d = (GLdouble)gc->state.vertArray.color.enable; break; case GL_COLOR_ARRAY_SIZE: - *d = (GLdouble)gc->state.vertArray.colorSize; + *d = (GLdouble)gc->state.vertArray.color.size; break; case GL_COLOR_ARRAY_TYPE: - *d = (GLdouble)gc->state.vertArray.colorType; + *d = (GLdouble)gc->state.vertArray.color.type; break; case GL_COLOR_ARRAY_STRIDE: - *d = (GLdouble)gc->state.vertArray.colorStride; + *d = (GLdouble)gc->state.vertArray.color.stride; break; case GL_INDEX_ARRAY: - *d = (GLdouble)gc->state.vertArray.indexEnable; + *d = (GLdouble)gc->state.vertArray.index.enable; break; case GL_INDEX_ARRAY_TYPE: - *d = (GLdouble)gc->state.vertArray.indexType; + *d = (GLdouble)gc->state.vertArray.index.type; break; case GL_INDEX_ARRAY_STRIDE: - *d = (GLdouble)gc->state.vertArray.indexStride; + *d = (GLdouble)gc->state.vertArray.index.stride; break; case GL_TEXTURE_COORD_ARRAY: - *d = (GLdouble)gc->state.vertArray.texCoordEnable; + *d = (GLdouble)gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].enable; break; case GL_TEXTURE_COORD_ARRAY_SIZE: - *d = (GLdouble)gc->state.vertArray.texCoordSize; + *d = (GLdouble)gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].size; break; case GL_TEXTURE_COORD_ARRAY_TYPE: - *d = (GLdouble)gc->state.vertArray.texCoordType; + *d = (GLdouble)gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].type; break; case GL_TEXTURE_COORD_ARRAY_STRIDE: - *d = (GLdouble)gc->state.vertArray.texCoordStride; + *d = (GLdouble)gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].stride; break; case GL_EDGE_FLAG_ARRAY: - *d = (GLdouble)gc->state.vertArray.edgeFlagEnable; + *d = (GLdouble)gc->state.vertArray.edgeFlag.enable; break; case GL_EDGE_FLAG_ARRAY_STRIDE: - *d = (GLdouble)gc->state.vertArray.edgeFlagStride; + *d = (GLdouble)gc->state.vertArray.edgeFlag.stride; + break; + case GL_MAX_ELEMENTS_VERTICES: + *d = (GLdouble)gc->state.vertArray.maxElementsVertices; + break; + case GL_MAX_ELEMENTS_INDICES: + *d = (GLdouble)gc->state.vertArray.maxElementsIndices; break; case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: *d = (GLdouble)__GL_CLIENT_ATTRIB_STACK_DEPTH; break; + case GL_CLIENT_ACTIVE_TEXTURE_ARB: + *d = (GLdouble)(gc->state.vertArray.activeTexture + GL_TEXTURE0_ARB); + break; default: /* ** Not a local value, so use what we got from the server. @@ -360,12 +417,18 @@ case GL_PACK_ROW_LENGTH: *f = (GLfloat)gc->state.storePack.rowLength; break; + case GL_PACK_IMAGE_HEIGHT: + *f = (GLfloat)gc->state.storePack.imageHeight; + break; case GL_PACK_SKIP_ROWS: *f = (GLfloat)gc->state.storePack.skipRows; break; case GL_PACK_SKIP_PIXELS: *f = (GLfloat)gc->state.storePack.skipPixels; break; + case GL_PACK_SKIP_IMAGES: + *f = (GLfloat)gc->state.storePack.skipImages; + break; case GL_PACK_ALIGNMENT: *f = (GLfloat)gc->state.storePack.alignment; break; @@ -378,12 +441,18 @@ case GL_UNPACK_ROW_LENGTH: *f = (GLfloat)gc->state.storeUnpack.rowLength; break; + case GL_UNPACK_IMAGE_HEIGHT: + *f = (GLfloat)gc->state.storeUnpack.imageHeight; + break; case GL_UNPACK_SKIP_ROWS: *f = (GLfloat)gc->state.storeUnpack.skipRows; break; case GL_UNPACK_SKIP_PIXELS: *f = (GLfloat)gc->state.storeUnpack.skipPixels; break; + case GL_UNPACK_SKIP_IMAGES: + *f = (GLfloat)gc->state.storeUnpack.skipImages; + break; case GL_UNPACK_ALIGNMENT: *f = (GLfloat)gc->state.storeUnpack.alignment; break; @@ -394,68 +463,77 @@ *f = (GLfloat)gc->state.storeUnpack.lsbFirst; break; case GL_VERTEX_ARRAY: - *f = (GLfloat)gc->state.vertArray.vertexEnable; + *f = (GLfloat)gc->state.vertArray.vertex.enable; break; case GL_VERTEX_ARRAY_SIZE: - *f = (GLfloat)gc->state.vertArray.vertexSize; + *f = (GLfloat)gc->state.vertArray.vertex.size; break; case GL_VERTEX_ARRAY_TYPE: - *f = (GLfloat)gc->state.vertArray.vertexType; + *f = (GLfloat)gc->state.vertArray.vertex.type; break; case GL_VERTEX_ARRAY_STRIDE: - *f = (GLfloat)gc->state.vertArray.vertexStride; + *f = (GLfloat)gc->state.vertArray.vertex.stride; break; case GL_NORMAL_ARRAY: - *f = (GLfloat)gc->state.vertArray.normalEnable; + *f = (GLfloat)gc->state.vertArray.normal.enable; break; case GL_NORMAL_ARRAY_TYPE: - *f = (GLfloat)gc->state.vertArray.normalType; + *f = (GLfloat)gc->state.vertArray.normal.type; break; case GL_NORMAL_ARRAY_STRIDE: - *f = (GLfloat)gc->state.vertArray.normalStride; + *f = (GLfloat)gc->state.vertArray.normal.stride; break; case GL_COLOR_ARRAY: - *f = (GLfloat)gc->state.vertArray.colorEnable; + *f = (GLfloat)gc->state.vertArray.color.enable; break; case GL_COLOR_ARRAY_SIZE: - *f = (GLfloat)gc->state.vertArray.colorSize; + *f = (GLfloat)gc->state.vertArray.color.size; break; case GL_COLOR_ARRAY_TYPE: - *f = (GLfloat)gc->state.vertArray.colorType; + *f = (GLfloat)gc->state.vertArray.color.type; break; case GL_COLOR_ARRAY_STRIDE: - *f = (GLfloat)gc->state.vertArray.colorStride; + *f = (GLfloat)gc->state.vertArray.color.stride; break; case GL_INDEX_ARRAY: - *f = (GLfloat)gc->state.vertArray.indexEnable; + *f = (GLfloat)gc->state.vertArray.index.enable; break; case GL_INDEX_ARRAY_TYPE: - *f = (GLfloat)gc->state.vertArray.indexType; + *f = (GLfloat)gc->state.vertArray.index.type; break; case GL_INDEX_ARRAY_STRIDE: - *f = (GLfloat)gc->state.vertArray.indexStride; + *f = (GLfloat)gc->state.vertArray.index.stride; break; case GL_TEXTURE_COORD_ARRAY: - *f = (GLfloat)gc->state.vertArray.texCoordEnable; + *f = (GLfloat)gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].enable; break; case GL_TEXTURE_COORD_ARRAY_SIZE: - *f = (GLfloat)gc->state.vertArray.texCoordSize; + *f = (GLfloat)gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].size; break; case GL_TEXTURE_COORD_ARRAY_TYPE: - *f = (GLfloat)gc->state.vertArray.texCoordType; + *f = (GLfloat)gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].type; break; case GL_TEXTURE_COORD_ARRAY_STRIDE: - *f = (GLfloat)gc->state.vertArray.texCoordStride; + *f = (GLfloat)gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].stride; break; case GL_EDGE_FLAG_ARRAY: - *f = (GLfloat)gc->state.vertArray.edgeFlagEnable; + *f = (GLfloat)gc->state.vertArray.edgeFlag.enable; break; case GL_EDGE_FLAG_ARRAY_STRIDE: - *f = (GLfloat)gc->state.vertArray.edgeFlagStride; + *f = (GLfloat)gc->state.vertArray.edgeFlag.stride; + break; + case GL_MAX_ELEMENTS_VERTICES: + *f = (GLfloat)gc->state.vertArray.maxElementsVertices; break; + case GL_MAX_ELEMENTS_INDICES: + *f = (GLfloat)gc->state.vertArray.maxElementsIndices; + break; case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: *f = (GLfloat)__GL_CLIENT_ATTRIB_STACK_DEPTH; break; + case GL_CLIENT_ACTIVE_TEXTURE_ARB: + *f = (GLfloat)(gc->state.vertArray.activeTexture + GL_TEXTURE0_ARB); + break; default: /* ** Not a local value, so use what we got from the server. @@ -480,7 +558,7 @@ __GLX_SINGLE_PUT_LONG(0,val); __GLX_SINGLE_READ_XREPLY(); __GLX_SINGLE_GET_SIZE(compsize); - + if (compsize == 0) { /* ** Error occured; don't modify user's buffer. @@ -497,12 +575,18 @@ case GL_PACK_ROW_LENGTH: *i = (GLint)gc->state.storePack.rowLength; break; + case GL_PACK_IMAGE_HEIGHT: + *i = (GLint)gc->state.storePack.imageHeight; + break; case GL_PACK_SKIP_ROWS: *i = (GLint)gc->state.storePack.skipRows; break; case GL_PACK_SKIP_PIXELS: *i = (GLint)gc->state.storePack.skipPixels; break; + case GL_PACK_SKIP_IMAGES: + *i = (GLint)gc->state.storePack.skipImages; + break; case GL_PACK_ALIGNMENT: *i = (GLint)gc->state.storePack.alignment; break; @@ -515,12 +599,18 @@ case GL_UNPACK_ROW_LENGTH: *i = (GLint)gc->state.storeUnpack.rowLength; break; + case GL_UNPACK_IMAGE_HEIGHT: + *i = (GLint)gc->state.storeUnpack.imageHeight; + break; case GL_UNPACK_SKIP_ROWS: *i = (GLint)gc->state.storeUnpack.skipRows; break; case GL_UNPACK_SKIP_PIXELS: *i = (GLint)gc->state.storeUnpack.skipPixels; break; + case GL_UNPACK_SKIP_IMAGES: + *i = (GLint)gc->state.storeUnpack.skipImages; + break; case GL_UNPACK_ALIGNMENT: *i = (GLint)gc->state.storeUnpack.alignment; break; @@ -531,68 +621,77 @@ *i = (GLint)gc->state.storeUnpack.lsbFirst; break; case GL_VERTEX_ARRAY: - *i = (GLint)gc->state.vertArray.vertexEnable; + *i = (GLint)gc->state.vertArray.vertex.enable; break; case GL_VERTEX_ARRAY_SIZE: - *i = (GLint)gc->state.vertArray.vertexSize; + *i = (GLint)gc->state.vertArray.vertex.size; break; case GL_VERTEX_ARRAY_TYPE: - *i = (GLint)gc->state.vertArray.vertexType; + *i = (GLint)gc->state.vertArray.vertex.type; break; case GL_VERTEX_ARRAY_STRIDE: - *i = (GLint)gc->state.vertArray.vertexStride; + *i = (GLint)gc->state.vertArray.vertex.stride; break; case GL_NORMAL_ARRAY: - *i = (GLint)gc->state.vertArray.normalEnable; + *i = (GLint)gc->state.vertArray.normal.enable; break; case GL_NORMAL_ARRAY_TYPE: - *i = (GLint)gc->state.vertArray.normalType; + *i = (GLint)gc->state.vertArray.normal.type; break; case GL_NORMAL_ARRAY_STRIDE: - *i = (GLint)gc->state.vertArray.normalStride; + *i = (GLint)gc->state.vertArray.normal.stride; break; case GL_COLOR_ARRAY: - *i = (GLint)gc->state.vertArray.colorEnable; + *i = (GLint)gc->state.vertArray.color.enable; break; case GL_COLOR_ARRAY_SIZE: - *i = (GLint)gc->state.vertArray.colorSize; + *i = (GLint)gc->state.vertArray.color.size; break; case GL_COLOR_ARRAY_TYPE: - *i = (GLint)gc->state.vertArray.colorType; + *i = (GLint)gc->state.vertArray.color.type; break; case GL_COLOR_ARRAY_STRIDE: - *i = (GLint)gc->state.vertArray.colorStride; + *i = (GLint)gc->state.vertArray.color.stride; break; case GL_INDEX_ARRAY: - *i = (GLint)gc->state.vertArray.indexEnable; + *i = (GLint)gc->state.vertArray.index.enable; break; case GL_INDEX_ARRAY_TYPE: - *i = (GLint)gc->state.vertArray.indexType; + *i = (GLint)gc->state.vertArray.index.type; break; case GL_INDEX_ARRAY_STRIDE: - *i = (GLint)gc->state.vertArray.indexStride; + *i = (GLint)gc->state.vertArray.index.stride; break; case GL_TEXTURE_COORD_ARRAY: - *i = (GLint)gc->state.vertArray.texCoordEnable; + *i = (GLint)gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].enable; break; case GL_TEXTURE_COORD_ARRAY_SIZE: - *i = (GLint)gc->state.vertArray.texCoordSize; + *i = (GLint)gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].size; break; case GL_TEXTURE_COORD_ARRAY_TYPE: - *i = (GLint)gc->state.vertArray.texCoordType; + *i = (GLint)gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].type; break; case GL_TEXTURE_COORD_ARRAY_STRIDE: - *i = (GLint)gc->state.vertArray.texCoordStride; + *i = (GLint)gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].stride; break; case GL_EDGE_FLAG_ARRAY: - *i = (GLint)gc->state.vertArray.edgeFlagEnable; + *i = (GLint)gc->state.vertArray.edgeFlag.enable; break; case GL_EDGE_FLAG_ARRAY_STRIDE: - *i = (GLint)gc->state.vertArray.edgeFlagStride; + *i = (GLint)gc->state.vertArray.edgeFlag.stride; + break; + case GL_MAX_ELEMENTS_VERTICES: + *i = (GLint)gc->state.vertArray.maxElementsVertices; break; + case GL_MAX_ELEMENTS_INDICES: + *i = (GLint)gc->state.vertArray.maxElementsIndices; + break; case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: *i = (GLint)__GL_CLIENT_ATTRIB_STACK_DEPTH; break; + case GL_CLIENT_ACTIVE_TEXTURE_ARB: + *i = (GLint)(gc->state.vertArray.activeTexture + GL_TEXTURE0_ARB); + break; default: /* ** Not a local value, so use what we got from the server. @@ -778,17 +877,17 @@ switch(cap) { case GL_VERTEX_ARRAY: - return gc->state.vertArray.vertexEnable; + return gc->state.vertArray.vertex.enable; case GL_NORMAL_ARRAY: - return gc->state.vertArray.normalEnable; + return gc->state.vertArray.normal.enable; case GL_COLOR_ARRAY: - return gc->state.vertArray.colorEnable; + return gc->state.vertArray.color.enable; case GL_INDEX_ARRAY: - return gc->state.vertArray.indexEnable; + return gc->state.vertArray.index.enable; case GL_TEXTURE_COORD_ARRAY: - return gc->state.vertArray.texCoordEnable; + return gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].enable; case GL_EDGE_FLAG_ARRAY: - return gc->state.vertArray.edgeFlagEnable; + return gc->state.vertArray.edgeFlag.enable; } __GLX_SINGLE_LOAD_VARIABLES(); @@ -809,32 +908,32 @@ switch(pname) { case GL_VERTEX_ARRAY_POINTER: - *params = (void *)gc->state.vertArray.vertexPtr; + *params = (void *)gc->state.vertArray.vertex.ptr; return; case GL_NORMAL_ARRAY_POINTER: - *params = (void *)gc->state.vertArray.normalPtr; + *params = (void *)gc->state.vertArray.normal.ptr; return; case GL_COLOR_ARRAY_POINTER: - *params = (void *)gc->state.vertArray.colorPtr; + *params = (void *)gc->state.vertArray.color.ptr; return; case GL_INDEX_ARRAY_POINTER: - *params = (void *)gc->state.vertArray.indexPtr; + *params = (void *)gc->state.vertArray.index.ptr; return; case GL_TEXTURE_COORD_ARRAY_POINTER: - *params = (void *)gc->state.vertArray.texCoordPtr; + *params = (void *)gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture].ptr; return; case GL_EDGE_FLAG_ARRAY_POINTER: - *params = (void *)gc->state.vertArray.edgeFlagPtr; - return; + *params = (void *)gc->state.vertArray.edgeFlag.ptr; + return; case GL_FEEDBACK_BUFFER_POINTER: - *params = (void *)gc->feedbackBuf; - return; + *params = (void *)gc->feedbackBuf; + return; case GL_SELECTION_BUFFER_POINTER: - *params = (void *)gc->selectBuf; - return; + *params = (void *)gc->selectBuf; + return; default: __glXSetError(gc, GL_INVALID_ENUM); - return; + return; } } Index: xc/lib/GL/glx/singlepix.c diff -u xc/lib/GL/glx/singlepix.c:1.2 xc/lib/GL/glx/singlepix.c:1.3 --- xc/lib/GL/glx/singlepix.c:1.2 Mon Jun 14 03:23:39 1999 +++ xc/lib/GL/glx/singlepix.c Wed Mar 21 11:04:39 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/lib/GL/glx/singlepix.c,v 1.2 1999/06/14 07:23:39 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/singlepix.c,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #include "packsingle.h" @@ -58,7 +72,7 @@ ** to put data back into client memory */ __GLX_SINGLE_GET_CHAR_ARRAY(buf,compsize); - __glEmptyImage(gc, width, height, format, type, buf, pixels); + __glEmptyImage(gc, 2, width, height, 1, format, type, buf, pixels); Xfree((char*) buf); } } else { @@ -97,7 +111,7 @@ _XEatData(dpy, compsize); __glXSetError(gc, GL_OUT_OF_MEMORY); } else { - GLint width, height; + GLint width, height, depth; /* ** Fetch data into holding buffer. Apply pixel store pack modes @@ -105,8 +119,10 @@ */ width = reply.width; height = reply.height; + depth = reply.depth; __GLX_SINGLE_GET_CHAR_ARRAY(buf,compsize); - __glEmptyImage(gc, width, height, format, type, buf, texels); + __glEmptyImage(gc, 2, width, height, depth, format, type, buf, + texels); Xfree((char*) buf); } } else { @@ -131,7 +147,255 @@ __GLX_SINGLE_READ_XREPLY(); if (reply.length == 32) { __GLX_SINGLE_GET_CHAR_ARRAY(buf,128); - __glEmptyImage(gc, 32, 32, GL_COLOR_INDEX, GL_BITMAP, buf, mask); + __glEmptyImage(gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, buf, mask); + } + __GLX_SINGLE_END(); +} + +void glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid *table) +{ + __GLX_SINGLE_DECLARE_VARIABLES(); + xGLXGetColorTableReply reply; + GLubyte *buf; + + if (!dpy) return; + __GLX_SINGLE_LOAD_VARIABLES(); + + /* Send request */ + __GLX_SINGLE_BEGIN(X_GLsop_GetColorTable,__GLX_PAD(13)); + __GLX_SINGLE_PUT_LONG(0,(long)target); + __GLX_SINGLE_PUT_LONG(4,(long)format); + __GLX_SINGLE_PUT_LONG(8,(long)type); + __GLX_SINGLE_PUT_CHAR(12,gc->state.storePack.swapEndian); + __GLX_SINGLE_READ_XREPLY(); + compsize = (long)reply.length << 2; + + if (compsize != 0) { + /* Allocate a holding buffer to transform the data from */ + buf = (GLubyte*)Xmalloc(compsize); + if (!buf) { + /* Throw data away */ + _XEatData(dpy, compsize); + __glXSetError(gc, GL_OUT_OF_MEMORY); + } else { + GLint width; + + /* + ** Fetch data into holding buffer. Apply pixel store pack modes + ** to put data back into client memory + */ + width = (int)reply.width; + __GLX_SINGLE_GET_CHAR_ARRAY(((char*)buf),(long)compsize); + __glEmptyImage(gc, 1, width, 1, 1, format, type, buf, table); + Xfree((char*) buf); + } + } else { + /* + ** GL error occured, don't modify user's buffer. + */ + } + __GLX_SINGLE_END(); +} + +void glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, + GLvoid *image) +{ + __GLX_SINGLE_DECLARE_VARIABLES(); + xGLXGetConvolutionFilterReply reply; + GLubyte *buf; + + if (!dpy) return; + __GLX_SINGLE_LOAD_VARIABLES(); + + /* Send request */ + __GLX_SINGLE_BEGIN(X_GLsop_GetConvolutionFilter, __GLX_PAD(13)); + __GLX_SINGLE_PUT_LONG(0,target); + __GLX_SINGLE_PUT_LONG(4,format); + __GLX_SINGLE_PUT_LONG(8,type); + __GLX_SINGLE_PUT_CHAR(12,gc->state.storePack.swapEndian); + __GLX_SINGLE_READ_XREPLY(); + compsize = reply.length << 2; + + if (compsize != 0) { + /* Allocate a holding buffer to transform the data from */ + buf = (GLubyte*) Xmalloc(compsize); + if (!buf) { + /* Throw data away */ + _XEatData(dpy, compsize); + __glXSetError(gc, GL_OUT_OF_MEMORY); + } else { + GLint width, height; + + /* + ** Fetch data into holding buffer. Apply pixel store pack modes + ** to put data back into client memory + */ + width = reply.width; + height = reply.height; + __GLX_SINGLE_GET_CHAR_ARRAY(((char*)buf),compsize); + __glEmptyImage(gc, 2, width, height, 1, format, type, buf, image); + Xfree((char*) buf); + } + } else { + /* + ** GL error occured, don't modify user's buffer. + */ + } + __GLX_SINGLE_END(); +} + +void glGetSeparableFilter(GLenum target, GLenum format, GLenum type, + GLvoid *row, GLvoid *column, GLvoid *span) +{ + __GLX_SINGLE_DECLARE_VARIABLES(); + xGLXGetSeparableFilterReply reply; + GLubyte *rowBuf, *colBuf; + + if (!dpy) return; + __GLX_SINGLE_LOAD_VARIABLES(); + + /* Send request */ + __GLX_SINGLE_BEGIN(X_GLsop_GetSeparableFilter, __GLX_PAD(13)); + __GLX_SINGLE_PUT_LONG(0,target); + __GLX_SINGLE_PUT_LONG(4,format); + __GLX_SINGLE_PUT_LONG(8,type); + __GLX_SINGLE_PUT_CHAR(12,gc->state.storePack.swapEndian); + __GLX_SINGLE_READ_XREPLY(); + compsize = reply.length << 2; + + if (compsize != 0) { + GLint width, height; + GLint widthsize, heightsize; + + width = reply.width; + height = reply.height; + + widthsize = __glImageSize(width,1,1,format, type); + heightsize = __glImageSize(height,1,1,format, type); + + /* Allocate a holding buffer to transform the data from */ + rowBuf = (GLubyte*) Xmalloc(widthsize); + if (!rowBuf) { + /* Throw data away */ + _XEatData(dpy, compsize); + __glXSetError(gc, GL_OUT_OF_MEMORY); + UnlockDisplay(dpy); + SyncHandle(); + return; + } else { + __GLX_SINGLE_GET_CHAR_ARRAY(((char*)rowBuf),widthsize); + __glEmptyImage(gc, 1, width, 1, 1, format, type, rowBuf, row); + Xfree((char*) rowBuf); + } + colBuf = (GLubyte*) Xmalloc(heightsize); + if (!colBuf) { + /* Throw data away */ + _XEatData(dpy, compsize - __GLX_PAD(widthsize)); + __glXSetError(gc, GL_OUT_OF_MEMORY); + UnlockDisplay(dpy); + SyncHandle(); + return; + } else { + __GLX_SINGLE_GET_CHAR_ARRAY(((char*)colBuf),heightsize); + __glEmptyImage(gc, 1, height, 1, 1, format, type, colBuf, column); + Xfree((char*) colBuf); + } + } else { + /* + ** don't modify user's buffer. + */ + } + __GLX_SINGLE_END(); + +} + +void glGetHistogram(GLenum target, GLboolean reset, GLenum format, + GLenum type, GLvoid *values) +{ + __GLX_SINGLE_DECLARE_VARIABLES(); + xGLXGetHistogramReply reply; + GLubyte *buf; + + if (!dpy) return; + __GLX_SINGLE_LOAD_VARIABLES(); + + /* Send request */ + __GLX_SINGLE_BEGIN(X_GLsop_GetHistogram,__GLX_PAD(14)); + __GLX_SINGLE_PUT_LONG(0,(long)target); + __GLX_SINGLE_PUT_LONG(4,(long)format); + __GLX_SINGLE_PUT_LONG(8,(long)type); + __GLX_SINGLE_PUT_CHAR(12,gc->state.storePack.swapEndian); + __GLX_SINGLE_PUT_CHAR(13,reset); + __GLX_SINGLE_READ_XREPLY(); + compsize = (long)reply.length << 2; + + if (compsize != 0) { + /* Allocate a holding buffer to transform the data from */ + buf = (GLubyte*)Xmalloc(compsize); + if (!buf) { + /* Throw data away */ + _XEatData(dpy, compsize); + __glXSetError(gc, GL_OUT_OF_MEMORY); + } else { + GLint width; + + /* + ** Fetch data into holding buffer. Apply pixel store pack modes + ** to put data back into client memory + */ + width = (int)reply.width; + __GLX_SINGLE_GET_CHAR_ARRAY(((char*)buf),(long)compsize); + __glEmptyImage(gc, 1, width, 1, 1, format, type, buf, values); + Xfree((char*) buf); + } + } else { + /* + ** GL error occured, don't modify user's buffer. + */ + } + __GLX_SINGLE_END(); +} + +void glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, + GLvoid *values) +{ + __GLX_SINGLE_DECLARE_VARIABLES(); + xGLXGetMinmaxReply reply; + GLubyte *buf; + + if (!dpy) return; + __GLX_SINGLE_LOAD_VARIABLES(); + + /* Send request */ + __GLX_SINGLE_BEGIN(X_GLsop_GetMinmax,__GLX_PAD(14)); + __GLX_SINGLE_PUT_LONG(0,(long)target); + __GLX_SINGLE_PUT_LONG(4,(long)format); + __GLX_SINGLE_PUT_LONG(8,(long)type); + __GLX_SINGLE_PUT_CHAR(12,gc->state.storePack.swapEndian); + __GLX_SINGLE_PUT_CHAR(13,reset); + __GLX_SINGLE_READ_XREPLY(); + compsize = (long)reply.length << 2; + + if (compsize != 0) { + /* Allocate a holding buffer to transform the data from */ + buf = (GLubyte*)Xmalloc(compsize); + if (!buf) { + /* Throw data away */ + _XEatData(dpy, compsize); + __glXSetError(gc, GL_OUT_OF_MEMORY); + } else { + /* + ** Fetch data into holding buffer. Apply pixel store pack modes + ** to put data back into client memory + */ + __GLX_SINGLE_GET_CHAR_ARRAY(((char*)buf),(long)compsize); + __glEmptyImage(gc, 1, 2, 1, 1, format, type, buf, values); + Xfree((char*) buf); + } + } else { + /* + ** GL error occured, don't modify user's buffer. + */ } __GLX_SINGLE_END(); } Index: xc/lib/GL/glx/size.h diff -u xc/lib/GL/glx/size.h:1.2 xc/lib/GL/glx/size.h:1.3 --- xc/lib/GL/glx/size.h:1.2 Mon Jun 14 03:23:40 1999 +++ xc/lib/GL/glx/size.h Wed Mar 21 11:04:39 2001 @@ -1,26 +1,40 @@ +/* $XFree86: xc/lib/GL/glx/size.h,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ #ifndef _size_h_ #define _size_h_ -/* $XFree86: xc/lib/GL/glx/size.h,v 1.2 1999/06/14 07:23:40 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ /* @@ -29,6 +43,10 @@ */ extern GLint __glBitmap_size(GLsizei w, GLsizei h); extern GLint __glCallLists_size(GLsizei n, GLenum type); +extern GLint __glColorTableParameterfv_size(GLenum pname); +extern GLint __glColorTableParameteriv_size(GLenum pname); +extern GLint __glConvolutionParameterfv_size(GLenum pname); +extern GLint __glConvolutionParameteriv_size(GLenum pname); extern GLint __glDrawPixels_size(GLenum format, GLenum type, GLsizei w,GLsizei h); extern GLint __glFogfv_size(GLenum pname); extern GLint __glFogiv_size(GLenum pname); @@ -44,8 +62,8 @@ extern GLint __glTexGenfv_size(GLenum e); extern GLint __glTexGeniv_size(GLenum pname); extern GLint __glTexImage1D_size(GLenum format, GLenum type, GLsizei w); -extern GLint __glTexImage2D_size(GLenum format, GLenum type, - GLsizei w, GLsizei h); +extern GLint __glTexImage2D_size(GLenum format, GLenum type, GLsizei w, GLsizei h); +extern GLint __glTexImage3D_size(GLenum format, GLenum type, GLsizei w, GLsizei h, GLsizei d); extern GLint __glTexParameterfv_size(GLenum e); extern GLint __glTexParameteriv_size(GLenum e); Index: xc/lib/GL/glx/vertarr.c diff -u xc/lib/GL/glx/vertarr.c:1.2 xc/lib/GL/glx/vertarr.c:1.4 --- xc/lib/GL/glx/vertarr.c:1.2 Mon Jun 14 03:23:40 1999 +++ xc/lib/GL/glx/vertarr.c Sun Mar 25 00:32:00 2001 @@ -1,133 +1,161 @@ -/* $XFree86: xc/lib/GL/glx/vertarr.c,v 1.2 1999/06/14 07:23:40 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/vertarr.c,v 1.4 2001/03/25 05:32:00 tsi Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ -#include "packrender.h" +#define NEED_GL_FUNCS_WRAPPED #include "glxclient.h" +#include "packrender.h" #include +#include /* INT_MAX */ /* macros for setting function pointers */ #define __GL_VERTEX_FUNC(NAME, let) \ case GL_##NAME: \ if (size == 2) \ - va->vertexCall = (void (*)(const char *))glVertex2##let##v; \ + vertexPointer->proc = (void (*)(const void *))glVertex2##let##v; \ else if (size == 3) \ - va->vertexCall = (void (*)(const char *))glVertex3##let##v; \ + vertexPointer->proc = (void (*)(const void *))glVertex3##let##v; \ else if (size == 4) \ - va->vertexCall = (void (*)(const char *))glVertex4##let##v; \ + vertexPointer->proc = (void (*)(const void *))glVertex4##let##v; \ break #define __GL_NORMAL_FUNC(NAME, let) \ case GL_##NAME: \ - va->normalCall = (void (*)(const char *))glNormal3##let##v; \ + normalPointer->proc = (void (*)(const void *))glNormal3##let##v; \ break #define __GL_COLOR_FUNC(NAME, let) \ case GL_##NAME: \ if (size == 3) \ - va->colorCall = (void (*)(const char *))glColor3##let##v; \ + colorPointer->proc = (void (*)(const void *))glColor3##let##v; \ else if (size == 4)\ - va->colorCall = (void (*)(const char *))glColor4##let##v; \ + colorPointer->proc = (void (*)(const void *))glColor4##let##v; \ break #define __GL_INDEX_FUNC(NAME, let) \ case GL_##NAME: \ - va->indexCall = (void (*)(const char *))glIndex##let##v; \ + indexPointer->proc = (void (*)(const void *))glIndex##let##v; \ break #define __GL_TEXTURE_FUNC(NAME, let) \ case GL_##NAME: \ if (size == 1) \ - va->texCoordCall = (void (*)(const char *))glTexCoord1##let##v; \ + texCoordPointer->proc = (void (*)(const void *))glTexCoord1##let##v; \ else if (size == 2) \ - va->texCoordCall = (void (*)(const char *))glTexCoord2##let##v; \ + texCoordPointer->proc = (void (*)(const void *))glTexCoord2##let##v; \ else if (size == 3) \ - va->texCoordCall = (void (*)(const char *))glTexCoord3##let##v; \ + texCoordPointer->proc = (void (*)(const void *))glTexCoord3##let##v; \ else if (size == 4) \ - va->texCoordCall = (void (*)(const char *))glTexCoord4##let##v; \ + texCoordPointer->proc = (void (*)(const void *))glTexCoord4##let##v; \ break static GLuint __glXTypeSize(GLenum enm) { - switch (enm) { - case __GL_BOOLEAN_ARRAY: return sizeof(GLboolean); - case GL_BYTE: return sizeof(GLbyte); - case GL_UNSIGNED_BYTE: return sizeof(GLubyte); - case GL_SHORT: return sizeof(GLshort); - case GL_UNSIGNED_SHORT: return sizeof(GLushort); - case GL_INT: return sizeof(GLint); - case GL_UNSIGNED_INT: return sizeof(GLint); - case GL_FLOAT: return sizeof(GLfloat); - case GL_DOUBLE: return sizeof(GLdouble); - default: return 0; - } + switch (enm) { + case __GL_BOOLEAN_ARRAY: return sizeof(GLboolean); + case GL_BYTE: return sizeof(GLbyte); + case GL_UNSIGNED_BYTE: return sizeof(GLubyte); + case GL_SHORT: return sizeof(GLshort); + case GL_UNSIGNED_SHORT: return sizeof(GLushort); + case GL_INT: return sizeof(GLint); + case GL_UNSIGNED_INT: return sizeof(GLint); + case GL_FLOAT: return sizeof(GLfloat); + case GL_DOUBLE: return sizeof(GLdouble); + default: return 0; + } } void __glXInitVertexArrayState(__GLXcontext *gc) { __GLXvertArrayState *va = &gc->state.vertArray; + GLint i; + + va->vertex.enable = GL_FALSE; + va->vertex.proc = NULL; + va->vertex.skip = 0; + va->vertex.ptr = 0; + va->vertex.size = 4; + va->vertex.type = GL_FLOAT; + va->vertex.stride = 0; + + va->normal.enable = GL_FALSE; + va->normal.proc = NULL; + va->normal.skip = 0; + va->normal.ptr = 0; + va->normal.size = 3; + va->normal.type = GL_FLOAT; + va->normal.stride = 0; + + va->color.enable = GL_FALSE; + va->color.proc = NULL; + va->color.skip = 0; + va->color.ptr = 0; + va->color.size = 4; + va->color.type = GL_FLOAT; + va->color.stride = 0; + + va->index.enable = GL_FALSE; + va->index.proc = NULL; + va->index.skip = 0; + va->index.ptr = 0; + va->index.size = 1; + va->index.type = GL_FLOAT; + va->index.stride = 0; + + for (i=0; i<__GLX_MAX_TEXTURE_UNITS; ++i) { + __GLXvertexArrayPointerState *texCoord = &va->texCoord[i]; + + texCoord->enable = GL_FALSE; + texCoord->proc = NULL; + texCoord->skip = 0; + texCoord->ptr = 0; + texCoord->size = 4; + texCoord->type = GL_FLOAT; + texCoord->stride = 0; + } + + va->edgeFlag.enable = GL_FALSE; + va->edgeFlag.proc = NULL; + va->edgeFlag.skip = 0; + va->edgeFlag.ptr = 0; + va->edgeFlag.size = 1; + va->edgeFlag.type = GL_UNSIGNED_BYTE; + va->edgeFlag.stride = 0; - va->vertexEnable = GL_FALSE; - va->vertexCall = NULL; - va->vertexSkip = 0; - va->vertexPtr = 0; - va->vertexSize = 4; - va->vertexType = GL_FLOAT; - va->vertexStride = 0; - - va->normalEnable = GL_FALSE; - va->normalCall = NULL; - va->normalSkip = 0; - va->normalPtr = 0; - va->normalType = GL_FLOAT; - va->normalStride = 0; - - va->colorEnable = GL_FALSE; - va->colorCall = NULL; - va->colorSkip = 0; - va->colorPtr = 0; - va->colorSize = 4; - va->colorType = GL_FLOAT; - va->colorStride = 0; - - va->indexEnable = GL_FALSE; - va->indexCall = NULL; - va->indexSkip = 0; - va->indexPtr = 0; - va->indexType = GL_FLOAT; - va->indexStride = 0; - - va->texCoordEnable = GL_FALSE; - va->texCoordCall = NULL; - va->texCoordSkip = 0; - va->texCoordPtr = 0; - va->texCoordSize = 4; - va->texCoordType = GL_FLOAT; - va->texCoordStride = 0; - - va->edgeFlagEnable = GL_FALSE; - va->edgeFlagCall = NULL; - va->edgeFlagSkip = 0; - va->edgeFlagPtr = 0; - va->edgeFlagStride = 0; + va->maxElementsVertices = INT_MAX; + va->maxElementsIndices = INT_MAX; } /*****************************************************************************/ @@ -136,7 +164,7 @@ const GLvoid *pointer) { __GLXcontext *gc = __glXGetCurrentContext(); - __GLXvertArrayState *va = &gc->state.vertArray; + __GLXvertexArrayPointerState *vertexPointer = &gc->state.vertArray.vertex; /* Check arguments */ if (size < 2 || size > 4 || stride < 0) { @@ -144,7 +172,7 @@ return; } - /* Choose appropriate api call */ + /* Choose appropriate api proc */ switch(type) { __GL_VERTEX_FUNC(SHORT, s); __GL_VERTEX_FUNC(INT, i); @@ -155,23 +183,23 @@ return; } - va->vertexSize = size; - va->vertexType = type; - va->vertexStride = stride; - va->vertexPtr = pointer; + vertexPointer->size = size; + vertexPointer->type = type; + vertexPointer->stride = stride; + vertexPointer->ptr = pointer; /* Set internal state */ if (stride == 0) { - va->vertexSkip = __glXTypeSize(type) * size; + vertexPointer->skip = __glXTypeSize(type) * size; } else { - va->vertexSkip = stride; + vertexPointer->skip = stride; } } void glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer) { __GLXcontext *gc = __glXGetCurrentContext(); - __GLXvertArrayState *va = &gc->state.vertArray; + __GLXvertexArrayPointerState *normalPointer = &gc->state.vertArray.normal; /* Check arguments */ if (stride < 0) { @@ -179,7 +207,7 @@ return; } - /* Choose appropriate api call */ + /* Choose appropriate api proc */ switch(type) { __GL_NORMAL_FUNC(BYTE, b); __GL_NORMAL_FUNC(SHORT, s); @@ -191,15 +219,15 @@ return; } - va->normalType = type; - va->normalStride = stride; - va->normalPtr = pointer; + normalPointer->type = type; + normalPointer->stride = stride; + normalPointer->ptr = pointer; /* Set internal state */ if (stride == 0) { - va->normalSkip = 3 * __glXTypeSize(type); + normalPointer->skip = 3 * __glXTypeSize(type); } else { - va->normalSkip = stride; + normalPointer->skip = stride; } } @@ -207,7 +235,7 @@ const GLvoid *pointer) { __GLXcontext *gc = __glXGetCurrentContext(); - __GLXvertArrayState *va = &gc->state.vertArray; + __GLXvertexArrayPointerState *colorPointer = &gc->state.vertArray.color; /* Check arguments */ if (stride < 0) { @@ -215,7 +243,7 @@ return; } - /* Choose appropriate api call */ + /* Choose appropriate api proc */ switch(type) { __GL_COLOR_FUNC(BYTE, b); __GL_COLOR_FUNC(UNSIGNED_BYTE, ub); @@ -229,23 +257,24 @@ __glXSetError(gc, GL_INVALID_ENUM); return; } - va->colorSize = size; - va->colorType = type; - va->colorStride = stride; - va->colorPtr = pointer; + colorPointer->size = size; + colorPointer->type = type; + colorPointer->stride = stride; + colorPointer->ptr = pointer; + /* Set internal state */ if (stride == 0) { - va->colorSkip = size * __glXTypeSize(type); + colorPointer->skip = size * __glXTypeSize(type); } else { - va->colorSkip = stride; + colorPointer->skip = stride; } } void glIndexPointer(GLenum type, GLsizei stride, const GLvoid *pointer) { __GLXcontext *gc = __glXGetCurrentContext(); - __GLXvertArrayState *va = &gc->state.vertArray; + __GLXvertexArrayPointerState *indexPointer = &gc->state.vertArray.index; /* Check arguments */ if (stride < 0) { @@ -253,7 +282,7 @@ return; } - /* Choose appropriate api call */ + /* Choose appropriate api proc */ switch(type) { __GL_INDEX_FUNC(UNSIGNED_BYTE, ub); __GL_INDEX_FUNC(SHORT, s); @@ -265,15 +294,15 @@ return; } - va->indexType = type; - va->indexStride = stride; - va->indexPtr = pointer; + indexPointer->type = type; + indexPointer->stride = stride; + indexPointer->ptr = pointer; /* Set internal state */ if (stride == 0) { - va->indexSkip = __glXTypeSize(type); + indexPointer->skip = __glXTypeSize(type); } else { - va->indexSkip = stride; + indexPointer->skip = stride; } } @@ -281,7 +310,8 @@ const GLvoid *pointer) { __GLXcontext *gc = __glXGetCurrentContext(); - __GLXvertArrayState *va = &gc->state.vertArray; + __GLXvertexArrayPointerState *texCoordPointer = + &gc->state.vertArray.texCoord[gc->state.vertArray.activeTexture]; /* Check arguments */ if (size < 1 || size > 4 || stride < 0) { @@ -289,7 +319,7 @@ return; } - /* Choose appropriate api call */ + /* Choose appropriate api proc */ switch(type) { __GL_TEXTURE_FUNC(SHORT, s); __GL_TEXTURE_FUNC(INT, i); @@ -300,43 +330,43 @@ return; } - va->texCoordSize = size; - va->texCoordType = type; - va->texCoordStride = stride; - va->texCoordPtr = pointer; + texCoordPointer->size = size; + texCoordPointer->type = type; + texCoordPointer->stride = stride; + texCoordPointer->ptr = pointer; /* Set internal state */ if (stride == 0) { - va->texCoordSkip = __glXTypeSize(type) * size; + texCoordPointer->skip = __glXTypeSize(type) * size; } else { - va->texCoordSkip = stride; + texCoordPointer->skip = stride; } } void glEdgeFlagPointer(GLsizei stride, const GLvoid *pointer) { __GLXcontext *gc = __glXGetCurrentContext(); - __GLXvertArrayState *va = &gc->state.vertArray; + __GLXvertexArrayPointerState *edgeFlagPointer = &gc->state.vertArray.edgeFlag; /* Check arguments */ if (stride < 0) { __glXSetError(gc, GL_INVALID_VALUE); return; } + + /* Choose appropriate api proc */ + edgeFlagPointer->proc = (void (*)(const void *))glEdgeFlagv; - va->edgeFlagStride = stride; - va->edgeFlagPtr = pointer; + edgeFlagPointer->stride = stride; + edgeFlagPointer->ptr = pointer; /* Set internal state */ if (stride == 0) { - va->edgeFlagSkip = sizeof(GLboolean); + edgeFlagPointer->skip = sizeof(GLboolean); } else { - va->edgeFlagSkip = stride; + edgeFlagPointer->skip = stride; } - /* Choose appropriate api call */ - va->edgeFlagCall = glEdgeFlagv; - } void glInterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer) @@ -506,29 +536,32 @@ { __GLXcontext *gc = __glXGetCurrentContext(); __GLXvertArrayState *va = &gc->state.vertArray; + GLint j; - if (va->edgeFlagEnable == GL_TRUE) { - (*va->edgeFlagCall)(va->edgeFlagPtr+i*va->edgeFlagSkip); + if (va->edgeFlag.enable == GL_TRUE) { + (*va->edgeFlag.proc)(va->edgeFlag.ptr+i*va->edgeFlag.skip); } - if (va->texCoordEnable == GL_TRUE) { - (*va->texCoordCall)(va->texCoordPtr+i*va->texCoordSkip); + for (j=0; j<__GLX_MAX_TEXTURE_UNITS; ++j) { + if (va->texCoord[j].enable == GL_TRUE) { + (*va->texCoord[j].proc)(va->texCoord[j].ptr+i*va->texCoord[j].skip); + } } - if (va->colorEnable == GL_TRUE) { - (*va->colorCall)(va->colorPtr+i*va->colorSkip); + if (va->color.enable == GL_TRUE) { + (*va->color.proc)(va->color.ptr+i*va->color.skip); } - if (va->indexEnable == GL_TRUE) { - (*va->indexCall)(va->indexPtr+i*va->indexSkip); + if (va->index.enable == GL_TRUE) { + (*va->index.proc)(va->index.ptr+i*va->index.skip); } - if (va->normalEnable == GL_TRUE) { - (*va->normalCall)(va->normalPtr+i*va->normalSkip); + if (va->normal.enable == GL_TRUE) { + (*va->normal.proc)(va->normal.ptr+i*va->normal.skip); } - if (va->vertexEnable == GL_TRUE) { - (*va->vertexCall)(va->vertexPtr+i*va->vertexSkip); + if (va->vertex.enable == GL_TRUE) { + (*va->vertex.proc)(va->vertex.ptr+i*va->vertex.skip); } } @@ -536,10 +569,10 @@ { __GLXcontext *gc = __glXGetCurrentContext(); __GLXvertArrayState *va = &gc->state.vertArray; - const char *vaPtr = NULL, *naPtr = NULL, *caPtr = NULL, - *iaPtr = NULL, *tcaPtr = NULL; + const GLubyte *vaPtr = NULL, *naPtr = NULL, *caPtr = NULL, + *iaPtr = NULL, *tcaPtr[__GLX_MAX_TEXTURE_UNITS]; const GLboolean *efaPtr = NULL; - GLint i; + GLint i, j; switch(mode) { case GL_POINTS: @@ -566,44 +599,48 @@ /* ** Set up pointers for quick array traversal. */ - if (va->normalEnable == GL_TRUE) - naPtr = va->normalPtr + first * va->normalSkip; - if (va->colorEnable == GL_TRUE) - caPtr = va->colorPtr + first * va->colorSkip; - if (va->indexEnable == GL_TRUE) - iaPtr = va->indexPtr + first * va->indexSkip; - if (va->texCoordEnable == GL_TRUE) - tcaPtr = va->texCoordPtr + first * va->texCoordSkip; - if (va->edgeFlagEnable == GL_TRUE) - efaPtr = va->edgeFlagPtr + first * va->edgeFlagSkip; - if (va->vertexEnable == GL_TRUE) - vaPtr = va->vertexPtr + first * va->vertexSkip; + if (va->normal.enable == GL_TRUE) + naPtr = va->normal.ptr + first * va->normal.skip; + if (va->color.enable == GL_TRUE) + caPtr = va->color.ptr + first * va->color.skip; + if (va->index.enable == GL_TRUE) + iaPtr = va->index.ptr + first * va->index.skip; + for (j=0; j<__GLX_MAX_TEXTURE_UNITS; ++j) { + if (va->texCoord[j].enable == GL_TRUE) + tcaPtr[j] = va->texCoord[j].ptr + first * va->texCoord[j].skip; + } + if (va->edgeFlag.enable == GL_TRUE) + efaPtr = va->edgeFlag.ptr + first * va->edgeFlag.skip; + if (va->vertex.enable == GL_TRUE) + vaPtr = va->vertex.ptr + first * va->vertex.skip; glBegin(mode); for (i = 0; i < count; i++) { - if (va->edgeFlagEnable == GL_TRUE) { - (*va->edgeFlagCall)(efaPtr); - efaPtr += va->edgeFlagSkip; + if (va->edgeFlag.enable == GL_TRUE) { + (*va->edgeFlag.proc)(efaPtr); + efaPtr += va->edgeFlag.skip; } - if (va->texCoordEnable == GL_TRUE) { - (*va->texCoordCall)(tcaPtr); - tcaPtr += va->texCoordSkip; - } - if (va->colorEnable == GL_TRUE) { - (*va->colorCall)(caPtr); - caPtr += va->colorSkip; + for (j=0; j<__GLX_MAX_TEXTURE_UNITS; ++j) { + if (va->texCoord[j].enable == GL_TRUE) { + (*va->texCoord[j].proc)(tcaPtr[j]); + tcaPtr[j] += va->texCoord[j].skip; + } + } + if (va->color.enable == GL_TRUE) { + (*va->color.proc)(caPtr); + caPtr += va->color.skip; } - if (va->indexEnable == GL_TRUE) { - (*va->indexCall)(iaPtr); - iaPtr += va->indexSkip; + if (va->index.enable == GL_TRUE) { + (*va->index.proc)(iaPtr); + iaPtr += va->index.skip; } - if (va->normalEnable == GL_TRUE) { - (*va->normalCall)(naPtr); - naPtr += va->normalSkip; + if (va->normal.enable == GL_TRUE) { + (*va->normal.proc)(naPtr); + naPtr += va->normal.skip; } - if (va->vertexEnable == GL_TRUE) { - (*va->vertexCall)(vaPtr); - vaPtr += va->vertexSkip; + if (va->vertex.enable == GL_TRUE) { + (*va->vertex.proc)(vaPtr); + vaPtr += va->vertex.skip; } } glEnd(); @@ -617,7 +654,7 @@ const GLubyte *iPtr1 = NULL; const GLushort *iPtr2 = NULL; const GLuint *iPtr3 = NULL; - GLint i, offset = 0; + GLint i, j, offset = 0; switch (mode) { case GL_POINTS: @@ -669,24 +706,53 @@ offset = (GLint)(*iPtr3++); break; } - if (va->edgeFlagEnable == GL_TRUE) { - (*va->edgeFlagCall)(va->edgeFlagPtr+(offset*va->edgeFlagSkip)); + if (va->edgeFlag.enable == GL_TRUE) { + (*va->edgeFlag.proc)(va->edgeFlag.ptr+(offset*va->edgeFlag.skip)); } - if (va->texCoordEnable == GL_TRUE) { - (*va->texCoordCall)(va->texCoordPtr+(offset*va->texCoordSkip)); - } - if (va->colorEnable == GL_TRUE) { - (*va->colorCall)(va->colorPtr+(offset*va->colorSkip)); + for (j=0; j<__GLX_MAX_TEXTURE_UNITS; ++j) { + if (va->texCoord[j].enable == GL_TRUE) { + (*va->texCoord[j].proc)(va->texCoord[j].ptr+ + (offset*va->texCoord[j].skip)); + } + } + if (va->color.enable == GL_TRUE) { + (*va->color.proc)(va->color.ptr+(offset*va->color.skip)); } - if (va->indexEnable == GL_TRUE) { - (*va->indexCall)(va->indexPtr+(offset*va->indexSkip)); + if (va->index.enable == GL_TRUE) { + (*va->index.proc)(va->index.ptr+(offset*va->index.skip)); } - if (va->normalEnable == GL_TRUE) { - (*va->normalCall)(va->normalPtr+(offset*va->normalSkip)); + if (va->normal.enable == GL_TRUE) { + (*va->normal.proc)(va->normal.ptr+(offset*va->normal.skip)); } - if (va->vertexEnable == GL_TRUE) { - (*va->vertexCall)(va->vertexPtr+(offset*va->vertexSkip)); + if (va->vertex.enable == GL_TRUE) { + (*va->vertex.proc)(va->vertex.ptr+(offset*va->vertex.skip)); } } glEnd(); +} + +void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, + GLsizei count, GLenum type, + const GLvoid *indices) +{ + __GLXcontext *gc = __glXGetCurrentContext(); + + if (end < start) { + __glXSetError(gc, GL_INVALID_VALUE); + return; + } + + glDrawElements(mode,count,type,indices); +} + +void glClientActiveTextureARB(GLenum texture) +{ + __GLXcontext *gc = __glXGetCurrentContext(); + GLint unit = (GLint) texture - GL_TEXTURE0_ARB; + + if (unit < 0 || __GLX_MAX_TEXTURE_UNITS <= unit) { + __glXSetError(gc, GL_INVALID_ENUM); + return; + } + gc->state.vertArray.activeTexture = unit; } Index: xc/lib/GL/glx/xfont.c diff -u xc/lib/GL/glx/xfont.c:1.4 xc/lib/GL/glx/xfont.c:1.6 --- xc/lib/GL/glx/xfont.c:1.4 Fri Jun 16 20:02:50 2000 +++ xc/lib/GL/glx/xfont.c Wed May 2 11:06:02 2001 @@ -1,3 +1,4 @@ +/* $XFree86: xc/lib/GL/glx/xfont.c,v 1.6 2001/05/02 15:06:02 dawes Exp $ */ /* * Mesa 3-D graphics library * Version: 3.1 @@ -248,7 +249,7 @@ bm = (GLubyte *) Xmalloc((max_bm_width * max_bm_height) * sizeof (GLubyte)); if (!bm) { - XFreeFontInfo( NULL, fs, 0 ); + XFreeFontInfo( NULL, fs, 1 ); __glXSetError(CC, GL_OUT_OF_MEMORY); return; } @@ -361,7 +362,7 @@ } Xfree(bm); - XFreeFontInfo( NULL, fs, 0 ); + XFreeFontInfo( NULL, fs, 1 ); XFreeGC (dpy, gc); /* Restore saved packing modes. */ Index: xc/lib/GL/include/GL/internal/glcore.h diff -u xc/lib/GL/include/GL/internal/glcore.h:1.5 xc/lib/GL/include/GL/internal/glcore.h:1.7 --- xc/lib/GL/include/GL/internal/glcore.h:1.5 Mon Jun 14 03:23:42 1999 +++ xc/lib/GL/include/GL/internal/glcore.h Sun Mar 25 00:32:00 2001 @@ -1,32 +1,51 @@ +/* $XFree86: xc/lib/GL/include/GL/internal/glcore.h,v 1.7 2001/03/25 05:32:00 tsi Exp $ */ #ifndef __gl_core_h_ #define __gl_core_h_ -/* $XFree86: xc/lib/GL/include/GL/internal/glcore.h,v 1.5 1999/06/14 07:23:42 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #ifndef XFree86LOADER #include #endif +#ifdef CAPI +#undef CAPI +#endif +#define CAPI + #define GL_CORE_SGI 1 #define GL_CORE_MESA 2 @@ -202,13 +221,13 @@ void (*fill)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv, GLuint val, GLint x, GLint y, GLint w, GLint h); void (*free)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv); - void *other; /* exported */ void (*freePrivate)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv); void *private; /* private */ + void *other; /* implementation private data */ __GLbufMainInitFn mainInit; __GLbufFallbackInitFn fallbackInit; }; @@ -295,12 +314,12 @@ void (*lockDP)(__GLdrawablePrivate *glPriv, __GLcontext *gc); void (*unlockDP)(__GLdrawablePrivate *glPriv); - - void *other; - /* exported */ - void (*freePrivate)(__GLdrawablePrivate *); void *private; + void (*freePrivate)(__GLdrawablePrivate *); + + /* client data */ + void *other; }; /* @@ -330,7 +349,7 @@ */ typedef struct __GLimportsRec { /* Memory management */ - void *(*malloc)(__GLcontext *gc, size_t size); + void * (*malloc)(__GLcontext *gc, size_t size); void *(*calloc)(__GLcontext *gc, size_t numElem, size_t elemSize); void *(*realloc)(__GLcontext *gc, void *oldAddr, size_t newSize); void (*free)(__GLcontext *gc, void *addr); @@ -340,11 +359,12 @@ void (*fatal)(__GLcontext *gc, char *fmt); /* other system calls */ - char *(*getenv)(__GLcontext *gc, const char *var); - int (*sprintf)(__GLcontext *gc, char *str, const char *fmt, ...); - void *(*fopen)(__GLcontext *gc, const char *path, const char *mode); - int (*fclose)(__GLcontext *gc, void *stream); - int (*fprintf)(__GLcontext *gc, void *stream, const char *fmt, ...); + char *(CAPI *getenv)(__GLcontext *gc, const char *var); + int (CAPI *atoi)(__GLcontext *gc, const char *str); + int (CAPI *sprintf)(__GLcontext *gc, char *str, const char *fmt, ...); + void *(CAPI *fopen)(__GLcontext *gc, const char *path, const char *mode); + int (CAPI *fclose)(__GLcontext *gc, void *stream); + int (CAPI *fprintf)(__GLcontext *gc, void *stream, const char *fmt, ...); /* Drawing surface management */ __GLdrawablePrivate *(*getDrawablePrivate)(__GLcontext *gc); Index: xc/lib/GL/mesa/dri/Imakefile diff -u xc/lib/GL/mesa/dri/Imakefile:1.2 xc/lib/GL/mesa/dri/Imakefile:1.5 --- xc/lib/GL/mesa/dri/Imakefile:1.2 Tue Feb 22 23:46:36 2000 +++ xc/lib/GL/mesa/dri/Imakefile Mon Apr 2 22:29:33 2001 @@ -1,10 +1,18 @@ -XCOMM $XFree86: xc/lib/GL/mesa/dri/Imakefile,v 1.2 2000/02/23 04:46:36 martin Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/dri/Imakefile,v 1.5 2001/04/03 02:29:33 dawes Exp $ -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx +#if GlxUseBuiltInDRIDriver +#define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) +#define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) #define DoExtraLib SharedLibGlx #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx +#else +#define DoNormalLib SharedLibGlxWithoutPIC +#define DoSharedLib !SharedLibGlxWithoutPIC +#define DoExtraLib NO +#define DoDebugLib NO +#define DoProfileLib NO +#endif #if Malloc0ReturnsNull ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL @@ -12,25 +20,18 @@ #if BuildXF86DRI DRI_DEFINES = GlxDefines - DRI_INCLUDES = -I../../glx -I../../dri \ - -I$(TOP)/include -I$(TOP)/include/GL \ + DRI_INCLUDES = -I$(GLXLIBSRC)/glx -I$(GLXLIBSRC)/dri \ + -I$(INCLUDESRC) -I$(INCLUDESRC)/GL \ -I$(XF86OSSRC) -I$(SERVERSRC)/GL/dri #endif -MESA_INCLUDES = -I. -I.. -I../include +MESA_INCLUDES = -I. -I$(MESASRCDIR)/src -I$(MESASRCDIR)/include DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) $(DRI_INCLUDES) $(MESA_INCLUDES) + INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) $(DRI_INCLUDES) $(MESA_INCLUDES) SRCS = dri_mesa.c OBJS = dri_mesa.o -#if !GlxUseBuiltInDRIDriver -#undef DoNormalLib NormalLibGlx -#undef DoExtraLib SharedLibGlx -#undef DoDebugLib DebugLibGlx -#undef DoProfileLib ProfileLibGlx -#endif - #include LibraryObjectRule() @@ -39,3 +40,4 @@ NormalLintTarget($(SRCS)) DependTarget() + Index: xc/lib/GL/mesa/dri/dri_mesa.c diff -u xc/lib/GL/mesa/dri/dri_mesa.c:1.13 xc/lib/GL/mesa/dri/dri_mesa.c:1.16 --- xc/lib/GL/mesa/dri/dri_mesa.c:1.13 Thu Dec 7 15:26:04 2000 +++ xc/lib/GL/mesa/dri/dri_mesa.c Tue Apr 10 12:07:49 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/dri/dri_mesa.c,v 1.13 2000/12/07 20:26:04 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/dri/dri_mesa.c,v 1.16 2001/04/10 16:07:49 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -32,6 +32,27 @@ * Brian E. Paul */ +/* + * This file gets compiled into each of the DRI 3D drivers. The + * functions defined here are called from the GL library via + * function pointers in the __DRIdisplayRec, __DRIscreenRec, + * __DRIcontextRec, __DRIdrawableRec structures defined in glxclient.h + * + * Those function pointers are initialized by code in this file. + * The process starts when libGL calls the __driCreateScreen() function + * at the end of this file. + * + * The above-mentioned DRI structures have no dependencies on Mesa. + * Each structure instead has a generic (void *) private pointer that + * points to a private structure. For Mesa drivers, these private + * structures are the __DRIdrawablePrivateRec, __DRIcontextPrivateRec, + * __DRIscreenPrivateRec, and __DRIvisualPrivateRec structures defined + * in dri_mesaint.h. We allocate and attach those structs here in + * this file. + */ + + + #ifdef GLX_DIRECT_RENDERING #include @@ -58,19 +79,19 @@ static void *driMesaCreateDrawable(Display *dpy, int scrn, GLXDrawable draw, VisualID vid, __DRIdrawable *pdraw); static __DRIdrawable *driMesaGetDrawable(Display *dpy, GLXDrawable draw, - void *private); -static void driMesaSwapBuffers(Display *dpy, void *private); -static void driMesaDestroyDrawable(Display *dpy, void *private); + void *screenPrivate); +static void driMesaSwapBuffers(Display *dpy, void *drawPrivate); +static void driMesaDestroyDrawable(Display *dpy, void *drawPrivate); /* Context methods */ static void *driMesaCreateContext(Display *dpy, XVisualInfo *vis, void *shared, __DRIcontext *pctx); -static void driMesaDestroyContext(Display *dpy, int scrn, void *private); +static void driMesaDestroyContext(Display *dpy, int scrn, void *screenPrivate); /* Screen methods */ static void *driMesaCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, int numConfigs, __GLXvisualConfig *config); -static void driMesaDestroyScreen(Display *dpy, int scrn, void *private); +static void driMesaDestroyScreen(Display *dpy, int scrn, void *screenPrivate); static Bool driFeatureOn(const char *name) { @@ -184,10 +205,15 @@ /*****************************************************************/ +/* + * XXX get rid of this level of indirection? + * Since the code in this file is compiled into each DRI 3D driver + * this layer of indirection serves no purpose. + */ static void driMesaInitAPI(__MesaAPI *MesaAPI) { - MesaAPI->InitDriver = XMesaInitDriver; - MesaAPI->ResetDriver = XMesaResetDriver; + MesaAPI->InitDriver = XMesaInitDriver; /* XXX rename as CreateScreen? */ + MesaAPI->ResetDriver = XMesaResetDriver; /* rename as DestroyScreen? */ MesaAPI->CreateVisual = XMesaCreateVisual; MesaAPI->CreateContext = XMesaCreateContext; MesaAPI->DestroyContext = XMesaDestroyContext; @@ -283,9 +309,15 @@ #endif } + /* XXX this is disabled so that if we call SwapBuffers on an unbound + * window we can determine the last context bound to the window and + * use that context's lock. (BrianP, 2-Dec-2000) + */ +#if 0 /* Unbind the drawable */ pcp->driDrawablePriv = NULL; pdp->driContextPriv = &psp->dummyContextPriv; +#endif return GL_TRUE; } @@ -427,7 +459,7 @@ if (try) { if (psp->fullscreen && !psp->pSAREA->frame.fullscreen) { /* Server has closed fullscreen mode */ - __driMesaMessage("server closed fullscreen mode\n"); + __driMesaMessage("server closed fullscreen mode"); psp->fullscreen = NULL; } if (XF86DRIOpenFullScreen(dpy, scrn, draw)) { @@ -444,10 +476,11 @@ /* * This function basically updates the __DRIdrawablePrivate struct's - * cliprect information by calling XF86DRIGetDrawableInfo(). - * This is usually called by a macro which compares the - * __DRIdrwablePrivate pStamp and lastStamp values. If the values - * are different that means we have to update the clipping info. + * cliprect information by calling XF86DRIGetDrawableInfo(). This is + * usually called by the DRI_MESA_VALIDATE_DRAWABLE_INFO macro which + * compares the __DRIdrwablePrivate pStamp and lastStamp values. If + * the values are different that means we have to update the clipping + * info. */ void driMesaUpdateDrawableInfo(Display *dpy, int scrn, __DRIdrawablePrivate *pdp) @@ -571,9 +604,9 @@ } static __DRIdrawable *driMesaGetDrawable(Display *dpy, GLXDrawable draw, - void *private) + void *screenPrivate) { - __DRIscreenPrivate *psp = (__DRIscreenPrivate *)private; + __DRIscreenPrivate *psp = (__DRIscreenPrivate *) screenPrivate; /* ** Make sure this routine returns NULL if the drawable is not bound @@ -582,17 +615,22 @@ return __driMesaFindDrawable(psp->drawHash, draw); } -static void driMesaSwapBuffers(Display *dpy, void *private) +/* + * XXX if we get rid of the XMesa function table then we should probably + * get rid of this function and require each driver to implement a + * driMesaSwapBuffers function. + */ +static void driMesaSwapBuffers(Display *dpy, void *drawPrivate) { - __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)private; + __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *) drawPrivate; __DRIscreenPrivate *psp = pdp->driScreenPriv; (*psp->MesaAPI.SwapBuffers)(pdp); } -static void driMesaDestroyDrawable(Display *dpy, void *private) +static void driMesaDestroyDrawable(Display *dpy, void *drawPrivate) { - __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)private; + __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)drawPrivate; __DRIscreenPrivate *psp = pdp->driScreenPriv; int scrn = psp->myNum; @@ -625,18 +663,6 @@ return NULL; } - if (!psp->dummyContextPriv.driScreenPriv) { - if (!XF86DRICreateContext(dpy, vis->screen, vis->visual, - &psp->dummyContextPriv.contextID, - &psp->dummyContextPriv.hHWContext)) { - return NULL; - } - psp->dummyContextPriv.driScreenPriv = psp; - psp->dummyContextPriv.mesaContext = NULL; - psp->dummyContextPriv.driDrawablePriv = NULL; - /* No other fields should be used! */ - } - /* Create the hash table */ if (!psp->drawHash) psp->drawHash = drmHashCreate(); @@ -656,6 +682,29 @@ return NULL; } + /* This is moved because the Xserver creates a global dummy context + * the first time XF86DRICreateContext is called. + */ + + if (!psp->dummyContextPriv.driScreenPriv) { +#if 0 + /* We no longer use this cause we have the shared dummyContext + * in the SAREA. + */ + if (!XF86DRICreateContext(dpy, vis->screen, vis->visual, + &psp->dummyContextPriv.contextID, + &psp->dummyContextPriv.hHWContext)) { + return NULL; + } +#endif + psp->dummyContextPriv.hHWContext = psp->pSAREA->dummy_context; + psp->dummyContextPriv.driScreenPriv = psp; + psp->dummyContextPriv.mesaContext = NULL; + psp->dummyContextPriv.driDrawablePriv = NULL; + psp->dummyContextPriv.driverPrivate = NULL; + /* No other fields should be used! */ + } + for (i = 0; i < psp->numVisuals; i++) { if (psp->visuals[i].vid == vis->visualid) { GLvisual *mesaVis = psp->visuals[i].mesaVisual; @@ -672,6 +721,7 @@ else { gl_destroy_context(pcp->mesaContext); pcp->mesaContext = NULL; + pcp->driverPrivate = NULL; } } } @@ -692,9 +742,9 @@ return pcp; } -static void driMesaDestroyContext(Display *dpy, int scrn, void *private) +static void driMesaDestroyContext(Display *dpy, int scrn, void *contextPrivate) { - __DRIcontextPrivate *pcp = (__DRIcontextPrivate *)private; + __DRIcontextPrivate *pcp = (__DRIcontextPrivate *) contextPrivate; __DRIscreenPrivate *psp; __DRIdrawablePrivate *pdp; @@ -708,9 +758,9 @@ } } __driMesaGarbageCollectDrawables(pcp->driScreenPriv->drawHash); - (void)XF86DRIDestroyContext(dpy, scrn, pcp->contextID); (*pcp->driScreenPriv->MesaAPI.DestroyContext)(pcp); gl_destroy_context(pcp->mesaContext); + (void)XF86DRIDestroyContext(dpy, scrn, pcp->contextID); Xfree(pcp); } } @@ -757,6 +807,8 @@ psp->fd = drmOpen(NULL,BusID); if (psp->fd < 0) { + fprintf(stderr, "libGL error: failed to open DRM: %s\n", strerror(-psp->fd)); + fprintf(stderr, "libGL error: reverting to (slow) indirect rendering\n"); Xfree(BusID); Xfree(psp); (void)XF86DRICloseConnection(dpy, scrn); @@ -793,6 +845,11 @@ return NULL; } + /* + * Get device name (like "tdfx") and the ddx version numbers. + * We'll check the version in each DRI driver's "createScreen" + * function. + */ if (!XF86DRIGetClientDriverName(dpy, scrn, &psp->ddxMajor, &psp->ddxMinor, @@ -804,8 +861,17 @@ return NULL; } + /* + * XXX this XMesa indirection may go away. + */ driMesaInitAPI(&psp->MesaAPI); + /* + * Get device-specific info. pDevPriv will point to a struct + * (such as DRIRADEONRec in xfree86/driver/ati/radeon_dri.h) + * that has information about the screen size, depth, pitch, + * ancilliary buffers, DRM mmap handles, etc. + */ if (!XF86DRIGetDeviceInfo(dpy, scrn, &hFB, &psp->fbOrigin, @@ -822,6 +888,9 @@ psp->fbHeight = DisplayHeight(dpy, scrn); psp->fbBPP = 32; /* NOT_DONE: Get this from X server */ + /* + * Map the framebuffer region. + */ if (drmMap(psp->fd, hFB, psp->fbSize, (drmAddressPtr)&psp->pFB)) { Xfree(psp->pDevPriv); (void)drmClose(psp->fd); @@ -830,6 +899,10 @@ return NULL; } + /* + * Map the SAREA region. Further mmap regions may be setup in + * each DRI driver's "createScreen" function. + */ if (drmMap(psp->fd, hSAREA, SAREA_MAX, (drmAddressPtr)&psp->pSAREA)) { (void)drmUnmap((drmAddress)psp->pFB, psp->fbSize); Xfree(psp->pDevPriv); @@ -839,6 +912,9 @@ return NULL; } + /* + * Allocate space for an array of visual records and initialize them. + */ psp->numVisuals = numConfigs; psp->visuals = (__DRIvisualPrivate *)Xmalloc(numConfigs * sizeof(__DRIvisualPrivate)); @@ -922,15 +998,21 @@ return (void *)psp; } -static void driMesaDestroyScreen(Display *dpy, int scrn, void *private) +static void driMesaDestroyScreen(Display *dpy, int scrn, void *screenPrivate) { - __DRIscreenPrivate *psp = (__DRIscreenPrivate *)private; + __DRIscreenPrivate *psp = (__DRIscreenPrivate *) screenPrivate; if (psp) { +#if 0 + /* + ** NOT_DONE: For the same reason as that listed below, we cannot + ** call the X server here to destroy the dummy context. + */ if (psp->dummyContextPriv.driScreenPriv) { (void)XF86DRIDestroyContext(dpy, scrn, psp->dummyContextPriv.contextID); } +#endif if (psp->MesaAPI.ResetDriver) (*psp->MesaAPI.ResetDriver)(psp); while (--psp->numVisuals >= 0) { @@ -959,13 +1041,14 @@ /* - * This is the entrypoint into the driver. - * The driCreateScreen name is the symbol that libGL.so fetches. + * This is the entrypoint into the DRI 3D driver. + * The driCreateScreen name is the symbol that libGL.so fetches via + * dlsym() in order to bootstrap the driver. */ void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, int numConfigs, __GLXvisualConfig *config) { - return driMesaCreateScreen(dpy, scrn, psc, numConfigs, config); + return driMesaCreateScreen(dpy, scrn, psc, numConfigs, config); } Index: xc/lib/GL/mesa/include/GL/Imakefile diff -u xc/lib/GL/mesa/include/GL/Imakefile:1.6 xc/lib/GL/mesa/include/GL/Imakefile:removed --- xc/lib/GL/mesa/include/GL/Imakefile:1.6 Tue Aug 1 16:28:38 2000 +++ xc/lib/GL/mesa/include/GL/Imakefile Mon Jun 4 12:37:19 2001 @@ -1,15 +0,0 @@ -XCOMM $XFree86: xc/lib/GL/mesa/include/GL/Imakefile,v 1.6 2000/08/01 20:28:38 dawes Exp $ - -#define IHaveModules -#include - - DEFINES = $(GLX_DEFINES) - -LinkSourceFile(gl.h, $(MESASRCDIR)/include/GL) -LinkSourceFile(glext.h, $(MESASRCDIR)/include/GL) -LinkSourceFile(glx.h, $(TOP)/include/GL) -LinkSourceFile(glxtokens.h, $(TOP)/include/GL) -LinkSourceFile(xmesa.h, $(MESASRCDIR)/include/GL) -LinkSourceFile(xmesa_x.h, $(MESASRCDIR)/include/GL) -LinkSourceFile(xmesa_xf86.h, $(MESASRCDIR)/include/GL) -LinkSourceFile(osmesa.h, $(MESASRCDIR)/include/GL) Index: xc/lib/GL/mesa/src/Imakefile diff -u xc/lib/GL/mesa/src/Imakefile:1.21 xc/lib/GL/mesa/src/Imakefile:1.26 --- xc/lib/GL/mesa/src/Imakefile:1.21 Tue Dec 12 18:24:27 2000 +++ xc/lib/GL/mesa/src/Imakefile Wed May 2 11:06:02 2001 @@ -1,383 +1,54 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/Imakefile,v 1.21 2000/12/12 23:24:27 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/Imakefile,v 1.26 2001/05/02 15:06:02 dawes Exp $ #include -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx +/* + * Only need SharedLib build unless OSMesa lib is built, or driver is built + * in to libGL + */ +#if BuildXF86DRI && !GlxUseSGISI && \ + (GlxUseBuiltInDRIDriver || \ + !GlxBuiltInMesa || !defined(GlxDriverUsesMesa)) +#define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) +#define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) #define DoExtraLib SharedLibGlx #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx +#else +#define DoNormalLib SharedLibGlxWithoutPIC +#define DoSharedLib !SharedLibGlxWithoutPIC +#define DoExtraLib NO +#define DoDebugLib NO +#define DoProfileLib NO +#endif #if Malloc0ReturnsNull ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL #endif #if GlxBuiltInTdfx - TDFX_DEFS = -DFX + TDFX_DEFINES = -DFX #endif -LinkSourceFile(aatriangle.c, $(MESASRCDIR)/src) -LinkSourceFile(aatriangle.h, $(MESASRCDIR)/src) -LinkSourceFile(aatritemp.h, $(MESASRCDIR)/src) -LinkSourceFile(accum.c, $(MESASRCDIR)/src) -LinkSourceFile(accum.h, $(MESASRCDIR)/src) -LinkSourceFile(all.h, $(MESASRCDIR)/src) -LinkSourceFile(alpha.c, $(MESASRCDIR)/src) -LinkSourceFile(alpha.h, $(MESASRCDIR)/src) -LinkSourceFile(alphabuf.c, $(MESASRCDIR)/src) -LinkSourceFile(alphabuf.h, $(MESASRCDIR)/src) -LinkSourceFile(attrib.c, $(MESASRCDIR)/src) -LinkSourceFile(attrib.h, $(MESASRCDIR)/src) -LinkSourceFile(bbox.c, $(MESASRCDIR)/src) -LinkSourceFile(bbox.h, $(MESASRCDIR)/src) -LinkSourceFile(bitmap.c, $(MESASRCDIR)/src) -LinkSourceFile(bitmap.h, $(MESASRCDIR)/src) -LinkSourceFile(blend.c, $(MESASRCDIR)/src) -LinkSourceFile(blend.h, $(MESASRCDIR)/src) -LinkSourceFile(buffers.c, $(MESASRCDIR)/src) -LinkSourceFile(buffers.h, $(MESASRCDIR)/src) -LinkSourceFile(clip.c, $(MESASRCDIR)/src) -LinkSourceFile(clip.h, $(MESASRCDIR)/src) -LinkSourceFile(clip_funcs.h, $(MESASRCDIR)/src) -LinkSourceFile(clip_tmp.h, $(MESASRCDIR)/src) -LinkSourceFile(colortab.c, $(MESASRCDIR)/src) -LinkSourceFile(colortab.h, $(MESASRCDIR)/src) -LinkSourceFile(config.c, $(MESASRCDIR)/src) -LinkSourceFile(config.h, $(MESASRCDIR)/src) -LinkSourceFile(context.c, $(MESASRCDIR)/src) -LinkSourceFile(context.h, $(MESASRCDIR)/src) -LinkSourceFile(copy_tmp.h, $(MESASRCDIR)/src) -LinkSourceFile(copypix.c, $(MESASRCDIR)/src) -LinkSourceFile(copypix.h, $(MESASRCDIR)/src) -LinkSourceFile(cull_tmp.h, $(MESASRCDIR)/src) -LinkSourceFile(cva.c, $(MESASRCDIR)/src) -LinkSourceFile(cva.h, $(MESASRCDIR)/src) -LinkSourceFile(dd.h, $(MESASRCDIR)/src) -LinkSourceFile(debug_xform.c, $(MESASRCDIR)/src) -LinkSourceFile(debug_xform.h, $(MESASRCDIR)/src) -LinkSourceFile(depth.c, $(MESASRCDIR)/src) -LinkSourceFile(depth.h, $(MESASRCDIR)/src) -LinkSourceFile(dlist.c, $(MESASRCDIR)/src) -LinkSourceFile(dlist.h, $(MESASRCDIR)/src) -LinkSourceFile(dotprod_tmp.h, $(MESASRCDIR)/src) -LinkSourceFile(drawpix.c, $(MESASRCDIR)/src) -LinkSourceFile(drawpix.h, $(MESASRCDIR)/src) -LinkSourceFile(enable.c, $(MESASRCDIR)/src) -LinkSourceFile(enable.h, $(MESASRCDIR)/src) -LinkSourceFile(enums.c, $(MESASRCDIR)/src) -LinkSourceFile(enums.h, $(MESASRCDIR)/src) -LinkSourceFile(eval.c, $(MESASRCDIR)/src) -LinkSourceFile(eval.h, $(MESASRCDIR)/src) -LinkSourceFile(extensions.c, $(MESASRCDIR)/src) -LinkSourceFile(extensions.h, $(MESASRCDIR)/src) -LinkSourceFile(feedback.c, $(MESASRCDIR)/src) -LinkSourceFile(feedback.h, $(MESASRCDIR)/src) -LinkSourceFile(fixed.h, $(MESASRCDIR)/src) -LinkSourceFile(fog.c, $(MESASRCDIR)/src) -LinkSourceFile(fog.h, $(MESASRCDIR)/src) -LinkSourceFile(fog_tmp.h, $(MESASRCDIR)/src) -LinkSourceFile(general_clip.h, $(MESASRCDIR)/src) -LinkSourceFile(get.c, $(MESASRCDIR)/src) -LinkSourceFile(get.h, $(MESASRCDIR)/src) -LinkSourceFile(glapi.c, $(MESASRCDIR)/src) -LinkSourceFile(glapi.h, $(MESASRCDIR)/src) -LinkSourceFile(glapinoop.c, $(MESASRCDIR)/src) -LinkSourceFile(glapinoop.h, $(MESASRCDIR)/src) -LinkSourceFile(glapioffsets.h, $(MESASRCDIR)/src) -LinkSourceFile(glapitable.h, $(MESASRCDIR)/src) -LinkSourceFile(glapitemp.h, $(MESASRCDIR)/src) -LinkSourceFile(glheader.h, $(MESASRCDIR)/src) -LinkSourceFile(glthread.c, $(MESASRCDIR)/src) -LinkSourceFile(glthread.h, $(MESASRCDIR)/src) -LinkSourceFile(hash.c, $(MESASRCDIR)/src) -LinkSourceFile(hash.h, $(MESASRCDIR)/src) -LinkSourceFile(hint.c, $(MESASRCDIR)/src) -LinkSourceFile(hint.h, $(MESASRCDIR)/src) -LinkSourceFile(image.c, $(MESASRCDIR)/src) -LinkSourceFile(image.h, $(MESASRCDIR)/src) -LinkSourceFile(imaging.c, $(MESASRCDIR)/src) -LinkSourceFile(imaging.h, $(MESASRCDIR)/src) -LinkSourceFile(indirect_tmp.h, $(MESASRCDIR)/src) -LinkSourceFile(interp_tmp.h, $(MESASRCDIR)/src) -LinkSourceFile(light.c, $(MESASRCDIR)/src) -LinkSourceFile(light.h, $(MESASRCDIR)/src) -LinkSourceFile(lines.c, $(MESASRCDIR)/src) -LinkSourceFile(lines.h, $(MESASRCDIR)/src) -LinkSourceFile(linetemp.h, $(MESASRCDIR)/src) -LinkSourceFile(lnaatemp.h, $(MESASRCDIR)/src) -LinkSourceFile(logic.c, $(MESASRCDIR)/src) -LinkSourceFile(logic.h, $(MESASRCDIR)/src) -LinkSourceFile(macros.h, $(MESASRCDIR)/src) -LinkSourceFile(masking.c, $(MESASRCDIR)/src) -LinkSourceFile(masking.h, $(MESASRCDIR)/src) -LinkSourceFile(matrix.c, $(MESASRCDIR)/src) -LinkSourceFile(matrix.h, $(MESASRCDIR)/src) -LinkSourceFile(mem.c, $(MESASRCDIR)/src) -LinkSourceFile(mem.h, $(MESASRCDIR)/src) -LinkSourceFile(mmath.c, $(MESASRCDIR)/src) -LinkSourceFile(mmath.h, $(MESASRCDIR)/src) -LinkSourceFile(norm_tmp.h, $(MESASRCDIR)/src) -LinkSourceFile(pb.c, $(MESASRCDIR)/src) -LinkSourceFile(pb.h, $(MESASRCDIR)/src) -LinkSourceFile(pipeline.c, $(MESASRCDIR)/src) -LinkSourceFile(pipeline.h, $(MESASRCDIR)/src) -LinkSourceFile(pixel.c, $(MESASRCDIR)/src) -LinkSourceFile(pixel.h, $(MESASRCDIR)/src) -LinkSourceFile(pixeltex.c, $(MESASRCDIR)/src) -LinkSourceFile(pixeltex.h, $(MESASRCDIR)/src) -LinkSourceFile(points.c, $(MESASRCDIR)/src) -LinkSourceFile(points.h, $(MESASRCDIR)/src) -LinkSourceFile(polygon.c, $(MESASRCDIR)/src) -LinkSourceFile(polygon.h, $(MESASRCDIR)/src) -LinkSourceFile(quads.c, $(MESASRCDIR)/src) -LinkSourceFile(quads.h, $(MESASRCDIR)/src) -LinkSourceFile(rastpos.c, $(MESASRCDIR)/src) -LinkSourceFile(rastpos.h, $(MESASRCDIR)/src) -LinkSourceFile(readpix.c, $(MESASRCDIR)/src) -LinkSourceFile(readpix.h, $(MESASRCDIR)/src) -LinkSourceFile(rect.c, $(MESASRCDIR)/src) -LinkSourceFile(rect.h, $(MESASRCDIR)/src) -LinkSourceFile(render_tmp.h, $(MESASRCDIR)/src) -LinkSourceFile(scissor.c, $(MESASRCDIR)/src) -LinkSourceFile(scissor.h, $(MESASRCDIR)/src) -LinkSourceFile(shade.c, $(MESASRCDIR)/src) -LinkSourceFile(shade.h, $(MESASRCDIR)/src) -LinkSourceFile(shade_tmp.h, $(MESASRCDIR)/src) -LinkSourceFile(simple_list.h, $(MESASRCDIR)/src) -LinkSourceFile(span.c, $(MESASRCDIR)/src) -LinkSourceFile(span.h, $(MESASRCDIR)/src) -LinkSourceFile(stages.c, $(MESASRCDIR)/src) -LinkSourceFile(stages.h, $(MESASRCDIR)/src) -LinkSourceFile(state.c, $(MESASRCDIR)/src) -LinkSourceFile(state.h, $(MESASRCDIR)/src) -LinkSourceFile(stencil.c, $(MESASRCDIR)/src) -LinkSourceFile(stencil.h, $(MESASRCDIR)/src) -LinkSourceFile(texgen_tmp.h, $(MESASRCDIR)/src) -LinkSourceFile(teximage.c, $(MESASRCDIR)/src) -LinkSourceFile(teximage.h, $(MESASRCDIR)/src) -LinkSourceFile(texobj.c, $(MESASRCDIR)/src) -LinkSourceFile(texobj.h, $(MESASRCDIR)/src) -LinkSourceFile(texstate.c, $(MESASRCDIR)/src) -LinkSourceFile(texstate.h, $(MESASRCDIR)/src) -LinkSourceFile(texture.c, $(MESASRCDIR)/src) -LinkSourceFile(texture.h, $(MESASRCDIR)/src) -LinkSourceFile(texutil.c, $(MESASRCDIR)/src) -LinkSourceFile(texutil.h, $(MESASRCDIR)/src) -LinkSourceFile(trans_tmp.h, $(MESASRCDIR)/src) -LinkSourceFile(translate.c, $(MESASRCDIR)/src) -LinkSourceFile(translate.h, $(MESASRCDIR)/src) -LinkSourceFile(triangle.c, $(MESASRCDIR)/src) -LinkSourceFile(triangle.h, $(MESASRCDIR)/src) -LinkSourceFile(tritemp.h, $(MESASRCDIR)/src) -LinkSourceFile(types.h, $(MESASRCDIR)/src) -LinkSourceFile(varray.c, $(MESASRCDIR)/src) -LinkSourceFile(varray.h, $(MESASRCDIR)/src) -LinkSourceFile(vb.c, $(MESASRCDIR)/src) -LinkSourceFile(vb.h, $(MESASRCDIR)/src) -LinkSourceFile(vbcull.c, $(MESASRCDIR)/src) -LinkSourceFile(vbcull.h, $(MESASRCDIR)/src) -LinkSourceFile(vbfill.c, $(MESASRCDIR)/src) -LinkSourceFile(vbfill.h, $(MESASRCDIR)/src) -LinkSourceFile(vbindirect.c, $(MESASRCDIR)/src) -LinkSourceFile(vbindirect.h, $(MESASRCDIR)/src) -LinkSourceFile(vbrender.c, $(MESASRCDIR)/src) -LinkSourceFile(vbrender.h, $(MESASRCDIR)/src) -LinkSourceFile(vbxform.c, $(MESASRCDIR)/src) -LinkSourceFile(vbxform.h, $(MESASRCDIR)/src) -LinkSourceFile(vector.c, $(MESASRCDIR)/src) -LinkSourceFile(vector.h, $(MESASRCDIR)/src) -LinkSourceFile(vertices.c, $(MESASRCDIR)/src) -LinkSourceFile(vertices.h, $(MESASRCDIR)/src) -LinkSourceFile(winpos.c, $(MESASRCDIR)/src) -LinkSourceFile(winpos.h, $(MESASRCDIR)/src) -LinkSourceFile(xform.c, $(MESASRCDIR)/src) -LinkSourceFile(xform.h, $(MESASRCDIR)/src) -LinkSourceFile(xform_tmp.h, $(MESASRCDIR)/src) -LinkSourceFile(zoom.c, $(MESASRCDIR)/src) -LinkSourceFile(zoom.h, $(MESASRCDIR)/src) - - CORE_SRCS = aatriangle.c \ - accum.c \ - alpha.c \ - alphabuf.c \ - attrib.c \ - bbox.c \ - bitmap.c \ - blend.c \ - buffers.c \ - clip.c \ - colortab.c \ - config.c \ - context.c \ - copypix.c \ - cva.c \ - debug_xform.c \ - depth.c \ - dlist.c \ - drawpix.c \ - enable.c \ - enums.c \ - eval.c \ - extensions.c \ - feedback.c \ - fog.c \ - get.c \ - glapi.c \ - glapinoop.c \ - glthread.c \ - hash.c \ - hint.c \ - image.c \ - imaging.c \ - light.c \ - lines.c \ - logic.c \ - masking.c \ - matrix.c \ - mem.c \ - mmath.c \ - pb.c \ - pipeline.c \ - pixel.c \ - pixeltex.c \ - points.c \ - polygon.c \ - quads.c \ - rastpos.c \ - readpix.c \ - rect.c \ - scissor.c \ - shade.c \ - span.c \ - stages.c \ - state.c \ - stencil.c \ - teximage.c \ - texobj.c \ - texstate.c \ - texture.c \ - texutil.c \ - translate.c \ - triangle.c \ - varray.c \ - vb.c \ - vbcull.c \ - vbfill.c \ - vbindirect.c \ - vbrender.c \ - vbxform.c \ - vector.c \ - vertices.c \ - winpos.c \ - xform.c \ - zoom.c - - CORE_OBJS = aatriangle.o \ - accum.o \ - alpha.o \ - alphabuf.o \ - attrib.o \ - bbox.o \ - bitmap.o \ - blend.o \ - buffers.o \ - clip.o \ - colortab.o \ - config.o \ - context.o \ - copypix.o \ - cva.o \ - debug_xform.o \ - depth.o \ - dlist.o \ - drawpix.o \ - enable.o \ - enums.o \ - eval.o \ - extensions.o \ - feedback.o \ - fog.o \ - get.o \ - hash.o \ - hint.o \ - image.o \ - imaging.o \ - light.o \ - lines.o \ - logic.o \ - masking.o \ - matrix.o \ - mem.o \ - mmath.o \ - pb.o \ - pipeline.o \ - pixel.o \ - pixeltex.o \ - points.o \ - polygon.o \ - quads.o \ - rastpos.o \ - readpix.o \ - rect.o \ - scissor.o \ - shade.o \ - span.o \ - stages.o \ - state.o \ - stencil.o \ - teximage.o \ - texobj.o \ - texstate.o \ - texture.o \ - texutil.o \ - translate.o \ - triangle.o \ - varray.o \ - vb.o \ - vbcull.o \ - vbfill.o \ - vbindirect.o \ - vbrender.o \ - vbxform.o \ - vector.o \ - vertices.o \ - winpos.o \ - xform.o \ - zoom.o - #ifdef i386Architecture - ASM_SRCS = - ASM_OBJS = -#if MesaUseMMX - MMX_DEFS = -DUSE_MMX_ASM -#endif -#if MesaUse3DNow - 3DNOW_DEFS = -DUSE_3DNOW_ASM +#define MesaX86BuildDir /**/ +#include "X86/Imakefile.inc" #endif -#if MesaUseKatmai - KATMAI_DEFS = -DUSE_KATMAI_ASM -#endif - ASM_DEFS = -DUSE_X86_ASM $(MMX_DEFS) $(3DNOW_DEFS) $(KATMAI_DEFS) -#endif +#define MesaBuildDir /**/ +#define NeedToLinkMesaSrc +#include "Imakefile.inc" #ifdef UseCompaqMathLibrary - MATHDEF = -DCCPML + MATH_DEFINES = -DCCPML #endif - DEFINES = $(ALLOC_DEFINES) GlxDefines $(TDFX_DEFS) $(ASM_DEFS) $(MATHDEF) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) -I../include -I../../dri -I. -I../../../../include - SRCS = $(CORE_SRCS) $(ASM_SRCS) - OBJS = $(CORE_OBJS) $(ASM_OBJS) - -#if !GlxUseBuiltInDRIDriver -#undef DoNormalLib NormalLibGlx -#undef DoExtraLib SharedLibGlx -#undef DoDebugLib DebugLibGlx -#undef DoProfileLib ProfileLibGlx -#endif + DEFINES = $(ALLOC_DEFINES) GlxDefines $(TDFX_DEFINES) \ + $(MESA_ASM_DEFINES) $(MATH_DEFINES) + INCLUDES = -I$(INCLUDESRC) -I$(XINCLUDESRC) -I$(EXTINCSRC) \ + -I$(MESASRCDIR)/src -I$(GLXLIBSRC)/dri + SRCS = $(COREMESASRCS) + OBJS = $(COREMESAOBJS) -#if GlxBuiltInMesa || GlxDriverUsesMesa || !GlxUseBuiltInDRIDriver - #include LibraryObjectRule() @@ -394,12 +65,6 @@ MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) - -#endif - -#else - -AllTarget($(OBJS)) #endif Index: xc/lib/GL/mesa/src/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/Imakefile.inc:1.5 --- /dev/null Mon Jun 4 12:37:19 2001 +++ xc/lib/GL/mesa/src/Imakefile.inc Mon Apr 2 18:15:47 2001 @@ -0,0 +1,517 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/Imakefile.inc,v 1.5 2001/04/02 22:15:47 dawes Exp $ + +#ifndef MesaBuildDir +#define MesaBuildDir $(GLXLIBSRC)/mesa/src/ +#endif + +MESABUILDDIR = MesaBuildDir + +#ifdef NeedAllMesaSrc + DISPATCHSRCS = $(MESABUILDDIR)dispatch.c + GLAPISRCS = $(MESABUILDDIR)glapi.c +GLAPINOOPSRCS = $(MESABUILDDIR)glapinoop.c + GLTHREADSRCS = $(MESABUILDDIR)glthread.c +#endif + +COREMESASRCS = $(MESABUILDDIR)aatriangle.c \ + $(MESABUILDDIR)accum.c \ + $(MESABUILDDIR)alpha.c \ + $(MESABUILDDIR)alphabuf.c \ + $(MESABUILDDIR)attrib.c \ + $(MESABUILDDIR)bbox.c \ + $(MESABUILDDIR)bitmap.c \ + $(MESABUILDDIR)blend.c \ + $(MESABUILDDIR)buffers.c \ + $(MESABUILDDIR)clip.c \ + $(MESABUILDDIR)colortab.c \ + $(MESABUILDDIR)config.c \ + $(MESABUILDDIR)context.c \ + $(MESABUILDDIR)copypix.c \ + $(MESABUILDDIR)cva.c \ + $(MESABUILDDIR)debug_xform.c \ + $(MESABUILDDIR)depth.c \ + $(DISPATCHSRCS) \ + $(MESABUILDDIR)dlist.c \ + $(MESABUILDDIR)drawpix.c \ + $(MESABUILDDIR)enable.c \ + $(MESABUILDDIR)enums.c \ + $(MESABUILDDIR)eval.c \ + $(MESABUILDDIR)extensions.c \ + $(MESABUILDDIR)feedback.c \ + $(MESABUILDDIR)fog.c \ + $(MESABUILDDIR)get.c \ + $(GLAPISRCS) \ + $(GLAPINOOPSRCS) \ + $(GLTHREADSRCS) \ + $(MESABUILDDIR)hash.c \ + $(MESABUILDDIR)hint.c \ + $(MESABUILDDIR)image.c \ + $(MESABUILDDIR)imaging.c \ + $(MESABUILDDIR)light.c \ + $(MESABUILDDIR)lines.c \ + $(MESABUILDDIR)logic.c \ + $(MESABUILDDIR)masking.c \ + $(MESABUILDDIR)matrix.c \ + $(MESABUILDDIR)mem.c \ + $(MESABUILDDIR)mmath.c \ + $(MESABUILDDIR)pb.c \ + $(MESABUILDDIR)pipeline.c \ + $(MESABUILDDIR)pixel.c \ + $(MESABUILDDIR)pixeltex.c \ + $(MESABUILDDIR)points.c \ + $(MESABUILDDIR)polygon.c \ + $(MESABUILDDIR)quads.c \ + $(MESABUILDDIR)rastpos.c \ + $(MESABUILDDIR)readpix.c \ + $(MESABUILDDIR)rect.c \ + $(MESABUILDDIR)scissor.c \ + $(MESABUILDDIR)shade.c \ + $(MESABUILDDIR)span.c \ + $(MESABUILDDIR)stages.c \ + $(MESABUILDDIR)state.c \ + $(MESABUILDDIR)stencil.c \ + $(MESABUILDDIR)texformat.c \ + $(MESABUILDDIR)teximage.c \ + $(MESABUILDDIR)texobj.c \ + $(MESABUILDDIR)texstate.c \ + $(MESABUILDDIR)texture.c \ + $(MESABUILDDIR)texutil.c \ + $(MESABUILDDIR)translate.c \ + $(MESABUILDDIR)triangle.c \ + $(MESABUILDDIR)varray.c \ + $(MESABUILDDIR)vb.c \ + $(MESABUILDDIR)vbcull.c \ + $(MESABUILDDIR)vbfill.c \ + $(MESABUILDDIR)vbindirect.c \ + $(MESABUILDDIR)vbrender.c \ + $(MESABUILDDIR)vbxform.c \ + $(MESABUILDDIR)vector.c \ + $(MESABUILDDIR)vertices.c \ + $(MESABUILDDIR)winpos.c \ + $(MESABUILDDIR)xform.c \ + $(MESABUILDDIR)zoom.c + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(aatriangle.c, $(MESASRCDIR)/src) +LinkSourceFile(accum.c, $(MESASRCDIR)/src) +LinkSourceFile(alpha.c, $(MESASRCDIR)/src) +LinkSourceFile(alphabuf.c, $(MESASRCDIR)/src) +LinkSourceFile(attrib.c, $(MESASRCDIR)/src) +LinkSourceFile(bbox.c, $(MESASRCDIR)/src) +LinkSourceFile(bitmap.c, $(MESASRCDIR)/src) +LinkSourceFile(blend.c, $(MESASRCDIR)/src) +LinkSourceFile(buffers.c, $(MESASRCDIR)/src) +LinkSourceFile(clip.c, $(MESASRCDIR)/src) +LinkSourceFile(colortab.c, $(MESASRCDIR)/src) +LinkSourceFile(config.c, $(MESASRCDIR)/src) +LinkSourceFile(context.c, $(MESASRCDIR)/src) +LinkSourceFile(copypix.c, $(MESASRCDIR)/src) +LinkSourceFile(cva.c, $(MESASRCDIR)/src) +LinkSourceFile(debug_xform.c, $(MESASRCDIR)/src) +LinkSourceFile(depth.c, $(MESASRCDIR)/src) +#ifdef NeedAllMesaSrc +LinkSourceFile(dispatch.c, $(MESASRCDIR)/src) +#endif +LinkSourceFile(dlist.c, $(MESASRCDIR)/src) +LinkSourceFile(drawpix.c, $(MESASRCDIR)/src) +LinkSourceFile(enable.c, $(MESASRCDIR)/src) +LinkSourceFile(enums.c, $(MESASRCDIR)/src) +LinkSourceFile(eval.c, $(MESASRCDIR)/src) +LinkSourceFile(extensions.c, $(MESASRCDIR)/src) +LinkSourceFile(feedback.c, $(MESASRCDIR)/src) +LinkSourceFile(fog.c, $(MESASRCDIR)/src) +LinkSourceFile(get.c, $(MESASRCDIR)/src) +#ifdef NeedAllMesaSrc +LinkSourceFile(glapi.c, $(MESASRCDIR)/src) +LinkSourceFile(glapinoop.c, $(MESASRCDIR)/src) +LinkSourceFile(glthread.c, $(MESASRCDIR)/src) +#endif +LinkSourceFile(hash.c, $(MESASRCDIR)/src) +LinkSourceFile(hint.c, $(MESASRCDIR)/src) +LinkSourceFile(image.c, $(MESASRCDIR)/src) +LinkSourceFile(imaging.c, $(MESASRCDIR)/src) +LinkSourceFile(light.c, $(MESASRCDIR)/src) +LinkSourceFile(lines.c, $(MESASRCDIR)/src) +LinkSourceFile(logic.c, $(MESASRCDIR)/src) +LinkSourceFile(masking.c, $(MESASRCDIR)/src) +LinkSourceFile(matrix.c, $(MESASRCDIR)/src) +LinkSourceFile(mem.c, $(MESASRCDIR)/src) +LinkSourceFile(mmath.c, $(MESASRCDIR)/src) +LinkSourceFile(pb.c, $(MESASRCDIR)/src) +LinkSourceFile(pipeline.c, $(MESASRCDIR)/src) +LinkSourceFile(pixel.c, $(MESASRCDIR)/src) +LinkSourceFile(pixeltex.c, $(MESASRCDIR)/src) +LinkSourceFile(points.c, $(MESASRCDIR)/src) +LinkSourceFile(polygon.c, $(MESASRCDIR)/src) +LinkSourceFile(quads.c, $(MESASRCDIR)/src) +LinkSourceFile(rastpos.c, $(MESASRCDIR)/src) +LinkSourceFile(readpix.c, $(MESASRCDIR)/src) +LinkSourceFile(rect.c, $(MESASRCDIR)/src) +LinkSourceFile(scissor.c, $(MESASRCDIR)/src) +LinkSourceFile(shade.c, $(MESASRCDIR)/src) +LinkSourceFile(span.c, $(MESASRCDIR)/src) +LinkSourceFile(stages.c, $(MESASRCDIR)/src) +LinkSourceFile(state.c, $(MESASRCDIR)/src) +LinkSourceFile(stencil.c, $(MESASRCDIR)/src) +LinkSourceFile(texformat.c, $(MESASRCDIR)/src) +LinkSourceFile(teximage.c, $(MESASRCDIR)/src) +LinkSourceFile(texobj.c, $(MESASRCDIR)/src) +LinkSourceFile(texstate.c, $(MESASRCDIR)/src) +LinkSourceFile(texture.c, $(MESASRCDIR)/src) +LinkSourceFile(texutil.c, $(MESASRCDIR)/src) +LinkSourceFile(translate.c, $(MESASRCDIR)/src) +LinkSourceFile(triangle.c, $(MESASRCDIR)/src) +LinkSourceFile(varray.c, $(MESASRCDIR)/src) +LinkSourceFile(vb.c, $(MESASRCDIR)/src) +LinkSourceFile(vbcull.c, $(MESASRCDIR)/src) +LinkSourceFile(vbfill.c, $(MESASRCDIR)/src) +LinkSourceFile(vbindirect.c, $(MESASRCDIR)/src) +LinkSourceFile(vbrender.c, $(MESASRCDIR)/src) +LinkSourceFile(vbxform.c, $(MESASRCDIR)/src) +LinkSourceFile(vector.c, $(MESASRCDIR)/src) +LinkSourceFile(vertices.c, $(MESASRCDIR)/src) +LinkSourceFile(winpos.c, $(MESASRCDIR)/src) +LinkSourceFile(xform.c, $(MESASRCDIR)/src) +LinkSourceFile(zoom.c, $(MESASRCDIR)/src) +#endif + +#ifdef NeedAllMesaSrc + DISPATCHOBJS = $(MESABUILDDIR)dispatch.o + GLAPIOBJS = $(MESABUILDDIR)glapi.o +GLAPINOOPOBJS = $(MESABUILDDIR)glapinoop.o + GLTHREADOBJS = $(MESABUILDDIR)glthread.o +#endif + +COREMESAOBJS = $(MESABUILDDIR)aatriangle.o \ + $(MESABUILDDIR)accum.o \ + $(MESABUILDDIR)alpha.o \ + $(MESABUILDDIR)alphabuf.o \ + $(MESABUILDDIR)attrib.o \ + $(MESABUILDDIR)bbox.o \ + $(MESABUILDDIR)bitmap.o \ + $(MESABUILDDIR)blend.o \ + $(MESABUILDDIR)buffers.o \ + $(MESABUILDDIR)clip.o \ + $(MESABUILDDIR)colortab.o \ + $(MESABUILDDIR)config.o \ + $(MESABUILDDIR)context.o \ + $(MESABUILDDIR)copypix.o \ + $(MESABUILDDIR)cva.o \ + $(MESABUILDDIR)debug_xform.o \ + $(MESABUILDDIR)depth.o \ + $(MESABUILDDIR)dlist.o \ + $(DISPATCHOBJS) \ + $(MESABUILDDIR)drawpix.o \ + $(MESABUILDDIR)enable.o \ + $(MESABUILDDIR)enums.o \ + $(MESABUILDDIR)eval.o \ + $(MESABUILDDIR)extensions.o \ + $(MESABUILDDIR)feedback.o \ + $(MESABUILDDIR)fog.o \ + $(MESABUILDDIR)get.o \ + $(GLAPIOBJS) \ + $(GLAPINOOPOBJS) \ + $(GLTHREADOBJS) \ + $(MESABUILDDIR)hash.o \ + $(MESABUILDDIR)hint.o \ + $(MESABUILDDIR)image.o \ + $(MESABUILDDIR)imaging.o \ + $(MESABUILDDIR)light.o \ + $(MESABUILDDIR)lines.o \ + $(MESABUILDDIR)logic.o \ + $(MESABUILDDIR)masking.o \ + $(MESABUILDDIR)matrix.o \ + $(MESABUILDDIR)mem.o \ + $(MESABUILDDIR)mmath.o \ + $(MESABUILDDIR)pb.o \ + $(MESABUILDDIR)pipeline.o \ + $(MESABUILDDIR)pixel.o \ + $(MESABUILDDIR)pixeltex.o \ + $(MESABUILDDIR)points.o \ + $(MESABUILDDIR)polygon.o \ + $(MESABUILDDIR)quads.o \ + $(MESABUILDDIR)rastpos.o \ + $(MESABUILDDIR)readpix.o \ + $(MESABUILDDIR)rect.o \ + $(MESABUILDDIR)scissor.o \ + $(MESABUILDDIR)shade.o \ + $(MESABUILDDIR)span.o \ + $(MESABUILDDIR)stages.o \ + $(MESABUILDDIR)state.o \ + $(MESABUILDDIR)stencil.o \ + $(MESABUILDDIR)texformat.o \ + $(MESABUILDDIR)teximage.o \ + $(MESABUILDDIR)texobj.o \ + $(MESABUILDDIR)texstate.o \ + $(MESABUILDDIR)texture.o \ + $(MESABUILDDIR)texutil.o \ + $(MESABUILDDIR)translate.o \ + $(MESABUILDDIR)triangle.o \ + $(MESABUILDDIR)varray.o \ + $(MESABUILDDIR)vb.o \ + $(MESABUILDDIR)vbcull.o \ + $(MESABUILDDIR)vbfill.o \ + $(MESABUILDDIR)vbindirect.o \ + $(MESABUILDDIR)vbrender.o \ + $(MESABUILDDIR)vbxform.o \ + $(MESABUILDDIR)vector.o \ + $(MESABUILDDIR)vertices.o \ + $(MESABUILDDIR)winpos.o \ + $(MESABUILDDIR)xform.o \ + $(MESABUILDDIR)zoom.o + +#ifdef NeedAllMesaSrc + DISPATCHUOBJS = $(MESABUILDDIR)unshared/dispatch.o + GLAPIUOBJS = $(MESABUILDDIR)unshared/glapi.o +GLAPINOOPUOBJS = $(MESABUILDDIR)unshared/glapinoop.o + GLTHREADUOBJS = $(MESABUILDDIR)unshared/glthread.o +#endif + +COREMESAUOBJS = $(MESABUILDDIR)unshared/aatriangle.o \ + $(MESABUILDDIR)unshared/accum.o \ + $(MESABUILDDIR)unshared/alpha.o \ + $(MESABUILDDIR)unshared/alphabuf.o \ + $(MESABUILDDIR)unshared/attrib.o \ + $(MESABUILDDIR)unshared/bbox.o \ + $(MESABUILDDIR)unshared/bitmap.o \ + $(MESABUILDDIR)unshared/blend.o \ + $(MESABUILDDIR)unshared/buffers.o \ + $(MESABUILDDIR)unshared/clip.o \ + $(MESABUILDDIR)unshared/colortab.o \ + $(MESABUILDDIR)unshared/config.o \ + $(MESABUILDDIR)unshared/context.o \ + $(MESABUILDDIR)unshared/copypix.o \ + $(MESABUILDDIR)unshared/cva.o \ + $(MESABUILDDIR)unshared/debug_xform.o \ + $(MESABUILDDIR)unshared/depth.o \ + $(DISPATCHUOBJS) \ + $(MESABUILDDIR)unshared/dlist.o \ + $(MESABUILDDIR)unshared/drawpix.o \ + $(MESABUILDDIR)unshared/enable.o \ + $(MESABUILDDIR)unshared/enums.o \ + $(MESABUILDDIR)unshared/eval.o \ + $(MESABUILDDIR)unshared/extensions.o \ + $(MESABUILDDIR)unshared/feedback.o \ + $(MESABUILDDIR)unshared/fog.o \ + $(MESABUILDDIR)unshared/get.o \ + $(GLAPIUOBJS) \ + $(GLAPINOOPUOBJS) \ + $(GLTHREADUOBJS) \ + $(MESABUILDDIR)unshared/hash.o \ + $(MESABUILDDIR)unshared/hint.o \ + $(MESABUILDDIR)unshared/image.o \ + $(MESABUILDDIR)unshared/imaging.o \ + $(MESABUILDDIR)unshared/light.o \ + $(MESABUILDDIR)unshared/lines.o \ + $(MESABUILDDIR)unshared/logic.o \ + $(MESABUILDDIR)unshared/masking.o \ + $(MESABUILDDIR)unshared/matrix.o \ + $(MESABUILDDIR)unshared/mem.o \ + $(MESABUILDDIR)unshared/mmath.o \ + $(MESABUILDDIR)unshared/pb.o \ + $(MESABUILDDIR)unshared/pipeline.o \ + $(MESABUILDDIR)unshared/pixel.o \ + $(MESABUILDDIR)unshared/pixeltex.o \ + $(MESABUILDDIR)unshared/points.o \ + $(MESABUILDDIR)unshared/polygon.o \ + $(MESABUILDDIR)unshared/quads.o \ + $(MESABUILDDIR)unshared/rastpos.o \ + $(MESABUILDDIR)unshared/readpix.o \ + $(MESABUILDDIR)unshared/rect.o \ + $(MESABUILDDIR)unshared/scissor.o \ + $(MESABUILDDIR)unshared/shade.o \ + $(MESABUILDDIR)unshared/span.o \ + $(MESABUILDDIR)unshared/stages.o \ + $(MESABUILDDIR)unshared/state.o \ + $(MESABUILDDIR)unshared/stencil.o \ + $(MESABUILDDIR)unshared/texformat.o \ + $(MESABUILDDIR)unshared/teximage.o \ + $(MESABUILDDIR)unshared/texobj.o \ + $(MESABUILDDIR)unshared/texstate.o \ + $(MESABUILDDIR)unshared/texture.o \ + $(MESABUILDDIR)unshared/texutil.o \ + $(MESABUILDDIR)unshared/translate.o \ + $(MESABUILDDIR)unshared/triangle.o \ + $(MESABUILDDIR)unshared/varray.o \ + $(MESABUILDDIR)unshared/vb.o \ + $(MESABUILDDIR)unshared/vbcull.o \ + $(MESABUILDDIR)unshared/vbfill.o \ + $(MESABUILDDIR)unshared/vbindirect.o \ + $(MESABUILDDIR)unshared/vbrender.o \ + $(MESABUILDDIR)unshared/vbxform.o \ + $(MESABUILDDIR)unshared/vector.o \ + $(MESABUILDDIR)unshared/vertices.o \ + $(MESABUILDDIR)unshared/winpos.o \ + $(MESABUILDDIR)unshared/xform.o \ + $(MESABUILDDIR)unshared/zoom.o + +#ifdef NeedAllMesaSrc + DISPATCHDOBJS = $(MESABUILDDIR)debugger/dispatch.o + GLAPIDOBJS = $(MESABUILDDIR)debugger/glapi.o +GLAPINOOPDOBJS = $(MESABUILDDIR)debugger/glapinoop.o + GLTHREADDOBJS = $(MESABUILDDIR)debugger/glthread.o +#endif + +COREMESADOBJS = $(MESABUILDDIR)debugger/aatriangle.o \ + $(MESABUILDDIR)debugger/unshared/accum.o \ + $(MESABUILDDIR)debugger/alpha.o \ + $(MESABUILDDIR)debugger/alphabuf.o \ + $(MESABUILDDIR)debugger/attrib.o \ + $(MESABUILDDIR)debugger/bbox.o \ + $(MESABUILDDIR)debugger/bitmap.o \ + $(MESABUILDDIR)debugger/blend.o \ + $(MESABUILDDIR)debugger/buffers.o \ + $(MESABUILDDIR)debugger/clip.o \ + $(MESABUILDDIR)debugger/colortab.o \ + $(MESABUILDDIR)debugger/config.o \ + $(MESABUILDDIR)debugger/context.o \ + $(MESABUILDDIR)debugger/copypix.o \ + $(MESABUILDDIR)debugger/cva.o \ + $(MESABUILDDIR)debugger/debug_xform.o \ + $(MESABUILDDIR)debugger/depth.o \ + $(DISPATCHDOBJS) \ + $(MESABUILDDIR)debugger/dlist.o \ + $(MESABUILDDIR)debugger/drawpix.o \ + $(MESABUILDDIR)debugger/enable.o \ + $(MESABUILDDIR)debugger/enums.o \ + $(MESABUILDDIR)debugger/eval.o \ + $(MESABUILDDIR)debugger/extensions.o \ + $(MESABUILDDIR)debugger/feedback.o \ + $(MESABUILDDIR)debugger/fog.o \ + $(MESABUILDDIR)debugger/get.o \ + $(GLAPIUOBJS) \ + $(GLAPINOOPUOBJS) \ + $(GLTHREADUOBJS) \ + $(MESABUILDDIR)debugger/hash.o \ + $(MESABUILDDIR)debugger/hint.o \ + $(MESABUILDDIR)debugger/image.o \ + $(MESABUILDDIR)debugger/imaging.o \ + $(MESABUILDDIR)debugger/light.o \ + $(MESABUILDDIR)debugger/lines.o \ + $(MESABUILDDIR)debugger/logic.o \ + $(MESABUILDDIR)debugger/masking.o \ + $(MESABUILDDIR)debugger/matrix.o \ + $(MESABUILDDIR)debugger/mem.o \ + $(MESABUILDDIR)debugger/mmath.o \ + $(MESABUILDDIR)debugger/pb.o \ + $(MESABUILDDIR)debugger/pipeline.o \ + $(MESABUILDDIR)debugger/pixel.o \ + $(MESABUILDDIR)debugger/pixeltex.o \ + $(MESABUILDDIR)debugger/points.o \ + $(MESABUILDDIR)debugger/polygon.o \ + $(MESABUILDDIR)debugger/quads.o \ + $(MESABUILDDIR)debugger/rastpos.o \ + $(MESABUILDDIR)debugger/readpix.o \ + $(MESABUILDDIR)debugger/rect.o \ + $(MESABUILDDIR)debugger/scissor.o \ + $(MESABUILDDIR)debugger/shade.o \ + $(MESABUILDDIR)debugger/span.o \ + $(MESABUILDDIR)debugger/stages.o \ + $(MESABUILDDIR)debugger/state.o \ + $(MESABUILDDIR)debugger/stencil.o \ + $(MESABUILDDIR)debugger/texformat.o \ + $(MESABUILDDIR)debugger/teximage.o \ + $(MESABUILDDIR)debugger/texobj.o \ + $(MESABUILDDIR)debugger/texstate.o \ + $(MESABUILDDIR)debugger/texture.o \ + $(MESABUILDDIR)debugger/texutil.o \ + $(MESABUILDDIR)debugger/translate.o \ + $(MESABUILDDIR)debugger/triangle.o \ + $(MESABUILDDIR)debugger/varray.o \ + $(MESABUILDDIR)debugger/vb.o \ + $(MESABUILDDIR)debugger/vbcull.o \ + $(MESABUILDDIR)debugger/vbfill.o \ + $(MESABUILDDIR)debugger/vbindirect.o \ + $(MESABUILDDIR)debugger/vbrender.o \ + $(MESABUILDDIR)debugger/vbxform.o \ + $(MESABUILDDIR)debugger/vector.o \ + $(MESABUILDDIR)debugger/vertices.o \ + $(MESABUILDDIR)debugger/winpos.o \ + $(MESABUILDDIR)debugger/xform.o \ + $(MESABUILDDIR)debugger/zoom.o + +#ifdef NeedAllMesaSrc + DISPATCHPOBJS = $(MESABUILDDIR)profiled/dispatch.o + GLAPIPOBJS = $(MESABUILDDIR)profiled/glapi.o +GLAPINOOPPOBJS = $(MESABUILDDIR)profiled/glapinoop.o + GLTHREADPOBJS = $(MESABUILDDIR)profiled/glthread.o +#endif + +COREMESAPOBJS = $(MESABUILDDIR)profiled/aatriangle.o \ + $(MESABUILDDIR)profiled/unshared/accum.o \ + $(MESABUILDDIR)profiled/alpha.o \ + $(MESABUILDDIR)profiled/alphabuf.o \ + $(MESABUILDDIR)profiled/attrib.o \ + $(MESABUILDDIR)profiled/bbox.o \ + $(MESABUILDDIR)profiled/bitmap.o \ + $(MESABUILDDIR)profiled/blend.o \ + $(MESABUILDDIR)profiled/buffers.o \ + $(MESABUILDDIR)profiled/clip.o \ + $(MESABUILDDIR)profiled/colortab.o \ + $(MESABUILDDIR)profiled/config.o \ + $(MESABUILDDIR)profiled/context.o \ + $(MESABUILDDIR)profiled/copypix.o \ + $(MESABUILDDIR)profiled/cva.o \ + $(MESABUILDDIR)profiled/debug_xform.o \ + $(MESABUILDDIR)profiled/depth.o \ + $(DISPATCHPOBJS) \ + $(MESABUILDDIR)profiled/dlist.o \ + $(MESABUILDDIR)profiled/drawpix.o \ + $(MESABUILDDIR)profiled/enable.o \ + $(MESABUILDDIR)profiled/enums.o \ + $(MESABUILDDIR)profiled/eval.o \ + $(MESABUILDDIR)profiled/extensions.o \ + $(MESABUILDDIR)profiled/feedback.o \ + $(MESABUILDDIR)profiled/fog.o \ + $(MESABUILDDIR)profiled/get.o \ + $(GLAPIPOBJS) \ + $(GLAPINOOPPOBJS) \ + $(GLTHREADPOBJS) \ + $(MESABUILDDIR)profiled/hash.o \ + $(MESABUILDDIR)profiled/hint.o \ + $(MESABUILDDIR)profiled/image.o \ + $(MESABUILDDIR)profiled/imaging.o \ + $(MESABUILDDIR)profiled/light.o \ + $(MESABUILDDIR)profiled/lines.o \ + $(MESABUILDDIR)profiled/logic.o \ + $(MESABUILDDIR)profiled/masking.o \ + $(MESABUILDDIR)profiled/matrix.o \ + $(MESABUILDDIR)profiled/mem.o \ + $(MESABUILDDIR)profiled/mmath.o \ + $(MESABUILDDIR)profiled/pb.o \ + $(MESABUILDDIR)profiled/pipeline.o \ + $(MESABUILDDIR)profiled/pixel.o \ + $(MESABUILDDIR)profiled/pixeltex.o \ + $(MESABUILDDIR)profiled/points.o \ + $(MESABUILDDIR)profiled/polygon.o \ + $(MESABUILDDIR)profiled/quads.o \ + $(MESABUILDDIR)profiled/rastpos.o \ + $(MESABUILDDIR)profiled/readpix.o \ + $(MESABUILDDIR)profiled/rect.o \ + $(MESABUILDDIR)profiled/scissor.o \ + $(MESABUILDDIR)profiled/shade.o \ + $(MESABUILDDIR)profiled/span.o \ + $(MESABUILDDIR)profiled/stages.o \ + $(MESABUILDDIR)profiled/state.o \ + $(MESABUILDDIR)profiled/stencil.o \ + $(MESABUILDDIR)profiled/texformat.o \ + $(MESABUILDDIR)profiled/teximage.o \ + $(MESABUILDDIR)profiled/texobj.o \ + $(MESABUILDDIR)profiled/texstate.o \ + $(MESABUILDDIR)profiled/texture.o \ + $(MESABUILDDIR)profiled/texutil.o \ + $(MESABUILDDIR)profiled/translate.o \ + $(MESABUILDDIR)profiled/triangle.o \ + $(MESABUILDDIR)profiled/varray.o \ + $(MESABUILDDIR)profiled/vb.o \ + $(MESABUILDDIR)profiled/vbcull.o \ + $(MESABUILDDIR)profiled/vbfill.o \ + $(MESABUILDDIR)profiled/vbindirect.o \ + $(MESABUILDDIR)profiled/vbrender.o \ + $(MESABUILDDIR)profiled/vbxform.o \ + $(MESABUILDDIR)profiled/vector.o \ + $(MESABUILDDIR)profiled/vertices.o \ + $(MESABUILDDIR)profiled/winpos.o \ + $(MESABUILDDIR)profiled/xform.o \ + $(MESABUILDDIR)profiled/zoom.o + Index: xc/lib/GL/mesa/src/OSmesa/Imakefile diff -u xc/lib/GL/mesa/src/OSmesa/Imakefile:1.6 xc/lib/GL/mesa/src/OSmesa/Imakefile:1.10 --- xc/lib/GL/mesa/src/OSmesa/Imakefile:1.6 Tue Dec 12 18:24:27 2000 +++ xc/lib/GL/mesa/src/OSmesa/Imakefile Mon Apr 2 22:29:33 2001 @@ -1,269 +1,51 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/OSmesa/Imakefile,v 1.6 2000/12/12 23:24:27 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/OSmesa/Imakefile,v 1.10 2001/04/03 02:29:33 dawes Exp $ #include -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx +#define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) +#define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) #define DoExtraLib SharedLibGlx #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx -LinkSourceFile(osmesa.c, $(MESASRCDIR)/src/OSmesa) +#include "../Imakefile.inc" +#ifdef i386Architecture +#include "../X86/Imakefile.inc" +#endif +LinkSourceFile(osmesa.c, $(MESASRCDIR)/src/OSmesa) #if Malloc0ReturnsNull ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL #endif -MESA_INCLUDES = -I. -I.. -I../../include -I../../../../../include +MESA_INCLUDES = -I$(MESASRCDIR)/src/OSmesa -I$(MESASRCDIR)/src \ + -I$(MESASRCDIR)/include DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) $(MESA_INCLUDES) $(DRI_INCLUDES) - - MESASRCS = ../aatriangle.c \ - ../accum.c \ - ../alpha.c \ - ../alphabuf.c \ - ../attrib.c \ - ../bbox.c \ - ../bitmap.c \ - ../blend.c \ - ../buffers.c \ - ../clip.c \ - ../colortab.c \ - ../config.c \ - ../context.c \ - ../copypix.c \ - ../cva.c \ - ../debug_xform.c \ - ../depth.c \ - ../dlist.c \ - ../drawpix.c \ - ../enable.c \ - ../enums.c \ - ../eval.c \ - ../extensions.c \ - ../feedback.c \ - ../fog.c \ - ../get.c \ - ../glapi.c \ - ../glapinoop.c \ - ../glthread.c \ - ../hash.c \ - ../image.c \ - ../imaging.c \ - ../light.c \ - ../lines.c \ - ../logic.c \ - ../masking.c \ - ../matrix.c \ - ../mem.c \ - ../mmath.c \ - ../pb.c \ - ../pipeline.c \ - ../pixel.c \ - ../pixeltex.c \ - ../points.c \ - ../polygon.c \ - ../quads.c \ - ../rastpos.c \ - ../readpix.c \ - ../rect.c \ - ../scissor.c \ - ../shade.c \ - ../span.c \ - ../stages.c \ - ../state.c \ - ../stencil.c \ - ../teximage.c \ - ../texobj.c \ - ../texstate.c \ - ../texture.c \ - ../texutil.c \ - ../translate.c \ - ../triangle.c \ - ../varray.c \ - ../vb.c \ - ../vbcull.c \ - ../vbfill.c \ - ../vbindirect.c \ - ../vbrender.c \ - ../vbxform.c \ - ../vector.c \ - ../vertices.c \ - ../winpos.c \ - ../xform.c \ - ../zoom.c \ - osmesa.c - - MESAOBJS = ../aatriangle.o \ - ../accum.o \ - ../alpha.o \ - ../alphabuf.o \ - ../attrib.o \ - ../bbox.o \ - ../bitmap.o \ - ../blend.o \ - ../buffers.o \ - ../clip.o \ - ../colortab.o \ - ../config.o \ - ../context.o \ - ../copypix.o \ - ../cva.o \ - ../debug_xform.o \ - ../depth.o \ - ../dlist.o \ - ../drawpix.o \ - ../enable.o \ - ../enums.o \ - ../eval.o \ - ../extensions.o \ - ../feedback.o \ - ../fog.o \ - ../get.o \ - ../hash.o \ - ../hint.o \ - ../image.o \ - ../imaging.o \ - ../light.o \ - ../lines.o \ - ../logic.o \ - ../masking.o \ - ../matrix.o \ - ../mem.o \ - ../mmath.o \ - ../pb.o \ - ../pipeline.o \ - ../pixel.o \ - ../pixeltex.o \ - ../points.o \ - ../polygon.o \ - ../quads.o \ - ../rastpos.o \ - ../readpix.o \ - ../rect.o \ - ../scissor.o \ - ../shade.o \ - ../span.o \ - ../stages.o \ - ../state.o \ - ../stencil.o \ - ../teximage.o \ - ../texobj.o \ - ../texstate.o \ - ../texture.o \ - ../texutil.o \ - ../translate.o \ - ../triangle.o \ - ../varray.o \ - ../vb.o \ - ../vbcull.o \ - ../vbfill.o \ - ../vbindirect.o \ - ../vbrender.o \ - ../vbxform.o \ - ../vector.o \ - ../vertices.o \ - ../winpos.o \ - ../xform.o \ - ../zoom.o \ - osmesa.o + INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) $(MESA_INCLUDES) $(DRI_INCLUDES) -#ifdef i386Architecture - X86_SRCS = ../X86/common_x86.c \ - ../X86/common_x86_asm.S \ - ../X86/x86.c \ - ../X86/x86_cliptest.S \ - ../X86/x86_vertex.S \ - ../X86/x86_xform_masked2.S \ - ../X86/x86_xform_masked3.S \ - ../X86/x86_xform_masked4.S \ - ../X86/x86_xform_raw2.S \ - ../X86/x86_xform_raw3.S \ - ../X86/x86_xform_raw4.S - - X86_OBJS = ../X86/common_x86.o \ - ../X86/common_x86_asm.o \ - ../X86/x86.o \ - ../X86/x86_cliptest.o \ - ../X86/x86_vertex.o \ - ../X86/x86_xform_masked2.o \ - ../X86/x86_xform_masked3.o \ - ../X86/x86_xform_masked4.o \ - ../X86/x86_xform_raw2.o \ - ../X86/x86_xform_raw3.o \ - ../X86/x86_xform_raw4.o - -#if MesaUseMMX - MMX_SRCS = ../X86/mmx_blend.S - - MMX_OBJS = ../X86/mmx_blend.o + MESAOBJS = $(COREMESAOBJS) $(MESA_ASM_OBJS) + MESAUOBJS = $(COREMESAUOBJS) $(MESA_ASM_UOBJS) + MESADOBJS = $(COREMESADOBJS) $(MESA_ASM_DOBJS) + MESAPOBJS = $(COREMESAPOBJS) $(MESA_ASM_POBJS) + + SRCS = osmesa.c + OBJS = osmesa.o $(MESAOBJS) +#if DoSharedLib + UOBJS = unshared/osmesa.o $(MESAUOBJS) +#else + UOBJS = $(OBJS) #endif + DOBJS = debugger/osmesa.o $(MESADOBJS) + POBJS = profiled/osmesa.o $(MESAPOBJS) -#if MesaUse3DNow - 3DNOW_SRCS = ../X86/3dnow.c \ - ../X86/3dnow_norm_raw.S \ - ../X86/3dnow_vertex.S \ - ../X86/3dnow_xform_masked1.S \ - ../X86/3dnow_xform_masked2.S \ - ../X86/3dnow_xform_masked3.S \ - ../X86/3dnow_xform_masked4.S \ - ../X86/3dnow_xform_raw1.S \ - ../X86/3dnow_xform_raw2.S \ - ../X86/3dnow_xform_raw3.S \ - ../X86/3dnow_xform_raw4.S - - 3DNOW_OBJS = ../X86/3dnow.o \ - ../X86/3dnow_norm_raw.o \ - ../X86/3dnow_vertex.o \ - ../X86/3dnow_xform_masked1.o \ - ../X86/3dnow_xform_masked2.o \ - ../X86/3dnow_xform_masked3.o \ - ../X86/3dnow_xform_masked4.o \ - ../X86/3dnow_xform_raw1.o \ - ../X86/3dnow_xform_raw2.o \ - ../X86/3dnow_xform_raw3.o \ - ../X86/3dnow_xform_raw4.o +#if LocalThreads + THREADOBJS = $(THREADS_LIBS) #endif -#if MesaUseKatmai - KATMAI_SRCS = ../X86/katmai.c \ - ../X86/katmai_norm_raw.S \ - ../X86/katmai_vertex.S \ - ../X86/katmai_xform_masked1.S \ - ../X86/katmai_xform_masked2.S \ - ../X86/katmai_xform_masked3.S \ - ../X86/katmai_xform_masked4.S \ - ../X86/katmai_xform_raw1.S \ - ../X86/katmai_xform_raw2.S \ - ../X86/katmai_xform_raw3.S \ - ../X86/katmai_xform_raw4.S - - KATMAI_OBJS = ../X86/katmai.o \ - ../X86/katmai_norm_raw.o \ - ../X86/katmai_vertex.o \ - ../X86/katmai_xform_masked1.o \ - ../X86/katmai_xform_masked2.o \ - ../X86/katmai_xform_masked3.o \ - ../X86/katmai_xform_masked4.o \ - ../X86/katmai_xform_raw1.o \ - ../X86/katmai_xform_raw2.o \ - ../X86/katmai_xform_raw3.o \ - ../X86/katmai_xform_raw4.o -#endif -#endif - - ASMSRCS = $(X86_SRCS) $(MMX_SRCS) $(3DNOW_SRCS) $(KATMAI_SRCS) - ASMOBJS = $(X86_OBJS) $(MMX_OBJS) $(3DNOW_OBJS) $(KATMAI_OBJS) - - SRCS = $(MESASRCS) $(ASMSRCS) - OBJS = $(MESAOBJS) $(ASMOBJS) - UOBJS = $(MESAOBJS) $(ASMOBJS) - DONES = DONE - #if !GlxUseBuiltInDRIDriver - REQUIREDLIBS += -L../../.. -lGL + REQUIREDLIBS = $(LDPRELIB) $(GLXLIB) #endif #include @@ -277,11 +59,25 @@ SOREV = 3.3 -/*NormalDepLibraryTarget($(LIBNAME), $(DONES), $(UOBJS))*/ -/*InstallLibrary($(LIBNAME),$(USRLIBDIR))*/ +#if DoNormalLib +NormalLibraryTarget($(LIBNAME), $(UOBJS)) +InstallLibrary($(LIBNAME),$(USRLIBDIR)) +#endif -SharedDepLibraryTarget($(LIBNAME),$(SOREV), $(DONES), $(OBJS), ., .) +#if DoSharedLib +SharedLibraryTarget($(LIBNAME),$(SOREV), $(OBJS), ., .) InstallSharedLibrary($(LIBNAME),$(SOREV),$(SHLIBDIR)) +#endif +#if DoDebugLib +DebuggedLibraryTarget($(LIBNAME),$(DOBJS)) +InstallLibrary($(LIBNAME_d,$(USRLIBDIR)) +#endif + +#if DoProfileLib +ProfiledLibraryTarget($(LIBNAME), $(POBJS)) +InstallLibrary($(LIBNAME)_p,$(USRLIBDIR)) +#endif DependTarget() + Index: xc/lib/GL/mesa/src/X/Imakefile diff -u xc/lib/GL/mesa/src/X/Imakefile:1.6 xc/lib/GL/mesa/src/X/Imakefile:removed --- xc/lib/GL/mesa/src/X/Imakefile:1.6 Tue Aug 1 16:28:39 2000 +++ xc/lib/GL/mesa/src/X/Imakefile Mon Jun 4 12:37:25 2001 @@ -1,49 +0,0 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/X/Imakefile,v 1.6 2000/08/01 20:28:39 dawes Exp $ - -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx -#define DoExtraLib SharedLibGlx -#define DoDebugLib DebugLibGlx -#define DoProfileLib ProfileLibGlx - -LinkSourceFile(xmesa1.c, $(MESASRCDIR)/src/X) -LinkSourceFile(xmesa2.c, $(MESASRCDIR)/src/X) -LinkSourceFile(xmesa3.c, $(MESASRCDIR)/src/X) -LinkSourceFile(xmesa4.c, $(MESASRCDIR)/src/X) -LinkSourceFile(xmesaP.h, $(MESASRCDIR)/src/X) -LinkSourceFile(glxheader.h, $(MESASRCDIR)/src/X) - - -#if Malloc0ReturnsNull -ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL -#endif - -#if BuildXF86DRI - DRI_DEFINES = GlxDefines - DRI_INCLUDES = -I../../../dri -I../../../glx -I../../dri \ - -I$(TOP)/include -I$(TOP)/include/GL \ - -I$(XF86OSSRC) -I$(SERVERSRC)/GL/dri -#endif - -MESA_INCLUDES = -I. -I.. -I../../include - - DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) $(MESA_INCLUDES) $(DRI_INCLUDES) - SRCS = xmesa1.c xmesa2.c xmesa3.c xmesa4.c xdri.c - OBJS = xmesa1.o xmesa2.o xmesa3.o xmesa4.o xdri.o - -#if !GlxUseBuiltInDRIDriver -#undef DoNormalLib NormalLibGlx -#undef DoExtraLib SharedLibGlx -#undef DoDebugLib DebugLibGlx -#undef DoProfileLib ProfileLibGlx -#endif - -#include - -LibraryObjectRule() - -SubdirLibraryRule($(OBJS)) -NormalLintTarget($(SRCS)) - -DependTarget() Index: xc/lib/GL/mesa/src/X86/Imakefile diff -u xc/lib/GL/mesa/src/X86/Imakefile:1.14 xc/lib/GL/mesa/src/X86/Imakefile:1.18 --- xc/lib/GL/mesa/src/X86/Imakefile:1.14 Tue Dec 12 18:24:27 2000 +++ xc/lib/GL/mesa/src/X86/Imakefile Wed May 2 11:06:03 2001 @@ -1,174 +1,39 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/X86/Imakefile,v 1.14 2000/12/12 23:24:27 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/X86/Imakefile,v 1.18 2001/05/02 15:06:03 dawes Exp $ -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx +/* + * Only need SharedLib build unless OSMesa lib is built, or driver is built + * in to libGL + */ +#if BuildXF86DRI && !GlxUseSGISI && \ + (GlxUseBuiltInDRIDriver || \ + !GlxBuiltInMesa || !defined(GlxDriverUsesMesa)) +#define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) +#define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) #define DoExtraLib SharedLibGlx #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx - -LinkSourceFile(assyntax.h, $(MESASRCDIR)/src/X86) -LinkSourceFile(common_x86.c, $(MESASRCDIR)/src/X86) -LinkSourceFile(common_x86_asm.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(common_x86_asm.h, $(MESASRCDIR)/src/X86) -LinkSourceFile(common_x86_features.h, $(MESASRCDIR)/src/X86) -LinkSourceFile(glapi_x86.S, $(MESASRCDIR)/src/X86) - -LinkSourceFile(xform_args.h, $(MESASRCDIR)/src/X86) -LinkSourceFile(clip_args.h, $(MESASRCDIR)/src/X86) - -LinkSourceFile(x86.c, $(MESASRCDIR)/src/X86) -LinkSourceFile(x86.h, $(MESASRCDIR)/src/X86) -LinkSourceFile(x86_cliptest.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(x86_vertex.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(x86_xform_masked2.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(x86_xform_masked3.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(x86_xform_masked4.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(x86_xform_raw2.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(x86_xform_raw3.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(x86_xform_raw4.S, $(MESASRCDIR)/src/X86) - -LinkSourceFile(mmx.h, $(MESASRCDIR)/src/X86) -LinkSourceFile(mmx_blend.S, $(MESASRCDIR)/src/X86) - -LinkSourceFile(3dnow.c, $(MESASRCDIR)/src/X86) -LinkSourceFile(3dnow.h, $(MESASRCDIR)/src/X86) -LinkSourceFile(3dnow_norm_raw.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(3dnow_vertex.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(3dnow_xform_masked1.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(3dnow_xform_masked2.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(3dnow_xform_masked3.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(3dnow_xform_masked4.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(3dnow_xform_raw1.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(3dnow_xform_raw2.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(3dnow_xform_raw3.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(3dnow_xform_raw4.S, $(MESASRCDIR)/src/X86) - -LinkSourceFile(katmai.c, $(MESASRCDIR)/src/X86) -LinkSourceFile(katmai.h, $(MESASRCDIR)/src/X86) -LinkSourceFile(katmai_norm_raw.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(katmai_vertex.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(katmai_xform_masked1.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(katmai_xform_masked2.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(katmai_xform_masked3.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(katmai_xform_masked4.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(katmai_xform_raw1.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(katmai_xform_raw2.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(katmai_xform_raw3.S, $(MESASRCDIR)/src/X86) -LinkSourceFile(katmai_xform_raw4.S, $(MESASRCDIR)/src/X86) - -LinkSourceFile(glapioffsets.h, $(MESASRCDIR)/src) +#else +#define DoNormalLib SharedLibGlxWithoutPIC +#define DoSharedLib !SharedLibGlxWithoutPIC +#define DoExtraLib NO +#define DoDebugLib NO +#define DoProfileLib NO +#endif #if Malloc0ReturnsNull ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL #endif - -#ifdef i386Architecture -XCOMM Determine at runtime whether 3DNow!, Katmai, MMX, etc are really present. - X86_SRCS = common_x86.c \ - common_x86_asm.S \ - glapi_x86.S \ - x86.c \ - x86_cliptest.S \ - x86_vertex.S \ - x86_xform_masked2.S \ - x86_xform_masked3.S \ - x86_xform_masked4.S \ - x86_xform_raw2.S \ - x86_xform_raw3.S \ - x86_xform_raw4.S - - X86_OBJS = common_x86.o \ - common_x86_asm.o \ - x86.o \ - x86_cliptest.o \ - x86_vertex.o \ - x86_xform_masked2.o \ - x86_xform_masked3.o \ - x86_xform_masked4.o \ - x86_xform_raw2.o \ - x86_xform_raw3.o \ - x86_xform_raw4.o - - X86_DEFS = -DUSE_X86_ASM +#define MesaX86BuildDir /**/ +#define NeedToLinkMesaSrc +#include "Imakefile.inc" + + DEFINES = $(ALLOC_DEFINES) GlxDefines $(MESA_ASM_DEFINES) + INCLUDES = -I$(INCLUDESRC) -I$(EXTINCSRC) -I$(MESASRCDIR)/src \ + -I$(MESASRCDIR)/src/X86 -#if MesaUseMMX - MMX_SRCS = mmx_blend.S - - MMX_OBJS = mmx_blend.o - - MMX_DEFS = -DUSE_MMX_ASM -#endif - -#if MesaUse3DNow - 3DNOW_SRCS = 3dnow.c \ - 3dnow_norm_raw.S \ - 3dnow_vertex.S \ - 3dnow_xform_masked1.S \ - 3dnow_xform_masked2.S \ - 3dnow_xform_masked3.S \ - 3dnow_xform_masked4.S \ - 3dnow_xform_raw1.S \ - 3dnow_xform_raw2.S \ - 3dnow_xform_raw3.S \ - 3dnow_xform_raw4.S - - 3DNOW_OBJS = 3dnow.o \ - 3dnow_norm_raw.o \ - 3dnow_vertex.o \ - 3dnow_xform_masked1.o \ - 3dnow_xform_masked2.o \ - 3dnow_xform_masked3.o \ - 3dnow_xform_masked4.o \ - 3dnow_xform_raw1.o \ - 3dnow_xform_raw2.o \ - 3dnow_xform_raw3.o \ - 3dnow_xform_raw4.o - - 3DNOW_DEFS = -DUSE_3DNOW_ASM -#endif - -#if MesaUseKatmai - KATMAI_SRCS = katmai.c \ - katmai_norm_raw.S \ - katmai_vertex.S \ - katmai_xform_masked1.S \ - katmai_xform_masked2.S \ - katmai_xform_masked3.S \ - katmai_xform_masked4.S \ - katmai_xform_raw1.S \ - katmai_xform_raw2.S \ - katmai_xform_raw3.S \ - katmai_xform_raw4.S - - KATMAI_OBJS = katmai.o \ - katmai_norm_raw.o \ - katmai_vertex.o \ - katmai_xform_masked1.o \ - katmai_xform_masked2.o \ - katmai_xform_masked3.o \ - katmai_xform_masked4.o \ - katmai_xform_raw1.o \ - katmai_xform_raw2.o \ - katmai_xform_raw3.o \ - katmai_xform_raw4.o - - KATMAI_DEFS = -DUSE_KATMAI_ASM -#endif - -#endif - - DEFINES = $(ALLOC_DEFINES) GlxDefines -DFX $(X86_DEFS) $(MMX_DEFS) $(3DNOW_DEFS) $(KATMAI_DEFS) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) -I../include -I../../include -I../../dri -I.. - SRCS = $(X86_SRCS) $(MMX_SRCS) $(3DNOW_SRCS) $(KATMAI_SRCS) - OBJS = $(X86_OBJS) $(MMX_OBJS) $(3DNOW_OBJS) $(KATMAI_OBJS) - -#if !GlxUseBuiltInDRIDriver -#undef DoNormalLib NormalLibGlx -#undef DoExtraLib SharedLibGlx -#undef DoDebugLib DebugLibGlx -#undef DoProfileLib ProfileLibGlx -#endif + SRCS = $(MESA_ASM_SRCS) + OBJS = $(MESA_ASM_OBJS) #include Index: xc/lib/GL/mesa/src/X86/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/X86/Imakefile.inc:1.2 --- /dev/null Mon Jun 4 12:37:25 2001 +++ xc/lib/GL/mesa/src/X86/Imakefile.inc Wed May 2 11:06:03 2001 @@ -0,0 +1,287 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/X86/Imakefile.inc,v 1.2 2001/05/02 15:06:03 dawes Exp $ + +#ifndef MesaX86BuildDir +#define MesaX86BuildDir $(GLXLIBSRC)/mesa/src/X86/ +#endif + +MESAX86BUILDDIR = MesaX86BuildDir + +MESA_X86_SRCS = $(MESAX86BUILDDIR)common_x86.c \ + $(MESAX86BUILDDIR)common_x86_asm.S \ + $(MESAX86BUILDDIR)glapi_x86.S \ + $(MESAX86BUILDDIR)x86.c \ + $(MESAX86BUILDDIR)x86_cliptest.S \ + $(MESAX86BUILDDIR)x86_vertex.S \ + $(MESAX86BUILDDIR)x86_xform_masked2.S \ + $(MESAX86BUILDDIR)x86_xform_masked3.S \ + $(MESAX86BUILDDIR)x86_xform_masked4.S \ + $(MESAX86BUILDDIR)x86_xform_raw2.S \ + $(MESAX86BUILDDIR)x86_xform_raw3.S \ + $(MESAX86BUILDDIR)x86_xform_raw4.S + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(common_x86.c, $(MESASRCDIR)/src/X86) +LinkSourceFile(common_x86_asm.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(glapi_x86.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(x86.c, $(MESASRCDIR)/src/X86) +LinkSourceFile(x86_cliptest.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(x86_vertex.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(x86_xform_masked2.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(x86_xform_masked3.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(x86_xform_masked4.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(x86_xform_raw2.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(x86_xform_raw3.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(x86_xform_raw4.S, $(MESASRCDIR)/src/X86) +#endif + +MESA_X86_OBJS = $(MESAX86BUILDDIR)common_x86.o \ + $(MESAX86BUILDDIR)common_x86_asm.o \ + $(MESAX86BUILDDIR)x86.o \ + $(MESAX86BUILDDIR)x86_cliptest.o \ + $(MESAX86BUILDDIR)x86_vertex.o \ + $(MESAX86BUILDDIR)x86_xform_masked2.o \ + $(MESAX86BUILDDIR)x86_xform_masked3.o \ + $(MESAX86BUILDDIR)x86_xform_masked4.o \ + $(MESAX86BUILDDIR)x86_xform_raw2.o \ + $(MESAX86BUILDDIR)x86_xform_raw3.o \ + $(MESAX86BUILDDIR)x86_xform_raw4.o + +#if DoSharedLib +MESA_X86_UOBJS = $(MESAX86BUILDDIR)unshared/common_x86.o \ + $(MESAX86BUILDDIR)common_x86_asm.o \ + $(MESAX86BUILDDIR)unshared/x86.o \ + $(MESAX86BUILDDIR)x86_cliptest.o \ + $(MESAX86BUILDDIR)x86_vertex.o \ + $(MESAX86BUILDDIR)x86_xform_masked2.o \ + $(MESAX86BUILDDIR)x86_xform_masked3.o \ + $(MESAX86BUILDDIR)x86_xform_masked4.o \ + $(MESAX86BUILDDIR)x86_xform_raw2.o \ + $(MESAX86BUILDDIR)x86_xform_raw3.o \ + $(MESAX86BUILDDIR)x86_xform_raw4.o +#else +MESA_X86_UOBJS = $(MESA_X86_OBJS) +#endif + +MESA_X86_DOBJS = $(MESAX86BUILDDIR)debugger/common_x86.o \ + $(MESAX86BUILDDIR)common_x86_asm.o \ + $(MESAX86BUILDDIR)debugger/x86.o \ + $(MESAX86BUILDDIR)x86_cliptest.o \ + $(MESAX86BUILDDIR)x86_vertex.o \ + $(MESAX86BUILDDIR)x86_xform_masked2.o \ + $(MESAX86BUILDDIR)x86_xform_masked3.o \ + $(MESAX86BUILDDIR)x86_xform_masked4.o \ + $(MESAX86BUILDDIR)x86_xform_raw2.o \ + $(MESAX86BUILDDIR)x86_xform_raw3.o \ + $(MESAX86BUILDDIR)x86_xform_raw4.o + +MESA_X86_POBJS = $(MESAX86BUILDDIR)profiled/common_x86.o \ + $(MESAX86BUILDDIR)common_x86_asm.o \ + $(MESAX86BUILDDIR)profiled/x86.o \ + $(MESAX86BUILDDIR)x86_cliptest.o \ + $(MESAX86BUILDDIR)x86_vertex.o \ + $(MESAX86BUILDDIR)x86_xform_masked2.o \ + $(MESAX86BUILDDIR)x86_xform_masked3.o \ + $(MESAX86BUILDDIR)x86_xform_masked4.o \ + $(MESAX86BUILDDIR)x86_xform_raw2.o \ + $(MESAX86BUILDDIR)x86_xform_raw3.o \ + $(MESAX86BUILDDIR)x86_xform_raw4.o + +MESA_X86_DEFS = -DUSE_X86_ASM + + +#if MesaUseMMX +MESA_MMX_SRCS = $(MESAX86BUILDDIR)mmx_blend.S + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(mmx_blend.S, $(MESASRCDIR)/src/X86) +#endif + +MESA_MMX_OBJS = $(MESAX86BUILDDIR)mmx_blend.o + +MESA_MMX_UOBJS = $(MESA_MMX_OBJS) +MESA_MMX_DOBJS = $(MESA_MMX_OBJS) +MESA_MMX_POBJS = $(MESA_MMX_OBJS) + +MESA_MMX_DEFS = -DUSE_MMX_ASM +#endif + +#if MesaUse3DNow +MESA_3DNOW_SRCS = $(MESAX86BUILDDIR)3dnow.c \ + $(MESAX86BUILDDIR)3dnow_norm_raw.S \ + $(MESAX86BUILDDIR)3dnow_vertex.S \ + $(MESAX86BUILDDIR)3dnow_xform_masked1.S \ + $(MESAX86BUILDDIR)3dnow_xform_masked2.S \ + $(MESAX86BUILDDIR)3dnow_xform_masked3.S \ + $(MESAX86BUILDDIR)3dnow_xform_masked4.S \ + $(MESAX86BUILDDIR)3dnow_xform_raw1.S \ + $(MESAX86BUILDDIR)3dnow_xform_raw2.S \ + $(MESAX86BUILDDIR)3dnow_xform_raw3.S \ + $(MESAX86BUILDDIR)3dnow_xform_raw4.S + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(3dnow.c, $(MESASRCDIR)/src/X86) +LinkSourceFile(3dnow_norm_raw.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(3dnow_vertex.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(3dnow_xform_masked1.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(3dnow_xform_masked2.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(3dnow_xform_masked3.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(3dnow_xform_masked4.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(3dnow_xform_raw1.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(3dnow_xform_raw2.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(3dnow_xform_raw3.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(3dnow_xform_raw4.S, $(MESASRCDIR)/src/X86) +#endif +MESA_3DNOW_OBJS = $(MESAX86BUILDDIR)3dnow.o \ + $(MESAX86BUILDDIR)3dnow_norm_raw.o \ + $(MESAX86BUILDDIR)3dnow_vertex.o \ + $(MESAX86BUILDDIR)3dnow_xform_masked1.o \ + $(MESAX86BUILDDIR)3dnow_xform_masked2.o \ + $(MESAX86BUILDDIR)3dnow_xform_masked3.o \ + $(MESAX86BUILDDIR)3dnow_xform_masked4.o \ + $(MESAX86BUILDDIR)3dnow_xform_raw1.o \ + $(MESAX86BUILDDIR)3dnow_xform_raw2.o \ + $(MESAX86BUILDDIR)3dnow_xform_raw3.o \ + $(MESAX86BUILDDIR)3dnow_xform_raw4.o + +#ifdef DoSharedLib +MESA_3DNOW_UOBJS = $(MESAX86BUILDDIR)unshared/3dnow.o \ + $(MESAX86BUILDDIR)3dnow_norm_raw.o \ + $(MESAX86BUILDDIR)3dnow_vertex.o \ + $(MESAX86BUILDDIR)3dnow_xform_masked1.o \ + $(MESAX86BUILDDIR)3dnow_xform_masked2.o \ + $(MESAX86BUILDDIR)3dnow_xform_masked3.o \ + $(MESAX86BUILDDIR)3dnow_xform_masked4.o \ + $(MESAX86BUILDDIR)3dnow_xform_raw1.o \ + $(MESAX86BUILDDIR)3dnow_xform_raw2.o \ + $(MESAX86BUILDDIR)3dnow_xform_raw3.o \ + $(MESAX86BUILDDIR)3dnow_xform_raw4.o +#else +MESA_3DNOW_UOBJS = $(MESA_3DNOW_OBJS) +#endif + +MESA_3DNOW_DOBJS = $(MESAX86BUILDDIR)debugger/3dnow.o \ + $(MESAX86BUILDDIR)3dnow_norm_raw.o \ + $(MESAX86BUILDDIR)3dnow_vertex.o \ + $(MESAX86BUILDDIR)3dnow_xform_masked1.o \ + $(MESAX86BUILDDIR)3dnow_xform_masked2.o \ + $(MESAX86BUILDDIR)3dnow_xform_masked3.o \ + $(MESAX86BUILDDIR)3dnow_xform_masked4.o \ + $(MESAX86BUILDDIR)3dnow_xform_raw1.o \ + $(MESAX86BUILDDIR)3dnow_xform_raw2.o \ + $(MESAX86BUILDDIR)3dnow_xform_raw3.o \ + $(MESAX86BUILDDIR)3dnow_xform_raw4.o + +MESA_3DNOW_POBJS = $(MESAX86BUILDDIR)profiled/3dnow.o \ + $(MESAX86BUILDDIR)3dnow_norm_raw.o \ + $(MESAX86BUILDDIR)3dnow_vertex.o \ + $(MESAX86BUILDDIR)3dnow_xform_masked1.o \ + $(MESAX86BUILDDIR)3dnow_xform_masked2.o \ + $(MESAX86BUILDDIR)3dnow_xform_masked3.o \ + $(MESAX86BUILDDIR)3dnow_xform_masked4.o \ + $(MESAX86BUILDDIR)3dnow_xform_raw1.o \ + $(MESAX86BUILDDIR)3dnow_xform_raw2.o \ + $(MESAX86BUILDDIR)3dnow_xform_raw3.o \ + $(MESAX86BUILDDIR)3dnow_xform_raw4.o + +MESA_3DNOW_DEFS = -DUSE_3DNOW_ASM +#endif + +#if MesaUseKatmai +MESA_KATMAI_SRCS = $(MESAX86BUILDDIR)katmai.c \ + $(MESAX86BUILDDIR)katmai_norm_raw.S \ + $(MESAX86BUILDDIR)katmai_vertex.S \ + $(MESAX86BUILDDIR)katmai_xform_masked1.S \ + $(MESAX86BUILDDIR)katmai_xform_masked2.S \ + $(MESAX86BUILDDIR)katmai_xform_masked3.S \ + $(MESAX86BUILDDIR)katmai_xform_masked4.S \ + $(MESAX86BUILDDIR)katmai_xform_raw1.S \ + $(MESAX86BUILDDIR)katmai_xform_raw2.S \ + $(MESAX86BUILDDIR)katmai_xform_raw3.S \ + $(MESAX86BUILDDIR)katmai_xform_raw4.S + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(katmai.c, $(MESASRCDIR)/src/X86) +LinkSourceFile(katmai_norm_raw.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(katmai_vertex.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(katmai_xform_masked1.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(katmai_xform_masked2.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(katmai_xform_masked3.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(katmai_xform_masked4.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(katmai_xform_raw1.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(katmai_xform_raw2.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(katmai_xform_raw3.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(katmai_xform_raw4.S, $(MESASRCDIR)/src/X86) +#endif + +MESA_KATMAI_OBJS = $(MESAX86BUILDDIR)katmai.o \ + $(MESAX86BUILDDIR)katmai_norm_raw.o \ + $(MESAX86BUILDDIR)katmai_vertex.o \ + $(MESAX86BUILDDIR)katmai_xform_masked1.o \ + $(MESAX86BUILDDIR)katmai_xform_masked2.o \ + $(MESAX86BUILDDIR)katmai_xform_masked3.o \ + $(MESAX86BUILDDIR)katmai_xform_masked4.o \ + $(MESAX86BUILDDIR)katmai_xform_raw1.o \ + $(MESAX86BUILDDIR)katmai_xform_raw2.o \ + $(MESAX86BUILDDIR)katmai_xform_raw3.o \ + $(MESAX86BUILDDIR)katmai_xform_raw4.o + +#if DoSharedLib +MESA_KATMAI_UOBJS = $(MESAX86BUILDDIR)unshared/katmai.o \ + $(MESAX86BUILDDIR)katmai_norm_raw.o \ + $(MESAX86BUILDDIR)katmai_vertex.o \ + $(MESAX86BUILDDIR)katmai_xform_masked1.o \ + $(MESAX86BUILDDIR)katmai_xform_masked2.o \ + $(MESAX86BUILDDIR)katmai_xform_masked3.o \ + $(MESAX86BUILDDIR)katmai_xform_masked4.o \ + $(MESAX86BUILDDIR)katmai_xform_raw1.o \ + $(MESAX86BUILDDIR)katmai_xform_raw2.o \ + $(MESAX86BUILDDIR)katmai_xform_raw3.o \ + $(MESAX86BUILDDIR)katmai_xform_raw4.o +#else +MESA_KATMAI_UOBJS = $(MESA_KATMAI_OBJS) +#endif + +MESA_KATMAI_DOBJS = $(MESAX86BUILDDIR)debugger/katmai.o \ + $(MESAX86BUILDDIR)katmai_norm_raw.o \ + $(MESAX86BUILDDIR)katmai_vertex.o \ + $(MESAX86BUILDDIR)katmai_xform_masked1.o \ + $(MESAX86BUILDDIR)katmai_xform_masked2.o \ + $(MESAX86BUILDDIR)katmai_xform_masked3.o \ + $(MESAX86BUILDDIR)katmai_xform_masked4.o \ + $(MESAX86BUILDDIR)katmai_xform_raw1.o \ + $(MESAX86BUILDDIR)katmai_xform_raw2.o \ + $(MESAX86BUILDDIR)katmai_xform_raw3.o \ + $(MESAX86BUILDDIR)katmai_xform_raw4.o + +MESA_KATMAI_POBJS = $(MESAX86BUILDDIR)profiled/katmai.o \ + $(MESAX86BUILDDIR)katmai_norm_raw.o \ + $(MESAX86BUILDDIR)katmai_vertex.o \ + $(MESAX86BUILDDIR)katmai_xform_masked1.o \ + $(MESAX86BUILDDIR)katmai_xform_masked2.o \ + $(MESAX86BUILDDIR)katmai_xform_masked3.o \ + $(MESAX86BUILDDIR)katmai_xform_masked4.o \ + $(MESAX86BUILDDIR)katmai_xform_raw1.o \ + $(MESAX86BUILDDIR)katmai_xform_raw2.o \ + $(MESAX86BUILDDIR)katmai_xform_raw3.o \ + $(MESAX86BUILDDIR)katmai_xform_raw4.o + +MESA_KATMAI_DEFS = -DUSE_KATMAI_ASM +#endif + +MESA_ASM_SRCS = $(MESA_X86_SRCS) $(MESA_MMX_SRCS) $(MESA_3DNOW_SRCS) \ + $(MESA_KATMAI_SRCS) + +MESA_ASM_OBJS = $(MESA_X86_OBJS) $(MESA_MMX_OBJS) $(MESA_3DNOW_OBJS) \ + $(MESA_KATMAI_OBJS) + +MESA_ASM_UOBJS = $(MESA_X86_UOBJS) $(MESA_MMX_UOBJS) $(MESA_3DNOW_UOBJS) \ + $(MESA_KATMAI_UOBJS) + +MESA_ASM_DOBJS = $(MESA_X86_DOBJS) $(MESA_MMX_DOBJS) $(MESA_3DNOW_DOBJS) \ + $(MESA_KATMAI_DOBJS) + +MESA_ASM_POBJS = $(MESA_X86_POBJS) $(MESA_MMX_POBJS) $(MESA_3DNOW_POBJS) \ + $(MESA_KATMAI_POBJS) + +MESA_ASM_DEFINES = -DUSE_X86_ASM $(MESA_MMX_DEFS) $(MESA_3DNOW_DEFS) $(MESA_KATMAI_DEFS) + Index: xc/lib/GL/mesa/src/drv/Imakefile diff -u xc/lib/GL/mesa/src/drv/Imakefile:1.16 xc/lib/GL/mesa/src/drv/Imakefile:1.19 --- xc/lib/GL/mesa/src/drv/Imakefile:1.16 Mon Dec 4 13:54:13 2000 +++ xc/lib/GL/mesa/src/drv/Imakefile Fri Mar 23 15:56:33 2001 @@ -1,76 +1,15 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/Imakefile,v 1.16 2000/12/04 18:54:13 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/Imakefile,v 1.19 2001/03/23 20:56:33 dawes Exp $ -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx -#define DoExtraLib SharedLibGlx -#define DoDebugLib DebugLibGlx -#define DoProfileLib ProfileLibGlx +#ifdef DriDrivers #define IHaveSubdirs #define PassCDebugFlags -#if GlxUseBuiltInDRIDriver -#if GlxBuiltInGamma -DRIVER += gamma -#endif -#if GlxBuiltInTdfx -DRIVER += tdfx -#endif -#if GlxBuiltInMga -DRIVER += common mga -#endif -#if GlxBuiltInI810 -DRIVER += common i810 -#endif -#if GlxBuiltInR128 -DRIVER += r128 -#endif -#if GlxBuiltInFfb -DRIVER += ffb -#endif -#if GlxBuiltInSIS -DRIVER += sis -#endif - -SUBDIRS = $(DRIVER) - -#else /* GlxUseBuiltInDRIDriver */ - -#if defined(i386Architecture) || defined(ia64Architecture) - -SUBDIRS += common -SUBDIRS += gamma -SUBDIRS += mga -SUBDIRS += i810 -SUBDIRS += r128 -SUBDIRS += sis -#if HasGlide3 -SUBDIRS += tdfx -#endif +SUBDIRS = common DriDrivers -#elif defined(AlphaArchitecture) - -SUBDIRS += common -SUBDIRS += gamma -SUBDIRS += mga -SUBDIRS += r128 -#if HasGlide3 -SUBDIRS += tdfx -#endif - -#elif defined(SparcArchitecture) - -SUBDIRS += ffb - -#else - -SUBDIRS = - -#endif /* architecture */ - -#endif /* GlxUseBuiltInDRIDriver */ - MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) DependTarget() + +#endif Index: xc/lib/GL/mesa/src/drv/common/Imakefile diff -u xc/lib/GL/mesa/src/drv/common/Imakefile:1.3 xc/lib/GL/mesa/src/drv/common/Imakefile:1.6 --- xc/lib/GL/mesa/src/drv/common/Imakefile:1.3 Fri Jun 16 20:02:54 2000 +++ xc/lib/GL/mesa/src/drv/common/Imakefile Mon Apr 2 22:29:34 2001 @@ -1,40 +1,27 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/common/Imakefile,v 1.6 2001/04/03 02:29:34 dawes Exp $ -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx +#if GlxUseBuiltInDRIDriver +#define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) +#define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) #define DoExtraLib SharedLibGlx #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx - -#if Malloc0ReturnsNull -ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL -#endif - -#if BuildXF86DRI - DRI_DEFINES = GlxDefines -DDRIVERTS - DRI_INCLUDES = -I../../../../dri -I../../../../glx \ - -I$(TOP)/include -I$(TOP)/include/GL \ - -I$(XF86OSSRC) -I$(SERVERSRC)/GL/dri \ - -I../../../include -I../.. -I../common -I../../X +#else +#define DoNormalLib SharedLibGlxWithoutPIC +#define DoSharedLib !SharedLibGlxWithoutPIC +#define DoExtrasLib NO +#define DoDebugLib NO +#define DoProfileLib NO #endif - -MESA_INCLUDES = -I. -I.. -I../../include - +#define MesaDrvCommonBuildDir /**/ +#include "Imakefile.inc" DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) $(MESA_INCLUDES) $(DRI_INCLUDES) - DRISRCS = hwlog.c mm.c - DRIOBJS = hwlog.o mm.o - - SRCS = $(DRISRCS) - OBJS = $(DRIOBJS) - -#if !GlxUseBuiltInDRIDriver -#undef DoNormalLib NormalLibGlx -#undef DoExtraLib SharedLibGlx -#undef DoDebugLib DebugLibGlx -#undef DoProfileLib ProfileLibGlx -#endif + INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES) + + SRCS = $(COMMONSRCS) + OBJS = $(COMMONOBJS) #include @@ -42,14 +29,5 @@ SubdirLibraryRule($(OBJS)) NormalLintTarget($(SRCS)) - -XCOMM #if !GlxUseBuiltInDRIDriver -#if 0 -LIBNAME = i810_dri.so -ALL_OBJS = $(OBJS) -ALL_DEPS = DONE -SharedDepModuleTarget($(LIBNAME),$(ALL_DEPS),$(ALL_OBJS)) -InstallDynamicModule($(LIBNAME),$(MODULEDIR),.) -#endif DependTarget() Index: xc/lib/GL/mesa/src/drv/common/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/drv/common/Imakefile.inc:1.2 --- /dev/null Mon Jun 4 12:37:25 2001 +++ xc/lib/GL/mesa/src/drv/common/Imakefile.inc Wed May 2 11:06:03 2001 @@ -0,0 +1,44 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/common/Imakefile.inc,v 1.2 2001/05/02 15:06:03 dawes Exp $ + +#ifndef MesaDrvSrcDir +#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv +#endif + +MESADRVSRCDIR = MesaDrvSrcDir + +#ifndef MesaDrvCommonBuildDir +#define MesaDrvCommonBuildDir $(MESADRVSRCDIR)/common/ +#endif +MESADRVCOMMONBUILDDIR = MesaDrvCommonBuildDir + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + +#if BuildXF86DRI + DRI_DEFINES = GlxDefines + DRI_INCLUDES = +#endif + +MESA_INCLUDES = -I$(MESADRVSRCDIR)/common + X_INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) + + COMMONSRCS = $(MESADRVCOMMONBUILDDIR)hwlog.c \ + $(MESADRVCOMMONBUILDDIR)mm.c + + COMMONOBJS = $(MESADRVCOMMONBUILDDIR)hwlog.o \ + $(MESADRVCOMMONBUILDDIR)mm.o + + COMMONUOBJS = $(MESADRVCOMMONBUILDDIR)unshared/hwlog.o \ + $(MESADRVCOMMONBUILDDIR)unshared/mm.o + + COMMONDOBJS = $(MESADRVCOMMONBUILDDIR)debugger/hwlog.o \ + $(MESADRVCOMMONBUILDDIR)debugger/mm.o + + COMMONPOBJS = $(MESADRVCOMMONBUILDDIR)profiled/hwlog.o \ + $(MESADRVCOMMONBUILDDIR)profiled/mm.o + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(hwlog.c, $(MESADRVSRCDIR)/common) +LinkSourceFile(mm.c, $(MESADRVSRCDIR)/common) +#endif Index: xc/lib/GL/mesa/src/drv/common/depthtmp.h diff -u xc/lib/GL/mesa/src/drv/common/depthtmp.h:1.4 xc/lib/GL/mesa/src/drv/common/depthtmp.h:1.5 --- xc/lib/GL/mesa/src/drv/common/depthtmp.h:1.4 Mon Dec 4 17:43:20 2000 +++ xc/lib/GL/mesa/src/drv/common/depthtmp.h Wed Mar 21 11:14:20 2001 @@ -1,9 +1,10 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/common/depthtmp.h,v 1.4 2000/12/04 22:43:20 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/common/depthtmp.h,v 1.5 2001/03/21 16:14:20 dawes Exp $ */ #ifndef DBG #define DBG 0 #endif + #ifndef HAVE_HW_DEPTH_SPANS #define HAVE_HW_DEPTH_SPANS 0 #endif @@ -11,13 +12,19 @@ #define HAVE_HW_DEPTH_PIXELS 0 #endif +#ifndef HW_READ_LOCK +#define HW_READ_LOCK() HW_LOCK() +#endif +#ifndef HW_READ_UNLOCK +#define HW_READ_UNLOCK() HW_UNLOCK() +#endif static void TAG(WriteDepthSpan)( GLcontext *ctx, - GLuint n, GLint x, GLint y, + GLuint n, GLint x, GLint y, const GLdepth *depth, const GLubyte mask[] ) { - HW_LOCK() + HW_WRITE_LOCK() { GLint x1; GLint n1; @@ -54,7 +61,7 @@ HW_ENDCLIPLOOP(); #endif } - HW_UNLOCK(); + HW_WRITE_UNLOCK(); } static void TAG(WriteDepthPixels)( GLcontext *ctx, @@ -64,7 +71,7 @@ const GLdepth depth[], const GLubyte mask[] ) { - HW_LOCK() + HW_WRITE_LOCK() { GLint i; LOCAL_DEPTH_VARS; @@ -89,7 +96,7 @@ HW_ENDCLIPLOOP(); #endif } - HW_UNLOCK(); + HW_WRITE_UNLOCK(); } @@ -99,7 +106,7 @@ GLuint n, GLint x, GLint y, GLdepth depth[] ) { - HW_LOCK() + HW_READ_LOCK() { GLint x1, n1; LOCAL_DEPTH_VARS; @@ -123,14 +130,14 @@ HW_ENDCLIPLOOP(); #endif } - HW_UNLOCK(); + HW_READ_UNLOCK(); } static void TAG(ReadDepthPixels)( GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLdepth depth[] ) { - HW_LOCK() + HW_READ_LOCK() { GLint i; LOCAL_DEPTH_VARS; @@ -153,8 +160,9 @@ HW_ENDCLIPLOOP(); #endif } - HW_UNLOCK(); + HW_READ_UNLOCK(); } + #if HAVE_HW_DEPTH_SPANS #undef WRITE_DEPTH_SPAN Index: xc/lib/GL/mesa/src/drv/common/spantmp.h diff -u xc/lib/GL/mesa/src/drv/common/spantmp.h:1.2 xc/lib/GL/mesa/src/drv/common/spantmp.h:1.3 --- xc/lib/GL/mesa/src/drv/common/spantmp.h:1.2 Fri Jun 16 20:02:55 2000 +++ xc/lib/GL/mesa/src/drv/common/spantmp.h Wed Mar 21 11:14:20 2001 @@ -2,21 +2,45 @@ #define DBG 0 #endif -static void TAG(WriteRGBASpan)( const GLcontext *ctx, - GLuint n, GLint x, GLint y, - const GLubyte rgba[][4], +#ifndef HW_WRITE_LOCK +#define HW_WRITE_LOCK() HW_LOCK() +#endif + +#ifndef HW_WRITE_UNLOCK +#define HW_WRITE_UNLOCK() HW_UNLOCK() +#endif + +#ifndef HW_READ_LOCK +#define HW_READ_LOCK() HW_LOCK() +#endif + +#ifndef HW_READ_UNLOCK +#define HW_READ_UNLOCK() HW_UNLOCK() +#endif + +#ifndef HW_READ_CLIPLOOP +#define HW_READ_CLIPLOOP() HW_CLIPLOOP() +#endif + +#ifndef HW_WRITE_CLIPLOOP +#define HW_WRITE_CLIPLOOP() HW_CLIPLOOP() +#endif + + +static void TAG(WriteRGBASpan)( const GLcontext *ctx, + GLuint n, GLint x, GLint y, + const GLubyte rgba[][4], const GLubyte mask[] ) { - HW_LOCK() + HW_WRITE_LOCK() { GLint x1; GLint n1; LOCAL_VARS; - - y = Y_FLIP(y); + y = Y_FLIP(y); - HW_CLIPLOOP() + HW_WRITE_CLIPLOOP() { GLint i = 0; CLIPSPAN(x,y,n,x1,n1,i); @@ -26,31 +50,31 @@ if (mask) { - for (;i0;i++,x1++,n1--) if (mask[i]) - WRITE_RGBA( x1, y, - rgba[i][0], rgba[i][1], + WRITE_RGBA( x1, y, + rgba[i][0], rgba[i][1], rgba[i][2], rgba[i][3] ); } else { - for (;i0;i++,x1++,n1--) + WRITE_RGBA( x1, y, + rgba[i][0], rgba[i][1], rgba[i][2], rgba[i][3] ); } } HW_ENDCLIPLOOP(); } - HW_UNLOCK(); + HW_WRITE_UNLOCK(); } static void TAG(WriteRGBSpan)( const GLcontext *ctx, GLuint n, GLint x, GLint y, - const GLubyte rgb[][3], + const GLubyte rgb[][3], const GLubyte mask[] ) { - HW_LOCK() + HW_WRITE_LOCK() { GLint x1; GLint n1; @@ -58,7 +82,7 @@ y = Y_FLIP(y); - HW_CLIPLOOP() + HW_WRITE_CLIPLOOP() { GLint i = 0; CLIPSPAN(x,y,n,x1,n1,i); @@ -68,59 +92,59 @@ if (mask) { - for (;i0;i++,x1++,n1--) if (mask[i]) WRITE_RGBA( x1, y, rgb[i][0], rgb[i][1], rgb[i][2], 255 ); } else { - for (;i0;i++,x1++,n1--) WRITE_RGBA( x1, y, rgb[i][0], rgb[i][1], rgb[i][2], 255 ); } } HW_ENDCLIPLOOP(); } - HW_UNLOCK(); + HW_WRITE_UNLOCK(); } static void TAG(WriteRGBAPixels)( const GLcontext *ctx, - GLuint n, - const GLint x[], + GLuint n, + const GLint x[], const GLint y[], - const GLubyte rgba[][4], + const GLubyte rgba[][4], const GLubyte mask[] ) { - HW_LOCK() + HW_WRITE_LOCK() { GLint i; LOCAL_VARS; if (DBG) fprintf(stderr, "WriteRGBAPixels\n"); - HW_CLIPLOOP() + HW_WRITE_CLIPLOOP() { for (i=0;i0;i++,x1++,n1--) if (mask[i]) WRITE_PIXEL( x1, y, p ); } HW_ENDCLIPLOOP(); } - HW_UNLOCK(); + HW_WRITE_UNLOCK(); } static void TAG(WriteMonoRGBAPixels)( const GLcontext *ctx, - GLuint n, + GLuint n, const GLint x[], const GLint y[], - const GLubyte mask[] ) + const GLubyte mask[] ) { - HW_LOCK() + HW_WRITE_LOCK() { GLint i; LOCAL_VARS; @@ -158,7 +182,7 @@ if (DBG) fprintf(stderr, "WriteMonoRGBAPixels\n"); - HW_CLIPLOOP() + HW_WRITE_CLIPLOOP() { for (i=0;i0;i++,x1++,n1--) + READ_RGBA( rgba[i], x1, y ); } - HW_ENDCLIPLOOP(); + HW_ENDCLIPLOOP(); } - HW_UNLOCK(); + HW_READ_UNLOCK(); } + static void TAG(ReadRGBAPixels)( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] ) { - HW_LOCK() + HW_READ_LOCK() { GLint i; LOCAL_VARS; if (DBG) fprintf(stderr, "ReadRGBAPixels\n"); - - HW_CLIPLOOP() + + HW_READ_CLIPLOOP() { for (i=0;i -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx + +#if GlxUseBuiltInDRIDriver +#define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) +#define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) #define DoExtraLib SharedLibGlx #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx - -#if Malloc0ReturnsNull -ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#else +#define DoNormalLib SharedLibGlxWithoutPIC +#define DoSharedLib !SharedLibGlxWithoutPIC +#define DoExtrasLib NO +#define DoDebugLib NO +#define DoProfileLib NO #endif -#if BuildXF86DRI - DRI_DEFINES = GlxDefines -DDRIVERTS - DRI_INCLUDES = -I../../../../dri -I../../../../glx \ - -I$(TOP)/include -I$(TOP)/include/GL \ - -I$(XF86OSSRC) -I$(SERVERSRC)/GL/dri \ - -I$(XF86DRIVERSRC)/sunffb \ - -I../../../include -I../.. -I../../X -I../common \ - -I../../../dri +#include "../common/Imakefile.inc" +#include "Imakefile.inc" +#include "../../Imakefile.inc" +#ifdef i386Architecture +#include "../../X86/Imakefile.inc" #endif -MESA_INCLUDES = -I. -I.. -I../../include \ - -I../../../../dri/drm + DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(MESA_ASM_DEFINES) + INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES) + DRIOBJS = $(GLXLIBSRC)/mesa/dri/dri_mesa.o \ + $(GLXLIBSRC)/dri/dri_tmm.o - DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) $(MESA_INCLUDES) $(DRI_INCLUDES) + DRMOBJS = $(GLXLIBSRC)/dri/drm/xf86drm.o \ + $(GLXLIBSRC)/dri/drm/xf86drmHash.o \ + $(GLXLIBSRC)/dri/drm/xf86drmRandom.o \ + $(GLXLIBSRC)/dri/drm/xf86drmSL.o - DRISRCS = ../../../dri/dri_mesa.c \ - ../../../../dri/dri_tmm.c - - DRIOBJS = ../../../dri/dri_mesa.o \ - ../../../../dri/dri_tmm.o - - DRMSRCS = ../../../../dri/drm/xf86drm.c \ - ../../../../dri/drm/xf86drmHash.c \ - ../../../../dri/drm/xf86drmRandom.c \ - ../../../../dri/drm/xf86drmSL.c - - DRMOBJS = ../../../../dri/drm/xf86drm.o \ - ../../../../dri/drm/xf86drmHash.o \ - ../../../../dri/drm/xf86drmRandom.o \ - ../../../../dri/drm/xf86drmSL.o - - MESASRCS = ../../aatriangle.c \ - ../../accum.c \ - ../../alpha.c \ - ../../alphabuf.c \ - ../../attrib.c \ - ../../bbox.c \ - ../../bitmap.c \ - ../../blend.c \ - ../../buffers.c \ - ../../clip.c \ - ../../colortab.c \ - ../../config.c \ - ../../context.c \ - ../../copypix.c \ - ../../cva.c \ - ../../debug_xform.c \ - ../../depth.c \ - ../../dlist.c \ - ../../drawpix.c \ - ../../enable.c \ - ../../enums.c \ - ../../eval.c \ - ../../extensions.c \ - ../../feedback.c \ - ../../fog.c \ - ../../get.c \ - ../../glapi.c \ - ../../glapinoop.c \ - ../../glthread.c \ - ../../hash.c \ - ../../image.c \ - ../../imaging.c \ - ../../light.c \ - ../../lines.c \ - ../../logic.c \ - ../../masking.c \ - ../../matrix.c \ - ../../mem.c \ - ../../mmath.c \ - ../../pb.c \ - ../../pipeline.c \ - ../../pixel.c \ - ../../pixeltex.c \ - ../../points.c \ - ../../polygon.c \ - ../../quads.c \ - ../../rastpos.c \ - ../../readpix.c \ - ../../rect.c \ - ../../scissor.c \ - ../../shade.c \ - ../../span.c \ - ../../stages.c \ - ../../state.c \ - ../../stencil.c \ - ../../teximage.c \ - ../../texobj.c \ - ../../texstate.c \ - ../../texture.c \ - ../../texutil.c \ - ../../translate.c \ - ../../triangle.c \ - ../../varray.c \ - ../../vb.c \ - ../../vbcull.c \ - ../../vbfill.c \ - ../../vbindirect.c \ - ../../vbrender.c \ - ../../vbxform.c \ - ../../vector.c \ - ../../vertices.c \ - ../../winpos.c \ - ../../xform.c \ - ../../zoom.c - - MESAOBJS = ../../aatriangle.o \ - ../../accum.o \ - ../../alpha.o \ - ../../alphabuf.o \ - ../../attrib.o \ - ../../bbox.o \ - ../../bitmap.o \ - ../../blend.o \ - ../../buffers.o \ - ../../clip.o \ - ../../colortab.o \ - ../../config.o \ - ../../context.o \ - ../../copypix.o \ - ../../cva.o \ - ../../debug_xform.o \ - ../../depth.o \ - ../../dlist.o \ - ../../drawpix.o \ - ../../enable.o \ - ../../enums.o \ - ../../eval.o \ - ../../extensions.o \ - ../../feedback.o \ - ../../fog.o \ - ../../get.o \ - ../../hash.o \ - ../../hint.o \ - ../../image.o \ - ../../imaging.o \ - ../../light.o \ - ../../lines.o \ - ../../logic.o \ - ../../masking.o \ - ../../matrix.o \ - ../../mem.o \ - ../../mmath.o \ - ../../pb.o \ - ../../pipeline.o \ - ../../pixel.o \ - ../../pixeltex.o \ - ../../points.o \ - ../../polygon.o \ - ../../quads.o \ - ../../rastpos.o \ - ../../readpix.o \ - ../../rect.o \ - ../../scissor.o \ - ../../shade.o \ - ../../span.o \ - ../../stages.o \ - ../../state.o \ - ../../stencil.o \ - ../../teximage.o \ - ../../texobj.o \ - ../../texstate.o \ - ../../texture.o \ - ../../texutil.o \ - ../../translate.o \ - ../../triangle.o \ - ../../varray.o \ - ../../vb.o \ - ../../vbcull.o \ - ../../vbfill.o \ - ../../vbindirect.o \ - ../../vbrender.o \ - ../../vbxform.o \ - ../../vector.o \ - ../../vertices.o \ - ../../winpos.o \ - ../../xform.o \ - ../../zoom.o - - FFBSRCS = ffb_dd.c ffb_span.c ffb_depth.c ffb_state.c ffb_clear.c ffb_vb.c \ - ffb_lines.c ffb_points.c ffb_tris.c ffb_pipeline.c \ - ffb_stencil.c ffb_xmesa.c - - FFBOBJS = ffb_dd.o ffb_span.o ffb_depth.o ffb_state.o ffb_clear.o ffb_vb.o \ - ffb_lines.o ffb_points.o ffb_tris.o ffb_pipeline.o \ - ffb_stencil.o ffb_xmesa.o - - SRCS = $(FFBSRCS) $(DRISRCS) $(DRMSRCS) $(MESASRCS) - OBJS = $(FFBOBJS) $(DRIOBJS) $(DRMOBJS) $(MESAOBJS) - -REQUIREDLIBS += MathLibrary -#if !GlxBuiltInFfb -REQUIREDLIBS += -L../../../.. -lGL -#endif + SRCS = $(FFBSRCS) + OBJS = $(FFBOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) -#if !GlxUseBuiltInDRIDriver -#undef DoNormalLib NormalLibGlx -#undef DoExtraLib SharedLibGlx -#undef DoDebugLib DebugLibGlx -#undef DoProfileLib ProfileLibGlx -#endif +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) #include -LibraryObjectRule() - SubdirLibraryRule($(OBJS)) NormalLintTarget($(SRCS)) #if !GlxUseBuiltInDRIDriver LIBNAME = ffb_dri.so -ALL_OBJS = $(OBJS) -ALL_DEPS = DONE -SharedDepModuleTarget($(LIBNAME),$(ALL_DEPS),$(ALL_OBJS)) +SharedDriModuleTarget($(LIBNAME),DONE $(OBJS),$(OBJS)) InstallDynamicModule($(LIBNAME),$(MODULEDIR),dri) #endif DependTarget() + Index: xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc:1.2 --- /dev/null Mon Jun 4 12:37:27 2001 +++ xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc Wed May 2 11:06:03 2001 @@ -0,0 +1,113 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc,v 1.2 2001/05/02 15:06:03 dawes Exp $ + +#ifndef MesaDrvSrcDir +#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv +#endif + +MESADRVSRCDIR = MesaDrvSrcDir + +#ifndef MesaDrvFfbBuildDir +#define MesaDrvFfbBuildDir /**/ +#endif +MESADRVFFBBUILDDIR = MesaDrvFfbBuildDir + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + +#if BuildXF86DRI + DRI_DEFINES = GlxDefines + DRI_INCLUDES = -I$(GLXLIBSRC)/dri -I$(GLXLIBSRC)/glx \ + -I$(INCLUDESRC) -I$(INCLUDESRC)/GL \ + -I$(GLXLIBSRC)/mesa/dri \ + -I$(SERVERSRC)/GL/dri \ + -I$(XF86OSSRC) \ + -I$(XF86DRIVERSRC)/sunffb \ + -I$(GLXLIBSRC)/dri/drm +#endif + +MESA_INCLUDES = -I$(MESASRCDIR)/src -I$(MESADRVSRCDIR)/common \ + -I$(MESADRVSRCDIR)/ffb + X_INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) + + + FFBSRCS = $(MESADRVFFBBUILDDIR)ffb_dd.c \ + $(MESADRVFFBBUILDDIR)ffb_span.c \ + $(MESADRVFFBBUILDDIR)ffb_depth.c \ + $(MESADRVFFBBUILDDIR)ffb_state.c \ + $(MESADRVFFBBUILDDIR)ffb_clear.c \ + $(MESADRVFFBBUILDDIR)ffb_vb.c \ + $(MESADRVFFBBUILDDIR)ffb_lines.c \ + $(MESADRVFFBBUILDDIR)ffb_points.c \ + $(MESADRVFFBBUILDDIR)ffb_tris.c \ + $(MESADRVFFBBUILDDIR)ffb_pipeline.c \ + $(MESADRVFFBBUILDDIR)ffb_stencil.c \ + $(MESADRVFFBBUILDDIR)ffb_xmesa.c + + FFBOBJS = $(MESADRVFFBBUILDDIR)ffb_dd.o \ + $(MESADRVFFBBUILDDIR)ffb_span.o \ + $(MESADRVFFBBUILDDIR)ffb_depth.o \ + $(MESADRVFFBBUILDDIR)ffb_state.o \ + $(MESADRVFFBBUILDDIR)ffb_clear.o \ + $(MESADRVFFBBUILDDIR)ffb_vb.o \ + $(MESADRVFFBBUILDDIR)ffb_lines.o \ + $(MESADRVFFBBUILDDIR)ffb_points.o \ + $(MESADRVFFBBUILDDIR)ffb_tris.o \ + $(MESADRVFFBBUILDDIR)ffb_pipeline.o \ + $(MESADRVFFBBUILDDIR)ffb_stencil.o \ + $(MESADRVFFBBUILDDIR)ffb_xmesa.o + + FFBUOBJS = $(MESADRVFFBBUILDDIR)unshared/ffb_dd.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_span.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_depth.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_state.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_clear.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_vb.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_lines.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_points.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_tris.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_pipeline.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_stencil.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_xmesa.o + + FFBDOBJS = $(MESADRVFFBBUILDDIR)debugger/ffb_dd.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_span.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_depth.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_state.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_clear.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_vb.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_lines.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_points.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_tris.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_pipeline.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_stencil.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_xmesa.o + + FFBPOBJS = $(MESADRVFFBBUILDDIR)profiled/ffb_dd.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_span.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_depth.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_state.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_clear.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_vb.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_lines.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_points.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_tris.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_pipeline.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_stencil.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_xmesa.o + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(ffb_dd.c, $(MESADRVSRCDIR)/ffb) +LinkSourceFile(ffb_span.c, $(MESADRVSRCDIR)/ffb) +LinkSourceFile(ffb_depth.c, $(MESADRVSRCDIR)/ffb) +LinkSourceFile(ffb_state.c, $(MESADRVSRCDIR)/ffb) +LinkSourceFile(ffb_clear.c, $(MESADRVSRCDIR)/ffb) +LinkSourceFile(ffb_vb.c, $(MESADRVSRCDIR)/ffb) +LinkSourceFile(ffb_lines.c, $(MESADRVSRCDIR)/ffb) +LinkSourceFile(ffb_points.c, $(MESADRVSRCDIR)/ffb) +LinkSourceFile(ffb_tris.c, $(MESADRVSRCDIR)/ffb) +LinkSourceFile(ffb_pipeline.c, $(MESADRVSRCDIR)/ffb) +LinkSourceFile(ffb_stencil.c, $(MESADRVSRCDIR)/ffb) +LinkSourceFile(ffb_xmesa.c, $(MESADRVSRCDIR)/ffb) +#endif + Index: xc/lib/GL/mesa/src/drv/ffb/ffb_dd.c diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_dd.c:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_dd.c:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_dd.c:1.1 Tue Jun 20 01:08:38 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_dd.c Tue Apr 10 12:07:50 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_dd.c,v 1.1 2000/06/20 05:08:38 dawes Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_dd.c,v 1.2 2001/04/10 16:07:50 dawes Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D * Copyright (C) 2000 David S. Miller @@ -16,9 +16,9 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * DAVID MILLER, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + * DAVID MILLER, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @@ -53,7 +53,7 @@ case GL_VENDOR: return (GLubyte *) "David S. Miller"; case GL_RENDERER: - return (GLubyte *) "DRI-FFB"; + return (GLubyte *) "Mesa DRI FFB 20010321"; default: return NULL; }; Index: xc/lib/GL/mesa/src/drv/ffb/ffb_state.c diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_state.c:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_state.c:1.1.4.1 --- xc/lib/GL/mesa/src/drv/ffb/ffb_state.c:1.1 Tue Jun 20 01:08:39 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_state.c Thu May 24 12:35:38 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_state.c,v 1.1 2000/06/20 05:08:39 dawes Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_state.c,v 1.1.4.1 2001/05/24 16:35:38 dawes Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D * Copyright (C) 2000 David S. Miller @@ -548,6 +548,7 @@ "ffbDDReducedPrimitiveChange: prim(%d) ", prim); #endif switch(prim) { + case GL_POINT: case GL_POINTS: #ifdef STATE_TRACE fprintf(stderr, "GL_POINTS "); @@ -571,6 +572,7 @@ } break; + case GL_LINE: case GL_LINES: #ifdef STATE_TRACE fprintf(stderr, "GL_LINES "); Index: xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c:1.2 xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c:1.2.4.1 --- xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c:1.2 Thu Dec 7 15:26:05 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c Tue May 29 18:28:17 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c,v 1.2 2000/12/07 20:26:05 dawes Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c,v 1.2.4.1 2001/05/29 22:28:17 dawes Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D * Copyright (C) 2000 David S. Miller @@ -338,6 +338,8 @@ if (ffbCtx == NULL || ffbCtx->glCtx->Visual->DBflag == 0) return; + + FLUSH_VB(ffbCtx->glCtx, "swap buffers"); ffb = ffbCtx->regs; dac = ffbCtx->ffbScreen->dac; Index: xc/lib/GL/mesa/src/drv/gamma/Imakefile diff -u xc/lib/GL/mesa/src/drv/gamma/Imakefile:1.16 xc/lib/GL/mesa/src/drv/gamma/Imakefile:1.23 --- xc/lib/GL/mesa/src/drv/gamma/Imakefile:1.16 Tue Dec 12 18:24:27 2000 +++ xc/lib/GL/mesa/src/drv/gamma/Imakefile Thu May 10 12:56:11 2001 @@ -1,311 +1,39 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/gamma/Imakefile,v 1.16 2000/12/12 23:24:27 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/gamma/Imakefile,v 1.23 2001/05/10 16:56:11 dawes Exp $ #include -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx +#if GlxUseBuiltInDRIDriver +#define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) +#define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) #define DoExtraLib SharedLibGlx #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx - -#if Malloc0ReturnsNull -ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#else +#define DoNormalLib SharedLibGlxWithoutPIC +#define DoSharedLib !SharedLibGlxWithoutPIC +#define DoExtrasLib NO +#define DoDebugLib NO +#define DoProfileLib NO #endif +#include "../common/Imakefile.inc" +#include "Imakefile.inc" +#include "../../Imakefile.inc" #ifdef i386Architecture -#if MesaUseMMX - MMX_DEFS = -DUSE_MMX_ASM -#endif -#if MesaUse3DNow - 3DNOW_DEFS = -DUSE_3DNOW_ASM -#endif -#if MesaUseKatmai - KATMAI_DEFS = -DUSE_KATMAI_ASM -#endif - ASM_DEFINES = -DUSE_X86_ASM $(MMX_DEFS) $(3DNOW_DEFS) $(KATMAI_DEFS) -#endif - -#if BuildXF86DRI - DRI_DEFINES = GlxDefines -DDRIVERTS - DRI_INCLUDES = -I../../../../dri -I../../../../glx \ - -I../../../dri \ - -I$(TOP)/include -I$(TOP)/include/GL \ - -I$(XF86OSSRC) -I$(SERVERSRC)/GL/dri \ - -I$(XF86DRIVERSRC)/glint \ - -I../../../include -I../.. -I../../X -I../common +#include "../../X86/Imakefile.inc" #endif -MESA_INCLUDES = -I. -I.. -I../../include \ - -I../../../../dri/drm + DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(MESA_ASM_DEFINES) + INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES) + DRIOBJS = $(GLXLIBSRC)/mesa/dri/dri_mesa.o \ + $(GLXLIBSRC)/dri/dri_tmm.o - DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(ASM_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) $(MESA_INCLUDES) $(DRI_INCLUDES) - - DRISRCS = ../../../dri/dri_mesa.c \ - ../../../../dri/dri_tmm.c - - DRIOBJS = ../../../dri/dri_mesa.o \ - ../../../../dri/dri_tmm.o - - DRMSRCS = ../../../../dri/drm/xf86drm.c \ - ../../../../dri/drm/xf86drmHash.c \ - ../../../../dri/drm/xf86drmRandom.c \ - ../../../../dri/drm/xf86drmSL.c - - DRMOBJS = ../../../../dri/drm/xf86drm.o \ - ../../../../dri/drm/xf86drmHash.o \ - ../../../../dri/drm/xf86drmRandom.o \ - ../../../../dri/drm/xf86drmSL.o - - GAMMASRCS = gamma_gl.c \ - gamma_xmesa.c \ - gamma_init.c \ - gamma_matrix.c \ - gamma_inithw.c \ - gamma_texture.c \ - /* gamma_dlist.c */ - - GAMMAOBJS = gamma_gl.o \ - gamma_xmesa.o \ - gamma_init.o \ - gamma_matrix.o \ - gamma_inithw.o \ - gamma_texture.o \ - /* gamma_dlist.o */ - - MESASRCS = ../../aatriangle.c \ - ../../accum.c \ - ../../alpha.c \ - ../../alphabuf.c \ - ../../attrib.c \ - ../../bbox.c \ - ../../bitmap.c \ - ../../blend.c \ - ../../buffers.c \ - ../../clip.c \ - ../../colortab.c \ - ../../config.c \ - ../../context.c \ - ../../copypix.c \ - ../../cva.c \ - ../../debug_xform.c \ - ../../depth.c \ - ../../dlist.c \ - ../../drawpix.c \ - ../../enable.c \ - ../../enums.c \ - ../../eval.c \ - ../../extensions.c \ - ../../feedback.c \ - ../../fog.c \ - ../../get.c \ - ../../glapi.c \ - ../../glapinoop.c \ - ../../glthread.c \ - ../../hash.c \ - ../../image.c \ - ../../imaging.c \ - ../../light.c \ - ../../lines.c \ - ../../logic.c \ - ../../masking.c \ - ../../matrix.c \ - ../../mem.c \ - ../../mmath.c \ - ../../pb.c \ - ../../pipeline.c \ - ../../pixel.c \ - ../../pixeltex.c \ - ../../points.c \ - ../../polygon.c \ - ../../quads.c \ - ../../rastpos.c \ - ../../readpix.c \ - ../../rect.c \ - ../../scissor.c \ - ../../shade.c \ - ../../span.c \ - ../../stages.c \ - ../../state.c \ - ../../stencil.c \ - ../../teximage.c \ - ../../texobj.c \ - ../../texstate.c \ - ../../texture.c \ - ../../texutil.c \ - ../../translate.c \ - ../../triangle.c \ - ../../varray.c \ - ../../vb.c \ - ../../vbcull.c \ - ../../vbfill.c \ - ../../vbindirect.c \ - ../../vbrender.c \ - ../../vbxform.c \ - ../../vector.c \ - ../../vertices.c \ - ../../winpos.c \ - ../../xform.c \ - ../../zoom.c - - MESAOBJS = ../../aatriangle.o \ - ../../accum.o \ - ../../alpha.o \ - ../../alphabuf.o \ - ../../attrib.o \ - ../../bbox.o \ - ../../bitmap.o \ - ../../blend.o \ - ../../buffers.o \ - ../../clip.o \ - ../../colortab.o \ - ../../config.o \ - ../../context.o \ - ../../copypix.o \ - ../../cva.o \ - ../../debug_xform.o \ - ../../depth.o \ - ../../dlist.o \ - ../../drawpix.o \ - ../../enable.o \ - ../../enums.o \ - ../../eval.o \ - ../../extensions.o \ - ../../feedback.o \ - ../../fog.o \ - ../../get.o \ - ../../hash.o \ - ../../hint.o \ - ../../image.o \ - ../../imaging.o \ - ../../light.o \ - ../../lines.o \ - ../../logic.o \ - ../../masking.o \ - ../../matrix.o \ - ../../mem.o \ - ../../mmath.o \ - ../../pb.o \ - ../../pipeline.o \ - ../../pixel.o \ - ../../pixeltex.o \ - ../../points.o \ - ../../polygon.o \ - ../../quads.o \ - ../../rastpos.o \ - ../../readpix.o \ - ../../rect.o \ - ../../scissor.o \ - ../../shade.o \ - ../../span.o \ - ../../stages.o \ - ../../state.o \ - ../../stencil.o \ - ../../teximage.o \ - ../../texobj.o \ - ../../texstate.o \ - ../../texture.o \ - ../../texutil.o \ - ../../translate.o \ - ../../triangle.o \ - ../../varray.o \ - ../../vb.o \ - ../../vbcull.o \ - ../../vbfill.o \ - ../../vbindirect.o \ - ../../vbrender.o \ - ../../vbxform.o \ - ../../vector.o \ - ../../vertices.o \ - ../../winpos.o \ - ../../xform.o \ - ../../zoom.o - -#ifdef i386Architecture - X86_SRCS = ../../X86/common_x86.c \ - ../../X86/common_x86_asm.S \ - ../../X86/x86.c \ - ../../X86/x86_cliptest.S \ - ../../X86/x86_vertex.S \ - ../../X86/x86_xform_masked2.S \ - ../../X86/x86_xform_masked3.S \ - ../../X86/x86_xform_masked4.S \ - ../../X86/x86_xform_raw2.S \ - ../../X86/x86_xform_raw3.S \ - ../../X86/x86_xform_raw4.S - - X86_OBJS = ../../X86/common_x86.o \ - ../../X86/common_x86_asm.o \ - ../../X86/x86.o \ - ../../X86/x86_cliptest.o \ - ../../X86/x86_vertex.o \ - ../../X86/x86_xform_masked2.o \ - ../../X86/x86_xform_masked3.o \ - ../../X86/x86_xform_masked4.o \ - ../../X86/x86_xform_raw2.o \ - ../../X86/x86_xform_raw3.o \ - ../../X86/x86_xform_raw4.o - -#if MesaUseMMX - MMX_SRCS = ../../X86/mmx_blend.S - - MMX_OBJS = ../../X86/mmx_blend.o -#endif + DRMOBJS = $(GLXLIBSRC)/dri/drm/xf86drm.o \ + $(GLXLIBSRC)/dri/drm/xf86drmHash.o \ + $(GLXLIBSRC)/dri/drm/xf86drmRandom.o \ + $(GLXLIBSRC)/dri/drm/xf86drmSL.o -#if MesaUse3DNow - 3DNOW_SRCS = ../../X86/3dnow.c \ - ../../X86/3dnow_norm_raw.S \ - ../../X86/3dnow_vertex.S \ - ../../X86/3dnow_xform_masked1.S \ - ../../X86/3dnow_xform_masked2.S \ - ../../X86/3dnow_xform_masked3.S \ - ../../X86/3dnow_xform_masked4.S \ - ../../X86/3dnow_xform_raw1.S \ - ../../X86/3dnow_xform_raw2.S \ - ../../X86/3dnow_xform_raw3.S \ - ../../X86/3dnow_xform_raw4.S - - 3DNOW_OBJS = ../../X86/3dnow.o \ - ../../X86/3dnow_norm_raw.o \ - ../../X86/3dnow_vertex.o \ - ../../X86/3dnow_xform_masked1.o \ - ../../X86/3dnow_xform_masked2.o \ - ../../X86/3dnow_xform_masked3.o \ - ../../X86/3dnow_xform_masked4.o \ - ../../X86/3dnow_xform_raw1.o \ - ../../X86/3dnow_xform_raw2.o \ - ../../X86/3dnow_xform_raw3.o \ - ../../X86/3dnow_xform_raw4.o -#endif - -#if MesaUseKatmai - KATMAI_SRCS = ../../X86/katmai.c \ - ../../X86/katmai_norm_raw.S \ - ../../X86/katmai_vertex.S \ - ../../X86/katmai_xform_masked1.S \ - ../../X86/katmai_xform_masked2.S \ - ../../X86/katmai_xform_masked3.S \ - ../../X86/katmai_xform_masked4.S \ - ../../X86/katmai_xform_raw1.S \ - ../../X86/katmai_xform_raw2.S \ - ../../X86/katmai_xform_raw3.S \ - ../../X86/katmai_xform_raw4.S - - KATMAI_OBJS = ../../X86/katmai.o \ - ../../X86/katmai_norm_raw.o \ - ../../X86/katmai_vertex.o \ - ../../X86/katmai_xform_masked1.o \ - ../../X86/katmai_xform_masked2.o \ - ../../X86/katmai_xform_masked3.o \ - ../../X86/katmai_xform_masked4.o \ - ../../X86/katmai_xform_raw1.o \ - ../../X86/katmai_xform_raw2.o \ - ../../X86/katmai_xform_raw3.o \ - ../../X86/katmai_xform_raw4.o -#endif -#endif - #ifdef GlxSoProf LOSRCS = ../../../../lowpc.c HISRCS = ../../../../highpc.c @@ -314,46 +42,30 @@ HIOBJS = ../../../../highpc.o #endif - ASMSRCS = $(X86_SRCS) $(MMX_SRCS) $(3DNOW_SRCS) $(KATMAI_SRCS) - ASMOBJS = $(X86_OBJS) $(MMX_OBJS) $(3DNOW_OBJS) $(KATMAI_OBJS) + SRCS = $(GAMMASRCS) + OBJS = $(LOWOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ + $(MESA_ASM_OBJS) $(GAMMAOBJS) $(HIOBJS) - SRCS = $(LOWSRCS) $(DRISRCS) $(DRMSRCS) $(MESASRCS) \ - $(ASMSRCS) $(GAMMASRCS) $(HISRCS) - OBJS = $(LOWOBJS) $(DRIOBJS) $(DRMOBJS) $(MESAOBJS) \ - $(ASMOBJS) $(GAMMAOBJS) $(HIOBJS) - -REQUIREDLIBS += MathLibrary -#if !GlxBuiltInGamma -REQUIREDLIBS += -L../../../.. -lGL -#endif +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) - -#if !GlxUseBuiltInDRIDriver -#undef DoNormalLib NormalLibGlx -#undef DoExtraLib SharedLibGlx -#undef DoDebugLib DebugLibGlx -#undef DoProfileLib ProfileLibGlx -#endif - #include LibraryObjectRule() -SubdirLibraryRule($(OBJS)) +SubdirLibraryRule($(GAMMAOBJS)) NormalLintTarget($(SRCS)) #if !GlxUseBuiltInDRIDriver LIBNAME = gamma_dri.so -ALL_OBJS = $(OBJS) -ALL_DEPS = DONE -SharedDepModuleTarget($(LIBNAME),$(ALL_DEPS),$(ALL_OBJS)) +SharedDriModuleTarget($(LIBNAME),DONE $(OBJS),$(OBJS)) InstallDynamicModule($(LIBNAME),$(MODULEDIR),dri) #ifdef GlxSoProf SOPROF_LIBNAME = _gamma_dri_p -NormalDepLibraryTarget($(SOPROF_LIBNAME),$(ALL_DEPS),$(ALL_OBJS)) +NormalDepLibraryTarget($(SOPROF_LIBNAME),DONE $(OBJS),$(OBJS)) InstallLibrary($(SOPROF_LIBNAME),$(MODULEDIR)/dri) #endif #endif DependTarget() + Index: xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc:1.2 --- /dev/null Mon Jun 4 12:37:28 2001 +++ xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc Wed May 2 11:06:03 2001 @@ -0,0 +1,80 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc,v 1.2 2001/05/02 15:06:03 dawes Exp $ + +#ifndef MesaDrvSrcDir +#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv +#endif + +MESADRVSRCDIR = MesaDrvSrcDir + +#ifndef MesaDrvGammaBuildDir +#define MesaDrvGammaBuildDir /**/ +#endif +MESADRVGAMMABUILDDIR = MesaDrvGammaBuildDir + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + +#if BuildXF86DRI + DRI_DEFINES = GlxDefines + DRI_INCLUDES = -I$(GLXLIBSRC)/dri -I$(GLXLIBSRC)/glx \ + -I$(INCLUDESRC) -I$(INCLUDESRC)/GL \ + -I$(GLXLIBSRC)/mesa/dri \ + -I$(SERVERSRC)/GL/dri \ + -I$(XF86DRIVERSRC)/glint \ + -I$(XF86OSSRC) +#endif + +MESA_INCLUDES = -I$(MESASRCDIR)/src -I$(MESADRVSRCDIR)/gamma + X_INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) + + + GAMMASRCS = $(MESADRVGAMMABUILDDIR)gamma_gl.c \ + $(MESADRVGAMMABUILDDIR)gamma_xmesa.c \ + $(MESADRVGAMMABUILDDIR)gamma_init.c \ + $(MESADRVGAMMABUILDDIR)gamma_matrix.c \ + $(MESADRVGAMMABUILDDIR)gamma_inithw.c \ + $(MESADRVGAMMABUILDDIR)gamma_texture.c \ + $(MESADRVGAMMABUILDDIR)gamma_dlist.c + + GAMMAOBJS = $(MESADRVGAMMABUILDDIR)gamma_gl.o \ + $(MESADRVGAMMABUILDDIR)gamma_xmesa.o \ + $(MESADRVGAMMABUILDDIR)gamma_init.o \ + $(MESADRVGAMMABUILDDIR)gamma_matrix.o \ + $(MESADRVGAMMABUILDDIR)gamma_inithw.o \ + $(MESADRVGAMMABUILDDIR)gamma_texture.o \ + $(MESADRVGAMMABUILDDIR)gamma_dlist.o + + GAMMAUOBJS = $(MESADRVGAMMABUILDDIR)unshared/gamma_gl.o \ + $(MESADRVGAMMABUILDDIR)unshared/gamma_xmesa.o \ + $(MESADRVGAMMABUILDDIR)unshared/gamma_init.o \ + $(MESADRVGAMMABUILDDIR)unshared/gamma_matrix.o \ + $(MESADRVGAMMABUILDDIR)unshared/gamma_inithw.o \ + $(MESADRVGAMMABUILDDIR)unshared/gamma_texture.o \ + $(MESADRVGAMMABUILDDIR)unshared/gamma_dlist.o + + GAMMADOBJS = $(MESADRVGAMMABUILDDIR)debugger/gamma_gl.o \ + $(MESADRVGAMMABUILDDIR)debugger/gamma_xmesa.o \ + $(MESADRVGAMMABUILDDIR)debugger/gamma_init.o \ + $(MESADRVGAMMABUILDDIR)debugger/gamma_matrix.o \ + $(MESADRVGAMMABUILDDIR)debugger/gamma_inithw.o \ + $(MESADRVGAMMABUILDDIR)debugger/gamma_texture.o \ + $(MESADRVGAMMABUILDDIR)debugger/gamma_dlist.o + + GAMMAPOBJS = $(MESADRVGAMMABUILDDIR)profiled/gamma_gl.o \ + $(MESADRVGAMMABUILDDIR)profiled/gamma_xmesa.o \ + $(MESADRVGAMMABUILDDIR)profiled/gamma_init.o \ + $(MESADRVGAMMABUILDDIR)profiled/gamma_matrix.o \ + $(MESADRVGAMMABUILDDIR)profiled/gamma_inithw.o \ + $(MESADRVGAMMABUILDDIR)profiled/gamma_texture.o \ + $(MESADRVGAMMABUILDDIR)profiled/gamma_dlist.o + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(gamma_gl.c, $(MESADRVSRCDIR)/gamma) +LinkSourceFile(gamma_xmesa.c, $(MESADRVSRCDIR)/gamma) +LinkSourceFile(gamma_init.c, $(MESADRVSRCDIR)/gamma) +LinkSourceFile(gamma_matrix.c, $(MESADRVSRCDIR)/gamma) +LinkSourceFile(gamma_inithw.c, $(MESADRVSRCDIR)/gamma) +LinkSourceFile(gamma_texture.c, $(MESADRVSRCDIR)/gamma) +LinkSourceFile(gamma_dlist.c, $(MESADRVSRCDIR)/gamma) +#endif Index: xc/lib/GL/mesa/src/drv/gamma/gamma_dlist.c diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_dlist.c:1.3 --- /dev/null Mon Jun 4 12:37:28 2001 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_dlist.c Sun Feb 11 20:11:24 2001 @@ -0,0 +1,3314 @@ +/* + * Mesa 3-D graphics library + * Version: 3.0 + * Copyright (C) 1995-1998 Brian Paul + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* + * Pinched from Mesa v3.0 to glue into gamma driver + * then glued up, to match some of the Mesa v3.3 back end. + * Alan Hourihane + */ + +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_dlist.c,v 1.3 2001/02/12 01:11:24 tsi Exp $*/ + +#ifdef PC_HEADER +#include "all.h" +#else +#include +#include +#include +#include +#include "accum.h" +#include "alpha.h" +#include "attrib.h" +#include "bitmap.h" +#include "blend.h" +#include "clip.h" +#include "colortab.h" +#include "context.h" +#include "copypix.h" +#include "depth.h" +#include "drawpix.h" +#include "enable.h" +#include "eval.h" +#include "feedback.h" +#include "fog.h" +#include "hash.h" +#include "image.h" +#include "light.h" +#include "lines.h" +#include "logic.h" +#include "macros.h" +#include "masking.h" +#include "matrix.h" +#include "mem.h" +#include "pixel.h" +#include "points.h" +#include "polygon.h" +#include "rastpos.h" +#include "rect.h" +#include "scissor.h" +#include "stencil.h" +#include "texobj.h" +#include "teximage.h" +#include "texstate.h" +#include "types.h" +#include "vb.h" +#include "vbfill.h" +#include "winpos.h" +#endif + +#include "gamma_gl.h" +#include "gamma_init.h" +#include "gamma_dlist.h" + + +/* +Functions which aren't compiled but executed immediately: + glIsList + glGenLists + glDeleteLists + glEndList + glFeedbackBuffer + glSelectBuffer + glRenderMode + glReadPixels + glPixelStore + glFlush + glFinish + glIsEnabled + glGet* + +Functions which cause errors if called while compiling a display list: + glNewList +*/ + + + +/* + * Display list instructions are stored as sequences of "nodes". Nodes + * are allocated in blocks. Each block has BLOCK_SIZE nodes. Blocks + * are linked together with a pointer. + */ + + +/* How many nodes to allocate at a time: */ +#define BLOCK_SIZE 500 + + +/* + * Display list opcodes. + * + * The fact that these identifiers are assigned consecutive + * integer values starting at 0 is very important, see InstSize array usage) + */ +typedef enum { + OPCODE_ACCUM, + OPCODE_ALPHA_FUNC, + OPCODE_BEGIN, + OPCODE_BIND_TEXTURE, + OPCODE_BITMAP, + OPCODE_BLEND_FUNC, + OPCODE_CALL_LIST, + OPCODE_CALL_LIST_OFFSET, + OPCODE_CLEAR, + OPCODE_CLEAR_ACCUM, + OPCODE_CLEAR_COLOR, + OPCODE_CLEAR_DEPTH, + OPCODE_CLEAR_INDEX, + OPCODE_CLEAR_STENCIL, + OPCODE_CLIP_PLANE, + OPCODE_COLOR_3F, + OPCODE_COLOR_4F, + OPCODE_COLOR_4UB, + OPCODE_COLOR_MASK, + OPCODE_COLOR_MATERIAL, + OPCODE_COPY_PIXELS, + OPCODE_COPY_TEX_IMAGE1D, + OPCODE_COPY_TEX_IMAGE2D, + OPCODE_COPY_TEX_SUB_IMAGE1D, + OPCODE_COPY_TEX_SUB_IMAGE2D, + OPCODE_CULL_FACE, + OPCODE_DEPTH_FUNC, + OPCODE_DEPTH_MASK, + OPCODE_DEPTH_RANGE, + OPCODE_DISABLE, + OPCODE_DRAW_BUFFER, + OPCODE_DRAW_PIXELS, + OPCODE_EDGE_FLAG, + OPCODE_ENABLE, + OPCODE_END, + OPCODE_EVALCOORD1, + OPCODE_EVALCOORD2, + OPCODE_EVALMESH1, + OPCODE_EVALMESH2, + OPCODE_EVALPOINT1, + OPCODE_EVALPOINT2, + OPCODE_FOG, + OPCODE_FRONT_FACE, + OPCODE_FRUSTUM, + OPCODE_HINT, + OPCODE_INDEX, + OPCODE_INDEX_MASK, + OPCODE_INIT_NAMES, + OPCODE_LIGHT, + OPCODE_LIGHT_MODEL, + OPCODE_LINE_STIPPLE, + OPCODE_LINE_WIDTH, + OPCODE_LIST_BASE, + OPCODE_LOAD_IDENTITY, + OPCODE_LOAD_MATRIX, + OPCODE_LOAD_NAME, + OPCODE_LOGIC_OP, + OPCODE_MAP1, + OPCODE_MAP2, + OPCODE_MAPGRID1, + OPCODE_MAPGRID2, + OPCODE_MATERIAL, + OPCODE_MATRIX_MODE, + OPCODE_MULT_MATRIX, + OPCODE_NORMAL, + OPCODE_ORTHO, + OPCODE_PASSTHROUGH, + OPCODE_PIXEL_MAP, + OPCODE_PIXEL_TRANSFER, + OPCODE_PIXEL_ZOOM, + OPCODE_POINT_SIZE, + OPCODE_POLYGON_MODE, + OPCODE_POLYGON_STIPPLE, + OPCODE_POLYGON_OFFSET, + OPCODE_POP_ATTRIB, + OPCODE_POP_MATRIX, + OPCODE_POP_NAME, + OPCODE_PRIORITIZE_TEXTURE, + OPCODE_PUSH_ATTRIB, + OPCODE_PUSH_MATRIX, + OPCODE_PUSH_NAME, + OPCODE_RASTER_POS, + OPCODE_RECTF, + OPCODE_READ_BUFFER, + OPCODE_SCALE, + OPCODE_SCISSOR, + OPCODE_SHADE_MODEL, + OPCODE_STENCIL_FUNC, + OPCODE_STENCIL_MASK, + OPCODE_STENCIL_OP, + OPCODE_TEXCOORD2, + OPCODE_TEXCOORD4, + OPCODE_TEXENV, + OPCODE_TEXGEN, + OPCODE_TEXPARAMETER, + OPCODE_TEX_IMAGE1D, + OPCODE_TEX_IMAGE2D, + OPCODE_TEX_IMAGE3D, + OPCODE_TEX_SUB_IMAGE1D, + OPCODE_TEX_SUB_IMAGE2D, + OPCODE_TRANSLATE, + OPCODE_VERTEX2, + OPCODE_VERTEX3, + OPCODE_VERTEX4, + OPCODE_VIEWPORT, + /* The following two are meta instructions */ + OPCODE_CONTINUE, + OPCODE_END_OF_LIST +} OpCode; + + +/* + * Each instruction in the display list is stored as a sequence of + * contiguous nodes in memory. + * Each node is the union of a variety of datatypes. + */ +union node { + OpCode opcode; + GLboolean b; + GLbitfield bf; + GLubyte ub; + GLshort s; + GLushort us; + GLint i; + GLuint ui; + GLenum e; + GLfloat f; + GLvoid *data; + void *next; /* If prev node's opcode==OPCODE_CONTINUE */ +}; + + + +/* Number of nodes of storage needed for each instruction: */ +static GLuint InstSize[ OPCODE_END_OF_LIST+1 ]; + + + +/**********************************************************************/ +/***** Private *****/ +/**********************************************************************/ + + +/* + * Allocate space for a display list instruction. + * Input: opcode - type of instruction + * argcount - number of arguments following the instruction + * Return: pointer to first node in the instruction + */ +static Node *alloc_instruction( OpCode opcode, GLint argcount ) +{ + Node *n, *newblock; + GLuint count = InstSize[opcode]; + + assert( (GLint) count == argcount+1 ); + + if (gCCPriv->CurrentPos + count + 2 > BLOCK_SIZE) { + /* This block is full. Allocate a new block and chain to it */ + n = gCCPriv->CurrentBlock + gCCPriv->CurrentPos; + n[0].opcode = OPCODE_CONTINUE; + newblock = (Node *) malloc( sizeof(Node) * BLOCK_SIZE ); + if (!newblock) { + gamma_error( GL_OUT_OF_MEMORY, "Building display list" ); + return NULL; + } + n[1].next = (Node *) newblock; + gCCPriv->CurrentBlock = newblock; + gCCPriv->CurrentPos = 0; + } + + n = gCCPriv->CurrentBlock + gCCPriv->CurrentPos; + gCCPriv->CurrentPos += count; + + n[0].opcode = opcode; + + return n; +} + + + +/* + * Make an empty display list. This is used by glGenLists() to + * reserver display list IDs. + */ +static Node *make_empty_list( void ) +{ + Node *n = (Node *) malloc( sizeof(Node) ); + n[0].opcode = OPCODE_END_OF_LIST; + return n; +} + + + +/* + * Destroy all nodes in a display list. + * Input: list - display list number + */ +void gamma_destroy_list( GLuint list ) +{ + Node *n, *block; + GLboolean done; + + block = (Node *) _mesa_HashLookup(gCCPriv->DisplayList, list); + n = block; + + done = block ? GL_FALSE : GL_TRUE; + while (!done) { + switch (n[0].opcode) { + /* special cases first */ + case OPCODE_MAP1: + free( n[6].data ); + n += InstSize[n[0].opcode]; + break; + case OPCODE_MAP2: + free( n[10].data ); + n += InstSize[n[0].opcode]; + break; + case OPCODE_DRAW_PIXELS: + free( n[5].data ); + n += InstSize[n[0].opcode]; + break; + case OPCODE_BITMAP: + free( n[7].data ); + n += InstSize[n[0].opcode]; + break; + case OPCODE_POLYGON_STIPPLE: + free( n[1].data ); + n += InstSize[n[0].opcode]; + break; + case OPCODE_TEX_IMAGE1D: + free( n[8].data ); + n += InstSize[n[0].opcode]; + break; + case OPCODE_TEX_IMAGE2D: + free( n[9].data ); + n += InstSize[n[0].opcode]; + break; + case OPCODE_TEX_SUB_IMAGE1D: + free( n[7].data ); + n += InstSize[n[0].opcode]; + break; + case OPCODE_TEX_SUB_IMAGE2D: + free( n[9].data ); + n += InstSize[n[0].opcode]; + break; + case OPCODE_CONTINUE: + n = (Node *) n[1].next; + free( block ); + block = n; + break; + case OPCODE_END_OF_LIST: + free( block ); + done = GL_TRUE; + break; + default: + /* Most frequent case */ + n += InstSize[n[0].opcode]; + break; + } + } + + _mesa_HashRemove(gCCPriv->DisplayList, list); +} + + + +/* + * Translate the nth element of list from type to GLuint. + */ +static GLuint translate_id( GLsizei n, GLenum type, const GLvoid *list ) +{ + GLbyte *bptr; + GLubyte *ubptr; + GLshort *sptr; + GLushort *usptr; + GLint *iptr; + GLuint *uiptr; + GLfloat *fptr; + + switch (type) { + case GL_BYTE: + bptr = (GLbyte *) list; + return (GLuint) *(bptr+n); + case GL_UNSIGNED_BYTE: + ubptr = (GLubyte *) list; + return (GLuint) *(ubptr+n); + case GL_SHORT: + sptr = (GLshort *) list; + return (GLuint) *(sptr+n); + case GL_UNSIGNED_SHORT: + usptr = (GLushort *) list; + return (GLuint) *(usptr+n); + case GL_INT: + iptr = (GLint *) list; + return (GLuint) *(iptr+n); + case GL_UNSIGNED_INT: + uiptr = (GLuint *) list; + return (GLuint) *(uiptr+n); + case GL_FLOAT: + fptr = (GLfloat *) list; + return (GLuint) *(fptr+n); + case GL_2_BYTES: + ubptr = ((GLubyte *) list) + 2*n; + return (GLuint) *ubptr * 256 + (GLuint) *(ubptr+1); + case GL_3_BYTES: + ubptr = ((GLubyte *) list) + 3*n; + return (GLuint) *ubptr * 65536 + + (GLuint) *(ubptr+1) * 256 + + (GLuint) *(ubptr+2); + case GL_4_BYTES: + ubptr = ((GLubyte *) list) + 4*n; + return (GLuint) *ubptr * 16777216 + + (GLuint) *(ubptr+1) * 65536 + + (GLuint) *(ubptr+2) * 256 + + (GLuint) *(ubptr+3); + default: + return 0; + } +} + + + + +/**********************************************************************/ +/***** Public *****/ +/**********************************************************************/ + +void gamma_init_lists( void ) +{ + static int init_flag = 0; + + if (init_flag==0) { + InstSize[OPCODE_ACCUM] = 3; + InstSize[OPCODE_ALPHA_FUNC] = 3; + InstSize[OPCODE_BEGIN] = 2; + InstSize[OPCODE_BIND_TEXTURE] = 3; + InstSize[OPCODE_BITMAP] = 8; + InstSize[OPCODE_BLEND_FUNC] = 3; + InstSize[OPCODE_CALL_LIST] = 2; + InstSize[OPCODE_CALL_LIST_OFFSET] = 2; + InstSize[OPCODE_CLEAR] = 2; + InstSize[OPCODE_CLEAR_ACCUM] = 5; + InstSize[OPCODE_CLEAR_COLOR] = 5; + InstSize[OPCODE_CLEAR_DEPTH] = 2; + InstSize[OPCODE_CLEAR_INDEX] = 2; + InstSize[OPCODE_CLEAR_STENCIL] = 2; + InstSize[OPCODE_CLIP_PLANE] = 6; + InstSize[OPCODE_COLOR_3F] = 4; + InstSize[OPCODE_COLOR_4F] = 5; + InstSize[OPCODE_COLOR_4UB] = 5; + InstSize[OPCODE_COLOR_MASK] = 5; + InstSize[OPCODE_COLOR_MATERIAL] = 3; + InstSize[OPCODE_COPY_PIXELS] = 6; + InstSize[OPCODE_COPY_TEX_IMAGE1D] = 8; + InstSize[OPCODE_COPY_TEX_IMAGE2D] = 9; + InstSize[OPCODE_COPY_TEX_SUB_IMAGE1D] = 7; + InstSize[OPCODE_COPY_TEX_SUB_IMAGE2D] = 9; + InstSize[OPCODE_CULL_FACE] = 2; + InstSize[OPCODE_DEPTH_FUNC] = 2; + InstSize[OPCODE_DEPTH_MASK] = 2; + InstSize[OPCODE_DEPTH_RANGE] = 3; + InstSize[OPCODE_DISABLE] = 2; + InstSize[OPCODE_DRAW_BUFFER] = 2; + InstSize[OPCODE_DRAW_PIXELS] = 2; + InstSize[OPCODE_ENABLE] = 2; + InstSize[OPCODE_EDGE_FLAG] = 2; + InstSize[OPCODE_END] = 1; + InstSize[OPCODE_EVALCOORD1] = 2; + InstSize[OPCODE_EVALCOORD2] = 3; + InstSize[OPCODE_EVALMESH1] = 4; + InstSize[OPCODE_EVALMESH2] = 6; + InstSize[OPCODE_EVALPOINT1] = 2; + InstSize[OPCODE_EVALPOINT2] = 3; + InstSize[OPCODE_FOG] = 6; + InstSize[OPCODE_FRONT_FACE] = 2; + InstSize[OPCODE_FRUSTUM] = 7; + InstSize[OPCODE_HINT] = 3; + InstSize[OPCODE_INDEX] = 2; + InstSize[OPCODE_INDEX_MASK] = 2; + InstSize[OPCODE_INIT_NAMES] = 1; + InstSize[OPCODE_LIGHT] = 7; + InstSize[OPCODE_LIGHT_MODEL] = 6; + InstSize[OPCODE_LINE_STIPPLE] = 3; + InstSize[OPCODE_LINE_WIDTH] = 2; + InstSize[OPCODE_LIST_BASE] = 2; + InstSize[OPCODE_LOAD_IDENTITY] = 1; + InstSize[OPCODE_LOAD_MATRIX] = 17; + InstSize[OPCODE_LOAD_NAME] = 2; + InstSize[OPCODE_LOGIC_OP] = 2; + InstSize[OPCODE_MAP1] = 7; + InstSize[OPCODE_MAP2] = 11; + InstSize[OPCODE_MAPGRID1] = 4; + InstSize[OPCODE_MAPGRID2] = 7; + InstSize[OPCODE_MATERIAL] = 7; + InstSize[OPCODE_MATRIX_MODE] = 2; + InstSize[OPCODE_MULT_MATRIX] = 17; + InstSize[OPCODE_NORMAL] = 4; + InstSize[OPCODE_ORTHO] = 7; + InstSize[OPCODE_PASSTHROUGH] = 2; + InstSize[OPCODE_PIXEL_MAP] = 4; + InstSize[OPCODE_PIXEL_TRANSFER] = 3; + InstSize[OPCODE_PIXEL_ZOOM] = 3; + InstSize[OPCODE_POINT_SIZE] = 2; + InstSize[OPCODE_POLYGON_MODE] = 3; + InstSize[OPCODE_POLYGON_STIPPLE] = 2; + InstSize[OPCODE_POLYGON_OFFSET] = 3; + InstSize[OPCODE_POP_ATTRIB] = 1; + InstSize[OPCODE_POP_MATRIX] = 1; + InstSize[OPCODE_POP_NAME] = 1; + InstSize[OPCODE_PRIORITIZE_TEXTURE] = 3; + InstSize[OPCODE_PUSH_ATTRIB] = 2; + InstSize[OPCODE_PUSH_MATRIX] = 1; + InstSize[OPCODE_PUSH_NAME] = 2; + InstSize[OPCODE_RASTER_POS] = 5; + InstSize[OPCODE_RECTF] = 5; + InstSize[OPCODE_READ_BUFFER] = 2; + InstSize[OPCODE_SCALE] = 4; + InstSize[OPCODE_SCISSOR] = 5; + InstSize[OPCODE_STENCIL_FUNC] = 4; + InstSize[OPCODE_STENCIL_MASK] = 2; + InstSize[OPCODE_STENCIL_OP] = 4; + InstSize[OPCODE_SHADE_MODEL] = 2; + InstSize[OPCODE_TEXCOORD2] = 3; + InstSize[OPCODE_TEXCOORD4] = 5; + InstSize[OPCODE_TEXENV] = 7; + InstSize[OPCODE_TEXGEN] = 7; + InstSize[OPCODE_TEXPARAMETER] = 7; + InstSize[OPCODE_TEX_IMAGE1D] = 9; + InstSize[OPCODE_TEX_IMAGE2D] = 10; + InstSize[OPCODE_TEX_IMAGE3D] = 11; + InstSize[OPCODE_TEX_SUB_IMAGE1D] = 8; + InstSize[OPCODE_TEX_SUB_IMAGE2D] = 10; + InstSize[OPCODE_TRANSLATE] = 4; + InstSize[OPCODE_VERTEX2] = 3; + InstSize[OPCODE_VERTEX3] = 4; + InstSize[OPCODE_VERTEX4] = 5; + InstSize[OPCODE_VIEWPORT] = 5; + InstSize[OPCODE_CONTINUE] = 2; + InstSize[OPCODE_END_OF_LIST] = 1; + } + init_flag = 1; +} + + +/* + * Display List compilation functions + */ + + +void gl_save_Accum( GLenum op, GLfloat value ) +{ + Node *n = alloc_instruction( OPCODE_ACCUM, 2 ); + if (n) { + n[1].e = op; + n[2].f = value; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Accum( op, value ); + } +} + + +void gl_save_AlphaFunc( GLenum func, GLclampf ref ) +{ + Node *n = alloc_instruction( OPCODE_ALPHA_FUNC, 2 ); + if (n) { + n[1].e = func; + n[2].f = (GLfloat) ref; + } + if (gCCPriv->ExecuteFlag) { + _gamma_AlphaFunc( func, ref ); + } +} + +void gl_save_ArrayElement( GLint i ) +{ + if (gCCPriv->Array.NormalEnabled) { + GLbyte *p = (GLbyte*) gCCPriv->Array.NormalPtr + + i * gCCPriv->Array.NormalStrideB; + switch (gCCPriv->Array.NormalType) { + case GL_BYTE: + (*gCCPriv->API->Normal3bv)( (GLbyte*) p ); + break; + case GL_SHORT: + (*gCCPriv->API->Normal3sv)( (GLshort*) p ); + break; + case GL_INT: + (*gCCPriv->API->Normal3iv)( (GLint*) p ); + break; + case GL_FLOAT: + (*gCCPriv->API->Normal3fv)( (GLfloat*) p ); + break; + case GL_DOUBLE: + (*gCCPriv->API->Normal3dv)( (GLdouble*) p ); + break; + default: +#if 0 + gl_problem("Bad normal type in gl_save_ArrayElement"); +#endif + return; + } + } + + if (gCCPriv->Array.ColorEnabled) { + GLbyte *p = (GLbyte*) gCCPriv->Array.ColorPtr + i * gCCPriv->Array.ColorStrideB; + switch (gCCPriv->Array.ColorType) { + case GL_BYTE: + switch (gCCPriv->Array.ColorSize) { + case 3: (*gCCPriv->API->Color3bv)( (GLbyte*) p ); break; + case 4: (*gCCPriv->API->Color4bv)( (GLbyte*) p ); break; + } + break; + case GL_UNSIGNED_BYTE: + switch (gCCPriv->Array.ColorSize) { + case 3: (*gCCPriv->API->Color3ubv)( (GLubyte*) p ); break; + case 4: (*gCCPriv->API->Color4ubv)( (GLubyte*) p ); break; + } + break; + case GL_SHORT: + switch (gCCPriv->Array.ColorSize) { + case 3: (*gCCPriv->API->Color3sv)( (GLshort*) p ); break; + case 4: (*gCCPriv->API->Color4sv)( (GLshort*) p ); break; + } + break; + case GL_UNSIGNED_SHORT: + switch (gCCPriv->Array.ColorSize) { + case 3: (*gCCPriv->API->Color3usv)( (GLushort*) p ); break; + case 4: (*gCCPriv->API->Color4usv)( (GLushort*) p ); break; + } + break; + case GL_INT: + switch (gCCPriv->Array.ColorSize) { + case 3: (*gCCPriv->API->Color3iv)( (GLint*) p ); break; + case 4: (*gCCPriv->API->Color4iv)( (GLint*) p ); break; + } + break; + case GL_UNSIGNED_INT: + switch (gCCPriv->Array.ColorSize) { + case 3: (*gCCPriv->API->Color3uiv)( (GLuint*) p ); break; + case 4: (*gCCPriv->API->Color4uiv)( (GLuint*) p ); break; + } + break; + case GL_FLOAT: + switch (gCCPriv->Array.ColorSize) { + case 3: (*gCCPriv->API->Color3fv)( (GLfloat*) p ); break; + case 4: (*gCCPriv->API->Color4fv)( (GLfloat*) p ); break; + } + break; + case GL_DOUBLE: + switch (gCCPriv->Array.ColorSize) { + case 3: (*gCCPriv->API->Color3dv)( (GLdouble*) p ); break; + case 4: (*gCCPriv->API->Color4dv)( (GLdouble*) p ); break; + } + break; + default: +#if 0 + gl_problem("Bad color type in gl_save_ArrayElement"); +#endif + return; + } + } + + if (gCCPriv->Array.IndexEnabled) { + GLbyte *p = (GLbyte*) gCCPriv->Array.IndexPtr + i * gCCPriv->Array.IndexStrideB; + switch (gCCPriv->Array.IndexType) { + case GL_SHORT: + (*gCCPriv->API->Indexsv)( (GLshort*) p ); + break; + case GL_INT: + (*gCCPriv->API->Indexiv)( (GLint*) p ); + break; + case GL_FLOAT: + (*gCCPriv->API->Indexfv)( (GLfloat*) p ); + break; + case GL_DOUBLE: + (*gCCPriv->API->Indexdv)( (GLdouble*) p ); + break; + default: +#if 0 + gl_problem("Bad index type in gl_save_ArrayElement"); +#endif + return; + } + } + + if (gCCPriv->Array.EdgeFlagEnabled) { + GLbyte *b = (GLbyte*) gCCPriv->Array.EdgeFlagPtr + i * gCCPriv->Array.EdgeFlagStrideB; + (*gCCPriv->API->EdgeFlagv)( (GLboolean*) b ); + } + + if (gCCPriv->Array.VertexEnabled) { + GLbyte *b = (GLbyte*) gCCPriv->Array.VertexPtr + + i * gCCPriv->Array.VertexStrideB; + switch (gCCPriv->Array.VertexType) { + case GL_SHORT: + switch (gCCPriv->Array.VertexSize) { + case 2: (*gCCPriv->API->Vertex2sv)( (GLshort*) b ); break; + case 3: (*gCCPriv->API->Vertex3sv)( (GLshort*) b ); break; + case 4: (*gCCPriv->API->Vertex4sv)( (GLshort*) b ); break; + } + break; + case GL_INT: + switch (gCCPriv->Array.VertexSize) { + case 2: (*gCCPriv->API->Vertex2iv)( (GLint*) b ); break; + case 3: (*gCCPriv->API->Vertex3iv)( (GLint*) b ); break; + case 4: (*gCCPriv->API->Vertex4iv)( (GLint*) b ); break; + } + break; + case GL_FLOAT: + switch (gCCPriv->Array.VertexSize) { + case 2: (*gCCPriv->API->Vertex2fv)( (GLfloat*) b ); break; + case 3: (*gCCPriv->API->Vertex3fv)( (GLfloat*) b ); break; + case 4: (*gCCPriv->API->Vertex4fv)( (GLfloat*) b ); break; + } + break; + case GL_DOUBLE: + switch (gCCPriv->Array.VertexSize) { + case 2: (*gCCPriv->API->Vertex2dv)( (GLdouble*) b ); break; + case 3: (*gCCPriv->API->Vertex3dv)( (GLdouble*) b ); break; + case 4: (*gCCPriv->API->Vertex4dv)( (GLdouble*) b ); break; + } + break; + default: +#if 0 + gl_problem("Bad vertex type in gl_save_ArrayElement"); +#endif + return; + } + } +} + + +void gl_save_Begin( GLenum mode ) +{ + Node *n = alloc_instruction( OPCODE_BEGIN, 1 ); + if (n) { + n[1].e = mode; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Begin( mode ); + } +} + + +void gl_save_BindTexture( GLenum target, GLuint texture ) +{ + Node *n = alloc_instruction( OPCODE_BIND_TEXTURE, 2 ); + if (n) { + n[1].e = target; + n[2].ui = texture; + } + if (gCCPriv->ExecuteFlag) { + _gamma_BindTexture( target, texture ); + } +} + + +void gl_save_Bitmap( + GLsizei width, GLsizei height, + GLfloat xorig, GLfloat yorig, + GLfloat xmove, GLfloat ymove, + const GLubyte *bitmap ) +{ + GLvoid *image = _mesa_unpack_bitmap(width, height, bitmap, &gCCPriv->Unpack); + Node *n = alloc_instruction( OPCODE_BITMAP, 7 ); + if (n) { + n[1].i = (GLint) width; + n[2].i = (GLint) height; + n[3].f = xorig; + n[4].f = yorig; + n[5].f = xmove; + n[6].f = ymove; + n[7].data = image; + } else + if (image) { + free(image); + } + if (gCCPriv->ExecuteFlag) { + _gamma_Bitmap( width, height, + xorig, yorig, xmove, ymove, bitmap ); + } +} + + +void gl_save_BlendFunc( GLenum sfactor, GLenum dfactor ) +{ + Node *n = alloc_instruction( OPCODE_BLEND_FUNC, 2 ); + if (n) { + n[1].e = sfactor; + n[2].e = dfactor; + } + if (gCCPriv->ExecuteFlag) { + _gamma_BlendFunc( sfactor, dfactor ); + } +} + +void gl_save_CallList( GLuint list ) +{ + Node *n = alloc_instruction( OPCODE_CALL_LIST, 1 ); + if (n) { + n[1].ui = list; + } + if (gCCPriv->ExecuteFlag) { + _gamma_CallList( list ); + } +} + + +void gl_save_CallLists( + GLsizei n, GLenum type, const GLvoid *lists ) +{ + GLint i; + + for (i=0;iExecuteFlag) { + _gamma_CallLists( n, type, lists ); + } +} + + +void gl_save_Clear( GLbitfield mask ) +{ + Node *n = alloc_instruction( OPCODE_CLEAR, 1 ); + if (n) { + n[1].bf = mask; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Clear( mask ); + } +} + + +void gl_save_ClearAccum( GLfloat red, GLfloat green, + GLfloat blue, GLfloat alpha ) +{ + Node *n = alloc_instruction( OPCODE_CLEAR_ACCUM, 4 ); + if (n) { + n[1].f = red; + n[2].f = green; + n[3].f = blue; + n[4].f = alpha; + } + if (gCCPriv->ExecuteFlag) { + _gamma_ClearAccum( red, green, blue, alpha ); + } +} + + +void gl_save_ClearColor( GLclampf red, GLclampf green, + GLclampf blue, GLclampf alpha ) +{ + Node *n = alloc_instruction( OPCODE_CLEAR_COLOR, 4 ); + if (n) { + n[1].f = red; + n[2].f = green; + n[3].f = blue; + n[4].f = alpha; + } + if (gCCPriv->ExecuteFlag) { + _gamma_ClearColor( red, green, blue, alpha ); + } +} + + +void gl_save_ClearDepth( GLclampd depth ) +{ + Node *n = alloc_instruction( OPCODE_CLEAR_DEPTH, 1 ); + if (n) { + n[1].f = (GLfloat) depth; + } + if (gCCPriv->ExecuteFlag) { + _gamma_ClearDepth( depth ); + } +} + + +void gl_save_ClearIndex( GLfloat c ) +{ + Node *n = alloc_instruction( OPCODE_CLEAR_INDEX, 1 ); + if (n) { + n[1].f = c; + } + if (gCCPriv->ExecuteFlag) { + _gamma_ClearIndex( c ); + } +} + + +void gl_save_ClearStencil( GLint s ) +{ + Node *n = alloc_instruction( OPCODE_CLEAR_STENCIL, 1 ); + if (n) { + n[1].i = s; + } + if (gCCPriv->ExecuteFlag) { + _gamma_ClearStencil( s ); + } +} + + +void gl_save_ClipPlane( GLenum plane, const GLdouble *equ ) +{ + Node *n = alloc_instruction( OPCODE_CLIP_PLANE, 5 ); + if (n) { + n[1].e = plane; + n[2].f = equ[0]; + n[3].f = equ[1]; + n[4].f = equ[2]; + n[5].f = equ[3]; + } + if (gCCPriv->ExecuteFlag) { + _gamma_ClipPlane( plane, equ ); + } +} + + +void gl_save_Color3f( GLfloat r, GLfloat g, GLfloat b ) +{ + Node *n = alloc_instruction( OPCODE_COLOR_3F, 3 ); + if (n) { + n[1].f = r; + n[2].f = g; + n[3].f = b; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Color3f( r, g, b ); + } +} + + +void gl_save_Color3fv( const GLfloat *c ) +{ + Node *n = alloc_instruction( OPCODE_COLOR_3F, 3 ); + if (n) { + n[1].f = c[0]; + n[2].f = c[1]; + n[3].f = c[2]; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Color3fv( c ); + } +} + + +void gl_save_Color4f( GLfloat r, GLfloat g, + GLfloat b, GLfloat a ) +{ + Node *n = alloc_instruction( OPCODE_COLOR_4F, 4 ); + if (n) { + n[1].f = r; + n[2].f = g; + n[3].f = b; + n[4].f = a; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Color4f( r, g, b, a ); + } +} + + +void gl_save_Color4fv( const GLfloat *c ) +{ + Node *n = alloc_instruction( OPCODE_COLOR_4F, 4 ); + if (n) { + n[1].f = c[0]; + n[2].f = c[1]; + n[3].f = c[2]; + n[4].f = c[3]; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Color4fv( c ); + } +} + + +void gl_save_Color4ub( GLubyte r, GLubyte g, + GLubyte b, GLubyte a ) +{ + Node *n = alloc_instruction( OPCODE_COLOR_4UB, 4 ); + if (n) { + n[1].ub = r; + n[2].ub = g; + n[3].ub = b; + n[4].ub = a; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Color4ub( r, g, b, a ); + } +} + + +void gl_save_Color4ubv( const GLubyte *c ) +{ + Node *n = alloc_instruction( OPCODE_COLOR_4UB, 4 ); + if (n) { + n[1].ub = c[0]; + n[2].ub = c[1]; + n[3].ub = c[2]; + n[4].ub = c[3]; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Color4ubv( c ); + } +} + + +void gl_save_ColorMask( GLboolean red, GLboolean green, + GLboolean blue, GLboolean alpha ) +{ + Node *n = alloc_instruction( OPCODE_COLOR_MASK, 4 ); + if (n) { + n[1].b = red; + n[2].b = green; + n[3].b = blue; + n[4].b = alpha; + } + if (gCCPriv->ExecuteFlag) { + _gamma_ColorMask( red, green, blue, alpha ); + } +} + + +void gl_save_ColorMaterial( GLenum face, GLenum mode ) +{ + Node *n = alloc_instruction( OPCODE_COLOR_MATERIAL, 2 ); + if (n) { + n[1].e = face; + n[2].e = mode; + } + if (gCCPriv->ExecuteFlag) { + _gamma_ColorMaterial( face, mode ); + } +} + + +void gl_save_CopyPixels( GLint x, GLint y, + GLsizei width, GLsizei height, GLenum type ) +{ + Node *n = alloc_instruction( OPCODE_COPY_PIXELS, 5 ); + if (n) { + n[1].i = x; + n[2].i = y; + n[3].i = (GLint) width; + n[4].i = (GLint) height; + n[5].e = type; + } + if (gCCPriv->ExecuteFlag) { + _gamma_CopyPixels( x, y, width, height, type ); + } +} + + + +void gl_save_CopyTexImage1D( + GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, GLsizei width, + GLint border ) +{ + Node *n = alloc_instruction( OPCODE_COPY_TEX_IMAGE1D, 7 ); + if (n) { + n[1].e = target; + n[2].i = level; + n[3].e = internalformat; + n[4].i = x; + n[5].i = y; + n[6].i = width; + n[7].i = border; + } + if (gCCPriv->ExecuteFlag) { + _gamma_CopyTexImage1D( target, level, internalformat, + x, y, width, border ); + } +} + + +void gl_save_CopyTexImage2D( + GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, GLsizei width, + GLsizei height, GLint border ) +{ + Node *n = alloc_instruction( OPCODE_COPY_TEX_IMAGE2D, 8 ); + if (n) { + n[1].e = target; + n[2].i = level; + n[3].e = internalformat; + n[4].i = x; + n[5].i = y; + n[6].i = width; + n[7].i = height; + n[8].i = border; + } + if (gCCPriv->ExecuteFlag) { + _gamma_CopyTexImage2D( target, level, internalformat, + x, y, width, height, border ); + } +} + + + +void gl_save_CopyTexSubImage1D( + GLenum target, GLint level, + GLint xoffset, GLint x, GLint y, + GLsizei width ) +{ + Node *n = alloc_instruction( OPCODE_COPY_TEX_SUB_IMAGE1D, 6 ); + if (n) { + n[1].e = target; + n[2].i = level; + n[3].i = xoffset; + n[4].i = x; + n[5].i = y; + n[6].i = width; + } + if (gCCPriv->ExecuteFlag) { + _gamma_CopyTexSubImage1D( target, level, xoffset, x, y, width ); + } +} + + +void gl_save_CopyTexSubImage2D( + GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint x, GLint y, + GLsizei width, GLint height ) +{ + Node *n = alloc_instruction( OPCODE_COPY_TEX_SUB_IMAGE2D, 8 ); + if (n) { + n[1].e = target; + n[2].i = level; + n[3].i = xoffset; + n[4].i = yoffset; + n[5].i = x; + n[6].i = y; + n[7].i = width; + n[8].i = height; + } + if (gCCPriv->ExecuteFlag) { + _gamma_CopyTexSubImage2D( target, level, xoffset, yoffset, + x, y, width, height ); + } +} + + +void gl_save_CullFace( GLenum mode ) +{ + Node *n = alloc_instruction( OPCODE_CULL_FACE, 1 ); + if (n) { + n[1].e = mode; + } + if (gCCPriv->ExecuteFlag) { + _gamma_CullFace( mode ); + } +} + + +void gl_save_DepthFunc( GLenum func ) +{ + Node *n = alloc_instruction( OPCODE_DEPTH_FUNC, 1 ); + if (n) { + n[1].e = func; + } + if (gCCPriv->ExecuteFlag) { + _gamma_DepthFunc( func ); + } +} + + +void gl_save_DepthMask( GLboolean mask ) +{ + Node *n = alloc_instruction( OPCODE_DEPTH_MASK, 1 ); + if (n) { + n[1].b = mask; + } + if (gCCPriv->ExecuteFlag) { + _gamma_DepthMask( mask ); + } +} + + +void gl_save_DepthRange( GLclampd nearval, GLclampd farval ) +{ + Node *n = alloc_instruction( OPCODE_DEPTH_RANGE, 2 ); + if (n) { + n[1].f = (GLfloat) nearval; + n[2].f = (GLfloat) farval; + } + if (gCCPriv->ExecuteFlag) { + _gamma_DepthRange( nearval, farval ); + } +} + + +void gl_save_Disable( GLenum cap ) +{ + Node *n = alloc_instruction( OPCODE_DISABLE, 1 ); + if (n) { + n[1].e = cap; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Disable( cap ); + } +} + +void gl_save_DrawArrays( + GLenum mode, GLint first, GLsizei count ) +{ + GLint i; + +#if 0 + if (INSIDE_BEGIN_END(ctx)) { + gamma_error( GL_INVALID_OPERATION, "glDrawArrays" ); + return; + } +#endif + if (count<0) { + gamma_error( GL_INVALID_VALUE, "glDrawArrays(count)" ); + return; + } + switch (mode) { + case GL_POINTS: + case GL_LINES: + case GL_LINE_STRIP: + case GL_LINE_LOOP: + case GL_TRIANGLES: + case GL_TRIANGLE_STRIP: + case GL_TRIANGLE_FAN: + case GL_QUADS: + case GL_QUAD_STRIP: + case GL_POLYGON: + /* OK */ + break; + default: + gamma_error( GL_INVALID_ENUM, "glDrawArrays(mode)" ); + return; + } + + /* Note: this will do compile AND execute if needed */ + gl_save_Begin( mode ); + for (i=0;iExecuteFlag) { + _gamma_DrawBuffer( mode ); + } +} + + +void gl_save_DrawElements( + GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices ) +{ + switch (type) { + case GL_UNSIGNED_BYTE: + { + GLubyte *ub_indices = (GLubyte *) indices; + GLint i; + gl_save_Begin( mode ); + for (i=0;iUnpack); + Node *n = alloc_instruction( OPCODE_DRAW_PIXELS, 5 ); + if (n) { + n[1].i = width; + n[2].i = height; + n[3].e = format; + n[4].e = type; + n[5].data = image; + } else + if (image) { + free(image); + } + if (gCCPriv->ExecuteFlag) { + _gamma_DrawPixels( width, height, format, type, pixels ); + } +} + + +void gl_save_EdgeFlag( GLboolean flag ) +{ + Node *n = alloc_instruction( OPCODE_EDGE_FLAG, 1 ); + if (n) { + n[1].b = flag; + } + if (gCCPriv->ExecuteFlag) { + _gamma_EdgeFlag( flag ); + } +} + + +void gl_save_Enable( GLenum cap ) +{ + Node *n = alloc_instruction( OPCODE_ENABLE, 1 ); + if (n) { + n[1].e = cap; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Enable( cap ); + } +} + + +void gl_save_End( void ) +{ + (void) alloc_instruction( OPCODE_END, 0 ); + if (gCCPriv->ExecuteFlag) { + _gamma_End( ); + } +} + + +void gl_save_EvalCoord1f( GLfloat u ) +{ + Node *n = alloc_instruction( OPCODE_EVALCOORD1, 1 ); + if (n) { + n[1].f = u; + } + if (gCCPriv->ExecuteFlag) { + _gamma_EvalCoord1f( u ); + } +} + + +void gl_save_EvalCoord2f( GLfloat u, GLfloat v ) +{ + Node *n = alloc_instruction( OPCODE_EVALCOORD2, 2 ); + if (n) { + n[1].f = u; + n[2].f = v; + } + if (gCCPriv->ExecuteFlag) { + _gamma_EvalCoord2f( u, v ); + } +} + + +void gl_save_EvalMesh1( + GLenum mode, GLint i1, GLint i2 ) +{ + Node *n = alloc_instruction( OPCODE_EVALMESH1, 3 ); + if (n) { + n[1].e = mode; + n[2].i = i1; + n[3].i = i2; + } + if (gCCPriv->ExecuteFlag) { + _gamma_EvalMesh1( mode, i1, i2 ); + } +} + + +void gl_save_EvalMesh2( + GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ) +{ + Node *n = alloc_instruction( OPCODE_EVALMESH2, 5 ); + if (n) { + n[1].e = mode; + n[2].i = i1; + n[3].i = i2; + n[4].i = j1; + n[5].i = j2; + } + if (gCCPriv->ExecuteFlag) { + _gamma_EvalMesh2( mode, i1, i2, j1, j2 ); + } +} + + +void gl_save_EvalPoint1( GLint i ) +{ + Node *n = alloc_instruction( OPCODE_EVALPOINT1, 1 ); + if (n) { + n[1].i = i; + } + if (gCCPriv->ExecuteFlag) { + _gamma_EvalPoint1( i ); + } +} + + +void gl_save_EvalPoint2( GLint i, GLint j ) +{ + Node *n = alloc_instruction( OPCODE_EVALPOINT2, 2 ); + if (n) { + n[1].i = i; + n[2].i = j; + } + if (gCCPriv->ExecuteFlag) { + _gamma_EvalPoint2( i, j ); + } +} + + +void gl_save_Fogfv( GLenum pname, const GLfloat *params ) +{ + Node *n = alloc_instruction( OPCODE_FOG, 5 ); + if (n) { + n[1].e = pname; + n[2].f = params[0]; + n[3].f = params[1]; + n[4].f = params[2]; + n[5].f = params[3]; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Fogfv( pname, params ); + } +} + + +void gl_save_FrontFace( GLenum mode ) +{ + Node *n = alloc_instruction( OPCODE_FRONT_FACE, 1 ); + if (n) { + n[1].e = mode; + } + if (gCCPriv->ExecuteFlag) { + _gamma_FrontFace( mode ); + } +} + + +void gl_save_Frustum( GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, + GLdouble nearval, GLdouble farval ) +{ + Node *n = alloc_instruction( OPCODE_FRUSTUM, 6 ); + if (n) { + n[1].f = left; + n[2].f = right; + n[3].f = bottom; + n[4].f = top; + n[5].f = nearval; + n[6].f = farval; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Frustum( left, right, bottom, top, nearval, farval ); + } +} + + +void gl_save_Hint( GLenum target, GLenum mode ) +{ + Node *n = alloc_instruction( OPCODE_HINT, 2 ); + if (n) { + n[1].e = target; + n[2].e = mode; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Hint( target, mode ); + } +} + + +void gl_save_Indexi( GLint index ) +{ + Node *n = alloc_instruction( OPCODE_INDEX, 1 ); + if (n) { + n[1].i = index; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Indexi( index ); + } +} + + +void gl_save_Indexf( GLfloat index ) +{ + Node *n = alloc_instruction( OPCODE_INDEX, 1 ); + if (n) { + n[1].i = (GLint) index; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Indexf( index ); + } +} + + +void gl_save_IndexMask( GLuint mask ) +{ + Node *n = alloc_instruction( OPCODE_INDEX_MASK, 1 ); + if (n) { + n[1].ui = mask; + } + if (gCCPriv->ExecuteFlag) { + _gamma_IndexMask( mask ); + } +} + + +void gl_save_InitNames( void ) +{ + (void) alloc_instruction( OPCODE_INIT_NAMES, 0 ); + if (gCCPriv->ExecuteFlag) { + _gamma_InitNames( ); + } +} + + +void gl_save_Lightfv( GLenum light, GLenum pname, + const GLfloat *params ) +{ + Node *n = alloc_instruction( OPCODE_LIGHT, 6 ); + if (OPCODE_LIGHT) { + GLint i, nParams; + n[1].e = light; + n[2].e = pname; + switch (pname) { + case GL_AMBIENT: + nParams = 4; + break; + case GL_DIFFUSE: + nParams = 4; + break; + case GL_SPECULAR: + nParams = 4; + break; + case GL_POSITION: + nParams = 4; + break; + case GL_SPOT_DIRECTION: + nParams = 3; + break; + case GL_SPOT_EXPONENT: + nParams = 1; + break; + case GL_SPOT_CUTOFF: + nParams = 1; + break; + case GL_CONSTANT_ATTENUATION: + nParams = 1; + break; + case GL_LINEAR_ATTENUATION: + nParams = 1; + break; + case GL_QUADRATIC_ATTENUATION: + nParams = 1; + break; + default: + nParams = 0; + } + for (i = 0; i < nParams; i++) { + n[3+i].f = params[i]; + } + } + if (gCCPriv->ExecuteFlag) { + _gamma_Lightfv( light, pname, params ); + } +} + + +void gl_save_LightModelfv( + GLenum pname, const GLfloat *params ) +{ + Node *n = alloc_instruction( OPCODE_LIGHT_MODEL, 5 ); + if (n) { + n[1].e = pname; + n[2].f = params[0]; + n[3].f = params[1]; + n[4].f = params[2]; + n[5].f = params[3]; + } + if (gCCPriv->ExecuteFlag) { + _gamma_LightModelfv( pname, params ); + } +} + + +void gl_save_LineStipple( GLint factor, GLushort pattern ) +{ + Node *n = alloc_instruction( OPCODE_LINE_STIPPLE, 2 ); + if (n) { + n[1].i = factor; + n[2].us = pattern; + } + if (gCCPriv->ExecuteFlag) { + _gamma_LineStipple( factor, pattern ); + } +} + + +void gl_save_LineWidth( GLfloat width ) +{ + Node *n = alloc_instruction( OPCODE_LINE_WIDTH, 1 ); + if (n) { + n[1].f = width; + } + if (gCCPriv->ExecuteFlag) { + _gamma_LineWidth( width ); + } +} + + +void gl_save_ListBase( GLuint base ) +{ + Node *n = alloc_instruction( OPCODE_LIST_BASE, 1 ); + if (n) { + n[1].ui = base; + } + if (gCCPriv->ExecuteFlag) { + _gamma_ListBase( base ); + } +} + + +void gl_save_LoadIdentity( void ) +{ + (void) alloc_instruction( OPCODE_LOAD_IDENTITY, 0 ); + if (gCCPriv->ExecuteFlag) { + _gamma_LoadIdentity( ); + } +} + + +void gl_save_LoadMatrixf( const GLfloat *m ) +{ + Node *n = alloc_instruction( OPCODE_LOAD_MATRIX, 16 ); + if (n) { + GLuint i; + for (i=0;i<16;i++) { + n[1+i].f = m[i]; + } + } + if (gCCPriv->ExecuteFlag) { + _gamma_LoadMatrixf( m ); + } +} + + +void gl_save_LoadName( GLuint name ) +{ + Node *n = alloc_instruction( OPCODE_LOAD_NAME, 1 ); + if (n) { + n[1].ui = name; + } + if (gCCPriv->ExecuteFlag) { + _gamma_LoadName( name ); + } +} + + +void gl_save_LogicOp( GLenum opcode ) +{ + Node *n = alloc_instruction( OPCODE_LOGIC_OP, 1 ); + if (n) { + n[1].e = opcode; + } + if (gCCPriv->ExecuteFlag) { + _gamma_LogicOp( opcode ); + } +} + + +void gl_save_Map1f( + GLenum target, GLfloat u1, GLfloat u2, GLint stride, + GLint order, const GLfloat *points ) +{ + Node *n = alloc_instruction( OPCODE_MAP1, 6 ); + if (n) { + GLfloat *pnts = gl_copy_map_points1f( target, stride, order, points ); + n[1].e = target; + n[2].f = u1; + n[3].f = u2; + n[4].i = _mesa_evaluator_components(target); /* stride */ + n[5].i = order; + n[6].data = (void *) pnts; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Map1f( target, u1, u2, stride, order, points ); + } +} + + +void gl_save_Map2f( GLenum target, + GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, + GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, + const GLfloat *points ) +{ + Node *n = alloc_instruction( OPCODE_MAP2, 10 ); + if (n) { + GLfloat *pnts = gl_copy_map_points2f( target, ustride, uorder, + vstride, vorder, points ); + n[1].e = target; + n[2].f = u1; + n[3].f = u2; + n[4].f = v1; + n[5].f = v2; + /* XXX verify these strides are correct */ + n[6].i = _mesa_evaluator_components(target) * vorder; /*ustride*/ + n[7].i = _mesa_evaluator_components(target); /*vstride*/ + n[8].i = uorder; + n[9].i = vorder; + n[10].data = (void *) pnts; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Map2f( target, + u1, u2, ustride, uorder, + v1, v2, vstride, vorder, points ); + } +} + + +void gl_save_MapGrid1f( GLint un, GLfloat u1, GLfloat u2 ) +{ + Node *n = alloc_instruction( OPCODE_MAPGRID1, 3 ); + if (n) { + n[1].i = un; + n[2].f = u1; + n[3].f = u2; + } + if (gCCPriv->ExecuteFlag) { + _gamma_MapGrid1f( un, u1, u2 ); + } +} + + +void gl_save_MapGrid2f( + GLint un, GLfloat u1, GLfloat u2, + GLint vn, GLfloat v1, GLfloat v2 ) +{ + Node *n = alloc_instruction( OPCODE_MAPGRID2, 6 ); + if (n) { + n[1].i = un; + n[2].f = u1; + n[3].f = u2; + n[4].i = vn; + n[5].f = v1; + n[6].f = v2; + } + if (gCCPriv->ExecuteFlag) { + _gamma_MapGrid2f( un, u1, u2, vn, v1, v2 ); + } +} + + +void gl_save_Materialfv( + GLenum face, GLenum pname, const GLfloat *params ) +{ + Node *n = alloc_instruction( OPCODE_MATERIAL, 6 ); + if (n) { + n[1].e = face; + n[2].e = pname; + n[3].f = params[0]; + n[4].f = params[1]; + n[5].f = params[2]; + n[6].f = params[3]; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Materialfv( face, pname, params ); + } +} + + +void gl_save_MatrixMode( GLenum mode ) +{ + Node *n = alloc_instruction( OPCODE_MATRIX_MODE, 1 ); + if (n) { + n[1].e = mode; + } + if (gCCPriv->ExecuteFlag) { + _gamma_MatrixMode( mode ); + } +} + + +void gl_save_MultMatrixf( const GLfloat *m ) +{ + Node *n = alloc_instruction( OPCODE_MULT_MATRIX, 16 ); + if (n) { + GLuint i; + for (i=0;i<16;i++) { + n[1+i].f = m[i]; + } + } + if (gCCPriv->ExecuteFlag) { + _gamma_MultMatrixf( m ); + } +} + + +void gl_save_NewList( GLuint list, GLenum mode ) +{ + /* It's an error to call this function while building a display list */ + gamma_error( GL_INVALID_OPERATION, "glNewList" ); + (void) list; + (void) mode; +} + + +void gl_save_Normal3fv( const GLfloat norm[3] ) +{ + Node *n = alloc_instruction( OPCODE_NORMAL, 3 ); + if (n) { + n[1].f = norm[0]; + n[2].f = norm[1]; + n[3].f = norm[2]; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Normal3fv( norm ); + } +} + + +void gl_save_Normal3f( GLfloat nx, GLfloat ny, GLfloat nz ) +{ + Node *n = alloc_instruction( OPCODE_NORMAL, 3 ); + if (n) { + n[1].f = nx; + n[2].f = ny; + n[3].f = nz; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Normal3f( nx, ny, nz ); + } +} + + +void gl_save_Ortho( GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, + GLdouble nearval, GLdouble farval ) +{ + Node *n = alloc_instruction( OPCODE_ORTHO, 6 ); + if (n) { + n[1].f = left; + n[2].f = right; + n[3].f = bottom; + n[4].f = top; + n[5].f = nearval; + n[6].f = farval; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Ortho( left, right, bottom, top, nearval, farval ); + } +} + + +void gl_save_PixelMapfv( + GLenum map, GLint mapsize, const GLfloat *values ) +{ + Node *n = alloc_instruction( OPCODE_PIXEL_MAP, 3 ); + if (n) { + n[1].e = map; + n[2].i = mapsize; + n[3].data = (void *) malloc( mapsize * sizeof(GLfloat) ); + MEMCPY( n[3].data, (void *) values, mapsize * sizeof(GLfloat) ); + } + if (gCCPriv->ExecuteFlag) { + _gamma_PixelMapfv( map, mapsize, values ); + } +} + + +void gl_save_PixelTransferf( GLenum pname, GLfloat param ) +{ + Node *n = alloc_instruction( OPCODE_PIXEL_TRANSFER, 2 ); + if (n) { + n[1].e = pname; + n[2].f = param; + } + if (gCCPriv->ExecuteFlag) { + _gamma_PixelTransferf( pname, param ); + } +} + + +void gl_save_PixelZoom( GLfloat xfactor, GLfloat yfactor ) +{ + Node *n = alloc_instruction( OPCODE_PIXEL_ZOOM, 2 ); + if (n) { + n[1].f = xfactor; + n[2].f = yfactor; + } + if (gCCPriv->ExecuteFlag) { + _gamma_PixelZoom( xfactor, yfactor ); + } +} + + +void gl_save_PointSize( GLfloat size ) +{ + Node *n = alloc_instruction( OPCODE_POINT_SIZE, 1 ); + if (n) { + n[1].f = size; + } + if (gCCPriv->ExecuteFlag) { + _gamma_PointSize( size ); + } +} + + +void gl_save_PolygonMode( GLenum face, GLenum mode ) +{ + Node *n = alloc_instruction( OPCODE_POLYGON_MODE, 2 ); + if (n) { + n[1].e = face; + n[2].e = mode; + } + if (gCCPriv->ExecuteFlag) { + _gamma_PolygonMode( face, mode ); + } +} + + +/* + * Polygon stipple must have been upacked already! + */ +void gl_save_PolygonStipple( const GLubyte *pattern ) +{ + Node *n = alloc_instruction( OPCODE_POLYGON_STIPPLE, 1 ); + if (n) { + void *data; + n[1].data = malloc( 32 * 4 ); + data = n[1].data; /* This needed for Acorn compiler */ + MEMCPY( data, pattern, 32 * 4 ); + } + if (gCCPriv->ExecuteFlag) { + _gamma_PolygonStipple( pattern ); + } +} + + +void gl_save_PolygonOffset( GLfloat factor, GLfloat units ) +{ + Node *n = alloc_instruction( OPCODE_POLYGON_OFFSET, 2 ); + if (n) { + n[1].f = factor; + n[2].f = units; + } + if (gCCPriv->ExecuteFlag) { + _gamma_PolygonOffset( factor, units ); + } +} + + +void gl_save_PopAttrib( void ) +{ + (void) alloc_instruction( OPCODE_POP_ATTRIB, 0 ); + if (gCCPriv->ExecuteFlag) { + _gamma_PopAttrib( ); + } +} + + +void gl_save_PopMatrix( void ) +{ + (void) alloc_instruction( OPCODE_POP_MATRIX, 0 ); + if (gCCPriv->ExecuteFlag) { + _gamma_PopMatrix( ); + } +} + + +void gl_save_PopName( void ) +{ + (void) alloc_instruction( OPCODE_POP_NAME, 0 ); + if (gCCPriv->ExecuteFlag) { + _gamma_PopName( ); + } +} + + +void gl_save_PrioritizeTextures( + GLsizei num, const GLuint *textures, + const GLclampf *priorities ) +{ + GLint i; + + for (i=0;iExecuteFlag) { + _gamma_PrioritizeTextures( num, textures, priorities ); + } +} + + +void gl_save_PushAttrib( GLbitfield mask ) +{ + Node *n = alloc_instruction( OPCODE_PUSH_ATTRIB, 1 ); + if (n) { + n[1].bf = mask; + } + if (gCCPriv->ExecuteFlag) { + _gamma_PushAttrib( mask ); + } +} + + +void gl_save_PushMatrix( void ) +{ + (void) alloc_instruction( OPCODE_PUSH_MATRIX, 0 ); + if (gCCPriv->ExecuteFlag) { + _gamma_PushMatrix( ); + } +} + + +void gl_save_PushName( GLuint name ) +{ + Node *n = alloc_instruction( OPCODE_PUSH_NAME, 1 ); + if (n) { + n[1].ui = name; + } + if (gCCPriv->ExecuteFlag) { + _gamma_PushName( name ); + } +} + + +void gl_save_RasterPos4f( + GLfloat x, GLfloat y, GLfloat z, GLfloat w ) +{ + Node *n = alloc_instruction( OPCODE_RASTER_POS, 4 ); + if (n) { + n[1].f = x; + n[2].f = y; + n[3].f = z; + n[4].f = w; + } + if (gCCPriv->ExecuteFlag) { + _gamma_RasterPos4f( x, y, z, w ); + } +} + + +void gl_save_PassThrough( GLfloat token ) +{ + Node *n = alloc_instruction( OPCODE_PASSTHROUGH, 1 ); + if (n) { + n[1].f = token; + } + if (gCCPriv->ExecuteFlag) { + _gamma_PassThrough( token ); + } +} + + +void gl_save_ReadBuffer( GLenum mode ) +{ + Node *n = alloc_instruction( OPCODE_READ_BUFFER, 1 ); + if (n) { + n[1].e = mode; + } + if (gCCPriv->ExecuteFlag) { + _gamma_ReadBuffer( mode ); + } +} + + +void gl_save_Rectf( + GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ) +{ + Node *n = alloc_instruction( OPCODE_RECTF, 4 ); + if (n) { + n[1].f = x1; + n[2].f = y1; + n[3].f = x2; + n[4].f = y2; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Rectf( x1, y1, x2, y2 ); + } +} + + +void gl_save_Rotatef( GLfloat angle, + GLfloat x, GLfloat y, GLfloat z ) +{ + GLfloat m[16]; + gl_rotation_matrix( angle, x, y, z, m ); + gl_save_MultMatrixf( m ); /* save and maybe execute */ +} + + +void gl_save_Scalef( GLfloat x, GLfloat y, GLfloat z ) +{ + Node *n = alloc_instruction( OPCODE_SCALE, 3 ); + if (n) { + n[1].f = x; + n[2].f = y; + n[3].f = z; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Scalef( x, y, z ); + } +} + + +void gl_save_Scissor( + GLint x, GLint y, GLsizei width, GLsizei height ) +{ + Node *n = alloc_instruction( OPCODE_SCISSOR, 4 ); + if (n) { + n[1].i = x; + n[2].i = y; + n[3].i = width; + n[4].i = height; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Scissor( x, y, width, height ); + } +} + + +void gl_save_ShadeModel( GLenum mode ) +{ + Node *n = alloc_instruction( OPCODE_SHADE_MODEL, 1 ); + if (n) { + n[1].e = mode; + } + if (gCCPriv->ExecuteFlag) { + _gamma_ShadeModel( mode ); + } +} + + +void gl_save_StencilFunc( GLenum func, GLint ref, GLuint mask ) +{ + Node *n = alloc_instruction( OPCODE_STENCIL_FUNC, 3 ); + if (n) { + n[1].e = func; + n[2].i = ref; + n[3].ui = mask; + } + if (gCCPriv->ExecuteFlag) { + _gamma_StencilFunc( func, ref, mask ); + } +} + + +void gl_save_StencilMask( GLuint mask ) +{ + Node *n = alloc_instruction( OPCODE_STENCIL_MASK, 1 ); + if (n) { + n[1].ui = mask; + } + if (gCCPriv->ExecuteFlag) { + _gamma_StencilMask( mask ); + } +} + + +void gl_save_StencilOp( + GLenum fail, GLenum zfail, GLenum zpass ) +{ + Node *n = alloc_instruction( OPCODE_STENCIL_OP, 3 ); + if (n) { + n[1].e = fail; + n[2].e = zfail; + n[3].e = zpass; + } + if (gCCPriv->ExecuteFlag) { + _gamma_StencilOp( fail, zfail, zpass ); + } +} + + +void gl_save_TexCoord2f( GLfloat s, GLfloat t ) +{ + Node *n = alloc_instruction( OPCODE_TEXCOORD2, 2 ); + if (n) { + n[1].f = s; + n[2].f = t; + } + if (gCCPriv->ExecuteFlag) { + _gamma_TexCoord2f( s, t ); + } +} + +void gl_save_TexCoord2fv( const GLfloat *v ) +{ + Node *n = alloc_instruction( OPCODE_TEXCOORD2, 2 ); + if (n) { + n[1].f = v[0]; + n[2].f = v[1]; + } + if (gCCPriv->ExecuteFlag) { + _gamma_TexCoord2f( n[1].f, n[2].f ); + } +} + +void gl_save_TexCoord3fv( const GLfloat *v ) +{ + Node *n = alloc_instruction( OPCODE_TEXCOORD4, 4 ); + if (n) { + n[1].f = v[0]; + n[2].f = v[1]; + n[1].f = v[2]; + n[2].f = 1.0f; + } + if (gCCPriv->ExecuteFlag) { + _gamma_TexCoord4f( n[1].f, n[2].f, n[3].f, n[4].f ); + } +} + +void gl_save_TexCoord4f( GLfloat s, GLfloat t, + GLfloat r, GLfloat q ) +{ + Node *n = alloc_instruction( OPCODE_TEXCOORD4, 4 ); + if (n) { + n[1].f = s; + n[2].f = t; + n[3].f = r; + n[4].f = q; + } + if (gCCPriv->ExecuteFlag) { + _gamma_TexCoord4f( s, t, r, q ); + } +} + + +void gl_save_TexEnvfv( + GLenum target, GLenum pname, const GLfloat *params ) +{ + Node *n = alloc_instruction( OPCODE_TEXENV, 6 ); + if (n) { + n[1].e = target; + n[2].e = pname; + n[3].f = params[0]; + n[4].f = params[1]; + n[5].f = params[2]; + n[6].f = params[3]; + } + if (gCCPriv->ExecuteFlag) { + _gamma_TexEnvfv( target, pname, params ); + } +} + + +void gl_save_TexGenfv( + GLenum coord, GLenum pname, const GLfloat *params ) +{ + Node *n = alloc_instruction( OPCODE_TEXGEN, 6 ); + if (n) { + n[1].e = coord; + n[2].e = pname; + n[3].f = params[0]; + n[4].f = params[1]; + n[5].f = params[2]; + n[6].f = params[3]; + } + if (gCCPriv->ExecuteFlag) { + _gamma_TexGenfv( coord, pname, params ); + } +} + + +void gl_save_TexParameterfv( GLenum target, + GLenum pname, const GLfloat *params ) +{ + Node *n = alloc_instruction( OPCODE_TEXPARAMETER, 6 ); + if (n) { + n[1].e = target; + n[2].e = pname; + n[3].f = params[0]; + n[4].f = params[1]; + n[5].f = params[2]; + n[6].f = params[3]; + } + if (gCCPriv->ExecuteFlag) { + _gamma_TexParameterfv( target, pname, params ); + } +} + + +void gl_save_TexImage1D( GLenum target, + GLint level, GLint components, + GLsizei width, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels ) +{ + if (target == GL_PROXY_TEXTURE_1D) { + /* don't compile, execute immediately */ + _gamma_TexImage1D( target, level, components, width, + border, format, type, pixels ); + } + else { + GLvoid *image = _mesa_unpack_image(width, 1, 1, format, type, + pixels, &gCCPriv->Unpack); + Node *n; + n = alloc_instruction( OPCODE_TEX_IMAGE1D, 8 ); + if (n) { + n[1].e = target; + n[2].i = level; + n[3].i = components; + n[4].i = (GLint) width; + n[5].i = border; + n[6].e = format; + n[7].e = type; + n[8].data = image; + } + else if (image) { + FREE(image); + } + if (gCCPriv->ExecuteFlag) { + _gamma_TexImage1D( target, level, components, width, + border, format, type, pixels ); + } + } +} + + +void gl_save_TexImage2D( GLenum target, + GLint level, GLint components, + GLsizei width, GLsizei height, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels ) +{ + if (target == GL_PROXY_TEXTURE_2D) { + /* don't compile, execute immediately */ + _gamma_TexImage2D( target, level, components, width, + height, border, format, type, pixels ); + } + else { + GLvoid *image = _mesa_unpack_image(width, height, 1, format, type, + pixels, &gCCPriv->Unpack); + Node *n; + n = alloc_instruction( OPCODE_TEX_IMAGE2D, 9 ); + if (n) { + n[1].e = target; + n[2].i = level; + n[3].i = components; + n[4].i = (GLint) width; + n[5].i = (GLint) height; + n[6].i = border; + n[7].e = format; + n[8].e = type; + n[9].data = image; + } + else if (image) { + FREE(image); + } + if (gCCPriv->ExecuteFlag) { + _gamma_TexImage2D( target, level, components, width, + height, border, format, type, pixels ); + } + } +} + + +void gl_save_TexSubImage1D( + GLenum target, GLint level, GLint xoffset, + GLsizei width, GLenum format, GLenum type, + const GLvoid *pixels ) +{ + GLvoid *image = _mesa_unpack_image(width, 1, 1, format, type, + pixels, &gCCPriv->Unpack); + Node *n = alloc_instruction( OPCODE_TEX_SUB_IMAGE1D, 7 ); + if (n) { + n[1].e = target; + n[2].i = level; + n[3].i = xoffset; + n[4].i = (GLint) width; + n[5].e = format; + n[6].e = type; + n[7].data = image; + } else + if (image) { + free(image); + } + if (gCCPriv->ExecuteFlag) { + _gamma_TexSubImage1D( target, level, xoffset, width, + format, type, image ); + } +} + + +void gl_save_TexSubImage2D( + GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid *pixels ) +{ + GLvoid *image = _mesa_unpack_image(width, height, 1, format, type, + pixels, &gCCPriv->Unpack); + Node *n = alloc_instruction( OPCODE_TEX_SUB_IMAGE2D, 9 ); + if (n) { + n[1].e = target; + n[2].i = level; + n[3].i = xoffset; + n[4].i = yoffset; + n[5].i = (GLint) width; + n[6].i = (GLint) height; + n[7].e = format; + n[8].e = type; + n[9].data = image; + } else + if (image) { + free(image); + } + if (gCCPriv->ExecuteFlag) { + _gamma_TexSubImage2D( target, level, xoffset, yoffset, + width, height, format, type, image ); + } +} + + +void gl_save_Translatef( GLfloat x, GLfloat y, GLfloat z ) +{ + Node *n = alloc_instruction( OPCODE_TRANSLATE, 3 ); + if (n) { + n[1].f = x; + n[2].f = y; + n[3].f = z; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Translatef( x, y, z ); + } +} + + +void gl_save_Vertex2f( GLfloat x, GLfloat y ) +{ + Node *n = alloc_instruction( OPCODE_VERTEX2, 2 ); + if (n) { + n[1].f = x; + n[2].f = y; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Vertex2f( x, y ); + } +} + + +void gl_save_Vertex3f( GLfloat x, GLfloat y, GLfloat z ) +{ + Node *n = alloc_instruction( OPCODE_VERTEX3, 3 ); + + if (n) { + n[1].f = x; + n[2].f = y; + n[3].f = z; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Vertex3f( x, y, z ); + } +} + + +void gl_save_Vertex4f( + GLfloat x, GLfloat y, GLfloat z, GLfloat w ) +{ + Node *n = alloc_instruction( OPCODE_VERTEX4, 4 ); + if (n) { + n[1].f = x; + n[2].f = y; + n[3].f = z; + n[4].f = w; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Vertex4f( x, y, z, w ); + } +} + + +void gl_save_Vertex3fv( const GLfloat v[3] ) +{ + Node *n = alloc_instruction( OPCODE_VERTEX3, 3 ); + if (n) { + n[1].f = v[0]; + n[2].f = v[1]; + n[3].f = v[2]; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Vertex3fv( v ); + } +} + + +void gl_save_Viewport( + GLint x, GLint y, GLsizei width, GLsizei height ) +{ + Node *n = alloc_instruction( OPCODE_VIEWPORT, 4 ); + if (n) { + n[1].i = x; + n[2].i = y; + n[3].i = (GLint) width; + n[4].i = (GLint) height; + } + if (gCCPriv->ExecuteFlag) { + _gamma_Viewport( x, y, width, height ); + } +} + + +/**********************************************************************/ +/* Display list execution */ +/**********************************************************************/ + + +/* + * Execute a display list. Note that the ListBase offset must have already + * been added before calling this function. I.e. the list argument is + * the absolute list number, not relative to ListBase. + * Input: list - display list number + */ +static void execute_list( GLuint list ) +{ + Node *n; + GLboolean done; + OpCode opcode; + + if (!_gamma_IsList(list)) + return; + + gCCPriv->CallDepth++; + + n = (Node *) _mesa_HashLookup(gCCPriv->DisplayList, list); + + done = GL_FALSE; + while (!done) { + opcode = n[0].opcode; + + switch (opcode) { + /* Frequently called functions: */ + case OPCODE_VERTEX2: + _gamma_Vertex2f( n[1].f, n[2].f ); + break; + case OPCODE_VERTEX3: + _gamma_Vertex3f( n[1].f, n[2].f, n[3].f ); + break; + case OPCODE_VERTEX4: + _gamma_Vertex4f( n[1].f, n[2].f, n[3].f, n[4].f ); + break; + case OPCODE_NORMAL: + _gamma_Normal3f( n[1].f, n[2].f, n[3].f ); +#if 0 /* NOT_DONE */ + gCCPriv->VB->MonoNormal = GL_FALSE; +#endif + break; + case OPCODE_COLOR_4UB: + _gamma_Color4ub( n[1].ub, n[2].ub, n[3].ub, n[4].ub ); + break; + case OPCODE_COLOR_3F: + _gamma_Color3f( n[1].f, n[2].f, n[3].f ); + break; + case OPCODE_COLOR_4F: + _gamma_Color4f( n[1].f, n[2].f, n[3].f, n[4].f ); + break; + case OPCODE_INDEX: + gCCPriv->Current.Index = n[1].ui; +#if 0 /* NOT_DONE */ + gCCPriv->VB->MonoColor = GL_FALSE; +#endif + break; + case OPCODE_BEGIN: + _gamma_Begin( n[1].e ); + break; + case OPCODE_END: + _gamma_End( ); + break; + case OPCODE_TEXCOORD2: + _gamma_TexCoord2f( n[1].f, n[2].f ); + break; + case OPCODE_TEXCOORD4: + _gamma_TexCoord4f( n[1].f, n[2].f, n[3].f, n[4].f ); + break; + case OPCODE_ACCUM: + _gamma_Accum( n[1].e, n[2].f ); + break; + case OPCODE_ALPHA_FUNC: + _gamma_AlphaFunc( n[1].e, n[2].f ); + break; + case OPCODE_BIND_TEXTURE: + _gamma_BindTexture( n[1].e, n[2].ui ); + break; + case OPCODE_BITMAP: + { + struct gl_pixelstore_attrib save = gCCPriv->Unpack; + gCCPriv->Unpack = _mesa_native_packing; + _gamma_Bitmap( (GLsizei) n[1].i, (GLsizei) n[2].i, + n[3].f, n[4].f, n[5].f, n[6].f, (const GLubyte *) n[7].data ); + gCCPriv->Unpack = save; /* restore */ + } + break; + case OPCODE_BLEND_FUNC: + _gamma_BlendFunc( n[1].e, n[2].e ); + break; + case OPCODE_CALL_LIST: + /* Generated by glCallList(), don't add ListBase */ + if (gCCPriv->CallDepthCallDepthList.ListBase + n[1].ui ); + } + break; + case OPCODE_CLEAR: + _gamma_Clear( n[1].bf ); + break; + case OPCODE_CLEAR_COLOR: + _gamma_ClearColor( n[1].f, n[2].f, n[3].f, n[4].f ); + break; + case OPCODE_CLEAR_ACCUM: + _gamma_ClearAccum( n[1].f, n[2].f, n[3].f, n[4].f ); + break; + case OPCODE_CLEAR_DEPTH: + _gamma_ClearDepth( (GLclampd) n[1].f ); + break; + case OPCODE_CLEAR_INDEX: + _gamma_ClearIndex( n[1].ui ); + break; + case OPCODE_CLEAR_STENCIL: + _gamma_ClearStencil( n[1].i ); + break; + case OPCODE_CLIP_PLANE: + { + GLdouble equ[4]; + equ[0] = n[2].f; + equ[1] = n[3].f; + equ[2] = n[4].f; + equ[3] = n[5].f; + _gamma_ClipPlane( n[1].e, equ ); + } + break; + case OPCODE_COLOR_MASK: + _gamma_ColorMask( n[1].b, n[2].b, n[3].b, n[4].b ); + break; + case OPCODE_COLOR_MATERIAL: + _gamma_ColorMaterial( n[1].e, n[2].e ); + break; + case OPCODE_COPY_PIXELS: + _gamma_CopyPixels( n[1].i, n[2].i, + (GLsizei) n[3].i, (GLsizei) n[4].i, n[5].e ); + break; + case OPCODE_COPY_TEX_IMAGE1D: + _gamma_CopyTexImage1D( n[1].e, n[2].i, n[3].e, n[4].i, + n[5].i, n[6].i, n[7].i ); + break; + case OPCODE_COPY_TEX_IMAGE2D: + _gamma_CopyTexImage2D( n[1].e, n[2].i, n[3].e, n[4].i, + n[5].i, n[6].i, n[7].i, n[8].i ); + break; + case OPCODE_COPY_TEX_SUB_IMAGE1D: + { + struct gl_pixelstore_attrib save = gCCPriv->Unpack; + gCCPriv->Unpack = _mesa_native_packing; + _gamma_TexSubImage1D( n[1].e, n[2].i, n[3].i, + n[4].i, n[5].e, + n[6].e, n[7].data ); + gCCPriv->Unpack = save; /* restore */ + } + break; + case OPCODE_COPY_TEX_SUB_IMAGE2D: + { + struct gl_pixelstore_attrib save = gCCPriv->Unpack; + gCCPriv->Unpack = _mesa_native_packing; + _gamma_TexSubImage2D( n[1].e, n[2].i, n[3].i, + n[4].i, n[5].e, + n[6].i, n[7].e, n[8].e, n[9].data ); + gCCPriv->Unpack = save; /* restore */ + } + break; + case OPCODE_CULL_FACE: + _gamma_CullFace( n[1].e ); + break; + case OPCODE_DEPTH_FUNC: + _gamma_DepthFunc( n[1].e ); + break; + case OPCODE_DEPTH_MASK: + _gamma_DepthMask( n[1].b ); + break; + case OPCODE_DEPTH_RANGE: + _gamma_DepthRange( (GLclampd) n[1].f, (GLclampd) n[2].f ); + break; + case OPCODE_DISABLE: + _gamma_Disable( n[1].e ); + break; + case OPCODE_DRAW_BUFFER: + _gamma_DrawBuffer( n[1].e ); + break; + case OPCODE_DRAW_PIXELS: + { + struct gl_pixelstore_attrib save = gCCPriv->Unpack; + gCCPriv->Unpack = _mesa_native_packing; + _gamma_DrawPixels( n[1].i, n[2].i, n[3].e, n[4].e, + n[5].data ); + gCCPriv->Unpack = save; /* restore */ + } + break; + case OPCODE_EDGE_FLAG: + gCCPriv->Current.EdgeFlag = n[1].b; + break; + case OPCODE_ENABLE: + _gamma_Enable( n[1].e ); + break; + case OPCODE_EVALCOORD1: + _gamma_EvalCoord1f( n[1].f ); + break; + case OPCODE_EVALCOORD2: + _gamma_EvalCoord2f( n[1].f, n[2].f ); + break; + case OPCODE_EVALMESH1: + _gamma_EvalMesh1( n[1].e, n[2].i, n[3].i ); + break; + case OPCODE_EVALMESH2: + _gamma_EvalMesh2( n[1].e, n[2].i, n[3].i, n[4].i, n[5].i ); + break; + case OPCODE_EVALPOINT1: + _gamma_EvalPoint1( n[1].i ); + break; + case OPCODE_EVALPOINT2: + _gamma_EvalPoint2( n[1].i, n[2].i ); + break; + case OPCODE_FOG: + { + GLfloat p[4]; + p[0] = n[2].f; + p[1] = n[3].f; + p[2] = n[4].f; + p[3] = n[5].f; + _gamma_Fogfv( n[1].e, p ); + } + break; + case OPCODE_FRONT_FACE: + _gamma_FrontFace( n[1].e ); + break; + case OPCODE_FRUSTUM: + _gamma_Frustum( n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f ); + break; + case OPCODE_HINT: + _gamma_Hint( n[1].e, n[2].e ); + break; + case OPCODE_INDEX_MASK: + _gamma_IndexMask( n[1].ui ); + break; + case OPCODE_INIT_NAMES: + _gamma_InitNames( ); + break; + case OPCODE_LIGHT: + { + GLfloat p[4]; + p[0] = n[3].f; + p[1] = n[4].f; + p[2] = n[5].f; + p[3] = n[6].f; + _gamma_Lightfv( n[1].e, n[2].e, p ); + } + break; + case OPCODE_LIGHT_MODEL: + { + GLfloat p[4]; + p[0] = n[2].f; + p[1] = n[3].f; + p[2] = n[4].f; + p[3] = n[5].f; + _gamma_LightModelfv( n[1].e, p ); + } + break; + case OPCODE_LINE_STIPPLE: + _gamma_LineStipple( n[1].i, n[2].us ); + break; + case OPCODE_LINE_WIDTH: + _gamma_LineWidth( n[1].f ); + break; + case OPCODE_LIST_BASE: + _gamma_ListBase( n[1].ui ); + break; + case OPCODE_LOAD_IDENTITY: + _gamma_LoadIdentity( ); + break; + case OPCODE_LOAD_MATRIX: + if (sizeof(Node)==sizeof(GLfloat)) { + _gamma_LoadMatrixf( &n[1].f ); + } + else { + GLfloat m[16]; + GLuint i; + for (i=0;i<16;i++) { + m[i] = n[1+i].f; + } + _gamma_LoadMatrixf( m ); + } + break; + case OPCODE_LOAD_NAME: + _gamma_LoadName( n[1].ui ); + break; + case OPCODE_LOGIC_OP: + _gamma_LogicOp( n[1].e ); + break; + case OPCODE_MAP1: + _gamma_Map1f( n[1].e, n[2].f, n[3].f, + n[4].i, n[5].i, (GLfloat *) n[6].data ); + break; + case OPCODE_MAP2: + _gamma_Map2f( n[1].e, + n[2].f, n[3].f, /* u1, u2 */ + n[6].i, n[8].i, /* ustride, uorder */ + n[4].f, n[5].f, /* v1, v2 */ + n[7].i, n[9].i, /* vstride, vorder */ + (GLfloat *) n[10].data); + break; + case OPCODE_MAPGRID1: + _gamma_MapGrid1f( n[1].i, n[2].f, n[3].f ); + break; + case OPCODE_MAPGRID2: + _gamma_MapGrid2f( n[1].i, n[2].f, n[3].f, n[4].i, n[5].f, n[6].f); + break; + case OPCODE_MATERIAL: + { + GLfloat params[4]; + params[0] = n[3].f; + params[1] = n[4].f; + params[2] = n[5].f; + params[3] = n[6].f; + _gamma_Materialfv( n[1].e, n[2].e, params ); + } + break; + case OPCODE_MATRIX_MODE: + _gamma_MatrixMode( n[1].e ); + break; + case OPCODE_MULT_MATRIX: + if (sizeof(Node)==sizeof(GLfloat)) { + _gamma_MultMatrixf( &n[1].f ); + } + else { + GLfloat m[16]; + GLuint i; + for (i=0;i<16;i++) { + m[i] = n[1+i].f; + } + _gamma_MultMatrixf( m ); + } + break; + case OPCODE_ORTHO: + _gamma_Ortho( n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f ); + break; + case OPCODE_PASSTHROUGH: + _gamma_PassThrough( n[1].f ); + break; + case OPCODE_PIXEL_MAP: + _gamma_PixelMapfv( n[1].e, n[2].i, (GLfloat *) n[3].data ); + break; + case OPCODE_PIXEL_TRANSFER: + _gamma_PixelTransferf( n[1].e, n[2].f ); + break; + case OPCODE_PIXEL_ZOOM: + _gamma_PixelZoom( n[1].f, n[2].f ); + break; + case OPCODE_POINT_SIZE: + _gamma_PointSize( n[1].f ); + break; + case OPCODE_POLYGON_MODE: + _gamma_PolygonMode( n[1].e, n[2].e ); + break; + case OPCODE_POLYGON_STIPPLE: + _gamma_PolygonStipple( (GLubyte *) n[1].data ); + break; + case OPCODE_POLYGON_OFFSET: + _gamma_PolygonOffset( n[1].f, n[2].f ); + break; + case OPCODE_POP_ATTRIB: + _gamma_PopAttrib( ); + break; + case OPCODE_POP_MATRIX: + _gamma_PopMatrix( ); + break; + case OPCODE_POP_NAME: + _gamma_PopName( ); + break; + case OPCODE_PRIORITIZE_TEXTURE: + _gamma_PrioritizeTextures( 1, &n[1].ui, &n[2].f ); + break; + case OPCODE_PUSH_ATTRIB: + _gamma_PushAttrib( n[1].bf ); + break; + case OPCODE_PUSH_MATRIX: + _gamma_PushMatrix( ); + break; + case OPCODE_PUSH_NAME: + _gamma_PushName( n[1].ui ); + break; + case OPCODE_RASTER_POS: + _gamma_RasterPos4f( n[1].f, n[2].f, n[3].f, n[4].f ); + break; + case OPCODE_READ_BUFFER: + _gamma_ReadBuffer( n[1].e ); + break; + case OPCODE_RECTF: + _gamma_Rectf( n[1].f, n[2].f, n[3].f, n[4].f ); + break; + case OPCODE_SCALE: + _gamma_Scalef( n[1].f, n[2].f, n[3].f ); + break; + case OPCODE_SCISSOR: + _gamma_Scissor( n[1].i, n[2].i, n[3].i, n[4].i ); + break; + case OPCODE_SHADE_MODEL: + _gamma_ShadeModel( n[1].e ); + break; + case OPCODE_STENCIL_FUNC: + _gamma_StencilFunc( n[1].e, n[2].i, n[3].ui ); + break; + case OPCODE_STENCIL_MASK: + _gamma_StencilMask( n[1].ui ); + break; + case OPCODE_STENCIL_OP: + _gamma_StencilOp( n[1].e, n[2].e, n[3].e ); + break; + case OPCODE_TEXENV: + { + GLfloat params[4]; + params[0] = n[3].f; + params[1] = n[4].f; + params[2] = n[5].f; + params[3] = n[6].f; + _gamma_TexEnvfv( n[1].e, n[2].e, params ); + } + break; + case OPCODE_TEXGEN: + { + GLfloat params[4]; + params[0] = n[3].f; + params[1] = n[4].f; + params[2] = n[5].f; + params[3] = n[6].f; + _gamma_TexGenfv( n[1].e, n[2].e, params ); + } + break; + case OPCODE_TEXPARAMETER: + { + GLfloat params[4]; + params[0] = n[3].f; + params[1] = n[4].f; + params[2] = n[5].f; + params[3] = n[6].f; + _gamma_TexParameterfv( n[1].e, n[2].e, params ); + } + break; + case OPCODE_TEX_IMAGE1D: + { + struct gl_pixelstore_attrib save = gCCPriv->Unpack; + gCCPriv->Unpack = _mesa_native_packing; + _gamma_TexImage1D( n[1].e, /* target */ + n[2].i, /* level */ + n[3].i, /* components */ + n[4].i, /* width */ + n[5].e, /* border */ + n[6].e, /* format */ + n[7].e, /* type */ + n[8].data ); + gCCPriv->Unpack = save; /* restore */ + } + break; + case OPCODE_TEX_IMAGE2D: + { + struct gl_pixelstore_attrib save = gCCPriv->Unpack; + gCCPriv->Unpack = _mesa_native_packing; + _gamma_TexImage2D( n[1].e, /* target */ + n[2].i, /* level */ + n[3].i, /* components */ + n[4].i, /* width */ + n[5].i, /* height */ + n[6].e, /* border */ + n[7].e, /* format */ + n[8].e, /* type */ + n[9].data ); + gCCPriv->Unpack = save; /* restore */ + } + break; + case OPCODE_TEX_SUB_IMAGE1D: + { + struct gl_pixelstore_attrib save = gCCPriv->Unpack; + gCCPriv->Unpack = _mesa_native_packing; + _gamma_TexSubImage1D( n[1].e, n[2].i, n[3].i, + n[4].i, n[5].e, + n[6].e, n[7].data ); + gCCPriv->Unpack = save; /* restore */ + } + break; + case OPCODE_TEX_SUB_IMAGE2D: + { + struct gl_pixelstore_attrib save = gCCPriv->Unpack; + gCCPriv->Unpack = _mesa_native_packing; + _gamma_TexSubImage2D( n[1].e, n[2].i, n[3].i, + n[4].i, n[5].e, + n[6].i, n[7].e, n[8].e, n[9].data ); + gCCPriv->Unpack = save; /* restore */ + } + break; + case OPCODE_TRANSLATE: + _gamma_Translatef( n[1].f, n[2].f, n[3].f ); + break; + case OPCODE_VIEWPORT: + _gamma_Viewport( n[1].i, n[2].i, (GLsizei) n[3].i, (GLsizei) n[4].i ); + break; + case OPCODE_CONTINUE: + n = (Node *) n[1].next; + break; + case OPCODE_END_OF_LIST: + done = GL_TRUE; + break; + default: + { + char msg[1000]; + sprintf(msg, "Error in execute_list: opcode=%d", (int) opcode); +#if 0 + gl_problem( msg ); +#endif + } + done = GL_TRUE; + } + + /* increment n to point to next compiled command */ + if (opcode!=OPCODE_CONTINUE) { + n += InstSize[opcode]; + } + + } + gCCPriv->CallDepth--; +} + + + +/**********************************************************************/ +/* GL functions */ +/**********************************************************************/ + + + +/* + * Test if a display list number is valid. + */ +GLboolean _gamma_IsList( GLuint list ) +{ + if (list > 0 && _mesa_HashLookup(gCCPriv->DisplayList, list)) { + return GL_TRUE; + } + else { + return GL_FALSE; + } +} + + + +/* + * Delete a sequence of consecutive display lists. + */ +void _gamma_DeleteLists( GLuint list, GLsizei range ) +{ + GLuint i; + +#if 0 + if (INSIDE_BEGIN_END(ctx)) { + gamma_error( GL_INVALID_OPERATION, "glDeleteLists" ); + return; + } +#endif + if (range<0) { + gamma_error( GL_INVALID_VALUE, "glDeleteLists" ); + return; + } + for (i=list;iDisplayList, range); + if (base) { + /* reserve the list IDs by with empty/dummy lists */ + GLint i; + for (i=0; iDisplayList, base+i, make_empty_list()); + } + } + return base; +} + + + +/* + * Begin a new display list. + */ +void _gamma_NewList( GLuint list, GLenum mode ) +{ +#if 0 + if (INSIDE_BEGIN_END(ctx)) { + gamma_error( GL_INVALID_OPERATION, "glNewList" ); + return; + } +#endif + if (list==0) { + gamma_error( GL_INVALID_VALUE, "glNewList" ); + return; + } + if (mode!=GL_COMPILE && mode!=GL_COMPILE_AND_EXECUTE) { + gamma_error( GL_INVALID_ENUM, "glNewList" ); + return; + } + if (gCCPriv->CurrentListPtr) { + /* already compiling a display list */ + gamma_error( GL_INVALID_OPERATION, "glNewList" ); + return; + } + + /* Allocate new display list */ + gCCPriv->CurrentListNum = list; + gCCPriv->CurrentListPtr = gCCPriv->CurrentBlock = (Node *) malloc( sizeof(Node) * BLOCK_SIZE ); + gCCPriv->CurrentPos = 0; + + gCCPriv->CompileFlag = GL_TRUE; + if (mode==GL_COMPILE) { + gCCPriv->ExecuteFlag = GL_FALSE; + } + else { + /* Compile and execute */ + gCCPriv->ExecuteFlag = GL_TRUE; + } + + _glapi_set_dispatch(gCCPriv->Save); + gCCPriv->API = gCCPriv->Save; /* Switch the API function pointers */ +} + + + +/* + * End definition of current display list. + */ +void _gamma_EndList( void ) +{ + /* Check that a list is under construction */ + if (!gCCPriv->CurrentListPtr) { + gamma_error( GL_INVALID_OPERATION, "glEndList" ); + return; + } + + (void) alloc_instruction( OPCODE_END_OF_LIST, 0 ); + + /* Destroy old list, if any */ + gamma_destroy_list(gCCPriv->CurrentListNum); + /* Install the list */ + _mesa_HashInsert(gCCPriv->DisplayList, gCCPriv->CurrentListNum, gCCPriv->CurrentListPtr); + + gCCPriv->CurrentListNum = 0; + gCCPriv->CurrentListPtr = NULL; + gCCPriv->ExecuteFlag = GL_TRUE; + gCCPriv->CompileFlag = GL_FALSE; + + _glapi_set_dispatch(gCCPriv->Exec); + gCCPriv->API = gCCPriv->Exec; /* Switch the API function pointers */ +} + + + +void _gamma_CallList( GLuint list ) +{ + /* VERY IMPORTANT: Save the CompileFlag status, turn it off, */ + /* execute the display list, and restore the CompileFlag. */ + GLboolean save_compile_flag; + save_compile_flag = gCCPriv->CompileFlag; + gCCPriv->CompileFlag = GL_FALSE; + execute_list( list ); + gCCPriv->CompileFlag = save_compile_flag; + + /* also restore API function pointers to point to "save" versions */ + if (save_compile_flag) { + _glapi_set_dispatch(gCCPriv->Save); + gCCPriv->API = gCCPriv->Save; + } +} + + + +/* + * Execute glCallLists: call multiple display lists. + */ +void _gamma_CallLists( + GLsizei n, GLenum type, const GLvoid *lists ) +{ + GLuint list; + GLint i; + GLboolean save_compile_flag; + + /* Save the CompileFlag status, turn it off, execute display list, + * and restore the CompileFlag. + */ + save_compile_flag = gCCPriv->CompileFlag; + gCCPriv->CompileFlag = GL_FALSE; + + for (i=0;iList.ListBase + list ); + } + + gCCPriv->CompileFlag = save_compile_flag; + + /* also restore API function pointers to point to "save" versions */ + if (save_compile_flag) { + _glapi_set_dispatch(gCCPriv->Save); + gCCPriv->API = gCCPriv->Save; + } +} + + + +/* + * Set the offset added to list numbers in glCallLists. + */ +void _gamma_ListBase( GLuint base ) +{ +#if 0 + if (INSIDE_BEGIN_END(ctx)) { + gamma_error( GL_INVALID_OPERATION, "glListBase" ); + return; + } +#endif + gCCPriv->List.ListBase = base; +} Index: xc/lib/GL/mesa/src/drv/gamma/gamma_dlist.h diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_dlist.h:1.3 --- /dev/null Mon Jun 4 12:37:28 2001 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_dlist.h Sun Feb 11 20:11:25 2001 @@ -0,0 +1,381 @@ +/* + * Mesa 3-D graphics library + * Version: 3.0 + * Copyright (C) 1995-1998 Brian Paul + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_dlist.h,v 1.3 2001/02/12 01:11:25 tsi Exp $ */ + + +#ifndef DLIST_H +#define DLIST_H + +#include "types.h" + +extern void gamma_init_lists( void ); + +extern void gamma_destroy_list( GLuint list ); + + + +extern void gl_CallList( GLuint list ); + +extern void gl_CallLists( + GLsizei n, GLenum type, const GLvoid *lists ); + +extern void gl_DeleteLists( GLuint list, GLsizei range ); + +extern void gl_EndList( void ); + +extern GLuint gl_GenLists( GLsizei range ); + +extern GLboolean gl_IsList( GLuint list ); + +extern void gl_ListBase( GLuint base ); + +extern void gl_NewList( GLuint list, GLenum mode ); + +extern void gl_save_Accum( GLenum op, GLfloat value ); + +extern void gl_save_AlphaFunc( GLenum func, GLclampf ref ); + +extern void gl_save_ArrayElement( GLint i ); + +extern void gl_save_BlendFunc( + GLenum sfactor, GLenum dfactor ); + +extern void gl_save_Begin( GLenum mode ); + +extern void gl_save_BindTexture( + GLenum target, GLuint texture ); + +extern void gl_save_Bitmap( GLsizei width, GLsizei height, + GLfloat xorig, GLfloat yorig, + GLfloat xmove, GLfloat ymove, + const GLubyte *bitmap ); + +extern void gl_save_CallList( GLuint list ); + +extern void gl_save_CallLists( + GLsizei n, GLenum type, const GLvoid *lists ); + +extern void gl_save_Clear( GLbitfield mask ); + +extern void gl_save_ClearAccum( GLfloat red, GLfloat green, + GLfloat blue, GLfloat alpha ); + +extern void gl_save_ClearColor( GLclampf red, GLclampf green, + GLclampf blue, GLclampf alpha ); + +extern void gl_save_ClearDepth( GLclampd depth ); + +extern void gl_save_ClearIndex( GLfloat c ); + +extern void gl_save_ClearStencil( GLint s ); + +extern void gl_save_ClipPlane( + GLenum plane, const GLdouble *equ ); + +extern void gl_save_Color3f( GLfloat r, GLfloat g, GLfloat b ); + +extern void gl_save_Color3fv( const GLfloat *c ); + +extern void gl_save_Color4f( GLfloat r, GLfloat g, + GLfloat b, GLfloat a ); + +extern void gl_save_Color4fv( const GLfloat *c ); + +extern void gl_save_Color4ub( GLubyte r, GLubyte g, + GLubyte b, GLubyte a ); + +extern void gl_save_Color4ubv( const GLubyte *c ); + +extern void gl_save_ColorMask( GLboolean red, GLboolean green, + GLboolean blue, GLboolean alpha ); + +extern void gl_save_ColorMaterial( GLenum face, GLenum mode ); + +extern void gl_save_CopyPixels( GLint x, GLint y, + GLsizei width, GLsizei height, GLenum type ); + +extern void gl_save_CopyTexImage1D( + GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, GLsizei width, + GLint border ); + +extern void gl_save_CopyTexImage2D( + GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, GLsizei width, + GLsizei height, GLint border ); + +extern void gl_save_CopyTexSubImage1D( + GLenum target, GLint level, + GLint xoffset, GLint x, GLint y, + GLsizei width ); + +extern void gl_save_CopyTexSubImage2D( + GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint x, GLint y, + GLsizei width, GLint height ); + +extern void gl_save_CullFace( GLenum mode ); + +extern void gl_save_DepthFunc( GLenum func ); + +extern void gl_save_DepthMask( GLboolean mask ); + +extern void gl_save_DepthRange( + GLclampd nearval, GLclampd farval ); + +extern void gl_save_Disable( GLenum cap ); + +extern void gl_save_DrawArrays( + GLenum mode, GLint first, GLsizei count ); + +extern void gl_save_DrawBuffer( GLenum mode ); + +extern void gl_save_DrawElements( + GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices ); + +extern void gl_save_DrawPixels( GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid *pixels ); + +extern void gl_save_EdgeFlag( GLboolean flag ); + +extern void gl_save_Enable( GLenum cap ); + +extern void gl_save_End( void ); + +extern void gl_save_EvalCoord1f( GLfloat u ); + +extern void gl_save_EvalCoord2f( GLfloat u, GLfloat v ); + +extern void gl_save_EvalMesh1( + GLenum mode, GLint i1, GLint i2 ); + +extern void gl_save_EvalMesh2( GLenum mode, GLint i1, GLint i2, + GLint j1, GLint j2 ); + +extern void gl_save_EvalPoint1( GLint i ); + +extern void gl_save_EvalPoint2( GLint i, GLint j ); + +extern void gl_save_Fogfv( + GLenum pname, const GLfloat *params ); + +extern void gl_save_FrontFace( GLenum mode ); + +extern void gl_save_Frustum( GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, + GLdouble nearval, GLdouble farval ); + +extern void gl_save_Hint( GLenum target, GLenum mode ); + +extern void gl_save_Indexf( GLfloat index ); + +extern void gl_save_Indexi( GLint index ); + +extern void gl_save_IndexMask( GLuint mask ); + +extern void gl_save_InitNames( void ); + +extern void gl_save_Lightfv( GLenum light, GLenum pname, + const GLfloat *params ); + +extern void gl_save_LightModelfv( GLenum pname, + const GLfloat *params ); + +extern void gl_save_LineWidth( GLfloat width ); + +extern void gl_save_LineStipple( GLint factor, + GLushort pattern ); + +extern void gl_save_ListBase( GLuint base ); + +extern void gl_save_LoadIdentity( void ); + +extern void gl_save_LoadMatrixf( const GLfloat *m ); + +extern void gl_save_LoadName( GLuint name ); + +extern void gl_save_LogicOp( GLenum opcode ); + +extern void gl_save_Map1f( GLenum target, + GLfloat u1, GLfloat u2, GLint stride, + GLint order, const GLfloat *points); + +extern void gl_save_Map2f( GLenum target, + GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, + GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, + const GLfloat *points); + +extern void gl_save_MapGrid1f( GLint un, + GLfloat u1, GLfloat u2 ); + +extern void gl_save_MapGrid2f( + GLint un, GLfloat u1, GLfloat u2, + GLint vn, GLfloat v1, GLfloat v2 ); + +extern void gl_save_Materialfv( GLenum face, GLenum pname, + const GLfloat *params ); + +extern void gl_save_MatrixMode( GLenum mode ); + +extern void gl_save_MultMatrixf( const GLfloat *m ); + +extern void gl_save_NewList( GLuint list, GLenum mode ); + +extern void gl_save_Normal3fv( const GLfloat n[3] ); + +extern void gl_save_Normal3f( + GLfloat nx, GLfloat ny, GLfloat nz ); + +extern void gl_save_Ortho( GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, + GLdouble nearval, GLdouble farval ); + +extern void gl_save_PassThrough( GLfloat token ); + +extern void gl_save_PixelMapfv( GLenum map, GLint mapsize, + const GLfloat *values ); + +extern void gl_save_PixelTransferf( + GLenum pname, GLfloat param ); + +extern void gl_save_PixelZoom( + GLfloat xfactor, GLfloat yfactor ); + +extern void gl_save_PointParameterfvEXT( GLenum pname, + const GLfloat *params ); + +extern void gl_save_PointSize( GLfloat size ); + +extern void gl_save_PolygonMode( GLenum face, GLenum mode ); + +extern void gl_save_PolygonStipple( const GLubyte *pattern ); + +extern void gl_save_PolygonOffset( + GLfloat factor, GLfloat units ); + +extern void gl_save_PopAttrib( void ); + +extern void gl_save_PopMatrix( void ); + +extern void gl_save_PopName( void ); + +extern void gl_save_PrioritizeTextures( + GLsizei n, const GLuint *textures, + const GLclampf *priorities ); + +extern void gl_save_PushAttrib( GLbitfield mask ); + +extern void gl_save_PushMatrix( void ); + +extern void gl_save_PushName( GLuint name ); + +extern void gl_save_RasterPos4f( + GLfloat x, GLfloat y, GLfloat z, GLfloat w ); + +extern void gl_save_ReadBuffer( GLenum mode ); + +extern void gl_save_Rectf( + GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ); + +extern void gl_save_Rotatef( GLfloat angle, + GLfloat x, GLfloat y, GLfloat z ); + +extern void gl_save_Scalef( GLfloat x, GLfloat y, GLfloat z ); + +extern void gl_save_Scissor( + GLint x, GLint y, GLsizei width, GLsizei height ); + +extern void gl_save_ShadeModel( GLenum mode ); + +extern void gl_save_StencilFunc( + GLenum func, GLint ref, GLuint mask ); + +extern void gl_save_StencilMask( GLuint mask ); + +extern void gl_save_StencilOp( + GLenum fail, GLenum zfail, GLenum zpass ); + +extern void gl_save_TexCoord2f( GLfloat s, GLfloat t ); + +extern void gl_save_TexCoord2fv( const GLfloat *v ); + +extern void gl_save_TexCoord3fv( const GLfloat *v ); + +extern void gl_save_TexCoord4f( GLfloat s, GLfloat t, + GLfloat r, GLfloat q ); + +extern void gl_save_TexEnvfv( GLenum target, GLenum pname, + const GLfloat *params ); + +extern void gl_save_TexParameterfv( GLenum target, + GLenum pname, const GLfloat *params ); + +extern void gl_save_TexGenfv( GLenum coord, GLenum pname, + const GLfloat *params ); + +extern void gl_save_TexImage1D( GLenum target, + GLint level, GLint components, + GLsizei width, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels ); + +extern void gl_save_TexImage2D( GLenum target, + GLint level, GLint components, + GLsizei width, GLsizei height, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels ); + +extern void gl_save_TexSubImage1D( + GLenum target, GLint level, + GLint xoffset, GLsizei width, + GLenum format, GLenum type, + const GLvoid *pixels ); + + +extern void gl_save_TexSubImage2D( + GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid *pixels ); + +extern void gl_save_Translatef( + GLfloat x, GLfloat y, GLfloat z ); + +extern void gl_save_Vertex2f( + GLfloat x, GLfloat y ); + +extern void gl_save_Vertex3f( + GLfloat x, GLfloat y, GLfloat z ); + +extern void gl_save_Vertex4f( + GLfloat x, GLfloat y, GLfloat z, GLfloat w ); + +extern void gl_save_Vertex3fv( const GLfloat *v ); + +extern void gl_save_Viewport( GLint x, GLint y, + GLsizei width, GLsizei height ); + +#endif Index: xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c:1.7 xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c:1.9 --- xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c:1.7 Mon Nov 27 05:59:36 2000 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c Wed Feb 7 08:26:16 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c,v 1.7 2000/11/27 10:59:36 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c,v 1.9 2001/02/07 13:26:16 alanh Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -39,14 +39,89 @@ #include #include "gamma_gl.h" #include "gamma_init.h" +#include "gamma_dlist.h" #include "glint_dri.h" -#ifdef RANDOMIZE_COLORS -#include + +/* Here for now, will change get.c to move them into macros.h later */ + +#define FLOAT_TO_BOOL(X) ( (X)==0.0F ? GL_FALSE : GL_TRUE ) +#define INT_TO_BOOL(I) ( (I)==0 ? GL_FALSE : GL_TRUE ) +#define ENUM_TO_BOOL(E) ( (E)==0 ? GL_FALSE : GL_TRUE ) + +void gamma_error( GLenum error, const char *s ) +{ + GLboolean debug; + +#ifdef DEBUG + debug = GL_TRUE; +#else + if (getenv("MESA_DEBUG")) { + debug = GL_TRUE; + } + else { + debug = GL_FALSE; + } #endif + if (debug) { + char errstr[1000]; + + switch (error) { + case GL_NO_ERROR: + strcpy( errstr, "GL_NO_ERROR" ); + break; + case GL_INVALID_VALUE: + strcpy( errstr, "GL_INVALID_VALUE" ); + break; + case GL_INVALID_ENUM: + strcpy( errstr, "GL_INVALID_ENUM" ); + break; + case GL_INVALID_OPERATION: + strcpy( errstr, "GL_INVALID_OPERATION" ); + break; + case GL_STACK_OVERFLOW: + strcpy( errstr, "GL_STACK_OVERFLOW" ); + break; + case GL_STACK_UNDERFLOW: + strcpy( errstr, "GL_STACK_UNDERFLOW" ); + break; + case GL_OUT_OF_MEMORY: + strcpy( errstr, "GL_OUT_OF_MEMORY" ); + break; + default: + strcpy( errstr, "unknown" ); + break; + } + fprintf( stderr, "Mesa user error: %s in %s\n", errstr, s ); + } + + if (gCCPriv->ErrorValue==GL_NO_ERROR) { + gCCPriv->ErrorValue = error; + } + + /* _gamma_Error( ); use hwLog or something later */ +} + + void _gamma_Accum(GLenum op, GLfloat value) { DEBUG_GLCMDS(("Accum: %d %f\n", (int)op, value)); + + switch (op) { + case GL_ACCUM: + break; + case GL_LOAD: + break; + case GL_ADD: + break; + case GL_MULT: + break; + case GL_RETURN: + break; + default: + gCCPriv->ErrorValue = GL_INVALID_ENUM; + return; + } } void _gamma_AlphaFunc(GLenum func, GLclampf ref) @@ -350,6 +425,7 @@ } } +#if 0 /* Now in dlist.c */ void _gamma_CallList(GLuint list) { DEBUG_GLCMDS(("CallList: %d\n", (unsigned int)list)); @@ -359,6 +435,7 @@ { DEBUG_GLCMDS(("CallLists: %d %04x\n", (int)n, (int)type)); } +#endif void _gamma_Clear(GLbitfield mask) { @@ -445,7 +522,7 @@ temp = (gCCPriv->LBReadMode & LBPartialProdMask) | LBWindowOriginBot; /* UGH - move this later ! */ - if (gDRIPriv->numMXDevices == 2) temp |= LBScanLineInt2; + if (gDRIPriv->numMultiDevices == 2) temp |= LBScanLineInt2; CHECK_DMA_BUFFER(gCC, gCCPriv, 1); WRITE(gCCPriv->buf, LBReadMode, temp); @@ -634,28 +711,16 @@ void _gamma_Color3b(GLbyte red, GLbyte green, GLbyte blue) { - GLfloat r,g,b; - DEBUG_GLCMDS(("Color3b: %d %d %d\n", red, green, blue)); - r = BYTE_TO_FLOAT(red); - g = BYTE_TO_FLOAT(green); - b = BYTE_TO_FLOAT(blue); - - _gamma_Color3f(r,g,b); + _gamma_Color3f((GLfloat)red,(GLfloat)green,(GLfloat)blue); } void _gamma_Color3bv(const GLbyte *v) { - GLfloat p[3]; - DEBUG_GLCMDS(("Color3bv: %d %d %d\n", v[0], v[1], v[2])); - - p[0] = BYTE_TO_FLOAT(v[0]); - p[1] = BYTE_TO_FLOAT(v[1]); - p[2] = BYTE_TO_FLOAT(v[2]); - _gamma_Color3f(p[0],p[1],p[2]); + _gamma_Color3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); } void _gamma_Color3d(GLdouble red, GLdouble green, GLdouble blue) @@ -669,13 +734,18 @@ { DEBUG_GLCMDS(("Color3dv: %f %f %f\n", v[0], v[1], v[2])); - _gamma_Color3fv((GLfloat*)v); + _gamma_Color3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); } void _gamma_Color3f(GLfloat red, GLfloat green, GLfloat blue) { DEBUG_GLCMDS(("Color3f: %f %f %f\n", red, green, blue)); + gCCPriv->Current.Color[0] = red; + gCCPriv->Current.Color[1] = green; + gCCPriv->Current.Color[2] = blue; + gCCPriv->Current.Color[3] = 1.0f; + CHECK_DMA_BUFFER(gCC, gCCPriv, 3); WRITEF(gCCPriv->buf, Cb, blue); WRITEF(gCCPriv->buf, Cg, green); @@ -686,62 +756,35 @@ { DEBUG_GLCMDS(("Color3fv: %f %f %f\n", v[0], v[1], v[2])); - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITEF(gCCPriv->buf, Cb, v[2]); - WRITEF(gCCPriv->buf, Cg, v[1]); - WRITEF(gCCPriv->buf, Cr3, v[0]); + _gamma_Color3f(v[0],v[1],v[2]); } void _gamma_Color3i(GLint red, GLint green, GLint blue) { - GLfloat r,g,b; - DEBUG_GLCMDS(("Color3i: %d %d %d\n", (int)red, (int)green, (int)blue)); - r = INT_TO_FLOAT(red); - g = INT_TO_FLOAT(green); - b = INT_TO_FLOAT(blue); - - _gamma_Color3f(r,g,b); + _gamma_Color3f((GLfloat)red,(GLfloat)green,(GLfloat)blue); } void _gamma_Color3iv(const GLint *v) { - GLfloat p[3]; - DEBUG_GLCMDS(("Color3iv: %d %d %d\n", (int)v[0], (int)v[1], (int)v[2])); - p[0] = INT_TO_FLOAT(v[0]); - p[1] = INT_TO_FLOAT(v[1]); - p[2] = INT_TO_FLOAT(v[2]); - - _gamma_Color3f(p[0],p[1],p[2]); + _gamma_Color3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); } void _gamma_Color3s(GLshort red, GLshort green, GLshort blue) { - GLfloat r,g,b; - DEBUG_GLCMDS(("Color3s: %d %d %d\n", red, green, blue)); - r = SHORT_TO_FLOAT(red); - g = SHORT_TO_FLOAT(green); - b = SHORT_TO_FLOAT(blue); - - _gamma_Color3f(r,g,b); + _gamma_Color3f((GLfloat)red,(GLfloat)green,(GLfloat)blue); } void _gamma_Color3sv(const GLshort *v) { - GLfloat p[3]; - DEBUG_GLCMDS(("Color3sv: %d %d %d\n", v[0], v[1], v[2])); - - p[0] = SHORT_TO_FLOAT(v[0]); - p[1] = SHORT_TO_FLOAT(v[1]); - p[2] = SHORT_TO_FLOAT(v[2]); - _gamma_Color3f(p[0],p[1],p[2]); + _gamma_Color3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); } void _gamma_Color3ub(GLubyte red, GLubyte green, GLubyte blue) @@ -770,56 +813,32 @@ void _gamma_Color3ui(GLuint red, GLuint green, GLuint blue) { - GLfloat r,g,b; - DEBUG_GLCMDS(("Color3ui: %d %d %d\n", (unsigned int)red, (unsigned int)green, (unsigned int)blue)); - r = UINT_TO_FLOAT(red); - g = UINT_TO_FLOAT(green); - b = UINT_TO_FLOAT(blue); - - _gamma_Color3f(r,g,b); + _gamma_Color3f((GLfloat)red,(GLfloat)green,(GLfloat)blue); } void _gamma_Color3uiv(const GLuint *v) { - GLfloat p[3]; - DEBUG_GLCMDS(("Color3uiv: %d %d %d\n", (unsigned int)v[0], (unsigned int)v[1], (unsigned int)v[2])); - p[0] = UINT_TO_FLOAT(v[0]); - p[1] = UINT_TO_FLOAT(v[1]); - p[2] = UINT_TO_FLOAT(v[2]); - - _gamma_Color3f(p[0],p[1],p[2]); + _gamma_Color3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); } void _gamma_Color3us(GLushort red, GLushort green, GLushort blue) { - GLfloat r,g,b; - DEBUG_GLCMDS(("Color3us: %d %d %d\n", red, green, blue)); - r = USHORT_TO_FLOAT(red); - g = USHORT_TO_FLOAT(green); - b = USHORT_TO_FLOAT(blue); - - _gamma_Color3f(r,g,b); + _gamma_Color3f((GLfloat)red,(GLfloat)green,(GLfloat)blue); } void _gamma_Color3usv(const GLushort *v) { - GLfloat p[3]; - DEBUG_GLCMDS(("Color3usv: %d %d %d\n", v[0], v[1], v[2])); - - p[0] = USHORT_TO_FLOAT(v[0]); - p[1] = USHORT_TO_FLOAT(v[1]); - p[2] = USHORT_TO_FLOAT(v[2]); - _gamma_Color3f(p[0],p[1],p[2]); + _gamma_Color3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); } void _gamma_Color4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) @@ -847,7 +866,7 @@ p[2] = BYTE_TO_FLOAT(v[2]); p[3] = BYTE_TO_FLOAT(v[3]); - _gamma_Color4f(p[0],p[1],p[2],p[3]); + _gamma_Color4fv(p); } void _gamma_Color4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha) @@ -861,13 +880,18 @@ { DEBUG_GLCMDS(("Color4dv: %f %f %f %f\n", v[0], v[1], v[2], v[3])); - _gamma_Color4fv((GLfloat*)v); + _gamma_Color4f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2],(GLfloat)v[3]); } void _gamma_Color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { DEBUG_GLCMDS(("Color4f: %f %f %f %f\n", red, green, blue, alpha)); + gCCPriv->Current.Color[0] = red; + gCCPriv->Current.Color[1] = green; + gCCPriv->Current.Color[2] = blue; + gCCPriv->Current.Color[3] = alpha; + CHECK_DMA_BUFFER(gCC, gCCPriv, 4); WRITEF(gCCPriv->buf, Ca, alpha); WRITEF(gCCPriv->buf, Cb, blue); @@ -879,6 +903,11 @@ { DEBUG_GLCMDS(("Color4fv: %f %f %f %f\n", v[0], v[1], v[2], v[3])); + gCCPriv->Current.Color[0] = v[0]; + gCCPriv->Current.Color[1] = v[1]; + gCCPriv->Current.Color[2] = v[2]; + gCCPriv->Current.Color[3] = v[3]; + CHECK_DMA_BUFFER(gCC, gCCPriv, 4); WRITEF(gCCPriv->buf, Ca, v[3]); WRITEF(gCCPriv->buf, Cb, v[2]); @@ -913,7 +942,7 @@ p[2] = INT_TO_FLOAT(v[2]); p[3] = INT_TO_FLOAT(v[3]); - _gamma_Color4f(p[0],p[1],p[2],p[3]); + _gamma_Color4fv(p); } void _gamma_Color4s(GLshort red, GLshort green, GLshort blue, GLshort alpha) @@ -941,7 +970,7 @@ p[2] = SHORT_TO_FLOAT(v[2]); p[3] = SHORT_TO_FLOAT(v[3]); - _gamma_Color4f(p[0],p[1],p[2],p[3]); + _gamma_Color4fv(p); } void _gamma_Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) @@ -997,7 +1026,7 @@ p[2] = UINT_TO_FLOAT(v[2]); p[3] = UINT_TO_FLOAT(v[3]); - _gamma_Color4f(p[0],p[1],p[2],p[3]); + _gamma_Color4fv(p); } void _gamma_Color4us(GLushort red, GLushort green, GLushort blue, GLushort alpha) @@ -1025,7 +1054,7 @@ p[2] = USHORT_TO_FLOAT(v[2]); p[3] = USHORT_TO_FLOAT(v[3]); - _gamma_Color4f(p[0],p[1],p[2],p[3]); + _gamma_Color4fv(p); } void _gamma_ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) @@ -1037,8 +1066,7 @@ { DEBUG_GLCMDS(("ColorMaterial: %04x %04x\n", (int)face, (int)mode)); - gCCPriv->MaterialMode &= ~MaterialModeEnable; - gCCPriv->ColorMaterialMode = ColorMaterialModeDisable; + gCCPriv->ColorMaterialMode &= ~ColorMaterialModeMask; switch (face) { case GL_FRONT: @@ -1070,15 +1098,56 @@ break; } - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); + CHECK_DMA_BUFFER(gCC, gCCPriv, 1); WRITE(gCCPriv->buf, ColorMaterialMode, gCCPriv->ColorMaterialMode); - WRITE(gCCPriv->buf, MaterialMode, gCCPriv->MaterialMode); } void _gamma_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) { DEBUG_GLCMDS(("ColorPointer: %d %04x %d\n", (int)size, (int)type, (int)stride)); + + if (size<3 || size>4) { + gamma_error( GL_INVALID_VALUE, "glColorPointer(size)" ); + return; + } + if (stride<0) { + gamma_error( GL_INVALID_VALUE, "glColorPointer(stride)" ); + return; + } + switch (type) { + case GL_BYTE: + gCCPriv->Array.ColorStrideB = stride ? stride : size*sizeof(GLbyte); + break; + case GL_UNSIGNED_BYTE: + gCCPriv->Array.ColorStrideB = stride ? stride : size*sizeof(GLubyte); + break; + case GL_SHORT: + gCCPriv->Array.ColorStrideB = stride ? stride : size*sizeof(GLshort); + break; + case GL_UNSIGNED_SHORT: + gCCPriv->Array.ColorStrideB = stride ? stride : size*sizeof(GLushort); + break; + case GL_INT: + gCCPriv->Array.ColorStrideB = stride ? stride : size*sizeof(GLint); + break; + case GL_UNSIGNED_INT: + gCCPriv->Array.ColorStrideB = stride ? stride : size*sizeof(GLuint); + break; + case GL_FLOAT: + gCCPriv->Array.ColorStrideB = stride ? stride : size*sizeof(GLfloat); + break; + case GL_DOUBLE: + gCCPriv->Array.ColorStrideB = stride ? stride : size*sizeof(GLdouble); + break; + default: + gamma_error( GL_INVALID_ENUM, "glColorPointer(type)" ); + return; + } + gCCPriv->Array.ColorSize = size; + gCCPriv->Array.ColorType = type; + gCCPriv->Array.ColorStride = stride; + gCCPriv->Array.ColorPtr = (void *) pointer; } void _gamma_CopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) @@ -1140,10 +1209,12 @@ WRITE(gCCPriv->buf, GeometryMode, gCCPriv->GeometryMode); } +#if 0 /* Now in dlist.c */ void _gamma_DeleteLists(GLuint list, GLsizei range) { DEBUG_GLCMDS(("DeleteLists: %d %d\n", (unsigned int)list, (int)range)); } +#endif void _gamma_DeleteTextures(GLsizei n, const GLuint *textures) { @@ -1262,7 +1333,7 @@ gCCPriv->Window &= ~W_DepthFCP; /* Turn depth mode off */ - CHECK_DMA_BUFFER(gCC, gCCPriv, 4); + CHECK_DMA_BUFFER(gCC, gCCPriv, 3); WRITE(gCCPriv->buf, DepthMode, gCCPriv->DepthMode); WRITE(gCCPriv->buf, DeltaMode, gCCPriv->DeltaMode); WRITE(gCCPriv->buf, LBReadModeAnd, ~LBReadDstEnable); @@ -1314,6 +1385,22 @@ CHECK_DMA_BUFFER(gCC, gCCPriv, 1); WRITE(gCCPriv->buf, Light1Mode, gCCPriv->Light1Mode); break; + case GL_LOGIC_OP: + gCCPriv->LogicalOpMode &= ~LogicalOpModeEnable; + CHECK_DMA_BUFFER(gCC, gCCPriv, 1); + WRITE(gCCPriv->buf, LogicalOpMode, gCCPriv->LogicalOpMode); + break; + case GL_NORMALIZE: + gCCPriv->NormalizeMode &= ~NormalizeModeEnable; + CHECK_DMA_BUFFER(gCC, gCCPriv, 2); + WRITE(gCCPriv->buf, NormalizeMode, gCCPriv->NormalizeMode); + WRITE(gCCPriv->buf, TransformModeOr, 0xc); + break; + case GL_SCISSOR_TEST: + gCCPriv->ScissorMode &= ~UserScissorEnable; + CHECK_DMA_BUFFER(gCC, gCCPriv, 1); + WRITE(gCCPriv->buf, ScissorMode, gCCPriv->ScissorMode); + break; case GL_TEXTURE_2D: gCCPriv->Texture2DEnabled = GL_FALSE; gCCPriv->Begin &= ~B_TextureEnable; @@ -1344,6 +1431,29 @@ void _gamma_DisableClientState(GLenum array) { DEBUG_GLCMDS(("DisableClientState: %04x\n", (int)array)); + + switch (array) { + case GL_VERTEX_ARRAY: + gCCPriv->Array.VertexEnabled = GL_FALSE; + break; + case GL_NORMAL_ARRAY: + gCCPriv->Array.NormalEnabled = GL_FALSE; + break; + case GL_COLOR_ARRAY: + gCCPriv->Array.ColorEnabled = GL_FALSE; + break; + case GL_INDEX_ARRAY: + gCCPriv->Array.IndexEnabled = GL_FALSE; + break; + case GL_TEXTURE_COORD_ARRAY: + gCCPriv->Array.TexCoordEnabled = GL_FALSE; + break; + case GL_EDGE_FLAG_ARRAY: + gCCPriv->Array.EdgeFlagEnabled = GL_FALSE; + break; + default: + gamma_error( GL_INVALID_ENUM, "glEnable/DisableClientState" ); + } } void _gamma_DrawArrays(GLenum mode, GLint first, GLsizei count) @@ -1406,7 +1516,7 @@ #endif /* Turn depth mode on */ - CHECK_DMA_BUFFER(gCC, gCCPriv, 4); + CHECK_DMA_BUFFER(gCC, gCCPriv, 3); WRITE(gCCPriv->buf, DepthMode, gCCPriv->DepthMode); WRITE(gCCPriv->buf, DeltaMode, gCCPriv->DeltaMode); WRITE(gCCPriv->buf, LBReadModeOr, LBReadDstEnable); @@ -1464,6 +1574,22 @@ CHECK_DMA_BUFFER(gCC, gCCPriv, 1); WRITE(gCCPriv->buf, Light1Mode, gCCPriv->Light1Mode); break; + case GL_LOGIC_OP: + gCCPriv->LogicalOpMode |= LogicalOpModeEnable; + CHECK_DMA_BUFFER(gCC, gCCPriv, 1); + WRITE(gCCPriv->buf, LogicalOpMode, gCCPriv->LogicalOpMode); + break; + case GL_NORMALIZE: + gCCPriv->NormalizeMode |= NormalizeModeEnable; + CHECK_DMA_BUFFER(gCC, gCCPriv, 2); + WRITE(gCCPriv->buf, NormalizeMode, gCCPriv->NormalizeMode); + WRITE(gCCPriv->buf, TransformModeAnd, 0xffffff3f); + break; + case GL_SCISSOR_TEST: + gCCPriv->ScissorMode |= UserScissorEnable; + CHECK_DMA_BUFFER(gCC, gCCPriv, 1); + WRITE(gCCPriv->buf, ScissorMode, gCCPriv->ScissorMode); + break; case GL_TEXTURE_2D: gCCPriv->Texture2DEnabled = GL_TRUE; #ifndef TURN_OFF_TEXTURES @@ -1496,6 +1622,29 @@ void _gamma_EnableClientState(GLenum array) { DEBUG_GLCMDS(("EnableClientState: %04x\n", (int)array)); + + switch (array) { + case GL_VERTEX_ARRAY: + gCCPriv->Array.VertexEnabled = GL_TRUE; + break; + case GL_NORMAL_ARRAY: + gCCPriv->Array.NormalEnabled = GL_TRUE; + break; + case GL_COLOR_ARRAY: + gCCPriv->Array.ColorEnabled = GL_TRUE; + break; + case GL_INDEX_ARRAY: + gCCPriv->Array.IndexEnabled = GL_TRUE; + break; + case GL_TEXTURE_COORD_ARRAY: + gCCPriv->Array.TexCoordEnabled = GL_TRUE; + break; + case GL_EDGE_FLAG_ARRAY: + gCCPriv->Array.EdgeFlagEnabled = GL_TRUE; + break; + default: + gamma_error( GL_INVALID_ENUM, "glEnable/DisableClientState" ); + } } void _gamma_End(void) @@ -1519,10 +1668,12 @@ #endif } +#if 0 /* Now in dlist.c */ void _gamma_EndList(void) { DEBUG_GLCMDS(("EndList\n")); } +#endif void _gamma_EvalCoord1d(GLdouble u) { @@ -1620,8 +1771,10 @@ switch (pname) { case GL_FOG_COLOR: - color = ((int)params[3]<<24) | ((int)params[2]<<16) | - ((int)params[1]<<8) | ((int)params[0]); + color = (FLOAT_TO_UBYTE(params[3])<<24) | + (FLOAT_TO_UBYTE(params[2])<<16) | + (FLOAT_TO_UBYTE(params[1])<<8) | + (FLOAT_TO_UBYTE(params[0])); CHECK_DMA_BUFFER(gCC, gCCPriv, 1); WRITE(gCCPriv->buf, FogColor, color); break; @@ -1704,12 +1857,14 @@ gammaLoadHWMatrix(); } +#if 0 /* Now in dlist.c */ GLuint _gamma_GenLists(GLsizei range) { DEBUG_GLCMDS(("GenLists: %d\n", (int)range)); return GL_TRUE; } +#endif void _gamma_GenTextures(GLsizei n, GLuint *textures) { @@ -1718,7 +1873,36 @@ void _gamma_GetBooleanv(GLenum val, GLboolean *b) { + int loop; + DEBUG_GLCMDS(("GetBooleanv: %04x\n", (int)val)); + + switch (val) { + case GL_CURRENT_COLOR: + b[0] = FLOAT_TO_BOOL(gCCPriv->Current.Color[0]); + b[1] = FLOAT_TO_BOOL(gCCPriv->Current.Color[1]); + b[2] = FLOAT_TO_BOOL(gCCPriv->Current.Color[2]); + b[3] = FLOAT_TO_BOOL(gCCPriv->Current.Color[3]); + break; + case GL_CURRENT_NORMAL: + b[0] = FLOAT_TO_BOOL(gCCPriv->Current.Normal[0]); + b[1] = FLOAT_TO_BOOL(gCCPriv->Current.Normal[1]); + b[2] = FLOAT_TO_BOOL(gCCPriv->Current.Normal[2]); + break; + case GL_MAX_TEXTURE_SIZE: + *b = FLOAT_TO_BOOL(GAMMA_MAX_TEXTURE_SIZE); + break; + case GL_MODELVIEW_MATRIX: + for (loop = 0; loop < 16; loop++) + b[loop] = FLOAT_TO_BOOL(gCCPriv->ModelView[loop]); + break; + case GL_CURRENT_TEXTURE_COORDS: + b[0] = FLOAT_TO_BOOL(gCCPriv->Current.TexCoord[0]); + b[1] = FLOAT_TO_BOOL(gCCPriv->Current.TexCoord[1]); + b[2] = FLOAT_TO_BOOL(gCCPriv->Current.TexCoord[2]); + b[3] = FLOAT_TO_BOOL(gCCPriv->Current.TexCoord[3]); + break; + } } void _gamma_GetClipPlane(GLenum plane, GLdouble *equation) @@ -1729,25 +1913,75 @@ void _gamma_GetDoublev(GLenum val, GLdouble *d) { + int loop; + DEBUG_GLCMDS(("GetDoublev: %04x\n", (int)val)); + + switch (val) { + case GL_CURRENT_COLOR: + d[0] = (GLdouble)gCCPriv->Current.Color[0]; + d[1] = (GLdouble)gCCPriv->Current.Color[1]; + d[2] = (GLdouble)gCCPriv->Current.Color[2]; + d[3] = (GLdouble)gCCPriv->Current.Color[3]; + break; + case GL_CURRENT_NORMAL: + d[0] = (GLdouble)gCCPriv->Current.Normal[0]; + d[1] = (GLdouble)gCCPriv->Current.Normal[1]; + d[2] = (GLdouble)gCCPriv->Current.Normal[2]; + break; + case GL_MAX_TEXTURE_SIZE: + *d = (GLdouble)INT_TO_FLOAT(GAMMA_MAX_TEXTURE_SIZE); + break; + case GL_MODELVIEW_MATRIX: + for (loop = 0; loop < 16; loop++) + d[loop] = (GLdouble)gCCPriv->ModelView[loop]; + break; + case GL_CURRENT_TEXTURE_COORDS: + d[0] = (GLdouble)gCCPriv->Current.TexCoord[0]; + d[1] = (GLdouble)gCCPriv->Current.TexCoord[1]; + d[2] = (GLdouble)gCCPriv->Current.TexCoord[2]; + d[3] = (GLdouble)gCCPriv->Current.TexCoord[3]; + break; + } } GLenum _gamma_GetError(void) { DEBUG_GLCMDS(("GetError\n")); - return 0; + + return gCCPriv->ErrorValue; } void _gamma_GetFloatv(GLenum val, GLfloat *f) { - int i; + int loop; DEBUG_GLCMDS(("GetFloatv: %04x\n", (int)val)); switch (val) { + case GL_CURRENT_COLOR: + f[0] = gCCPriv->Current.Color[0]; + f[1] = gCCPriv->Current.Color[1]; + f[2] = gCCPriv->Current.Color[2]; + f[3] = gCCPriv->Current.Color[3]; + break; + case GL_CURRENT_NORMAL: + f[0] = gCCPriv->Current.Normal[0]; + f[1] = gCCPriv->Current.Normal[1]; + f[2] = gCCPriv->Current.Normal[2]; + break; + case GL_MAX_TEXTURE_SIZE: + *f = INT_TO_FLOAT(GAMMA_MAX_TEXTURE_SIZE); + break; case GL_MODELVIEW_MATRIX: - for (i = 0; i < 16; i++) - f[i] = gCCPriv->ModelView[i]; + for (loop = 0; loop < 16; loop++) + f[loop] = gCCPriv->ModelView[loop]; + break; + case GL_CURRENT_TEXTURE_COORDS: + f[0] = gCCPriv->Current.TexCoord[0]; + f[1] = gCCPriv->Current.TexCoord[1]; + f[2] = gCCPriv->Current.TexCoord[2]; + f[3] = gCCPriv->Current.TexCoord[3]; break; default: break; @@ -1756,11 +1990,34 @@ void _gamma_GetIntegerv(GLenum val, GLint *i) { + int loop; + DEBUG_GLCMDS(("GetIntegerv: %04x\n", (int)val)); switch (val) { + case GL_CURRENT_COLOR: + i[0] = FLOAT_TO_INT(gCCPriv->Current.Color[0]); + i[1] = FLOAT_TO_INT(gCCPriv->Current.Color[1]); + i[2] = FLOAT_TO_INT(gCCPriv->Current.Color[2]); + i[3] = FLOAT_TO_INT(gCCPriv->Current.Color[3]); + break; + case GL_CURRENT_NORMAL: + i[0] = FLOAT_TO_INT(gCCPriv->Current.Normal[0]); + i[1] = FLOAT_TO_INT(gCCPriv->Current.Normal[1]); + i[2] = FLOAT_TO_INT(gCCPriv->Current.Normal[2]); + break; case GL_MAX_TEXTURE_SIZE: - *i = 2048; + *i = GAMMA_MAX_TEXTURE_SIZE; + break; + case GL_MODELVIEW_MATRIX: + for (loop = 0; loop < 16; loop++) + i[loop] = FLOAT_TO_INT(gCCPriv->ModelView[loop]); + break; + case GL_CURRENT_TEXTURE_COORDS: + i[0] = FLOAT_TO_INT(gCCPriv->Current.TexCoord[0]); + i[1] = FLOAT_TO_INT(gCCPriv->Current.TexCoord[1]); + i[2] = FLOAT_TO_INT(gCCPriv->Current.TexCoord[2]); + i[3] = FLOAT_TO_INT(gCCPriv->Current.TexCoord[3]); break; } } @@ -1967,12 +2224,14 @@ return GL_TRUE; } +#if 0 /* Now in dlist.c */ GLboolean _gamma_IsList(GLuint list) { DEBUG_GLCMDS(("IsList: %04x\n", (unsigned int)list)); return GL_TRUE; } +#endif GLboolean _gamma_IsTexture(GLuint texture) { @@ -2001,7 +2260,7 @@ WRITEF(gCCPriv->buf, SceneAmbientColorRed, params[0]); break; case GL_LIGHT_MODEL_LOCAL_VIEWER: - if ((int)params[0] != 0) + if (params[0] != 0.0) gCCPriv->LightingMode |= LightingModeLocalViewer; else gCCPriv->LightingMode &= ~LightingModeLocalViewer; @@ -2009,7 +2268,7 @@ WRITE(gCCPriv->buf, LightingMode, gCCPriv->LightingMode); break; case GL_LIGHT_MODEL_TWO_SIDE: - if ((int)params[0] != 0) { + if (params[0] == 1.0f) { gCCPriv->LightingMode |= LightingModeTwoSides; gCCPriv->MaterialMode |= MaterialModeTwoSides; } else { @@ -2039,7 +2298,7 @@ void _gamma_Lightfv(GLenum light, GLenum pname, const GLfloat *params) { - GLfloat l,x,y,z; + GLfloat l,x,y,z,w; DEBUG_GLCMDS(("Lightfv: %04x %04x %f\n", (int)light, (int)pname, *params)); @@ -2069,12 +2328,13 @@ break; case GL_POSITION: /* Normalize */ - x = params[0]; y = params[1]; z = params[2]; - l = sqrt(x*x + y*y + z*z); + x = params[0]; y = params[1]; z = params[2]; w = params[3]; + l = sqrt(x*x + y*y + z*z + w*w); + w /= l; x /= l; y /= l; z /= l; - if ((int)params[3] != 0) { + if (params[3] != 0.0) { gCCPriv->Light0Mode |= Light0ModeAttenuation; gCCPriv->Light0Mode |= Light0ModeLocal; } else { @@ -2083,30 +2343,30 @@ } CHECK_DMA_BUFFER(gCC, gCCPriv, 5); WRITE(gCCPriv->buf, Light0Mode, gCCPriv->Light0Mode); - WRITEF(gCCPriv->buf, Light0PositionW, params[3]); + WRITEF(gCCPriv->buf, Light0PositionW, w); WRITEF(gCCPriv->buf, Light0PositionZ, z); WRITEF(gCCPriv->buf, Light0PositionY, y); WRITEF(gCCPriv->buf, Light0PositionX, x); break; case GL_SPOT_DIRECTION: CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITEF(gCCPriv->buf, Light0SpotlightDirectionZ, params[3]); - WRITEF(gCCPriv->buf, Light0SpotlightDirectionY, params[2]); - WRITEF(gCCPriv->buf, Light0SpotlightDirectionX, params[1]); - /* WRITEF(gCCPriv->buf, Light0SpotlightDirectionW, params[0]); */ + /* WRITEF(gCCPriv->buf, Light0SpotlightDirectionW, params[3]); */ + WRITEF(gCCPriv->buf, Light0SpotlightDirectionZ, params[2]); + WRITEF(gCCPriv->buf, Light0SpotlightDirectionY, params[1]); + WRITEF(gCCPriv->buf, Light0SpotlightDirectionX, params[0]); break; case GL_SPOT_EXPONENT: CHECK_DMA_BUFFER(gCC, gCCPriv, 1); WRITEF(gCCPriv->buf, Light0SpotlightExponent, params[0]); break; case GL_SPOT_CUTOFF: - if ((int)params[0] != -1) + if (params[0] != 180.0) gCCPriv->Light0Mode |= Light0ModeSpotLight; else gCCPriv->Light0Mode &= ~Light0ModeSpotLight; CHECK_DMA_BUFFER(gCC, gCCPriv, 2); WRITE(gCCPriv->buf, Light0Mode, gCCPriv->Light0Mode); - WRITEF(gCCPriv->buf, Light0CosSpotlightCutoffAngle, params[0]); + WRITEF(gCCPriv->buf, Light0CosSpotlightCutoffAngle, cos(params[0]*DEG2RAD)); break; case GL_CONSTANT_ATTENUATION: CHECK_DMA_BUFFER(gCC, gCCPriv, 1); @@ -2152,7 +2412,7 @@ x /= l; y /= l; z /= l; - if ((int)params[3] != 0) { + if (params[3] != 0.0) { gCCPriv->Light1Mode |= Light1ModeAttenuation; gCCPriv->Light1Mode |= Light1ModeLocal; } else { @@ -2168,23 +2428,23 @@ break; case GL_SPOT_DIRECTION: CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITEF(gCCPriv->buf, Light1SpotlightDirectionZ, params[3]); - WRITEF(gCCPriv->buf, Light1SpotlightDirectionY, params[2]); - WRITEF(gCCPriv->buf, Light1SpotlightDirectionX, params[1]); - /* WRITEF(gCCPriv->buf, Light1SpotlightDirectionW, params[0]); */ + /* WRITEF(gCCPriv->buf, Light1SpotlightDirectionW, params[3]); */ + WRITEF(gCCPriv->buf, Light1SpotlightDirectionZ, params[2]); + WRITEF(gCCPriv->buf, Light1SpotlightDirectionY, params[1]); + WRITEF(gCCPriv->buf, Light1SpotlightDirectionX, params[0]); break; case GL_SPOT_EXPONENT: CHECK_DMA_BUFFER(gCC, gCCPriv, 1); WRITEF(gCCPriv->buf, Light1SpotlightExponent, params[0]); break; case GL_SPOT_CUTOFF: - if ((int)params[0] != -1) + if (params[0] != 180.0) gCCPriv->Light1Mode |= Light1ModeSpotLight; else gCCPriv->Light1Mode &= ~Light1ModeSpotLight; CHECK_DMA_BUFFER(gCC, gCCPriv, 2); WRITE(gCCPriv->buf, Light1Mode, gCCPriv->Light1Mode); - WRITEF(gCCPriv->buf, Light1CosSpotlightCutoffAngle, params[0]); + WRITEF(gCCPriv->buf, Light1CosSpotlightCutoffAngle, cos(params[0]*DEG2RAD)); break; case GL_CONSTANT_ATTENUATION: CHECK_DMA_BUFFER(gCC, gCCPriv, 1); @@ -2220,10 +2480,12 @@ DEBUG_GLCMDS(("LineWidth: %f\n", width)); } +#if 0 /* Now in dlist.c */ void _gamma_ListBase(GLuint base) { DEBUG_GLCMDS(("ListBase: %d\n", (unsigned int)base)); } +#endif void _gamma_LoadIdentity(void) { @@ -2261,6 +2523,13 @@ void _gamma_LogicOp(GLenum opcode) { DEBUG_GLCMDS(("LogicOp: %04x\n", (int)opcode)); + + gCCPriv->LogicalOpMode &= ~LogicalOpModeMask; + + gCCPriv->LogicalOpMode |= (opcode & 0x0f) << 1; + + CHECK_DMA_BUFFER(gCC, gCCPriv, 1); + WRITE(gCCPriv->buf, LogicalOpMode, gCCPriv->LogicalOpMode); } void _gamma_Map1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *pnts) @@ -2318,6 +2587,8 @@ void _gamma_Materialf(GLenum face, GLenum pname, GLfloat param) { DEBUG_GLCMDS(("Materialf: %04x %04x %f\n", (int)face, (int)pname, param)); + + _gamma_Materialfv(face, pname, ¶m); } void _gamma_Materialfv(GLenum face, GLenum pname, const GLfloat *params) @@ -2453,7 +2724,6 @@ /* ERROR!!! */ break; } - } void _gamma_MultMatrixd(const GLdouble *m) @@ -2476,15 +2746,15 @@ gammaLoadHWMatrix(); } +#if 0 /* Now in dlist.c */ void _gamma_NewList(GLuint list, GLenum mode) { DEBUG_GLCMDS(("NewList: %d %04x\n", (unsigned int)list, (int)mode)); } +#endif void _gamma_Normal3b(GLbyte nx, GLbyte ny, GLbyte nz) { - GLfloat x,y,z; - DEBUG_GLCMDS(("Normal3b: %d %d %d\n", nx, ny, nz)); _gamma_Normal3f((GLfloat)nx,(GLfloat)ny,(GLfloat)nz); @@ -2492,8 +2762,6 @@ void _gamma_Normal3bv(const GLbyte *v) { - GLfloat p[3]; - DEBUG_GLCMDS(("Normal3bv: %d %d %d\n", v[0], v[1], v[2])); _gamma_Normal3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); @@ -2517,6 +2785,10 @@ { DEBUG_GLCMDS(("Normal3f: %f %f %f\n", nx, ny, nz)); + gCCPriv->Current.Normal[0] = nx; + gCCPriv->Current.Normal[1] = ny; + gCCPriv->Current.Normal[2] = nz; + CHECK_DMA_BUFFER(gCC, gCCPriv, 3); WRITEF(gCCPriv->buf, Nz, nz); WRITEF(gCCPriv->buf, Ny, ny); @@ -2532,8 +2804,6 @@ void _gamma_Normal3i(GLint nx, GLint ny, GLint nz) { - GLfloat x,y,z; - DEBUG_GLCMDS(("Normal3i: %d %d %d\n", (int)nx, (int)ny, (int)nz)); _gamma_Normal3f((GLfloat)nx,(GLfloat)ny,(GLfloat)nz); @@ -2541,8 +2811,6 @@ void _gamma_Normal3iv(const GLint *v) { - GLfloat p[3]; - DEBUG_GLCMDS(("Normal3iv: %d %d %d\n", (int)v[0], (int)v[1], (int)v[2])); _gamma_Normal3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); @@ -2550,8 +2818,6 @@ void _gamma_Normal3s(GLshort nx, GLshort ny, GLshort nz) { - GLfloat x,y,z; - DEBUG_GLCMDS(("Normal3s: %d %d %d\n", nx, ny, nz)); _gamma_Normal3f((GLfloat)nx,(GLfloat)ny,(GLfloat)nz); @@ -2559,8 +2825,6 @@ void _gamma_Normal3sv(const GLshort *v) { - GLfloat p[3]; - DEBUG_GLCMDS(("Normal3sv: %d %d %d\n", v[0], v[1], v[2])); _gamma_Normal3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); @@ -2569,6 +2833,34 @@ void _gamma_NormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer) { DEBUG_GLCMDS(("NormalPointer: %04x %d\n", (int)type, (int)stride)); + + if (stride<0) { + gamma_error( GL_INVALID_VALUE, "glNormalPointer(stride)" ); + return; + } + switch (type) { + case GL_BYTE: + gCCPriv->Array.NormalStrideB = stride ? stride : 3*sizeof(GLbyte); + break; + case GL_SHORT: + gCCPriv->Array.NormalStrideB = stride ? stride : 3*sizeof(GLshort); + break; + case GL_INT: + gCCPriv->Array.NormalStrideB = stride ? stride : 3*sizeof(GLint); + break; + case GL_FLOAT: + gCCPriv->Array.NormalStrideB = stride ? stride : 3*sizeof(GLfloat); + break; + case GL_DOUBLE: + gCCPriv->Array.NormalStrideB = stride ? stride : 3*sizeof(GLdouble); + break; + default: + gamma_error( GL_INVALID_ENUM, "glNormalPointer(type)" ); + return; + } + gCCPriv->Array.NormalType = type; + gCCPriv->Array.NormalStride = stride; + gCCPriv->Array.NormalPtr = (void *) pointer; } void _gamma_Ortho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) @@ -2844,22 +3136,38 @@ void _gamma_RasterPos2d(GLdouble x, GLdouble y) { + DEBUG_GLCMDS(("RasterPos2d: %f %f\n", x, y)); + + _gamma_RasterPos2f((GLfloat)x,(GLfloat)y); } void _gamma_RasterPos2dv(const GLdouble *v) { + _gamma_RasterPos2f((GLfloat)v[0],(GLfloat)v[1]); } void _gamma_RasterPos2f(GLfloat x, GLfloat y) { + DEBUG_GLCMDS(("RasterPos2f: %f %f\n", x, y)); + + gCCPriv->Current.RasterPos[0] = x; + gCCPriv->Current.RasterPos[1] = y; + gCCPriv->Current.RasterPos[2] = 0.0f; + gCCPriv->Current.RasterPos[3] = 1.0f; + + CHECK_DMA_BUFFER(gCC, gCCPriv, 2); + WRITEF(gCCPriv->buf, RPy, y); + WRITEF(gCCPriv->buf, RPx2, x); } void _gamma_RasterPos2fv(const GLfloat *v) { + _gamma_RasterPos2f(v[0],v[1]); } void _gamma_RasterPos2i(GLint x, GLint y) { + _gamma_RasterPos2f((GLfloat)x,(GLfloat)y); } void _gamma_RasterPos2iv(const GLint *v) @@ -3118,8 +3426,21 @@ void _gamma_Scissor(GLint x, GLint y, GLsizei width, GLsizei height) { + GLint x1, y1, x2, y2; + DEBUG_GLCMDS(("Scissor: %d %d %d %d\n", (int)x, (int)y, (int)width, (int)height)); + + x1 = gCC->driDrawablePriv->x + x; + y1 = gCC->driScreenPriv->fbHeight - + (gCC->driDrawablePriv->y + + gCC->driDrawablePriv->h) + y; + x2 = x1 + width; + y2 = y1 + height; + + CHECK_DMA_BUFFER(gCC, gCCPriv, 2); + WRITE(gCCPriv->buf, ScissorMinXY, (y1&0xffff)<<16 | (x1&0xffff)); + WRITE(gCCPriv->buf, ScissorMaxXY, (y2&0xffff)<<16 | (x2&0xffff)); } void _gamma_SelectBuffer(GLsizei numnames, GLuint *buffer) @@ -3188,6 +3509,11 @@ { DEBUG_GLCMDS(("TexCoord1f: %f\n", s)); + gCCPriv->Current.TexCoord[0] = s; + gCCPriv->Current.TexCoord[1] = 0.0f; + gCCPriv->Current.TexCoord[2] = 0.0f; + gCCPriv->Current.TexCoord[3] = 1.0f; + WRITEF(gCCPriv->buf, Ts1, s); } @@ -3195,6 +3521,11 @@ { DEBUG_GLCMDS(("TexCoord1fv: %f\n", *v)); + gCCPriv->Current.TexCoord[0] = v[0]; + gCCPriv->Current.TexCoord[1] = 0.0f; + gCCPriv->Current.TexCoord[2] = 0.0f; + gCCPriv->Current.TexCoord[3] = 1.0f; + WRITEF(gCCPriv->buf, Ts1, v[0]); } @@ -3260,6 +3591,11 @@ { DEBUG_GLCMDS(("TexCoord2f: %f %f\n", s, t)); + gCCPriv->Current.TexCoord[0] = s; + gCCPriv->Current.TexCoord[1] = t; + gCCPriv->Current.TexCoord[2] = 0.0f; + gCCPriv->Current.TexCoord[3] = 1.0f; + CHECK_DMA_BUFFER(gCC, gCCPriv, 2); WRITEF(gCCPriv->buf, Tt2, t); WRITEF(gCCPriv->buf, Ts2, s); @@ -3269,6 +3605,11 @@ { DEBUG_GLCMDS(("TexCoord2fv: %f %f\n", v[0], v[1])); + gCCPriv->Current.TexCoord[0] = v[0]; + gCCPriv->Current.TexCoord[1] = v[1]; + gCCPriv->Current.TexCoord[2] = 0.0f; + gCCPriv->Current.TexCoord[3] = 1.0f; + CHECK_DMA_BUFFER(gCC, gCCPriv, 2); WRITEF(gCCPriv->buf, Tt2, v[1]); WRITEF(gCCPriv->buf, Ts2, v[0]); @@ -3429,6 +3770,11 @@ { DEBUG_GLCMDS(("TexCoord4f: %f %f %f %f\n", s, t, r, q)); + gCCPriv->Current.TexCoord[0] = s; + gCCPriv->Current.TexCoord[1] = t; + gCCPriv->Current.TexCoord[2] = t; + gCCPriv->Current.TexCoord[3] = q; + CHECK_DMA_BUFFER(gCC, gCCPriv, 4); WRITEF(gCCPriv->buf, Tq4, q); WRITEF(gCCPriv->buf, Tr4, r); @@ -3440,6 +3786,11 @@ { DEBUG_GLCMDS(("TexCoord4fv: %f %f %f %f\n", v[0], v[1], v[2], v[3])); + gCCPriv->Current.TexCoord[0] = v[0]; + gCCPriv->Current.TexCoord[1] = v[1]; + gCCPriv->Current.TexCoord[2] = v[2]; + gCCPriv->Current.TexCoord[3] = v[3]; + CHECK_DMA_BUFFER(gCC, gCCPriv, 4); WRITEF(gCCPriv->buf, Tq4, v[3]); WRITEF(gCCPriv->buf, Tr4, v[2]); @@ -3508,6 +3859,36 @@ { DEBUG_GLCMDS(("TexCoordPointer: %d %04x %d\n", (int)size, (int)type, (int)stride)); + + if (size<1 || size>4) { + gamma_error( GL_INVALID_VALUE, "glTexCoordPointer(size)" ); + return; + } + if (stride<0) { + gamma_error( GL_INVALID_VALUE, "glTexCoordPointer(stride)" ); + return; + } + switch (type) { + case GL_SHORT: + gCCPriv->Array.TexCoordStrideB = stride ? stride : size*sizeof(GLshort); + break; + case GL_INT: + gCCPriv->Array.TexCoordStrideB = stride ? stride : size*sizeof(GLint); + break; + case GL_FLOAT: + gCCPriv->Array.TexCoordStrideB = stride ? stride : size*sizeof(GLfloat); + break; + case GL_DOUBLE: + gCCPriv->Array.TexCoordStrideB = stride ? stride : size*sizeof(GLdouble); + break; + default: + gamma_error( GL_INVALID_ENUM, "glTexCoordPointer(type)" ); + return; + } + gCCPriv->Array.TexCoordSize = size; + gCCPriv->Array.TexCoordType = type; + gCCPriv->Array.TexCoordStride = stride; + gCCPriv->Array.TexCoordPtr = (void *) pointer; } void _gamma_TexEnvf(GLenum target, GLenum pname, GLfloat param) @@ -4158,8 +4539,6 @@ void _gamma_Vertex2i(GLint x, GLint y) { - GLfloat a,b; - DEBUG_GLCMDS(("Vertex2i: %d %d\n", (int)x, (int)y)); _gamma_Vertex2f((GLfloat)x,(GLfloat)y); @@ -4167,8 +4546,6 @@ void _gamma_Vertex2iv(const GLint *v) { - GLfloat p[2]; - DEBUG_GLCMDS(("Vertex2iv: %d %d\n", (int)v[0], (int)v[1])); _gamma_Vertex2f((GLfloat)v[0],(GLfloat)v[1]); @@ -4176,8 +4553,6 @@ void _gamma_Vertex2s(GLshort x, GLshort y) { - GLfloat a,b; - DEBUG_GLCMDS(("Vertex2s: %d %d\n", x, y)); _gamma_Vertex2f((GLfloat)x,(GLfloat)y); @@ -4185,8 +4560,6 @@ void _gamma_Vertex2sv(const GLshort *v) { - GLfloat p[2]; - DEBUG_GLCMDS(("Vertex2sv: %d %d\n", v[0], v[1])); _gamma_Vertex2f((GLfloat)v[0],(GLfloat)v[1]); @@ -4225,8 +4598,6 @@ void _gamma_Vertex3i(GLint x, GLint y, GLint z) { - GLfloat a,b,c; - DEBUG_GLCMDS(("Vertex3i: %d %d %d\n", (int)x, (int)y, (int)z)); _gamma_Vertex3f((GLfloat)x,(GLfloat)y,(GLfloat)z); @@ -4234,8 +4605,6 @@ void _gamma_Vertex3iv(const GLint *v) { - GLfloat p[3]; - DEBUG_GLCMDS(("Vertex3iv: %d %d %d\n", (int)v[0], (int)v[1], (int)v[2])); _gamma_Vertex3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); @@ -4243,8 +4612,6 @@ void _gamma_Vertex3s(GLshort x, GLshort y, GLshort z) { - GLfloat a,b,c; - DEBUG_GLCMDS(("Vertex3s: %d %d %d\n", x, y, z)); _gamma_Vertex3f((GLfloat)x,(GLfloat)y,(GLfloat)z); @@ -4252,8 +4619,6 @@ void _gamma_Vertex3sv(const GLshort *v) { - GLfloat p[3]; - DEBUG_GLCMDS(("Vertex3sv: %d %d %d\n", v[0], v[1], v[2])); _gamma_Vertex3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); @@ -4293,8 +4658,6 @@ void _gamma_Vertex4i(GLint x, GLint y, GLint z, GLint w) { - GLfloat a,b,c,d; - DEBUG_GLCMDS(("Vertex4i: %d %d %d %d\n", (int)x, (int)y, (int)z, (int)w)); _gamma_Vertex4f((GLfloat)x,(GLfloat)y,(GLfloat)z,(GLfloat)w); @@ -4302,8 +4665,6 @@ void _gamma_Vertex4iv(const GLint *v) { - GLfloat p[4]; - DEBUG_GLCMDS(("Vertex4iv: %d %d %d %d\n", (int)v[0], (int)v[1], (int)v[2], (int)v[3])); @@ -4312,8 +4673,6 @@ void _gamma_Vertex4s(GLshort x, GLshort y, GLshort z, GLshort w) { - GLfloat a,b,c,d; - DEBUG_GLCMDS(("Vertex4s: %d %d %d %d\n", x, y, z, w)); _gamma_Vertex4f((GLfloat)x,(GLfloat)y,(GLfloat)z,(GLfloat)w); @@ -4321,8 +4680,6 @@ void _gamma_Vertex4sv(const GLshort *v) { - GLfloat p[4]; - DEBUG_GLCMDS(("Vertex4sv: %d %d %d %d\n", v[0], v[1], v[2], v[3])); _gamma_Vertex4f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2],(GLfloat)v[3]); @@ -4332,6 +4689,36 @@ { DEBUG_GLCMDS(("VertexPointer: %d %04x %d\n", (int)size, (int)type, (int)stride)); + + if (size<2 || size>4) { + gamma_error( GL_INVALID_VALUE, "glVertexPointer(size)" ); + return; + } + if (stride<0) { + gamma_error( GL_INVALID_VALUE, "glVertexPointer(stride)" ); + return; + } + switch (type) { + case GL_SHORT: + gCCPriv->Array.VertexStrideB = stride ? stride : size*sizeof(GLshort); + break; + case GL_INT: + gCCPriv->Array.VertexStrideB = stride ? stride : size*sizeof(GLint); + break; + case GL_FLOAT: + gCCPriv->Array.VertexStrideB = stride ? stride : size*sizeof(GLfloat); + break; + case GL_DOUBLE: + gCCPriv->Array.VertexStrideB = stride ? stride : size*sizeof(GLdouble); + break; + default: + gamma_error( GL_INVALID_ENUM, "glVertexPointer(type)" ); + return; + } + gCCPriv->Array.VertexSize = size; + gCCPriv->Array.VertexType = type; + gCCPriv->Array.VertexStride = stride; + gCCPriv->Array.VertexPtr = (void *) pointer; } void _gamma_Viewport(GLint x, GLint y, GLsizei width, GLsizei height) @@ -4357,10 +4744,10 @@ oy = y + sy; CHECK_DMA_BUFFER(gCC, gCCPriv, 4); - WRITEF(gCCPriv->buf, ViewPortScaleX, sx); - WRITEF(gCCPriv->buf, ViewPortScaleY, sy); WRITEF(gCCPriv->buf, ViewPortOffsetX, ox); WRITEF(gCCPriv->buf, ViewPortOffsetY, oy); + WRITEF(gCCPriv->buf, ViewPortScaleX, sx); + WRITEF(gCCPriv->buf, ViewPortScaleY, sy); #if 1 /* Err - this shouldn't be needed, but something isn't flushing */ FLUSH_DMA_BUFFER(gCC,gCCPriv); #endif @@ -4395,7 +4782,7 @@ void -_gamma_init_dispatch(struct _glapi_table *dispatch) +_gamma_init_exec(struct _glapi_table *dispatch) { init_no_op_table(dispatch); @@ -4710,7 +5097,7 @@ /* 1.1 */ dispatch->AreTexturesResident = _gamma_AreTexturesResident; - dispatch->ArrayElement = _gamma_ArrayElement; + dispatch->ArrayElement = gl_save_ArrayElement; /*_gamma_ArrayElement;*/ dispatch->BindTexture = _gamma_BindTexture; dispatch->ColorPointer = _gamma_ColorPointer; dispatch->CopyTexImage1D = _gamma_CopyTexImage1D; @@ -4740,5 +5127,186 @@ dispatch->VertexPointer = _gamma_VertexPointer; } +void +_gamma_init_save(struct _glapi_table *table) +{ + init_no_op_table(table); + table->Accum = gl_save_Accum; + table->AlphaFunc = gl_save_AlphaFunc; + table->AreTexturesResident = _gamma_AreTexturesResident; /* NOT SAVED */ + table->ArrayElement = gl_save_ArrayElement; + table->Begin = gl_save_Begin; + table->BindTexture = gl_save_BindTexture; + table->Bitmap = gl_save_Bitmap; + table->BlendFunc = gl_save_BlendFunc; + table->CallList = gl_save_CallList; + table->CallLists = gl_save_CallLists; + table->Clear = gl_save_Clear; + table->ClearAccum = gl_save_ClearAccum; + table->ClearColor = gl_save_ClearColor; + table->ClearDepth = gl_save_ClearDepth; + table->ClearIndex = gl_save_ClearIndex; + table->ClearStencil = gl_save_ClearStencil; + table->ClipPlane = gl_save_ClipPlane; + table->Color3f = gl_save_Color3f; + table->Color3fv = gl_save_Color3fv; + table->Color4f = gl_save_Color4f; + table->Color4fv = gl_save_Color4fv; + table->Color4ub = gl_save_Color4ub; + table->Color4ubv = gl_save_Color4ubv; + table->ColorMask = gl_save_ColorMask; + table->ColorMaterial = gl_save_ColorMaterial; + table->ColorPointer = _gamma_ColorPointer; /* NOT SAVED */ + table->CopyPixels = gl_save_CopyPixels; + table->CopyTexImage1D = gl_save_CopyTexImage1D; + table->CopyTexImage2D = gl_save_CopyTexImage2D; + table->CopyTexSubImage1D = gl_save_CopyTexSubImage1D; + table->CopyTexSubImage2D = gl_save_CopyTexSubImage2D; + table->CullFace = gl_save_CullFace; + table->DeleteLists = _gamma_DeleteLists; /* NOT SAVED */ + table->DeleteTextures = _gamma_DeleteTextures; /* NOT SAVED */ + table->DepthFunc = gl_save_DepthFunc; + table->DepthMask = gl_save_DepthMask; + table->DepthRange = gl_save_DepthRange; + table->Disable = gl_save_Disable; + table->DisableClientState = _gamma_DisableClientState; /* NOT SAVED */ + table->DrawArrays = gl_save_DrawArrays; + table->DrawBuffer = gl_save_DrawBuffer; + table->DrawElements = gl_save_DrawElements; + table->DrawPixels = gl_save_DrawPixels; + table->EdgeFlag = gl_save_EdgeFlag; + table->EdgeFlagPointer = _gamma_EdgeFlagPointer; /* NOT SAVED */ + table->Enable = gl_save_Enable; + table->EnableClientState = _gamma_EnableClientState; /* NOT SAVED */ + table->End = gl_save_End; + table->EndList = _gamma_EndList; /* NOT SAVED */ + table->EvalCoord1f = gl_save_EvalCoord1f; + table->EvalCoord2f = gl_save_EvalCoord2f; + table->EvalMesh1 = gl_save_EvalMesh1; + table->EvalMesh2 = gl_save_EvalMesh2; + table->EvalPoint1 = gl_save_EvalPoint1; + table->EvalPoint2 = gl_save_EvalPoint2; + table->FeedbackBuffer = _gamma_FeedbackBuffer; /* NOT SAVED */ + table->Finish = _gamma_Finish; /* NOT SAVED */ + table->Flush = _gamma_Flush; /* NOT SAVED */ + table->Fogfv = gl_save_Fogfv; + table->FrontFace = gl_save_FrontFace; + table->Frustum = gl_save_Frustum; + table->GenLists = _gamma_GenLists; /* NOT SAVED */ + table->GenTextures = _gamma_GenTextures; /* NOT SAVED */ + + /* NONE OF THESE COMMANDS ARE COMPILED INTO DISPLAY LISTS */ + table->GetBooleanv = _gamma_GetBooleanv; + table->GetClipPlane = _gamma_GetClipPlane; + table->GetDoublev = _gamma_GetDoublev; + table->GetError = _gamma_GetError; + table->GetFloatv = _gamma_GetFloatv; + table->GetIntegerv = _gamma_GetIntegerv; + table->GetString = _gamma_GetString; + table->GetLightfv = _gamma_GetLightfv; + table->GetLightiv = _gamma_GetLightiv; + table->GetMapdv = _gamma_GetMapdv; + table->GetMapfv = _gamma_GetMapfv; + table->GetMapiv = _gamma_GetMapiv; + table->GetMaterialfv = _gamma_GetMaterialfv; + table->GetMaterialiv = _gamma_GetMaterialiv; + table->GetPixelMapfv = _gamma_GetPixelMapfv; + table->GetPixelMapuiv = _gamma_GetPixelMapuiv; + table->GetPixelMapusv = _gamma_GetPixelMapusv; + table->GetPointerv = _gamma_GetPointerv; + table->GetPolygonStipple = _gamma_GetPolygonStipple; + table->GetTexEnvfv = _gamma_GetTexEnvfv; + table->GetTexEnviv = _gamma_GetTexEnviv; + table->GetTexGendv = _gamma_GetTexGendv; + table->GetTexGenfv = _gamma_GetTexGenfv; + table->GetTexGeniv = _gamma_GetTexGeniv; + table->GetTexImage = _gamma_GetTexImage; + table->GetTexLevelParameterfv = _gamma_GetTexLevelParameterfv; + table->GetTexLevelParameteriv = _gamma_GetTexLevelParameteriv; + table->GetTexParameterfv = _gamma_GetTexParameterfv; + table->GetTexParameteriv = _gamma_GetTexParameteriv; + + table->Hint = gl_save_Hint; + table->IndexMask = gl_save_IndexMask; + table->Indexf = gl_save_Indexf; + table->Indexi = gl_save_Indexi; + table->IndexPointer = _gamma_IndexPointer; /* NOT SAVED */ + table->InitNames = gl_save_InitNames; + table->InterleavedArrays = _gamma_InterleavedArrays; /* NOT SAVED */ + table->IsEnabled = _gamma_IsEnabled; /* NOT SAVED */ + table->IsTexture = _gamma_IsTexture; /* NOT SAVED */ + table->IsList = _gamma_IsList; /* NOT SAVED */ + table->LightModelfv = gl_save_LightModelfv; + table->Lightfv = gl_save_Lightfv; + table->LineStipple = gl_save_LineStipple; + table->LineWidth = gl_save_LineWidth; + table->ListBase = gl_save_ListBase; + table->LoadIdentity = gl_save_LoadIdentity; + table->LoadMatrixf = gl_save_LoadMatrixf; + table->LoadName = gl_save_LoadName; + table->LogicOp = gl_save_LogicOp; + table->Map1f = gl_save_Map1f; + table->Map2f = gl_save_Map2f; + table->MapGrid1f = gl_save_MapGrid1f; + table->MapGrid2f = gl_save_MapGrid2f; + table->Materialfv = gl_save_Materialfv; + table->MatrixMode = gl_save_MatrixMode; + table->MultMatrixf = gl_save_MultMatrixf; + table->NewList = gl_save_NewList; + table->Normal3f = gl_save_Normal3f; + table->Normal3fv = gl_save_Normal3fv; + table->NormalPointer = _gamma_NormalPointer; /* NOT SAVED */ + table->Ortho = gl_save_Ortho; + table->PassThrough = gl_save_PassThrough; + table->PixelMapfv = gl_save_PixelMapfv; + table->PixelStorei = _gamma_PixelStorei; /* NOT SAVED */ + table->PixelTransferf = gl_save_PixelTransferf; + table->PixelZoom = gl_save_PixelZoom; + table->PointSize = gl_save_PointSize; + table->PolygonMode = gl_save_PolygonMode; + table->PolygonOffset = gl_save_PolygonOffset; + table->PolygonStipple = gl_save_PolygonStipple; + table->PopAttrib = gl_save_PopAttrib; + table->PopClientAttrib = _gamma_PopClientAttrib; /* NOT SAVED */ + table->PopMatrix = gl_save_PopMatrix; + table->PopName = gl_save_PopName; + table->PrioritizeTextures = gl_save_PrioritizeTextures; + table->PushAttrib = gl_save_PushAttrib; + table->PushClientAttrib = _gamma_PushClientAttrib; /* NOT SAVED */ + table->PushMatrix = gl_save_PushMatrix; + table->PushName = gl_save_PushName; + table->RasterPos4f = gl_save_RasterPos4f; + table->ReadBuffer = gl_save_ReadBuffer; + table->ReadPixels = _gamma_ReadPixels; /* NOT SAVED */ + table->Rectf = gl_save_Rectf; + table->RenderMode = _gamma_RenderMode; /* NOT SAVED */ + table->Rotatef = gl_save_Rotatef; + table->Scalef = gl_save_Scalef; + table->Scissor = gl_save_Scissor; + table->SelectBuffer = _gamma_SelectBuffer; /* NOT SAVED */ + table->ShadeModel = gl_save_ShadeModel; + table->StencilFunc = gl_save_StencilFunc; + table->StencilMask = gl_save_StencilMask; + table->StencilOp = gl_save_StencilOp; + table->TexCoord2f = gl_save_TexCoord2f; + table->TexCoord2fv = gl_save_TexCoord2fv; + table->TexCoord3fv = gl_save_TexCoord3fv; + table->TexCoord4f = gl_save_TexCoord4f; + table->TexCoordPointer = _gamma_TexCoordPointer; /* NOT SAVED */ + table->TexEnvfv = gl_save_TexEnvfv; + table->TexGenfv = gl_save_TexGenfv; + table->TexImage1D = gl_save_TexImage1D; + table->TexImage2D = gl_save_TexImage2D; + table->TexSubImage1D = gl_save_TexSubImage1D; + table->TexSubImage2D = gl_save_TexSubImage2D; + table->TexParameterfv = gl_save_TexParameterfv; + table->Translatef = gl_save_Translatef; + table->Vertex2f = gl_save_Vertex2f; + table->Vertex3f = gl_save_Vertex3f; + table->Vertex4f = gl_save_Vertex4f; + table->Vertex3fv = gl_save_Vertex3fv; + table->VertexPointer = _gamma_VertexPointer; /* NOT SAVED */ + table->Viewport = gl_save_Viewport; +} #endif Index: xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h:1.4 xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h:1.5 --- xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h:1.4 Thu Mar 2 11:07:36 2000 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h Wed Feb 7 08:26:16 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h,v 1.4 2000/03/02 16:07:36 martin Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h,v 1.5 2001/02/07 13:26:16 alanh Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -38,6 +38,8 @@ #include "GL/gl.h" #include "glapi.h" +extern void gamma_error(GLenum error, const char *s); + extern void _gamma_Accum(GLenum op, GLfloat value); extern void _gamma_AlphaFunc(GLenum func, GLclampf ref); extern GLboolean _gamma_AreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences); @@ -376,6 +378,7 @@ extern void _gamma_Viewport(GLint x, GLint y, GLsizei width, GLsizei height); -extern void _gamma_init_dispatch(struct _glapi_table *dispatch); +extern void _gamma_init_exec(struct _glapi_table *dispatch); +extern void _gamma_init_save(struct _glapi_table *dispatch); #endif /* _GAMMA_GL_H_ */ Index: xc/lib/GL/mesa/src/drv/gamma/gamma_init.h diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_init.h:1.3 xc/lib/GL/mesa/src/drv/gamma/gamma_init.h:1.4 --- xc/lib/GL/mesa/src/drv/gamma/gamma_init.h:1.3 Fri Jun 16 20:02:56 2000 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_init.h Wed Feb 7 08:26:16 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_init.h,v 1.3 2000/06/17 00:02:56 martin Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_init.h,v 1.4 2001/02/07 13:26:16 alanh Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -63,11 +63,69 @@ #define GAMMA_STENCIL_BUFFER 0x00000008 #define GAMMA_ACCUM_BUFFER 0x00000010 +#define GAMMA_MAX_TEXTURE_SIZE 2048 + /* These are the minimum requirements and should probably be increased */ #define MAX_MODELVIEW_STACK 16 #define MAX_PROJECTION_STACK 2 #define MAX_TEXTURE_STACK 2 +struct gamma_current_attrib { +/* GLubyte ByteColor[4]; old */ /* Current RGBA color */ + GLuint Index; /* Current color index */ + GLfloat Color[4]; /* Current RGBA color */ + GLfloat Normal[3]; /* Current normal vector */ + GLfloat TexCoord[4]; /* points into MultiTexCoord */ + GLfloat RasterPos[4]; /* Current raster position */ + GLfloat RasterDistance; /* Current raster distance */ + GLfloat RasterColor[4]; /* Current raster color */ + GLuint RasterIndex; /* Current raster index */ + GLfloat *RasterTexCoord; /* Current raster texcoord*/ + GLboolean RasterPosValid; /* Raster po valid flag */ + GLboolean EdgeFlag; /* Current edge flag */ +}; + +struct gamma_array_attrib { + GLint VertexSize; + GLenum VertexType; + GLsizei VertexStride; /* user-specified stride */ + GLsizei VertexStrideB; /* actual stride in bytes */ + void *VertexPtr; + GLboolean VertexEnabled; + + GLenum NormalType; + GLsizei NormalStride; /* user-specified stride */ + GLsizei NormalStrideB; /* actual stride in bytes */ + void *NormalPtr; + GLboolean NormalEnabled; + + GLint ColorSize; + GLenum ColorType; + GLsizei ColorStride; /* user-specified stride */ + GLsizei ColorStrideB; /* actual stride in bytes */ + void *ColorPtr; + GLboolean ColorEnabled; + + GLenum IndexType; + GLsizei IndexStride; /* user-specified stride */ + GLsizei IndexStrideB; /* actual stride in bytes */ + void *IndexPtr; + GLboolean IndexEnabled; + + GLsizei EdgeFlagStride; /* user-specified stride */ + GLsizei EdgeFlagStrideB; /* actual stride in bytes */ + GLboolean *EdgeFlagPtr; + GLboolean EdgeFlagEnabled; + + GLint TexCoordSize; + GLenum TexCoordType; + GLsizei TexCoordStride; /* user-specified stride */ + GLsizei TexCoordStrideB; /* actual stride in bytes */ + void *TexCoordPtr; + GLboolean TexCoordEnabled; + GLint TexCoordInterleaveFactor; +}; + typedef struct { drmContext hHWContext; @@ -91,11 +149,34 @@ int EnabledFlags; int DepthSize; int Begin; + GLenum ErrorValue; + + struct _glapi_table *Exec; + struct _glapi_table *Save; + struct _glapi_table *API; + + struct _mesa_HashTable *DisplayList; + + struct gl_list_attrib List; + struct gl_pixelstore_attrib Unpack; /* Pixel unpacking */ + + struct gamma_array_attrib Array; /* From Mesa v3.0 */ + struct gamma_current_attrib Current; /* From Mesa v3.0 */ + + /* Display lists */ + GLuint CallDepth; /* Current recursion calling depth */ + GLboolean ExecuteFlag; /* Execute GL commands? */ + GLboolean CompileFlag; /* Compile GL commands into display list? */ + Node *CurrentListPtr; /* Head of list being compiled */ + GLuint CurrentListNum; /* Number of the list being compiled */ + Node *CurrentBlock; /* Pointer to current block of nodes */ + GLuint CurrentPos; /* Index into current block of nodes */ float ClearColor[4]; float ClearDepth; int MatrixMode; int DepthMode; + int TransformMode; float zNear, zFar; int LBReadMode; int FBReadMode; @@ -110,9 +191,25 @@ int DeltaMode; int ColorMaterialMode; int MaterialMode; + int NormalizeMode; int LightingMode; int Light0Mode; int Light1Mode; + int Light2Mode; + int Light3Mode; + int Light4Mode; + int Light5Mode; + int Light6Mode; + int Light7Mode; + int Light8Mode; + int Light9Mode; + int Light10Mode; + int Light11Mode; + int Light12Mode; + int Light13Mode; + int Light14Mode; + int Light15Mode; + int LogicalOpMode; int ScissorMode; int Window; /* GID part probably should be in draw priv */ Index: xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c:1.6 xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c:1.7 --- xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c:1.6 Mon Nov 27 05:59:37 2000 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c Wed Jan 31 11:15:37 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c,v 1.6 2000/11/27 10:59:37 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c,v 1.7 2001/01/31 16:15:37 alanh Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -43,7 +43,7 @@ __DRIscreenPrivate *driScrnPriv = gcp->gammaScrnPriv->driScrnPriv; GLINTDRIPtr gDRIPriv = (GLINTDRIPtr)driScrnPriv->pDevPriv; - if (gDRIPriv->numMXDevices == 2) { + if (gDRIPriv->numMultiDevices == 2) { /* Set up each MX's ScanLineOwnership for OpenGL */ CHECK_DMA_BUFFER(nullCC, gcp, 4); WRITE(gcp->buf, BroadcastMask, 1); @@ -142,7 +142,7 @@ WRITE(gcp->buf, AlphaTestMode, gcp->AlphaTestMode); WRITE(gcp->buf, AlphaBlendMode, gcp->AlphaBlendMode); WRITE(gcp->buf, DitherMode, DitherModeEnable | DM_ColorOrder_RGB); - if (gDRIPriv->numMXDevices == 2) + if (gDRIPriv->numMultiDevices == 2) WRITE(gcp->buf, RasterizerMode, RM_MultiGLINT | RM_BiasCoordNearHalf); else WRITE(gcp->buf, RasterizerMode, RM_BiasCoordNearHalf); Index: xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h:1.3 xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h:1.4 --- xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h:1.3 Fri Jun 16 20:02:56 2000 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h Wed Feb 7 08:26:17 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h,v 1.3 2000/06/17 00:02:56 martin Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h,v 1.4 2001/02/07 13:26:17 alanh Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -487,8 +487,9 @@ /* LightingMode */ #define LightingModeDisable 0x00000000 #define LightingModeEnable 0x00000001 -#define LightingModeTwoSides 0x00000002 +#define LightingModeTwoSides 0x00000004 #define LightingModeLocalViewer 0x00000008 +#define LightingModeSpecularEnable 0x00008000 /* Light0Mode */ #define Light0ModeDisable 0x00000000 @@ -552,6 +553,11 @@ #define PM_AntialiasQuality_4x4 0x00000000 #define PM_AntialiasQuality_8x8 0x00000002 +/* LogicalOpMode */ +#define LogicalOpModeDisable 0x00000000 +#define LogicalOpModeEnable 0x00000001 +#define LogicalOpModeMask 0x0000001e + /* LineMode */ #define LM_StippleDisable 0x00000000 #define LM_StippleEnable 0x00000001 @@ -577,6 +583,7 @@ #define XM_XformNormals 0x00000004 #define XM_XformFaceNormals 0x00000008 #define XM_XformTexture 0x00000010 +#define XM_XMask 0x00000013 #define XM_TexGenModeS_None 0x00000000 #define XM_TexGenModeS_ObjLinear 0x00000020 #define XM_TexGenModeS_EyeLinear 0x00000040 Index: xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c:1.8 xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c:1.12 --- xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c:1.8 Thu Dec 7 15:26:05 2000 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c Wed Mar 21 11:14:20 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c,v 1.8 2000/12/07 20:26:05 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c,v 1.12 2001/03/21 16:14:20 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -40,28 +40,28 @@ #include "gamma_gl.h" #include "glapi.h" #include "glint_dri.h" +#include "gamma_dlist.h" #include "context.h" #include "mmath.h" +#include "hash.h" __DRIcontextPrivate *nullCC = NULL; __DRIcontextPrivate *gCC = NULL; gammaContextPrivate *gCCPriv = NULL; -static struct _glapi_table *Dispatch = NULL; - - GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv) { gammaScreenPrivate *gsp; +#if 0 /* Check the DRI version */ { int major, minor, patch; if (XF86DRIQueryVersion(sPriv->display, &major, &minor, &patch)) { - if (major != 3 || minor != 0 || patch < 0) { + if (major != 4 || minor < 0) { char msg[1000]; - sprintf(msg, "gamma DRI driver expected DRI version 3.0.x but got version %d.%d.%d", major, minor, patch); + sprintf(msg, "gamma DRI driver expected DRI version 4.0.x but got version %d.%d.%d", major, minor, patch); __driMesaMessage(msg); return GL_FALSE; } @@ -70,8 +70,7 @@ /* Check that the DDX driver version is compatible */ if (sPriv->ddxMajor != 1 || - sPriv->ddxMinor != 0 || - sPriv->ddxPatch < 0) { + sPriv->ddxMinor < 0) { char msg[1000]; sprintf(msg, "gamma DRI driver expected DDX driver version 1.0.x but got version %d.%d.%d", sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch); __driMesaMessage(msg); @@ -80,13 +79,13 @@ /* Check that the DRM driver version is compatible */ if (sPriv->drmMajor != 1 || - sPriv->drmMinor != 0 || - sPriv->drmPatch < 0) { + sPriv->drmMinor < 0) { char msg[1000]; sprintf(msg, "gamm DRI driver expected DRM driver version 1.0.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch); __driMesaMessage(msg); return GL_FALSE; } +#endif /* Allocate the private area */ gsp = (gammaScreenPrivate *)Xmalloc(sizeof(gammaScreenPrivate)); @@ -148,17 +147,25 @@ gammaScreenPrivate *gPriv = (gammaScreenPrivate *)driScrnPriv->private; GLINTDRIPtr gDRIPriv = (GLINTDRIPtr)driScrnPriv->pDevPriv; - if (!Dispatch) { - GLuint size = _glapi_get_dispatch_table_size() * sizeof(GLvoid *); - Dispatch = (struct _glapi_table *) malloc(size); - _gamma_init_dispatch(Dispatch); - } - cPriv = (gammaContextPrivate *)Xmalloc(sizeof(gammaContextPrivate)); if (!cPriv) { return GL_FALSE; } + if (!cPriv->Exec) { + GLuint size = _glapi_get_dispatch_table_size() * sizeof(GLvoid *); + cPriv->Exec = (struct _glapi_table *) malloc(size); + _gamma_init_exec(cPriv->Exec); + } + + cPriv->API = cPriv->Exec; + + if (!cPriv->Save) { + GLuint size = _glapi_get_dispatch_table_size() * sizeof(GLvoid *); + cPriv->Save = (struct _glapi_table *) malloc(size); + _gamma_init_save(cPriv->Save); + } + cPriv->hHWContext = driContextPriv->hHWContext; GET_FIRST_DMA(driScrnPriv->fd, cPriv->hHWContext, 1, &cPriv->bufIndex, &cPriv->bufSize, @@ -170,6 +177,54 @@ &cPriv->WCbuf, &cPriv->WCbufCount, gPriv); #endif + gamma_init_lists(); + + /* Display List stuff */ + cPriv->DisplayList = _mesa_NewHashTable(); + cPriv->List.ListBase = 0; + cPriv->CallDepth = 0; + cPriv->ExecuteFlag = GL_TRUE; + cPriv->CompileFlag = GL_FALSE; + cPriv->CurrentListPtr = NULL; + cPriv->CurrentBlock = NULL; + cPriv->CurrentListNum = 0; + cPriv->CurrentPos = 0; + + /* Vertex arrays */ + cPriv->Array.VertexSize = 4; + cPriv->Array.VertexType = GL_FLOAT; + cPriv->Array.VertexStride = 0; + cPriv->Array.VertexStrideB = 0; + cPriv->Array.VertexPtr = NULL; + cPriv->Array.VertexEnabled = GL_FALSE; + cPriv->Array.NormalType = GL_FLOAT; + cPriv->Array.NormalStride = 0; + cPriv->Array.NormalStrideB = 0; + cPriv->Array.NormalPtr = NULL; + cPriv->Array.NormalEnabled = GL_FALSE; + cPriv->Array.ColorSize = 4; + cPriv->Array.ColorType = GL_FLOAT; + cPriv->Array.ColorStride = 0; + cPriv->Array.ColorStrideB = 0; + cPriv->Array.ColorPtr = NULL; + cPriv->Array.ColorEnabled = GL_FALSE; + cPriv->Array.IndexType = GL_FLOAT; + cPriv->Array.IndexStride = 0; + cPriv->Array.IndexStrideB = 0; + cPriv->Array.IndexPtr = NULL; + cPriv->Array.IndexEnabled = GL_FALSE; + cPriv->Array.EdgeFlagStride = 0; + cPriv->Array.EdgeFlagStrideB = 0; + cPriv->Array.EdgeFlagPtr = NULL; + cPriv->Array.EdgeFlagEnabled = GL_FALSE; + + cPriv->Unpack.Alignment = 4; + cPriv->Unpack.RowLength = 0; + cPriv->Unpack.SkipPixels = 0; + cPriv->Unpack.SkipRows = 0; + cPriv->Unpack.SwapBytes = GL_FALSE; + cPriv->Unpack.LsbFirst = GL_FALSE; + cPriv->ClearColor[0] = 0.0; cPriv->ClearColor[1] = 0.0; cPriv->ClearColor[2] = 0.0; @@ -208,7 +263,7 @@ FBWindowOriginBot | gDRIPriv->pprod); - if (gDRIPriv->numMXDevices == 2) { + if (gDRIPriv->numMultiDevices == 2) { cPriv->LBReadMode |= LBScanLineInt2; cPriv->FBReadMode |= FBScanLineInt2; cPriv->FBWindowBase =driScrnPriv->fbWidth*(driScrnPriv->fbHeight/2 - 1); @@ -354,14 +409,32 @@ cPriv->gammaScrnPriv = gPriv; - cPriv->LightingMode = LightingModeDisable; + cPriv->LightingMode = LightingModeDisable | LightingModeSpecularEnable; cPriv->Light0Mode = LNM_Off; cPriv->Light1Mode = LNM_Off; + cPriv->Light2Mode = LNM_Off; + cPriv->Light3Mode = LNM_Off; + cPriv->Light4Mode = LNM_Off; + cPriv->Light5Mode = LNM_Off; + cPriv->Light6Mode = LNM_Off; + cPriv->Light7Mode = LNM_Off; + cPriv->Light8Mode = LNM_Off; + cPriv->Light9Mode = LNM_Off; + cPriv->Light10Mode = LNM_Off; + cPriv->Light11Mode = LNM_Off; + cPriv->Light12Mode = LNM_Off; + cPriv->Light13Mode = LNM_Off; + cPriv->Light14Mode = LNM_Off; + cPriv->Light15Mode = LNM_Off; + cPriv->LogicalOpMode = LogicalOpModeDisable; + cPriv->MaterialMode = MaterialModeDisable; cPriv->ScissorMode = UserScissorDisable | ScreenScissorDisable; + cPriv->TransformMode = XM_UseModelViewProjMatrix; + driContextPriv->driverPrivate = cPriv; /* Initialize the HW to a known state */ @@ -511,7 +584,7 @@ CHECK_DMA_BUFFER(gCC, gCCPriv, 1); WRITE(gCCPriv->buf, GLINTWindow, gCCPriv->Window); - _glapi_set_dispatch(Dispatch); + _glapi_set_dispatch(gCCPriv->API); _gamma_Viewport(0, 0, driDrawPriv->w, driDrawPriv->h); } else { Index: xc/lib/GL/mesa/src/drv/i810/Imakefile diff -u xc/lib/GL/mesa/src/drv/i810/Imakefile:1.13 xc/lib/GL/mesa/src/drv/i810/Imakefile:1.19 --- xc/lib/GL/mesa/src/drv/i810/Imakefile:1.13 Tue Dec 12 18:24:27 2000 +++ xc/lib/GL/mesa/src/drv/i810/Imakefile Thu May 10 12:56:11 2001 @@ -1,315 +1,38 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i810/Imakefile,v 1.13 2000/12/12 23:24:27 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i810/Imakefile,v 1.19 2001/05/10 16:56:11 dawes Exp $ #include -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx +#if GlxUseBuiltInDRIDriver +#define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) +#define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) #define DoExtraLib SharedLibGlx #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx - -#if Malloc0ReturnsNull -ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#else +#define DoNormalLib SharedLibGlxWithoutPIC +#define DoSharedLib !SharedLibGlxWithoutPIC +#define DoExtrasLib NO +#define DoDebugLib NO +#define DoProfileLib NO #endif +#include "../common/Imakefile.inc" +#include "Imakefile.inc" +#include "../../Imakefile.inc" #ifdef i386Architecture -#if MesaUseMMX - MMX_DEFS = -DUSE_MMX_ASM -#endif -#if MesaUse3DNow - 3DNOW_DEFS = -DUSE_3DNOW_ASM -#endif -#if MesaUseKatmai - KATMAI_DEFS = -DUSE_KATMAI_ASM -#endif - ASM_DEFINES = -DUSE_X86_ASM $(MMX_DEFS) $(3DNOW_DEFS) $(KATMAI_DEFS) -#endif - -#if BuildXF86DRI - DRI_DEFINES = GlxDefines -DDRIVERTS - DRI_INCLUDES = -I../../../../dri -I../../../../glx \ - -I../../../dri \ - -I$(TOP)/include -I$(TOP)/include/GL \ - -I$(XF86OSSRC) -I$(SERVERSRC)/GL/dri \ - -I$(XF86DRIVERSRC)/i810 \ - -I../../../include -I../.. -I../common -I../../X +#include "../../X86/Imakefile.inc" #endif - -MESA_INCLUDES = -I. -I.. -I../../include \ - -I../../../../dri/drm - - DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(ASM_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) $(MESA_INCLUDES) $(DRI_INCLUDES) - - DRISRCS = ../../../dri/dri_mesa.c \ - ../../../../dri/dri_tmm.c - - DRIOBJS = ../../../dri/dri_mesa.o \ - ../../../../dri/dri_tmm.o - - DRMSRCS = ../../../../dri/drm/xf86drm.c \ - ../../../../dri/drm/xf86drmHash.c \ - ../../../../dri/drm/xf86drmRandom.c \ - ../../../../dri/drm/xf86drmSL.c - - DRMOBJS = ../../../../dri/drm/xf86drm.o \ - ../../../../dri/drm/xf86drmHash.o \ - ../../../../dri/drm/xf86drmRandom.o \ - ../../../../dri/drm/xf86drmSL.o - - I810SRCS = i810_xmesa.c \ - i810dd.c \ - i810pipeline.c \ - i810span.c \ - i810state.c \ - i810tex.c \ - i810tris.c \ - i810vb.c \ - i810fastpath.c \ - i810ioctl.c - - I810OBJS = i810_xmesa.o \ - i810dd.o \ - i810pipeline.o \ - i810span.o \ - i810state.o \ - i810tex.o \ - i810tris.o \ - i810vb.o \ - i810fastpath.o \ - i810ioctl.o - - MESASRCS = ../../aatriangle.c \ - ../../accum.c \ - ../../alpha.c \ - ../../alphabuf.c \ - ../../attrib.c \ - ../../bbox.c \ - ../../bitmap.c \ - ../../blend.c \ - ../../buffers.c \ - ../../clip.c \ - ../../colortab.c \ - ../../config.c \ - ../../context.c \ - ../../copypix.c \ - ../../cva.c \ - ../../debug_xform.c \ - ../../depth.c \ - ../../dlist.c \ - ../../drawpix.c \ - ../../enable.c \ - ../../enums.c \ - ../../eval.c \ - ../../extensions.c \ - ../../feedback.c \ - ../../fog.c \ - ../../get.c \ - ../../glapi.c \ - ../../glapinoop.c \ - ../../glthread.c \ - ../../hash.c \ - ../../image.c \ - ../../imaging.c \ - ../../light.c \ - ../../lines.c \ - ../../logic.c \ - ../../masking.c \ - ../../matrix.c \ - ../../mem.c \ - ../../mmath.c \ - ../../pb.c \ - ../../pipeline.c \ - ../../pixel.c \ - ../../pixeltex.c \ - ../../points.c \ - ../../polygon.c \ - ../../quads.c \ - ../../rastpos.c \ - ../../readpix.c \ - ../../rect.c \ - ../../scissor.c \ - ../../shade.c \ - ../../span.c \ - ../../stages.c \ - ../../state.c \ - ../../stencil.c \ - ../../teximage.c \ - ../../texobj.c \ - ../../texstate.c \ - ../../texture.c \ - ../../texutil.c \ - ../../translate.c \ - ../../triangle.c \ - ../../varray.c \ - ../../vb.c \ - ../../vbcull.c \ - ../../vbfill.c \ - ../../vbindirect.c \ - ../../vbrender.c \ - ../../vbxform.c \ - ../../vector.c \ - ../../vertices.c \ - ../../winpos.c \ - ../../xform.c \ - ../../zoom.c - - MESAOBJS = ../../aatriangle.o \ - ../../accum.o \ - ../../alpha.o \ - ../../alphabuf.o \ - ../../attrib.o \ - ../../bbox.o \ - ../../bitmap.o \ - ../../blend.o \ - ../../buffers.o \ - ../../clip.o \ - ../../colortab.o \ - ../../config.o \ - ../../context.o \ - ../../copypix.o \ - ../../cva.o \ - ../../debug_xform.o \ - ../../depth.o \ - ../../dlist.o \ - ../../drawpix.o \ - ../../enable.o \ - ../../enums.o \ - ../../eval.o \ - ../../extensions.o \ - ../../feedback.o \ - ../../fog.o \ - ../../get.o \ - ../../hash.o \ - ../../hint.o \ - ../../image.o \ - ../../imaging.o \ - ../../light.o \ - ../../lines.o \ - ../../logic.o \ - ../../masking.o \ - ../../matrix.o \ - ../../mem.o \ - ../../mmath.o \ - ../../pb.o \ - ../../pipeline.o \ - ../../pixel.o \ - ../../pixeltex.o \ - ../../points.o \ - ../../polygon.o \ - ../../quads.o \ - ../../rastpos.o \ - ../../readpix.o \ - ../../rect.o \ - ../../scissor.o \ - ../../shade.o \ - ../../span.o \ - ../../stages.o \ - ../../state.o \ - ../../stencil.o \ - ../../teximage.o \ - ../../texobj.o \ - ../../texstate.o \ - ../../texture.o \ - ../../texutil.o \ - ../../translate.o \ - ../../triangle.o \ - ../../varray.o \ - ../../vb.o \ - ../../vbcull.o \ - ../../vbfill.o \ - ../../vbindirect.o \ - ../../vbrender.o \ - ../../vbxform.o \ - ../../vector.o \ - ../../vertices.o \ - ../../winpos.o \ - ../../xform.o \ - ../../zoom.o - -#ifdef i386Architecture - X86_SRCS = ../../X86/common_x86.c \ - ../../X86/common_x86_asm.S \ - ../../X86/x86.c \ - ../../X86/x86_cliptest.S \ - ../../X86/x86_vertex.S \ - ../../X86/x86_xform_masked2.S \ - ../../X86/x86_xform_masked3.S \ - ../../X86/x86_xform_masked4.S \ - ../../X86/x86_xform_raw2.S \ - ../../X86/x86_xform_raw3.S \ - ../../X86/x86_xform_raw4.S - - X86_OBJS = ../../X86/common_x86.o \ - ../../X86/common_x86_asm.o \ - ../../X86/x86.o \ - ../../X86/x86_cliptest.o \ - ../../X86/x86_vertex.o \ - ../../X86/x86_xform_masked2.o \ - ../../X86/x86_xform_masked3.o \ - ../../X86/x86_xform_masked4.o \ - ../../X86/x86_xform_raw2.o \ - ../../X86/x86_xform_raw3.o \ - ../../X86/x86_xform_raw4.o -#if MesaUseMMX - MMX_SRCS = ../../X86/mmx_blend.S + DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(MESA_ASM_DEFINES) + INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES) - MMX_OBJS = ../../X86/mmx_blend.o -#endif - -#if MesaUse3DNow - 3DNOW_SRCS = ../../X86/3dnow.c \ - ../../X86/3dnow_norm_raw.S \ - ../../X86/3dnow_vertex.S \ - ../../X86/3dnow_xform_masked1.S \ - ../../X86/3dnow_xform_masked2.S \ - ../../X86/3dnow_xform_masked3.S \ - ../../X86/3dnow_xform_masked4.S \ - ../../X86/3dnow_xform_raw1.S \ - ../../X86/3dnow_xform_raw2.S \ - ../../X86/3dnow_xform_raw3.S \ - ../../X86/3dnow_xform_raw4.S - - 3DNOW_OBJS = ../../X86/3dnow.o \ - ../../X86/3dnow_norm_raw.o \ - ../../X86/3dnow_vertex.o \ - ../../X86/3dnow_xform_masked1.o \ - ../../X86/3dnow_xform_masked2.o \ - ../../X86/3dnow_xform_masked3.o \ - ../../X86/3dnow_xform_masked4.o \ - ../../X86/3dnow_xform_raw1.o \ - ../../X86/3dnow_xform_raw2.o \ - ../../X86/3dnow_xform_raw3.o \ - ../../X86/3dnow_xform_raw4.o -#endif + DRIOBJS = $(GLXLIBSRC)/mesa/dri/dri_mesa.o \ + $(GLXLIBSRC)/dri/dri_tmm.o -#if MesaUseKatmai - KATMAI_SRCS = ../../X86/katmai.c \ - ../../X86/katmai_norm_raw.S \ - ../../X86/katmai_vertex.S \ - ../../X86/katmai_xform_masked1.S \ - ../../X86/katmai_xform_masked2.S \ - ../../X86/katmai_xform_masked3.S \ - ../../X86/katmai_xform_masked4.S \ - ../../X86/katmai_xform_raw1.S \ - ../../X86/katmai_xform_raw2.S \ - ../../X86/katmai_xform_raw3.S \ - ../../X86/katmai_xform_raw4.S - - KATMAI_OBJS = ../../X86/katmai.o \ - ../../X86/katmai_norm_raw.o \ - ../../X86/katmai_vertex.o \ - ../../X86/katmai_xform_masked1.o \ - ../../X86/katmai_xform_masked2.o \ - ../../X86/katmai_xform_masked3.o \ - ../../X86/katmai_xform_masked4.o \ - ../../X86/katmai_xform_raw1.o \ - ../../X86/katmai_xform_raw2.o \ - ../../X86/katmai_xform_raw3.o \ - ../../X86/katmai_xform_raw4.o -#endif -#endif + DRMOBJS = $(GLXLIBSRC)/dri/drm/xf86drm.o \ + $(GLXLIBSRC)/dri/drm/xf86drmHash.o \ + $(GLXLIBSRC)/dri/drm/xf86drmRandom.o \ + $(GLXLIBSRC)/dri/drm/xf86drmSL.o #ifdef GlxSoProf LOSRCS = ../../../../lowpc.c @@ -318,50 +41,31 @@ LOOBJS = ../../../../lowpc.o HIOBJS = ../../../../highpc.o #endif - - ASMSRCS = $(X86_SRCS) $(MMX_SRCS) $(3DNOW_SRCS) $(KATMAI_SRCS) - ASMOBJS = $(X86_OBJS) $(MMX_OBJS) $(3DNOW_OBJS) $(KATMAI_OBJS) - - COMMONSRCS = ../common/mm.c ../common/hwlog.c - COMMONOBJS = ../common/mm.o ../common/hwlog.o - - SRCS = $(LOSRCS) $(DRISRCS) $(DRMSRCS) $(MESASRCS) \ - $(ASMSRCS) $(COMMONSRCS) $(I810SRCS) $(HISRCS) - OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(MESAOBJS) \ - $(ASMOBJS) $(COMMONOBJS) $(I810OBJS) $(HIOBJS) - -REQUIREDLIBS += MathLibrary -#if !GlxBuiltInI810 -REQUIREDLIBS += -L../../../.. -lGL -#endif + SRCS = $(I810SRCS) + OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ + $(MESA_ASM_OBJS) $(COMMONOBJS) $(I810OBJS) $(HIOBJS) -#if !GlxUseBuiltInDRIDriver -#undef DoNormalLib NormalLibGlx -#undef DoExtraLib SharedLibGlx -#undef DoDebugLib DebugLibGlx -#undef DoProfileLib ProfileLibGlx -#endif +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) #include LibraryObjectRule() -SubdirLibraryRule($(OBJS)) +SubdirLibraryRule($(I810OBJS)) NormalLintTarget($(SRCS)) #if !GlxUseBuiltInDRIDriver LIBNAME = i810_dri.so -ALL_OBJS = $(OBJS) -ALL_DEPS = DONE -SharedDepModuleTarget($(LIBNAME),$(ALL_DEPS),$(ALL_OBJS)) +SharedDriModuleTarget($(LIBNAME),DONE $(OBJS),$(OBJS)) InstallDynamicModule($(LIBNAME),$(MODULEDIR),dri) #ifdef GlxSoProf SOPROF_LIBNAME = _i810_dri_p -NormalDepLibraryTarget($(SOPROF_LIBNAME),$(ALL_DEPS),$(ALL_OBJS)) +NormalDepLibraryTarget($(SOPROF_LIBNAME),DONE $(OBJS),$(ALL_OBJS)) InstallLibrary($(SOPROF_LIBNAME),$(MODULEDIR)/dri) #endif #endif DependTarget() + Index: xc/lib/GL/mesa/src/drv/i810/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/drv/i810/Imakefile.inc:1.2 --- /dev/null Mon Jun 4 12:37:29 2001 +++ xc/lib/GL/mesa/src/drv/i810/Imakefile.inc Wed May 2 11:06:03 2001 @@ -0,0 +1,100 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i810/Imakefile.inc,v 1.2 2001/05/02 15:06:03 dawes Exp $ + +#ifndef MesaDrvSrcDir +#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv +#endif + +MESADRVSRCDIR = MesaDrvSrcDir + +#ifndef MesaDrvI810BuildDir +#define MesaDrvI810BuildDir /**/ +#endif +MESADRVI810BUILDDIR = MesaDrvI810BuildDir + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + +#if BuildXF86DRI + DRI_DEFINES = GlxDefines + DRI_INCLUDES = -I$(GLXLIBSRC)/dri -I$(GLXLIBSRC)/glx \ + -I$(INCLUDESRC) -I$(INCLUDESRC)/GL \ + -I$(GLXLIBSRC)/mesa/dri \ + -I$(SERVERSRC)/GL/dri \ + -I$(XF86OSSRC) \ + -I$(XF86DRIVERSRC)/i810 \ + -I$(GLXLIBSRC)/dri/drm +#endif + +MESA_INCLUDES = -I$(MESASRCDIR)/src -I$(MESADRVSRCDIR)/common \ + -I$(MESADRVSRCDIR)/i810 + X_INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) + + I810SRCS = $(MESADRVI810BUILDDIR)i810_xmesa.c \ + $(MESADRVI810BUILDDIR)i810dd.c \ + $(MESADRVI810BUILDDIR)i810pipeline.c \ + $(MESADRVI810BUILDDIR)i810span.c \ + $(MESADRVI810BUILDDIR)i810state.c \ + $(MESADRVI810BUILDDIR)i810tex.c \ + $(MESADRVI810BUILDDIR)i810tris.c \ + $(MESADRVI810BUILDDIR)i810vb.c \ + $(MESADRVI810BUILDDIR)i810fastpath.c \ + $(MESADRVI810BUILDDIR)i810ioctl.c + + I810OBJS = $(MESADRVI810BUILDDIR)i810_xmesa.o \ + $(MESADRVI810BUILDDIR)i810dd.o \ + $(MESADRVI810BUILDDIR)i810pipeline.o \ + $(MESADRVI810BUILDDIR)i810span.o \ + $(MESADRVI810BUILDDIR)i810state.o \ + $(MESADRVI810BUILDDIR)i810tex.o \ + $(MESADRVI810BUILDDIR)i810tris.o \ + $(MESADRVI810BUILDDIR)i810vb.o \ + $(MESADRVI810BUILDDIR)i810fastpath.o \ + $(MESADRVI810BUILDDIR)i810ioctl.o + + I810UOBJS = $(MESADRVI810BUILDDIR)unshared/i810_xmesa.o \ + $(MESADRVI810BUILDDIR)unshared/i810dd.o \ + $(MESADRVI810BUILDDIR)unshared/i810pipeline.o \ + $(MESADRVI810BUILDDIR)unshared/i810span.o \ + $(MESADRVI810BUILDDIR)unshared/i810state.o \ + $(MESADRVI810BUILDDIR)unshared/i810tex.o \ + $(MESADRVI810BUILDDIR)unshared/i810tris.o \ + $(MESADRVI810BUILDDIR)unshared/i810vb.o \ + $(MESADRVI810BUILDDIR)unshared/i810fastpath.o \ + $(MESADRVI810BUILDDIR)unshared/i810ioctl.o + + I810DOBJS = $(MESADRVI810BUILDDIR)debugger/i810_xmesa.o \ + $(MESADRVI810BUILDDIR)debugger/i810dd.o \ + $(MESADRVI810BUILDDIR)debugger/i810pipeline.o \ + $(MESADRVI810BUILDDIR)debugger/i810span.o \ + $(MESADRVI810BUILDDIR)debugger/i810state.o \ + $(MESADRVI810BUILDDIR)debugger/i810tex.o \ + $(MESADRVI810BUILDDIR)debugger/i810tris.o \ + $(MESADRVI810BUILDDIR)debugger/i810vb.o \ + $(MESADRVI810BUILDDIR)debugger/i810fastpath.o \ + $(MESADRVI810BUILDDIR)debugger/i810ioctl.o + + I810POBJS = $(MESADRVI810BUILDDIR)profiled/i810_xmesa.o \ + $(MESADRVI810BUILDDIR)profiled/i810dd.o \ + $(MESADRVI810BUILDDIR)profiled/i810pipeline.o \ + $(MESADRVI810BUILDDIR)profiled/i810span.o \ + $(MESADRVI810BUILDDIR)profiled/i810state.o \ + $(MESADRVI810BUILDDIR)profiled/i810tex.o \ + $(MESADRVI810BUILDDIR)profiled/i810tris.o \ + $(MESADRVI810BUILDDIR)profiled/i810vb.o \ + $(MESADRVI810BUILDDIR)profiled/i810fastpath.o \ + $(MESADRVI810BUILDDIR)profiled/i810ioctl.o + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(i810_xmesa.c, $(MESADRVSRCDIR)/i810) +LinkSourceFile(i810dd.c, $(MESADRVSRCDIR)/i810) +LinkSourceFile(i810pipeline.c, $(MESADRVSRCDIR)/i810) +LinkSourceFile(i810span.c, $(MESADRVSRCDIR)/i810) +LinkSourceFile(i810state.c, $(MESADRVSRCDIR)/i810) +LinkSourceFile(i810tex.c, $(MESADRVSRCDIR)/i810) +LinkSourceFile(i810tris.c, $(MESADRVSRCDIR)/i810) +LinkSourceFile(i810vb.c, $(MESADRVSRCDIR)/i810) +LinkSourceFile(i810fastpath.c, $(MESADRVSRCDIR)/i810) +LinkSourceFile(i810ioctl.c, $(MESADRVSRCDIR)/i810) +#endif + Index: xc/lib/GL/mesa/src/drv/i810/i810_3d_reg.h diff -u xc/lib/GL/mesa/src/drv/i810/i810_3d_reg.h:1.5 xc/lib/GL/mesa/src/drv/i810/i810_3d_reg.h:1.6 --- xc/lib/GL/mesa/src/drv/i810/i810_3d_reg.h:1.5 Sun Aug 27 22:43:11 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810_3d_reg.h Wed Mar 21 11:14:21 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810_3d_reg.h,v 1.5 2000/08/28 02:43:11 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810_3d_reg.h,v 1.6 2001/03/21 16:14:21 dawes Exp $ */ #ifndef I810_3D_REG_H #define I810_3D_REG_H @@ -113,8 +113,8 @@ #define LCS_LINEWIDTH_2_0 (0x4<<12) #define LCS_LINEWIDTH_3_0 (0x6<<12) #define LCS_UPDATE_ALPHA_INTERP (0x1<<11) -#define LCS_ALPHA_FLAT (0x0<<10) -#define LCS_ALPHA_INTERP (0x1<<10) +#define LCS_ALPHA_FLAT (0x1<<10) +#define LCS_ALPHA_INTERP (0x0<<10) #define LCS_UPDATE_FOG_INTERP (0x1<<9) #define LCS_FOG_INTERP (0x0<<8) #define LCS_FOG_FLAT (0x1<<8) Index: xc/lib/GL/mesa/src/drv/i810/i810_init.h diff -u xc/lib/GL/mesa/src/drv/i810/i810_init.h:1.4 xc/lib/GL/mesa/src/drv/i810/i810_init.h:1.5 --- xc/lib/GL/mesa/src/drv/i810/i810_init.h:1.4 Wed Aug 2 22:30:19 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810_init.h Wed Mar 21 11:14:21 2001 @@ -79,6 +79,7 @@ __DRIscreenPrivate *driScrnPriv; drmBufMapPtr bufs; int use_copy_buf; + unsigned int sarea_priv_offset; } i810ScreenPrivate; Index: xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c diff -u xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c:1.9 xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c:1.12 --- xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c:1.9 Thu Dec 7 15:26:06 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c Wed Mar 21 11:14:21 2001 @@ -24,7 +24,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c,v 1.9 2000/12/07 20:26:06 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c,v 1.12 2001/03/21 16:14:21 dawes Exp $ */ /* * Authors: @@ -135,9 +135,9 @@ { int major, minor, patch; if (XF86DRIQueryVersion(sPriv->display, &major, &minor, &patch)) { - if (major != 3 || minor != 0 || patch < 0) { + if (major != 4 || minor < 0) { char msg[1000]; - sprintf(msg, "i810 DRI driver expected DRI version 3.0.x but got version %d.%d.%d", major, minor, patch); + sprintf(msg, "i810 DRI driver expected DRI version 4.0.x but got version %d.%d.%d", major, minor, patch); __driMesaMessage(msg); return GL_FALSE; } @@ -146,8 +146,7 @@ /* Check that the DDX driver version is compatible */ if (sPriv->ddxMajor != 1 || - sPriv->ddxMinor != 0 || - sPriv->ddxPatch < 0) { + sPriv->ddxMinor < 0) { char msg[1000]; sprintf(msg, "i810 DRI driver expected DDX driver version 1.0.x but got version %d.%d.%d", sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch); __driMesaMessage(msg); @@ -156,10 +155,9 @@ /* Check that the DRM driver version is compatible */ if (sPriv->drmMajor != 1 || - sPriv->drmMinor != 1 || - sPriv->drmPatch < 0) { + sPriv->drmMinor < 1) { char msg[1000]; - sprintf(msg, "i810 DRI driver expected DRM driver version 1.0.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch); + sprintf(msg, "i810 DRI driver expected DRM driver version 1.1.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch); __driMesaMessage(msg); return GL_FALSE; } @@ -244,6 +242,7 @@ i810Screen->tex.handle = gDRIPriv->textures; i810Screen->tex.size = gDRIPriv->textureSize; + i810Screen->sarea_priv_offset = gDRIPriv->sarea_priv_offset; if (drmMap(sPriv->fd, i810Screen->tex.handle, @@ -316,7 +315,7 @@ __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; i810ScreenPrivate *i810Screen = (i810ScreenPrivate *)sPriv->private; drm_i810_sarea_t *saPriv=(drm_i810_sarea_t *)(((char*)sPriv->pSAREA)+ - sizeof(XF86DRISAREARec)); + i810Screen->sarea_priv_offset); imesa = (i810ContextPtr)Xcalloc(sizeof(i810Context), 1); if (!imesa) { Index: xc/lib/GL/mesa/src/drv/i810/i810dd.c diff -u xc/lib/GL/mesa/src/drv/i810/i810dd.c:1.4 xc/lib/GL/mesa/src/drv/i810/i810dd.c:1.5 --- xc/lib/GL/mesa/src/drv/i810/i810dd.c:1.4 Sun Sep 24 09:51:04 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810dd.c Tue Apr 10 12:07:50 2001 @@ -15,13 +15,13 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810dd.c,v 1.4 2000/09/24 13:51:04 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810dd.c,v 1.5 2001/04/10 16:07:50 dawes Exp $ */ #include "types.h" #include "vbrender.h" @@ -56,7 +56,7 @@ case GL_VENDOR: return (GLubyte *)"Keith Whitwell, Precision Insight Inc."; case GL_RENDERER: - return (GLubyte *)"Mesa DRI I810 20000510"; + return (GLubyte *)"Mesa DRI I810 20010321"; default: return 0; } @@ -65,10 +65,10 @@ static GLint i810GetParameteri(const GLcontext *ctx, GLint param) { switch (param) { - case DD_HAVE_HARDWARE_FOG: + case DD_HAVE_HARDWARE_FOG: return 1; default: - return 0; + return 0; } } @@ -76,7 +76,7 @@ static void i810BufferSize(GLcontext *ctx, GLuint *width, GLuint *height) { - i810ContextPtr imesa = I810_CONTEXT(ctx); + i810ContextPtr imesa = I810_CONTEXT(ctx); /* Need to lock to make sure the driDrawable is uptodate. This * information is used to resize Mesa's software buffers, so it has @@ -104,19 +104,19 @@ /* The imaging subset of 1.2 isn't supported by any mesa driver. */ gl_extensions_disable( ctx, "ARB_imaging" ); - gl_extensions_disable( ctx, "GL_ARB_texture_compression" ); - gl_extensions_disable( ctx, "GL_ARB_texture_cube_map" ); + gl_extensions_disable( ctx, "GL_ARB_texture_compression" ); + gl_extensions_disable( ctx, "GL_ARB_texture_cube_map" ); gl_extensions_disable( ctx, "GL_EXT_blend_color" ); gl_extensions_disable( ctx, "GL_EXT_blend_logic_op" ); gl_extensions_disable( ctx, "GL_EXT_blend_minmax" ); gl_extensions_disable( ctx, "GL_EXT_blend_subtract" ); - gl_extensions_disable( ctx, "GL_EXT_convolution" ); - gl_extensions_disable( ctx, "GL_EXT_texture_lod_bias" ); + gl_extensions_disable( ctx, "GL_EXT_convolution" ); + gl_extensions_disable( ctx, "GL_EXT_texture_lod_bias" ); gl_extensions_disable( ctx, "GL_INGR_blend_func_separate" ); - gl_extensions_disable( ctx, "GL_MESA_resize_buffers" ); - gl_extensions_disable( ctx, "GL_SGIX_pixel_texture" ); - gl_extensions_disable( ctx, "GL_SGI_color_matrix" ); - gl_extensions_disable( ctx, "GL_SGI_color_table" ); + gl_extensions_disable( ctx, "GL_MESA_resize_buffers" ); + gl_extensions_disable( ctx, "GL_SGIX_pixel_texture" ); + gl_extensions_disable( ctx, "GL_SGI_color_matrix" ); + gl_extensions_disable( ctx, "GL_SGI_color_table" ); /* We do support tex_env_add, however */ Index: xc/lib/GL/mesa/src/drv/i810/i810ioctl.c diff -u xc/lib/GL/mesa/src/drv/i810/i810ioctl.c:1.4 xc/lib/GL/mesa/src/drv/i810/i810ioctl.c:1.5 --- xc/lib/GL/mesa/src/drv/i810/i810ioctl.c:1.4 Sun Aug 27 22:43:11 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810ioctl.c Wed Mar 21 11:14:21 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810ioctl.c,v 1.4 2000/08/28 02:43:11 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810ioctl.c,v 1.5 2001/03/21 16:14:21 dawes Exp $ */ #include #include @@ -200,7 +200,6 @@ FLUSH_BATCH( imesa ); if (imesa->sarea->last_quiescent != imesa->sarea->last_enqueue) { - if (I810_DEBUG&DEBUG_VERBOSE_IOCTL) fprintf(stderr, "i810DmaFinish\n"); @@ -214,14 +213,22 @@ void i810RegetLockQuiescent( i810ContextPtr imesa ) { + /* XXX I disabled this conditional. Doing so fixes all the readpixels + * problems. The problem was that we'd sometimes read from the frame + * buffer (via the span functions) before rendering was completed. + * Taking out this conditional solves that problem. (BrianP) + * if (imesa->sarea->last_quiescent != imesa->sarea->last_enqueue) { + */ if (I810_DEBUG&DEBUG_VERBOSE_IOCTL) fprintf(stderr, "i810RegetLockQuiescent\n"); drmUnlock(imesa->driFd, imesa->hHWContext); i810GetLock( imesa, DRM_LOCK_QUIESCENT ); imesa->sarea->last_quiescent = imesa->sarea->last_enqueue; + /* } + */ } void i810WaitAgeLocked( i810ContextPtr imesa, int age ) Index: xc/lib/GL/mesa/src/drv/i810/i810span.c diff -u xc/lib/GL/mesa/src/drv/i810/i810span.c:1.2 xc/lib/GL/mesa/src/drv/i810/i810span.c:1.3 --- xc/lib/GL/mesa/src/drv/i810/i810span.c:1.2 Fri Jun 16 20:02:59 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810span.c Wed Mar 21 11:14:21 2001 @@ -30,26 +30,28 @@ dPriv->x * 2 + \ dPriv->y * pitch) -#define INIT_MONO_PIXEL(p) +#define INIT_MONO_PIXEL(p) #define CLIPPIXEL(_x,_y) (_x >= minx && _x < maxx && \ _y >= miny && _y < maxy) -#define CLIPSPAN(_x,_y,_n,_x1,_n1,_i) \ - if (_y < miny || _y >= maxy) _n1 = 0, _x1 = x; \ - else { \ - _n1 = _n; \ - _x1 = _x; \ - if (_x1 < minx) _i += (minx - _x1), _x1 = minx; \ - if (_x1 + _n1 >= maxx) n1 -= (_x1 + n1 - maxx) + 1; \ - } +#define CLIPSPAN( _x, _y, _n, _x1, _n1, _i ) \ + if ( _y < miny || _y >= maxy ) { \ + _n1 = 0, _x1 = x; \ + } else { \ + _n1 = _n; \ + _x1 = _x; \ + if ( _x1 < minx ) _i += (minx-_x1), n1 -= (minx-_x1), _x1 = minx; \ + if ( _x1 + _n1 >= maxx ) n1 -= (_x1 + n1 - maxx); \ + } #define Y_FLIP(_y) (height - _y - 1) - #define HW_LOCK() \ i810ContextPtr imesa = I810_CONTEXT(ctx); \ + FLUSH_BATCH(imesa); \ + i810DmaFinish(imesa); \ LOCK_HARDWARE_QUIESCENT(imesa); #define HW_CLIPLOOP() \ @@ -85,9 +87,9 @@ #define READ_RGBA( rgba, _x, _y ) \ do { \ GLushort p = *(GLushort *)(read_buf + _x*2 + _y*pitch); \ - rgba[0] = (p >> 8) & 0xf8; \ - rgba[1] = (p >> 3) & 0xfc; \ - rgba[2] = (p << 3) & 0xf8; \ + rgba[0] = (((p >> 11) & 0x1f) * 255) / 31; \ + rgba[1] = (((p >> 5) & 0x3f) * 255) / 63; \ + rgba[2] = (((p >> 0) & 0x1f) * 255) / 31; \ rgba[3] = 255; \ } while(0) @@ -128,7 +130,7 @@ *(GLushort *)(buf + _x*2 + _y*pitch) = d; #define READ_DEPTH( d, _x, _y ) \ - d = *(GLushort *)(buf + _x*2 + _y*pitch); + d = *(GLushort *)(buf + _x*2 + _y*pitch); /* d = 0xffff; */ @@ -144,7 +146,7 @@ ctx->Driver.WriteRGBSpan = i810WriteRGBSpan_565; ctx->Driver.WriteMonoRGBASpan = i810WriteMonoRGBASpan_565; ctx->Driver.WriteRGBAPixels = i810WriteRGBAPixels_565; - ctx->Driver.WriteMonoRGBAPixels = i810WriteMonoRGBAPixels_565; + ctx->Driver.WriteMonoRGBAPixels = i810WriteMonoRGBAPixels_565; ctx->Driver.ReadRGBASpan = i810ReadRGBASpan_565; ctx->Driver.ReadRGBAPixels = i810ReadRGBAPixels_565; } else { Index: xc/lib/GL/mesa/src/drv/i810/i810state.c diff -u xc/lib/GL/mesa/src/drv/i810/i810state.c:1.5 xc/lib/GL/mesa/src/drv/i810/i810state.c:1.6 --- xc/lib/GL/mesa/src/drv/i810/i810state.c:1.5 Fri Aug 25 09:42:21 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810state.c Wed Mar 21 11:14:21 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810state.c,v 1.5 2000/08/25 13:42:21 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810state.c,v 1.6 2001/03/21 16:14:21 dawes Exp $ */ #include @@ -63,11 +63,18 @@ static void i810DDBlendEquation(GLcontext *ctx, GLenum mode) { + i810ContextPtr imesa = I810_CONTEXT(ctx); + if (mode != GL_FUNC_ADD_EXT) { ctx->Color.BlendEquation = GL_FUNC_ADD_EXT; if (0) fprintf(stderr, "Unsupported blend equation: %s\n", gl_lookup_enum_by_nr(mode)); } + + if (ctx->Color.ColorLogicOpEnabled && ctx->Color.LogicOp != GL_COPY) + imesa->Fallback |= I810_FALLBACK_LOGICOP; + else + imesa->Fallback &= ~I810_FALLBACK_LOGICOP; } static void i810DDBlendFunc(GLcontext *ctx, GLenum sfactor, GLenum dfactor) @@ -175,6 +182,7 @@ GLubyte p[4]; int i,j,k; int active = (ctx->Polygon.StippleFlag && ctx->PB->primitive == GL_POLYGON); + GLuint newMask; FLUSH_BATCH(imesa); ctx->Driver.TriangleCaps |= DD_TRI_STIPPLE; @@ -184,10 +192,10 @@ imesa->Setup[I810_CTXREG_ST1] &= ~ST1_ENABLE; } - p[0] = mask[0] & 0xf; p[0] |= p[0] << 4; - p[1] = mask[4] & 0xf; p[1] |= p[1] << 4; - p[2] = mask[8] & 0xf; p[2] |= p[2] << 4; - p[3] = mask[12] & 0xf; p[3] |= p[3] << 4; + p[0] = mask[12] & 0xf; p[0] |= p[0] << 4; + p[1] = mask[8] & 0xf; p[1] |= p[1] << 4; + p[2] = mask[4] & 0xf; p[2] |= p[2] << 4; + p[3] = mask[0] & 0xf; p[3] |= p[3] << 4; for (k = 0 ; k < 8 ; k++) for (j = 0 ; j < 4; j++) @@ -196,12 +204,19 @@ ctx->Driver.TriangleCaps &= ~DD_TRI_STIPPLE; return; } - + + newMask = ((p[0] & 0xf) << 0) | + ((p[1] & 0xf) << 4) | + ((p[2] & 0xf) << 8) | + ((p[3] & 0xf) << 12); + if (newMask == 0xffff) { + /* do opaque stipple in software for conformance */ + ctx->Driver.TriangleCaps &= ~DD_TRI_STIPPLE; + return; + } + imesa->Setup[I810_CTXREG_ST1] &= ~0xffff; - imesa->Setup[I810_CTXREG_ST1] |= ( ((p[0] & 0xf) << 0) | - ((p[1] & 0xf) << 4) | - ((p[2] & 0xf) << 8) | - ((p[3] & 0xf) << 12) ); + imesa->Setup[I810_CTXREG_ST1] |= newMask; if (active) imesa->Setup[I810_CTXREG_ST1] |= ST1_ENABLE; @@ -244,10 +259,10 @@ static void i810DDLogicOp( GLcontext *ctx, GLenum opcode ) { + i810ContextPtr imesa = I810_CONTEXT(ctx); + if (ctx->Color.ColorLogicOpEnabled) { - i810ContextPtr imesa = I810_CONTEXT(ctx); - FLUSH_BATCH( imesa ); if (opcode == GL_COPY) @@ -255,6 +270,8 @@ else imesa->Fallback |= I810_FALLBACK_LOGICOP; } + else + imesa->Fallback &= ~I810_FALLBACK_LOGICOP; } static GLboolean i810DDSetDrawBuffer(GLcontext *ctx, GLenum mode ) @@ -430,26 +447,23 @@ GLboolean b, GLboolean a ) { i810ContextPtr imesa = I810_CONTEXT( ctx ); - GLuint tmp = 0; - GLuint rv = 1; - - imesa->Fallback &= ~I810_FALLBACK_COLORMASK; + GLuint tmp; - if (r && g && b) { - tmp = imesa->Setup[I810_CTXREG_B2] | B2_FB_WRITE_ENABLE; - } else if (!r && !g && !b) { - tmp = imesa->Setup[I810_CTXREG_B2] & ~B2_FB_WRITE_ENABLE; - } else { - rv = 0; + if (r && g && b) + imesa->Fallback &= ~I810_FALLBACK_COLORMASK; + else imesa->Fallback |= I810_FALLBACK_COLORMASK; - } - + + tmp = imesa->Setup[I810_CTXREG_B2] | + (B2_FB_WRITE_ENABLE | B2_UPDATE_FB_WRITE_ENABLE); + if (tmp != imesa->Setup[I810_CTXREG_B2]) { FLUSH_BATCH(imesa); imesa->Setup[I810_CTXREG_B2] = tmp; + imesa->dirty |= I810_UPLOAD_CTX; } - return rv; + return GL_FALSE; /* makes s/w path always do s/w masking */ } /* Seperate specular not fully implemented in hardware... Needs @@ -529,6 +543,13 @@ imesa->Setup[I810_CTXREG_B1] &= ~B1_BLEND_ENABLE; if (state) imesa->Setup[I810_CTXREG_B1] |= B1_BLEND_ENABLE; + + /* For some reason enable(GL_BLEND) affects ColorLogicOpEnabled. + */ + if (ctx->Color.ColorLogicOpEnabled && ctx->Color.LogicOp != GL_COPY) + imesa->Fallback |= I810_FALLBACK_LOGICOP; + else + imesa->Fallback &= ~I810_FALLBACK_LOGICOP; break; case GL_DEPTH_TEST: FLUSH_BATCH(imesa); @@ -609,19 +630,8 @@ case GL_TEXTURE_2D: FLUSH_BATCH(imesa); imesa->new_state |= I810_NEW_TEXTURE; - imesa->dirty |= I810_UPLOAD_CTX; - if (ctx->Texture.CurrentUnit == 0) { - imesa->Setup[I810_CTXREG_MT] &= ~MT_TEXEL0_ENABLE; - if (state) - imesa->Setup[I810_CTXREG_MT] |= MT_TEXEL0_ENABLE; - } else { - imesa->Setup[I810_CTXREG_MT] &= ~MT_TEXEL1_ENABLE; - if (state) - imesa->Setup[I810_CTXREG_MT] |= MT_TEXEL1_ENABLE; - } break; case GL_COLOR_LOGIC_OP: - case GL_INDEX_LOGIC_OP: FLUSH_BATCH( imesa ); imesa->Fallback &= ~I810_FALLBACK_LOGICOP; if (state && ctx->Color.LogicOp != GL_COPY) @@ -980,8 +990,8 @@ #define INTERESTED (~(NEW_MODELVIEW|NEW_PROJECTION|\ NEW_TEXTURE_MATRIX|\ - NEW_USER_CLIP|NEW_CLIENT_STATE|\ - NEW_TEXTURE_ENABLE)) + NEW_USER_CLIP|NEW_CLIENT_STATE)) + void i810DDUpdateState( GLcontext *ctx ) { Index: xc/lib/GL/mesa/src/drv/i810/i810tex.c diff -u xc/lib/GL/mesa/src/drv/i810/i810tex.c:1.4 xc/lib/GL/mesa/src/drv/i810/i810tex.c:1.6 --- xc/lib/GL/mesa/src/drv/i810/i810tex.c:1.4 Wed Nov 8 00:02:43 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810tex.c Wed Mar 21 11:14:21 2001 @@ -194,10 +194,10 @@ switch( image->Format ) { case GL_RGB: case GL_LUMINANCE: - case GL_ALPHA: t->texelBytes = 2; textureFormat = MI1_FMT_16BPP | MI1_PF_16BPP_RGB565; break; + case GL_ALPHA: case GL_LUMINANCE_ALPHA: case GL_INTENSITY: case GL_RGBA: @@ -705,44 +705,50 @@ struct gl_texture_object *tObj; i810TextureObjectPtr t; int ma_modulate_op; - - - tObj = ctx->Texture.Unit[0].Current; + int format; - if ( tObj != ctx->Texture.Unit[0].CurrentD[2] ) - tObj = 0; - - + /* disable */ + imesa->Setup[I810_CTXREG_MT] &= ~MT_TEXEL0_ENABLE; imesa->Setup[I810_CTXREG_MC0] = ( GFX_OP_MAP_COLOR_STAGES | - MC_STAGE_0 | - MC_UPDATE_DEST | - MC_DEST_CURRENT | - MC_UPDATE_ARG1 | - MC_ARG1_ITERATED_COLOR | - MC_UPDATE_ARG2 | - MC_ARG2_ONE | - MC_UPDATE_OP | - MC_OP_ARG1 ); - + MC_STAGE_0 | + MC_UPDATE_DEST | + MC_DEST_CURRENT | + MC_UPDATE_ARG1 | + MC_ARG1_ITERATED_COLOR | + MC_UPDATE_ARG2 | + MC_ARG2_ONE | + MC_UPDATE_OP | + MC_OP_ARG1 ); imesa->Setup[I810_CTXREG_MA0] = ( GFX_OP_MAP_ALPHA_STAGES | - MA_STAGE_0 | - MA_UPDATE_ARG1 | - MA_ARG1_ITERATED_ALPHA | - MA_UPDATE_ARG2 | - MA_ARG2_TEX0_ALPHA | - MA_UPDATE_OP | - MA_OP_ARG1 ); - + MA_STAGE_0 | + MA_UPDATE_ARG1 | + MA_ARG1_ITERATED_ALPHA | + MA_UPDATE_ARG2 | + MA_ARG2_TEX0_ALPHA | + MA_UPDATE_OP | + MA_OP_ARG1 ); + + if (ctx->Texture.Unit[0].ReallyEnabled == 0) { + return; + } - if (!(ctx->Texture.ReallyEnabled & 0xf) || !tObj || !tObj->Complete) { + tObj = ctx->Texture.Unit[0].Current; + if (ctx->Texture.Unit[0].ReallyEnabled != TEXTURE0_2D || + tObj->Image[tObj->BaseLevel]->Border > 0) { + /* 1D or 3D texturing enabled, or texture border - fallback */ + imesa->Fallback |= I810_FALLBACK_TEXTURE; return; } + /* Do 2D texture setup */ + + imesa->Setup[I810_CTXREG_MT] |= MT_TEXEL0_ENABLE; + t = tObj->DriverData; - if (!t) { t = i810CreateTexObj( imesa, tObj ); - if (!t) return; + if (!t) + return; } if (t->current_unit != 0) @@ -757,9 +763,11 @@ if (t->MemBlock) i810UpdateTexLRU( imesa, t ); + format = t->image[0].internalFormat; + switch (ctx->Texture.Unit[0].EnvMode) { case GL_REPLACE: - if (t->image[0].internalFormat == GL_ALPHA) + if (format == GL_ALPHA) imesa->Setup[I810_CTXREG_MC0] = ( GFX_OP_MAP_COLOR_STAGES | MC_STAGE_0 | MC_UPDATE_DEST | @@ -782,7 +790,7 @@ MC_UPDATE_OP | MC_OP_ARG1 ); - if (t->image[0].internalFormat == GL_RGB) { + if (format == GL_RGB) { ma_modulate_op = MA_OP_ARG1; } else { ma_modulate_op = MA_OP_ARG2; @@ -809,7 +817,7 @@ MC_UPDATE_OP | MC_OP_MODULATE ); - if (t->image[0].internalFormat == GL_RGB) { + if (format == GL_RGB) { ma_modulate_op = MA_OP_ARG1; } else { ma_modulate_op = MA_OP_MODULATE; @@ -826,30 +834,74 @@ break; case GL_ADD: - imesa->Setup[I810_CTXREG_MC0] = ( GFX_OP_MAP_COLOR_STAGES | - MC_STAGE_0 | - MC_UPDATE_DEST | - MC_DEST_CURRENT | - MC_UPDATE_ARG1 | - MC_ARG1_TEX0_COLOR | - MC_UPDATE_ARG2 | - MC_ARG2_ITERATED_COLOR | - MC_UPDATE_OP | - MC_OP_ADD ); + if (format == GL_ALPHA) { + /* Cv = Cf */ + imesa->Setup[I810_CTXREG_MC0] = ( GFX_OP_MAP_COLOR_STAGES | + MC_STAGE_0 | + MC_UPDATE_DEST | + MC_DEST_CURRENT | + MC_UPDATE_ARG1 | + MC_ARG1_TEX0_COLOR | + MC_UPDATE_ARG2 | + MC_ARG2_ITERATED_COLOR | + MC_UPDATE_OP | + MC_OP_ARG2 ); + } + else { + /* Cv = Cf + Ct */ + imesa->Setup[I810_CTXREG_MC0] = ( GFX_OP_MAP_COLOR_STAGES | + MC_STAGE_0 | + MC_UPDATE_DEST | + MC_DEST_CURRENT | + MC_UPDATE_ARG1 | + MC_ARG1_TEX0_COLOR | + MC_UPDATE_ARG2 | + MC_ARG2_ITERATED_COLOR | + MC_UPDATE_OP | + MC_OP_ADD ); + } - imesa->Setup[I810_CTXREG_MA0] = ( GFX_OP_MAP_ALPHA_STAGES | - MA_STAGE_0 | - MA_UPDATE_ARG1 | - MA_ARG1_ITERATED_ALPHA | - MA_UPDATE_ARG2 | - MA_ARG2_TEX0_ALPHA | - MA_UPDATE_OP | - MA_OP_ADD ); + /* alpha */ + if (format == GL_ALPHA || + format == GL_LUMINANCE_ALPHA || + format == GL_RGBA) { + /* Av = Af * At */ + imesa->Setup[I810_CTXREG_MA0] = ( GFX_OP_MAP_ALPHA_STAGES | + MA_STAGE_0 | + MA_UPDATE_ARG1 | + MA_ARG1_ITERATED_ALPHA | + MA_UPDATE_ARG2 | + MA_ARG2_TEX0_ALPHA | + MA_UPDATE_OP | + MA_OP_MODULATE ); + } + else if (format == GL_LUMINANCE || format == GL_RGB) { + /* Av = Af */ + imesa->Setup[I810_CTXREG_MA0] = ( GFX_OP_MAP_ALPHA_STAGES | + MA_STAGE_0 | + MA_UPDATE_ARG1 | + MA_ARG1_ITERATED_ALPHA | + MA_UPDATE_ARG2 | + MA_ARG2_ITERATED_ALPHA | + MA_UPDATE_OP | + MA_OP_ARG1 ); + } + else { + /* Av = Af + At */ + imesa->Setup[I810_CTXREG_MA0] = ( GFX_OP_MAP_ALPHA_STAGES | + MA_STAGE_0 | + MA_UPDATE_ARG1 | + MA_ARG1_ITERATED_ALPHA | + MA_UPDATE_ARG2 | + MA_ARG2_TEX0_ALPHA | + MA_UPDATE_OP | + MA_OP_ADD ); + } break; case GL_DECAL: - - if (t->image[0].internalFormat == GL_RGB) { + if (format == GL_RGB) { + /* C = Ct */ imesa->Setup[I810_CTXREG_MC0] = ( GFX_OP_MAP_COLOR_STAGES | MC_STAGE_0 | MC_UPDATE_DEST | @@ -862,29 +914,32 @@ MC_OP_ARG2 ); } else { + /* RGBA or undefined result */ + /* C = Cf*(1-At)+Ct*At */ imesa->Setup[I810_CTXREG_MC0] = ( GFX_OP_MAP_COLOR_STAGES | MC_STAGE_0 | MC_UPDATE_DEST | MC_DEST_CURRENT | MC_UPDATE_ARG1 | - MC_ARG1_COLOR_FACTOR | + MC_ARG1_TEX0_COLOR | MC_UPDATE_ARG2 | - MC_ARG2_TEX0_COLOR | + MC_ARG2_ITERATED_COLOR | MC_UPDATE_OP | MC_OP_LIN_BLEND_TEX0_ALPHA ); } + /* Av = Af */ imesa->Setup[I810_CTXREG_MA0] = ( GFX_OP_MAP_ALPHA_STAGES | MA_STAGE_0 | MA_UPDATE_ARG1 | - MA_ARG1_ALPHA_FACTOR | + MA_ARG1_ITERATED_ALPHA | MA_UPDATE_ARG2 | - MA_ARG2_ALPHA_FACTOR | + MA_ARG2_ITERATED_ALPHA | MA_UPDATE_OP | MA_OP_ARG1 ); break; case GL_BLEND: - if (t->image[0].internalFormat == GL_ALPHA) + if (format == GL_ALPHA) imesa->Setup[I810_CTXREG_MC0] = ( GFX_OP_MAP_COLOR_STAGES | MC_STAGE_0 | MC_UPDATE_DEST | @@ -907,7 +962,20 @@ MC_UPDATE_OP | MC_OP_LIN_BLEND_TEX0_COLOR ); - if (t->image[0].internalFormat == GL_RGB) { + /* alpha */ + if (format == GL_LUMINANCE || format == GL_RGB) { + /* Av = Af */ + imesa->Setup[I810_CTXREG_MA0] = ( GFX_OP_MAP_ALPHA_STAGES | + MA_STAGE_0 | + MA_UPDATE_ARG1 | + MA_ARG1_ITERATED_ALPHA | + MA_UPDATE_ARG2 | + MA_ARG2_ITERATED_ALPHA | + MA_UPDATE_OP | + MA_OP_ARG1 ); + } + else if (format == GL_INTENSITY) { + /* Av = Af(1-It)+AcIt */ imesa->Setup[I810_CTXREG_MA0] = ( GFX_OP_MAP_ALPHA_STAGES | MA_STAGE_0 | MA_UPDATE_ARG1 | @@ -915,16 +983,17 @@ MA_UPDATE_ARG2 | MA_ARG2_ITERATED_ALPHA | MA_UPDATE_OP | - MA_OP_ARG1 ); + MA_OP_LIN_BLEND_TEX0_ALPHA ); } else { + /* Av = AfAt */ imesa->Setup[I810_CTXREG_MA0] = ( GFX_OP_MAP_ALPHA_STAGES | MA_STAGE_0 | MA_UPDATE_ARG1 | - MA_ARG1_ALPHA_FACTOR | + MA_ARG1_TEX0_ALPHA | MA_UPDATE_ARG2 | MA_ARG2_ITERATED_ALPHA | MA_UPDATE_OP | - MA_OP_LIN_BLEND_TEX0_ALPHA ); + MA_OP_MODULATE ); } break; @@ -942,50 +1011,56 @@ i810ContextPtr imesa = I810_CONTEXT(ctx); struct gl_texture_object *tObj; i810TextureObjectPtr t; - int ma_modulate_op; - - - tObj = ctx->Texture.Unit[1].Current; - - if ( tObj != ctx->Texture.Unit[1].CurrentD[2] ) - tObj = 0; - + int ma_modulate_op, format; + /* disable */ + imesa->Setup[I810_CTXREG_MT] &= ~MT_TEXEL1_ENABLE; imesa->Setup[I810_CTXREG_MC1] = ( GFX_OP_MAP_COLOR_STAGES | - MC_STAGE_1 | - MC_UPDATE_DEST | - MC_DEST_CURRENT | - MC_UPDATE_ARG1 | - MC_ARG1_ONE | - MC_ARG1_DONT_REPLICATE_ALPHA | - MC_ARG1_DONT_INVERT | - MC_UPDATE_ARG2 | - MC_ARG2_ONE | - MC_ARG2_DONT_REPLICATE_ALPHA | - MC_ARG2_DONT_INVERT | - MC_UPDATE_OP | - MC_OP_DISABLE ); - + MC_STAGE_1 | + MC_UPDATE_DEST | + MC_DEST_CURRENT | + MC_UPDATE_ARG1 | + MC_ARG1_ONE | + MC_ARG1_DONT_REPLICATE_ALPHA | + MC_ARG1_DONT_INVERT | + MC_UPDATE_ARG2 | + MC_ARG2_ONE | + MC_ARG2_DONT_REPLICATE_ALPHA | + MC_ARG2_DONT_INVERT | + MC_UPDATE_OP | + MC_OP_DISABLE ); imesa->Setup[I810_CTXREG_MA1] = ( GFX_OP_MAP_ALPHA_STAGES | - MA_STAGE_1 | - MA_UPDATE_ARG1 | - MA_ARG1_CURRENT_ALPHA | - MA_ARG1_DONT_INVERT | - MA_UPDATE_ARG2 | - MA_ARG2_CURRENT_ALPHA | - MA_ARG2_DONT_INVERT | - MA_UPDATE_OP | - MA_OP_ARG1 ); + MA_STAGE_1 | + MA_UPDATE_ARG1 | + MA_ARG1_CURRENT_ALPHA | + MA_ARG1_DONT_INVERT | + MA_UPDATE_ARG2 | + MA_ARG2_CURRENT_ALPHA | + MA_ARG2_DONT_INVERT | + MA_UPDATE_OP | + MA_OP_ARG1 ); - if (!(ctx->Texture.ReallyEnabled & 0xf0) || !tObj || !tObj->Complete) { + if (ctx->Texture.Unit[1].ReallyEnabled == 0) { return; } + tObj = ctx->Texture.Unit[1].Current; + if (ctx->Texture.Unit[1].ReallyEnabled != TEXTURE0_2D || + tObj->Image[tObj->BaseLevel]->Border > 0) { + /* 1D or 3D texturing enabled, or texture border - fallback */ + imesa->Fallback |= I810_FALLBACK_TEXTURE; + return; + } + + /* Do 2D texture setup */ + + imesa->Setup[I810_CTXREG_MT] |= MT_TEXEL1_ENABLE; + t = tObj->DriverData; - if (!t) { t = i810CreateTexObj( imesa, tObj ); - if (!t) return; + if (!t) + return; } if (t->current_unit != 1) @@ -1000,6 +1075,8 @@ if (t->MemBlock) i810UpdateTexLRU( imesa, t ); + format = t->image[0].internalFormat; + switch (ctx->Texture.Unit[1].EnvMode) { case GL_REPLACE: imesa->Setup[I810_CTXREG_MC1] = ( GFX_OP_MAP_COLOR_STAGES | @@ -1013,7 +1090,7 @@ MC_UPDATE_OP | MC_OP_ARG1 ); - if (t->image[0].internalFormat == GL_RGB) { + if (format == GL_RGB) { ma_modulate_op = MA_OP_ARG1; } else { ma_modulate_op = MA_OP_ARG2; @@ -1040,7 +1117,7 @@ MC_UPDATE_OP | MC_OP_MODULATE ); - if (t->image[0].internalFormat == GL_RGB) { + if (format == GL_RGB) { ma_modulate_op = MA_OP_ARG1; } else { ma_modulate_op = MA_OP_MODULATE; @@ -1068,7 +1145,7 @@ MC_UPDATE_OP | MC_OP_ADD ); - if (t->image[0].internalFormat == GL_RGB) { + if (format == GL_RGB) { ma_modulate_op = MA_OP_ARG1; } else { ma_modulate_op = MA_OP_ADD; @@ -1086,7 +1163,7 @@ case GL_DECAL: - if (t->image[0].internalFormat == GL_RGB) { + if (format == GL_RGB) { imesa->Setup[I810_CTXREG_MC1] = ( GFX_OP_MAP_COLOR_STAGES | MC_STAGE_1 | MC_UPDATE_DEST | @@ -1133,7 +1210,7 @@ MC_UPDATE_OP | MC_OP_LIN_BLEND_TEX1_COLOR ); - if (t->image[0].internalFormat == GL_RGB) { + if (format == GL_RGB) { imesa->Setup[I810_CTXREG_MA1] = ( GFX_OP_MAP_ALPHA_STAGES | MA_STAGE_1 | MA_UPDATE_ARG1 | @@ -1169,11 +1246,12 @@ if (imesa->CurrentTexObj[1]) imesa->CurrentTexObj[1]->bound = 0; imesa->CurrentTexObj[0] = 0; imesa->CurrentTexObj[1] = 0; + imesa->Fallback &= ~I810_FALLBACK_TEXTURE; i810UpdateTex0State( ctx ); i810UpdateTex1State( ctx ); I810_CONTEXT( ctx )->dirty |= (I810_UPLOAD_CTX | - I810_UPLOAD_TEX0 | - I810_UPLOAD_TEX1); + I810_UPLOAD_TEX0 | + I810_UPLOAD_TEX1); } @@ -1196,13 +1274,17 @@ struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - GLfloat *fc = texUnit->EnvColor; - GLuint col; - - col = ((((GLubyte)fc[3])<<24) | - (((GLubyte)fc[0])<<16) | - (((GLubyte)fc[1])<<8) | - (((GLubyte)fc[2])<<0)); + const GLfloat *fc = texUnit->EnvColor; + GLuint r, g, b, a, col; + FLOAT_COLOR_TO_UBYTE_COLOR(r, fc[0]); + FLOAT_COLOR_TO_UBYTE_COLOR(g, fc[1]); + FLOAT_COLOR_TO_UBYTE_COLOR(b, fc[2]); + FLOAT_COLOR_TO_UBYTE_COLOR(a, fc[3]); + + col = ((a << 24) | + (r << 16) | + (g << 8) | + (b << 0)); if (imesa->Setup[I810_CTXREG_CF1] != col) { FLUSH_BATCH(imesa); Index: xc/lib/GL/mesa/src/drv/i810/i810tris.h diff -u xc/lib/GL/mesa/src/drv/i810/i810tris.h:1.8 xc/lib/GL/mesa/src/drv/i810/i810tris.h:1.9 --- xc/lib/GL/mesa/src/drv/i810/i810tris.h:1.8 Mon Dec 4 14:21:43 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810tris.h Wed Mar 21 11:14:21 2001 @@ -22,7 +22,7 @@ * * */ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810tris.h,v 1.8 2000/12/04 19:21:43 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810tris.h,v 1.9 2001/03/21 16:14:21 dawes Exp $ */ #ifndef I810TRIS_INC #define I810TRIS_INC @@ -87,40 +87,42 @@ { int vertsize = imesa->vertsize; GLuint *vb = i810AllocDwordsInline( imesa, 6 * vertsize ); + const GLfloat x = tmp->v.x + 0.125; + const GLfloat y = tmp->v.y - 0.5F; int j; - *(float *)&vb[0] = tmp->v.x - sz; - *(float *)&vb[1] = tmp->v.y - sz; + *(float *)&vb[0] = x - sz; + *(float *)&vb[1] = y - sz; for (j = 2 ; j < vertsize ; j++) vb[j] = tmp->ui[j]; vb += vertsize; - *(float *)&vb[0] = tmp->v.x + sz; - *(float *)&vb[1] = tmp->v.y - sz; + *(float *)&vb[0] = x + sz; + *(float *)&vb[1] = y - sz; for (j = 2 ; j < vertsize ; j++) vb[j] = tmp->ui[j]; vb += vertsize; - *(float *)&vb[0] = tmp->v.x + sz; - *(float *)&vb[1] = tmp->v.y + sz; + *(float *)&vb[0] = x + sz; + *(float *)&vb[1] = y + sz; for (j = 2 ; j < vertsize ; j++) vb[j] = tmp->ui[j]; vb += vertsize; - *(float *)&vb[0] = tmp->v.x + sz; - *(float *)&vb[1] = tmp->v.y + sz; + *(float *)&vb[0] = x + sz; + *(float *)&vb[1] = y + sz; for (j = 2 ; j < vertsize ; j++) vb[j] = tmp->ui[j]; vb += vertsize; - *(float *)&vb[0] = tmp->v.x - sz; - *(float *)&vb[1] = tmp->v.y + sz; + *(float *)&vb[0] = x - sz; + *(float *)&vb[1] = y + sz; for (j = 2 ; j < vertsize ; j++) vb[j] = tmp->ui[j]; vb += vertsize; - *(float *)&vb[0] = tmp->v.x - sz; - *(float *)&vb[1] = tmp->v.y - sz; + *(float *)&vb[0] = x - sz; + *(float *)&vb[1] = y - sz; for (j = 2 ; j < vertsize ; j++) vb[j] = tmp->ui[j]; } @@ -143,13 +145,33 @@ : "=%c" (j) : "0" (vertsize), "S" ((long)v1) : "memory" ); +#elif 0 + for (j = 0 ; j < vertsize ; j++) + vb[j] = v0->ui[j]; + + vb += vertsize; + for (j = 0 ; j < vertsize ; j++) + vb[j] = v1->ui[j]; #else + const GLfloat dx = -0.5; + const GLfloat dy = -0.5; + + v0->v.x += dx; + v0->v.y += dy; + v1->v.x += dx; + v1->v.y += dy; + for (j = 0 ; j < vertsize ; j++) vb[j] = v0->ui[j]; vb += vertsize; for (j = 0 ; j < vertsize ; j++) vb[j] = v1->ui[j]; + + v0->v.x -= dx; + v0->v.y -= dy; + v1->v.x -= dx; + v1->v.y -= dy; #endif } Index: xc/lib/GL/mesa/src/drv/i810/i810vb.c diff -u xc/lib/GL/mesa/src/drv/i810/i810vb.c:1.7 xc/lib/GL/mesa/src/drv/i810/i810vb.c:1.8 --- xc/lib/GL/mesa/src/drv/i810/i810vb.c:1.7 Wed Nov 8 00:02:43 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810vb.c Wed Mar 21 11:14:21 2001 @@ -22,7 +22,7 @@ * * */ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810vb.c,v 1.7 2000/11/08 05:02:43 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810vb.c,v 1.8 2001/03/21 16:14:21 dawes Exp $ */ #include #include @@ -87,16 +87,19 @@ #define COORD \ GLfloat *win = VB->Win.data[i]; \ - v->v.x = win[0]; \ - v->v.y = i810height - win[1]; \ - v->v.z = (1.0/0x10000) * win[2]; \ + v->v.x = xoffset + win[0]; \ + v->v.y = yoffset - win[1]; \ + v->v.z = (1.0/0x10000) * win[2]; \ v->v.oow = win[3]; #define NOP +#define SUBPIXEL_X -0.5 +#define SUBPIXEL_Y -0.375 + #define SETUPFUNC(name,win,col,tex0,tex1,tex0_4,spec,fog) \ static void name(struct vertex_buffer *VB, GLuint start, GLuint end) \ { \ @@ -105,9 +108,12 @@ i810VertexPtr v; \ GLfloat (*tc0)[4]; \ GLfloat (*tc1)[4]; \ - GLfloat i810height = dPriv->h; \ + const GLfloat xoffset = SUBPIXEL_X; \ + const GLfloat yoffset = dPriv->h + SUBPIXEL_Y; \ int i; \ - (void) i810height; (void) imesa; \ + (void) xoffset; \ + (void) yoffset; \ + (void) imesa; \ \ \ gl_import_client_data( VB, VB->ctx->RenderFlags, \ @@ -269,7 +275,7 @@ funcindex |= I810_TEX0_BIT; if (ctx->Texture.ReallyEnabled & 0xf0) { - funcindex |= I810_TEX1_BIT; + funcindex |= (I810_TEX0_BIT | I810_TEX1_BIT); imesa->vertsize = 10; imesa->Setup[I810_CTXREG_VF] = I810_VFMT_T0T1; } Index: xc/lib/GL/mesa/src/drv/mga/Imakefile diff -u xc/lib/GL/mesa/src/drv/mga/Imakefile:1.13 xc/lib/GL/mesa/src/drv/mga/Imakefile:1.20 --- xc/lib/GL/mesa/src/drv/mga/Imakefile:1.13 Tue Dec 12 18:24:28 2000 +++ xc/lib/GL/mesa/src/drv/mga/Imakefile Thu May 10 12:56:11 2001 @@ -1,323 +1,39 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/mga/Imakefile,v 1.13 2000/12/12 23:24:28 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/mga/Imakefile,v 1.20 2001/05/10 16:56:11 dawes Exp $ #include -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx +#if GlxUseBuiltInDRIDriver +#define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) +#define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) #define DoExtraLib SharedLibGlx #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx - -#if Malloc0ReturnsNull -ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#else +#define DoNormalLib SharedLibGlxWithoutPIC +#define DoSharedLib !SharedLibGlxWithoutPIC +#define DoExtrasLib NO +#define DoDebugLib NO +#define DoProfileLib NO #endif +#include "../common/Imakefile.inc" +#include "Imakefile.inc" +#include "../../Imakefile.inc" #ifdef i386Architecture -#if MesaUseMMX - MMX_DEFS = -DUSE_MMX_ASM -#endif -#if MesaUse3DNow - 3DNOW_DEFS = -DUSE_3DNOW_ASM -#endif -#if MesaUseKatmai - KATMAI_DEFS = -DUSE_KATMAI_ASM -#endif - ASM_DEFINES = -DUSE_X86_ASM $(MMX_DEFS) $(3DNOW_DEFS) $(KATMAI_DEFS) -#endif - -#if BuildXF86DRI - DRI_DEFINES = GlxDefines -DDRIVERTS - DRI_INCLUDES = -I../../../../dri -I../../../../glx \ - -I../../../dri \ - -I$(TOP)/include -I$(TOP)/include/GL \ - -I$(XF86OSSRC) -I$(SERVERSRC)/GL/dri \ - -I$(XF86DRIVERSRC)/mga \ - -I../../../include -I../.. -I../../X -I../common +#include "../../X86/Imakefile.inc" #endif - -MESA_INCLUDES = -I. -I.. -I../../include \ - -I../../../../dri/drm - - DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(ASM_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) $(MESA_INCLUDES) $(DRI_INCLUDES) - - DRISRCS = ../../../dri/dri_mesa.c \ - ../../../../dri/dri_tmm.c - - DRIOBJS = ../../../dri/dri_mesa.o \ - ../../../../dri/dri_tmm.o - - DRMSRCS = ../../../../dri/drm/xf86drm.c \ - ../../../../dri/drm/xf86drmHash.c \ - ../../../../dri/drm/xf86drmRandom.c \ - ../../../../dri/drm/xf86drmSL.c - - DRMOBJS = ../../../../dri/drm/xf86drm.o \ - ../../../../dri/drm/xf86drmHash.o \ - ../../../../dri/drm/xf86drmRandom.o \ - ../../../../dri/drm/xf86drmSL.o - - MGASRCS = mgabuffers.c \ - mgadd.c \ - mgaeltpath.c \ - mgafastpath.c \ - mgaioctl.c \ - mgapipeline.c \ - mgaspan.c \ - mgastate.c \ - mgatex.c \ - mgatexcnv.c \ - mgatexmem.c \ - mgatris.c \ - mgavb.c \ - mga_xmesa.c \ - - MGAOBJS = mgabuffers.o \ - mgadd.o \ - mgaeltpath.o \ - mgafastpath.o \ - mgaioctl.o \ - mgapipeline.o \ - mgaspan.o \ - mgastate.o \ - mgatex.o \ - mgatexcnv.o \ - mgatexmem.o \ - mgatris.o \ - mgavb.o \ - mga_xmesa.o - - MESASRCS = ../../aatriangle.c \ - ../../accum.c \ - ../../alpha.c \ - ../../alphabuf.c \ - ../../attrib.c \ - ../../bbox.c \ - ../../bitmap.c \ - ../../blend.c \ - ../../buffers.c \ - ../../clip.c \ - ../../colortab.c \ - ../../config.c \ - ../../context.c \ - ../../copypix.c \ - ../../cva.c \ - ../../debug_xform.c \ - ../../depth.c \ - ../../dlist.c \ - ../../drawpix.c \ - ../../enable.c \ - ../../enums.c \ - ../../eval.c \ - ../../extensions.c \ - ../../feedback.c \ - ../../fog.c \ - ../../get.c \ - ../../glapi.c \ - ../../glapinoop.c \ - ../../glthread.c \ - ../../hash.c \ - ../../image.c \ - ../../imaging.c \ - ../../light.c \ - ../../lines.c \ - ../../logic.c \ - ../../masking.c \ - ../../matrix.c \ - ../../mem.c \ - ../../mmath.c \ - ../../pb.c \ - ../../pipeline.c \ - ../../pixel.c \ - ../../pixeltex.c \ - ../../points.c \ - ../../polygon.c \ - ../../quads.c \ - ../../rastpos.c \ - ../../readpix.c \ - ../../rect.c \ - ../../scissor.c \ - ../../shade.c \ - ../../span.c \ - ../../stages.c \ - ../../state.c \ - ../../stencil.c \ - ../../teximage.c \ - ../../texobj.c \ - ../../texstate.c \ - ../../texture.c \ - ../../texutil.c \ - ../../translate.c \ - ../../triangle.c \ - ../../varray.c \ - ../../vb.c \ - ../../vbcull.c \ - ../../vbfill.c \ - ../../vbindirect.c \ - ../../vbrender.c \ - ../../vbxform.c \ - ../../vector.c \ - ../../vertices.c \ - ../../winpos.c \ - ../../xform.c \ - ../../zoom.c - - MESAOBJS = ../../aatriangle.o \ - ../../accum.o \ - ../../alpha.o \ - ../../alphabuf.o \ - ../../attrib.o \ - ../../bbox.o \ - ../../bitmap.o \ - ../../blend.o \ - ../../buffers.o \ - ../../clip.o \ - ../../colortab.o \ - ../../config.o \ - ../../context.o \ - ../../copypix.o \ - ../../cva.o \ - ../../debug_xform.o \ - ../../depth.o \ - ../../dlist.o \ - ../../drawpix.o \ - ../../enable.o \ - ../../enums.o \ - ../../eval.o \ - ../../extensions.o \ - ../../feedback.o \ - ../../fog.o \ - ../../get.o \ - ../../hash.o \ - ../../hint.o \ - ../../image.o \ - ../../imaging.o \ - ../../light.o \ - ../../lines.o \ - ../../logic.o \ - ../../masking.o \ - ../../matrix.o \ - ../../mem.o \ - ../../mmath.o \ - ../../pb.o \ - ../../pipeline.o \ - ../../pixel.o \ - ../../pixeltex.o \ - ../../points.o \ - ../../polygon.o \ - ../../quads.o \ - ../../rastpos.o \ - ../../readpix.o \ - ../../rect.o \ - ../../scissor.o \ - ../../shade.o \ - ../../span.o \ - ../../stages.o \ - ../../state.o \ - ../../stencil.o \ - ../../teximage.o \ - ../../texobj.o \ - ../../texstate.o \ - ../../texture.o \ - ../../texutil.o \ - ../../translate.o \ - ../../triangle.o \ - ../../varray.o \ - ../../vb.o \ - ../../vbcull.o \ - ../../vbfill.o \ - ../../vbindirect.o \ - ../../vbrender.o \ - ../../vbxform.o \ - ../../vector.o \ - ../../vertices.o \ - ../../winpos.o \ - ../../xform.o \ - ../../zoom.o - -#ifdef i386Architecture - X86_SRCS = ../../X86/common_x86.c \ - ../../X86/common_x86_asm.S \ - ../../X86/x86.c \ - ../../X86/x86_cliptest.S \ - ../../X86/x86_vertex.S \ - ../../X86/x86_xform_masked2.S \ - ../../X86/x86_xform_masked3.S \ - ../../X86/x86_xform_masked4.S \ - ../../X86/x86_xform_raw2.S \ - ../../X86/x86_xform_raw3.S \ - ../../X86/x86_xform_raw4.S - - X86_OBJS = ../../X86/common_x86.o \ - ../../X86/common_x86_asm.o \ - ../../X86/x86.o \ - ../../X86/x86_cliptest.o \ - ../../X86/x86_vertex.o \ - ../../X86/x86_xform_masked2.o \ - ../../X86/x86_xform_masked3.o \ - ../../X86/x86_xform_masked4.o \ - ../../X86/x86_xform_raw2.o \ - ../../X86/x86_xform_raw3.o \ - ../../X86/x86_xform_raw4.o -#if MesaUseMMX - MMX_SRCS = ../../X86/mmx_blend.S + DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(MESA_ASM_DEFINES) + INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES) - MMX_OBJS = ../../X86/mmx_blend.o -#endif - -#if MesaUse3DNow - 3DNOW_SRCS = ../../X86/3dnow.c \ - ../../X86/3dnow_norm_raw.S \ - ../../X86/3dnow_vertex.S \ - ../../X86/3dnow_xform_masked1.S \ - ../../X86/3dnow_xform_masked2.S \ - ../../X86/3dnow_xform_masked3.S \ - ../../X86/3dnow_xform_masked4.S \ - ../../X86/3dnow_xform_raw1.S \ - ../../X86/3dnow_xform_raw2.S \ - ../../X86/3dnow_xform_raw3.S \ - ../../X86/3dnow_xform_raw4.S - - 3DNOW_OBJS = ../../X86/3dnow.o \ - ../../X86/3dnow_norm_raw.o \ - ../../X86/3dnow_vertex.o \ - ../../X86/3dnow_xform_masked1.o \ - ../../X86/3dnow_xform_masked2.o \ - ../../X86/3dnow_xform_masked3.o \ - ../../X86/3dnow_xform_masked4.o \ - ../../X86/3dnow_xform_raw1.o \ - ../../X86/3dnow_xform_raw2.o \ - ../../X86/3dnow_xform_raw3.o \ - ../../X86/3dnow_xform_raw4.o -#endif + DRIOBJS = $(GLXLIBSRC)/mesa/dri/dri_mesa.o \ + $(GLXLIBSRC)/dri/dri_tmm.o -#if MesaUseKatmai - KATMAI_SRCS = ../../X86/katmai.c \ - ../../X86/katmai_norm_raw.S \ - ../../X86/katmai_vertex.S \ - ../../X86/katmai_xform_masked1.S \ - ../../X86/katmai_xform_masked2.S \ - ../../X86/katmai_xform_masked3.S \ - ../../X86/katmai_xform_masked4.S \ - ../../X86/katmai_xform_raw1.S \ - ../../X86/katmai_xform_raw2.S \ - ../../X86/katmai_xform_raw3.S \ - ../../X86/katmai_xform_raw4.S - - KATMAI_OBJS = ../../X86/katmai.o \ - ../../X86/katmai_norm_raw.o \ - ../../X86/katmai_vertex.o \ - ../../X86/katmai_xform_masked1.o \ - ../../X86/katmai_xform_masked2.o \ - ../../X86/katmai_xform_masked3.o \ - ../../X86/katmai_xform_masked4.o \ - ../../X86/katmai_xform_raw1.o \ - ../../X86/katmai_xform_raw2.o \ - ../../X86/katmai_xform_raw3.o \ - ../../X86/katmai_xform_raw4.o -#endif -#endif + DRMOBJS = $(GLXLIBSRC)/dri/drm/xf86drm.o \ + $(GLXLIBSRC)/dri/drm/xf86drmHash.o \ + $(GLXLIBSRC)/dri/drm/xf86drmRandom.o \ + $(GLXLIBSRC)/dri/drm/xf86drmSL.o \ + $(GLXLIBSRC)/dri/drm/xf86drmMga.o #ifdef GlxSoProf LOSRCS = ../../../../lowpc.c @@ -326,50 +42,31 @@ LOOBJS = ../../../../lowpc.o HIOBJS = ../../../../highpc.o #endif - - ASMSRCS = $(X86_SRCS) $(MMX_SRCS) $(3DNOW_SRCS) $(KATMAI_SRCS) - ASMOBJS = $(X86_OBJS) $(MMX_OBJS) $(3DNOW_OBJS) $(KATMAI_OBJS) - - COMMONSRCS = ../common/mm.c ../common/hwlog.c - COMMONOBJS = ../common/mm.o ../common/hwlog.o - - SRCS = $(LOSRCS) $(DRISRCS) $(DRMSRCS) $(MESASRCS) \ - $(ASMSRCS) $(COMMONSRCS) $(MGASRCS) $(HISRCS) - OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(MESAOBJS) \ - $(ASMOBJS) $(COMMONOBJS) $(MGAOBJS) $(HIOBJS) - -REQUIREDLIBS += MathLibrary -#if !GlxBuiltInMga -REQUIREDLIBS += -L../../../.. -lGL -L../../../../../X11 -lX11 -#endif + SRCS = $(MGASRCS) + OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ + $(MESA_ASM_OBJS) $(COMMONOBJS) $(MGAOBJS) $(HIOBJS) -#if !GlxUseBuiltInDRIDriver -#undef DoNormalLib NormalLibGlx -#undef DoExtraLib SharedLibGlx -#undef DoDebugLib DebugLibGlx -#undef DoProfileLib ProfileLibGlx -#endif +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) #include LibraryObjectRule() -SubdirLibraryRule($(OBJS)) +SubdirLibraryRule($(MGAOBJS)) NormalLintTarget($(SRCS)) #if !GlxUseBuiltInDRIDriver LIBNAME = mga_dri.so -ALL_OBJS = $(OBJS) -ALL_DEPS = DONE -SharedDepModuleTarget($(LIBNAME),$(ALL_DEPS),$(ALL_OBJS)) +SharedDriModuleTarget($(LIBNAME),DONE $(OBJS),$(OBJS)) InstallDynamicModule($(LIBNAME),$(MODULEDIR),dri) #ifdef GlxSoProf SOPROF_LIBNAME = _mga_dri_p -NormalDepLibraryTarget($(SOPROF_LIBNAME),$(ALL_DEPS),$(ALL_OBJS)) +NormalDepLibraryTarget($(SOPROF_LIBNAME),DONE $(OBJS),$(OBJS)) InstallLibrary($(SOPROF_LIBNAME),$(MODULEDIR)/dri) #endif #endif DependTarget() + Index: xc/lib/GL/mesa/src/drv/mga/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/drv/mga/Imakefile.inc:1.2 --- /dev/null Mon Jun 4 12:37:31 2001 +++ xc/lib/GL/mesa/src/drv/mga/Imakefile.inc Wed May 2 11:06:03 2001 @@ -0,0 +1,127 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/mga/Imakefile.inc,v 1.2 2001/05/02 15:06:03 dawes Exp $ + +#ifndef MesaDrvSrcDir +#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv +#endif + +MESADRVSRCDIR = MesaDrvSrcDir + +#ifndef MesaDrvMgaBuildDir +#define MesaDrvMgaBuildDir /**/ +#endif +MESADRVMGABUILDDIR = MesaDrvMgaBuildDir + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + +#if BuildXF86DRI + DRI_DEFINES = GlxDefines + DRI_INCLUDES = -I$(GLXLIBSRC)/dri \ + -I$(GLXLIBSRC)/glx \ + -I$(INCLUDESRC) \ + -I$(INCLUDESRC)/GL \ + -I$(GLXLIBSRC)/mesa/dri \ + -I$(SERVERSRC)/GL/dri \ + -I$(XF86OSSRC) \ + -I$(XF86DRIVERSRC)/mga \ + -I$(GLXLIBSRC)/dri/drm +#endif + +MESA_INCLUDES = -I$(MESASRCDIR)/src \ + -I$(MESADRVSRCDIR)/common \ + -I$(MESADRVSRCDIR)/mga + X_INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) + + MGASRCS = $(MESADRVMGABUILDDIR)mgabuffers.c \ + $(MESADRVMGABUILDDIR)mgadd.c \ + $(MESADRVMGABUILDDIR)mgaeltpath.c \ + $(MESADRVMGABUILDDIR)mgafastpath.c \ + $(MESADRVMGABUILDDIR)mgaioctl.c \ + $(MESADRVMGABUILDDIR)mgapipeline.c \ + $(MESADRVMGABUILDDIR)mgaspan.c \ + $(MESADRVMGABUILDDIR)mgastate.c \ + $(MESADRVMGABUILDDIR)mgatex.c \ + $(MESADRVMGABUILDDIR)mgatexcnv.c \ + $(MESADRVMGABUILDDIR)mgatexmem.c \ + $(MESADRVMGABUILDDIR)mgatris.c \ + $(MESADRVMGABUILDDIR)mgavb.c \ + $(MESADRVMGABUILDDIR)mga_xmesa.c \ + + MGAOBJS = $(MESADRVMGABUILDDIR)mgabuffers.o \ + $(MESADRVMGABUILDDIR)mgadd.o \ + $(MESADRVMGABUILDDIR)mgaeltpath.o \ + $(MESADRVMGABUILDDIR)mgafastpath.o \ + $(MESADRVMGABUILDDIR)mgaioctl.o \ + $(MESADRVMGABUILDDIR)mgapipeline.o \ + $(MESADRVMGABUILDDIR)mgaspan.o \ + $(MESADRVMGABUILDDIR)mgastate.o \ + $(MESADRVMGABUILDDIR)mgatex.o \ + $(MESADRVMGABUILDDIR)mgatexcnv.o \ + $(MESADRVMGABUILDDIR)mgatexmem.o \ + $(MESADRVMGABUILDDIR)mgatris.o \ + $(MESADRVMGABUILDDIR)mgavb.o \ + $(MESADRVMGABUILDDIR)mga_xmesa.o + + MGAUOBJS = $(MESADRVMGABUILDDIR)unshared/mgabuffers.o \ + $(MESADRVMGABUILDDIR)unshared/mgadd.o \ + $(MESADRVMGABUILDDIR)unshared/mgaeltpath.o \ + $(MESADRVMGABUILDDIR)unshared/mgafastpath.o \ + $(MESADRVMGABUILDDIR)unshared/mgaioctl.o \ + $(MESADRVMGABUILDDIR)unshared/mgapipeline.o \ + $(MESADRVMGABUILDDIR)unshared/mgaspan.o \ + $(MESADRVMGABUILDDIR)unshared/mgastate.o \ + $(MESADRVMGABUILDDIR)unshared/mgatex.o \ + $(MESADRVMGABUILDDIR)unshared/mgatexcnv.o \ + $(MESADRVMGABUILDDIR)unshared/mgatexmem.o \ + $(MESADRVMGABUILDDIR)unshared/mgatris.o \ + $(MESADRVMGABUILDDIR)unshared/mgavb.o \ + $(MESADRVMGABUILDDIR)unshared/mga_xmesa.o + + MGADOBJS = $(MESADRVMGABUILDDIR)debugger/mgabuffers.o \ + $(MESADRVMGABUILDDIR)debugger/mgadd.o \ + $(MESADRVMGABUILDDIR)debugger/mgaeltpath.o \ + $(MESADRVMGABUILDDIR)debugger/mgafastpath.o \ + $(MESADRVMGABUILDDIR)debugger/mgaioctl.o \ + $(MESADRVMGABUILDDIR)debugger/mgapipeline.o \ + $(MESADRVMGABUILDDIR)debugger/mgaspan.o \ + $(MESADRVMGABUILDDIR)debugger/mgastate.o \ + $(MESADRVMGABUILDDIR)debugger/mgatex.o \ + $(MESADRVMGABUILDDIR)debugger/mgatexcnv.o \ + $(MESADRVMGABUILDDIR)debugger/mgatexmem.o \ + $(MESADRVMGABUILDDIR)debugger/mgatris.o \ + $(MESADRVMGABUILDDIR)debugger/mgavb.o \ + $(MESADRVMGABUILDDIR)debugger/mga_xmesa.o + + MGAPOBJS = $(MESADRVMGABUILDDIR)profiled/mgabuffers.o \ + $(MESADRVMGABUILDDIR)profiled/mgadd.o \ + $(MESADRVMGABUILDDIR)profiled/mgaeltpath.o \ + $(MESADRVMGABUILDDIR)profiled/mgafastpath.o \ + $(MESADRVMGABUILDDIR)profiled/mgaioctl.o \ + $(MESADRVMGABUILDDIR)profiled/mgapipeline.o \ + $(MESADRVMGABUILDDIR)profiled/mgaspan.o \ + $(MESADRVMGABUILDDIR)profiled/mgastate.o \ + $(MESADRVMGABUILDDIR)profiled/mgatex.o \ + $(MESADRVMGABUILDDIR)profiled/mgatexcnv.o \ + $(MESADRVMGABUILDDIR)profiled/mgatexmem.o \ + $(MESADRVMGABUILDDIR)profiled/mgatris.o \ + $(MESADRVMGABUILDDIR)profiled/mgavb.o \ + $(MESADRVMGABUILDDIR)profiled/mga_xmesa.o + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(mgabuffers.c, $(MESADRVSRCDIR)/mga) +LinkSourceFile(mgadd.c, $(MESADRVSRCDIR)/mga) +LinkSourceFile(mgaeltpath.c, $(MESADRVSRCDIR)/mga) +LinkSourceFile(mgafastpath.c, $(MESADRVSRCDIR)/mga) +LinkSourceFile(mgaioctl.c, $(MESADRVSRCDIR)/mga) +LinkSourceFile(mgapipeline.c, $(MESADRVSRCDIR)/mga) +LinkSourceFile(mgaspan.c, $(MESADRVSRCDIR)/mga) +LinkSourceFile(mgastate.c, $(MESADRVSRCDIR)/mga) +LinkSourceFile(mgatex.c, $(MESADRVSRCDIR)/mga) +LinkSourceFile(mgatexcnv.c, $(MESADRVSRCDIR)/mga) +LinkSourceFile(mgatexmem.c, $(MESADRVSRCDIR)/mga) +LinkSourceFile(mgatris.c, $(MESADRVSRCDIR)/mga) +LinkSourceFile(mgavb.c, $(MESADRVSRCDIR)/mga) +LinkSourceFile(mga_xmesa.c, $(MESADRVSRCDIR)/mga) +#endif + Index: xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c diff -u xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c:1.8 xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c:1.12 --- xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c:1.8 Thu Dec 7 15:26:06 2000 +++ xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c Tue Apr 10 12:07:50 2001 @@ -1,35 +1,29 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c,v 1.8 2000/12/07 20:26:06 dawes Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c,v 1.12 2001/04/10 16:07:50 dawes Exp $ */ /* - * Authors: - * Keith Whitwell + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell */ #ifdef GLX_DIRECT_RENDERING @@ -53,6 +47,7 @@ #include "mgatris.h" #include "mgapipeline.h" #include "mgabuffers.h" +#include "mgapixel.h" #include "xf86dri.h" #include "mga_xmesa.h" @@ -60,18 +55,16 @@ #include "mga_dri.h" - - - #ifndef MGA_DEBUG int MGA_DEBUG = (0 -/* | DEBUG_ALWAYS_SYNC */ -/* | DEBUG_VERBOSE_MSG */ -/* | DEBUG_VERBOSE_LRU */ -/* | DEBUG_VERBOSE_DRI */ -/* | DEBUG_VERBOSE_IOCTL */ -/* | DEBUG_VERBOSE_2D */ - ); +/* | DEBUG_ALWAYS_SYNC */ +/* | DEBUG_VERBOSE_MSG */ +/* | DEBUG_VERBOSE_LRU */ +/* | DEBUG_VERBOSE_DRI */ +/* | DEBUG_VERBOSE_IOCTL */ +/* | DEBUG_VERBOSE_2D */ +/* | DEBUG_VERBOSE_FALLBACK */ + ); #endif @@ -84,7 +77,7 @@ * XMesaResetDriver * XMesaCreateVisual * XMesaDestroyVisual - * XMesaCreateContext + * XMesaCreateContext * XMesaDestroyContext * XMesaCreateWindowBuffer * XMesaCreatePixmapBuffer @@ -106,9 +99,9 @@ { int major, minor, patch; if (XF86DRIQueryVersion(sPriv->display, &major, &minor, &patch)) { - if (major != 3 || minor != 0 || patch < 0) { + if (major != 4 || minor < 0) { char msg[1000]; - sprintf(msg, "MGA DRI driver expected DRI version 3.0.x but got version %d.%d.%d", major, minor, patch); + sprintf(msg, "MGA DRI driver expected DRI version 4.0.x but got version %d.%d.%d", major, minor, patch); __driMesaMessage(msg); return GL_FALSE; } @@ -117,8 +110,7 @@ /* Check that the DDX driver version is compatible */ if (sPriv->ddxMajor != 1 || - sPriv->ddxMinor != 0 || - sPriv->ddxPatch < 0) { + sPriv->ddxMinor < 0) { char msg[1000]; sprintf(msg, "MGA DRI driver expected DDX driver version 1.0.x but got version %d.%d.%d", sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch); __driMesaMessage(msg); @@ -126,19 +118,21 @@ } /* Check that the DRM driver version is compatible */ - if (sPriv->drmMajor != 2 || - sPriv->drmMinor != 0 || - sPriv->drmPatch < 0) { + if (sPriv->drmMajor != 3 || + sPriv->drmMinor < 0) { char msg[1000]; - sprintf(msg, "MGA DRI driver expected DRM driver version 2.0.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch); + sprintf(msg, "MGA DRI driver expected DRM driver version 3.0.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch); __driMesaMessage(msg); return GL_FALSE; } + /* Allocate the private area */ mgaScreen = (mgaScreenPrivate *)MALLOC(sizeof(mgaScreenPrivate)); - if (!mgaScreen) + if (!mgaScreen) { + __driMesaMessage("Couldn't malloc screen struct"); return GL_FALSE; + } mgaScreen->sPriv = sPriv; sPriv->private = (void *)mgaScreen; @@ -147,35 +141,71 @@ serverInfo->chipset != MGA_CARD_TYPE_G400) { XFree(mgaScreen); sPriv->private = NULL; + __driMesaMessage("Unrecognized chipset"); return GL_FALSE; } + - mgaScreen->chipset = serverInfo->chipset; mgaScreen->width = serverInfo->width; mgaScreen->height = serverInfo->height; mgaScreen->mem = serverInfo->mem; mgaScreen->cpp = serverInfo->cpp; + + mgaScreen->agpMode = serverInfo->agpMode; + mgaScreen->frontPitch = serverInfo->frontPitch; mgaScreen->frontOffset = serverInfo->frontOffset; - mgaScreen->backOffset = serverInfo->backOffset; + mgaScreen->backOffset = serverInfo->backOffset; mgaScreen->backPitch = serverInfo->backPitch; mgaScreen->depthOffset = serverInfo->depthOffset; mgaScreen->depthPitch = serverInfo->depthPitch; + mgaScreen->mmio.handle = serverInfo->registers.handle; + mgaScreen->mmio.size = serverInfo->registers.size; + if ( drmMap( sPriv->fd, + mgaScreen->mmio.handle, mgaScreen->mmio.size, + &mgaScreen->mmio.map ) < 0 ) { + FREE( mgaScreen ); + sPriv->private = NULL; + __driMesaMessage( "Couldn't map MMIO registers" ); + return GL_FALSE; + } +#if 0 + mgaScreen->status.handle = serverInfo->status.handle; + mgaScreen->status.size = serverInfo->status.size; + if ( drmMap( sPriv->fd, + mgaScreen->status.handle, mgaScreen->status.size, + &mgaScreen->status.map ) < 0 ) { + drmUnmap( mgaScreen->mmio.map, mgaScreen->mmio.size ); + FREE( mgaScreen ); + sPriv->private = NULL; + __driMesaMessage( "Couldn't map status page" ); + return GL_FALSE; + } +#endif + + mgaScreen->primary.handle = serverInfo->primary.handle; + mgaScreen->primary.size = serverInfo->primary.size; + mgaScreen->buffers.handle = serverInfo->buffers.handle; + mgaScreen->buffers.size = serverInfo->buffers.size; + +#if 0 mgaScreen->agp.handle = serverInfo->agp; mgaScreen->agp.size = serverInfo->agpSize; - if (drmMap(sPriv->fd, - mgaScreen->agp.handle, - mgaScreen->agp.size, - (drmAddress *)&mgaScreen->agp.map) != 0) + if (drmMap(sPriv->fd, + mgaScreen->agp.handle, + mgaScreen->agp.size, + (drmAddress *)&mgaScreen->agp.map) != 0) { Xfree(mgaScreen); sPriv->private = NULL; + __driMesaMessage("Couldn't map agp region"); return GL_FALSE; } +#endif mgaScreen->textureOffset[MGA_CARD_HEAP] = serverInfo->textureOffset; mgaScreen->textureOffset[MGA_AGP_HEAP] = (serverInfo->agpTextureOffset | @@ -184,30 +214,33 @@ mgaScreen->textureSize[MGA_CARD_HEAP] = serverInfo->textureSize; mgaScreen->textureSize[MGA_AGP_HEAP] = serverInfo->agpTextureSize; - mgaScreen->logTextureGranularity[MGA_CARD_HEAP] = + mgaScreen->logTextureGranularity[MGA_CARD_HEAP] = serverInfo->logTextureGranularity; - mgaScreen->logTextureGranularity[MGA_AGP_HEAP] = + mgaScreen->logTextureGranularity[MGA_AGP_HEAP] = serverInfo->logAgpTextureGranularity; - mgaScreen->texVirtual[MGA_CARD_HEAP] = (char *)(mgaScreen->sPriv->pFB + + mgaScreen->texVirtual[MGA_CARD_HEAP] = (char *)(mgaScreen->sPriv->pFB + serverInfo->textureOffset); - mgaScreen->texVirtual[MGA_AGP_HEAP] = (mgaScreen->agp.map + +#if 0 + mgaScreen->texVirtual[MGA_AGP_HEAP] = (mgaScreen->agp.map + serverInfo->agpTextureOffset); +#endif mgaScreen->mAccess = serverInfo->mAccess; - /* For calculating setupdma addresses. */ - mgaScreen->dmaOffset = serverInfo->agpBufferOffset; - + mgaScreen->dmaOffset = serverInfo->buffers.handle; + mgaScreen->bufs = drmMapBufs(sPriv->fd); if (!mgaScreen->bufs) { /*drmUnmap(mgaScreen->agp_tex.map, mgaScreen->agp_tex.size);*/ XFree(mgaScreen); sPriv->private = NULL; + __driMesaMessage("Couldn't map dma buffers"); return GL_FALSE; } + mgaScreen->sarea_priv_offset = serverInfo->sarea_priv_offset; mgaDDFastPathInit(); mgaDDEltPathInit(); @@ -270,8 +303,8 @@ mgaContextPtr mmesa; __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; mgaScreenPrivate *mgaScreen = (mgaScreenPrivate *)sPriv->private; - drm_mga_sarea_t *saPriv=(drm_mga_sarea_t*)(((char*)sPriv->pSAREA)+ - sizeof(XF86DRISAREARec)); + MGASAREAPrivPtr saPriv = (MGASAREAPrivPtr)(((char*)sPriv->pSAREA)+ + mgaScreen->sarea_priv_offset); if (MGA_DEBUG&DEBUG_VERBOSE_DRI) fprintf(stderr, "XMesaCreateContext\n"); @@ -306,10 +339,10 @@ * that both texture units can bind a maximal texture and have them * on the card at once. */ - { + { int nr = 2; - if (mgaScreen->chipset == MGA_CARD_TYPE_G200) + if (mgaScreen->chipset == MGA_CARD_TYPE_G200) nr = 1; if (mgaScreen->textureSize[0] < nr*1024*1024) { @@ -321,52 +354,49 @@ } else { ctx->Const.MaxTextureLevels = 11; ctx->Const.MaxTextureSize = 1<<10; - } + } } mmesa->hw_stencil = mesaVis->StencilBits && mesaVis->DepthBits == 24; -/* fprintf(stderr, */ -/* "mesaVis->DepthBits: %d " */ -/* "mmesa->glCtx->Visual->DepthBits: %d " */ -/* "mmesa->glCtx->Visual->DepthMax: %x\n", */ -/* mesaVis->DepthBits, */ -/* ctx->Visual->DepthBits, */ -/* ctx->Visual->DepthMax); */ - switch (mesaVis->DepthBits) { - case 16: - mmesa->depth_scale = 1.0/(GLdouble)0xffff; + case 16: + mmesa->depth_scale = 1.0/(GLdouble)0xffff; mmesa->depth_clear_mask = ~0; mmesa->ClearDepth = 0xffff; break; - case 24: - mmesa->depth_scale = 1.0/(GLdouble)0xffffff; + case 24: + mmesa->depth_scale = 1.0/(GLdouble)0xffffff; if (mmesa->hw_stencil) { mmesa->depth_clear_mask = 0xffffff00; mmesa->stencil_clear_mask = 0x000000ff; } else mmesa->depth_clear_mask = ~0; mmesa->ClearDepth = 0xffffff00; - break; - case 32: - mmesa->depth_scale = 1.0/(GLdouble)0xffffffff; + break; + case 32: + mmesa->depth_scale = 1.0/(GLdouble)0xffffffff; mmesa->depth_clear_mask = ~0; mmesa->ClearDepth = 0xffffffff; break; }; - + mmesa->canDoStipple = GL_FALSE; mmesa->renderindex = -1; /* impossible value */ mmesa->new_state = ~0; mmesa->dirty = ~0; - mmesa->warp_pipe = 0; + mmesa->warp_pipe = 0; mmesa->CurrentTexObj[0] = 0; mmesa->CurrentTexObj[1] = 0; - + mmesa->texAge[0] = 0; mmesa->texAge[1] = 0; - + +#if 0 + mmesa->status = (GLuint *)mmesa->mgaScreen->status.map; +#endif + mmesa->primary_offset = mmesa->mgaScreen->primary.handle; + ctx->DriverCtx = (void *) mmesa; mmesa->glCtx = ctx; @@ -377,7 +407,7 @@ mgaDDInitSpanFuncs( ctx ); mgaDDInitDriverFuncs( ctx ); mgaDDInitIoctlFuncs( ctx ); - +/* mgaDDInitPixelFuncs( ctx );*/ ctx->Driver.TriangleCaps = (DD_TRI_CULL| DD_TRI_LIGHT_TWOSIDE| @@ -388,7 +418,7 @@ */ ctx->TriangleCaps |= DD_CLIP_FOG_COORD; - if (ctx->VB) + if (ctx->VB) mgaDDRegisterVB( ctx->VB ); if (ctx->NrPipelineStages) @@ -423,14 +453,16 @@ __DRIdrawablePrivate *driDrawPriv, GLvisual *mesaVis) { + GLboolean swStencil = mesaVis->StencilBits > 0 && mesaVis->DepthBits != 24; + if (MGA_DEBUG&DEBUG_VERBOSE_DRI) fprintf(stderr, "XMesaCreateWindowBuffer\n"); return gl_create_framebuffer(mesaVis, GL_FALSE, /* software depth buffer? */ - mesaVis->StencilBits > 0, + swStencil, mesaVis->AccumRedBits > 0, - mesaVis->AlphaBits > 0 + GL_FALSE /* software alpha buffer/ */ ); } @@ -459,7 +491,7 @@ void XMesaSwapBuffers(__DRIdrawablePrivate *driDrawPriv) { /* XXX should do swap according to the buffer, not the context! */ - mgaContextPtr mmesa = mgaCtx; + mgaContextPtr mmesa = mgaCtx; FLUSH_VB( mmesa->glCtx, "swap buffers" ); mgaSwapBuffers(mmesa); } @@ -489,7 +521,7 @@ /* This looks buggy to me - the 'b' variable isn't used anywhere... * Hmm - It seems that the drawable is already hooked in to - * driDrawablePriv. + * driDrawablePriv. * * But why are we doing context initialization here??? */ @@ -504,8 +536,8 @@ if (mgaCtx->driDrawable != driDrawPriv) { mgaCtx->driDrawable = driDrawPriv; - mgaCtx->dirty = ~0; - mgaCtx->dirty_cliprects = (MGA_FRONT|MGA_BACK); + mgaCtx->dirty = ~0; + mgaCtx->dirty_cliprects = (MGA_FRONT|MGA_BACK); } if (!mgaCtx->glCtx->Viewport.Width) @@ -521,27 +553,28 @@ } -void mgaGetLock( mgaContextPtr mmesa, GLuint flags ) +void mgaGetLock( mgaContextPtr mmesa, GLuint flags ) { __DRIdrawablePrivate *dPriv = mmesa->driDrawable; - drm_mga_sarea_t *sarea = mmesa->sarea; + MGASAREAPrivPtr sarea = mmesa->sarea; int me = mmesa->hHWContext; int i; - drmGetLock(mmesa->driFd, mmesa->hHWContext, flags); + drmGetLock(mmesa->driFd, mmesa->hHWContext, flags); - if (*(dPriv->pStamp) != dPriv->lastStamp) { + if (*(dPriv->pStamp) != mmesa->lastStamp) { + mmesa->lastStamp = *(dPriv->pStamp); mmesa->setupdone = 0; mmesa->dirty_cliprects = (MGA_FRONT|MGA_BACK); mgaUpdateRects( mmesa, (MGA_FRONT|MGA_BACK) ); } - mmesa->dirty |= MGA_UPLOAD_CTX | MGA_UPLOAD_CLIPRECTS; + mmesa->dirty |= MGA_UPLOAD_CONTEXT | MGA_UPLOAD_CLIPRECTS; - mmesa->sarea->dirty |= MGA_UPLOAD_CTX; + mmesa->sarea->dirty |= MGA_UPLOAD_CONTEXT; if (sarea->ctxOwner != me) { - mmesa->dirty |= (MGA_UPLOAD_CTX | MGA_UPLOAD_TEX0 | + mmesa->dirty |= (MGA_UPLOAD_CONTEXT | MGA_UPLOAD_TEX0 | MGA_UPLOAD_TEX1 | MGA_UPLOAD_PIPE); sarea->ctxOwner=me; } Index: xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h diff -u xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h:1.6 xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h:1.9 --- xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h:1.6 Sun Sep 24 09:51:05 2000 +++ xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h Tue Apr 10 12:07:50 2001 @@ -1,36 +1,30 @@ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h,v 1.6 2000/09/24 13:51:05 alanh Exp $ */ - /* - * Authors: - * Keith Whitwell + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. * + * Authors: + * Keith Whitwell */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h,v 1.9 2001/04/10 16:07:50 dawes Exp $ */ #ifndef _MGA_INIT_H_ #define _MGA_INIT_H_ @@ -44,12 +38,6 @@ #include "types.h" #include "mgaregs.h" -typedef struct { - drmHandle handle; - drmSize size; - char *map; -} mgaRegion, *mgaRegionPtr; - typedef struct mga_screen_private_s { int chipset; @@ -58,6 +46,7 @@ int mem; int cpp; /* for front and back buffers */ + GLint agpMode; unsigned int mAccess; @@ -70,7 +59,7 @@ unsigned int depthPitch; int depthCpp; - unsigned int dmaOffset; + unsigned int dmaOffset; unsigned int textureOffset[MGA_NR_TEX_HEAPS]; unsigned int textureSize[MGA_NR_TEX_HEAPS]; @@ -81,10 +70,11 @@ __DRIscreenPrivate *sPriv; drmBufMapPtr bufs; - /* Maps the dma buffers as well as textures ? - */ - mgaRegion agp; - + drmRegion mmio; + drmRegion status; + drmRegion primary; + drmRegion buffers; + unsigned int sarea_priv_offset; } mgaScreenPrivate; @@ -99,7 +89,7 @@ -/* Lock the hardware and validate our state. +/* Lock the hardware and validate our state. */ #define LOCK_HARDWARE( mmesa ) \ do { \ @@ -111,18 +101,18 @@ } while (0) -/* +/* */ #define LOCK_HARDWARE_QUIESCENT( mmesa ) do { \ LOCK_HARDWARE( mmesa ); \ - mgaUpdateLock( mmesa, DRM_LOCK_QUIESCENT | DRM_LOCK_FLUSH ); \ + UPDATE_LOCK( mmesa, DRM_LOCK_QUIESCENT | DRM_LOCK_FLUSH ); \ } while (0) -/* Unlock the hardware using the global current context +/* Unlock the hardware using the global current context */ #define UNLOCK_HARDWARE(mmesa) \ - DRM_UNLOCK(mmesa->driFd, mmesa->driHwLock, mmesa->hHWContext); + DRM_UNLOCK(mmesa->driFd, mmesa->driHwLock, mmesa->hHWContext); /* Freshen our snapshot of the drawables @@ -138,6 +128,18 @@ #define GET_DRAWABLE_LOCK( mmesa ) while(0) #define RELEASE_DRAWABLE_LOCK( mmesa ) while(0) + + +/* The 2D driver macros are busted -- we can't use them here as they + * rely on the 2D driver data structures rather than taking an explicit + * base address. + */ +#define MGA_BASE( reg ) ((unsigned long)(mmesa->mgaScreen->mmio.map)) +#define MGA_ADDR( reg ) (MGA_BASE(reg) + reg) + +#define MGA_DEREF( reg ) *(volatile CARD32 *)MGA_ADDR( reg ) +#define MGA_READ( reg ) MGA_DEREF( reg ) +#define MGA_WRITE( reg, val ) do { MGA_DEREF( reg ) = val; } while (0) #endif #endif Index: xc/lib/GL/mesa/src/drv/mga/mgabuffers.c diff -u xc/lib/GL/mesa/src/drv/mga/mgabuffers.c:1.4 xc/lib/GL/mesa/src/drv/mga/mgabuffers.c:1.7 --- xc/lib/GL/mesa/src/drv/mga/mgabuffers.c:1.4 Sun Sep 24 09:51:05 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgabuffers.c Tue Apr 10 12:07:50 2001 @@ -1,37 +1,30 @@ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgabuffers.c,v 1.4 2000/09/24 13:51:05 alanh Exp $ */ - /* - * Authors: - * Keith Whitwell + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. * - * $PI: $ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgabuffers.c,v 1.7 2001/04/10 16:07:50 dawes Exp $ */ #include #include "mgacontext.h" @@ -43,14 +36,19 @@ { __DRIdrawablePrivate *driDrawable = mmesa->driDrawable; - mmesa->numClipRects = driDrawable->numClipRects; - mmesa->pClipRects = driDrawable->pClipRects; + if (driDrawable->numClipRects == 0) { + static XF86DRIClipRectRec zeroareacliprect = {0,0,0,0}; + mmesa->numClipRects = 1; + mmesa->pClipRects = &zeroareacliprect; + } else { + mmesa->numClipRects = driDrawable->numClipRects; + mmesa->pClipRects = driDrawable->pClipRects; + } mmesa->drawX = driDrawable->x; mmesa->drawY = driDrawable->y; - mmesa->Setup[MGA_CTXREG_DSTORG] = mmesa->drawOffset; - mmesa->dirty |= MGA_UPLOAD_CTX; - mmesa->dirty |= MGA_UPLOAD_CLIPRECTS; + mmesa->setup.dstorg = mmesa->drawOffset; + mmesa->dirty |= MGA_UPLOAD_CONTEXT | MGA_UPLOAD_CLIPRECTS; } @@ -58,10 +56,16 @@ { __DRIdrawablePrivate *driDrawable = mmesa->driDrawable; - if (driDrawable->numBackClipRects == 0) + if (driDrawable->numBackClipRects == 0) { - mmesa->numClipRects = driDrawable->numClipRects; - mmesa->pClipRects = driDrawable->pClipRects; + if (driDrawable->numClipRects == 0) { + static XF86DRIClipRectRec zeroareacliprect = {0,0,0,0}; + mmesa->numClipRects = 1; + mmesa->pClipRects = &zeroareacliprect; + } else { + mmesa->numClipRects = driDrawable->numClipRects; + mmesa->pClipRects = driDrawable->pClipRects; + } mmesa->drawX = driDrawable->x; mmesa->drawY = driDrawable->y; } else { @@ -70,20 +74,19 @@ mmesa->drawX = driDrawable->backX; mmesa->drawY = driDrawable->backY; } - - mmesa->Setup[MGA_CTXREG_DSTORG] = mmesa->drawOffset; - mmesa->dirty |= MGA_UPLOAD_CTX; - mmesa->dirty |= MGA_UPLOAD_CLIPRECTS; + mmesa->setup.dstorg = mmesa->drawOffset; + mmesa->dirty |= MGA_UPLOAD_CONTEXT | MGA_UPLOAD_CLIPRECTS; } +#if 0 static void mgaUpdateRectsFromSarea( mgaContextPtr mmesa ) { __DRIdrawablePrivate *driDrawable = mmesa->driDrawable; __DRIscreenPrivate *driScreen = mmesa->driScreen; - drm_mga_sarea_t *sarea = mmesa->sarea; + MGASAREAPrivPtr sarea = mmesa->sarea; int i = 0, top = 0; @@ -94,12 +97,12 @@ top = sarea->exported_nback; for (i = 0 ; i < top ; i++) - driDrawable->pBackClipRects[i] = + driDrawable->pBackClipRects[i] = *(XF86DRIClipRectPtr)&(sarea->exported_boxes[i]); } - if (sarea->exported_buffers & MGA_FRONT) + if (sarea->exported_buffers & MGA_FRONT) { int start = top; @@ -108,11 +111,11 @@ top += sarea->exported_nfront; for ( ; i < top ; i++) - driDrawable->pClipRects[i-start] = + driDrawable->pClipRects[i-start] = *(XF86DRIClipRectPtr)&(sarea->exported_boxes[i]); - - } + } + driDrawable->index = sarea->exported_index; @@ -123,18 +126,18 @@ driDrawable->backY = sarea->exported_back_y; driDrawable->w = sarea->exported_w; driDrawable->h = sarea->exported_h; - driDrawable->pStamp = + driDrawable->pStamp = &(driScreen->pSAREA->drawableTable[driDrawable->index].stamp); mmesa->dirty_cliprects = (MGA_FRONT|MGA_BACK) & ~(sarea->exported_buffers); } +#endif - static void printSareaRects( mgaContextPtr mmesa ) { __DRIscreenPrivate *driScreen = mmesa->driScreen; - drm_mga_sarea_t *sarea = mmesa->sarea; + MGASAREAPrivPtr sarea = mmesa->sarea; int i; fprintf(stderr, "sarea->exported: %d\n", sarea->exported_drawable); @@ -152,7 +155,7 @@ i = 0; if (sarea->exported_buffers & MGA_BACK) - for ( ; i < sarea->exported_nback ; i++) + for ( ; i < sarea->exported_nback ; i++) fprintf(stderr, "back %d: %d,%d-%d,%d\n", i, sarea->exported_boxes[i].x1, sarea->exported_boxes[i].y1, sarea->exported_boxes[i].x2, sarea->exported_boxes[i].y2); @@ -160,14 +163,14 @@ if (sarea->exported_buffers & MGA_FRONT) { int start = i; int top = i + sarea->exported_nfront; - for ( ; i < top ; i++) - fprintf(stderr, "front %d: %d,%d-%d,%d\n", + for ( ; i < top ; i++) + fprintf(stderr, "front %d: %d,%d-%d,%d\n", i - start, sarea->exported_boxes[i].x1, sarea->exported_boxes[i].y1, sarea->exported_boxes[i].x2, sarea->exported_boxes[i].y2); } - fprintf(stderr, "drawableTable[%d].stamp: %d\n", + fprintf(stderr, "drawableTable[%d].stamp: %d\n", sarea->exported_index, driScreen->pSAREA->drawableTable[sarea->exported_index].stamp); } @@ -187,13 +190,13 @@ fprintf(stderr, "driDrawable->w: %d\n", driDrawable->w); fprintf(stderr, "driDrawable->h: %d\n", driDrawable->h); - for (i = 0 ; i < nr ; i++) + for (i = 0 ; i < nr ; i++) fprintf(stderr, "box %d: %d,%d-%d,%d\n", i, mmesa->pClipRects[i].x1, mmesa->pClipRects[i].y1, mmesa->pClipRects[i].x2, mmesa->pClipRects[i].y2); fprintf(stderr, "mmesa->draw_buffer: %d\n", mmesa->draw_buffer); - fprintf(stderr, "drawableTable[%d].stamp: %d\n", + fprintf(stderr, "drawableTable[%d].stamp: %d\n", driDrawable->index, driScreen->pSAREA->drawableTable[driDrawable->index].stamp); } @@ -203,50 +206,27 @@ void mgaUpdateRects( mgaContextPtr mmesa, GLuint buffers ) { __DRIdrawablePrivate *driDrawable = mmesa->driDrawable; - drm_mga_sarea_t *sarea = mmesa->sarea; + MGASAREAPrivPtr sarea = mmesa->sarea; - /* The MGA X driver will try to push one set of cliprects (back or - * front, the last active) for one drawable (the last used) into - * the sarea. See if that window was ours, else retrieve both back - * and front rects from the X server via a protocol request. - * - * If there isn't room for the cliprects in the sarea, the X server - * clears the drawable value to indicate failure. - */ - if (0) printSareaRects(mmesa); - - if (0 && - sarea->exported_drawable == driDrawable->draw && - (sarea->exported_buffers & buffers) == buffers) - { - mgaUpdateRectsFromSarea( mmesa ); - } - else - { - if(MGA_DEBUG & DEBUG_VERBOSE_MSG) - fprintf(stderr, "^"); - driDrawable->lastStamp = 0; - - XMESA_VALIDATE_DRAWABLE_INFO(mmesa->display, - mmesa->driScreen, - driDrawable); - mmesa->dirty_cliprects = 0; - } +/* fprintf(stderr, "%s\n", __FUNCTION__); */ + XMESA_VALIDATE_DRAWABLE_INFO(mmesa->display, + mmesa->driScreen, + driDrawable); + mmesa->dirty_cliprects = 0; + if (mmesa->draw_buffer == MGA_FRONT) mgaXMesaSetFrontClipRects( mmesa ); else mgaXMesaSetBackClipRects( mmesa ); - - if (0) printMmesaRects(mmesa); +/* printMmesaRects(mmesa); */ sarea->req_drawable = driDrawable->draw; sarea->req_draw_buffer = mmesa->draw_buffer; - mgaUpdateClipping( mmesa->glCtx ); - + mmesa->dirty |= MGA_UPLOAD_CLIPRECTS; } @@ -260,27 +240,27 @@ mmesa->Fallback &= ~MGA_FALLBACK_BUFFER; - if (mode == GL_FRONT_LEFT) + if (mode == GL_FRONT_LEFT) { mmesa->drawOffset = mmesa->mgaScreen->frontOffset; mmesa->readOffset = mmesa->mgaScreen->frontOffset; - mmesa->Setup[MGA_CTXREG_DSTORG] = mmesa->mgaScreen->frontOffset; - mmesa->dirty |= MGA_UPLOAD_CTX; + mmesa->setup.dstorg = mmesa->mgaScreen->frontOffset; + mmesa->dirty |= MGA_UPLOAD_CONTEXT; mmesa->draw_buffer = MGA_FRONT; mgaXMesaSetFrontClipRects( mmesa ); return GL_TRUE; - } - else if (mode == GL_BACK_LEFT) + } + else if (mode == GL_BACK_LEFT) { mmesa->drawOffset = mmesa->mgaScreen->backOffset; mmesa->readOffset = mmesa->mgaScreen->backOffset; - mmesa->Setup[MGA_CTXREG_DSTORG] = mmesa->mgaScreen->backOffset; + mmesa->setup.dstorg = mmesa->mgaScreen->backOffset; mmesa->draw_buffer = MGA_BACK; - mmesa->dirty |= MGA_UPLOAD_CTX; + mmesa->dirty |= MGA_UPLOAD_CONTEXT; mgaXMesaSetBackClipRects( mmesa ); return GL_TRUE; } - else + else { mmesa->Fallback |= MGA_FALLBACK_BUFFER; return GL_FALSE; @@ -292,12 +272,12 @@ { mgaContextPtr mmesa = MGA_CONTEXT(ctx); - if (mode == GL_FRONT_LEFT) + if (mode == GL_FRONT_LEFT) { mmesa->readOffset = mmesa->mgaScreen->frontOffset; mmesa->read_buffer = MGA_FRONT; - } - else + } + else { mmesa->readOffset = mmesa->mgaScreen->backOffset; mmesa->read_buffer = MGA_BACK; Index: xc/lib/GL/mesa/src/drv/mga/mgabuffers.h diff -u xc/lib/GL/mesa/src/drv/mga/mgabuffers.h:1.3 xc/lib/GL/mesa/src/drv/mga/mgabuffers.h:1.4 --- xc/lib/GL/mesa/src/drv/mga/mgabuffers.h:1.3 Fri Aug 25 09:42:23 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgabuffers.h Tue Apr 10 12:07:50 2001 @@ -1,4 +1,30 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgabuffers.h,v 1.3 2000/08/25 13:42:23 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgabuffers.h,v 1.4 2001/04/10 16:07:50 dawes Exp $ */ +/* + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell + */ #ifndef MGA_BUFFERS_H #define MGA_BUFFERS_H Index: xc/lib/GL/mesa/src/drv/mga/mgacontext.h diff -u xc/lib/GL/mesa/src/drv/mga/mgacontext.h:1.1 xc/lib/GL/mesa/src/drv/mga/mgacontext.h:1.4 --- xc/lib/GL/mesa/src/drv/mga/mgacontext.h:1.1 Sun Sep 24 09:51:06 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgacontext.h Tue Apr 10 12:07:50 2001 @@ -1,31 +1,31 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgacontext.h,v 1.1 2000/09/24 13:51:06 alanh Exp $*/ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgacontext.h,v 1.4 2001/04/10 16:07:50 dawes Exp $*/ /* - * GLX Hardware Device Driver for Matrox Millenium G200 - * Copyright (C) 1999 Wittawat Yamwong + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. * - * - * Wittawat Yamwong + * Authors: + * Keith Whitwell */ - #ifndef MGALIB_INC #define MGALIB_INC @@ -34,13 +34,16 @@ #include "dri_mesaint.h" #include "dri_mesa.h" +#include "xf86drm.h" +#include "xf86drmMga.h" + #include "types.h" -#include "drm.h" #include "mm.h" -#include "mgavb.h" #include "mem.h" +#include "mgavb.h" +#include "mga_sarea.h" #define MGA_SET_FIELD(reg,mask,val) reg = ((reg) & (mask)) | ((val) & ~(mask)) #define MGA_FIELD(field,val) (((val) << (field ## _SHIFT)) & ~(field ## _MASK)) @@ -50,15 +53,17 @@ #define MGA_IS_G400(mmesa) (mmesa->mgaScreen->chipset == MGA_CARD_TYPE_G400) -/* SoftwareFallback - * - texture env GL_BLEND -- can be fixed +/* SoftwareFallback + * - texture env GL_BLEND -- can be fixed * - 1D and 3D textures * - incomplete textures + * - GL_DEPTH_FUNC == GL_NEVER not in h/w */ #define MGA_FALLBACK_TEXTURE 0x1 #define MGA_FALLBACK_BUFFER 0x2 #define MGA_FALLBACK_LOGICOP 0x4 #define MGA_FALLBACK_STENCIL 0x8 +#define MGA_FALLBACK_DEPTH 0x10 /* For mgaCtx->new_state. @@ -75,11 +80,11 @@ #define MGA_NEW_CONTEXT 0x200 -typedef void (*mga_interp_func)( GLfloat t, +typedef void (*mga_interp_func)( GLfloat t, GLfloat *result, const GLfloat *in, const GLfloat *out ); - + @@ -96,30 +101,32 @@ #define MGA_TEX_MAXLEVELS 5 -typedef struct mga_texture_object_s +typedef struct mga_texture_object_s { - struct mga_texture_object_s *next; - struct mga_texture_object_s *prev; - struct gl_texture_object *tObj; - struct mga_context_t *ctx; - PMemBlock MemBlock; - GLuint offsets[MGA_TEX_MAXLEVELS]; - int lastLevel; - GLuint dirty_images; - GLuint totalSize; - int texelBytes; - GLuint age; - int bound; - int heap; /* agp or card */ - int Setup[MGA_TEX_SETUP_SIZE]; + struct mga_texture_object_s *next; + struct mga_texture_object_s *prev; + struct gl_texture_object *tObj; + struct mga_context_t *ctx; + PMemBlock MemBlock; + GLuint offsets[MGA_TEX_MAXLEVELS]; + int lastLevel; + GLuint dirty_images; + GLuint totalSize; + int texelBytes; + GLuint age; + int bound; + int heap; /* agp or card */ + + mga_texture_regs_t setup; } mgaTextureObject_t; struct mga_context_t { GLcontext *glCtx; - + GLuint lastStamp; /* fullscreen breaks dpriv->laststamp, + * need to shadow it here. */ - /* Bookkeeping for texturing + /* Bookkeeping for texturing */ int lastTexHeap; struct mga_texture_object_s TexObjList[MGA_NR_TEX_HEAPS]; @@ -136,16 +143,16 @@ GLuint multitex; GLuint tmu_source[2]; GLuint tex_dest[2]; - + GLboolean default32BitTextures; - /* Manage fallbacks + /* Manage fallbacks */ GLuint IndirectTriangles; - int Fallback; + int Fallback; - /* Support for CVA and the fastpath + /* Support for CVA and the fastpath */ unsigned int setupdone; unsigned int setupindex; @@ -160,7 +167,7 @@ unsigned int envcolor; - /* Shortcircuit some state changes + /* Shortcircuit some state changes */ points_func PointsFunc; line_func LineFunc; @@ -168,44 +175,47 @@ quad_func QuadFunc; - /* Manage driver and hardware state + /* Manage driver and hardware state */ - GLuint new_state; + GLuint new_state; GLuint dirty; - GLuint Setup[MGA_CTX_SETUP_SIZE]; + + mga_context_regs_t setup; + GLuint warp_pipe; GLuint vertsize; - GLushort MonoColor; - GLushort ClearColor; + GLuint MonoColor; + GLuint ClearColor; GLuint ClearDepth; GLuint poly_stipple; GLfloat depth_scale; - + GLuint depth_clear_mask; GLuint stencil_clear_mask; GLuint hw_stencil; + GLboolean canDoStipple; /* Dma buffers */ drmBufPtr vertex_dma_buffer; drmBufPtr iload_buffer; - + /* Drawable, cliprect and scissor information */ int dirty_cliprects; /* which sets of cliprects are uptodate? */ int draw_buffer; /* which buffer are we rendering to */ unsigned int drawOffset; /* draw buffer address in space */ - int read_buffer; - int readOffset; + int read_buffer; + int readOffset; int drawX, drawY; /* origin of drawable in draw buffer */ int lastX, lastY; /* detect DSTORG bug */ GLuint numClipRects; /* cliprects for the draw buffer */ XF86DRIClipRectPtr pClipRects; XF86DRIClipRectRec draw_rect; - drm_clip_rect_t scissor_rect; + XF86DRIClipRectRec scissor_rect; int scissor; - + XF86DRIClipRectRec tmp_boxes[2][MGA_NR_SAREA_CLIPRECTS]; @@ -213,10 +223,9 @@ */ unsigned int texAge[MGA_NR_TEX_HEAPS];/* texture LRU age */ unsigned int dirtyAge; /* buffer age for synchronization */ - unsigned int lastSwap; /* throttling runaway apps */ + GLuint primary_offset; - /* Mirrors of some DRI state. */ GLframebuffer *glBuffer; @@ -226,8 +235,8 @@ Display *display; __DRIdrawablePrivate *driDrawable; __DRIscreenPrivate *driScreen; - struct mga_screen_private_s *mgaScreen; - drm_mga_sarea_t *sarea; + struct mga_screen_private_s *mgaScreen; + MGASAREAPrivPtr sarea; /* New setupdma path @@ -250,6 +259,9 @@ #define MGAPACKCOLOR565(r,g,b) \ ((((r) & 0xf8) << 8) | (((g) & 0xfc) << 3) | (((b) & 0xf8) >> 3)) +#define MGAPACKCOLOR88(l, a) \ + (((l) << 8) | (a)) + #define MGAPACKCOLOR888(r,g,b) \ (((r) << 16) | ((g) << 8) | (b)) @@ -260,20 +272,21 @@ ((((a) & 0xf0) << 8) | (((r) & 0xf0) << 4) | ((g) & 0xf0) | ((b) >> 4)) -#define MGA_DEBUG 0 +#define MGA_DEBUG 0 #ifndef MGA_DEBUG extern int MGA_DEBUG; #endif -#define DEBUG_ALWAYS_SYNC 0x1 -#define DEBUG_VERBOSE_MSG 0x2 -#define DEBUG_VERBOSE_LRU 0x4 -#define DEBUG_VERBOSE_DRI 0x8 -#define DEBUG_VERBOSE_IOCTL 0x10 -#define DEBUG_VERBOSE_2D 0x20 +#define DEBUG_ALWAYS_SYNC 0x1 +#define DEBUG_VERBOSE_MSG 0x2 +#define DEBUG_VERBOSE_LRU 0x4 +#define DEBUG_VERBOSE_DRI 0x8 +#define DEBUG_VERBOSE_IOCTL 0x10 +#define DEBUG_VERBOSE_2D 0x20 +#define DEBUG_VERBOSE_FALLBACK 0x40 static __inline__ GLuint mgaPackColor(GLuint cpp, - GLubyte r, GLubyte g, + GLubyte r, GLubyte g, GLubyte b, GLubyte a) { switch (cpp) { @@ -300,11 +313,11 @@ struct mga_elt_tab { void (*emit_unclipped_verts)( struct vertex_buffer *VB ); - void (*build_tri_verts)( mgaContextPtr mmesa, - struct vertex_buffer *VB, + void (*build_tri_verts)( mgaContextPtr mmesa, + struct vertex_buffer *VB, GLfloat *O, GLuint *elt ); - void (*interp)( GLfloat t, GLfloat *O, + void (*interp)( GLfloat t, GLfloat *O, const GLfloat *I, const GLfloat *J ); void (*project_and_emit_verts)( mgaContextPtr mmesa, Index: xc/lib/GL/mesa/src/drv/mga/mgadd.c diff -u xc/lib/GL/mesa/src/drv/mga/mgadd.c:1.6 xc/lib/GL/mesa/src/drv/mga/mgadd.c:1.10 --- xc/lib/GL/mesa/src/drv/mga/mgadd.c:1.6 Wed Nov 8 00:02:45 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgadd.c Tue Apr 10 12:07:50 2001 @@ -1,30 +1,30 @@ /* - * GLX Hardware Device Driver for Matrox G200/G400 - * Copyright (C) 1999 Wittawat Yamwong + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. * - * - * Wittawat Yamwong + * Authors: + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgadd.c,v 1.6 2000/11/08 05:02:45 dawes Exp $ */ - +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgadd.c,v 1.10 2001/04/10 16:07:50 dawes Exp $ */ #include "types.h" @@ -47,8 +47,14 @@ #include "vb.h" #include "dd.h" +#if defined(USE_X86_ASM) || defined(USE_3DNOW_ASM) || defined(USE_KATMAI_ASM) +#include "X86/common_x86_asm.h" +#endif + +#define MGA_DATE "20010321" + /*************************************** * Mesa's Driver Functions ***************************************/ @@ -57,15 +63,57 @@ static const GLubyte *mgaDDGetString( GLcontext *ctx, GLenum name ) { mgaContextPtr mmesa = MGA_CONTEXT( ctx ); - switch (name) { + static char buffer[128]; + + switch ( name ) { case GL_VENDOR: - return (GLubyte *) "Precision Insight, Inc."; + return (GLubyte *) "VA Linux Systems Inc."; + case GL_RENDERER: - if (MGA_IS_G200(mmesa)) return (GLubyte *) "Mesa DRI G200 20000510"; - if (MGA_IS_G400(mmesa)) return (GLubyte *) "Mesa DRI G400 20000510"; - return (GLubyte *) "Mesa DRI MGA 20000510"; + sprintf( buffer, "Mesa DRI %s " MGA_DATE, + MGA_IS_G400(mmesa) ? "G400" : + MGA_IS_G200(mmesa) ? "G200" : "MGA" ); + + /* Append any AGP-specific information. + */ + switch ( mmesa->mgaScreen->agpMode ) { + case 1: + strncat( buffer, " AGP 1x", 7 ); + break; + case 2: + strncat( buffer, " AGP 2x", 7 ); + break; + case 4: + strncat( buffer, " AGP 4x", 7 ); + break; + } + + /* Append any CPU-specific information. + */ +#ifdef USE_X86_ASM + if ( gl_x86_cpu_features ) { + strncat( buffer, " x86", 4 ); + } +#endif +#ifdef USE_MMX_ASM + if ( cpu_has_mmx ) { + strncat( buffer, "/MMX", 4 ); + } +#endif +#ifdef USE_3DNOW_ASM + if ( cpu_has_3dnow ) { + strncat( buffer, "/3DNow!", 7 ); + } +#endif +#ifdef USE_KATMAI_ASM + if ( cpu_has_xmm ) { + strncat( buffer, "/SSE", 4 ); + } +#endif + return (GLubyte *)buffer; + default: - return 0; + return NULL; } } @@ -73,8 +121,8 @@ static GLint mgaGetParameteri(const GLcontext *ctx, GLint param) { switch (param) { - case DD_HAVE_HARDWARE_FOG: - return 1; + case DD_HAVE_HARDWARE_FOG: + return 1; default: fprintf(stderr, "mgaGetParameteri(): unknown parameter!\n"); return 0; @@ -84,16 +132,16 @@ static void mgaBufferSize(GLcontext *ctx, GLuint *width, GLuint *height) { - mgaContextPtr mmesa = MGA_CONTEXT(ctx); + mgaContextPtr mmesa = MGA_CONTEXT(ctx); /* Need to lock to make sure the driDrawable is uptodate. This * information is used to resize Mesa's software buffers, so it has * to be correct. */ - LOCK_HARDWARE( mmesa ); + LOCK_HARDWARE( mmesa ); *width = mmesa->driDrawable->w; *height = mmesa->driDrawable->h; - UNLOCK_HARDWARE( mmesa ); + UNLOCK_HARDWARE( mmesa ); } void mgaDDExtensionsInit( GLcontext *ctx ) @@ -104,7 +152,7 @@ /* Support multitexture only on the g400. */ - if (!MGA_IS_G400(MGA_CONTEXT(ctx))) + if (!MGA_IS_G400(MGA_CONTEXT(ctx))) { gl_extensions_disable( ctx, "GL_ARB_multitexture" ); } @@ -114,12 +162,21 @@ if (MGA_IS_G400(MGA_CONTEXT(ctx))) { gl_extensions_enable( ctx, "GL_EXT_texture_env_add" ); + +#if defined (MESA_packed_depth_stencil) + gl_extensions_enable( ctx, "GL_MESA_packed_depth_stencil" ); +#endif + +#if defined (MESA_experimetal_agp_allocator) + if (!getenv("MGA_DISABLE_AGP_ALLOCATOR")) + gl_extensions_enable( ctx, "GL_MESA_experimental_agp_allocator" ); +#endif } /* we don't support point parameters in hardware yet */ gl_extensions_disable( ctx, "GL_EXT_point_parameters" ); - /* No support for fancy imaging stuff. This should kill off + /* No support for fancy imaging stuff. This should kill off * a few rogue fallbacks. */ gl_extensions_disable( ctx, "ARB_imaging" ); @@ -127,16 +184,16 @@ gl_extensions_disable( ctx, "GL_EXT_blend_minmax" ); gl_extensions_disable( ctx, "GL_EXT_blend_logic_op" ); gl_extensions_disable( ctx, "GL_EXT_blend_subtract" ); - gl_extensions_disable( ctx, "GL_INGR_blend_func_separate" ); - gl_extensions_disable( ctx, "GL_EXT_texture_lod_bias" ); - gl_extensions_disable( ctx, "GL_MESA_resize_buffers" ); - - gl_extensions_disable( ctx, "GL_SGI_color_matrix" ); - gl_extensions_disable( ctx, "GL_SGI_color_table" ); - gl_extensions_disable( ctx, "GL_SGIX_pixel_texture" ); - gl_extensions_disable( ctx, "GL_ARB_texture_cube_map" ); - gl_extensions_disable( ctx, "GL_ARB_texture_compression" ); - gl_extensions_disable( ctx, "GL_EXT_convolution" ); + gl_extensions_disable( ctx, "GL_INGR_blend_func_separate" ); + gl_extensions_disable( ctx, "GL_EXT_texture_lod_bias" ); + gl_extensions_disable( ctx, "GL_MESA_resize_buffers" ); + + gl_extensions_disable( ctx, "GL_SGI_color_matrix" ); + gl_extensions_disable( ctx, "GL_SGI_color_table" ); + gl_extensions_disable( ctx, "GL_SGIX_pixel_texture" ); + gl_extensions_disable( ctx, "GL_ARB_texture_cube_map" ); + gl_extensions_disable( ctx, "GL_ARB_texture_compression" ); + gl_extensions_disable( ctx, "GL_EXT_convolution" ); } Index: xc/lib/GL/mesa/src/drv/mga/mgadd.h diff -u xc/lib/GL/mesa/src/drv/mga/mgadd.h:1.1 xc/lib/GL/mesa/src/drv/mga/mgadd.h:1.2 --- xc/lib/GL/mesa/src/drv/mga/mgadd.h:1.1 Fri Feb 11 12:25:36 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgadd.h Tue Apr 10 12:07:50 2001 @@ -1,29 +1,30 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgadd.h,v 1.2 2001/04/10 16:07:50 dawes Exp $ */ /* - * GLX Hardware Device Driver for Matrox Millenium G200 - * Copyright (C) 1999 Wittawat Yamwong + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. * - * - * Wittawat Yamwong + * Authors: + * Keith Whitwell */ - #ifndef MGADD_INC #define MGADD_INC Index: xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c diff -u xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c:1.5 xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c:1.7 --- xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c:1.5 Tue Sep 26 11:56:47 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c Tue Apr 10 12:07:50 2001 @@ -1,27 +1,30 @@ /* - * GLX Hardware Device Driver for Matrox G400 - * Copyright (C) 1999 Keith Whitwell + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. * + * Authors: + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c,v 1.5 2000/09/26 15:56:47 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c,v 1.7 2001/04/10 16:07:50 dawes Exp $ */ #include @@ -42,8 +45,8 @@ /* Always use a full-sized stride for vertices. [FIXME] * Stride in the buffers must be a quadword multiple. */ -#define BUFFER_STRIDE 12 -#define CLIP_STRIDE 10 +#define BUFFER_STRIDE 12 +#define CLIP_STRIDE 10 static void fire_elts( mgaContextPtr mmesa ) @@ -57,32 +60,32 @@ GLuint retain = (mmesa->elt_buf == mmesa->retained_buf); if (mmesa->first_elt != mmesa->next_elt) { - mgaFireEltsLocked( mmesa, - ((char *)mmesa->first_elt - + mgaFireEltsLocked( mmesa, + ((char *)mmesa->first_elt - (char *)mmesa->elt_buf->address), - ((char *)mmesa->next_elt - + ((char *)mmesa->next_elt - (char *)mmesa->elt_buf->address), !retain ); - } else if (!retain) + } else if (!retain) mgaReleaseBufLocked( mmesa, mmesa->elt_buf ); - + mmesa->elt_buf = 0; - } - else if (mmesa->vertex_dma_buffer) + } + else if (mmesa->vertex_dma_buffer) { mgaFlushVerticesLocked( mmesa ); } mgaGetEltBufLocked( mmesa ); - + UNLOCK_HARDWARE( mmesa ); - mmesa->next_vert = (GLfloat *)((char *)mmesa->elt_buf->address + - mmesa->elt_buf->total - + mmesa->next_vert = (GLfloat *)((char *)mmesa->elt_buf->address + + mmesa->elt_buf->total - BUFFER_STRIDE * sizeof(GLfloat)); - mmesa->next_vert_phys = (mmesa->mgaScreen->dmaOffset + - mmesa->elt_buf->idx * MGA_DMA_BUF_SZ + + mmesa->next_vert_phys = (mmesa->mgaScreen->dmaOffset + + mmesa->elt_buf->idx * MGA_BUFFER_SIZE + mmesa->elt_buf->total - BUFFER_STRIDE * sizeof(GLfloat)); @@ -94,14 +97,14 @@ static void release_bufs( mgaContextPtr mmesa ) { - if (mmesa->retained_buf && mmesa->retained_buf != mmesa->elt_buf) + if (mmesa->retained_buf && mmesa->retained_buf != mmesa->elt_buf) { LOCK_HARDWARE( mmesa ); if (mmesa->first_elt != mmesa->next_elt) { - mgaFireEltsLocked( mmesa, - ((char *)mmesa->first_elt - + mgaFireEltsLocked( mmesa, + ((char *)mmesa->first_elt - (char *)mmesa->elt_buf->address), - ((char *)mmesa->next_elt - + ((char *)mmesa->next_elt - (char *)mmesa->elt_buf->address), 0 ); @@ -200,7 +203,7 @@ CLIP(-,1,CLIP_TOP_BIT); CLIP(+,1,CLIP_BOTTOM_BIT); CLIP(-,2,CLIP_FAR_BIT); - CLIP(+,2,CLIP_NEAR_BIT); + CLIP(+,2,CLIP_NEAR_BIT); { @@ -208,15 +211,15 @@ GLuint space = (char *)mmesa->next_vert - (char *)mmesa->next_elt; if (space < n * (BUFFER_STRIDE + 3) * sizeof(GLuint)) - fire_elts(mmesa); + fire_elts(mmesa); /* Project the new vertices and emit to dma buffers. Translate - * out values to physical addresses for setup dma. + * out values to physical addresses for setup dma. */ tab->project_and_emit_verts( mmesa, (GLfloat *)verts, out, n ); - + /* Convert the planar polygon to a list of triangles and emit to - * elt buffers. + * elt buffers. */ for (i = 2 ; i < n ; i++) { mmesa->next_elt[0] = out[0]; @@ -275,8 +278,8 @@ -#define RENDER_POINTS(start, count) -#define RENDER_LINE(i1, i0) +#define RENDER_POINTS(start, count) +#define RENDER_LINE(i1, i0) #define RENDER_TRI(i2, i1, i0, pv, parity) \ do { \ GLuint e2 = elt[i2], e1 = elt[i1], e0 = elt[i0]; \ @@ -298,8 +301,8 @@ GLuint *elt = VB->EltPtr->data; \ (void) elt; (void) mmesa; -#define RENDER_POINTS(start, count) -#define RENDER_LINE(i1, i0) +#define RENDER_POINTS(start, count) +#define RENDER_LINE(i1, i0) #define RENDER_TRI(i2, i1, i0, pv, parity) \ do { \ GLuint e2 = elt[i2], e1 = elt[i1], e0 = elt[i0]; \ @@ -333,10 +336,10 @@ m[MAT_TZ] = mat->m[MAT_TZ] * mmesa->depth_scale; } -#define CLIP_UBYTE_B 0 -#define CLIP_UBYTE_G 1 +#define CLIP_UBYTE_B 0 +#define CLIP_UBYTE_G 1 #define CLIP_UBYTE_R 2 -#define CLIP_UBYTE_A 3 +#define CLIP_UBYTE_A 3 #define TYPE (0) @@ -389,26 +392,26 @@ /* Use a temporary array for device coordinates, so that we can easily * tap into existing mesa assembly. Otherwise consider emitting * device coordinates to dma buffers directly from the project/cliptest - * routine. (requires output stride, potential loss of writecombining - * efficiency?) + * routine. (requires output stride, potential loss of writecombining + * efficiency?) * * This path is a lot closer to the standard vertex path in the * initial stages than the original fastpath. A slightly more optimal * path could be constructed, but would require us to write new - * assembly. + * assembly. */ void mgaDDEltPath( struct vertex_buffer *VB ) { GLcontext *ctx = VB->ctx; GLenum prim = ctx->CVA.elt_mode; - mgaContextPtr mmesa = MGA_CONTEXT( ctx ); + mgaContextPtr mmesa = MGA_CONTEXT( ctx ); struct mga_elt_tab *tab = &mgaEltTab[mmesa->setupindex & VALID_SETUP]; VB->ClipPtr = TransformRaw(&VB->Clip, &ctx->ModelProjectMatrix, VB->ObjPtr ); refresh_projection_matrix( ctx ); - VB->ClipAndMask = ~0; + VB->ClipAndMask = ~0; VB->ClipOrMask = 0; VB->Projected = gl_clip_tab[VB->ClipPtr->size]( VB->ClipPtr, &VB->Win, @@ -416,33 +419,33 @@ &VB->ClipOrMask, &VB->ClipAndMask ); - if (VB->ClipAndMask) + if (VB->ClipAndMask) return; - if (mmesa->vertex_dma_buffer) + if (mmesa->vertex_dma_buffer) mgaFlushVertices( mmesa ); if (mmesa->new_state) mgaDDUpdateHwState( ctx ); /* Allocate a single buffer to hold unclipped vertices. All - * unclipped vertices must be contiguous. + * unclipped vertices must be contiguous. */ - if ((char *)mmesa->next_vert - (char *)mmesa->next_elt < - VB->Count * BUFFER_STRIDE * sizeof(GLuint)) + if ((char *)mmesa->next_vert - (char *)mmesa->next_elt < + VB->Count * BUFFER_STRIDE * sizeof(GLuint)) fire_elts( mmesa ); mmesa->retained_buf = mmesa->elt_buf; - + /* Emit unclipped vertices to the buffer. */ - tab->emit_unclipped_verts( VB ); - + tab->emit_unclipped_verts( VB ); + /* Emit indices and clipped vertices to one or more buffers. */ if (VB->ClipOrMask) { mmesa->elt_tab = tab; - mga_render_tab_elt[prim]( VB, 0, VB->EltPtr->count, 0 ); + mga_render_tab_elt[prim]( VB, 0, VB->EltPtr->count, 0 ); } else mga_render_tab_elt_unclipped[prim]( VB, 0, VB->EltPtr->count, 0 ); @@ -450,9 +453,8 @@ */ release_bufs( mmesa ); - /* This indicates that there is no cached data to reuse. + /* This indicates that there is no cached data to reuse. */ VB->pipeline->data_valid = 0; VB->pipeline->new_state = 0; } - Index: xc/lib/GL/mesa/src/drv/mga/mgaelttmp.h diff -u xc/lib/GL/mesa/src/drv/mga/mgaelttmp.h:1.3 xc/lib/GL/mesa/src/drv/mga/mgaelttmp.h:1.4 --- xc/lib/GL/mesa/src/drv/mga/mgaelttmp.h:1.3 Sun Aug 27 22:43:12 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgaelttmp.h Tue Apr 10 12:07:50 2001 @@ -1,30 +1,33 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaelttmp.h,v 1.4 2001/04/10 16:07:50 dawes Exp $ */ /* - * DRI Hardware Device Driver for G200/G400 - * Copyright (C) 1999 Keith Whitwell + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. * + * Authors: + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaelttmp.h,v 1.3 2000/08/28 02:43:12 tsi Exp $ */ /* Buffers fill from high addresses down with vertices and from low - * addresses up with elements. + * addresses up with elements. */ @@ -55,14 +58,14 @@ mmesa->retained_buf = mmesa->elt_buf; mmesa->first_vert_phys = mmesa->next_vert_phys; - for (i = 0 ; i < count ; f -= BUFFER_STRIDE, i++) + for (i = 0 ; i < count ; f -= BUFFER_STRIDE, i++) { - if (!clipmask[i]) + if (!clipmask[i]) { f[0] = sx * dev[0] + tx; f[1] = sy * dev[1] + ty; f[2] = sz * dev[2] + tz; - f[3] = dev[3]; + f[3] = dev[3]; if (TYPE & MGA_RGBA_BIT) { #if defined(USE_X86_ASM) @@ -107,12 +110,12 @@ /* Build three temporary clipspace vertex for clipping a triangle. * Recreate from the VB data rather than trying to read back from - * uncached memory. + * uncached memory. */ static void TAG(build_tri_verts)( mgaContextPtr mmesa, - struct vertex_buffer *VB, - GLfloat *O, - GLuint *elt ) + struct vertex_buffer *VB, + GLfloat *O, + GLuint *elt ) { int i; @@ -121,7 +124,7 @@ O[0] = clip[0]; O[1] = clip[1]; - O[2] = clip[2]; + O[2] = clip[2]; O[3] = clip[3]; if (TYPE & MGA_RGBA_BIT) { @@ -163,7 +166,7 @@ /* Interpolate between two of the vertices constructed above. */ -static void TAG(interp)( GLfloat t, +static void TAG(interp)( GLfloat t, GLfloat *O, const GLfloat *I, const GLfloat *J ) @@ -181,7 +184,7 @@ } *(GLuint *)&O[5] = ~0; /* note that this is a new vertex */ - + if (TYPE & MGA_TEX0_BIT) { O[6] = LINTERP(t, I[6], J[6]); O[7] = LINTERP(t, I[7], J[7]); @@ -204,7 +207,7 @@ GLuint *elt, int nr) { - + GLfloat *O = mmesa->next_vert; GLuint phys = mmesa->next_vert_phys; @@ -212,27 +215,27 @@ const GLfloat sx = m[0], sy = m[5], sz = m[10]; const GLfloat tx = m[12], ty = m[13], tz = m[14]; GLuint i; - + for (i = 0 ; i < nr ; i++) { const GLfloat *I = &verts[elt[i] * CLIP_STRIDE]; GLuint tmp = *(GLuint *)&I[5]; - if ((elt[i] = tmp) == ~0) - { + if ((elt[i] = tmp) == ~0) + { GLfloat oow = 1.0/I[3]; elt[i] = phys; phys -= BUFFER_STRIDE * sizeof(GLuint); - + O[0] = sx * I[0] * oow + tx; O[1] = sy * I[1] * oow + ty; O[2] = sz * I[2] * oow + tz; - O[3] = oow; + O[3] = oow; if (TYPE & MGA_RGBA_BIT) { *(int*)&O[4] = *(int*)&I[4]; } - + if (TYPE & MGA_TEX0_BIT) { *(int*)&O[6] = *(int*)&I[6]; *(int*)&O[7] = *(int*)&I[7]; Index: xc/lib/GL/mesa/src/drv/mga/mgafastpath.c diff -u xc/lib/GL/mesa/src/drv/mga/mgafastpath.c:1.6 xc/lib/GL/mesa/src/drv/mga/mgafastpath.c:1.8 --- xc/lib/GL/mesa/src/drv/mga/mgafastpath.c:1.6 Mon Nov 13 18:31:28 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgafastpath.c Tue Apr 10 12:07:50 2001 @@ -1,27 +1,30 @@ /* - * GLX Hardware Device Driver for Intel i810 - * Copyright (C) 1999 Keith Whitwell + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. * + * Authors: + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgafastpath.c,v 1.6 2000/11/13 23:31:28 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgafastpath.c,v 1.8 2001/04/10 16:07:50 dawes Exp $ */ #include @@ -41,7 +44,7 @@ extern void mgaDDResizeVB( struct vertex_buffer *VB, GLuint size ); extern void gl_fast_copy_vb( struct vertex_buffer *VB ); - + struct mga_fast_tab { void (*build_vertices)( struct vertex_buffer *VB, GLuint do_cliptest ); void (*interp)( GLfloat t, GLfloat *O, const GLfloat *I, const GLfloat *J ); @@ -112,7 +115,7 @@ GLuint nr = VB->EltPtr->count; render_func func = render_tab_mga_smooth_indirect[prim]; GLuint p = 0; - + if (mmesa->new_state) mgaDDUpdateHwState( ctx ); @@ -247,7 +250,7 @@ /* Convert the planar polygon to a list of triangles. */ out = inlist[in]; - + for (i = 2 ; i < n ; i++) { elts[0] = out[0]; elts[1] = out[i-1]; @@ -287,7 +290,7 @@ #define CLIP_POINT( e ) \ if (mask[e]) \ - *out++ = e + *out++ = e #define CLIP_LINE( e1, e0 ) \ do { \ @@ -342,7 +345,7 @@ #define POSTFIX \ MGA_DRIVER_DATA(VB)->clipped_elements.count = \ out - MGA_DRIVER_DATA(VB)->clipped_elements.data; \ - MGA_DRIVER_DATA(VB)->last_vert = next_vert; + MGA_DRIVER_DATA(VB)->last_vert = next_vert; #define INIT(x) @@ -424,10 +427,10 @@ /* Pack rgba and/or texture into the remaining half of a 32 byte vertex. */ #define CLIP_UBYTE_COLOR 4 -#define CLIP_UBYTE_B 0 -#define CLIP_UBYTE_G 1 +#define CLIP_UBYTE_B 0 +#define CLIP_UBYTE_G 1 #define CLIP_UBYTE_R 2 -#define CLIP_UBYTE_A 3 +#define CLIP_UBYTE_A 3 #define CLIP_S0 6 #define CLIP_T0 7 #define CLIP_S1 8 @@ -478,29 +481,26 @@ #define VALID_SETUP (MGA_RGBA_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT) - void mgaDDFastPath( struct vertex_buffer *VB ) { GLcontext *ctx = VB->ctx; GLenum prim = ctx->CVA.elt_mode; - mgaContextPtr mmesa = MGA_CONTEXT( ctx ); + mgaContextPtr mmesa = MGA_CONTEXT( ctx ); struct mga_fast_tab *tab = &mgaFastTab[mmesa->setupindex & VALID_SETUP]; GLuint do_cliptest = 1; gl_prepare_arrays_cva( VB ); /* still need this */ -#if 1 - if (gl_reduce_prim[prim] == GL_TRIANGLES && - VB->Count < (MGA_DMA_BUF_SZ / 48) && + if (gl_reduce_prim[prim] == GL_TRIANGLES && + VB->Count < (MGA_BUFFER_SIZE / 48) && (ctx->ModelProjectMatrix.flags & (MAT_FLAG_GENERAL| MAT_FLAG_PERSPECTIVE)) && - mmesa->mgaScreen->chipset == MGA_CARD_TYPE_G400) + mmesa->mgaScreen->chipset == MGA_CARD_TYPE_G400) { mgaDDEltPath( VB ); return; } -#endif /* Reserve enough space for the pathological case. */ @@ -517,9 +517,9 @@ if (VB->ClipOrMask) { if (!VB->ClipAndMask) { render_func *clip = mga_clip_render_tab_elt; - + mmesa->interp = tab->interp; - + clip[prim]( VB, 0, VB->EltPtr->count, 0 ); /* build new elts */ ctx->CVA.elt_mode = gl_reduce_prim[prim]; @@ -533,9 +533,8 @@ mga_render_elements_direct( VB ); /* render using orig list */ } - /* This indicates that there is no cached data to reuse. + /* This indicates that there is no cached data to reuse. */ VB->pipeline->data_valid = 0; VB->pipeline->new_state = 0; } - Index: xc/lib/GL/mesa/src/drv/mga/mgafasttmp.h diff -u xc/lib/GL/mesa/src/drv/mga/mgafasttmp.h:1.2 xc/lib/GL/mesa/src/drv/mga/mgafasttmp.h:1.3 --- xc/lib/GL/mesa/src/drv/mga/mgafasttmp.h:1.2 Fri Jun 16 20:03:01 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgafasttmp.h Tue Apr 10 12:07:50 2001 @@ -1,29 +1,32 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgafasttmp.h,v 1.3 2001/04/10 16:07:50 dawes Exp $ */ /* - * DRI Hardware Device Driver for G200/G400 - * Copyright (C) 1999 Keith Whitwell + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. * + * Authors: + * Keith Whitwell */ - /* The first part of setup is applied to all vertices, clipped or * unclipped. This data will be used for clipping, and then all * vertices with a zero clipmask will be projected to device space. @@ -41,14 +44,14 @@ GLuint count = VB->Count; gl_xform_points3_v16_general(MGA_DRIVER_DATA(VB)->verts[start].f, - m, + m, VB->ObjPtr->start, VB->ObjPtr->stride, count - start); if (do_cliptest) { - VB->ClipAndMask = ~0; + VB->ClipAndMask = ~0; VB->ClipOrMask = 0; gl_cliptest_points4_v16(MGA_DRIVER_DATA(VB)->verts[start].f, MGA_DRIVER_DATA(VB)->verts[count].f, @@ -121,7 +124,7 @@ #else *(unsigned int *)(f+CLIP_S1) = *(unsigned int *)tex1_data; *(unsigned int *)(f+CLIP_T1) = *(unsigned int *)(tex1_data+1); -#endif +#endif } if(TYPE & MGA_RGBA_BIT)color += color_stride; if(TYPE & MGA_TEX0_BIT)STRIDE_F(tex0_data, tex0_stride); @@ -139,7 +142,7 @@ * routine into the header. Less code and better chance of doing some * of this stuff in assembly. */ -static void TAG(mga_interp_vert)( GLfloat t, +static void TAG(mga_interp_vert)( GLfloat t, GLfloat *O, const GLfloat *I, const GLfloat *J ) Index: xc/lib/GL/mesa/src/drv/mga/mgaioctl.c diff -u xc/lib/GL/mesa/src/drv/mga/mgaioctl.c:1.8 xc/lib/GL/mesa/src/drv/mga/mgaioctl.c:1.11 --- xc/lib/GL/mesa/src/drv/mga/mgaioctl.c:1.8 Wed Nov 8 00:02:45 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgaioctl.c Tue Apr 10 12:07:50 2001 @@ -1,4 +1,31 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaioctl.c,v 1.8 2000/11/08 05:02:45 dawes Exp $ */ +/* + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell + * Gareth Hughes + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaioctl.c,v 1.11 2001/04/10 16:07:50 dawes Exp $ */ #include @@ -19,71 +46,30 @@ #include "drm.h" #include -#define DEPTH_SCALE_16 ((GLfloat)0xffff) -#define DEPTH_SCALE_32 ((GLfloat)0xffffffff) - static void mga_iload_dma_ioctl(mgaContextPtr mmesa, - unsigned long dest, + unsigned long dest, int length) { - int retcode; - drm_mga_iload_t iload; drmBufPtr buf = mmesa->iload_buffer; - - iload.idx = buf->idx; - iload.destOrg = dest; - iload.length = length; + int ret; - if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) + if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) fprintf(stderr, "DRM_IOCTL_MGA_ILOAD idx %d dst %x length %d\n", - iload.idx, iload.destOrg, iload.length); - - - if ((retcode = ioctl(mmesa->driFd, DRM_IOCTL_MGA_ILOAD, &iload))) { - printf("send iload retcode = %d\n", retcode); + buf->idx, (int) dest, length); + + ret = drmMGATextureLoad( mmesa->driFd, buf->idx, dest, length ); + if ( ret < 0 ) { + printf("send iload retcode = %d\n", ret); exit(1); } mmesa->iload_buffer = 0; - if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) + if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) fprintf(stderr, "finished iload dma put\n"); } -int mgaUpdateLock( mgaContextPtr mmesa, drmLockFlags flags ) -{ - drm_lock_t lock; - int retcode; - - lock.flags = 0; - - if (mmesa->sarea->last_quiescent != mmesa->sarea->last_enqueue && - flags & DRM_LOCK_QUIESCENT) { - if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "mgaLockQuiescent\n"); - lock.flags |= _DRM_LOCK_QUIESCENT; - } - - if (flags & DRM_LOCK_FLUSH) lock.flags |= _DRM_LOCK_FLUSH; - if (flags & DRM_LOCK_FLUSH_ALL) lock.flags |= _DRM_LOCK_FLUSH_ALL; - - if (!lock.flags) - return 0; - - retcode = ioctl(mmesa->driFd, DRM_IOCTL_MGA_FLUSH, &lock); - if(retcode != 0) { - fprintf(stderr, "Lockupdate failed\n"); - if(retcode == EACCES) exit(1); - else return -1; - } - - if(flags & DRM_LOCK_QUIESCENT) - mmesa->sarea->last_quiescent = mmesa->sarea->last_enqueue; - - return 0; -} - drmBufPtr mga_get_buffer_ioctl( mgaContextPtr mmesa ) { int idx = 0; @@ -91,17 +77,17 @@ drmDMAReq dma; int retcode; drmBufPtr buf; - + if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) fprintf(stderr, "Getting dma buffer\n"); - + dma.context = mmesa->hHWContext; dma.send_count = 0; dma.send_list = NULL; dma.send_sizes = NULL; dma.flags = 0; dma.request_count = 1; - dma.request_size = MGA_DMA_BUF_SZ; + dma.request_size = MGA_BUFFER_SIZE; dma.request_list = &idx; dma.request_sizes = &size; dma.granted_count = 0; @@ -109,34 +95,35 @@ if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) fprintf(stderr, "drmDMA (get) ctx %d count %d size 0x%x\n", - dma.context, dma.request_count, + dma.context, dma.request_count, dma.request_size); while (1) { retcode = drmDMA(mmesa->driFd, &dma); if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "retcode %d sz %d idx %d count %d\n", + fprintf(stderr, "retcode %d sz %d idx %d count %d\n", retcode, dma.request_sizes[0], dma.request_list[0], dma.granted_count); - if (retcode == 0 && + if (retcode == 0 && dma.request_sizes[0] && - dma.granted_count) + dma.granted_count) break; - if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) + if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) fprintf(stderr, "\n\nflush"); - mgaUpdateLock( mmesa, DRM_LOCK_FLUSH ); + + UPDATE_LOCK( mmesa, DRM_LOCK_FLUSH | DRM_LOCK_QUIESCENT ); } buf = &(mmesa->mgaScreen->bufs->list[idx]); buf->used = 0; if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, + fprintf(stderr, "drmDMA (get) returns size[0] 0x%x idx[0] %d\n" "dma_buffer now: buf idx: %d size: %d used: %d addr %p\n", dma.request_sizes[0], dma.request_list[0], @@ -152,75 +139,71 @@ -GLbitfield mgaClear( GLcontext *ctx, GLbitfield mask, GLboolean all, - GLint cx, GLint cy, GLint cw, GLint ch ) +static GLbitfield +mgaDDClear( GLcontext *ctx, GLbitfield mask, GLboolean all, + GLint cx, GLint cy, GLint cw, GLint ch ) { - mgaContextPtr mmesa = MGA_CONTEXT( ctx ); + mgaContextPtr mmesa = MGA_CONTEXT(ctx); __DRIdrawablePrivate *dPriv = mmesa->driDrawable; - drm_mga_clear_t clear; - int retcode; + GLuint flags = 0; + GLuint clear_color = mmesa->ClearColor; + GLuint clear_depth = 0; + GLuint color_mask = 0; + GLuint depth_mask = 0; + int ret; int i; static int nrclears; - if (0) fprintf(stderr, "clear %d: %d,%d %dx%d\n", all,cx,cy,cw,ch); - - clear.flags = 0; - clear.clear_color = mmesa->ClearColor; - clear.clear_depth = 0; - clear.clear_depth_mask = 0; - FLUSH_BATCH( mmesa ); - - if (mask & DD_FRONT_LEFT_BIT) { - clear.flags |= MGA_FRONT; - clear.clear_color_mask = mmesa->Setup[MGA_CTXREG_PLNWT]; + + if ( mask & DD_FRONT_LEFT_BIT ) { + flags |= MGA_FRONT; + color_mask = mmesa->setup.plnwt; mask &= ~DD_FRONT_LEFT_BIT; } - if (mask & DD_BACK_LEFT_BIT) { - clear.flags |= MGA_BACK; - clear.clear_color_mask = mmesa->Setup[MGA_CTXREG_PLNWT]; + if ( mask & DD_BACK_LEFT_BIT ) { + flags |= MGA_BACK; + color_mask = mmesa->setup.plnwt; mask &= ~DD_BACK_LEFT_BIT; } - if ((mask & DD_DEPTH_BIT) && ctx->Depth.Mask) { - clear.flags |= MGA_DEPTH; - clear.clear_depth_mask |= mmesa->depth_clear_mask; - clear.clear_depth = (mmesa->ClearDepth & - mmesa->depth_clear_mask); + if ( (mask & DD_DEPTH_BIT) && ctx->Depth.Mask ) { + flags |= MGA_DEPTH; + clear_depth = (mmesa->ClearDepth & mmesa->depth_clear_mask); + depth_mask |= mmesa->depth_clear_mask; mask &= ~DD_DEPTH_BIT; } - if ((mask & DD_STENCIL_BIT) && mmesa->hw_stencil) { - clear.flags |= MGA_DEPTH; - clear.clear_depth_mask |= mmesa->stencil_clear_mask; - clear.clear_depth |= (ctx->Stencil.Clear & - mmesa->stencil_clear_mask); + if ( (mask & DD_STENCIL_BIT) && mmesa->hw_stencil ) { + flags |= MGA_DEPTH; + clear_depth |= (ctx->Stencil.Clear & mmesa->stencil_clear_mask); + depth_mask |= mmesa->stencil_clear_mask; mask &= ~DD_STENCIL_BIT; } - if (!clear.flags) + if ( !flags ) return mask; LOCK_HARDWARE( mmesa ); - if (mmesa->dirty_cliprects) - mgaUpdateRects( mmesa, (MGA_FRONT|MGA_BACK)); + if ( mmesa->dirty_cliprects ) + mgaUpdateRects( mmesa, (MGA_FRONT | MGA_BACK) ); /* flip top to bottom */ cy = dPriv->h-cy-ch; cx += mmesa->drawX; cy += mmesa->drawY; - if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "Clear, bufs %x nbox %d\n", - (int)clear.flags, (int)mmesa->numClipRects); + if ( MGA_DEBUG & DEBUG_VERBOSE_IOCTL ) + fprintf( stderr, "Clear, bufs %x nbox %d\n", + (int)flags, (int)mmesa->numClipRects ); - for (i = 0 ; i < mmesa->numClipRects ; ) - { + for (i = 0 ; i < mmesa->numClipRects ; ) + { int nr = MIN2(i + MGA_NR_SAREA_CLIPRECTS, mmesa->numClipRects); - XF86DRIClipRectRec *box = mmesa->pClipRects; - drm_clip_rect_t *b = mmesa->sarea->boxes; + XF86DRIClipRectPtr box = mmesa->pClipRects; + XF86DRIClipRectPtr b = mmesa->sarea->boxes; int n = 0; if (!all) { @@ -230,7 +213,7 @@ GLint w = box[i].x2 - x; GLint h = box[i].y2 - y; - if (x < cx) w -= cx - x, x = cx; + if (x < cx) w -= cx - x, x = cx; if (y < cy) h -= cy - y, y = cy; if (x + w > cx + cw) w = cx + cw - x; if (y + h > cy + ch) h = cy + ch - y; @@ -246,28 +229,28 @@ } } else { for ( ; i < nr ; i++) { - *b++ = *(drm_clip_rect_t *)&box[i]; + *b++ = *(XF86DRIClipRectPtr)&box[i]; n++; } } - if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, - "DRM_IOCTL_MGA_CLEAR flag 0x%x color %x depth %x nbox %d\n", - clear.flags, clear.clear_color, - clear.clear_depth, mmesa->sarea->nbox); - + if ( MGA_DEBUG & DEBUG_VERBOSE_IOCTL ) + fprintf( stderr, + "DRM_IOCTL_MGA_CLEAR flag 0x%x color %x depth %x nbox %d\n", + flags, clear_color, clear_depth, mmesa->sarea->nbox ); mmesa->sarea->nbox = n; - retcode = ioctl(mmesa->driFd, DRM_IOCTL_MGA_CLEAR, &clear); - if (retcode) { - printf("send clear retcode = %d\n", retcode); - exit(1); + ret = drmMGAClear( mmesa->driFd, flags, + clear_color, clear_depth, + color_mask, depth_mask ); + if ( ret ) { + fprintf( stderr, "send clear retcode = %d\n", ret ); + exit( 1 ); } - if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "finished clear %d\n", ++nrclears); + if ( MGA_DEBUG & DEBUG_VERBOSE_IOCTL ) + fprintf( stderr, "finished clear %d\n", ++nrclears ); } UNLOCK_HARDWARE( mmesa ); @@ -282,125 +265,136 @@ /* - * Copy the back buffer to the front buffer. + * Copy the back buffer to the front buffer. */ -void mgaSwapBuffers( mgaContextPtr mmesa ) +void mgaSwapBuffers( mgaContextPtr mmesa ) { __DRIdrawablePrivate *dPriv = mmesa->driDrawable; XF86DRIClipRectPtr pbox; - int nbox; - drm_mga_swap_t swap; - int retcode; - int i; - int tmp; - + GLint nbox; + GLint ret, wait = 0; + GLint i; + GLuint last_frame, last_wrap; FLUSH_BATCH( mmesa ); LOCK_HARDWARE( mmesa ); - + + last_frame = mmesa->sarea->last_frame.head; + last_wrap = mmesa->sarea->last_frame.wrap; + + /* FIXME: Add a timeout to this loop... + */ + while ( 1 ) { + if ( last_wrap < mmesa->sarea->last_wrap || + ( last_wrap == mmesa->sarea->last_wrap && + last_frame <= (MGA_READ( MGAREG_PRIMADDRESS ) - + mmesa->primary_offset) ) ) { + break; + } + if ( 0 ) { + wait++; + fprintf( stderr, " last: head=0x%06x wrap=%d\n", + last_frame, last_wrap ); + fprintf( stderr, " head: head=0x%06x wrap=%d\n", + MGA_READ( MGAREG_PRIMADDRESS ) - mmesa->primary_offset, + mmesa->sarea->last_wrap ); + } + UPDATE_LOCK( mmesa, DRM_LOCK_FLUSH ); + + for ( i = 0 ; i < 1024 ; i++ ) { + /* Don't just hammer the register... */ + } + } + if ( wait ) + fprintf( stderr, "\n" ); + /* Use the frontbuffer cliprects */ - if (mmesa->dirty_cliprects & MGA_FRONT) + if (mmesa->dirty_cliprects & MGA_FRONT) mgaUpdateRects( mmesa, MGA_FRONT ); - + pbox = dPriv->pClipRects; nbox = dPriv->numClipRects; - if (0) fprintf(stderr, "swap, nbox %d\n", nbox); - for (i = 0 ; i < nbox ; ) { int nr = MIN2(i + MGA_NR_SAREA_CLIPRECTS, dPriv->numClipRects); - XF86DRIClipRectRec *b = (XF86DRIClipRectRec *)mmesa->sarea->boxes; + XF86DRIClipRectPtr b = mmesa->sarea->boxes; mmesa->sarea->nbox = nr - i; - - for ( ; i < nr ; i++) + + for ( ; i < nr ; i++) *b++ = pbox[i]; - + if (0) - fprintf(stderr, "DRM_IOCTL_MGA_SWAP\n"); + fprintf(stderr, "DRM_IOCTL_MGA_SWAP\n"); -#if 1 - if((retcode = ioctl(mmesa->driFd, DRM_IOCTL_MGA_SWAP, &swap))) { - printf("send swap retcode = %d\n", retcode); + ret = drmMGASwapBuffers( mmesa->driFd ); + if ( ret ) { + printf("send swap retcode = %d\n", ret); exit(1); } -#else - mgaUpdateLock( mmesa, DRM_LOCK_FLUSH ); -#endif - - if (0) - fprintf(stderr, "finished swap %d\n", ++nrswaps); } - tmp = GET_ENQUEUE_AGE(mmesa); - UNLOCK_HARDWARE( mmesa ); - if (GET_DISPATCH_AGE(mmesa) < mmesa->lastSwap) - mgaWaitAge(mmesa, mmesa->lastSwap); - - mmesa->lastSwap = tmp; mmesa->dirty |= MGA_UPLOAD_CLIPRECTS; } /* This is overkill */ -void mgaDDFinish( GLcontext *ctx ) +void mgaDDFinish( GLcontext *ctx ) { mgaContextPtr mmesa = MGA_CONTEXT(ctx); FLUSH_BATCH( mmesa ); - if (mmesa->sarea->last_quiescent != mmesa->sarea->last_enqueue) { + if (1/*mmesa->sarea->last_quiescent != mmesa->sarea->last_enqueue*/) { if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) fprintf(stderr, "mgaRegetLockQuiescent\n"); LOCK_HARDWARE( mmesa ); - mgaUpdateLock( mmesa, DRM_LOCK_QUIESCENT | DRM_LOCK_FLUSH); + UPDATE_LOCK( mmesa, DRM_LOCK_QUIESCENT | DRM_LOCK_FLUSH ); UNLOCK_HARDWARE( mmesa ); mmesa->sarea->last_quiescent = mmesa->sarea->last_enqueue; } } -void mgaWaitAgeLocked( mgaContextPtr mmesa, int age ) +void mgaWaitAgeLocked( mgaContextPtr mmesa, int age ) { if (GET_DISPATCH_AGE(mmesa) < age) { - if (0) fprintf(stderr, "\n\n\nmgaWaitAgeLocked\n"); - mgaUpdateLock( mmesa, DRM_LOCK_FLUSH ); + UPDATE_LOCK( mmesa, DRM_LOCK_FLUSH ); } } -void mgaWaitAge( mgaContextPtr mmesa, int age ) +void mgaWaitAge( mgaContextPtr mmesa, int age ) { if (GET_DISPATCH_AGE(mmesa) < age) { LOCK_HARDWARE(mmesa); if (GET_DISPATCH_AGE(mmesa) < age) { - if (0) fprintf(stderr, "\n\n\nmgaWaitAge\n"); - mgaUpdateLock( mmesa, DRM_LOCK_FLUSH ); + UPDATE_LOCK( mmesa, DRM_LOCK_FLUSH ); } UNLOCK_HARDWARE(mmesa); } } -static int intersect_rect( drm_clip_rect_t *out, - drm_clip_rect_t *a, - drm_clip_rect_t *b ) +static int intersect_rect( XF86DRIClipRectPtr out, + XF86DRIClipRectPtr a, + XF86DRIClipRectPtr b ) { *out = *a; if (b->x1 > out->x1) out->x1 = b->x1; if (b->y1 > out->y1) out->y1 = b->y1; if (b->x2 < out->x2) out->x2 = b->x2; if (b->y2 < out->y2) out->y2 = b->y2; - if (out->x1 >= out->x2) return 0; - if (out->y1 >= out->y2) return 0; + if (out->x1 > out->x2) return 0; + if (out->y1 > out->y2) return 0; return 1; } @@ -413,12 +407,13 @@ if (mmesa->CurrentTexObj[1]) mmesa->CurrentTexObj[1]->age = age; } +static int __break_vertex = 0; + void mgaFlushVerticesLocked( mgaContextPtr mmesa ) { - drm_clip_rect_t *pbox = (drm_clip_rect_t *)mmesa->pClipRects; + XF86DRIClipRectPtr pbox = mmesa->pClipRects; int nbox = mmesa->numClipRects; drmBufPtr buffer = mmesa->vertex_dma_buffer; - drm_mga_vertex_t vertex; int i; mmesa->vertex_dma_buffer = 0; @@ -429,110 +424,108 @@ if (mmesa->dirty_cliprects & mmesa->draw_buffer) mgaUpdateRects( mmesa, mmesa->draw_buffer ); - if (mmesa->dirty & ~MGA_UPLOAD_CLIPRECTS) + if (mmesa->dirty & ~MGA_UPLOAD_CLIPRECTS) mgaEmitHwStateLocked( mmesa ); /* FIXME: Workaround bug in kernel module. - */ - mmesa->sarea->dirty |= MGA_UPLOAD_CTX; - - /* FIXME: dstorg bug */ - if (0) - if (mmesa->lastX != mmesa->drawX || mmesa->lastY != mmesa->drawY) - fprintf(stderr, "****** last: %d,%d current: %d,%d\n", - mmesa->lastX, mmesa->lastY, - mmesa->drawX, mmesa->drawY); - - vertex.idx = buffer->idx; - vertex.used = buffer->used; - vertex.discard = 0; + mmesa->sarea->dirty |= MGA_UPLOAD_CONTEXT; if (!nbox) - vertex.used = 0; + buffer->used = 0; if (nbox >= MGA_NR_SAREA_CLIPRECTS) mmesa->dirty |= MGA_UPLOAD_CLIPRECTS; - if (!vertex.used || !(mmesa->dirty & MGA_UPLOAD_CLIPRECTS)) +#if 0 + if (!buffer->used || !(mmesa->dirty & MGA_UPLOAD_CLIPRECTS)) { - if (nbox == 1) + if (nbox == 1) mmesa->sarea->nbox = 0; else mmesa->sarea->nbox = nbox; - if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) + if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) fprintf(stderr, "Firing vertex -- case a nbox %d\n", nbox); - vertex.discard = 1; - ioctl(mmesa->driFd, DRM_IOCTL_MGA_VERTEX, &vertex); + drmMGAFlushVertexBuffer( mmesa->driFd, buffer->idx, buffer->used, 1 ); age_mmesa(mmesa, mmesa->sarea->last_enqueue); - } - else - { + } + else +#endif + { for (i = 0 ; i < nbox ; ) { int nr = MIN2(i + MGA_NR_SAREA_CLIPRECTS, nbox); - drm_clip_rect_t *b = mmesa->sarea->boxes; + XF86DRIClipRectPtr b = mmesa->sarea->boxes; + int discard = 0; if (mmesa->scissor) { - mmesa->sarea->nbox = 0; + mmesa->sarea->nbox = 0; - for ( ; i < nr ; i++) { + for ( ; i < nr ; i++) { *b = pbox[i]; if (intersect_rect(b, b, &mmesa->scissor_rect)) { mmesa->sarea->nbox++; b++; - } + } } /* Culled? */ if (!mmesa->sarea->nbox) { if (nr < nbox) continue; - vertex.used = 0; + buffer->used = 0; } } else { mmesa->sarea->nbox = nr - i; - for ( ; i < nr ; i++) + for ( ; i < nr ; i++) *b++ = pbox[i]; } /* Finished with the buffer? */ - if (nr == nbox) - vertex.discard = 1; + if (nr == nbox) + discard = 1; mmesa->sarea->dirty |= MGA_UPLOAD_CLIPRECTS; - ioctl(mmesa->driFd, DRM_IOCTL_MGA_VERTEX, &vertex); + drmMGAFlushVertexBuffer( mmesa->driFd, buffer->idx, + buffer->used, discard ); age_mmesa(mmesa, mmesa->sarea->last_enqueue); } } + /* Do we really need to do this ? */ +#ifdef __i386__ + if ( __break_vertex ) { + __asm__ __volatile__ ( "int $3" ); + } +#endif + mmesa->dirty &= ~MGA_UPLOAD_CLIPRECTS; } -void mgaFlushVertices( mgaContextPtr mmesa ) +void mgaFlushVertices( mgaContextPtr mmesa ) { LOCK_HARDWARE( mmesa ); mgaFlushVerticesLocked( mmesa ); UNLOCK_HARDWARE( mmesa ); } -void mgaFlushEltsLocked( mgaContextPtr mmesa ) +void mgaFlushEltsLocked( mgaContextPtr mmesa ) { if (mmesa->first_elt != mmesa->next_elt) { - mgaFireEltsLocked( mmesa, - ((char *)mmesa->first_elt - + mgaFireEltsLocked( mmesa, + ((char *)mmesa->first_elt - (char *)mmesa->elt_buf->address), - ((char *)mmesa->next_elt - + ((char *)mmesa->next_elt - (char *)mmesa->elt_buf->address), 0 ); mmesa->first_elt = mmesa->next_elt; } } -void mgaFlushElts( mgaContextPtr mmesa ) +void mgaFlushElts( mgaContextPtr mmesa ) { LOCK_HARDWARE( mmesa ); mgaFlushEltsLocked( mmesa ); @@ -548,12 +541,12 @@ if (!mmesa->vertex_dma_buffer) { LOCK_HARDWARE( mmesa ); - if (mmesa->first_elt != mmesa->next_elt) + if (mmesa->first_elt != mmesa->next_elt) mgaFlushEltsLocked(mmesa); mmesa->vertex_dma_buffer = mga_get_buffer_ioctl( mmesa ); UNLOCK_HARDWARE( mmesa ); - } else if (mmesa->vertex_dma_buffer->used + bytes > + } else if (mmesa->vertex_dma_buffer->used + bytes > mmesa->vertex_dma_buffer->total) { LOCK_HARDWARE( mmesa ); mgaFlushVerticesLocked( mmesa ); @@ -561,7 +554,7 @@ UNLOCK_HARDWARE( mmesa ); } - head = (GLuint *)((char *)mmesa->vertex_dma_buffer->address + + head = (GLuint *)((char *)mmesa->vertex_dma_buffer->address + mmesa->vertex_dma_buffer->used); mmesa->vertex_dma_buffer->used += bytes; @@ -569,7 +562,7 @@ } -void mgaFireILoadLocked( mgaContextPtr mmesa, +void mgaFireILoadLocked( mgaContextPtr mmesa, GLuint offset, GLuint length ) { if (!mmesa->iload_buffer) { @@ -580,10 +573,7 @@ if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) fprintf(stderr, "mgaFireILoad idx %d ofs 0x%x length %d\n", mmesa->iload_buffer->idx, (int)offset, (int)length ); - - /* HACK - */ - mgaUpdateLock( mmesa, DRM_LOCK_QUIESCENT | DRM_LOCK_FLUSH); + mga_iload_dma_ioctl( mmesa, offset, length ); } @@ -596,7 +586,19 @@ mmesa->iload_buffer = mga_get_buffer_ioctl( mmesa ); } +drmBufPtr mgaGetBufferLocked( mgaContextPtr mmesa ) +{ + return mga_get_buffer_ioctl( mmesa ); +} + +void mgaGetEltBufLocked( mgaContextPtr mmesa ) +{ + mmesa->elt_buf = mga_get_buffer_ioctl( mmesa ); +} + + + void mgaDDFlush( GLcontext *ctx ) { mgaContextPtr mmesa = MGA_CONTEXT( ctx ); @@ -609,106 +611,92 @@ */ if (1 || GET_DISPATCH_AGE( mmesa ) < mmesa->sarea->last_enqueue) { LOCK_HARDWARE( mmesa ); - if (0) fprintf(stderr, "mgaDDFlush %d %d\n", GET_DISPATCH_AGE( mmesa ), mmesa->sarea->last_enqueue); - mgaUpdateLock( mmesa, DRM_LOCK_FLUSH ); + UPDATE_LOCK( mmesa, DRM_LOCK_FLUSH ); UNLOCK_HARDWARE( mmesa ); } } -void mgaFireEltsLocked( mgaContextPtr mmesa, - GLuint start, +void mgaFireEltsLocked( mgaContextPtr mmesa, + GLuint start, GLuint end, GLuint discard ) { - drm_clip_rect_t *pbox = (drm_clip_rect_t *)mmesa->pClipRects; + XF86DRIClipRectPtr pbox = mmesa->pClipRects; int nbox = mmesa->numClipRects; drmBufPtr buffer = mmesa->elt_buf; - drm_mga_indices_t elts; int i; - - if (0) fprintf(stderr, "FireElts %d %d\n", start/4, end/4); - if (!buffer) return; if (mmesa->dirty_cliprects & mmesa->draw_buffer) mgaUpdateRects( mmesa, mmesa->draw_buffer ); - if (mmesa->dirty & ~MGA_UPLOAD_CLIPRECTS) + if (mmesa->dirty & ~MGA_UPLOAD_CLIPRECTS) mgaEmitHwStateLocked( mmesa ); /* FIXME: Workaround bug in kernel module. */ - mmesa->sarea->dirty |= MGA_UPLOAD_CTX; - - elts.idx = buffer->idx; - elts.start = start; - elts.end = end; - elts.discard = 0; + mmesa->sarea->dirty |= MGA_UPLOAD_CONTEXT; if (!nbox) - elts.end = start; + end = start; if (nbox >= MGA_NR_SAREA_CLIPRECTS) mmesa->dirty |= MGA_UPLOAD_CLIPRECTS; - if (elts.end == start || !(mmesa->dirty & MGA_UPLOAD_CLIPRECTS)) + if ( end == start || !(mmesa->dirty & MGA_UPLOAD_CLIPRECTS)) { - if (nbox == 1) + if (nbox == 1) mmesa->sarea->nbox = 0; else mmesa->sarea->nbox = nbox; - if (0) - fprintf(stderr, "Firing elts -- case a nbox %d\n", nbox); - elts.discard = discard; - ioctl(mmesa->driFd, DRM_IOCTL_MGA_INDICES, &elts); + drmMGAFlushIndices( mmesa->driFd, buffer->idx, start, end, discard ); age_mmesa(mmesa, mmesa->sarea->last_enqueue); - } - else - { + } + else + { for (i = 0 ; i < nbox ; ) { int nr = MIN2(i + MGA_NR_SAREA_CLIPRECTS, nbox); - drm_clip_rect_t *b = mmesa->sarea->boxes; + XF86DRIClipRectPtr b = mmesa->sarea->boxes; + int d = 0; if (mmesa->scissor) { - mmesa->sarea->nbox = 0; + mmesa->sarea->nbox = 0; - for ( ; i < nr ; i++) { + for ( ; i < nr ; i++) { *b = pbox[i]; if (intersect_rect(b, b, &mmesa->scissor_rect)) { mmesa->sarea->nbox++; b++; - } + } } /* Culled? */ if (!mmesa->sarea->nbox) { if (nr < nbox) continue; - elts.end = start; + end = start; } } else { mmesa->sarea->nbox = nr - i; - for ( ; i < nr ; i++) + for ( ; i < nr ; i++) *b++ = pbox[i]; } /* Potentially finished with the buffer? */ - if (nr == nbox) - elts.discard = discard; + if (nr == nbox) + d = discard; - if (0) - fprintf(stderr, "Firing elts -- case b nbox %d\n", nbox); mmesa->sarea->dirty |= MGA_UPLOAD_CLIPRECTS; - ioctl(mmesa->driFd, DRM_IOCTL_MGA_INDICES, &elts); + drmMGAFlushIndices( mmesa->driFd, buffer->idx, start, end, d ); age_mmesa(mmesa, mmesa->sarea->last_enqueue); } } @@ -716,27 +704,18 @@ mmesa->dirty &= ~MGA_UPLOAD_CLIPRECTS; } -void mgaGetEltBufLocked( mgaContextPtr mmesa ) -{ - mmesa->elt_buf = mga_get_buffer_ioctl( mmesa ); -} void mgaReleaseBufLocked( mgaContextPtr mmesa, drmBufPtr buffer ) { - drm_mga_vertex_t vertex; - if (!buffer) return; - - vertex.idx = buffer->idx; - vertex.used = 0; - vertex.discard = 1; - ioctl(mmesa->driFd, DRM_IOCTL_MGA_VERTEX, &vertex); + + drmMGAFlushVertexBuffer( mmesa->driFd, buffer->idx, 0, 1 ); } void mgaDDInitIoctlFuncs( GLcontext *ctx ) { - ctx->Driver.Clear = mgaClear; - ctx->Driver.Flush = mgaDDFlush; - ctx->Driver.Finish = mgaDDFinish; + ctx->Driver.Clear = mgaDDClear; + ctx->Driver.Flush = mgaDDFlush; + ctx->Driver.Finish = mgaDDFinish; } Index: xc/lib/GL/mesa/src/drv/mga/mgaioctl.h diff -u xc/lib/GL/mesa/src/drv/mga/mgaioctl.h:1.5 xc/lib/GL/mesa/src/drv/mga/mgaioctl.h:1.8 --- xc/lib/GL/mesa/src/drv/mga/mgaioctl.h:1.5 Sun Sep 24 09:51:07 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgaioctl.h Tue Apr 10 12:07:50 2001 @@ -1,4 +1,31 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaioctl.h,v 1.5 2000/09/24 13:51:07 alanh Exp $ */ +/* + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell + * Gareth Hughes + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaioctl.h,v 1.8 2001/04/10 16:07:50 dawes Exp $ */ #ifndef MGA_IOCTL_H #define MGA_IOCTL_H @@ -7,10 +34,10 @@ #include "mga_xmesa.h" GLbitfield mgaClear( GLcontext *ctx, GLbitfield mask, GLboolean all, - GLint cx, GLint cy, GLint cw, GLint ch ); + GLint cx, GLint cy, GLint cw, GLint ch ); -void mgaSwapBuffers( mgaContextPtr mmesa ); +void mgaSwapBuffers( mgaContextPtr mmesa ); @@ -18,21 +45,21 @@ void mgaGetILoadBufferLocked( mgaContextPtr mmesa ); +drmBufPtr mgaGetBufferLocked( mgaContextPtr mmesa ); -void mgaFireILoadLocked( mgaContextPtr mmesa, +void mgaFireILoadLocked( mgaContextPtr mmesa, GLuint offset, GLuint length ); void mgaWaitAgeLocked( mgaContextPtr mmesa, int age ); void mgaWaitAge( mgaContextPtr mmesa, int age ); -int mgaUpdateLock( mgaContextPtr mmesa, drmLockFlags flags ); -void mgaFlushVertices( mgaContextPtr mmesa ); +void mgaFlushVertices( mgaContextPtr mmesa ); void mgaFlushVerticesLocked( mgaContextPtr mmesa ); -void mgaFireEltsLocked( mgaContextPtr mmesa, - GLuint start, +void mgaFireEltsLocked( mgaContextPtr mmesa, + GLuint start, GLuint end, GLuint discard ); @@ -50,7 +77,7 @@ void mgaDDFinish( GLcontext *ctx ); void mgaDDInitIoctlFuncs( GLcontext *ctx ); - + #define FLUSH_BATCH(mmesa) do { \ if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) \ fprintf(stderr, "FLUSH_BATCH in %s\n", __FUNCTION__); \ @@ -69,12 +96,12 @@ if (!mmesa->vertex_dma_buffer) { LOCK_HARDWARE( mmesa ); - if (mmesa->first_elt != mmesa->next_elt) + if (mmesa->first_elt != mmesa->next_elt) mgaFlushEltsLocked(mmesa); mmesa->vertex_dma_buffer = mga_get_buffer_ioctl( mmesa ); UNLOCK_HARDWARE( mmesa ); - } else if (mmesa->vertex_dma_buffer->used + bytes > + } else if (mmesa->vertex_dma_buffer->used + bytes > mmesa->vertex_dma_buffer->total) { LOCK_HARDWARE( mmesa ); mgaFlushVerticesLocked( mmesa ); @@ -82,11 +109,24 @@ UNLOCK_HARDWARE( mmesa ); } - head = (GLuint *)((char *)mmesa->vertex_dma_buffer->address + + head = (GLuint *)((char *)mmesa->vertex_dma_buffer->address + mmesa->vertex_dma_buffer->used); mmesa->vertex_dma_buffer->used += bytes; return head; } + + +#define UPDATE_LOCK( mmesa, flags ) \ +do { \ + GLint ret = drmMGAFlushDMA( mmesa->driFd, flags ); \ + if ( ret < 0 ) { \ + drmMGAEngineReset( mmesa->driFd ); \ + UNLOCK_HARDWARE( mmesa ); \ + fprintf( stderr, __FUNCTION__ ": flush ret=%d\n", ret ); \ + /*fprintf( stderr, "drmMGAFlushDMA: return = %d\n", ret );*/ \ + exit( 1 ); \ + } \ +} while (0) #endif Index: xc/lib/GL/mesa/src/drv/mga/mgapipeline.c diff -u xc/lib/GL/mesa/src/drv/mga/mgapipeline.c:1.3 xc/lib/GL/mesa/src/drv/mga/mgapipeline.c:1.4 --- xc/lib/GL/mesa/src/drv/mga/mgapipeline.c:1.3 Tue Sep 26 11:56:47 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgapipeline.c Tue Apr 10 12:07:50 2001 @@ -1,4 +1,30 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgapipeline.c,v 1.3 2000/09/26 15:56:47 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgapipeline.c,v 1.4 2001/04/10 16:07:50 dawes Exp $ */ +/* + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell + */ #include #include "mgavb.h" @@ -13,7 +39,7 @@ (PIPE_OP_VERT_XFORM|PIPE_OP_RAST_SETUP_0| PIPE_OP_RAST_SETUP_1|PIPE_OP_RENDER), PIPE_PRECALC, - 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, mgaDDFastPath }; @@ -27,17 +53,17 @@ ENABLE_USERCLIP | \ ENABLE_LIGHT | \ ENABLE_FOG) - + /* The driver gets first shot at building the pipeline - make some * quick tests to see if we can use the fast path. */ GLboolean mgaDDBuildPrecalcPipeline( GLcontext *ctx ) -{ +{ struct gl_pipeline *pipe = &ctx->CVA.pre; mgaContextPtr mmesa = MGA_CONTEXT( ctx ); - - if (mmesa->renderindex == 0 && + + if (mmesa->renderindex == 0 && (ctx->Enabled & ILLEGAL_ENABLES) == 0 && (ctx->Array.Flags & (VERT_OBJ_234| VERT_TEX0_4| @@ -50,9 +76,9 @@ pipe->ops = pipe->stages[0]->ops; mmesa->using_fast_path = 1; return 1; - } + } - if (mmesa->using_fast_path) + if (mmesa->using_fast_path) { mmesa->using_fast_path = 0; ctx->CVA.VB->ClipOrMask = 0; @@ -60,7 +86,7 @@ ctx->Array.NewArrayState |= ctx->Array.Summary; return 0; } - + return 0; } @@ -68,7 +94,7 @@ /* Still do the normal fixup and copy-to-current, so this isn't so - * bad. + * bad. */ #define ILLEGAL_INPUTS_IMM (VERT_OBJ_4| \ VERT_TEX0_4| \ @@ -134,5 +160,3 @@ return o; } - - Index: xc/lib/GL/mesa/src/drv/mga/mgapipeline.h diff -u xc/lib/GL/mesa/src/drv/mga/mgapipeline.h:1.2 xc/lib/GL/mesa/src/drv/mga/mgapipeline.h:1.3 --- xc/lib/GL/mesa/src/drv/mga/mgapipeline.h:1.2 Fri Jun 16 20:03:01 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgapipeline.h Tue Apr 10 12:07:50 2001 @@ -1,3 +1,31 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgapipeline.h,v 1.3 2001/04/10 16:07:50 dawes Exp $ */ +/* + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell + */ + #ifndef _MGA_PIPELINE_H #define _MGA_PIPELINE_H Index: xc/lib/GL/mesa/src/drv/mga/mgapixel.c diff -u /dev/null xc/lib/GL/mesa/src/drv/mga/mgapixel.c:1.3 --- /dev/null Mon Jun 4 12:37:32 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgapixel.c Tue Apr 10 12:07:51 2001 @@ -0,0 +1,644 @@ +/* + * Copyright 2000 Compaq Computer Inc. and VA Linux Systems, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell + * Gareth Hughes + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgapixel.c,v 1.3 2001/04/10 16:07:51 dawes Exp $ */ + +#include "enums.h" +#include "types.h" +#include "texutil.h" +#include "mgadd.h" +#include "mgacontext.h" +#include "mgaioctl.h" +#include "mgapixel.h" +#include "mgabuffers.h" + +#include "drm.h" + +#define IS_AGP_MEM( mmesa, p ) \ + ((GLuint)mmesa->mgaScreen->buffers.map <= ((GLuint)p) && \ + (GLuint)mmesa->mgaScreen->buffers.map + \ + (GLuint)mmesa->mgaScreen->buffers.size > ((GLuint)p)) + +#define AGP_OFFSET( mmesa, p ) \ + (((GLuint)p) - (GLuint)mmesa->mgaScreen->buffers.map ) + + +#if defined(MESA_packed_depth_stencil) +static GLboolean +check_depth_stencil_24_8( const GLcontext *ctx, GLenum type, + const struct gl_pixelstore_attrib *packing, + const void *pixels, GLint sz, + GLint pitch ) +{ + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + + return ( type == GL_UNSIGNED_INT_24_8_MESA && + ctx->Visual->DepthBits == 24 && + ctx->Visual->StencilBits == 8 && + mmesa->mgaScreen->cpp == 4 && + mmesa->hw_stencil && + !ctx->Pixel.IndexShift && + !ctx->Pixel.IndexOffset && + !ctx->Pixel.MapStencilFlag && + ctx->Pixel.DepthBias == 0.0 && + ctx->Pixel.DepthScale == 1.0 && + !packing->SwapBytes && + pitch % 32 == 0 && + pitch < 4096 ); +} +#endif + + +static GLboolean +check_depth( const GLcontext *ctx, GLenum type, + const struct gl_pixelstore_attrib *packing, + const void *pixels, GLint sz, GLint pitch ) +{ + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + + if ( IS_AGP_MEM( mmesa, pixels ) && + !( ( type == GL_UNSIGNED_INT && mmesa->mgaScreen->cpp == 4 ) || + ( type == GL_UNSIGNED_SHORT && mmesa->mgaScreen->cpp == 2 ) ) ) + return GL_FALSE; + + return ( ctx->Pixel.DepthBias == 0.0 && + ctx->Pixel.DepthScale == 1.0 && + !packing->SwapBytes && + pitch % 32 == 0 && + pitch < 4096 ); +} + + +static GLboolean +check_color( const GLcontext *ctx, GLenum type, GLenum format, + const struct gl_pixelstore_attrib *packing, + const void *pixels, GLint sz, GLint pitch ) +{ + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + GLuint cpp = mmesa->mgaScreen->cpp; + + /* Can't do conversions on agp reads/draws. + */ + if ( IS_AGP_MEM( mmesa, pixels ) && + !( pitch % 32 == 0 && pitch < 4096 && + ( ( type == GL_UNSIGNED_BYTE && + cpp == 4 && format == GL_BGRA ) || + ( type == GL_UNSIGNED_INT_8_8_8_8 && + cpp == 4 && format == GL_BGRA ) || + ( type == GL_UNSIGNED_SHORT_5_6_5_REV && + cpp == 2 && format == GL_RGB ) ) ) ) + return GL_FALSE; + + return ( ctx->ColorMatrix.type == MATRIX_IDENTITY && + !ctx->Pixel.ScaleOrBiasRGBA && + !ctx->Pixel.ScaleOrBiasRGBApcm && + !ctx->Pixel.MapColorFlag && + !ctx->Pixel.ColorTableEnabled && + !ctx->Pixel.PostColorMatrixColorTableEnabled && + !ctx->Pixel.MinMaxEnabled && + !ctx->Pixel.HistogramEnabled && + !packing->SwapBytes && + !packing->LsbFirst ); +} + +static GLboolean +check_color_per_fragment_ops( const GLcontext *ctx ) +{ + return ( !(ctx->RasterMask & ~(SCISSOR_BIT|WINCLIP_BIT|MULTI_DRAW_BIT)) && + ctx->Current.RasterPosValid && + ctx->Pixel.ZoomX == 1.0F && + ( ctx->Pixel.ZoomY == 1.0F || ctx->Pixel.ZoomY == -1.0F ) ); +} + +static GLboolean +check_depth_per_fragment_ops( const GLcontext *ctx ) +{ + return ( ctx->Current.RasterPosValid && + ctx->Color.ColorMask[RCOMP] == 0 && + ctx->Color.ColorMask[BCOMP] == 0 && + ctx->Color.ColorMask[GCOMP] == 0 && + ctx->Color.ColorMask[ACOMP] == 0 && + ctx->Pixel.ZoomX == 1.0F && + ( ctx->Pixel.ZoomY == 1.0F || ctx->Pixel.ZoomY == -1.0F ) ); +} + +/* In addition to the requirements for depth: + */ +#if defined(MESA_packed_depth_stencil) +static GLboolean +check_stencil_per_fragment_ops( const GLcontext *ctx ) +{ + return ( !ctx->Pixel.IndexShift && + !ctx->Pixel.IndexOffset ); +} +#endif + + +static GLboolean +clip_pixelrect( const GLcontext *ctx, + const GLframebuffer *buffer, + GLint *x, GLint *y, + GLsizei *width, GLsizei *height, + GLint *skipPixels, GLint *skipRows, + GLint *size ) +{ + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + + *width = MIN2(*width, MAX_WIDTH); /* redundant? */ + + /* left clipping */ + if (*x < buffer->Xmin) { + *skipPixels += (buffer->Xmin - *x); + *width -= (buffer->Xmin - *x); + *x = buffer->Xmin; + } + + /* right clipping */ + if (*x + *width > buffer->Xmax) + *width -= (*x + *width - buffer->Xmax - 1); + + if (*width <= 0) + return GL_FALSE; + + /* bottom clipping */ + if (*y < buffer->Ymin) { + *skipRows += (buffer->Ymin - *y); + *height -= (buffer->Ymin - *y); + *y = buffer->Ymin; + } + + /* top clipping */ + if (*y + *height > buffer->Ymax) + *height -= (*y + *height - buffer->Ymax - 1); + + if (*height <= 0) + return GL_FALSE; + + *size = ((*y + *height - 1) * mmesa->mgaScreen->frontPitch + + (*x + *width - 1) * mmesa->mgaScreen->cpp); + + return GL_TRUE; +} + +static GLboolean +mgaDDReadPixels( GLcontext *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *pack, + GLvoid *pixels ) +{ + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + drm_mga_blit_t blit; + GLint size, skipPixels, skipRows; + GLint pitch = pack->RowLength ? pack->RowLength : width; + GLboolean ok; + + GLuint planemask; + GLuint source, dest; + GLint source_pitch, dest_pitch; + GLint delta_sx, delta_sy; + GLint delta_dx, delta_dy; + GLint blit_height, ydir; + + + if (!clip_pixelrect(ctx, ctx->ReadBuffer, + &x, &y, &width, &height, + &skipPixels, &skipRows, &size)) { + return GL_TRUE; + } + + /* Only accelerate reading to agp buffers. + */ + if ( !IS_AGP_MEM(mmesa, (char *)pixels) || + !IS_AGP_MEM(mmesa, (char *)pixels + size) ) + return GL_FALSE; + + switch (format) { +#if defined(MESA_packed_depth_stencil) + case GL_DEPTH_STENCIL_MESA: + ok = check_depth_stencil_24_8(ctx, type, pack, pixels, size, pitch); + planemask = ~0; + source = mmesa->mgaScreen->depthOffset; + break; +#endif + + case GL_DEPTH_COMPONENT: + ok = check_depth(ctx, type, pack, pixels, size, pitch); + + /* Can't accelerate at this depth -- planemask does the wrong + * thing; it doesn't clear the low order bits in the + * destination, instead it leaves them untouched. + * + * Could get the acclerator to solid fill the destination with + * zeros first... Or get the cpu to do it... + */ + if (ctx->Visual->DepthBits == 24) + return GL_FALSE; + + planemask = ~0; + source = mmesa->mgaScreen->depthOffset; + break; + + case GL_RGB: + case GL_BGRA: + ok = check_color(ctx, type, format, pack, pixels, size, pitch); + planemask = ~0; + source = (mmesa->draw_buffer == MGA_FRONT ? + mmesa->mgaScreen->frontOffset : + mmesa->mgaScreen->backOffset); + break; + + default: + return GL_FALSE; + } + + if (!ok) { + return GL_FALSE; + } + + + LOCK_HARDWARE( mmesa ); + + { + __DRIdrawablePrivate *dPriv = mmesa->driDrawable; + int nbox, retcode, i; + + UPDATE_LOCK( mmesa, DRM_LOCK_FLUSH | DRM_LOCK_QUIESCENT ); + + if (mmesa->dirty_cliprects & MGA_FRONT) + mgaUpdateRects( mmesa, MGA_FRONT ); + + nbox = dPriv->numClipRects; + + y = dPriv->h - y - height; + x += mmesa->drawX; + y += mmesa->drawY; + + dest = ((mmesa->mgaScreen->agp.handle + AGP_OFFSET(mmesa, pixels)) | + DO_dstmap_sys | DO_dstacc_agp); + source_pitch = mmesa->mgaScreen->frontPitch / mmesa->mgaScreen->cpp; + dest_pitch = pitch; + delta_sx = 0; + delta_sy = 0; + delta_dx = -x; + delta_dy = -y; + blit_height = 2*y + height; + ydir = -1; + + if (0) fprintf(stderr, "XX doing readpixel blit src_pitch %d dst_pitch %d\n", + source_pitch, dest_pitch); + + + + for (i = 0 ; i < nbox ; ) + { + int nr = MIN2(i + MGA_NR_SAREA_CLIPRECTS, dPriv->numClipRects); + XF86DRIClipRectRec *box = dPriv->pClipRects; + drm_clip_rect_t *b = mmesa->sarea->boxes; + int n = 0; + + for ( ; i < nr ; i++) { + GLint bx = box[i].x1; + GLint by = box[i].y1; + GLint bw = box[i].x2 - bx; + GLint bh = box[i].y2 - by; + + if (bx < x) bw -= x - bx, bx = x; + if (by < y) bh -= y - by, by = y; + if (bx + bw > x + width) bw = x + width - bx; + if (by + bh > y + height) bh = y + height - by; + if (bw <= 0) continue; + if (bh <= 0) continue; + + b->x1 = bx; + b->y1 = by; + b->x2 = bx + bw; + b->y2 = by + bh; + b++; + n++; + } + + mmesa->sarea->nbox = n; + + if (n && (retcode = ioctl(mmesa->driFd, DRM_IOCTL_MGA_BLIT, &blit))) { + fprintf(stderr, "blit ioctl failed, retcode = %d\n", retcode); + UNLOCK_HARDWARE( mmesa ); + exit(1); + } + } + + UPDATE_LOCK( mmesa, DRM_LOCK_FLUSH | DRM_LOCK_QUIESCENT ); + } + + UNLOCK_HARDWARE( mmesa ); + + return GL_TRUE; +} + + + +static void do_draw_pix( GLcontext *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLint pitch, + const void *pixels, + GLuint dest, GLuint planemask) +{ + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + drm_mga_blit_t blit; + __DRIdrawablePrivate *dPriv = mmesa->driDrawable; + XF86DRIClipRectPtr pbox = dPriv->pClipRects; + int nbox = dPriv->numClipRects; + int retcode, i; + + y = dPriv->h - y - height; + x += mmesa->drawX; + y += mmesa->drawY; + + blit.dest = dest; + blit.planemask = planemask; + blit.source = ((mmesa->mgaScreen->agp.handle + AGP_OFFSET(mmesa, pixels)) + | SO_srcmap_sys | SO_srcacc_agp); + blit.dest_pitch = mmesa->mgaScreen->frontPitch / mmesa->mgaScreen->cpp; + blit.source_pitch = pitch; + blit.delta_sx = -x; + blit.delta_sy = -y; + blit.delta_dx = 0; + blit.delta_dy = 0; + if (ctx->Pixel.ZoomY == -1) { + blit.height = height; + blit.ydir = 1; + } else { + blit.height = height; + blit.ydir = -1; + } + + if (0) fprintf(stderr, + "doing drawpixel blit src_pitch %d dst_pitch %d\n", + blit.source_pitch, blit.dest_pitch); + + for (i = 0 ; i < nbox ; ) + { + int nr = MIN2(i + MGA_NR_SAREA_CLIPRECTS, dPriv->numClipRects); + XF86DRIClipRectRec *box = mmesa->pClipRects; + drm_clip_rect_t *b = mmesa->sarea->boxes; + int n = 0; + + for ( ; i < nr ; i++) { + GLint bx = box[i].x1; + GLint by = box[i].y1; + GLint bw = box[i].x2 - bx; + GLint bh = box[i].y2 - by; + + if (bx < x) bw -= x - bx, bx = x; + if (by < y) bh -= y - by, by = y; + if (bx + bw > x + width) bw = x + width - bx; + if (by + bh > y + height) bh = y + height - by; + if (bw <= 0) continue; + if (bh <= 0) continue; + + b->x1 = bx; + b->y1 = by; + b->x2 = bx + bw; + b->y2 = by + bh; + b++; + n++; + } + + mmesa->sarea->nbox = n; + + if (n && (retcode = ioctl(mmesa->driFd, DRM_IOCTL_MGA_BLIT, &blit))) { + fprintf(stderr, "blit ioctl failed, retcode = %d\n", retcode); + UNLOCK_HARDWARE( mmesa ); + exit(1); + } + } +} + + + + +static GLboolean +mgaDDDrawPixels( GLcontext *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + const GLvoid *pixels ) +{ + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + GLint size, skipPixels, skipRows; + GLint pitch = unpack->RowLength ? unpack->RowLength : width; + GLuint dest, planemask; + GLuint cpp = mmesa->mgaScreen->cpp; + + if (!clip_pixelrect(ctx, ctx->DrawBuffer, + &x, &y, &width, &height, + &skipPixels, &skipRows, &size)) { + return GL_TRUE; + } + + + switch (format) { +#if defined(MESA_packed_depth_stencil) + case GL_DEPTH_STENCIL_MESA: + dest = mmesa->mgaScreen->depthOffset; + planemask = ~0; + if (!check_depth_stencil_24_8(ctx, type, unpack, pixels, size, pitch) || + !check_depth_per_fragment_ops(ctx) || + !check_stencil_per_fragment_ops(ctx)) + return GL_FALSE; + break; +#endif + + case GL_DEPTH_COMPONENT: + dest = mmesa->mgaScreen->depthOffset; + + if (ctx->Visual->DepthBits == 24) + planemask = ~0xff; + else + planemask = ~0; + + if (!check_depth(ctx, type, unpack, pixels, size, pitch) || + !check_depth_per_fragment_ops(ctx)) + return GL_FALSE; + break; + + case GL_RGB: + case GL_BGRA: + dest = (mmesa->draw_buffer == MGA_FRONT ? + mmesa->mgaScreen->frontOffset : + mmesa->mgaScreen->backOffset); + + planemask = mgaPackColor(cpp, + ctx->Color.ColorMask[RCOMP], + ctx->Color.ColorMask[GCOMP], + ctx->Color.ColorMask[BCOMP], + ctx->Color.ColorMask[ACOMP]); + + if (cpp == 2) + planemask |= planemask << 16; + + if (!check_color(ctx, type, format, unpack, pixels, size, pitch)) { + return GL_FALSE; + } + if (!check_color_per_fragment_ops(ctx)) { + return GL_FALSE; + } + break; + + default: + return GL_FALSE; + } + + LOCK_HARDWARE_QUIESCENT( mmesa ); + + if (mmesa->dirty_cliprects & MGA_FRONT) + mgaUpdateRects( mmesa, MGA_FRONT ); + + if ( IS_AGP_MEM(mmesa, (char *)pixels) && + IS_AGP_MEM(mmesa, (char *)pixels + size) ) + { + do_draw_pix( ctx, x, y, width, height, pitch, pixels, + dest, planemask ); + UPDATE_LOCK( mmesa, DRM_LOCK_FLUSH | DRM_LOCK_QUIESCENT ); + } + else + { + /* Pixels is in regular memory -- get dma buffers and perform + * upload through them. + */ +/* drmBufPtr buf = mgaGetBufferLocked(mmesa); */ + GLuint bufferpitch = (width*cpp+31)&~31; + char *address = mmesa->mgaScreen->agp.map; + + do { +/* GLuint rows = MIN2( height, MGA_DMA_BUF_SZ / bufferpitch ); */ + GLuint rows = height; + + + if (0) fprintf(stderr, "trying to upload %d rows (pitch %d)\n", + rows, bufferpitch); + + /* The texture conversion code is so slow that there is only + * negligble speedup when the buffers/images don't exactly + * match: + */ +#if 0 + if (cpp == 2) { + if (!_mesa_convert_teximage( MESA_FORMAT_RGB565, + width, rows, + address, bufferpitch, + width, rows, + format, type, + pixels, unpack )) { +/* mgaReleaseBufLocked( mmesa, buf ); */ + UNLOCK_HARDWARE(mmesa); + return GL_FALSE; + } + } else { + if (!_mesa_convert_teximage( MESA_FORMAT_ARGB8888, + width, rows, + address, bufferpitch, + width, rows, + format, type, + pixels, unpack )) { +/* mgaReleaseBufLocked( mmesa, buf ); */ + UNLOCK_HARDWARE(mmesa); + return GL_FALSE; + } + } +#else + MEMCPY( address, pixels, rows*bufferpitch ); +#endif + + do_draw_pix( ctx, x, y, width, rows, + bufferpitch/cpp, address, dest, planemask ); + + /* Fix me -- use multiple buffers to avoid flush. + */ + UPDATE_LOCK( mmesa, DRM_LOCK_FLUSH | DRM_LOCK_QUIESCENT ); + + pixels = (void *)((char *) pixels + rows * pitch); + height -= rows; + y += rows; + } while (height); + +/* mgaReleaseBufLocked( mmesa, buf ); */ + } + + UNLOCK_HARDWARE( mmesa ); + mmesa->dirty |= MGA_UPLOAD_CLIPRECTS; + + return GL_TRUE; +} + + + + +/* Stub functions - not a real allocator, always returns pointer to + * the same block of agp space which isn't used for anything else at + * present. + */ +#if defined(MESA_hacked_agp_allocator) +static void mgaDDFreeAgpMemory( GLcontext *ctx, void *ptr ) +{ + (void) ptr; +} + +static void *mgaDDAllocateAgpMemory( GLcontext *ctx, GLsizei size ) +{ + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + + if (size < mmesa->mgaScreen->textureSize[MGA_AGP_HEAP]) + return mmesa->mgaScreen->texVirtual[MGA_AGP_HEAP]; + else + return 0; +} + +static GLint mgaDDGetAgpOffset( GLcontext *ctx, const void *ptr ) +{ + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + + if (!IS_AGP_MEM(mmesa, ptr)) + return -1; + + return AGP_OFFSET(mmesa, ptr); +} +#endif + + +void mgaDDInitPixelFuncs( GLcontext *ctx ) +{ +#if defined (MESA_experimetal_agp_allocator) + ctx->Driver.AllocateAgpMemory = mgaDDAllocateAgpMemory; + ctx->Driver.GetAgpOffset = mgaDDGetAgpOffset; + ctx->Driver.FreeAgpMemory = mgaDDFreeAgpMemory; +#endif + if (getenv("MGA_BLIT_PIXELS")) { + ctx->Driver.ReadPixels = mgaDDReadPixels; /* requires agp dest */ + ctx->Driver.DrawPixels = mgaDDDrawPixels; /* works with agp/normal mem */ + } +} Index: xc/lib/GL/mesa/src/drv/mga/mgapixel.h diff -u /dev/null xc/lib/GL/mesa/src/drv/mga/mgapixel.h:1.3 --- /dev/null Mon Jun 4 12:37:32 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgapixel.h Tue Apr 10 12:07:51 2001 @@ -0,0 +1,36 @@ +/* + * Copyright 2000-2001 Compaq Computer Inc. VA Linux Systems, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgapixel.h,v 1.3 2001/04/10 16:07:51 dawes Exp $ */ + +#ifndef MGA_PIXELS_H +#define MGA_PIXELS_H + +#include "types.h" + +extern void mgaDDInitPixelFuncs( GLcontext *ctx ); + +#endif Index: xc/lib/GL/mesa/src/drv/mga/mgaregs.h diff -u xc/lib/GL/mesa/src/drv/mga/mgaregs.h:1.1 xc/lib/GL/mesa/src/drv/mga/mgaregs.h:1.2 --- xc/lib/GL/mesa/src/drv/mga/mgaregs.h:1.1 Fri Feb 11 12:25:38 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgaregs.h Sun Jan 7 20:07:18 2001 @@ -1048,6 +1048,8 @@ #define TMC_tformat_tw16 0x3 /* val 3, shift 0 */ #define TMC_tformat_tw12 0x4 /* val 4, shift 0 */ #define TMC_tformat_tw32 0x6 /* val 6, shift 0 */ + #define TMC_tformat_tw8a 0x7 /* val 7, shift 0 */ + #define TMC_tformat_tw8al 0x8 /* val 8, shift 0 */ #define TMC_tformat_tw422 0xa /* val 10, shift 0 */ #define TMC_tpitchlin_MASK 0xfffffeff /* bit 8 */ #define TMC_tpitchlin_disable 0x0 @@ -1162,6 +1164,7 @@ #define TO_texorgacc_MASK 0xfffffffd /* bit 1 */ #define TO_texorgacc_pci 0x0 #define TO_texorgacc_agp 0x2 + #define TO_texorgoffsetsel 0x4 #define TO_texorg_MASK 0x1f /* bits 5-31 */ #define TO_texorg_SHIFT 5 Index: xc/lib/GL/mesa/src/drv/mga/mgaspan.c diff -u xc/lib/GL/mesa/src/drv/mga/mgaspan.c:1.5 xc/lib/GL/mesa/src/drv/mga/mgaspan.c:1.8 --- xc/lib/GL/mesa/src/drv/mga/mgaspan.c:1.5 Sun Sep 24 09:51:07 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgaspan.c Tue Apr 10 12:07:51 2001 @@ -1,4 +1,30 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaspan.c,v 1.5 2000/09/24 13:51:07 alanh Exp $ */ +/* + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaspan.c,v 1.8 2001/04/10 16:07:51 dawes Exp $ */ #include "types.h" #include "mgadd.h" @@ -9,59 +35,59 @@ #define DBG 0 -#define LOCAL_VARS \ - __DRIdrawablePrivate *dPriv = mmesa->driDrawable; \ - mgaScreenPrivate *mgaScreen = mmesa->mgaScreen; \ - __DRIscreenPrivate *sPriv = mmesa->driScreen; \ - GLuint pitch = mgaScreen->frontPitch; \ - GLuint height = dPriv->h; \ - char *read_buf = (char *)(sPriv->pFB + \ - mmesa->readOffset + \ - dPriv->x * mgaScreen->cpp + \ - dPriv->y * pitch); \ - char *buf = (char *)(sPriv->pFB + \ - mmesa->drawOffset + \ - dPriv->x * mgaScreen->cpp + \ - dPriv->y * pitch); \ - GLushort p = MGA_CONTEXT( ctx )->MonoColor; \ +#define LOCAL_VARS \ + __DRIdrawablePrivate *dPriv = mmesa->driDrawable; \ + mgaScreenPrivate *mgaScreen = mmesa->mgaScreen; \ + __DRIscreenPrivate *sPriv = mmesa->driScreen; \ + GLuint pitch = mgaScreen->frontPitch; \ + GLuint height = dPriv->h; \ + char *read_buf = (char *)(sPriv->pFB + \ + mmesa->readOffset + \ + dPriv->x * mgaScreen->cpp + \ + dPriv->y * pitch); \ + char *buf = (char *)(sPriv->pFB + \ + mmesa->drawOffset + \ + dPriv->x * mgaScreen->cpp + \ + dPriv->y * pitch); \ + GLuint p = MGA_CONTEXT( ctx )->MonoColor; \ (void) read_buf; (void) buf; (void) p - -#define LOCAL_DEPTH_VARS \ - __DRIdrawablePrivate *dPriv = mmesa->driDrawable; \ - mgaScreenPrivate *mgaScreen = mmesa->mgaScreen; \ - __DRIscreenPrivate *sPriv = mmesa->driScreen; \ - GLuint pitch = mgaScreen->frontPitch; \ - GLuint height = dPriv->h; \ - char *buf = (char *)(sPriv->pFB + \ - mgaScreen->depthOffset + \ - dPriv->x * 2 + \ +#define LOCAL_DEPTH_VARS \ + __DRIdrawablePrivate *dPriv = mmesa->driDrawable; \ + mgaScreenPrivate *mgaScreen = mmesa->mgaScreen; \ + __DRIscreenPrivate *sPriv = mmesa->driScreen; \ + GLuint pitch = mgaScreen->frontPitch; \ + GLuint height = dPriv->h; \ + char *buf = (char *)(sPriv->pFB + \ + mgaScreen->depthOffset + \ + dPriv->x * mgaScreen->cpp + \ dPriv->y * pitch) -#define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS +#define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS -#define INIT_MONO_PIXEL(p) +#define INIT_MONO_PIXEL(p) #define CLIPPIXEL(_x,_y) (_x >= minx && _x < maxx && \ _y >= miny && _y < maxy) - - -#define CLIPSPAN(_x,_y,_n,_x1,_n1,_i) \ - if (_y < miny || _y >= maxy) _n1 = 0, _x1 = x; \ - else { \ - _n1 = _n; \ - _x1 = _x; \ - if (_x1 < minx) _i += (minx - _x1), _x1 = minx; \ - if (_x1 + _n1 >= maxx) n1 -= (_x1 + n1 - maxx) + 1; \ - } +#define CLIPSPAN( _x, _y, _n, _x1, _n1, _i ) \ + if ( _y < miny || _y >= maxy ) { \ + _n1 = 0, _x1 = x; \ + } else { \ + _n1 = _n; \ + _x1 = _x; \ + if ( _x1 < minx ) _i += (minx-_x1), n1 -= (minx-_x1), _x1 = minx; \ + if ( _x1 + _n1 >= maxx ) n1 -= (_x1 + n1 - maxx); \ + } #define HW_LOCK() \ mgaContextPtr mmesa = MGA_CONTEXT(ctx); \ + FLUSH_BATCH(mmesa); \ LOCK_HARDWARE_QUIESCENT(mmesa); + #define HW_CLIPLOOP() \ do { \ int _nc = mmesa->numClipRects; \ @@ -98,9 +124,9 @@ #define READ_RGBA( rgba, _x, _y ) \ do { \ GLushort p = *(GLushort *)(read_buf + _x*2 + _y*pitch); \ - rgba[0] = (p >> 8) & 0xf8; \ - rgba[1] = (p >> 3) & 0xfc; \ - rgba[2] = (p << 3) & 0xf8; \ + rgba[0] = (((p >> 11) & 0x1f) * 255) / 31; \ + rgba[1] = (((p >> 5) & 0x3f) * 255) / 63; \ + rgba[2] = (((p >> 0) & 0x1f) * 255) / 31; \ rgba[3] = 255; \ } while(0) @@ -128,7 +154,7 @@ rgba[0] = (p >> 16) & 0xff; \ rgba[1] = (p >> 8) & 0xff; \ rgba[2] = (p >> 0) & 0xff; \ - rgba[3] = (p >> 24) & 0xff; \ + rgba[3] = 0xff; \ } while (0) #define TAG(x) mga##x##_8888 @@ -143,7 +169,7 @@ *(GLushort *)(buf + _x*2 + _y*pitch) = d; #define READ_DEPTH( d, _x, _y ) \ - d = *(GLushort *)(buf + _x*2 + _y*pitch); + d = *(GLushort *)(buf + _x*2 + _y*pitch); #define TAG(x) mga##x##_16 #include "depthtmp.h" @@ -157,7 +183,7 @@ *(GLuint *)(buf + _x*4 + _y*pitch) = d; #define READ_DEPTH( d, _x, _y ) \ - d = *(GLuint *)(buf + _x*4 + _y*pitch); + d = *(GLuint *)(buf + _x*4 + _y*pitch); #define TAG(x) mga##x##_32 #include "depthtmp.h" @@ -169,13 +195,13 @@ #define WRITE_DEPTH( _x, _y, d ) { \ GLuint tmp = *(GLuint *)(buf + _x*4 + _y*pitch); \ tmp &= 0xff; \ - tmp |= (d) & 0xffffff00; \ + tmp |= (d) << 8; \ *(GLuint *)(buf + _x*4 + _y*pitch) = tmp; \ } -#define READ_DEPTH( d, _x, _y ) \ - d = *(GLuint *)(buf + _x*4 + _y*pitch) >> 8; - +#define READ_DEPTH( d, _x, _y ) { \ + d = (*(GLuint *)(buf + _x*4 + _y*pitch) & ~0xff) >> 8; \ +} #define TAG(x) mga##x##_24_8 #include "depthtmp.h" @@ -188,7 +214,7 @@ } #define READ_STENCIL( d, _x, _y ) \ - d = *(GLuint *)(buf + _x*4 + _y*pitch) & 0xff; + d = *(GLuint *)(buf + _x*4 + _y*pitch) & 0xff; #define TAG(x) mga##x##_24_8 #include "stenciltmp.h" @@ -224,8 +250,8 @@ ctx->Driver.WriteMonoRGBAPixels = mgaWriteMonoRGBAPixels_8888; ctx->Driver.ReadRGBASpan = mgaReadRGBASpan_8888; ctx->Driver.ReadRGBAPixels = mgaReadRGBAPixels_8888; - - if (mmesa->hw_stencil) { + + if (!mmesa->hw_stencil) { ctx->Driver.ReadDepthSpan = mgaReadDepthSpan_32; ctx->Driver.WriteDepthSpan = mgaWriteDepthSpan_32; ctx->Driver.ReadDepthPixels = mgaReadDepthPixels_32; @@ -243,13 +269,4 @@ } break; } - - - ctx->Driver.WriteCI8Span = 0; - ctx->Driver.WriteCI32Span = 0; - ctx->Driver.WriteMonoCISpan = 0; - ctx->Driver.WriteCI32Pixels = 0; - ctx->Driver.WriteMonoCIPixels = 0; - ctx->Driver.ReadCI32Span = 0; - ctx->Driver.ReadCI32Pixels = 0; } Index: xc/lib/GL/mesa/src/drv/mga/mgaspan.h diff -u xc/lib/GL/mesa/src/drv/mga/mgaspan.h:1.1 xc/lib/GL/mesa/src/drv/mga/mgaspan.h:1.2 --- xc/lib/GL/mesa/src/drv/mga/mgaspan.h:1.1 Fri Feb 11 12:25:39 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgaspan.h Tue Apr 10 12:07:51 2001 @@ -1,3 +1,31 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaspan.h,v 1.2 2001/04/10 16:07:51 dawes Exp $ */ +/* + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell + */ + #ifndef _MGA_SPAN_H #define _MGA_SPAN_H Index: xc/lib/GL/mesa/src/drv/mga/mgastate.c diff -u xc/lib/GL/mesa/src/drv/mga/mgastate.c:1.6 xc/lib/GL/mesa/src/drv/mga/mgastate.c:1.10.2.1 --- xc/lib/GL/mesa/src/drv/mga/mgastate.c:1.6 Wed Nov 8 00:02:46 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgastate.c Thu May 31 04:31:23 2001 @@ -1,4 +1,30 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgastate.c,v 1.6 2000/11/08 05:02:46 dawes Exp $ */ +/* + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgastate.c,v 1.10.2.1 2001/05/31 08:31:23 alanh Exp $ */ #include @@ -20,13 +46,13 @@ */ #if defined(ACCEL_ROP) static GLuint mgarop_NoBLK[16] = { - DC_atype_rpl | 0x00000000, DC_atype_rstr | 0x00080000, + DC_atype_rpl | 0x00000000, DC_atype_rstr | 0x00080000, DC_atype_rstr | 0x00040000, DC_atype_rpl | 0x000c0000, - DC_atype_rstr | 0x00020000, DC_atype_rstr | 0x000a0000, + DC_atype_rstr | 0x00020000, DC_atype_rstr | 0x000a0000, DC_atype_rstr | 0x00060000, DC_atype_rstr | 0x000e0000, - DC_atype_rstr | 0x00010000, DC_atype_rstr | 0x00090000, + DC_atype_rstr | 0x00010000, DC_atype_rstr | 0x00090000, DC_atype_rstr | 0x00050000, DC_atype_rstr | 0x000d0000, - DC_atype_rpl | 0x00030000, DC_atype_rstr | 0x000b0000, + DC_atype_rpl | 0x00030000, DC_atype_rstr | 0x000b0000, DC_atype_rstr | 0x00070000, DC_atype_rpl | 0x000f0000 }; #endif @@ -39,10 +65,10 @@ if (ctx->Stencil.Enabled) { - stencil = ctx->Stencil.Ref | + stencil = ctx->Stencil.Ref | ( ctx->Stencil.ValueMask << 8 ) | ( ctx->Stencil.WriteMask << 16 ); - + switch (ctx->Stencil.Function) { case GL_NEVER: @@ -71,9 +97,9 @@ default: break; } - + switch (ctx->Stencil.FailFunc) - { + { case GL_KEEP: MGA_SET_FIELD(stencilctl, SC_sfailop_MASK, SC_sfailop_keep); break; @@ -95,9 +121,9 @@ default: break; } - + switch (ctx->Stencil.ZFailFunc) - { + { case GL_KEEP: MGA_SET_FIELD(stencilctl, SC_szfailop_MASK, SC_szfailop_keep); break; @@ -119,9 +145,9 @@ default: break; } - + switch (ctx->Stencil.ZPassFunc) - { + { case GL_KEEP: MGA_SET_FIELD(stencilctl, SC_szpassop_MASK, SC_szpassop_keep); break; @@ -145,26 +171,26 @@ } } - mmesa->Setup[MGA_CTXREG_STENCIL] = stencil; - mmesa->Setup[MGA_CTXREG_STENCILCTL] = stencilctl; - mmesa->dirty |= MGA_UPLOAD_CTX; + mmesa->setup.stencil = stencil; + mmesa->setup.stencilctl = stencilctl; + mmesa->dirty |= MGA_UPLOAD_CONTEXT; } -static void mgaDDStencilFunc(GLcontext *ctx, GLenum func, GLint ref, - GLuint mask) +static void mgaDDStencilFunc(GLcontext *ctx, GLenum func, GLint ref, + GLuint mask) { FLUSH_BATCH( MGA_CONTEXT(ctx) ); MGA_CONTEXT(ctx)->new_state |= MGA_NEW_STENCIL; } -static void mgaDDStencilMask(GLcontext *ctx, GLuint mask) +static void mgaDDStencilMask(GLcontext *ctx, GLuint mask) { FLUSH_BATCH( MGA_CONTEXT(ctx) ); MGA_CONTEXT(ctx)->new_state |= MGA_NEW_STENCIL; } -static void mgaDDStencilOp(GLcontext *ctx, GLenum fail, GLenum zfail, - GLenum zpass) +static void mgaDDStencilOp(GLcontext *ctx, GLenum fail, GLenum zfail, + GLenum zpass) { FLUSH_BATCH( MGA_CONTEXT(ctx) ); MGA_CONTEXT(ctx)->new_state |= MGA_NEW_STENCIL; @@ -172,14 +198,14 @@ static void mgaDDClearDepth(GLcontext *ctx, GLclampd d) { - mgaContextPtr mmesa = MGA_CONTEXT(ctx); + mgaContextPtr mmesa = MGA_CONTEXT(ctx); - switch (mmesa->Setup[MGA_CTXREG_MACCESS] & MA_zwidth_MASK) { - case MA_zwidth_16: mmesa->ClearDepth = d * 0x0000ffff; break; - case MA_zwidth_24: mmesa->ClearDepth = d * 0xffffff00; break; - case MA_zwidth_32: mmesa->ClearDepth = d * 0xffffffff; break; - default: return; - } + switch (mmesa->setup.maccess & ~MA_zwidth_MASK) { + case MA_zwidth_16: mmesa->ClearDepth = d * 0x0000ffff; break; + case MA_zwidth_24: mmesa->ClearDepth = d * 0xffffff00; break; + case MA_zwidth_32: mmesa->ClearDepth = d * 0xffffffff; break; + default: return; + } } static void mgaUpdateZMode(const GLcontext *ctx) @@ -188,13 +214,15 @@ int zmode = 0; if (ctx->Depth.Test) { - switch(ctx->Depth.Func) { + switch(ctx->Depth.Func) { case GL_NEVER: - zmode = DC_zmode_nozcmp; break; - case GL_ALWAYS: + /* can't do this in h/w, we'll use a s/w fallback */ + zmode = DC_zmode_nozcmp; + break; + case GL_ALWAYS: zmode = DC_zmode_nozcmp; break; case GL_LESS: - zmode = DC_zmode_zlt; break; + zmode = DC_zmode_zlt; break; case GL_LEQUAL: zmode = DC_zmode_zlte; break; case GL_EQUAL: @@ -208,25 +236,28 @@ default: break; } + if (ctx->Depth.Mask) - zmode |= DC_atype_zi; + zmode |= DC_atype_zi; else - zmode |= DC_atype_i; - } else { - zmode |= DC_zmode_nozcmp | DC_atype_i; + zmode |= DC_atype_i; } + else { + zmode |= DC_zmode_nozcmp; + zmode |= DC_atype_i; /* don't write to zbuffer */ + } #if defined(ACCEL_ROP) - mmesa->Setup[MGA_CTXREG_DWGCTL] &= DC_bop_MASK; - if (ctx->Color.ColorLogicOpEnabled) + mmesa->setup.dwgctl &= DC_bop_MASK; + if (ctx->Color.ColorLogicOpEnabled) zmode |= mgarop_NoBLK[(ctx->Color.LogicOp)&0xf]; - else + else zmode |= mgarop_NoBLK[GL_COPY & 0xf]; #endif - mmesa->Setup[MGA_CTXREG_DWGCTL] &= DC_zmode_MASK & DC_atype_MASK; - mmesa->Setup[MGA_CTXREG_DWGCTL] |= zmode; - mmesa->dirty |= MGA_UPLOAD_CTX; + mmesa->setup.dwgctl &= DC_zmode_MASK & DC_atype_MASK; + mmesa->setup.dwgctl |= zmode; + mmesa->dirty |= MGA_UPLOAD_CONTEXT; } @@ -237,10 +268,16 @@ } -static void mgaDDBlendEquation(GLcontext *ctx, GLenum mode) +static void mgaDDBlendEquation(GLcontext *ctx, GLenum mode) { FLUSH_BATCH( MGA_CONTEXT(ctx) ); MGA_CONTEXT(ctx)->new_state |= MGA_NEW_ALPHA; + + if (ctx->Color.ColorLogicOpEnabled && ctx->Color.LogicOp != GL_COPY) + MGA_CONTEXT(ctx)->Fallback |= MGA_FALLBACK_LOGICOP; + else + MGA_CONTEXT(ctx)->Fallback &= ~MGA_FALLBACK_LOGICOP; + } static void mgaDDBlendFunc(GLcontext *ctx, GLenum sfactor, GLenum dfactor) @@ -249,7 +286,7 @@ MGA_CONTEXT(ctx)->new_state |= MGA_NEW_ALPHA; } -static void mgaDDBlendFuncSeparate( GLcontext *ctx, GLenum sfactorRGB, +static void mgaDDBlendFuncSeparate( GLcontext *ctx, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorA, GLenum dfactorA ) { @@ -259,7 +296,7 @@ -static void mgaDDLightModelfv(GLcontext *ctx, GLenum pname, +static void mgaDDLightModelfv(GLcontext *ctx, GLenum pname, const GLfloat *param) { if (pname == GL_LIGHT_MODEL_COLOR_CONTROL) { @@ -272,7 +309,7 @@ static void mgaDDShadeModel(GLcontext *ctx, GLenum mode) { FLUSH_BATCH( MGA_CONTEXT(ctx) ); - MGA_CONTEXT(ctx)->new_state |= MGA_NEW_TEXTURE; + MGA_CONTEXT(ctx)->new_state |= MGA_NEW_TEXTURE; } @@ -280,6 +317,10 @@ { FLUSH_BATCH( MGA_CONTEXT(ctx) ); MGA_CONTEXT(ctx)->new_state |= MGA_NEW_DEPTH; + if (func == GL_NEVER && ctx->Depth.Test) + MGA_CONTEXT(ctx)->Fallback |= MGA_FALLBACK_DEPTH; + else + MGA_CONTEXT(ctx)->Fallback &= ~MGA_FALLBACK_DEPTH; } static void mgaDDDepthMask(GLcontext *ctx, GLboolean flag) @@ -299,12 +340,14 @@ { if (ctx->Color.ColorLogicOpEnabled) { FLUSH_BATCH( MGA_CONTEXT(ctx) ); - + if (opcode == GL_COPY) MGA_CONTEXT(ctx)->Fallback &= ~MGA_FALLBACK_LOGICOP; else MGA_CONTEXT(ctx)->Fallback |= MGA_FALLBACK_LOGICOP; } + else + MGA_CONTEXT(ctx)->Fallback &= ~MGA_FALLBACK_LOGICOP; } #endif @@ -313,18 +356,18 @@ { mgaContextPtr mmesa = MGA_CONTEXT(ctx); - GLuint color = MGAPACKCOLOR888((GLubyte)(ctx->Fog.Color[0]*255.0F), - (GLubyte)(ctx->Fog.Color[1]*255.0F), - (GLubyte)(ctx->Fog.Color[2]*255.0F)); - - if (color != mmesa->Setup[MGA_CTXREG_FOGCOLOR]) - mmesa->Setup[MGA_CTXREG_FOGCOLOR] = color; - - mmesa->Setup[MGA_CTXREG_MACCESS] &= ~MA_fogen_enable; - if (ctx->FogMode == FOG_FRAGMENT) - mmesa->Setup[MGA_CTXREG_MACCESS] |= MA_fogen_enable; + GLuint color = MGAPACKCOLOR888((GLubyte)(ctx->Fog.Color[0]*255.0F), + (GLubyte)(ctx->Fog.Color[1]*255.0F), + (GLubyte)(ctx->Fog.Color[2]*255.0F)); + + if (color != mmesa->setup.fogcolor) + mmesa->setup.fogcolor = color; + + mmesa->setup.maccess &= ~MA_fogen_enable; + if (ctx->FogMode == FOG_FRAGMENT) + mmesa->setup.maccess |= MA_fogen_enable; - mmesa->dirty |= MGA_UPLOAD_CTX; + mmesa->dirty |= MGA_UPLOAD_CONTEXT; } static void mgaDDFogfv(GLcontext *ctx, GLenum pname, const GLfloat *param) @@ -348,21 +391,35 @@ int a = 0; /* determine source of alpha for blending and testing */ - if ( !ctx->Texture.ReallyEnabled ) + if ( !ctx->Texture.ReallyEnabled ) { a |= AC_alphasel_diffused; + } else { - switch (ctx->Texture.Unit[0].EnvMode) { - case GL_DECAL: - case GL_REPLACE: - a |= AC_alphasel_fromtex; - break; - case GL_BLEND: - case GL_MODULATE: - a |= AC_alphasel_modulated; - break; - default: - break; + /* G400: Regardless of texture env mode, we use the alpha from the + * texture unit (AC_alphasel_fromtex) since it will have already + * been modulated by the incoming fragment color, if needed. + * We don't want (AC_alphasel_modulate) since that'll effectively + * do the modulation twice. + */ + if (MGA_IS_G400(mmesa)) { + a |= AC_alphasel_fromtex; } + else { + /* G200 */ + switch (ctx->Texture.Unit[0].EnvMode) { + case GL_DECAL: + a |= AC_alphasel_diffused; + case GL_REPLACE: + a |= AC_alphasel_fromtex; + break; + case GL_BLEND: + case GL_MODULATE: + a |= AC_alphasel_modulated; + break; + default: + break; + } + } } @@ -371,30 +428,30 @@ if (ctx->Color.AlphaEnabled) { GLubyte ref = ctx->Color.AlphaRef; switch (ctx->Color.AlphaFunc) { - case GL_NEVER: + case GL_NEVER: a |= AC_atmode_alt; ref = 0; break; case GL_LESS: - a |= AC_atmode_alt; + a |= AC_atmode_alt; break; case GL_GEQUAL: - a |= AC_atmode_agte; + a |= AC_atmode_agte; break; - case GL_LEQUAL: - a |= AC_atmode_alte; + case GL_LEQUAL: + a |= AC_atmode_alte; break; - case GL_GREATER: - a |= AC_atmode_agt; + case GL_GREATER: + a |= AC_atmode_agt; break; - case GL_NOTEQUAL: - a |= AC_atmode_ane; + case GL_NOTEQUAL: + a |= AC_atmode_ane; break; - case GL_EQUAL: - a |= AC_atmode_ae; + case GL_EQUAL: + a |= AC_atmode_ae; break; case GL_ALWAYS: - a |= AC_atmode_noacmp; + a |= AC_atmode_noacmp; break; default: break; @@ -425,12 +482,15 @@ break; case GL_ONE_MINUS_DST_ALPHA: if (mgaScreen->cpp == 4) - a |= AC_src_om_dst_alpha; - else + a |= AC_src_om_dst_alpha; + else a |= AC_src_zero; break; case GL_SRC_ALPHA_SATURATE: - a |= AC_src_src_alpha_sat; + if (ctx->Visual->AlphaBits > 0) + a |= AC_src_src_alpha_sat; + else + a |= AC_src_zero; break; default: /* never happens */ break; @@ -468,13 +528,13 @@ a |= AC_src_one|AC_dst_zero; } - mmesa->Setup[MGA_CTXREG_ALPHACTRL] = (AC_amode_alpha_channel | - AC_astipple_disable | - AC_aten_disable | - AC_atmode_noacmp | - a); - - mmesa->dirty |= MGA_UPLOAD_CTX; + mmesa->setup.alphactrl = (AC_amode_alpha_channel | + AC_astipple_disable | + AC_aten_disable | + AC_atmode_noacmp | + a); + + mmesa->dirty |= MGA_UPLOAD_CONTEXT; } @@ -490,10 +550,10 @@ if (mmesa->driDrawable) { int x1 = mmesa->driDrawable->x + ctx->Scissor.X; - int y1 = mmesa->driDrawable->y + mmesa->driDrawable->h - (ctx->Scissor.Y+ - ctx->Scissor.Height); - int x2 = mmesa->driDrawable->x + ctx->Scissor.X+ctx->Scissor.Width; - int y2 = mmesa->driDrawable->y + mmesa->driDrawable->h - ctx->Scissor.Y; + int y1 = mmesa->driDrawable->y + mmesa->driDrawable->h + - (ctx->Scissor.Y + ctx->Scissor.Height); + int x2 = x1 + ctx->Scissor.Width - 1; + int y2 = y1 + ctx->Scissor.Height - 1; if (x1 < 0) x1 = 0; if (y1 < 0) y1 = 0; @@ -506,7 +566,7 @@ mmesa->scissor_rect.y2 = y2; if (MGA_DEBUG&DEBUG_VERBOSE_2D) - fprintf(stderr, "SET SCISSOR %d,%d-%d,%d\n", + fprintf(stderr, "SET SCISSOR %d,%d-%d,%d\n", mmesa->scissor_rect.x1, mmesa->scissor_rect.y1, mmesa->scissor_rect.x2, @@ -517,7 +577,7 @@ } -static void mgaDDScissor( GLcontext *ctx, GLint x, GLint y, +static void mgaDDScissor( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h ) { FLUSH_BATCH( MGA_CONTEXT(ctx) ); @@ -536,9 +596,9 @@ -static void mgaDDSetColor(GLcontext *ctx, - GLubyte r, GLubyte g, - GLubyte b, GLubyte a ) +static void mgaDDSetColor(GLcontext *ctx, + GLubyte r, GLubyte g, + GLubyte b, GLubyte a ) { mgaContextPtr mmesa = MGA_CONTEXT(ctx); @@ -546,9 +606,9 @@ } -static void mgaDDClearColor(GLcontext *ctx, - GLubyte r, GLubyte g, - GLubyte b, GLubyte a ) +static void mgaDDClearColor(GLcontext *ctx, + GLubyte r, GLubyte g, + GLubyte b, GLubyte a ) { mgaContextPtr mmesa = MGA_CONTEXT(ctx); @@ -569,22 +629,22 @@ { mgaContextPtr mmesa = MGA_CONTEXT(ctx); GLuint mode = _CULL_DISABLE; - - if (ctx->Polygon.CullFlag && - ctx->PB->primitive == GL_POLYGON && - ctx->Polygon.CullFaceMode != GL_FRONT_AND_BACK) + + if (ctx->Polygon.CullFlag && + ctx->PB->primitive == GL_POLYGON && + ctx->Polygon.CullFaceMode != GL_FRONT_AND_BACK) { mode = _CULL_NEGATIVE; if (ctx->Polygon.CullFaceMode == GL_FRONT) mode ^= (_CULL_POSITIVE ^ _CULL_NEGATIVE); if (ctx->Polygon.FrontFace != GL_CCW) mode ^= (_CULL_POSITIVE ^ _CULL_NEGATIVE); - if (mmesa->warp_pipe & MGA_TEX1_BIT) + if (mmesa->warp_pipe & MGA_TEX1_BIT) mode ^= (_CULL_POSITIVE ^ _CULL_NEGATIVE); /* why??? */ } - mmesa->Setup[MGA_CTXREG_WFLAG] = mode; - mmesa->dirty |= MGA_UPLOAD_CTX; + mmesa->setup.wflag = mode; + mmesa->dirty |= MGA_UPLOAD_CONTEXT; } @@ -603,12 +663,12 @@ /* Mesa calls this from the wrong place: */ -static GLboolean mgaDDColorMask(GLcontext *ctx, - GLboolean r, GLboolean g, +static GLboolean mgaDDColorMask(GLcontext *ctx, + GLboolean r, GLboolean g, GLboolean b, GLboolean a ) { mgaContextPtr mmesa = MGA_CONTEXT( ctx ); - mgaScreenPrivate *mgaScreen = mmesa->mgaScreen; + mgaScreenPrivate *mgaScreen = mmesa->mgaScreen; GLuint mask = mgaPackColor(mgaScreen->cpp, @@ -616,28 +676,31 @@ ctx->Color.ColorMask[GCOMP], ctx->Color.ColorMask[BCOMP], ctx->Color.ColorMask[ACOMP]); - + if (mgaScreen->cpp == 2) mask = mask | (mask << 16); - if (mmesa->Setup[MGA_CTXREG_PLNWT] != mask) { + if (mmesa->setup.plnwt != mask) { FLUSH_BATCH( MGA_CONTEXT(ctx) ); - mmesa->Setup[MGA_CTXREG_PLNWT] = mask; - MGA_CONTEXT(ctx)->new_state |= MGA_NEW_MASK; - mmesa->dirty |= MGA_UPLOAD_CTX; + mmesa->setup.plnwt = mask; + MGA_CONTEXT(ctx)->new_state |= MGA_NEW_MASK; + mmesa->dirty |= MGA_UPLOAD_CONTEXT; } - return 1; + return 0; /* Kind of a hack */ } /* ============================================================= - * Polygon stipple - * + * Polygon stipple + * * The mga supports a subset of possible 4x4 stipples natively, GL * wants 32x32. Fortunately stipple is usually a repeating pattern. + * + * Note: the fully opaque pattern (0xffff) has been disabled in order + * to work around a conformance issue. */ static int mgaStipples[16] = { - 0xffff, + 0xffff1, /* See above note */ 0xa5a5, 0x5a5a, 0xa0a0, @@ -665,11 +728,16 @@ GLuint stipple; FLUSH_BATCH(mmesa); - ctx->Driver.TriangleCaps |= DD_TRI_STIPPLE; + + /* Turn off flags. We'll turn them on below if this stipple pattern + * works in h/w. + */ + ctx->Driver.TriangleCaps &= ~DD_TRI_STIPPLE; + mmesa->canDoStipple = GL_FALSE; if (active) { - mmesa->dirty |= MGA_UPLOAD_CTX; - mmesa->Setup[MGA_CTXREG_DWGCTL] &= ~(0xf<<20); + mmesa->dirty |= MGA_UPLOAD_CONTEXT; + mmesa->setup.dwgctl &= ~(0xf<<20); } p[0] = mask[0] & 0xf; p[0] |= p[0] << 4; @@ -678,17 +746,16 @@ p[3] = mask[12] & 0xf; p[3] |= p[3] << 4; for (k = 0 ; k < 8 ; k++) - for (j = 0 ; j < 4; j++) - for (i = 0 ; i < 4 ; i++) + for (j = 0 ; j < 4; j++) + for (i = 0 ; i < 4 ; i++) if (*m++ != p[j]) { - ctx->Driver.TriangleCaps &= ~DD_TRI_STIPPLE; return; } stipple = ( ((p[0] & 0xf) << 0) | ((p[1] & 0xf) << 4) | ((p[2] & 0xf) << 8) | - ((p[3] & 0xf) << 12) ); + ((p[3] & 0xf) << 12) ); for (i = 0 ; i < 16 ; i++) if (mgaStipples[i] == stipple) { @@ -697,13 +764,15 @@ } if (i == 16) { - ctx->Driver.TriangleCaps &= ~DD_TRI_STIPPLE; return; } - + + mmesa->canDoStipple = GL_TRUE; + if (active) { - mmesa->Setup[MGA_CTXREG_DWGCTL] &= ~(0xf<<20); - mmesa->Setup[MGA_CTXREG_DWGCTL] |= mmesa->poly_stipple; + mmesa->setup.dwgctl &= ~(0xf<<20); + mmesa->setup.dwgctl |= mmesa->poly_stipple; + ctx->Driver.TriangleCaps |= DD_TRI_STIPPLE; } } @@ -718,133 +787,67 @@ (state & MGA_WAIT_AGE) ? "wait-age, " : "", (state & MGA_UPLOAD_TEX0IMAGE) ? "upload-tex0-img, " : "", (state & MGA_UPLOAD_TEX1IMAGE) ? "upload-tex1-img, " : "", - (state & MGA_UPLOAD_CTX) ? "upload-ctx, " : "", + (state & MGA_UPLOAD_CONTEXT) ? "upload-ctx, " : "", (state & MGA_UPLOAD_TEX0) ? "upload-tex0, " : "", (state & MGA_UPLOAD_TEX1) ? "upload-tex1, " : "", (state & MGA_UPLOAD_PIPE) ? "upload-pipe, " : "" - ); + ); } -/* static int tex0[11] = { */ -/* 0x2050003, */ -/* 0x90, */ -/* 0x82100000, */ -/* 0x0, */ -/* 0xc6d000, */ -/* 0xc7d000, */ -/* 0xc81000, */ -/* 0xc82000, */ -/* 0xc82400, */ -/* 0x3fc7413, */ -/* 0x1fc7612 */ -/* }; */ - -/* static int tex1[11] = { */ -/* 0x2040003, */ -/* 0x90, */ -/* 0x82100000, */ -/* 0x0, */ -/* 0xc82500, */ -/* 0xc8a500, */ -/* 0xc8c500, */ -/* 0xc8cd00, */ -/* 0xc8cf00, */ -/* 0x1fc7612, */ -/* 0x1fc7612 */ -/* }; */ - -/* static int tex0_single[11] = { */ -/* 0x2040003, */ -/* 0x10, */ -/* 0x82100000, */ -/* 0x0, */ -/* 0x196d000, */ -/* 0x1975000, */ -/* 0x1977000, */ -/* 0x1977800, */ -/* 0x1977a00, */ -/* 0x1fc7612, */ -/* 0x1fc7612, */ -/* }; */ - -/* static int ctx_single[] = { */ -/* 0x727000, */ -/* 0x1, */ -/* 0xffffffff, */ -/* 0xc4436, */ -/* 0x101, */ -/* 0x7fff7f, */ -/* 0x0, */ -/* 0x0, */ -/* 0x0, */ -/* 0x0 */ -/* }; */ - -/* static int ctx_multi[] = { */ -/* 0x727000, */ -/* 0x1, */ -/* 0xffffffff, */ -/* 0xc4076, */ -/* 0x2000101, */ -/* 0x0, */ -/* 0x0, */ -/* 0xc0600000, */ -/* 0xc3600013, */ -/* 0x0 */ -/* }; */ - /* Push the state into the sarea and/or texture memory. */ void mgaEmitHwStateLocked( mgaContextPtr mmesa ) { - drm_mga_sarea_t *sarea = mmesa->sarea; + MGASAREAPrivPtr sarea = mmesa->sarea; if (MGA_DEBUG & DEBUG_VERBOSE_MSG) mgaDDPrintDirty( "mgaEmitHwStateLocked", mmesa->dirty ); if ((mmesa->dirty & MGA_UPLOAD_TEX0IMAGE) && mmesa->CurrentTexObj[0]) mgaUploadTexImages(mmesa, mmesa->CurrentTexObj[0]); - + if ((mmesa->dirty & MGA_UPLOAD_TEX1IMAGE) && mmesa->CurrentTexObj[1]) mgaUploadTexImages(mmesa, mmesa->CurrentTexObj[1]); - - if (mmesa->dirty & MGA_UPLOAD_CTX) { - memcpy( sarea->ContextState, mmesa->Setup, sizeof(mmesa->Setup)); + + if (mmesa->dirty & MGA_UPLOAD_CONTEXT) { + memcpy( &sarea->ContextState, &mmesa->setup, sizeof(mmesa->setup)); } if ((mmesa->dirty & MGA_UPLOAD_TEX0) && mmesa->CurrentTexObj[0]) { - memcpy(sarea->TexState[0], - mmesa->CurrentTexObj[0]->Setup, + memcpy(&sarea->TexState[0], + &mmesa->CurrentTexObj[0]->setup, sizeof(sarea->TexState[0])); } if ((mmesa->dirty & MGA_UPLOAD_TEX1) && mmesa->CurrentTexObj[1]) { - memcpy(sarea->TexState[1], - mmesa->CurrentTexObj[1]->Setup, + memcpy(&sarea->TexState[1], + &mmesa->CurrentTexObj[1]->setup, sizeof(sarea->TexState[1])); } - if (sarea->TexState[0][MGA_TEXREG_CTL2] != - sarea->TexState[1][MGA_TEXREG_CTL2]) { - memcpy(sarea->TexState[1], - sarea->TexState[0], - sizeof(sarea->TexState[0])); + if (sarea->TexState[0].texctl2 != + sarea->TexState[1].texctl2) { + memcpy(&sarea->TexState[1], + &sarea->TexState[0], + sizeof(sarea->TexState[0])); mmesa->dirty |= MGA_UPLOAD_TEX1|MGA_UPLOAD_TEX0; } mmesa->sarea->WarpPipe = mmesa->warp_pipe; - mmesa->sarea->vertexsize = mmesa->vertsize; -/* mmesa->sarea->vertexsize = 10; */ + mmesa->sarea->vertsize = mmesa->vertsize; mmesa->sarea->dirty |= mmesa->dirty; -#if 0 - if (mmesa->dirty & MGA_UPLOAD_PIPE) - mgaPrintSetupFlags("warp pipe", mmesa->sarea->WarpPipe); -/* fprintf(stderr, "in mgaEmitHwStateLocked: dirty now %x\n", */ -/* mmesa->sarea->dirty); */ -#endif - mmesa->dirty &= (MGA_UPLOAD_CLIPRECTS|MGA_WAIT_AGE); + + /* This is a bit of a hack but seems to be the best place to ensure + * that separate specular is disabled when not needed. + */ + if (mmesa->glCtx->Texture.ReallyEnabled == 0 || + !mmesa->glCtx->Light.Enabled || + mmesa->glCtx->Light.Model.ColorControl == GL_SINGLE_COLOR) { + sarea->TexState[0].texctl2 &= ~TMC_specen_enable; + sarea->TexState[1].texctl2 &= ~TMC_specen_enable; + } } @@ -864,10 +867,21 @@ case GL_BLEND: FLUSH_BATCH( mmesa ); mmesa->new_state |= MGA_NEW_ALPHA; + + /* For some reason enable(GL_BLEND) affects ColorLogicOpEnabled. + */ + if (ctx->Color.ColorLogicOpEnabled && ctx->Color.LogicOp != GL_COPY) + mmesa->Fallback |= MGA_FALLBACK_LOGICOP; + else + mmesa->Fallback &= ~MGA_FALLBACK_LOGICOP; break; case GL_DEPTH_TEST: FLUSH_BATCH( mmesa ); mmesa->new_state |= MGA_NEW_DEPTH; + if (ctx->Depth.Func == GL_NEVER && ctx->Depth.Test) + mmesa->Fallback |= MGA_FALLBACK_DEPTH; + else + mmesa->Fallback &= ~MGA_FALLBACK_DEPTH; break; case GL_SCISSOR_TEST: FLUSH_BATCH( mmesa ); @@ -889,18 +903,23 @@ mmesa->new_state |= (MGA_NEW_TEXTURE|MGA_NEW_ALPHA); break; case GL_POLYGON_STIPPLE: - if ((ctx->Driver.TriangleCaps & DD_TRI_STIPPLE) && - ctx->PB->primitive == GL_POLYGON) - { - FLUSH_BATCH(mmesa); - mmesa->dirty |= MGA_UPLOAD_CTX; - mmesa->Setup[MGA_CTXREG_DWGCTL] &= ~(0xf<<20); - if (state) - mmesa->Setup[MGA_CTXREG_DWGCTL] |= mmesa->poly_stipple; + FLUSH_BATCH(mmesa); + mmesa->dirty |= MGA_UPLOAD_CONTEXT; + mmesa->setup.dwgctl &= ~(0xf<<20); + if (state) { + if (mmesa->canDoStipple && ctx->PB->primitive == GL_POLYGON) { + mmesa->setup.dwgctl |= mmesa->poly_stipple; + ctx->Driver.TriangleCaps |= DD_TRI_STIPPLE; + } + else { + ctx->Driver.TriangleCaps &= ~DD_TRI_STIPPLE; + } + } + else { + ctx->Driver.TriangleCaps &= ~DD_TRI_STIPPLE; } break; case GL_COLOR_LOGIC_OP: - case GL_INDEX_LOGIC_OP: FLUSH_BATCH( mmesa ); #if !defined(ACCEL_ROP) mmesa->Fallback &= ~MGA_FALLBACK_LOGICOP; @@ -912,15 +931,15 @@ break; case GL_STENCIL_TEST: FLUSH_BATCH( mmesa ); - if (mmesa->hw_stencil) + if (mmesa->hw_stencil) mmesa->new_state |= MGA_NEW_STENCIL; else if (state) mmesa->Fallback |= MGA_FALLBACK_STENCIL; else mmesa->Fallback &= ~MGA_FALLBACK_STENCIL; default: - break; - } + break; + } } @@ -934,17 +953,17 @@ { mgaContextPtr mmesa = MGA_CONTEXT( ctx ); int index = mmesa->setupindex; - + index &= ~(MGA_WIN_BIT|MGA_TEX0_BIT|MGA_RGBA_BIT); - index |= (MGA_ALPHA_BIT | - MGA_SPEC_BIT | - MGA_FOG_BIT | + index |= (MGA_ALPHA_BIT | + MGA_SPEC_BIT | + MGA_FOG_BIT | /* MGA_TEX1_BIT | */ 0); if (index != mmesa->warp_pipe) { - FLUSH_BATCH(mmesa); + FLUSH_BATCH(mmesa); mmesa->warp_pipe = index; mmesa->new_state |= MGA_NEW_WARP; mmesa->dirty |= MGA_UPLOAD_PIPE; @@ -976,7 +995,7 @@ mgaContextPtr mmesa = MGA_CONTEXT( ctx ); int new_state = mmesa->new_state; - if (new_state) + if (new_state) { FLUSH_BATCH( mmesa ); @@ -997,8 +1016,8 @@ if (new_state & MGA_NEW_CLIP) mgaUpdateClipping(ctx); - if (new_state & MGA_NEW_STENCIL) - mgaUpdateStencil(ctx); + if (new_state & MGA_NEW_STENCIL) + mgaUpdateStencil(ctx); if (new_state & (MGA_NEW_WARP|MGA_NEW_CULL)) mgaUpdateCull(ctx); @@ -1009,51 +1028,47 @@ } - - - - - void mgaDDReducedPrimitiveChange( GLcontext *ctx, GLenum prim ) { mgaContextPtr mmesa = MGA_CONTEXT(ctx); FLUSH_BATCH( mmesa ); - mgaUpdateCull(ctx); + mgaUpdateCull(ctx); - if (ctx->Polygon.StippleFlag && (ctx->Driver.TriangleCaps & DD_TRI_STIPPLE)) - { - mmesa->dirty |= MGA_UPLOAD_CTX; - mmesa->Setup[MGA_CTXREG_DWGCTL] &= ~(0xf<<20); - if (ctx->PB->primitive == GL_POLYGON) - mmesa->Setup[MGA_CTXREG_DWGCTL] |= mmesa->poly_stipple; + if (ctx->Polygon.StippleFlag) { + mmesa->dirty |= MGA_UPLOAD_CONTEXT; + mmesa->setup.dwgctl &= ~(0xf<<20); + ctx->Driver.TriangleCaps &= ~DD_TRI_STIPPLE; + if (ctx->PB->primitive == GL_POLYGON && mmesa->canDoStipple) { + mmesa->setup.dwgctl |= mmesa->poly_stipple; + ctx->Driver.TriangleCaps |= DD_TRI_STIPPLE; + } + } + else { + ctx->Driver.TriangleCaps &= ~DD_TRI_STIPPLE; } } #define INTERESTED (~(NEW_MODELVIEW|NEW_PROJECTION|\ NEW_TEXTURE_MATRIX|\ - NEW_USER_CLIP|NEW_CLIENT_STATE|\ - NEW_TEXTURE_ENABLE)) + NEW_USER_CLIP|NEW_CLIENT_STATE)) void mgaDDUpdateState( GLcontext *ctx ) { mgaContextPtr mmesa = MGA_CONTEXT( ctx ); - + if (ctx->NewState & INTERESTED) { - mgaDDChooseRenderState(ctx); + mgaDDChooseRenderState(ctx); mgaChooseRasterSetupFunc(ctx); mgaWarpUpdateState(ctx); - } + } /* Have to do this here to detect texture fallbacks in time: */ if (mmesa->new_state & MGA_NEW_TEXTURE) mgaDDUpdateHwState( ctx ); - if (0) fprintf(stderr, "fallback %x indirect %x\n", mmesa->Fallback, - mmesa->IndirectTriangles); - if (!mmesa->Fallback) { ctx->IndirectTriangles &= ~DD_SW_RASTERIZE; ctx->IndirectTriangles |= mmesa->IndirectTriangles; @@ -1063,6 +1078,9 @@ ctx->Driver.TriangleFunc=mmesa->TriangleFunc; ctx->Driver.QuadFunc=mmesa->QuadFunc; } + else { + ctx->IndirectTriangles |= mmesa->IndirectTriangles; + } } @@ -1077,79 +1095,80 @@ mmesa->read_buffer = MGA_BACK; mmesa->drawOffset = mmesa->mgaScreen->backOffset; mmesa->readOffset = mmesa->mgaScreen->backOffset; - mmesa->Setup[MGA_CTXREG_DSTORG] = mgaScreen->backOffset; + mmesa->setup.dstorg = mgaScreen->backOffset; } else { - mmesa->drawOffset = mmesa->mgaScreen->frontOffset; - mmesa->readOffset = mmesa->mgaScreen->frontOffset; mmesa->draw_buffer = MGA_FRONT; mmesa->read_buffer = MGA_FRONT; - mmesa->Setup[MGA_CTXREG_DSTORG] = mgaScreen->frontOffset; + mmesa->drawOffset = mmesa->mgaScreen->frontOffset; + mmesa->readOffset = mmesa->mgaScreen->frontOffset; + mmesa->setup.dstorg = mgaScreen->frontOffset; + } + + mmesa->setup.maccess = (MA_memreset_disable | + MA_fogen_disable | + MA_tlutload_disable | + MA_nodither_disable | + MA_dit555_disable); + + switch (mmesa->mgaScreen->cpp) { + case 2: + mmesa->setup.maccess |= MA_pwidth_16; + break; + case 4: + mmesa->setup.maccess |= MA_pwidth_32; + break; + default: + fprintf( stderr, "Error: unknown cpp %d, exiting...\n", + mmesa->mgaScreen->cpp ); + exit( 1 ); } switch (mmesa->glCtx->Visual->DepthBits) { case 16: - mmesa->Setup[MGA_CTXREG_MACCESS] = (MA_pwidth_16 | - MA_zwidth_16 | /* 1bit stencil? */ - MA_memreset_disable | - MA_fogen_disable | - MA_tlutload_disable | - MA_nodither_disable | - MA_dit555_disable); + mmesa->setup.maccess |= MA_zwidth_16; break; case 24: - mmesa->Setup[MGA_CTXREG_MACCESS] = (MA_pwidth_32 | - MA_zwidth_24 | - MA_memreset_disable | - MA_fogen_disable | - MA_tlutload_disable | - MA_nodither_enable | - MA_dit555_disable); + mmesa->setup.maccess |= MA_zwidth_24; break; case 32: - mmesa->Setup[MGA_CTXREG_MACCESS] = (MA_pwidth_32 | - MA_zwidth_32 | - MA_memreset_disable | - MA_fogen_disable | - MA_tlutload_disable | - MA_nodither_enable | - MA_dit555_disable); + mmesa->setup.maccess |= MA_pwidth_32; break; } - mmesa->Setup[MGA_CTXREG_DWGCTL] = (DC_opcod_trap | - DC_atype_i | - DC_linear_xy | - DC_zmode_nozcmp | - DC_solid_disable | - DC_arzero_disable | - DC_sgnzero_disable | - DC_shftzero_enable | - (0xC << DC_bop_SHIFT) | - (0x0 << DC_trans_SHIFT) | - DC_bltmod_bmonolef | - DC_pattern_disable | - DC_transc_disable | - DC_clipdis_disable); - - - mmesa->Setup[MGA_CTXREG_PLNWT] = ~0; - mmesa->Setup[MGA_CTXREG_ALPHACTRL] = ( AC_src_one | - AC_dst_zero | - AC_amode_FCOL | - AC_astipple_disable | - AC_aten_disable | - AC_atmode_noacmp | - AC_alphasel_fromtex ); - - mmesa->Setup[MGA_CTXREG_FOGCOLOR] = - MGAPACKCOLOR888((GLubyte)(ctx->Fog.Color[0]*255.0F), - (GLubyte)(ctx->Fog.Color[1]*255.0F), + mmesa->setup.dwgctl = (DC_opcod_trap | + DC_atype_i | + DC_linear_xy | + DC_zmode_nozcmp | + DC_solid_disable | + DC_arzero_disable | + DC_sgnzero_disable | + DC_shftzero_enable | + (0xC << DC_bop_SHIFT) | + (0x0 << DC_trans_SHIFT) | + DC_bltmod_bmonolef | + DC_pattern_disable | + DC_transc_disable | + DC_clipdis_disable); + + + mmesa->setup.plnwt = ~0; + mmesa->setup.alphactrl = ( AC_src_one | + AC_dst_zero | + AC_amode_FCOL | + AC_astipple_disable | + AC_aten_disable | + AC_atmode_noacmp | + AC_alphasel_fromtex ); + + mmesa->setup.fogcolor = + MGAPACKCOLOR888((GLubyte)(ctx->Fog.Color[0]*255.0F), + (GLubyte)(ctx->Fog.Color[1]*255.0F), (GLubyte)(ctx->Fog.Color[2]*255.0F)); - mmesa->Setup[MGA_CTXREG_WFLAG] = 0; - mmesa->Setup[MGA_CTXREG_TDUAL0] = 0; - mmesa->Setup[MGA_CTXREG_TDUAL1] = 0; - mmesa->Setup[MGA_CTXREG_FCOL] = 0; + mmesa->setup.wflag = 0; + mmesa->setup.tdualstage0 = 0; + mmesa->setup.tdualstage1 = 0; + mmesa->setup.fcol = 0; mmesa->new_state = ~0; } @@ -1172,8 +1191,8 @@ ctx->Driver.FrontFace = mgaDDCullFaceFrontFace; ctx->Driver.ColorMask = mgaDDColorMask; ctx->Driver.ReducedPrimitiveChange = mgaDDReducedPrimitiveChange; - ctx->Driver.RenderStart = mgaDDUpdateHwState; - ctx->Driver.RenderFinish = 0; + ctx->Driver.RenderStart = mgaDDUpdateHwState; + ctx->Driver.RenderFinish = 0; ctx->Driver.SetDrawBuffer = mgaDDSetDrawBuffer; ctx->Driver.SetReadBuffer = mgaDDSetReadBuffer; @@ -1193,4 +1212,3 @@ ctx->Driver.ClearIndex = 0; ctx->Driver.IndexMask = 0; } - Index: xc/lib/GL/mesa/src/drv/mga/mgastate.h diff -u xc/lib/GL/mesa/src/drv/mga/mgastate.h:1.2 xc/lib/GL/mesa/src/drv/mga/mgastate.h:1.3 --- xc/lib/GL/mesa/src/drv/mga/mgastate.h:1.2 Fri Jun 16 20:03:02 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgastate.h Tue Apr 10 12:07:51 2001 @@ -1,3 +1,31 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgastate.h,v 1.3 2001/04/10 16:07:51 dawes Exp $ */ +/* + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell + */ + #ifndef _MGA_STATE_H #define _MGA_STATE_H Index: xc/lib/GL/mesa/src/drv/mga/mgatex.c diff -u xc/lib/GL/mesa/src/drv/mga/mgatex.c:1.7 xc/lib/GL/mesa/src/drv/mga/mgatex.c:1.10.2.1 --- xc/lib/GL/mesa/src/drv/mga/mgatex.c:1.7 Wed Nov 8 00:02:46 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgatex.c Thu May 31 04:31:23 2001 @@ -1,31 +1,30 @@ /* - * GLX Hardware Device Driver for Matrox Millenium G200 - * Copyright (C) 1999 Wittawat Yamwong + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. * - * - * original by Wittawat Yamwong - * 9/20/99 rewrite by John Carmack - * 13/1/00 port to DRI by Keith Whitwell + * Authors: + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatex.c,v 1.7 2000/11/08 05:02:46 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatex.c,v 1.10.2.1 2001/05/31 08:31:23 alanh Exp $ */ #include #include @@ -37,9 +36,11 @@ #include "mgaregs.h" #include "mgaioctl.h" +#include "context.h" #include "enums.h" #include "simple_list.h" #include "mem.h" +#include "texutil.h" #define TEX_0 1 #define TEX_1 2 @@ -49,11 +50,11 @@ * Free all memory associated with a texture and NULL any pointers * to it. */ -void -mgaDestroyTexObj( mgaContextPtr mmesa, mgaTextureObjectPtr t ) +void +mgaDestroyTexObj( mgaContextPtr mmesa, mgaTextureObjectPtr t ) { if ( !t ) return; - + /* free the texture memory */ if (t->MemBlock) { mmFreeMem( t->MemBlock ); @@ -62,15 +63,15 @@ if (t->age > mmesa->dirtyAge) mmesa->dirtyAge = t->age; } - - /* free mesa's link */ - if (t->tObj) + + /* free mesa's link */ + if (t->tObj) t->tObj->DriverData = NULL; /* see if it was the driver's current object */ - if (t->bound & TEX_0) mmesa->CurrentTexObj[0] = 0; - if (t->bound & TEX_1) mmesa->CurrentTexObj[1] = 0; - + if (t->bound & TEX_0) mmesa->CurrentTexObj[0] = 0; + if (t->bound & TEX_1) mmesa->CurrentTexObj[1] = 0; + remove_from_list(t); FREE( t ); } @@ -80,26 +81,26 @@ * mgaSetTexWrappings */ static void mgaSetTexWrapping( mgaTextureObjectPtr t, - GLenum sWrap, - GLenum tWrap ) + GLenum sWrap, + GLenum tWrap ) { GLuint val = 0; - if (sWrap != GL_REPEAT) + if (sWrap != GL_REPEAT) val |= TMC_clampu_enable; - - if (tWrap != GL_REPEAT) + + if (tWrap != GL_REPEAT) val |= TMC_clampv_enable; - t->Setup[MGA_TEXREG_CTL] &= ~(TMC_clampu_enable|TMC_clampv_enable); - t->Setup[MGA_TEXREG_CTL] |= val; + t->setup.texctl &= ~(TMC_clampu_enable|TMC_clampv_enable); + t->setup.texctl |= val; } /* * mgaSetTexFilter */ -static void mgaSetTexFilter(mgaTextureObjectPtr t, GLenum minf, GLenum magf) +static void mgaSetTexFilter(mgaTextureObjectPtr t, GLenum minf, GLenum magf) { GLuint val = 0; @@ -118,9 +119,9 @@ case GL_LINEAR: val |= TF_magfilter_bilin; break; default: val |= TF_magfilter_nrst; break; } - + /* See OpenGL 1.2 specification */ - if (magf == GL_LINEAR && (minf == GL_NEAREST_MIPMAP_NEAREST || + if (magf == GL_LINEAR && (minf == GL_NEAREST_MIPMAP_NEAREST || minf == GL_NEAREST_MIPMAP_LINEAR)) { val |= (0x20 << TF_fthres_SHIFT); /* c = 0.5 */ } else { @@ -128,27 +129,182 @@ } - t->Setup[MGA_TEXREG_FILTER] &= (TF_minfilter_MASK | - TF_magfilter_MASK | - TF_fthres_MASK); - t->Setup[MGA_TEXREG_FILTER] |= val; + t->setup.texfilter &= (TF_minfilter_MASK | + TF_magfilter_MASK | + TF_fthres_MASK); + t->setup.texfilter |= val; } /* * mgaSetTexBorderColor */ -static void mgaSetTexBorderColor(mgaTextureObjectPtr t, GLubyte color[4]) +static void mgaSetTexBorderColor(mgaTextureObjectPtr t, GLubyte color[4]) { - t->Setup[MGA_TEXREG_BORDERCOL] = MGAPACKCOLOR8888(color[0],color[1], - color[2],color[3]); + t->setup.texbordercol = MGAPACKCOLOR8888(color[0],color[1], + color[2],color[3]); } +static GLint mgaChooseTexFormat( mgaContextPtr mmesa, + struct gl_texture_image *texImage, + GLenum format, GLenum type ) +{ + const GLboolean do32bpt = mmesa->default32BitTextures; + const struct gl_texture_format *texFormat; + GLint ret; + + if ( 0 ) + fprintf( stderr, "internal=%s format=%s type=%s\n", + texImage->IntFormat == 3 ? "GL_RGB (3)" : + texImage->IntFormat == 4 ? "GL_RGBA (4)" : + gl_lookup_enum_by_nr( texImage->IntFormat ), + gl_lookup_enum_by_nr( format ), + gl_lookup_enum_by_nr( type ) ); + +#define SET_FORMAT( r, gl ) \ + do { \ + ret = (r); \ + texFormat = &(gl); \ + } while (0) + +#define SET_FORMAT_32BPT( r32, gl32, r16, gl16 ) \ + do { \ + if ( do32bpt ) { \ + ret = (r32); \ + texFormat = &(gl32); \ + } else { \ + ret = (r16); \ + texFormat = &(gl16); \ + } \ + } while (0) + + switch ( texImage->IntFormat ) { + /* GH: Bias towards GL_RGB, GL_RGBA texture formats. This has + * got to be better than sticking them way down the end of this + * huge list. + */ + case GL_RGBA: + case 4: + if ( format == GL_BGRA ) { + if ( type == GL_UNSIGNED_INT_8_8_8_8_REV ) { + SET_FORMAT( TMC_tformat_tw32, _mesa_texformat_argb8888 ); + break; + } else if ( type == GL_UNSIGNED_SHORT_4_4_4_4_REV ) { + SET_FORMAT( TMC_tformat_tw12, _mesa_texformat_argb4444 ); + break; + } else if ( type == GL_UNSIGNED_SHORT_1_5_5_5_REV ) { + SET_FORMAT( TMC_tformat_tw15, _mesa_texformat_argb1555 ); + break; + } + } + SET_FORMAT_32BPT( TMC_tformat_tw32, _mesa_texformat_argb8888, + TMC_tformat_tw12, _mesa_texformat_argb4444 ); + break; + + case GL_RGB: + case 3: + if ( format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5 ) { + SET_FORMAT( TMC_tformat_tw16, _mesa_texformat_rgb565 ); + break; + } + SET_FORMAT_32BPT( TMC_tformat_tw32, _mesa_texformat_argb8888, + TMC_tformat_tw16, _mesa_texformat_rgb565 ); + break; + + /* GH: Okay, keep checking as normal. Still test for GL_RGB, + * GL_RGBA formats first. + */ + case GL_RGBA8: + case GL_RGB10_A2: + case GL_RGBA12: + case GL_RGBA16: + SET_FORMAT_32BPT( TMC_tformat_tw32, _mesa_texformat_argb8888, + TMC_tformat_tw12, _mesa_texformat_argb4444 ); + break; + + case GL_RGBA4: + case GL_RGBA2: + SET_FORMAT( TMC_tformat_tw12, _mesa_texformat_argb4444 ); + break; + + case GL_RGB5_A1: + SET_FORMAT( TMC_tformat_tw15, _mesa_texformat_argb1555 ); + break; + + case GL_RGB8: + case GL_RGB10: + case GL_RGB12: + case GL_RGB16: + SET_FORMAT_32BPT( TMC_tformat_tw32, _mesa_texformat_argb8888, + TMC_tformat_tw16, _mesa_texformat_rgb565 ); + break; + + case GL_RGB5: + case GL_RGB4: + case GL_R3_G3_B2: + SET_FORMAT( TMC_tformat_tw16, _mesa_texformat_rgb565 ); + break; + + case GL_ALPHA: + case GL_ALPHA4: + case GL_ALPHA8: + case GL_ALPHA12: + case GL_ALPHA16: + /* FIXME: This will report incorrect component sizes... */ + SET_FORMAT( TMC_tformat_tw12, _mesa_texformat_argb4444 ); + break; + + case 1: + case GL_LUMINANCE: + case GL_LUMINANCE4: + case GL_LUMINANCE8: + case GL_LUMINANCE12: + case GL_LUMINANCE16: + /* FIXME: This will report incorrect component sizes... */ + SET_FORMAT( TMC_tformat_tw16, _mesa_texformat_rgb565 ); + break; + + case 2: + case GL_LUMINANCE_ALPHA: + case GL_LUMINANCE4_ALPHA4: + case GL_LUMINANCE6_ALPHA2: + case GL_LUMINANCE8_ALPHA8: + case GL_LUMINANCE12_ALPHA4: + case GL_LUMINANCE12_ALPHA12: + case GL_LUMINANCE16_ALPHA16: + /* FIXME: This will report incorrect component sizes... */ + SET_FORMAT( TMC_tformat_tw12, _mesa_texformat_argb4444 ); + break; + case GL_INTENSITY: + case GL_INTENSITY4: + case GL_INTENSITY8: + case GL_INTENSITY12: + case GL_INTENSITY16: + /* FIXME: This will report incorrect component sizes... */ + SET_FORMAT( TMC_tformat_tw12, _mesa_texformat_argb4444 ); + break; + case GL_COLOR_INDEX: + case GL_COLOR_INDEX1_EXT: + case GL_COLOR_INDEX2_EXT: + case GL_COLOR_INDEX4_EXT: + case GL_COLOR_INDEX8_EXT: + case GL_COLOR_INDEX12_EXT: + case GL_COLOR_INDEX16_EXT: + SET_FORMAT( TMC_tformat_tw8, _mesa_texformat_ci8 ); + break; + default: + fprintf( stderr, "bad texture format in mgaChooseTexFormat() %d", + texImage->IntFormat ); + return -1; + } + texImage->TexFormat = texFormat; + return ret; +} /* @@ -157,64 +313,31 @@ * This will happen before drawing with a new texture, or drawing with a * texture after it was swapped out or teximaged again. */ -static void mgaCreateTexObj(mgaContextPtr mmesa, - struct gl_texture_object *tObj) +static void mgaCreateTexObj(mgaContextPtr mmesa, + struct gl_texture_object *tObj) { - const struct gl_texture_image *image = tObj->Image[ 0 ]; + const GLint baseLevel = tObj->BaseLevel; + struct gl_texture_image *image = tObj->Image[baseLevel]; mgaTextureObjectPtr t; int i, ofs; int LastLevel; int s, s2; - int textureFormat; - + int tformat; if (!image) return; - tObj->DriverData = t = CALLOC( sizeof( *t ) ); if (!t) { fprintf(stderr, "mgaCreateTexObj: Failed to malloc mgaTextureObject\n" ); return; } - switch( image->Format ) { - case GL_RGB: - case GL_LUMINANCE: - if ( image->IntFormat != GL_RGB5 && ( image->IntFormat == GL_RGB8 || - mmesa->default32BitTextures ) ) { - t->texelBytes = 4; - textureFormat = TMC_tformat_tw32; - } else { - t->texelBytes = 2; - textureFormat = TMC_tformat_tw16; - } - break; - case GL_ALPHA: - case GL_LUMINANCE_ALPHA: - case GL_INTENSITY: - case GL_RGBA: - if ( image->IntFormat != GL_RGBA4 && ( image->IntFormat == GL_RGBA8 || - mmesa->default32BitTextures ) ) { - t->texelBytes = 4; - textureFormat = TMC_tformat_tw32; - } else { - t->texelBytes = 2; - textureFormat = TMC_tformat_tw12; - } - break; - case GL_COLOR_INDEX: - textureFormat = TMC_tformat_tw8; - t->texelBytes = 1; - break; - default: - fprintf(stderr, "mgaCreateTexObj: bad image->Format %x/%s\n", - image->Format, - gl_lookup_enum_by_nr(image->Format)); - FREE( t ); - tObj->DriverData = 0; - return; - } - + /* FIXME: Use the real DD interface... + */ + tformat = mgaChooseTexFormat( mmesa, image, image->Format, + GL_UNSIGNED_BYTE ); + t->texelBytes = image->TexFormat->TexelBytes; + /* We are going to upload all levels that are present, even if * later levels wouldn't be used by the current filtering mode. This * allows the filtering mode to change without forcing another upload @@ -223,7 +346,7 @@ LastLevel = MGA_TEX_MAXLEVELS-1; ofs = 0; - for ( i = 0 ; i <= LastLevel ; i++ ) { + for ( i = 0 ; i <= LastLevel ; i++ ) { if ( !tObj->Image[i] ) { LastLevel = i - 1; break; @@ -232,11 +355,10 @@ t->offsets[i] = ofs; t->dirty_images |= (1<Image[i]->Width, 8 ) * - MAX2( tObj->Image[i]->Height, 8 ) * + ofs += ((MAX2( tObj->Image[i]->Width, 8 ) * + MAX2( tObj->Image[i]->Height, 8 ) * t->texelBytes) + 31) & ~31; } - t->totalSize = ofs; t->lastLevel = LastLevel; t->tObj = tObj; @@ -246,49 +368,47 @@ t->MemBlock = 0; insert_at_tail(&(mmesa->SwappedOut), t); - + + + /* setup hardware register values */ + t->setup.texctl = TMC_takey_1 | TMC_tamask_0 | tformat; - /* setup hardware register values */ - t->Setup[MGA_TEXREG_CTL] = (TMC_takey_1 | - TMC_tamask_0 | - textureFormat ); - - if (image->WidthLog2 >= 3) - t->Setup[MGA_TEXREG_CTL] |= ((image->WidthLog2 - 3) << TMC_tpitch_SHIFT); - else - t->Setup[MGA_TEXREG_CTL] |= (TMC_tpitchlin_enable | - (image->Width << TMC_tpitchext_SHIFT)); - - - t->Setup[MGA_TEXREG_CTL2] = TMC_ckstransdis_enable; - - if ( mmesa->glCtx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR ) - t->Setup[MGA_TEXREG_CTL2] |= TMC_specen_enable; - - - t->Setup[MGA_TEXREG_FILTER] = (TF_minfilter_nrst | - TF_magfilter_nrst | - TF_filteralpha_enable | - (0x10 << TF_fthres_SHIFT) | - (LastLevel << TF_mapnb_SHIFT)); - + if (image->WidthLog2 >= 3) + t->setup.texctl |= ((image->WidthLog2 - 3) << TMC_tpitch_SHIFT); + else + t->setup.texctl |= (TMC_tpitchlin_enable | + (image->Width << TMC_tpitchext_SHIFT)); + + + t->setup.texctl2 = TMC_ckstransdis_enable; + + if ( mmesa->glCtx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR ) + t->setup.texctl2 |= TMC_specen_enable; + + + t->setup.texfilter = (TF_minfilter_nrst | + TF_magfilter_nrst | + TF_filteralpha_enable | + (0x10 << TF_fthres_SHIFT) | + (LastLevel << TF_mapnb_SHIFT)); + /* warp texture registers */ ofs = MGA_IS_G200(mmesa) ? 28 : 11; s = image->Width; s2 = image->WidthLog2; - t->Setup[MGA_TEXREG_WIDTH] = (MGA_FIELD(TW_twmask, s - 1) | - MGA_FIELD(TW_rfw, (10 - s2 - 8) & 63 ) | - MGA_FIELD(TW_tw, (s2 + ofs ) | 0x40 )); + t->setup.texwidth = (MGA_FIELD(TW_twmask, s - 1) | + MGA_FIELD(TW_rfw, (10 - s2 - 8) & 63 ) | + MGA_FIELD(TW_tw, (s2 + ofs ) | 0x40 )); - + s = image->Height; s2 = image->HeightLog2; - t->Setup[MGA_TEXREG_HEIGHT] = (MGA_FIELD(TH_thmask, s - 1) | - MGA_FIELD(TH_rfh, (10 - s2 - 8) & 63 ) | - MGA_FIELD(TH_th, (s2 + ofs ) | 0x40 )); + t->setup.texheight = (MGA_FIELD(TH_thmask, s - 1) | + MGA_FIELD(TH_rfh, (10 - s2 - 8) & 63 ) | + MGA_FIELD(TH_th, (s2 + ofs ) | 0x40 )); - /* set all the register values for filtering, border, etc */ + /* set all the register values for filtering, border, etc */ mgaSetTexWrapping( t, tObj->WrapS, tObj->WrapT ); mgaSetTexFilter( t, tObj->MinFilter, tObj->MagFilter ); mgaSetTexBorderColor( t, tObj->BorderColor ); @@ -307,15 +427,18 @@ t = (mgaTextureObjectPtr)tObj->DriverData; + t->setup.texctl2 &= ~TMC_decalblend_enable; + switch (ctx->Texture.Unit[0].EnvMode) { case GL_REPLACE: - t->Setup[MGA_TEXREG_CTL] &= ~TMC_tmodulate_enable; + t->setup.texctl &= ~TMC_tmodulate_enable; break; case GL_MODULATE: - t->Setup[MGA_TEXREG_CTL] |= TMC_tmodulate_enable; + t->setup.texctl |= TMC_tmodulate_enable; break; case GL_DECAL: - t->Setup[MGA_TEXREG_CTL] &= ~TMC_tmodulate_enable; + t->setup.texctl &= ~TMC_tmodulate_enable; + t->setup.texctl2 |= TMC_decalblend_enable; break; case GL_BLEND: t->ctx->Fallback |= MGA_FALLBACK_TEXTURE; @@ -328,106 +451,201 @@ static void mgaUpdateTextureEnvG400( GLcontext *ctx, int unit ) { mgaContextPtr mmesa = MGA_CONTEXT( ctx ); - GLuint *reg = &mmesa->Setup[MGA_CTXREG_TDUAL0 + unit]; + GLuint *reg = ((GLuint *)&mmesa->setup.tdualstage0 + unit); GLuint source = mmesa->tmu_source[unit]; struct gl_texture_object *tObj = ctx->Texture.Unit[source].Current; + GLenum format; - if ( tObj != ctx->Texture.Unit[source].CurrentD[2] || - !tObj || - !tObj->Complete || - ((ctx->Enabled>>(source*4))&TEXTURE0_ANY) != TEXTURE0_2D ) + if ( tObj != ctx->Texture.Unit[source].CurrentD[2] || + !tObj || + !tObj->Complete || + ((ctx->Enabled>>(source*4))&TEXTURE0_ANY) != TEXTURE0_2D ) return; - + format = tObj->Image[tObj->BaseLevel]->Format; + switch (ctx->Texture.Unit[source].EnvMode) { case GL_REPLACE: - *reg = (TD0_color_sel_arg1 | - TD0_alpha_sel_arg1 ); + if (format == GL_RGB || format == GL_LUMINANCE) { + *reg = (TD0_color_sel_arg1 | + TD0_alpha_arg2_diffuse | + TD0_alpha_sel_arg2 ); + } + else if (format == GL_ALPHA) { + *reg = (TD0_color_sel_arg2 | + TD0_color_arg2_diffuse | + TD0_alpha_sel_arg1 ); + } + else { + *reg = (TD0_color_sel_arg1 | + TD0_alpha_sel_arg1 ); + } break; case GL_MODULATE: - if (unit == 0) + if (unit == 0) { *reg = ( TD0_color_arg2_diffuse | - TD0_color_sel_mul | + TD0_color_sel_mul | TD0_alpha_arg2_diffuse | TD0_alpha_sel_mul); - else + } + else { *reg = ( TD0_color_arg2_prevstage | TD0_color_alpha_prevstage | - TD0_color_sel_mul | + TD0_color_sel_mul | TD0_alpha_arg2_prevstage | TD0_alpha_sel_mul); + } break; case GL_DECAL: - if (tObj->Image[0]->Format == GL_RGB) - *reg = (TD0_color_sel_arg1 | - TD0_alpha_sel_arg1 ); - else if (unit == 0) - *reg = (TD0_color_arg2_diffuse | - TD0_color_alpha_currtex | - TD0_color_alpha2inv_enable | - TD0_color_arg2mul_alpha2 | - TD0_color_arg1mul_alpha1 | - TD0_color_add_add | - TD0_color_sel_add | - TD0_alpha_arg2_diffuse | - TD0_alpha_sel_arg2 ); - else - *reg = (TD0_color_arg2_prevstage | - TD0_color_alpha_currtex | - TD0_color_alpha2inv_enable | - TD0_color_arg2mul_alpha2 | - TD0_color_arg1mul_alpha1 | - TD0_color_add_add | - TD0_color_sel_add | - TD0_alpha_arg2_prevstage | - TD0_alpha_sel_arg2 ); - + if (format == GL_RGB) { + if (unit == 0) { + *reg = (TD0_color_sel_arg1 | + TD0_alpha_arg2_diffuse | + TD0_alpha_sel_arg2 ); + } + else { + *reg = (TD0_color_sel_arg1 | + TD0_alpha_arg2_prevstage | + TD0_alpha_sel_arg2 ); + } + } + else if ( format == GL_RGBA ) { +#if 0 + if (unit == 0) { + /* this doesn't work */ + *reg = (TD0_color_arg2_diffuse | + TD0_color_alpha_currtex | + TD0_color_alpha2inv_enable | + TD0_color_arg2mul_alpha2 | + TD0_color_arg1mul_alpha1 | + TD0_color_blend_enable | + TD0_color_arg1add_mulout | + TD0_color_arg2add_mulout | + TD0_color_add_add | + TD0_color_sel_mul | + TD0_alpha_arg2_diffuse | + TD0_alpha_sel_arg2 ); + } + else { + *reg = (TD0_color_arg2_prevstage | + TD0_color_alpha_currtex | + TD0_color_alpha2inv_enable | + TD0_color_arg2mul_alpha2 | + TD0_color_arg1mul_alpha1 | + TD0_color_add_add | + TD0_color_sel_add | + TD0_alpha_arg2_prevstage | + TD0_alpha_sel_arg2 ); + } +#else + /* s/w fallback, pretty sure we can't do in h/w */ + mmesa->Fallback |= MGA_FALLBACK_TEXTURE; + if ( MGA_DEBUG & DEBUG_VERBOSE_FALLBACK ) + fprintf( stderr, "FALLBACK: GL_DECAL RGBA texture, unit=%d\n", + unit ); +#endif + } + else { + if (unit == 0) { + *reg = ( TD0_color_arg2_diffuse | + TD0_color_sel_arg2 | + TD0_alpha_arg2_diffuse | + TD0_alpha_sel_arg2); + } + else { + *reg = ( TD0_color_arg2_prevstage | + TD0_color_sel_arg2 | + TD0_alpha_arg2_prevstage | + TD0_alpha_sel_arg2); + } + } break; case GL_ADD: - if (unit == 0) - *reg = ( TD0_color_arg2_diffuse | - TD0_color_add_add | - TD0_color_sel_add | - TD0_alpha_arg2_diffuse | - TD0_alpha_sel_add); - else - *reg = ( TD0_color_arg2_prevstage | - TD0_color_alpha_prevstage | - TD0_color_add_add | - TD0_color_sel_add | - TD0_alpha_arg2_prevstage | - TD0_alpha_sel_add); + if (unit == 0) { + if (format == GL_INTENSITY) + *reg = ( TD0_color_arg2_diffuse | + TD0_color_add_add | + TD0_color_sel_add | + TD0_alpha_arg2_diffuse | + TD0_alpha_add_enable | + TD0_alpha_sel_add); + else if (format == GL_ALPHA) + *reg = ( TD0_color_arg2_diffuse | + TD0_color_sel_mul | + TD0_alpha_arg2_diffuse | + TD0_alpha_sel_mul); + else + *reg = ( TD0_color_arg2_diffuse | + TD0_color_add_add | + TD0_color_sel_add | + TD0_alpha_arg2_diffuse | + TD0_alpha_sel_mul); + } + else { + if (format == GL_INTENSITY) { + *reg = ( TD0_color_arg2_prevstage | + TD0_color_add_add | + TD0_color_sel_add | + TD0_alpha_arg2_prevstage | + TD0_alpha_add_enable | + TD0_alpha_sel_add); + } + else if (format == GL_ALPHA) { + *reg = ( TD0_color_arg2_prevstage | + TD0_color_sel_mul | + TD0_alpha_arg2_prevstage | + TD0_alpha_sel_mul); + } + else { + *reg = ( TD0_color_arg2_prevstage | + TD0_color_alpha_prevstage | + TD0_color_add_add | + TD0_color_sel_add | + TD0_alpha_arg2_prevstage | + TD0_alpha_sel_mul); + } + } break; case GL_BLEND: - if (mmesa->blend_flags) - mmesa->Fallback |= MGA_FALLBACK_TEXTURE; - - /* Do singletexture GL_BLEND with 'all ones' env-color - * by using both texture units. Multitexture gl_blend - * is a fallback. - */ - if (unit == 0) { - /* Part 1: R1 = Rf ( 1 - Rt ) - * A1 = Af At - */ + if (format == GL_ALPHA) { *reg = ( TD0_color_arg2_diffuse | - TD0_color_arg1_inv_enable | - TD0_color_sel_mul | + TD0_color_sel_mul | TD0_alpha_arg2_diffuse | - TD0_alpha_sel_arg1); - } else { - /* Part 2: R2 = R1 + Rt - * A2 = A1 - */ - *reg = ( TD0_color_arg2_prevstage | - TD0_color_add_add | - TD0_color_sel_add | - TD0_alpha_arg2_prevstage | - TD0_alpha_sel_arg2); - } + TD0_alpha_sel_mul); + } + else { + mmesa->Fallback |= MGA_FALLBACK_TEXTURE; + if ( MGA_DEBUG & DEBUG_VERBOSE_FALLBACK ) + fprintf( stderr, "FALLBACK: GL_BLEND envcolor=0x%08x\n", + mmesa->envcolor ); + + /* Do singletexture GL_BLEND with 'all ones' env-color + * by using both texture units. Multitexture gl_blend + * is a fallback. + */ + if (unit == 0) { + /* Part 1: R1 = Rf ( 1 - Rt ) + * A1 = Af At + */ + *reg = ( TD0_color_arg2_diffuse | + TD0_color_arg1_inv_enable | + TD0_color_sel_mul | + TD0_alpha_arg2_diffuse | + TD0_alpha_sel_arg1); + } else { + /* Part 2: R2 = R1 + Rt + * A2 = A1 + */ + *reg = ( TD0_color_arg2_prevstage | + TD0_color_add_add | + TD0_color_sel_add | + TD0_alpha_arg2_prevstage | + TD0_alpha_sel_arg2); + } + } break; default: break; @@ -436,7 +654,7 @@ -static void mgaUpdateTextureObject( GLcontext *ctx, int unit ) +static void mgaUpdateTextureObject( GLcontext *ctx, int unit ) { mgaTextureObjectPtr t; struct gl_texture_object *tObj; @@ -449,13 +667,25 @@ tObj = ctx->Texture.Unit[source].Current; if (enabled != TEXTURE0_2D) { - if (enabled) + if (enabled) { mmesa->Fallback |= MGA_FALLBACK_TEXTURE; + if ( MGA_DEBUG & DEBUG_VERBOSE_FALLBACK ) + fprintf( stderr, "FALLBACK: tex enable != 2D\n" ); + } return; } if ( !tObj || tObj != ctx->Texture.Unit[source].CurrentD[2] ) { mmesa->Fallback |= MGA_FALLBACK_TEXTURE; + if ( MGA_DEBUG & DEBUG_VERBOSE_FALLBACK ) + fprintf( stderr, "FALLBACK: tObj != 2D texture\n" ); + return; + } + + if (tObj->Image[tObj->BaseLevel]->Border > 0) { + mmesa->Fallback |= MGA_FALLBACK_TEXTURE; + if ( MGA_DEBUG & DEBUG_VERBOSE_FALLBACK ) + fprintf( stderr, "FALLBACK: texture border\n" ); return; } @@ -466,13 +696,15 @@ mgaCreateTexObj( mmesa, tObj ); if ( !tObj->DriverData ) { mmesa->Fallback |= MGA_FALLBACK_TEXTURE; - return; + if ( MGA_DEBUG & DEBUG_VERBOSE_FALLBACK ) + fprintf( stderr, "FALLBACK: could not create texture object\n" ); + return; } } t = (mgaTextureObjectPtr)tObj->DriverData; - if (t->dirty_images) + if (t->dirty_images) mmesa->dirty |= (MGA_UPLOAD_TEX0IMAGE << unit); mmesa->CurrentTexObj[unit] = t; @@ -481,13 +713,13 @@ /* if (t->MemBlock) */ /* mgaUpdateTexLRU( mmesa, t ); */ - t->Setup[MGA_TEXREG_CTL2] &= ~TMC_dualtex_enable; - if (mmesa->multitex) - t->Setup[MGA_TEXREG_CTL2] |= TMC_dualtex_enable; + t->setup.texctl2 &= ~TMC_dualtex_enable; + if (mmesa->multitex) + t->setup.texctl2 |= TMC_dualtex_enable; - t->Setup[MGA_TEXREG_CTL2] &= ~TMC_specen_enable; + t->setup.texctl2 &= ~TMC_specen_enable; if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) - t->Setup[MGA_TEXREG_CTL2] |= TMC_specen_enable; + t->setup.texctl2 |= TMC_specen_enable; } @@ -509,45 +741,45 @@ if (mmesa->CurrentTexObj[1]) { mmesa->CurrentTexObj[1]->bound = 0; - mmesa->CurrentTexObj[1] = 0; + mmesa->CurrentTexObj[1] = 0; } if (MGA_IS_G400(mmesa)) { - mgaUpdateTextureObject( ctx, 0 ); + mgaUpdateTextureObject( ctx, 0 ); mgaUpdateTextureEnvG400( ctx, 0 ); - mmesa->Setup[MGA_CTXREG_TDUAL1] = mmesa->Setup[MGA_CTXREG_TDUAL0]; + mmesa->setup.tdualstage1 = mmesa->setup.tdualstage0; if (mmesa->multitex || 1) { - mgaUpdateTextureObject( ctx, 1 ); + mgaUpdateTextureObject( ctx, 1 ); mgaUpdateTextureEnvG400( ctx, 1 ); - } + } /* else */ /* mmesa->Setup[MGA_CTXREG_TDUAL1] = ( TD0_color_arg2_prevstage | */ /* TD0_color_sel_arg2 | */ /* TD0_alpha_arg2_prevstage | */ /* TD0_alpha_sel_arg2); */ + - mmesa->dirty |= MGA_UPLOAD_TEX1; } else { mgaUpdateTextureObject( ctx, 0 ); - mgaUpdateTextureEnvG200( ctx ); + mgaUpdateTextureEnvG200( ctx ); } - mmesa->dirty |= MGA_UPLOAD_CTX | MGA_UPLOAD_TEX0; + mmesa->dirty |= MGA_UPLOAD_CONTEXT | MGA_UPLOAD_TEX0; - mmesa->Setup[MGA_CTXREG_DWGCTL] &= DC_opcod_MASK; - mmesa->Setup[MGA_CTXREG_DWGCTL] |= (ctx->Texture.ReallyEnabled - ? DC_opcod_texture_trap - : DC_opcod_trap); + mmesa->setup.dwgctl &= DC_opcod_MASK; + mmesa->setup.dwgctl |= (ctx->Texture.ReallyEnabled + ? DC_opcod_texture_trap + : DC_opcod_trap); } -static void mgaDDTexEnv( GLcontext *ctx, GLenum target, - GLenum pname, const GLfloat *param ) +static void mgaDDTexEnv( GLcontext *ctx, GLenum target, + GLenum pname, const GLfloat *param ) { mgaContextPtr mmesa = MGA_CONTEXT(ctx); @@ -555,31 +787,31 @@ if (pname == GL_TEXTURE_ENV_MODE) { /* force the texture state to be updated */ FLUSH_BATCH( MGA_CONTEXT(ctx) ); - MGA_CONTEXT(ctx)->new_state |= (MGA_NEW_TEXTURE | + MGA_CONTEXT(ctx)->new_state |= (MGA_NEW_TEXTURE | MGA_NEW_ALPHA); } else if (pname == GL_TEXTURE_ENV_COLOR) { - struct gl_texture_unit *texUnit = + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; GLfloat *fc = texUnit->EnvColor; GLubyte c[4]; GLuint col; - + COPY_4V(c, fc); col = mgaPackColor( mmesa->mgaScreen->cpp, c[0], c[1], c[2], c[3] ); - mmesa->envcolor = (c[3]<<24) | (c[0]<<16) | (c[1]<<8) | (c[2]); - - if (mmesa->Setup[MGA_CTXREG_FCOL] != col) { - FLUSH_BATCH(mmesa); - mmesa->Setup[MGA_CTXREG_FCOL] = col; - mmesa->dirty |= MGA_UPLOAD_CTX; + mmesa->envcolor = (c[3]<<24) | (c[0]<<16) | (c[1]<<8) | (c[2]); + + if (mmesa->setup.fcol != col) { + FLUSH_BATCH(mmesa); + mmesa->setup.fcol = col; + mmesa->dirty |= MGA_UPLOAD_CONTEXT; mmesa->blend_flags &= ~MGA_BLEND_ENV_COLOR; /* Actually just require all four components to be * equal. This permits a single-pass GL_BLEND. - * + * * More complex multitexture/multipass fallbacks * for blend can be done later. */ @@ -593,13 +825,16 @@ static void mgaDDTexImage( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLint level, GLint internalFormat, - const struct gl_texture_image *image ) + const struct gl_texture_image *image ) { - mgaContextPtr mmesa = MGA_CONTEXT( ctx ); + mgaContextPtr mmesa = MGA_CONTEXT( ctx ); mgaTextureObjectPtr t; + GLint tformat; + /* hack: cast-away const */ + struct gl_texture_image *img = (struct gl_texture_image *) image; /* just free the mga texture if it exists, it will be recreated at - mgaUpdateTextureState time. */ + mgaUpdateTextureState time. */ t = (mgaTextureObjectPtr) tObj->DriverData; if ( t ) { if (t->bound) FLUSH_BATCH(mmesa); @@ -608,10 +843,13 @@ mmesa->new_state |= MGA_NEW_TEXTURE; } + tformat = mgaChooseTexFormat( mmesa, img, img->Format, + GL_UNSIGNED_BYTE ); + if (0) fprintf(stderr, "mgaDDTexImage tObj %p, level %d, image %p\n", tObj, level, image); - + } static void mgaDDTexSubImage( GLcontext *ctx, GLenum target, @@ -619,7 +857,7 @@ GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLint internalFormat, - const struct gl_texture_image *image ) + const struct gl_texture_image *image ) { mgaContextPtr mmesa = MGA_CONTEXT( ctx ); mgaTextureObjectPtr t; @@ -628,7 +866,7 @@ /* just free the mga texture if it exists, it will be recreated at - mgaUpdateTextureState time. */ + mgaUpdateTextureState time. */ t = (mgaTextureObjectPtr) tObj->DriverData; if ( t ) { if (t->bound) FLUSH_BATCH(mmesa); @@ -652,7 +890,7 @@ * This just changes variables and flags for a state update, which * will happen at the next mgaUpdateTextureState */ -static void +static void mgaDDTexParameter( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLenum pname, const GLfloat *params ) @@ -681,7 +919,7 @@ FLUSH_BATCH(mmesa); mgaSetTexWrapping(t,tObj->WrapS,tObj->WrapT); break; - + case GL_TEXTURE_BORDER_COLOR: FLUSH_BATCH(mmesa); mgaSetTexBorderColor(t,tObj->BorderColor); @@ -695,9 +933,9 @@ } -static void +static void mgaDDBindTexture( GLcontext *ctx, GLenum target, - struct gl_texture_object *tObj ) + struct gl_texture_object *tObj ) { mgaContextPtr mmesa = MGA_CONTEXT( ctx ); int unit = ctx->Texture.CurrentUnit; @@ -706,17 +944,17 @@ if (mmesa->CurrentTexObj[unit]) { mmesa->CurrentTexObj[unit]->bound &= ~(unit+1); - mmesa->CurrentTexObj[unit] = 0; + mmesa->CurrentTexObj[unit] = 0; } - /* force the texture state to be updated + /* force the texture state to be updated */ MGA_CONTEXT(ctx)->new_state |= MGA_NEW_TEXTURE; } -static void -mgaDDDeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj ) +static void +mgaDDDeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj ) { mgaContextPtr mmesa = MGA_CONTEXT( ctx ); mgaTextureObjectPtr t = (mgaTextureObjectPtr)tObj->DriverData; @@ -735,15 +973,15 @@ } -static GLboolean -mgaDDIsTextureResident( GLcontext *ctx, struct gl_texture_object *t ) +static GLboolean +mgaDDIsTextureResident( GLcontext *ctx, struct gl_texture_object *t ) { mgaTextureObjectPtr mt = (mgaTextureObjectPtr)t->DriverData; return mt && mt->MemBlock; } -void +void mgaDDInitTextureFuncs( GLcontext *ctx ) { ctx->Driver.TexEnv = mgaDDTexEnv; Index: xc/lib/GL/mesa/src/drv/mga/mgatex.h diff -u xc/lib/GL/mesa/src/drv/mga/mgatex.h:1.4 xc/lib/GL/mesa/src/drv/mga/mgatex.h:1.6 --- xc/lib/GL/mesa/src/drv/mga/mgatex.h:1.4 Sun Sep 24 09:51:07 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgatex.h Tue Apr 10 12:07:51 2001 @@ -1,30 +1,30 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatex.h,v 1.6 2001/04/10 16:07:51 dawes Exp $ */ /* - * GLX Hardware Device Driver for Matrox Millenium G200 - * Copyright (C) 1999 Wittawat Yamwong + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. * - * - * John Carmack - * Keith Whitwell + * Authors: + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatex.h,v 1.4 2000/09/24 13:51:07 alanh Exp $ */ #ifndef MGATEX_INC #define MGATEX_INC @@ -40,14 +40,15 @@ */ void mgaUpdateTextureState( GLcontext *ctx ); - -/* Driver functions which are called directly from mesa */ - void mgaConvertTexture( GLuint *dest, int texelBytes, struct gl_texture_image *image, int x, int y, int width, int height ); +void mgaUploadSubImageLocked( mgaContextPtr mmesa, + mgaTextureObjectPtr t, + int level, + int x, int y, int width, int height ); int mgaUploadTexImages( mgaContextPtr mmesa, mgaTextureObjectPtr t ); Index: xc/lib/GL/mesa/src/drv/mga/mgatexcnv.c diff -u xc/lib/GL/mesa/src/drv/mga/mgatexcnv.c:1.1 xc/lib/GL/mesa/src/drv/mga/mgatexcnv.c:1.2 --- xc/lib/GL/mesa/src/drv/mga/mgatexcnv.c:1.1 Sun Sep 24 09:51:08 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgatexcnv.c Tue Apr 10 12:07:51 2001 @@ -1,32 +1,31 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatexcnv.c,v 1.1 2000/09/24 13:51:08 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatexcnv.c,v 1.2 2001/04/10 16:07:51 dawes Exp $ */ /* - * GLX Hardware Device Driver for Matrox Millenium G200 - * Copyright (C) 1999 Wittawat Yamwong + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. * - * - * original by Wittawat Yamwong - * 9/20/99 rewrite by John Carmack + * Authors: + * Keith Whitwell */ - #include #include @@ -44,18 +43,18 @@ * for an 8x8 texture. This happens when we have to crutch the pitch * limits of the mga by uploading a block of texels as a single line. */ -void mgaConvertTexture( GLuint *destPtr, int texelBytes, +void mgaConvertTexture( GLuint *destPtr, int texelBytes, struct gl_texture_image *image, - int x, int y, int width, int height ) + int x, int y, int width, int height ) { register int i, j; GLubyte *src; int stride; - + if (0) fprintf(stderr, "texture image %p\n", image->Data); - - if (image->Data == 0) + + if (image->Data == 0) return; /* FIXME: g400 luminance_alpha internal format */ @@ -70,7 +69,7 @@ stride = (image->Width - width); for ( i = height ; i ; i-- ) { for ( j = width >> 2 ; j ; j-- ) { - + *destPtr++ = src[0] | ( src[1] << 8 ) | ( src[2] << 16 ) | ( src[3] << 24 ); src += 4; } @@ -88,8 +87,8 @@ stride = (image->Width - width) * 3; for ( i = height ; i ; i-- ) { for ( j = width >> 1 ; j ; j-- ) { - - *destPtr++ = MGAPACKCOLOR565(src[0],src[1],src[2]) | + + *destPtr++ = MGAPACKCOLOR565(src[0],src[1],src[2]) | ( MGAPACKCOLOR565(src[3],src[4],src[5]) << 16 ); src += 6; } @@ -101,8 +100,8 @@ stride = (image->Width - width) * 4; for ( i = height ; i ; i-- ) { for ( j = width >> 1 ; j ; j-- ) { - - *destPtr++ = MGAPACKCOLOR4444(src[0],src[1],src[2],src[3]) | + + *destPtr++ = MGAPACKCOLOR4444(src[0],src[1],src[2],src[3]) | ( MGAPACKCOLOR4444(src[4],src[5],src[6],src[7]) << 16 ); src += 8; } @@ -115,7 +114,7 @@ for ( i = height ; i ; i-- ) { for ( j = width >> 1 ; j ; j-- ) { /* FIXME: should probably use 555 texture to get true grey */ - *destPtr++ = MGAPACKCOLOR565(src[0],src[0],src[0]) | + *destPtr++ = MGAPACKCOLOR565(src[0],src[0],src[0]) | ( MGAPACKCOLOR565(src[1],src[1],src[1]) << 16 ); src += 2; } @@ -127,8 +126,8 @@ stride = (image->Width - width); for ( i = height ; i ; i-- ) { for ( j = width >> 1 ; j ; j-- ) { - - *destPtr++ = MGAPACKCOLOR4444(src[0],src[0],src[0],src[0]) | + + *destPtr++ = MGAPACKCOLOR4444(src[0],src[0],src[0],src[0]) | ( MGAPACKCOLOR4444(src[1],src[1],src[1],src[1]) << 16 ); src += 2; } @@ -140,8 +139,8 @@ stride = (image->Width - width); for ( i = height ; i ; i-- ) { for ( j = width >> 1 ; j ; j-- ) { - - *destPtr++ = MGAPACKCOLOR4444(255,255,255,src[0]) | + + *destPtr++ = MGAPACKCOLOR4444(255,255,255,src[0]) | ( MGAPACKCOLOR4444(255,255,255,src[1]) << 16 ); src += 2; } @@ -153,8 +152,8 @@ stride = (image->Width - width) * 2; for ( i = height ; i ; i-- ) { for ( j = width >> 1 ; j ; j-- ) { - - *destPtr++ = MGAPACKCOLOR4444(src[0],src[0],src[0],src[1]) | + + *destPtr++ = MGAPACKCOLOR4444(src[0],src[0],src[0],src[1]) | ( MGAPACKCOLOR4444(src[2],src[2],src[2],src[3]) << 16 ); src += 4; } @@ -172,7 +171,7 @@ stride = (image->Width - width) * 3; for ( i = height ; i ; i-- ) { for ( j = width ; j ; j-- ) { - + *destPtr++ = MGAPACKCOLOR8888(src[0],src[1],src[2], 255); src += 3; } @@ -184,7 +183,7 @@ stride = (image->Width - width) * 4; for ( i = height ; i ; i-- ) { for ( j = width ; j ; j-- ) { - + *destPtr++ = MGAPACKCOLOR8888(src[0],src[1],src[2],src[3]); src += 4; } @@ -196,7 +195,7 @@ stride = (image->Width - width); for ( i = height ; i ; i-- ) { for ( j = width ; j ; j-- ) { - + *destPtr++ = MGAPACKCOLOR8888(src[0],src[0],src[0], 255); src += 1; } @@ -208,7 +207,7 @@ stride = (image->Width - width); for ( i = height ; i ; i-- ) { for ( j = width ; j ; j-- ) { - + *destPtr++ = MGAPACKCOLOR8888(src[0],src[0],src[0],src[0]); src += 1; } @@ -220,7 +219,7 @@ stride = (image->Width - width); for ( i = height ; i ; i-- ) { for ( j = width ; j ; j-- ) { - + *destPtr++ = MGAPACKCOLOR8888(255,255,255,src[0]); src += 1; } @@ -232,7 +231,7 @@ stride = (image->Width - width) * 2; for ( i = height ; i ; i-- ) { for ( j = width ; j ; j-- ) { - + *destPtr++ = MGAPACKCOLOR8888(src[0],src[0], src[0],src[1]); src += 2; @@ -252,6 +251,6 @@ format_error: - fprintf(stderr, "Unsupported texelBytes %i, image->Format %i\n", + fprintf(stderr, "Unsupported texelBytes %i, image->Format %i\n", (int)texelBytes, (int)image->Format ); } Index: xc/lib/GL/mesa/src/drv/mga/mgatexmem.c diff -u xc/lib/GL/mesa/src/drv/mga/mgatexmem.c:1.1 xc/lib/GL/mesa/src/drv/mga/mgatexmem.c:1.4 --- xc/lib/GL/mesa/src/drv/mga/mgatexmem.c:1.1 Sun Sep 24 09:51:08 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgatexmem.c Tue Apr 10 12:07:51 2001 @@ -1,4 +1,30 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatexmem.c,v 1.1 2000/09/24 13:51:08 alanh Exp $ */ +/* + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatexmem.c,v 1.4 2001/04/10 16:07:51 dawes Exp $ */ #include #include @@ -13,12 +39,12 @@ #include "mem.h" #include "simple_list.h" -static void +static void mgaSwapOutTexObj(mgaContextPtr mmesa, mgaTextureObjectPtr t) { if (t->MemBlock) { mmFreeMem(t->MemBlock); - t->MemBlock = 0; + t->MemBlock = 0; if (t->age > mmesa->dirtyAge) mmesa->dirtyAge = t->age; @@ -28,8 +54,8 @@ move_to_tail(&(mmesa->SwappedOut), t); } -static void -mgaPrintLocalLRU( mgaContextPtr mmesa, int heap ) +static void +mgaPrintLocalLRU( mgaContextPtr mmesa, int heap ) { mgaTextureObjectPtr t; int sz = 1 << (mmesa->mgaScreen->logTextureGranularity[heap]); @@ -38,12 +64,12 @@ foreach( t, &(mmesa->TexObjList[heap]) ) { if (!t->tObj) - fprintf(stderr, "Placeholder %d at %x sz %x\n", + fprintf(stderr, "Placeholder %d at %x sz %x\n", t->MemBlock->ofs / sz, t->MemBlock->ofs, - t->MemBlock->size); + t->MemBlock->size); else - fprintf(stderr, "Texture (bound %d) at %x sz %x\n", + fprintf(stderr, "Texture (bound %d) at %x sz %x\n", t->bound, t->MemBlock->ofs, t->MemBlock->size); @@ -52,11 +78,11 @@ fprintf(stderr, "\n\n"); } -static void +static void mgaPrintGlobalLRU( mgaContextPtr mmesa, int heap ) { int i, j; - drm_mga_tex_region_t *list = mmesa->sarea->texList[heap]; + drmTextureRegion *list = mmesa->sarea->texList[heap]; fprintf(stderr, "\nGlobal LRU, heap %d list %p:\n", heap, list); @@ -66,7 +92,7 @@ j = list[j].next; if (j == MGA_NR_TEX_REGIONS) break; } - + if (j != MGA_NR_TEX_REGIONS) { fprintf(stderr, "Loop detected in global LRU\n\n\n"); for (i = 0 ; i < MGA_NR_TEX_REGIONS ; i++) { @@ -74,14 +100,14 @@ i, list[i].age, list[i].next, list[i].prev); } } - + fprintf(stderr, "\n\n"); } static void mgaResetGlobalLRU( mgaContextPtr mmesa, GLuint heap ) { - drm_mga_tex_region_t *list = mmesa->sarea->texList[heap]; + drmTextureRegion *list = mmesa->sarea->texList[heap]; int sz = 1 << mmesa->mgaScreen->logTextureGranularity[heap]; int i; @@ -93,12 +119,12 @@ * in the array (MGA_NR_TEX_REGIONS) is the sentinal. Keeping it * at the end of the array allows it to be addressed rationally * when looking up objects at a particular location in texture - * memory. + * memory. */ for (i = 0 ; (i+1) * sz <= mmesa->mgaScreen->textureSize[heap] ; i++) { list[i].prev = i-1; list[i].next = i+1; - list[i].age = mmesa->sarea->texAge[heap]; + list[i].age = mmesa->sarea->texAge[heap]; } i--; @@ -111,15 +137,15 @@ } -static void mgaUpdateTexLRU( mgaContextPtr mmesa, mgaTextureObjectPtr t ) +static void mgaUpdateTexLRU( mgaContextPtr mmesa, mgaTextureObjectPtr t ) { int i; int heap = t->heap; int logsz = mmesa->mgaScreen->logTextureGranularity[heap]; int start = t->MemBlock->ofs >> logsz; int end = (t->MemBlock->ofs + t->MemBlock->size - 1) >> logsz; - drm_mga_tex_region_t *list = mmesa->sarea->texList[heap]; - + drmTextureRegion *list = mmesa->sarea->texList[heap]; + mmesa->texAge[heap] = ++mmesa->sarea->texAge[heap]; if (!t->MemBlock) { @@ -147,7 +173,7 @@ */ list[(unsigned)list[i].next].prev = list[i].prev; list[(unsigned)list[i].prev].next = list[i].next; - + /* insert_at_head(list, i) */ list[i].prev = MGA_NR_TEX_REGIONS; @@ -166,14 +192,14 @@ * since we last held the lock. * * Figures out which of our textures have been ejected by other clients, - * and pushes a placeholder texture onto the LRU list to represent - * the other client's textures. + * and pushes a placeholder texture onto the LRU list to represent + * the other client's textures. */ static void mgaTexturesGone( mgaContextPtr mmesa, GLuint heap, - GLuint offset, + GLuint offset, GLuint size, - GLuint in_use ) + GLuint in_use ) { mgaTextureObjectPtr t, tmp; @@ -191,19 +217,19 @@ /* It overlaps - kick it off. Need to hold onto the currently bound * objects, however. */ - if (t->bound) + if (t->bound) mgaSwapOutTexObj( mmesa, t ); else mgaDestroyTexObj( mmesa, t ); } - + if (in_use) { t = (mgaTextureObjectPtr) CALLOC(sizeof(*t)); if (!t) return; t->heap = heap; - t->MemBlock = mmAllocMem( mmesa->texHeap[heap], size, 0, offset); + t->MemBlock = mmAllocMem( mmesa->texHeap[heap], size, 0, offset); if (!t->MemBlock) { fprintf(stderr, "Couldn't alloc placeholder sz %x ofs %x\n", (int)size, (int)offset); @@ -217,15 +243,15 @@ void mgaAgeTextures( mgaContextPtr mmesa, int heap ) { - drm_mga_sarea_t *sarea = mmesa->sarea; + MGASAREAPrivPtr sarea = mmesa->sarea; int sz = 1 << (mmesa->mgaScreen->logTextureGranularity[heap]); int idx, nr = 0; /* Have to go right round from the back to ensure stuff ends up * LRU in our local list... Fix with a cursor pointer. */ - for (idx = sarea->texList[heap][MGA_NR_TEX_REGIONS].prev ; - idx != MGA_NR_TEX_REGIONS && nr < MGA_NR_TEX_REGIONS ; + for (idx = sarea->texList[heap][MGA_NR_TEX_REGIONS].prev ; + idx != MGA_NR_TEX_REGIONS && nr < MGA_NR_TEX_REGIONS ; idx = sarea->texList[heap][idx].prev, nr++) { if (sarea->texList[heap][idx].age > mmesa->texAge[heap]) { @@ -238,8 +264,8 @@ mmesa->mgaScreen->textureSize[heap], 0); mgaResetGlobalLRU( mmesa, heap ); } + - if (0) { mgaPrintGlobalLRU( mmesa, heap ); mgaPrintLocalLRU( mmesa, heap ); @@ -257,10 +283,10 @@ * * Performed with the hardware lock held. */ -static void mgaUploadSubImageLocked( mgaContextPtr mmesa, - mgaTextureObjectPtr t, - int level, - int x, int y, int width, int height ) +void mgaUploadSubImageLocked( mgaContextPtr mmesa, + mgaTextureObjectPtr t, + int level, + int x, int y, int width, int height ) { int x2; int dwords; @@ -268,7 +294,7 @@ struct gl_texture_image *image; int texelBytes, texelsPerDword, texelMaccess, length; - if ( level < 0 || level >= MGA_TEX_MAXLEVELS ) + if ( level < 0 || level >= MGA_TEX_MAXLEVELS ) return; image = t->tObj->Image[level]; @@ -280,14 +306,14 @@ t->tObj, level); return; } - - + + /* find the proper destination offset for this level */ - offset = (t->MemBlock->ofs + + offset = (t->MemBlock->ofs + t->offsets[level]); - texelBytes = t->texelBytes; + texelBytes = t->texelBytes; switch( texelBytes ) { case 1: texelsPerDword = 4; @@ -304,8 +330,8 @@ default: return; } - - + + /* We can't do a subimage update if pitch is < 32 texels due * to hardware XY addressing limits, so we will need to * linearly upload all modified rows. @@ -317,7 +343,7 @@ /* Assume that 1x1 textures aren't going to cause a * bus error if we read up to four texels from that - * location: + * location: */ /* if ( width < texelsPerDword ) { */ /* width = texelsPerDword; */ @@ -327,7 +353,7 @@ to the entire image, so we can safely reference outside the x,y,width,height bounds if we need to */ x2 = x + width; - x2 = (x2 + (texelsPerDword-1)) & ~(texelsPerDword-1); + x2 = (x2 + (texelsPerDword-1)) & ~(texelsPerDword-1); x = (x + (texelsPerDword-1)) & ~(texelsPerDword-1); width = x2 - x; } @@ -337,37 +363,37 @@ Recursively split it up. */ while ( 1 ) { dwords = height * width / texelsPerDword; - if ( dwords * 4 <= MGA_DMA_BUF_SZ ) { + if ( dwords * 4 <= MGA_BUFFER_SIZE ) { break; } - mgaUploadSubImageLocked( mmesa, t, level, x, y, + mgaUploadSubImageLocked( mmesa, t, level, x, y, width, height >> 1 ); y += ( height >> 1 ); height -= ( height >> 1 ); } - + length = dwords * 4; /* Fill in the secondary buffer with properly converted texels * from the mesa buffer. */ if(t->heap == MGA_CARD_HEAP) { mgaGetILoadBufferLocked( mmesa ); - mgaConvertTexture( (GLuint *)mmesa->iload_buffer->address, - texelBytes, image, x, y, width, height ); + mgaConvertTexture( (GLuint *)mmesa->iload_buffer->address, + texelBytes, image, x, y, width, height ); if(length < 64) length = 64; if (0) fprintf(stderr, "TexelBytes : %d, offset: %d, length : %d\n", texelBytes, mmesa->mgaScreen->textureOffset[t->heap] + - offset + + offset + y * width * 4/texelsPerDword, length); - - mgaFireILoadLocked( mmesa, + + mgaFireILoadLocked( mmesa, mmesa->mgaScreen->textureOffset[t->heap] + - offset + + offset + y * width * 4/texelsPerDword, length); } else { @@ -375,25 +401,24 @@ * additional synchronization with the dma stream. */ mgaConvertTexture( (GLuint *) - (mmesa->mgaScreen->texVirtual[t->heap] + - offset + - y * width * 4/texelsPerDword), - texelBytes, image, x, y, width, height ); + (mmesa->mgaScreen->texVirtual[t->heap] + + offset + + y * width * 4/texelsPerDword), + texelBytes, image, x, y, width, height ); } } -static void mgaUploadTexLevel( mgaContextPtr mmesa, +static void mgaUploadTexLevel( mgaContextPtr mmesa, mgaTextureObjectPtr t, int l ) { -/* return; */ - mgaUploadSubImageLocked( mmesa, - t, - l, - 0, 0, - t->tObj->Image[l]->Width, - t->tObj->Image[l]->Height); + mgaUploadSubImageLocked( mmesa, + t, + l, + 0, 0, + t->tObj->Image[l]->Width, + t->tObj->Image[l]->Height); } @@ -428,53 +453,51 @@ { mgaTextureObjectPtr tmp = mmesa->TexObjList[heap].prev; - t->MemBlock = mmAllocMem( mmesa->texHeap[heap], + t->MemBlock = mmAllocMem( mmesa->texHeap[heap], t->totalSize, - 6, 0 ); + 6, 0 ); if (t->MemBlock) break; if (mmesa->TexObjList[heap].prev->bound) { - fprintf(stderr, - "Hit bound texture in upload\n"); + fprintf(stderr, "Hit bound texture in upload\n"); return -1; } - if (mmesa->TexObjList[heap].prev == - &(mmesa->TexObjList[heap])) + if (mmesa->TexObjList[heap].prev == + &(mmesa->TexObjList[heap])) { - fprintf(stderr, "Failed to upload texture, " - "sz %d\n", t->totalSize); + fprintf(stderr, "Failed to upload texture, sz %d\n", t->totalSize); mmDumpMemInfo( mmesa->texHeap[heap] ); return -1; } - + mgaDestroyTexObj( mmesa, tmp ); } - - ofs = t->MemBlock->ofs + + ofs = t->MemBlock->ofs + mmesa->mgaScreen->textureOffset[heap] ; - t->Setup[MGA_TEXREG_ORG] = ofs; - t->Setup[MGA_TEXREG_ORG1] = ofs + t->offsets[1]; - t->Setup[MGA_TEXREG_ORG2] = ofs + t->offsets[2]; - t->Setup[MGA_TEXREG_ORG3] = ofs + t->offsets[3]; - t->Setup[MGA_TEXREG_ORG4] = ofs + t->offsets[4]; + t->setup.texorg = ofs; + t->setup.texorg1 = ofs + t->offsets[1]; + t->setup.texorg2 = ofs + t->offsets[2]; + t->setup.texorg3 = ofs + t->offsets[3]; + t->setup.texorg4 = ofs + t->offsets[4]; - mmesa->dirty |= MGA_UPLOAD_CTX; + mmesa->dirty |= MGA_UPLOAD_CONTEXT; } /* Let the world know we've used this memory recently. */ mgaUpdateTexLRU( mmesa, t ); + - if (MGA_DEBUG&DEBUG_VERBOSE_LRU) fprintf(stderr, "dispatch age: %d age freed memory: %d\n", GET_DISPATCH_AGE(mmesa), mmesa->dirtyAge); - if (mmesa->dirtyAge >= GET_DISPATCH_AGE(mmesa)) + if (mmesa->dirtyAge >= GET_DISPATCH_AGE(mmesa)) mgaWaitAgeLocked( mmesa, mmesa->dirtyAge ); if (t->dirty_images) { @@ -482,7 +505,7 @@ fprintf(stderr, "*"); for (i = 0 ; i <= t->lastLevel ; i++) - if (t->dirty_images & (1<dirty_images & (1< + * Authors: + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatris.c,v 1.5 2000/09/24 13:51:08 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatris.c,v 1.8 2001/04/10 16:07:51 dawes Exp $ */ #include #include @@ -38,25 +39,6 @@ #include "mgavb.h" -static void mga_null_quad( GLcontext *ctx, GLuint v0, - GLuint v1, GLuint v2, GLuint v3, GLuint pv ) -{ -} - -static void mga_null_triangle( GLcontext *ctx, GLuint v0, - GLuint v1, GLuint v2, GLuint pv ) -{ -} - -static void mga_null_line( GLcontext *ctx, GLuint v1, GLuint v2, GLuint pv ) -{ -} - -static void mga_null_points( GLcontext *ctx, GLuint first, GLuint last ) -{ -} - - #define MGA_COLOR(to, from) { \ (to)[0] = (from)[2]; \ (to)[1] = (from)[1]; \ @@ -64,11 +46,17 @@ (to)[3] = (from)[3]; \ } +#define MGA_COLOR3(to, from) { \ + (to)[0] = (from)[2]; \ + (to)[1] = (from)[1]; \ + (to)[2] = (from)[0]; \ +} + -static triangle_func tri_tab[0x10]; -static quad_func quad_tab[0x10]; -static line_func line_tab[0x10]; +static triangle_func tri_tab[0x10]; +static quad_func quad_tab[0x10]; +static line_func line_tab[0x10]; static points_func points_tab[0x10]; #define IND (0) @@ -106,9 +94,6 @@ void mgaDDTrifuncInit() { - int i; - - init(); init_flat(); init_offset(); @@ -117,24 +102,16 @@ init_twoside_flat(); init_twoside_offset(); init_twoside_offset_flat(); - - for (i = 0 ; i < 0x20 ; i++) - if (i & MGA_NODRAW_BIT) { - quad_tab[i] = mga_null_quad; - tri_tab[i] = mga_null_triangle; - line_tab[i] = mga_null_line; - points_tab[i] = mga_null_points; - } } -#define ALL_FALLBACK (DD_MULTIDRAW | DD_SELECT | DD_FEEDBACK) +#define ALL_FALLBACK (DD_SELECT | DD_FEEDBACK) #define POINT_FALLBACK (ALL_FALLBACK | DD_POINT_SMOOTH) #define LINE_FALLBACK (ALL_FALLBACK | DD_LINE_SMOOTH | DD_LINE_STIPPLE) #define TRI_FALLBACK (ALL_FALLBACK | DD_TRI_SMOOTH | DD_TRI_UNFILLED) #define ANY_FALLBACK (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK|DD_TRI_STIPPLE) -#define ANY_RASTER_FLAGS (DD_FLATSHADE|DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_Z_NEVER) +#define ANY_RASTER_FLAGS (DD_FLATSHADE|DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET) /* Setup the Point, Line, Triangle and Quad functions based on the current rendering state. Wherever possible, use the hardware to @@ -147,16 +124,18 @@ if (mmesa->Fallback) { mmesa->renderindex = MGA_FALLBACK_BIT; + if (flags & DD_TRI_LIGHT_TWOSIDE) { + mmesa->IndirectTriangles = DD_TRI_LIGHT_TWOSIDE; + } return; } if (flags & ANY_RASTER_FLAGS) { if (flags & DD_FLATSHADE) index |= MGA_FLAT_BIT; if (flags & DD_TRI_LIGHT_TWOSIDE) index |= MGA_TWOSIDE_BIT; - if (flags & DD_TRI_OFFSET) index |= MGA_OFFSET_BIT; - if (flags & DD_Z_NEVER) index |= MGA_NODRAW_BIT; + if (flags & DD_TRI_OFFSET) index |= MGA_OFFSET_BIT; } - + mmesa->PointsFunc = points_tab[index]; mmesa->LineFunc = line_tab[index]; mmesa->TriangleFunc = tri_tab[index]; @@ -171,7 +150,7 @@ mmesa->PointsFunc = 0; mmesa->IndirectTriangles |= DD_POINT_SW_RASTERIZE; } - + if (flags & LINE_FALLBACK) { mmesa->renderindex |= MGA_FALLBACK_BIT; mmesa->LineFunc = 0; @@ -194,6 +173,9 @@ mmesa->QuadFunc = 0; mmesa->IndirectTriangles |= (DD_TRI_SW_RASTERIZE | DD_QUAD_SW_RASTERIZE); + if (flags & DD_TRI_LIGHT_TWOSIDE) { + mmesa->IndirectTriangles |= DD_TRI_LIGHT_TWOSIDE; + } } } } Index: xc/lib/GL/mesa/src/drv/mga/mgatris.h diff -u xc/lib/GL/mesa/src/drv/mga/mgatris.h:1.5 xc/lib/GL/mesa/src/drv/mga/mgatris.h:1.8 --- xc/lib/GL/mesa/src/drv/mga/mgatris.h:1.5 Sun Sep 24 09:51:08 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgatris.h Tue Apr 10 12:07:51 2001 @@ -1,32 +1,33 @@ /* - * GLX Hardware Device Driver for Matrox Millenium G200 - * Copyright (C) 1999 Wittawat Yamwong + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. * - * - * Wittawat Yamwong + * Authors: + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatris.h,v 1.5 2000/09/24 13:51:08 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatris.h,v 1.8 2001/04/10 16:07:51 dawes Exp $ */ -#ifndef MGATIS_INC -#define MGATIS_INC +#ifndef MGATRIS_INC +#define MGATRIS_INC #include "types.h" #include "mgaioctl.h" @@ -36,97 +37,19 @@ #define MGA_FLAT_BIT 0x1 -#define MGA_OFFSET_BIT 0x2 -#define MGA_TWOSIDE_BIT 0x4 -#define MGA_NODRAW_BIT 0x8 -#define MGA_FALLBACK_BIT 0x10 - -extern int nrswaps; - - -#define VERTSIZE vertsize - -/* static float _v0[] = { */ -/* 242.202515, */ -/* 250.469604, */ -/* 0.961081, */ -/* 0.013503, */ -/* 0, */ -/* 0.000000, */ -/* 2.600000, */ -/* 0.000000, */ -/* 1.000000, */ -/* 0.600000 */ -/* }; */ - -/* static float _v1[] = { */ -/* 246.448914, */ -/* 54.697876, */ -/* 0.953817, */ -/* 0.014156, */ -/* 0, */ -/* 0.000000, */ -/* 2.600000, */ -/* 2.000000, */ -/* 1.000000, */ -/* 1.600000 */ -/* }; */ - -/* static float _v2[] = { */ -/* 55.999474, */ -/* 85.196106, */ -/* 0.942609, */ -/* 0.015165, */ -/* 0, */ -/* 0.000000, */ -/* 0.600000, */ -/* 2.000000, */ -/* 0.000000, */ -/* 1.600000, */ -/* }; */ +#define MGA_OFFSET_BIT 0x2 +#define MGA_TWOSIDE_BIT 0x4 +#define MGA_FALLBACK_BIT 0x8 static __inline void mga_draw_triangle( mgaContextPtr mmesa, - mgaVertex *v0, - mgaVertex *v1, + mgaVertex *v0, + mgaVertex *v1, mgaVertex *v2 ) { GLuint vertsize = mmesa->vertsize; - GLuint *wv = mgaAllocVertexDwordsInline( mmesa, 3 * VERTSIZE ); + GLuint *wv = mgaAllocVertexDwordsInline( mmesa, 3 * vertsize ); int j; - (void) vertsize; - -/* for (j = 0 ; j < vertsize ; j++) */ -/* fprintf(stderr, "v0 %d: %f 0x%x\n", j, v0->f[j], v0->ui[j]); */ - -/* for (j = 0 ; j < vertsize ; j++) */ -/* fprintf(stderr, "v1 %d: %f 0x%x\n", j, v1->f[j], v1->ui[j]); */ - -/* for (j = 0 ; j < vertsize ; j++) */ -/* fprintf(stderr, "v2 %d: %f 0x%x\n", j, v2->f[j], v2->ui[j]); */ - -/* v0 = (mgaVertex *)_v0; */ -/* v1 = (mgaVertex *)_v1; */ -/* v2 = (mgaVertex *)_v2; */ - - -/* if (v0->v.x < 0 || v0->v.x > 1920 || */ -/* v0->v.y < 0 || v0->v.y > 1440 || */ -/* v0->v.z < 0 || v0->v.z > 1) */ -/* fprintf(stderr, "v0 %f %f %f %f\n", v0->v.x, v0->v.y, v0->v.z, v0->v.rhw); */ - - -/* if (v1->v.x < 0 || v1->v.x > 1920 || */ -/* v1->v.y < 0 || v1->v.y > 1440 || */ -/* v1->v.z < 0 || v1->v.z > 1) */ -/* fprintf(stderr, "v1 %f %f %f %f\n", v1->v.x, v1->v.y, v1->v.z, v1->v.rhw); */ - -/* if (v2->v.x < 0 || v2->v.x > 1920 || */ -/* v2->v.y < 0 || v2->v.y > 1440 || */ -/* v2->v.z < 0 || v2->v.z > 1) */ -/* fprintf(stderr, "v2 %f %f %f %f\n", v2->v.x, v2->v.y, v2->v.z, v2->v.rhw); */ - - #if defined (USE_X86_ASM) /* GTH: We can safely assume the vertex stride is some number of * dwords, and thus a "rep movsd" is okay. The vb pointer is @@ -135,27 +58,27 @@ */ __asm__ __volatile__( "rep ; movsl" : "=%c" (j) - : "0" (VERTSIZE), "D" ((long)wv), "S" ((long)v0) + : "0" (vertsize), "D" ((long)wv), "S" ((long)v0) : "memory" ); __asm__ __volatile__( "rep ; movsl" : "=%c" (j) - : "0" (VERTSIZE), "S" ((long)v1) + : "0" (vertsize), "S" ((long)v1) : "memory" ); __asm__ __volatile__( "rep ; movsl" : "=%c" (j) - : "0" (VERTSIZE), "S" ((long)v2) + : "0" (vertsize), "S" ((long)v2) : "memory" ); #else { - for (j = 0 ; j < vertsize ; j++) + for (j = 0 ; j < vertsize ; j++) wv[j] = v0->ui[j]; - wv += VERTSIZE; - for (j = 0 ; j < vertsize ; j++) + wv += vertsize; + for (j = 0 ; j < vertsize ; j++) wv[j] = v1->ui[j]; - wv += VERTSIZE; - for (j = 0 ; j < vertsize ; j++) + wv += vertsize; + for (j = 0 ; j < vertsize ; j++) wv[j] = v2->ui[j]; } #endif @@ -166,103 +89,129 @@ mgaVertex *tmp, float sz ) { GLuint vertsize = mmesa->vertsize; - GLuint *wv = mgaAllocVertexDwords( mmesa, 6*VERTSIZE); - int j; + GLuint *wv = mgaAllocVertexDwords( mmesa, 6*vertsize); + GLuint j; + const GLfloat x = tmp->v.x + 0.125; + const GLfloat y = tmp->v.y - 0.125; - *(float *)&wv[0] = tmp->v.x - sz; - *(float *)&wv[1] = tmp->v.y - sz; - for (j = 2 ; j < vertsize ; j++) + *(float *)&wv[0] = x - sz; + *(float *)&wv[1] = y - sz; + for (j = 2 ; j < vertsize ; j++) wv[j] = tmp->ui[j]; - wv += VERTSIZE; + wv += vertsize; - *(float *)&wv[0] = tmp->v.x + sz; - *(float *)&wv[1] = tmp->v.y - sz; - for (j = 2 ; j < vertsize ; j++) + *(float *)&wv[0] = x + sz; + *(float *)&wv[1] = y - sz; + for (j = 2 ; j < vertsize ; j++) wv[j] = tmp->ui[j]; - wv += VERTSIZE; + wv += vertsize; - *(float *)&wv[0] = tmp->v.x + sz; - *(float *)&wv[1] = tmp->v.y + sz; - for (j = 2 ; j < vertsize ; j++) + *(float *)&wv[0] = x + sz; + *(float *)&wv[1] = y + sz; + for (j = 2 ; j < vertsize ; j++) wv[j] = tmp->ui[j]; - wv += VERTSIZE; + wv += vertsize; - *(float *)&wv[0] = tmp->v.x + sz; - *(float *)&wv[1] = tmp->v.y + sz; - for (j = 2 ; j < vertsize ; j++) + *(float *)&wv[0] = x + sz; + *(float *)&wv[1] = y + sz; + for (j = 2 ; j < vertsize ; j++) wv[j] = tmp->ui[j]; - wv += VERTSIZE; + wv += vertsize; - *(float *)&wv[0] = tmp->v.x - sz; - *(float *)&wv[1] = tmp->v.y + sz; - for (j = 2 ; j < vertsize ; j++) + *(float *)&wv[0] = x - sz; + *(float *)&wv[1] = y + sz; + for (j = 2 ; j < vertsize ; j++) wv[j] = tmp->ui[j]; - wv += VERTSIZE; + wv += vertsize; - *(float *)&wv[0] = tmp->v.x - sz; - *(float *)&wv[1] = tmp->v.y - sz; - for (j = 2 ; j < vertsize ; j++) + *(float *)&wv[0] = x - sz; + *(float *)&wv[1] = y - sz; + for (j = 2 ; j < vertsize ; j++) wv[j] = tmp->ui[j]; } static __inline void mga_draw_line( mgaContextPtr mmesa, - const mgaVertex *tmp0, + const mgaVertex *tmp0, const mgaVertex *tmp1, float width ) { - GLuint vertsize = mmesa->vertsize; - GLuint *wv = mgaAllocVertexDwords( mmesa, 6 * VERTSIZE ); - float dx, dy, ix, iy; - int j; + const GLuint vertsize = mmesa->vertsize; + GLuint *wv = mgaAllocVertexDwords( mmesa, 6 * vertsize ); + GLuint j; + GLfloat x0 = tmp0->v.x; + GLfloat y0 = tmp0->v.y; + GLfloat x1 = tmp1->v.x; + GLfloat y1 = tmp1->v.y; + GLfloat dx, dy, ix, iy; + GLfloat hw; + + hw = 0.5F * width; + if (hw > 0.1F && hw < 0.5F) { + hw = 0.5F; + } + /* adjust vertices depending on line direction */ dx = tmp0->v.x - tmp1->v.x; dy = tmp0->v.y - tmp1->v.y; - - ix = width * .5; iy = 0; - - if ((ix<.5) && (ix>0.1)) ix = .5; /* I want to see lines with width - 0.5 also */ - if (dx * dx > dy * dy) { - iy = ix; ix = 0; + /* X-major line */ + ix = 0.0F; + iy = hw; + if (x1 < x0) { + x0 += 0.5F; + x1 += 0.5F; + } + y0 -= 0.5F; + y1 -= 0.5F; + } + else { + /* Y-major line */ + ix = hw; + iy = 0.0F; + if (y1 > y0) { + y0 -= 0.5F; + y1 -= 0.5F; + } + x0 += 0.5F; + x1 += 0.5F; } - - *(float *)&wv[0] = tmp0->v.x - ix; - *(float *)&wv[1] = tmp0->v.y - iy; - for (j = 2 ; j < vertsize ; j++) + + *(float *)&wv[0] = x0 - ix; + *(float *)&wv[1] = y0 - iy; + for (j = 2 ; j < vertsize ; j++) wv[j] = tmp0->ui[j]; - wv += VERTSIZE; + wv += vertsize; - *(float *)&wv[0] = tmp1->v.x + ix; - *(float *)&wv[1] = tmp1->v.y + iy; - for (j = 2 ; j < vertsize ; j++) + *(float *)&wv[0] = x1 + ix; + *(float *)&wv[1] = y1 + iy; + for (j = 2 ; j < vertsize ; j++) wv[j] = tmp1->ui[j]; - wv += VERTSIZE; + wv += vertsize; - *(float *)&wv[0] = tmp0->v.x + ix; - *(float *)&wv[1] = tmp0->v.y + iy; - for (j = 2 ; j < vertsize ; j++) + *(float *)&wv[0] = x0 + ix; + *(float *)&wv[1] = y0 + iy; + for (j = 2 ; j < vertsize ; j++) wv[j] = tmp0->ui[j]; - wv += VERTSIZE; - - *(float *)&wv[0] = tmp0->v.x - ix; - *(float *)&wv[1] = tmp0->v.y - iy; - for (j = 2 ; j < vertsize ; j++) + wv += vertsize; + + *(float *)&wv[0] = x0 - ix; + *(float *)&wv[1] = y0 - iy; + for (j = 2 ; j < vertsize ; j++) wv[j] = tmp0->ui[j]; - wv += VERTSIZE; + wv += vertsize; - *(float *)&wv[0] = tmp1->v.x - ix; - *(float *)&wv[1] = tmp1->v.y - iy; - for (j = 2 ; j < vertsize ; j++) + *(float *)&wv[0] = x1 - ix; + *(float *)&wv[1] = y1 - iy; + for (j = 2 ; j < vertsize ; j++) wv[j] = tmp1->ui[j]; - wv += VERTSIZE; + wv += vertsize; - *(float *)&wv[0] = tmp1->v.x + ix; - *(float *)&wv[1] = tmp1->v.y + iy; - for (j = 2 ; j < vertsize ; j++) + *(float *)&wv[0] = x1 + ix; + *(float *)&wv[1] = y1 + iy; + for (j = 2 ; j < vertsize ; j++) wv[j] = tmp1->ui[j]; - wv += VERTSIZE; + wv += vertsize; } Index: xc/lib/GL/mesa/src/drv/mga/mgatritmp.h diff -u xc/lib/GL/mesa/src/drv/mga/mgatritmp.h:1.5 xc/lib/GL/mesa/src/drv/mga/mgatritmp.h:1.6 --- xc/lib/GL/mesa/src/drv/mga/mgatritmp.h:1.5 Tue Dec 5 16:18:34 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgatritmp.h Wed Mar 21 11:14:22 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatritmp.h,v 1.5 2000/12/05 21:18:34 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatritmp.h,v 1.6 2001/03/21 16:14:22 dawes Exp $ */ static __inline void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2, @@ -16,6 +16,7 @@ #if (IND & (MGA_TWOSIDE_BIT | MGA_FLAT_BIT)) GLuint c[3]; + GLuint s[3]; #endif v[0] = &mgaverts[e0]; @@ -26,6 +27,9 @@ c[0] = v[0]->ui[4]; c[1] = v[1]->ui[4]; c[2] = v[2]->ui[4]; + s[0] = v[0]->ui[5]; + s[1] = v[1]->ui[5]; + s[2] = v[2]->ui[5]; #endif @@ -41,13 +45,19 @@ { GLuint facing = (cc > 0.0) ^ ctx->Polygon.FrontBit; GLubyte (*vbcolor)[4] = VB->Color[facing]->data; + GLubyte (*vbspec)[4] = VB->Spec[facing]; if (IND & MGA_FLAT_BIT) { MGA_COLOR((char *)&v[0]->ui[4], vbcolor[pv]); v[2]->ui[4] = v[1]->ui[4] = v[0]->ui[4]; + MGA_COLOR3((char *)&v[0]->ui[5], vbspec[pv]); + v[2]->ui[5] = v[1]->ui[5] = v[0]->ui[5]; } else { MGA_COLOR((char *)&v[0]->ui[4], vbcolor[e0]); MGA_COLOR((char *)&v[1]->ui[4], vbcolor[e1]); MGA_COLOR((char *)&v[2]->ui[4], vbcolor[e2]); + MGA_COLOR3((char *)&v[0]->ui[5], vbspec[e0]); + MGA_COLOR3((char *)&v[1]->ui[5], vbspec[e1]); + MGA_COLOR3((char *)&v[2]->ui[5], vbspec[e2]); } } #endif @@ -79,9 +89,13 @@ #elif (IND & MGA_FLAT_BIT) { GLuint color = mgaverts[pv].ui[4]; + GLuint spec = mgaverts[pv].ui[5]; v[0]->ui[4] = color; v[1]->ui[4] = color; v[2]->ui[4] = color; + v[0]->ui[5] = spec; + v[1]->ui[5] = spec; + v[2]->ui[5] = spec; } #endif @@ -97,6 +111,9 @@ v[0]->ui[4] = c[0]; v[1]->ui[4] = c[1]; v[2]->ui[4] = c[2]; + v[0]->ui[5] = s[0]; + v[1]->ui[5] = s[1]; + v[2]->ui[5] = s[2]; #endif } @@ -120,25 +137,34 @@ float width = ctx->Line.Width; GLfloat z0, z1; GLuint c0, c1; + GLuint s0, s1; mgaVertex *vert0 = &mgaVB[v0]; mgaVertex *vert1 = &mgaVB[v1]; - if (IND & MGA_TWOSIDE_BIT) { GLubyte (*vbcolor)[4] = ctx->VB->ColorPtr->data; + GLubyte (*vbspec)[4] = ctx->VB->Specular; if (IND & MGA_FLAT_BIT) { MGA_COLOR((char *)&vert0->v.color,vbcolor[pv]); *(int *)&vert1->v.color = *(int *)&vert0->v.color; + MGA_COLOR3((char *)&vert0->v.specular, vbspec[pv]); + *(int *)&vert1->v.specular = *(int *)&vert0->v.specular; } else { MGA_COLOR((char *)&vert0->v.color,vbcolor[v0]); MGA_COLOR((char *)&vert1->v.color,vbcolor[v1]); + MGA_COLOR3((char *)&vert0->v.specular, vbspec[v0]); + MGA_COLOR3((char *)&vert1->v.specular, vbspec[v1]); } } else if (IND & MGA_FLAT_BIT) { c0 = *(GLuint *) &(vert0->v.color); c1 = *(GLuint *) &(vert1->v.color); *(int *)&vert0->v.color = *(int *)&vert1->v.color = *(int *)&mgaVB[pv].v.color; + s0 = *(GLuint *) &(vert0->v.specular); + s1 = *(GLuint *) &(vert1->v.specular); + *(int *)&vert0->v.specular = + *(int *)&vert1->v.specular = *(int *)&mgaVB[pv].v.specular; } if (IND & MGA_OFFSET_BIT) { @@ -159,6 +185,8 @@ if ((IND & MGA_FLAT_BIT) && !(IND & MGA_TWOSIDE_BIT)) { *(GLuint *) &(vert0->v.color) = c0; *(GLuint *) &(vert1->v.color) = c1; + *(GLuint *) &(vert0->v.specular) = s0; + *(GLuint *) &(vert1->v.specular) = s1; } } Index: xc/lib/GL/mesa/src/drv/mga/mgavb.c diff -u xc/lib/GL/mesa/src/drv/mga/mgavb.c:1.7 xc/lib/GL/mesa/src/drv/mga/mgavb.c:1.10 --- xc/lib/GL/mesa/src/drv/mga/mgavb.c:1.7 Wed Nov 8 00:02:46 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgavb.c Tue Apr 10 12:07:51 2001 @@ -1,30 +1,31 @@ /* - * GLX Hardware Device Driver for Matrox Millenium G200 - * Copyright (C) 1999 Wittawat Yamwong + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. * - * - * Wittawat Yamwong + * Authors: + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgavb.c,v 1.7 2000/11/08 05:02:46 dawes Exp $ */ - +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgavb.c,v 1.10 2001/04/10 16:07:51 dawes Exp $ */ + #include "mgacontext.h" #include "mgavb.h" #include "mga_xmesa.h" @@ -35,49 +36,48 @@ #include #include -#define TEX0 { \ +#define TEX0 { \ v->v.tu0 = tc0[i][0]; \ v->v.tv0 = tc0[i][1]; \ } -#define TEX1 { \ +#define TEX1 { \ v->v.tu1 = tc1[i][0]; \ v->v.tv1 = tc1[i][1]; \ } -#define SPC { \ - GLubyte *spec = &(VB->Spec[0][i][0]); \ +#define SPC { \ + GLubyte *spec = &(VB->Spec[0][i][0]); \ v->v.specular.red = spec[0]; \ - v->v.specular.green = spec[1]; \ + v->v.specular.green = spec[1]; \ v->v.specular.blue = spec[2]; \ } -#define FOG { \ - GLubyte *spec = &(VB->Spec[0][i][0]); \ - v->v.specular.alpha = spec[3]; \ +#define FOG { \ + GLubyte *spec = &(VB->Spec[0][i][0]); \ + v->v.specular.alpha = spec[3]; \ } #define COL { \ GLubyte *col = &(VB->Color[0]->data[i][0]); \ - v->v.color.blue = col[2]; \ - v->v.color.green = col[1]; \ - v->v.color.red = col[0]; \ - v->v.color.alpha = col[3]; \ + v->v.color.blue = col[2]; \ + v->v.color.green = col[1]; \ + v->v.color.red = col[0]; \ + v->v.color.alpha = col[3]; \ } /* The v code we have doesn't seem to support projective texturing * in the multitexture case. (Would require another 1/w value for the - * second set of texcoords). This may be a problem for the g400. + * second set of texcoords). This may be a problem for the g400. */ #define TEX0_4 \ - if (VB->TexCoordPtr[0]->size == 4) \ - { \ + if (VB->TexCoordPtr[0]->size == 4) { \ GLfloat (*tc)[4] = VB->TexCoordPtr[0]->data; \ v = &(MGA_DRIVER_DATA(VB)->verts[start]); \ mmesa->setupdone &= ~MGA_WIN_BIT; \ - for (i=start; i < end; i++, v++) { \ - float oow = 1.0 / tc[i][3]; \ - v->v.rhw *= tc[i][3]; \ + for (i = start; i < end; i++, v++) { \ + GLfloat oow = 1.0 / tc[i][3]; \ + v->v.rhw *= tc[i][3]; \ v->v.tu0 *= oow; \ v->v.tv0 *= oow; \ } \ @@ -89,7 +89,7 @@ v->v.rhw = win[3]; \ v->v.z = depth_scale * win[2]; \ v->v.x = win[0] + xoffset; \ - v->v.y = - win[1] + yoffset; + v->v.y = - win[1] + yoffset; #define NOP @@ -138,7 +138,7 @@ spec; \ fog; \ } \ - col; \ + col; \ } \ tex0_4; \ } @@ -196,7 +196,7 @@ for (i = 0 ; i < 0x80 ; i++) setup_func[i] = rs_invalid; - + /* Functions to build vert's from scratch */ setup_func[MGA_WIN_BIT|MGA_TEX0_BIT] = rs_wt0; setup_func[MGA_WIN_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT] = rs_wt0t1; @@ -242,7 +242,7 @@ fprintf(stderr, "%s: %d %s%s%s%s%s%s%s\n", msg, (int)flags, - (flags & MGA_WIN_BIT) ? " xyzw," : "", + (flags & MGA_WIN_BIT) ? " xyzw," : "", (flags & MGA_RGBA_BIT) ? " rgba," : "", (flags & MGA_SPEC_BIT) ? " spec," : "", (flags & MGA_FOG_BIT) ? " fog," : "", @@ -274,58 +274,44 @@ funcindex &= ~MGA_RGBA_BIT; */ if (ctx->Texture.Unit[0].EnvMode == GL_BLEND && - mmesa->envcolor) + mmesa->envcolor) { mmesa->multitex = 1; mmesa->vertsize = 10; mmesa->tmu_source[1] = 0; funcindex |= MGA_TEX1_BIT; - } + } funcindex |= MGA_TEX0_BIT; } - if (ctx->Texture.ReallyEnabled & 0xf0) { + if (ctx->Texture.ReallyEnabled & 0xf0) { if (ctx->Texture.ReallyEnabled & 0xf) { mmesa->multitex = 1; mmesa->vertsize = 10; mmesa->blend_flags |= MGA_BLEND_MULTITEX; - funcindex |= MGA_TEX1_BIT; + funcindex |= MGA_TEX1_BIT; } else { - /* Just a funny way of doing single texturing + /* Just a funny way of doing single texturing */ mmesa->tmu_source[0] = 1; mmesa->tex_dest[1] = MGA_TEX0_BIT; - /* This doesn't work for non-RGBA textures - if (ctx->Texture.Unit[1].EnvMode == GL_REPLACE) - funcindex &= ~MGA_RGBA_BIT; - */ - if (ctx->Texture.Unit[0].EnvMode == GL_BLEND && - mmesa->envcolor) + mmesa->envcolor) { mmesa->multitex = 1; mmesa->vertsize = 10; mmesa->tmu_source[1] = 1; funcindex |= MGA_TEX1_BIT; - } + } funcindex |= MGA_TEX0_BIT; } } -/* if (mmesa->multitex == 0) { */ -/* mmesa->tmu_source[1] = mmesa->tmu_source[0]; */ -/* mmesa->tex_dest[1] = mmesa->tex_dest[0]; */ -/* mmesa->vertsize = 10; */ -/* mmesa->multitex = 1; */ -/* funcindex |= MGA_TEX0_BIT|MGA_TEX1_BIT; */ -/* } */ - -/* mmesa->vertsize = 10; */ if (multi != mmesa->multitex) - mmesa->new_state |= MGA_NEW_WARP; + mmesa->new_state |= MGA_NEW_WARP; /* Not really a good place to do this - need to make the mga state @@ -343,7 +329,7 @@ funcindex |= MGA_FOG_BIT; if (0) - mgaPrintSetupFlags("xsmesa: full setup function", funcindex); + mgaPrintSetupFlags("xsmesa: full setup function", funcindex); mmesa->dirty |= MGA_UPLOAD_PIPE; mmesa->setupindex = funcindex; @@ -367,7 +353,7 @@ if ((ctx->Array.Summary & VERT_OBJ_ANY) == 0) return; - if (ctx->IndirectTriangles) + if (ctx->IndirectTriangles) return; mmesa->setupdone = tmp; @@ -396,7 +382,7 @@ if (new & VERT_RGBA) ind |= MGA_RGBA_BIT | MGA_SPEC_BIT; - if (new & VERT_TEX0_ANY) + if (new & VERT_TEX0_ANY) ind |= MGA_TEX0_BIT; if (new & VERT_TEX1_ANY) @@ -412,8 +398,8 @@ if (0) mgaPrintSetupFlags("xsmesa: partial setup function", ind); - if (ind) - setup_func[ind&~MGA_ALPHA_BIT]( VB, VB->Start, VB->Count ); + if (ind) + setup_func[ind&~MGA_ALPHA_BIT]( VB, VB->Start, VB->Count ); } @@ -424,9 +410,9 @@ /* Can't lock, won't lock */ - REFRESH_DRAWABLE_INFO( mmesa ); +/* REFRESH_DRAWABLE_INFO( mmesa ); */ - if (VB->Type == VB_CVA_PRECALC) + if (VB->Type == VB_CVA_PRECALC) mgaDDPartialRasterSetup( VB ); else if (ctx->Driver.RasterSetup) ctx->Driver.RasterSetup( VB, VB->CopyStart, VB->Count ); @@ -448,19 +434,19 @@ FREE( mvb->vert_store ); mvb->vert_store = MALLOC( sizeof(mgaVertex) * mvb->size + 31); - if (!mvb->vert_store) + if (!mvb->vert_store) FatalError("mga-glx: out of memory !\n"); mvb->verts = (mgaVertexPtr)(((unsigned long)mvb->vert_store + 31) & ~31); gl_vector1ui_free( &mvb->clipped_elements ); - gl_vector1ui_alloc( &mvb->clipped_elements, VEC_WRITABLE, mvb->size, 32 ); - if (!mvb->clipped_elements.start) + gl_vector1ui_alloc( &mvb->clipped_elements, VEC_WRITABLE, mvb->size, 32 ); + if (!mvb->clipped_elements.start) FatalError("mga-glx: out of memory !\n"); ALIGN_FREE( VB->ClipMask ); VB->ClipMask = (GLubyte *)ALIGN_MALLOC(sizeof(GLubyte) * mvb->size, 32); - if (!VB->ClipMask) + if (!VB->ClipMask) FatalError("mga-glx: out of memory !\n"); if (VB->Type == VB_IMMEDIATE) { @@ -486,25 +472,25 @@ */ mvb->size = VB->Size * 5; mvb->vert_store = MALLOC( sizeof(mgaVertex) * mvb->size + 31); - if (!mvb->vert_store) + if (!mvb->vert_store) FatalError("mga-glx: out of memory !\n"); - + mvb->verts = (mgaVertexPtr)(((unsigned long)mvb->vert_store + 31) & ~31); gl_vector1ui_alloc( &mvb->clipped_elements, VEC_WRITABLE, mvb->size, 32 ); - if (!mvb->clipped_elements.start) + if (!mvb->clipped_elements.start) FatalError("mga-glx: out of memory !\n"); ALIGN_FREE( VB->ClipMask ); VB->ClipMask = (GLubyte *)ALIGN_MALLOC(sizeof(GLubyte) * mvb->size, 32); - if (!VB->ClipMask) + if (!VB->ClipMask) FatalError("mga-glx: out of memory !\n"); mvb->primitive = (GLuint *)MALLOC( sizeof(GLuint) * mvb->size ); mvb->next_primitive = (GLuint *)MALLOC( sizeof(GLuint) * mvb->size ); if (!mvb->primitive || !mvb->next_primitive) FatalError("mga-glx: out of memory!"); - + VB->driver_data = mvb; } @@ -512,7 +498,7 @@ void mgaDDUnregisterVB( struct vertex_buffer *VB ) { mgaVertexBufferPtr mvb = MGA_DRIVER_DATA(VB); - + if (mvb) { if (mvb->vert_store) FREE(mvb->vert_store); if (mvb->primitive) FREE(mvb->primitive); @@ -520,7 +506,5 @@ gl_vector1ui_free( &mvb->clipped_elements ); FREE(mvb); VB->driver_data = 0; - } + } } - - Index: xc/lib/GL/mesa/src/drv/mga/mgavb.h diff -u xc/lib/GL/mesa/src/drv/mga/mgavb.h:1.5 xc/lib/GL/mesa/src/drv/mga/mgavb.h:1.6 --- xc/lib/GL/mesa/src/drv/mga/mgavb.h:1.5 Sun Sep 24 09:51:09 2000 +++ xc/lib/GL/mesa/src/drv/mga/mgavb.h Tue Apr 10 12:07:51 2001 @@ -1,29 +1,30 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgavb.h,v 1.6 2001/04/10 16:07:51 dawes Exp $ */ /* - * GLX Hardware Device Driver for Matrox Millenium G200 - * Copyright (C) 1999 Wittawat Yamwong + * Copyright 2000-2001 VA Linux Systems, Inc. + * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. * - * - * Wittawat Yamwong + * Authors: + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgavb.h,v 1.5 2000/09/24 13:51:09 alanh Exp $ */ #ifndef MGAVB_INC #define MGAVB_INC @@ -34,7 +35,7 @@ /* common datatypes for the mga warp engines */ -/* +/* * color type for the vertex data * we probably want to use an internal datatype here? */ @@ -64,7 +65,7 @@ /* The fastpath code still expects a 16-float stride vertex. */ union mga_vertex_t { - mga_warp_vertex v; + mga_warp_vertex v; float f[16]; GLuint ui[16]; }; @@ -85,7 +86,7 @@ GLuint *elt_buf; GLuint vert_phys_start; }; - + typedef struct mga_vertex_buffer_t *mgaVertexBufferPtr; #define MGA_CONTEXT(ctx) ((mgaContextPtr)((ctx)->DriverCtx)) @@ -106,7 +107,7 @@ extern void mgaPrintSetupFlags(char *msg, GLuint flags ); extern void mgaDDDoRasterSetup( struct vertex_buffer *VB ); extern void mgaDDPartialRasterSetup( struct vertex_buffer *VB ); -extern void mgaDDCheckPartialRasterSetup( GLcontext *ctx, +extern void mgaDDCheckPartialRasterSetup( GLcontext *ctx, struct gl_pipeline_stage *d ); Index: xc/lib/GL/mesa/src/drv/r128/Imakefile diff -u xc/lib/GL/mesa/src/drv/r128/Imakefile:1.11 xc/lib/GL/mesa/src/drv/r128/Imakefile:1.17 --- xc/lib/GL/mesa/src/drv/r128/Imakefile:1.11 Tue Dec 12 18:24:28 2000 +++ xc/lib/GL/mesa/src/drv/r128/Imakefile Thu May 10 12:56:11 2001 @@ -1,334 +1,39 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/r128/Imakefile,v 1.11 2000/12/12 23:24:28 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/r128/Imakefile,v 1.17 2001/05/10 16:56:11 dawes Exp $ #include -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx +#if GlxUseBuiltInDRIDriver +#define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) +#define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) #define DoExtraLib SharedLibGlx #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx - -#if Malloc0ReturnsNull -ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#else +#define DoNormalLib SharedLibGlxWithoutPIC +#define DoSharedLib !SharedLibGlxWithoutPIC +#define DoExtrasLib NO +#define DoDebugLib NO +#define DoProfileLib NO #endif +#include "../common/Imakefile.inc" +#include "Imakefile.inc" +#include "../../Imakefile.inc" #ifdef i386Architecture -#if MesaUseMMX - MMX_DEFS = -DUSE_MMX_ASM -#endif -#if MesaUse3DNow - 3DNOW_DEFS = -DUSE_3DNOW_ASM -#endif -#if MesaUseKatmai - KATMAI_DEFS = -DUSE_KATMAI_ASM -#endif - ASM_DEFINES = -DUSE_X86_ASM $(MMX_DEFS) $(3DNOW_DEFS) $(KATMAI_DEFS) +#include "../../X86/Imakefile.inc" #endif - -#if BuildXF86DRI - DRI_DEFINES = GlxDefines -DDRIVERTS - DRI_INCLUDES = -I../../../../dri \ - -I../../../../glx \ - -I../../../dri \ - -I$(TOP)/include \ - -I$(TOP)/include/GL \ - -I$(XF86OSSRC) \ - -I$(XF86COMSRC) \ - -I$(SERVERSRC)/GL/dri \ - -I$(XF86DRIVERSRC)/ati \ - -I../../../include \ - -I../.. \ - -I../../X \ - -I../common -#endif - -MESA_INCLUDES = -I. -I.. -I../../include \ - -I../../../../dri/drm - - DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(ASM_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) $(MESA_INCLUDES) $(DRI_INCLUDES) - - R128SRCS = r128_context.c \ - r128_dd.c \ - r128_fastpath.c \ - r128_eltpath.c \ - r128_ioctl.c \ - r128_lock.c \ - r128_pipeline.c \ - r128_screen.c \ - r128_span.c \ - r128_state.c \ - r128_tex.c \ - r128_tris.c \ - r128_vb.c \ - r128_xmesa.c - - R128OBJS = r128_context.o \ - r128_dd.o \ - r128_fastpath.o \ - r128_eltpath.o \ - r128_ioctl.o \ - r128_lock.o \ - r128_pipeline.o \ - r128_screen.o \ - r128_span.o \ - r128_state.o \ - r128_tex.o \ - r128_tris.o \ - r128_vb.o \ - r128_xmesa.o - -#if !GlxUseBuiltInDRIDriver - DRISRCS = ../../../dri/dri_mesa.c \ - ../../../../dri/dri_tmm.c - - DRIOBJS = ../../../dri/dri_mesa.o \ - ../../../../dri/dri_tmm.o - - DRMSRCS = ../../../../dri/drm/xf86drm.c \ - ../../../../dri/drm/xf86drmHash.c \ - ../../../../dri/drm/xf86drmRandom.c \ - ../../../../dri/drm/xf86drmSL.c \ - ../../../../dri/drm/xf86drmR128.c - - DRMOBJS = ../../../../dri/drm/xf86drm.o \ - ../../../../dri/drm/xf86drmHash.o \ - ../../../../dri/drm/xf86drmRandom.o \ - ../../../../dri/drm/xf86drmSL.o \ - ../../../../dri/drm/xf86drmR128.o - - MESASRCS = ../../aatriangle.c \ - ../../accum.c \ - ../../alpha.c \ - ../../alphabuf.c \ - ../../attrib.c \ - ../../bbox.c \ - ../../bitmap.c \ - ../../blend.c \ - ../../buffers.c \ - ../../clip.c \ - ../../colortab.c \ - ../../config.c \ - ../../context.c \ - ../../copypix.c \ - ../../cva.c \ - ../../debug_xform.c \ - ../../depth.c \ - ../../dlist.c \ - ../../drawpix.c \ - ../../enable.c \ - ../../enums.c \ - ../../eval.c \ - ../../extensions.c \ - ../../feedback.c \ - ../../fog.c \ - ../../get.c \ - ../../glapi.c \ - ../../glapinoop.c \ - ../../glthread.c \ - ../../hash.c \ - ../../image.c \ - ../../imaging.c \ - ../../light.c \ - ../../lines.c \ - ../../logic.c \ - ../../masking.c \ - ../../matrix.c \ - ../../mem.c \ - ../../mmath.c \ - ../../pb.c \ - ../../pipeline.c \ - ../../pixel.c \ - ../../pixeltex.c \ - ../../points.c \ - ../../polygon.c \ - ../../quads.c \ - ../../rastpos.c \ - ../../readpix.c \ - ../../rect.c \ - ../../scissor.c \ - ../../shade.c \ - ../../span.c \ - ../../stages.c \ - ../../state.c \ - ../../stencil.c \ - ../../teximage.c \ - ../../texobj.c \ - ../../texstate.c \ - ../../texture.c \ - ../../texutil.c \ - ../../translate.c \ - ../../triangle.c \ - ../../varray.c \ - ../../vb.c \ - ../../vbcull.c \ - ../../vbfill.c \ - ../../vbindirect.c \ - ../../vbrender.c \ - ../../vbxform.c \ - ../../vector.c \ - ../../vertices.c \ - ../../winpos.c \ - ../../xform.c \ - ../../zoom.c - - MESAOBJS = ../../aatriangle.o \ - ../../accum.o \ - ../../alpha.o \ - ../../alphabuf.o \ - ../../attrib.o \ - ../../bbox.o \ - ../../bitmap.o \ - ../../blend.o \ - ../../buffers.o \ - ../../clip.o \ - ../../colortab.o \ - ../../config.o \ - ../../context.o \ - ../../copypix.o \ - ../../cva.o \ - ../../debug_xform.o \ - ../../depth.o \ - ../../dlist.o \ - ../../drawpix.o \ - ../../enable.o \ - ../../enums.o \ - ../../eval.o \ - ../../extensions.o \ - ../../feedback.o \ - ../../fog.o \ - ../../get.o \ - ../../hash.o \ - ../../hint.o \ - ../../image.o \ - ../../imaging.o \ - ../../light.o \ - ../../lines.o \ - ../../logic.o \ - ../../masking.o \ - ../../matrix.o \ - ../../mem.o \ - ../../mmath.o \ - ../../pb.o \ - ../../pipeline.o \ - ../../pixel.o \ - ../../pixeltex.o \ - ../../points.o \ - ../../polygon.o \ - ../../quads.o \ - ../../rastpos.o \ - ../../readpix.o \ - ../../rect.o \ - ../../scissor.o \ - ../../shade.o \ - ../../span.o \ - ../../stages.o \ - ../../state.o \ - ../../stencil.o \ - ../../teximage.o \ - ../../texobj.o \ - ../../texstate.o \ - ../../texture.o \ - ../../texutil.o \ - ../../translate.o \ - ../../triangle.o \ - ../../varray.o \ - ../../vb.o \ - ../../vbcull.o \ - ../../vbfill.o \ - ../../vbindirect.o \ - ../../vbrender.o \ - ../../vbxform.o \ - ../../vector.o \ - ../../vertices.o \ - ../../winpos.o \ - ../../xform.o \ - ../../zoom.o - -#ifdef i386Architecture - X86_SRCS = ../../X86/common_x86.c \ - ../../X86/common_x86_asm.S \ - ../../X86/x86.c \ - ../../X86/x86_cliptest.S \ - ../../X86/x86_vertex.S \ - ../../X86/x86_xform_masked2.S \ - ../../X86/x86_xform_masked3.S \ - ../../X86/x86_xform_masked4.S \ - ../../X86/x86_xform_raw2.S \ - ../../X86/x86_xform_raw3.S \ - ../../X86/x86_xform_raw4.S - - X86_OBJS = ../../X86/common_x86.o \ - ../../X86/common_x86_asm.o \ - ../../X86/x86.o \ - ../../X86/x86_cliptest.o \ - ../../X86/x86_vertex.o \ - ../../X86/x86_xform_masked2.o \ - ../../X86/x86_xform_masked3.o \ - ../../X86/x86_xform_masked4.o \ - ../../X86/x86_xform_raw2.o \ - ../../X86/x86_xform_raw3.o \ - ../../X86/x86_xform_raw4.o - -#if MesaUseMMX - MMX_SRCS = ../../X86/mmx_blend.S - MMX_OBJS = ../../X86/mmx_blend.o -#endif + DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(MESA_ASM_DEFINES) + INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES) -#if MesaUse3DNow - 3DNOW_SRCS = ../../X86/3dnow.c \ - ../../X86/3dnow_norm_raw.S \ - ../../X86/3dnow_vertex.S \ - ../../X86/3dnow_xform_masked1.S \ - ../../X86/3dnow_xform_masked2.S \ - ../../X86/3dnow_xform_masked3.S \ - ../../X86/3dnow_xform_masked4.S \ - ../../X86/3dnow_xform_raw1.S \ - ../../X86/3dnow_xform_raw2.S \ - ../../X86/3dnow_xform_raw3.S \ - ../../X86/3dnow_xform_raw4.S - - 3DNOW_OBJS = ../../X86/3dnow.o \ - ../../X86/3dnow_norm_raw.o \ - ../../X86/3dnow_vertex.o \ - ../../X86/3dnow_xform_masked1.o \ - ../../X86/3dnow_xform_masked2.o \ - ../../X86/3dnow_xform_masked3.o \ - ../../X86/3dnow_xform_masked4.o \ - ../../X86/3dnow_xform_raw1.o \ - ../../X86/3dnow_xform_raw2.o \ - ../../X86/3dnow_xform_raw3.o \ - ../../X86/3dnow_xform_raw4.o -#endif + DRIOBJS = $(GLXLIBSRC)/mesa/dri/dri_mesa.o \ + $(GLXLIBSRC)/dri/dri_tmm.o -#if MesaUseKatmai - KATMAI_SRCS = ../../X86/katmai.c \ - ../../X86/katmai_norm_raw.S \ - ../../X86/katmai_vertex.S \ - ../../X86/katmai_xform_masked1.S \ - ../../X86/katmai_xform_masked2.S \ - ../../X86/katmai_xform_masked3.S \ - ../../X86/katmai_xform_masked4.S \ - ../../X86/katmai_xform_raw1.S \ - ../../X86/katmai_xform_raw2.S \ - ../../X86/katmai_xform_raw3.S \ - ../../X86/katmai_xform_raw4.S - - KATMAI_OBJS = ../../X86/katmai.o \ - ../../X86/katmai_norm_raw.o \ - ../../X86/katmai_vertex.o \ - ../../X86/katmai_xform_masked1.o \ - ../../X86/katmai_xform_masked2.o \ - ../../X86/katmai_xform_masked3.o \ - ../../X86/katmai_xform_masked4.o \ - ../../X86/katmai_xform_raw1.o \ - ../../X86/katmai_xform_raw2.o \ - ../../X86/katmai_xform_raw3.o \ - ../../X86/katmai_xform_raw4.o -#endif -#endif -#endif + DRMOBJS = $(GLXLIBSRC)/dri/drm/xf86drm.o \ + $(GLXLIBSRC)/dri/drm/xf86drmHash.o \ + $(GLXLIBSRC)/dri/drm/xf86drmRandom.o \ + $(GLXLIBSRC)/dri/drm/xf86drmSL.o \ + $(GLXLIBSRC)/dri/drm/xf86drmR128.o #ifdef GlxSoProf LOSRCS = ../../../../lowpc.c @@ -338,49 +43,30 @@ HIOBJS = ../../../../highpc.o #endif - ASMSRCS = $(X86_SRCS) $(MMX_SRCS) $(3DNOW_SRCS) $(KATMAI_SRCS) - ASMOBJS = $(X86_OBJS) $(MMX_OBJS) $(3DNOW_OBJS) $(KATMAI_OBJS) + SRCS = $(R128SRCS) + OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ + $(MESA_ASM_OBJS) $(COMMONOBJS) $(R128OBJS) $(HIOBJS) - COMMONSRCS = ../common/mm.c ../common/hwlog.c - COMMONOBJS = ../common/mm.o ../common/hwlog.o +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) - SRCS = $(LOSRCS) $(DRISRCS) $(DRMSRCS) $(MESASRCS) \ - $(ASMSRCS) $(COMMONSRCS) $(R128SRCS) $(HISRCS) - OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(MESAOBJS) \ - $(ASMOBJS) $(COMMONOBJS) $(R128OBJS) $(HIOBJS) - -REQUIREDLIBS += MathLibrary -#if !GlxBuiltInR128 -REQUIREDLIBS += -L../../../.. -lGL -#endif - - -#if !GlxUseBuiltInDRIDriver -#undef DoNormalLib NormalLibGlx -#undef DoExtraLib SharedLibGlx -#undef DoDebugLib DebugLibGlx -#undef DoProfileLib ProfileLibGlx -#endif - #include LibraryObjectRule() -SubdirLibraryRule($(OBJS)) +SubdirLibraryRule($(R128OBJS)) NormalLintTarget($(SRCS)) #if !GlxUseBuiltInDRIDriver LIBNAME = r128_dri.so -ALL_OBJS = $(OBJS) -ALL_DEPS = DONE -SharedDepModuleTarget($(LIBNAME),$(ALL_DEPS),$(ALL_OBJS)) +SharedDriModuleTarget($(LIBNAME),DONE $(OBJS),$(OBJS)) InstallDynamicModule($(LIBNAME),$(MODULEDIR),dri) #ifdef GlxSoProf SOPROF_LIBNAME = _r128_dri_p -NormalDepLibraryTarget($(SOPROF_LIBNAME),$(ALL_DEPS),$(ALL_OBJS)) +NormalDepLibraryTarget($(SOPROF_LIBNAME),DONE $(OBJS),$(ALL_OBJS)) InstallLibrary($(SOPROF_LIBNAME),$(MODULEDIR)/dri) #endif #endif DependTarget() + Index: xc/lib/GL/mesa/src/drv/r128/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/drv/r128/Imakefile.inc:1.3 --- /dev/null Mon Jun 4 12:37:33 2001 +++ xc/lib/GL/mesa/src/drv/r128/Imakefile.inc Wed May 2 11:06:04 2001 @@ -0,0 +1,125 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/r128/Imakefile.inc,v 1.3 2001/05/02 15:06:04 dawes Exp $ + +#ifndef MesaDrvSrcDir +#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv +#endif + +MESADRVSRCDIR = MesaDrvSrcDir + +#ifndef MesaDrvR128BuildDir +#define MesaDrvR128BuildDir /**/ +#endif +MESADRVR128BUILDDIR = MesaDrvR128BuildDir + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + +#if BuildXF86DRI + DRI_DEFINES = GlxDefines -DX_BYTE_ORDER=ByteOrder + DRI_INCLUDES = -I$(GLXLIBSRC)/dri -I$(GLXLIBSRC)/glx \ + -I$(INCLUDESRC) -I$(INCLUDESRC)/GL \ + -I$(GLXLIBSRC)/mesa/dri \ + -I$(SERVERSRC)/GL/dri \ + -I$(XF86OSSRC) \ + -I$(XF86DRIVERSRC)/ati \ + -I$(XF86COMSRC) \ + -I$(GLXLIBSRC)/dri/drm +#endif + +MESA_INCLUDES = -I$(MESASRCDIR)/src -I$(MESADRVSRCDIR)/common \ + -I$(MESADRVSRCDIR)/r128 + X_INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) + + R128SRCS = $(MESADRVR128BUILDDIR)r128_context.c \ + $(MESADRVR128BUILDDIR)r128_dd.c \ + $(MESADRVR128BUILDDIR)r128_fastpath.c \ + $(MESADRVR128BUILDDIR)r128_eltpath.c \ + $(MESADRVR128BUILDDIR)r128_ioctl.c \ + $(MESADRVR128BUILDDIR)r128_lock.c \ + $(MESADRVR128BUILDDIR)r128_pipeline.c \ + $(MESADRVR128BUILDDIR)r128_screen.c \ + $(MESADRVR128BUILDDIR)r128_span.c \ + $(MESADRVR128BUILDDIR)r128_state.c \ + $(MESADRVR128BUILDDIR)r128_tex.c \ + $(MESADRVR128BUILDDIR)r128_tris.c \ + $(MESADRVR128BUILDDIR)r128_vb.c \ + $(MESADRVR128BUILDDIR)r128_xmesa.c + + R128OBJS = $(MESADRVR128BUILDDIR)r128_context.o \ + $(MESADRVR128BUILDDIR)r128_dd.o \ + $(MESADRVR128BUILDDIR)r128_fastpath.o \ + $(MESADRVR128BUILDDIR)r128_eltpath.o \ + $(MESADRVR128BUILDDIR)r128_ioctl.o \ + $(MESADRVR128BUILDDIR)r128_lock.o \ + $(MESADRVR128BUILDDIR)r128_pipeline.o \ + $(MESADRVR128BUILDDIR)r128_screen.o \ + $(MESADRVR128BUILDDIR)r128_span.o \ + $(MESADRVR128BUILDDIR)r128_state.o \ + $(MESADRVR128BUILDDIR)r128_tex.o \ + $(MESADRVR128BUILDDIR)r128_tris.o \ + $(MESADRVR128BUILDDIR)r128_vb.o \ + $(MESADRVR128BUILDDIR)r128_xmesa.o + + R128UOBJS = $(MESADRVR128BUILDDIR)unshared/r128_context.o \ + $(MESADRVR128BUILDDIR)unshared/r128_dd.o \ + $(MESADRVR128BUILDDIR)unshared/r128_fastpath.o \ + $(MESADRVR128BUILDDIR)unshared/r128_eltpath.o \ + $(MESADRVR128BUILDDIR)unshared/r128_ioctl.o \ + $(MESADRVR128BUILDDIR)unshared/r128_lock.o \ + $(MESADRVR128BUILDDIR)unshared/r128_pipeline.o \ + $(MESADRVR128BUILDDIR)unshared/r128_screen.o \ + $(MESADRVR128BUILDDIR)unshared/r128_span.o \ + $(MESADRVR128BUILDDIR)unshared/r128_state.o \ + $(MESADRVR128BUILDDIR)unshared/r128_tex.o \ + $(MESADRVR128BUILDDIR)unshared/r128_tris.o \ + $(MESADRVR128BUILDDIR)unshared/r128_vb.o \ + $(MESADRVR128BUILDDIR)unshared/r128_xmesa.o + + R128DOBJS = $(MESADRVR128BUILDDIR)debugger/r128_context.o \ + $(MESADRVR128BUILDDIR)debugger/r128_dd.o \ + $(MESADRVR128BUILDDIR)debugger/r128_fastpath.o \ + $(MESADRVR128BUILDDIR)debugger/r128_eltpath.o \ + $(MESADRVR128BUILDDIR)debugger/r128_ioctl.o \ + $(MESADRVR128BUILDDIR)debugger/r128_lock.o \ + $(MESADRVR128BUILDDIR)debugger/r128_pipeline.o \ + $(MESADRVR128BUILDDIR)debugger/r128_screen.o \ + $(MESADRVR128BUILDDIR)debugger/r128_span.o \ + $(MESADRVR128BUILDDIR)debugger/r128_state.o \ + $(MESADRVR128BUILDDIR)debugger/r128_tex.o \ + $(MESADRVR128BUILDDIR)debugger/r128_tris.o \ + $(MESADRVR128BUILDDIR)debugger/r128_vb.o \ + $(MESADRVR128BUILDDIR)debugger/r128_xmesa.o + + R128POBJS = $(MESADRVR128BUILDDIR)profiled/r128_context.o \ + $(MESADRVR128BUILDDIR)profiled/r128_dd.o \ + $(MESADRVR128BUILDDIR)profiled/r128_fastpath.o \ + $(MESADRVR128BUILDDIR)profiled/r128_eltpath.o \ + $(MESADRVR128BUILDDIR)profiled/r128_ioctl.o \ + $(MESADRVR128BUILDDIR)profiled/r128_lock.o \ + $(MESADRVR128BUILDDIR)profiled/r128_pipeline.o \ + $(MESADRVR128BUILDDIR)profiled/r128_screen.o \ + $(MESADRVR128BUILDDIR)profiled/r128_span.o \ + $(MESADRVR128BUILDDIR)profiled/r128_state.o \ + $(MESADRVR128BUILDDIR)profiled/r128_tex.o \ + $(MESADRVR128BUILDDIR)profiled/r128_tris.o \ + $(MESADRVR128BUILDDIR)profiled/r128_vb.o \ + $(MESADRVR128BUILDDIR)profiled/r128_xmesa.o + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(r128_context.c, $(MESADRVSRCDIR)/r128) +LinkSourceFile(r128_dd.c, $(MESADRVSRCDIR)/r128) +LinkSourceFile(r128_fastpath.c, $(MESADRVSRCDIR)/r128) +LinkSourceFile(r128_eltpath.c, $(MESADRVSRCDIR)/r128) +LinkSourceFile(r128_ioctl.c, $(MESADRVSRCDIR)/r128) +LinkSourceFile(r128_lock.c, $(MESADRVSRCDIR)/r128) +LinkSourceFile(r128_pipeline.c, $(MESADRVSRCDIR)/r128) +LinkSourceFile(r128_screen.c, $(MESADRVSRCDIR)/r128) +LinkSourceFile(r128_span.c, $(MESADRVSRCDIR)/r128) +LinkSourceFile(r128_state.c, $(MESADRVSRCDIR)/r128) +LinkSourceFile(r128_tex.c, $(MESADRVSRCDIR)/r128) +LinkSourceFile(r128_tris.c, $(MESADRVSRCDIR)/r128) +LinkSourceFile(r128_vb.c, $(MESADRVSRCDIR)/r128) +LinkSourceFile(r128_xmesa.c, $(MESADRVSRCDIR)/r128) +#endif + Index: xc/lib/GL/mesa/src/drv/r128/r128_context.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_context.c:1.4 xc/lib/GL/mesa/src/drv/r128/r128_context.c:1.6 --- xc/lib/GL/mesa/src/drv/r128/r128_context.c:1.4 Tue Dec 12 12:17:06 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_context.c Wed Mar 21 11:14:23 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_context.c,v 1.4 2000/12/12 17:17:06 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_context.c,v 1.6 2001/03/21 16:14:23 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -60,188 +60,176 @@ ); #endif -/* Create the device specific context */ -GLboolean r128CreateContext(Display *dpy, GLvisual *glVisual, - __DRIcontextPrivate *driContextPriv) +/* Create the device specific context. + */ +GLboolean r128CreateContext( Display *dpy, GLvisual *glVisual, + __DRIcontextPrivate *driContextPriv ) { - r128ContextPtr r128ctx; - r128ScreenPtr r128scrn; - GLcontext *ctx = driContextPriv->mesaContext; - int i; - char *v; - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; - - r128ctx = (r128ContextPtr)Xcalloc(1, sizeof(*r128ctx)); - if (!r128ctx) return GL_FALSE; - - /* Initialize r128Context */ - r128ctx->glCtx = ctx; - r128ctx->display = dpy; - - r128ctx->driContext = driContextPriv; - r128ctx->driScreen = sPriv; - r128ctx->driDrawable = NULL; /* Set by XMesaMakeCurrent */ - - r128ctx->hHWContext = driContextPriv->hHWContext; - r128ctx->driFd = sPriv->fd; - r128ctx->driHwLock = &sPriv->pSAREA->lock; - - r128scrn = r128ctx->r128Screen = (r128ScreenPtr)(sPriv->private); - - r128ctx->sarea = (R128SAREAPriv *)((char *)sPriv->pSAREA + - sizeof(XF86DRISAREARec)); - - r128ctx->CurrentTexObj[0] = NULL; - r128ctx->CurrentTexObj[1] = NULL; - make_empty_list(&r128ctx->SwappedOut); - for (i = 0; i < r128scrn->NRTexHeaps; i++) { - make_empty_list(&r128ctx->TexObjList[i]); - r128ctx->texHeap[i] = mmInit(0, r128scrn->texSize[i]); - r128ctx->lastTexAge[i] = -1; - } - r128ctx->lastTexHeap = r128scrn->NRTexHeaps; - - r128ctx->DepthSize = glVisual->DepthBits; - r128ctx->StencilSize = glVisual->StencilBits; - - r128ctx->useFastPath = GL_FALSE; - r128ctx->lod_bias = 0x3f; - - r128ctx->num_verts = 0; - r128ctx->vert_buf = NULL; - - r128ctx->elt_buf = NULL; - r128ctx->retained_buf = NULL; - r128ctx->vert_heap = r128ctx->r128Screen->buffers->list->address; - -#if 0 - r128ctx->CCEbuf= (CARD32 *)MALLOC(sizeof(*r128ctx->CCEbuf) * - r128scrn->ringEntries); - r128ctx->CCEcount = 0; -#endif + GLcontext *ctx = driContextPriv->mesaContext; + __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + r128ContextPtr rmesa; + r128ScreenPtr r128scrn; + int i; + + rmesa = (r128ContextPtr) CALLOC( sizeof(*rmesa) ); + if ( !rmesa ) return GL_FALSE; + + rmesa->glCtx = ctx; + rmesa->display = dpy; + + rmesa->driContext = driContextPriv; + rmesa->driScreen = sPriv; + rmesa->driDrawable = NULL; /* Set by XMesaMakeCurrent */ + + rmesa->hHWContext = driContextPriv->hHWContext; + rmesa->driHwLock = &sPriv->pSAREA->lock; + rmesa->driFd = sPriv->fd; + + r128scrn = rmesa->r128Screen = (r128ScreenPtr)(sPriv->private); + + rmesa->sarea = (R128SAREAPrivPtr)((char *)sPriv->pSAREA + + r128scrn->sarea_priv_offset); + + rmesa->tmp_matrix = (GLfloat *) ALIGN_MALLOC( 16 * sizeof(GLfloat), 16 ); + if ( !rmesa->tmp_matrix ) { + FREE( rmesa ); + return GL_FALSE; + } + + rmesa->CurrentTexObj[0] = NULL; + rmesa->CurrentTexObj[1] = NULL; + + make_empty_list( &rmesa->SwappedOut ); + + for ( i = 0 ; i < r128scrn->numTexHeaps ; i++ ) { + make_empty_list( &rmesa->TexObjList[i] ); + rmesa->texHeap[i] = mmInit( 0, r128scrn->texSize[i] ); + rmesa->lastTexAge[i] = -1; + } + rmesa->lastTexHeap = r128scrn->numTexHeaps; + + rmesa->RenderIndex = -1; /* Impossible value */ + rmesa->OnFastPath = 0; + + rmesa->vert_buf = NULL; + rmesa->num_verts = 0; + + rmesa->elt_buf = NULL; + rmesa->retained_buf = NULL; + rmesa->vert_heap = r128scrn->buffers->list->address; + + /* KW: Set the maximum texture size small enough that we can + * guarentee that both texture units can bind a maximal texture + * and have them both in on-card memory at once. (Kevin or + * Gareth: Please check these numbers are OK) + */ + if ( r128scrn->texSize[0] < 2*1024*1024 ) { + ctx->Const.MaxTextureLevels = 9; + ctx->Const.MaxTextureSize = (1 << 8); + } else if ( r128scrn->texSize[0] < 8*1024*1024 ) { + ctx->Const.MaxTextureLevels = 10; + ctx->Const.MaxTextureSize = (1 << 9); + } else { + ctx->Const.MaxTextureLevels = 11; + ctx->Const.MaxTextureSize = (1 << 10); + } - if ((v = getenv("LIBGL_CCE_TIMEOUT"))) - r128ctx->CCEtimeout = strtoul(v, NULL, 10); - else - r128ctx->CCEtimeout = (R128_DEFAULT_TOTAL_CCE_TIMEOUT / - R128_DEFAULT_CCE_TIMEOUT); - if (r128ctx->CCEtimeout <= 0) r128ctx->CCEtimeout = 1; - - /* Initialize GLcontext */ - ctx->DriverCtx = (void *)r128ctx; - - r128DDInitExtensions(ctx); - - r128DDInitDriverFuncs(ctx); - r128DDInitIoctlFuncs(ctx); - r128DDInitStateFuncs(ctx); - r128DDInitSpanFuncs(ctx); - r128DDInitTextureFuncs(ctx); - - ctx->Driver.TriangleCaps = (DD_TRI_CULL - | DD_TRI_LIGHT_TWOSIDE - | DD_TRI_OFFSET); - - /* Ask Mesa to clip fog coordinates for us - */ - ctx->TriangleCaps |= DD_CLIP_FOG_COORD; - - /* Reset Mesa's current 2D texture pointers to the driver's textures */ - ctx->Shared->DefaultD[2][0].DriverData = NULL; - ctx->Shared->DefaultD[2][1].DriverData = NULL; - - /* KW: Set the maximum texture size small enough that we can - * guarentee that both texture units can bind a maximal texture - * and have them both in on-card memory at once. (Kevin or - * Gareth: Please check these numbers are OK) - */ - if (r128scrn->texSize[0] < 2*1024*1024) { - ctx->Const.MaxTextureLevels = 9; - ctx->Const.MaxTextureSize = 1<<8; - } else if (r128scrn->texSize[0] < 8*1024*1024) { - ctx->Const.MaxTextureLevels = 10; - ctx->Const.MaxTextureSize = 1<<9; - } else { - ctx->Const.MaxTextureLevels = 11; - ctx->Const.MaxTextureSize = 1<<10; - } + ctx->Const.MaxTextureUnits = 2; - ctx->Const.MaxTextureUnits = 2; - #if ENABLE_PERF_BOXES - if (getenv("LIBGL_PERFORMANCE_BOXES")) - r128ctx->boxes = 1; - else - r128ctx->boxes = 0; + if ( getenv( "LIBGL_PERFORMANCE_BOXES" ) ) { + rmesa->boxes = 1; + } else { + rmesa->boxes = 0; + } #endif - /* If Mesa has current a vertex buffer, make sure the driver's VB - data is up to date */ - if (ctx->VB) r128DDRegisterVB(ctx->VB); - - /* Register the fast path */ - if (ctx->NrPipelineStages) - ctx->NrPipelineStages = - r128DDRegisterPipelineStages(ctx->PipelineStage, - ctx->PipelineStage, - ctx->NrPipelineStages); + ctx->DriverCtx = (void *)rmesa; - r128DDInitState(r128ctx); + r128DDInitExtensions( ctx ); - driContextPriv->driverPrivate = (void *)r128ctx; + r128DDInitDriverFuncs( ctx ); + r128DDInitIoctlFuncs( ctx ); + r128DDInitStateFuncs( ctx ); + r128DDInitSpanFuncs( ctx ); + r128DDInitTextureFuncs( ctx ); - return GL_TRUE; -} + ctx->Driver.TriangleCaps = (DD_TRI_CULL | + DD_TRI_LIGHT_TWOSIDE | + DD_TRI_STIPPLE | + DD_TRI_OFFSET); -/* Destroy the device specific context */ -void r128DestroyContext(r128ContextPtr r128ctx) -{ - if (r128ctx) { - r128TexObjPtr t, next_t; - int i; + /* Ask Mesa to clip fog coordinates for us. + */ + ctx->TriangleCaps |= DD_CLIP_FOG_COORD; -#if 0 - FREE( r128ctx->CCEbuf ); -#endif + if ( ctx->VB ) + r128DDRegisterVB( ctx->VB ); + + if ( ctx->NrPipelineStages ) { + ctx->NrPipelineStages = + r128DDRegisterPipelineStages( ctx->PipelineStage, + ctx->PipelineStage, + ctx->NrPipelineStages ); + } - for (i = 0; i < r128ctx->r128Screen->NRTexHeaps; i++) { - foreach_s (t, next_t, &r128ctx->TexObjList[i]) - r128DestroyTexObj(r128ctx, t); - } + r128DDInitState( rmesa ); - foreach_s (t, next_t, &r128ctx->SwappedOut) - r128DestroyTexObj(r128ctx, t); + driContextPriv->driverPrivate = (void *)rmesa; - Xfree(r128ctx); - } + return GL_TRUE; +} +/* Destroy the device specific context. + */ +void r128DestroyContext( r128ContextPtr rmesa ) +{ + if ( rmesa ) { + r128TexObjPtr t, next_t; + int i; + + for ( i = 0 ; i < rmesa->r128Screen->numTexHeaps ; i++ ) { + foreach_s ( t, next_t, &rmesa->TexObjList[i] ) { + r128DestroyTexObj( rmesa, t ); + } + mmDestroy( rmesa->texHeap[i] ); + } + + foreach_s ( t, next_t, &rmesa->SwappedOut ) { + r128DestroyTexObj( rmesa, t ); + } + + ALIGN_FREE( rmesa->tmp_matrix ); + FREE( rmesa ); + } + #if 0 - glx_fini_prof(); + /* Use this to force shared object profiling. */ + glx_fini_prof(); #endif } /* Load the device specific context into the hardware. The actual - setting of the hardware state is done in the r128UpdateHWState(). */ -r128ContextPtr r128MakeCurrent(r128ContextPtr oldCtx, - r128ContextPtr newCtx, - __DRIdrawablePrivate *dPriv) + * setting of the hardware state is done in the r128UpdateHWState(). + */ +r128ContextPtr r128MakeCurrent( r128ContextPtr oldCtx, + r128ContextPtr newCtx, + __DRIdrawablePrivate *dPriv ) { - if (oldCtx) { - if (!R128CCE_USE_RING_BUFFER(newCtx->r128Screen->CCEMode)) - newCtx->dirty |= R128_REQUIRE_QUIESCENCE; - if (oldCtx != newCtx) { - newCtx->new_state |= R128_NEW_CONTEXT; - newCtx->dirty = R128_UPLOAD_ALL; - } - if (oldCtx->driDrawable != dPriv) { - newCtx->new_state |= R128_NEW_WINDOW; - } - } else { - newCtx->new_state |= R128_NEW_CONTEXT; - newCtx->dirty = R128_UPLOAD_ALL; - } + if ( oldCtx ) { + if ( oldCtx != newCtx ) { + newCtx->new_state |= R128_NEW_CONTEXT; + newCtx->dirty = R128_UPLOAD_ALL; + } + if ( oldCtx->driDrawable != dPriv ) { + newCtx->new_state |= R128_NEW_WINDOW | R128_NEW_CLIP; + } + } else { + newCtx->new_state |= R128_NEW_CONTEXT; + newCtx->dirty = R128_UPLOAD_ALL; + } - newCtx->driDrawable = dPriv; + newCtx->driDrawable = dPriv; - return newCtx; + return newCtx; } Index: xc/lib/GL/mesa/src/drv/r128/r128_context.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_context.h:1.4 xc/lib/GL/mesa/src/drv/r128/r128_context.h:1.8 --- xc/lib/GL/mesa/src/drv/r128/r128_context.h:1.4 Tue Dec 12 12:17:06 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_context.h Tue Apr 10 13:53:07 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_context.h,v 1.4 2000/12/12 17:17:06 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_context.h,v 1.8 2001/04/10 17:53:07 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -33,8 +33,8 @@ * */ -#ifndef _R128_CONTEXT_H_ -#define _R128_CONTEXT_H_ +#ifndef __R128_CONTEXT_H__ +#define __R128_CONTEXT_H__ #ifdef GLX_DIRECT_RENDERING @@ -67,7 +67,7 @@ #define R128_NEW_CLIP 0x0008 #define R128_NEW_CULL 0x0010 #define R128_NEW_MASKS 0x0020 -#define R128_NEW_RENDER 0x0040 +#define R128_NEW_RENDER_NOT 0x0040 #define R128_NEW_WINDOW 0x0080 #define R128_NEW_TEXTURE 0x0100 #define R128_NEW_CONTEXT 0x0200 @@ -88,11 +88,17 @@ #define R128_BLEND_ENV_COLOR 0x1 #define R128_BLEND_MULTITEX 0x2 -/* Subpixel offsets for window coordinates: +/* Subpixel offsets for window coordinates (triangles): */ -#define SUBPIXEL_X (-0.125F) -#define SUBPIXEL_Y ( 0.375F) +#define SUBPIXEL_X (0.0F) +#define SUBPIXEL_Y (0.125F) +/* Offset for points: + */ +#define PNT_X_OFFSET ( 0.125F) +#define PNT_Y_OFFSET (-0.125F) + + typedef void (*r128_interp_func)( GLfloat t, GLfloat *result, const GLfloat *in, @@ -101,171 +107,180 @@ struct r128_elt_tab { void (*emit_unclipped_verts)( struct vertex_buffer *VB ); - void (*build_tri_verts)( r128ContextPtr r128ctx, + void (*build_tri_verts)( r128ContextPtr rmesa, struct vertex_buffer *VB, GLfloat *O, GLuint *elt ); void (*interp)( GLfloat t, GLfloat *O, const GLfloat *I, const GLfloat *J ); - void (*project_and_emit_verts)( r128ContextPtr r128ctx, + void (*project_and_emit_verts)( r128ContextPtr rmesa, const GLfloat *verts, GLuint *elts, - int nr ); + GLuint nr ); }; struct r128_context { - GLcontext *glCtx; /* Mesa context */ + GLcontext *glCtx; /* Mesa context */ /* Driver and hardware state management */ - GLuint new_state; - GLuint dirty; /* Hardware state to be updated */ - r128_context_regs_t setup; - - GLuint vertsize; - CARD32 vc_format; - GLfloat depth_scale; - - CARD32 Color; /* Current draw color */ - CARD32 ClearColor; /* Color used to clear color buffer */ - CARD32 ClearDepth; /* Value used to clear depth buffer */ - CARD32 ClearStencil; /* Value used to clear stencil */ + GLuint new_state; + GLuint dirty; /* Hardware state to be updated */ + r128_context_regs_t setup; + + GLuint vertsize; + GLuint vc_format; + GLfloat depth_scale; + + GLuint Color; /* Current draw color */ + GLuint ClearColor; /* Color used to clear color buffer */ + GLuint ClearDepth; /* Value used to clear depth buffer */ + GLuint ClearStencil; /* Value used to clear stencil */ + GLuint DepthMask; + GLuint StencilMask; /* Map GL texture units onto hardware */ - GLint multitex; - GLint tmu_source[2]; - GLint tex_dest[2]; - GLuint blend_flags; - CARD32 env_color; - GLint lod_bias; + GLint multitex; + GLint tmu_source[2]; + GLint tex_dest[2]; + GLuint tex_combine[2]; + GLuint blend_flags; + GLuint env_color; /* Texture object bookkeeping */ - r128TexObjPtr CurrentTexObj[2]; - r128TexObj TexObjList[R128_NR_TEX_HEAPS]; - r128TexObj SwappedOut; - memHeap_t *texHeap[R128_NR_TEX_HEAPS]; - GLint lastTexAge[R128_NR_TEX_HEAPS]; - GLint lastTexHeap; + r128TexObjPtr CurrentTexObj[2]; + r128TexObj TexObjList[R128_NR_TEX_HEAPS]; + r128TexObj SwappedOut; + memHeap_t *texHeap[R128_NR_TEX_HEAPS]; + GLint lastTexAge[R128_NR_TEX_HEAPS]; + GLint lastTexHeap; /* Current rendering state, fallbacks */ - points_func PointsFunc; - line_func LineFunc; - triangle_func TriangleFunc; - quad_func QuadFunc; + points_func PointsFunc; + line_func LineFunc; + triangle_func TriangleFunc; + quad_func QuadFunc; - CARD32 IndirectTriangles; - CARD32 Fallback; + GLuint IndirectTriangles; + GLuint Fallback; /* Fast path */ - GLuint useFastPath; - GLuint SetupIndex; - GLuint SetupDone; - GLuint RenderIndex; - r128_interp_func interp; + GLuint SetupIndex; + GLuint SetupDone; + GLuint RenderIndex; + GLuint OnFastPath; + r128_interp_func interp; + GLfloat *tmp_matrix; /* Vertex buffers */ - drmBufPtr vert_buf; - GLuint num_verts; + drmBufPtr vert_buf; + GLuint num_verts; /* Elt path */ - drmBufPtr elt_buf, retained_buf; - GLushort *first_elt, *next_elt; - GLfloat *next_vert, *vert_heap; - GLushort next_vert_index; - GLushort first_vert_index; - GLuint elt_vertsize; - struct r128_elt_tab *elt_tab; - GLfloat device_matrix[16]; - - /* CCE command packets - */ -#if 0 - CARD32 *CCEbuf; /* buffer to submit to CCE */ - GLuint CCEcount; /* number of dwords in CCEbuf */ -#endif - GLint CCEtimeout; /* number of times to loop - before exiting */ + drmBufPtr elt_buf, retained_buf; + GLushort *first_elt, *next_elt; + GLfloat *next_vert, *vert_heap; + GLushort next_vert_index; + GLushort first_vert_index; + GLuint elt_vertsize; + struct r128_elt_tab *elt_tab; + GLfloat device_matrix[16]; - /* Visual, drawable, cliprect and scissor information + /* Page flipping */ - GLint DepthSize; /* Bits in depth buffer */ - GLint StencilSize; /* Bits in stencil buffer */ + GLuint doPageFlip; + GLuint currentPage; - GLenum DrawBuffer; /* Optimize draw buffer update */ - GLint drawOffset, drawPitch; - GLint drawX, drawY; - GLint readOffset, readPitch; - GLint readX, readY; + /* Drawable, cliprect and scissor information + */ + GLenum DrawBuffer; /* Optimize draw buffer update */ + GLint drawOffset, drawPitch; + GLint readOffset, readPitch; - GLuint numClipRects; /* Cliprects for the draw buffer */ - XF86DRIClipRectPtr pClipRects; + GLuint numClipRects; /* Cliprects for the draw buffer */ + XF86DRIClipRectPtr pClipRects; - GLuint scissor; - XF86DRIClipRectRec ScissorRect; /* Current software scissor */ + GLuint scissor; + XF86DRIClipRectRec ScissorRect; /* Current software scissor */ /* Mirrors of some DRI state */ - Display *display; /* X server display */ + Display *display; /* X server display */ __DRIcontextPrivate *driContext; /* DRI context */ __DRIscreenPrivate *driScreen; /* DRI screen */ __DRIdrawablePrivate *driDrawable; /* DRI drawable bound to this ctx */ + + int lastStamp; /* mirror driDrawable->lastStamp */ - drmContext hHWContext; - drmLock *driHwLock; - int driFd; + drmContext hHWContext; + drmLock *driHwLock; + int driFd; - r128ScreenPtr r128Screen; /* Screen private DRI data */ - R128SAREAPriv *sarea; /* Private SAREA data */ + r128ScreenPtr r128Screen; /* Screen private DRI data */ + R128SAREAPrivPtr sarea; /* Private SAREA data */ /* Performance counters - */ - GLuint boxes; /* Draw performance boxes */ - GLuint hardwareWentIdle; - GLuint c_clears; - GLuint c_drawWaits; - GLuint c_textureSwaps; - GLuint c_textureBytes; - GLuint c_vertexBuffers; + */ + GLuint boxes; /* Draw performance boxes */ + GLuint hardwareWentIdle; + GLuint c_clears; + GLuint c_drawWaits; + GLuint c_textureSwaps; + GLuint c_textureBytes; + GLuint c_vertexBuffers; }; #define R128_CONTEXT(ctx) ((r128ContextPtr)(ctx->DriverCtx)) -#define R128_MESACTX(r128ctx) ((r128ctx)->glCtx) -#define R128_DRIDRAWABLE(r128ctx) ((r128ctx)->driDrawable) -#define R128_DRISCREEN(r128ctx) ((r128ctx)->r128Screen->driScreen) - -#define R128_IS_PLAIN( r128ctx ) \ - (r128ctx->r128Screen->chipset == R128_CARD_TYPE_R128) -#define R128_IS_PRO( r128ctx ) \ - (r128ctx->r128Screen->chipset == R128_CARD_TYPE_R128_PRO) -#define R128_IS_MOBILITY( r128ctx ) \ - (r128ctx->r128Screen->chipset == R128_CARD_TYPE_R128_MOBILITY) - - -extern GLboolean r128CreateContext(Display *dpy, GLvisual *glVisual, - __DRIcontextPrivate *driContextPriv); -extern void r128DestroyContext(r128ContextPtr r128ctx); -extern r128ContextPtr r128MakeCurrent(r128ContextPtr oldCtx, - r128ContextPtr newCtx, - __DRIdrawablePrivate *dPriv); +#define R128_IS_PLAIN( rmesa ) \ + (rmesa->r128Screen->chipset == R128_CARD_TYPE_R128) +#define R128_IS_PRO( rmesa ) \ + (rmesa->r128Screen->chipset == R128_CARD_TYPE_R128_PRO) +#define R128_IS_MOBILITY( rmesa ) \ + (rmesa->r128Screen->chipset == R128_CARD_TYPE_R128_MOBILITY) +extern GLboolean r128CreateContext( Display *dpy, GLvisual *glVisual, + __DRIcontextPrivate *driContextPriv ); +extern void r128DestroyContext( r128ContextPtr rmesa ); +extern r128ContextPtr r128MakeCurrent( r128ContextPtr oldCtx, + r128ContextPtr newCtx, + __DRIdrawablePrivate *dPriv ); + +/* ================================================================ + * Byte ordering + */ +#include "X11/Xarch.h" + +#if X_BYTE_ORDER == X_LITTLE_ENDIAN +#define LE32_OUT( x, y ) do { x = y; } while (0) +#define LE32_OUT_FLOAT( x, y ) do { *(GLfloat *)&(x) = y; } while (0) +#else +#include +#define LE32_OUT( x, y ) do { x = bswap_32( y ); } while (0) +#define LE32_OUT_FLOAT( x, y ) \ +do { \ + GLuint __tmp; \ + *(GLfloat *)&__tmp = y; \ + x = bswap_32( __tmp ); \ +} while (0) +#endif + /* ================================================================ * Debugging: */ -#define DEBUG 0 -#define DEBUG_LOCKING 0 +#define DO_DEBUG 0 #define ENABLE_PERF_BOXES 0 -#if DEBUG +#if DO_DEBUG extern int R128_DEBUG; #else #define R128_DEBUG 0 @@ -280,4 +295,4 @@ #define DEBUG_VERBOSE_2D 0x40 #endif -#endif /* _R128_CONTEXT_H_ */ +#endif /* __R128_CONTEXT_H__ */ Index: xc/lib/GL/mesa/src/drv/r128/r128_dd.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_dd.c:1.6 xc/lib/GL/mesa/src/drv/r128/r128_dd.c:1.12 --- xc/lib/GL/mesa/src/drv/r128/r128_dd.c:1.6 Fri Dec 15 17:48:38 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_dd.c Tue Apr 10 12:07:52 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_dd.c,v 1.6 2000/12/15 22:48:38 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_dd.c,v 1.12 2001/04/10 16:07:52 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -28,8 +28,8 @@ /* * Authors: - * Kevin E. Martin * Gareth Hughes + * Kevin E. Martin * */ @@ -45,43 +45,48 @@ #include "X86/common_x86_asm.h" #endif -#define R128_DATE "20001215" +#define R128_DATE "20010405" -/* Return the current color buffer size */ + +/* Return the width and height of the current color buffer. + */ static void r128DDGetBufferSize( GLcontext *ctx, GLuint *width, GLuint *height ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - *width = r128ctx->driDrawable->w; - *height = r128ctx->driDrawable->h; + LOCK_HARDWARE( rmesa ); + *width = rmesa->driDrawable->w; + *height = rmesa->driDrawable->h; + UNLOCK_HARDWARE( rmesa ); } -/* Return various strings for glGetString() */ +/* Return various strings for glGetString(). + */ static const GLubyte *r128DDGetString( GLcontext *ctx, GLenum name ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); - static GLubyte buffer[128]; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + static char buffer[128]; switch ( name ) { case GL_VENDOR: - return (const GLubyte *)"VA Linux Systems, Inc."; + return (GLubyte *)"VA Linux Systems, Inc."; case GL_RENDERER: - sprintf((void *)buffer, "Mesa DRI Rage128 " R128_DATE ); + sprintf( buffer, "Mesa DRI Rage128 " R128_DATE ); /* Append any chipset-specific information. */ - if ( R128_IS_PRO( r128ctx ) ) { + if ( R128_IS_PRO( rmesa ) ) { strncat( buffer, " Pro", 4 ); } - if ( R128_IS_MOBILITY( r128ctx ) ) { + if ( R128_IS_MOBILITY( rmesa ) ) { strncat( buffer, " M3", 3 ); } - /* Append any AGP-specific information. + /* Append any AGP/PCI-specific information. */ - switch ( r128ctx->r128Screen->AGPMode ) { + switch ( rmesa->r128Screen->AGPMode ) { case 1: strncat( buffer, " AGP 1x", 7 ); break; @@ -100,6 +105,11 @@ strncat( buffer, " x86", 4 ); } #endif +#ifdef USE_MMX_ASM + if ( cpu_has_mmx ) { + strncat( buffer, "/MMX", 4 ); + } +#endif #ifdef USE_3DNOW_ASM if ( cpu_has_3dnow ) { strncat( buffer, "/3DNow!", 7 ); @@ -110,7 +120,7 @@ strncat( buffer, "/SSE", 4 ); } #endif - return buffer; + return (GLubyte *)buffer; default: return NULL; @@ -124,19 +134,19 @@ */ static void r128DDFlush( GLcontext *ctx ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - FLUSH_BATCH( r128ctx ); + FLUSH_BATCH( rmesa ); #if ENABLE_PERF_BOXES - if ( r128ctx->boxes ) { - LOCK_HARDWARE( r128ctx ); - r128PerformanceBoxesLocked( r128ctx ); - UNLOCK_HARDWARE( r128ctx ); + if ( rmesa->boxes ) { + LOCK_HARDWARE( rmesa ); + r128PerformanceBoxesLocked( rmesa ); + UNLOCK_HARDWARE( rmesa ); } /* Log the performance counters if necessary */ - r128PerformanceCounters( r128ctx ); + r128PerformanceCounters( rmesa ); #endif } @@ -145,21 +155,22 @@ */ static void r128DDFinish( GLcontext *ctx ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); #if ENABLE_PERF_BOXES /* Bump the performance counter */ - r128ctx->c_drawWaits++; + rmesa->c_drawWaits++; #endif r128DDFlush( ctx ); - r128WaitForIdle( r128ctx ); + r128WaitForIdle( rmesa ); } -/* Return various parameters requested by Mesa (this is deprecated) */ +/* Return various parameters requested by Mesa (this is deprecated). + */ static GLint r128DDGetParameteri( const GLcontext *ctx, GLint param ) { - switch (param) { + switch ( param ) { case DD_HAVE_HARDWARE_FOG: return 1; default: @@ -167,45 +178,50 @@ } } -/* Initialize the extensions supported by this driver */ +/* Initialize the extensions supported by this driver. + */ void r128DDInitExtensions( GLcontext *ctx ) { - /* FIXME: Are there other extensions to enable/disable??? */ - gl_extensions_disable( ctx, "GL_EXT_shared_texture_palette" ); - gl_extensions_disable( ctx, "GL_EXT_paletted_texture" ); - gl_extensions_disable( ctx, "GL_EXT_point_parameters" ); - gl_extensions_disable( ctx, "ARB_imaging" ); - gl_extensions_disable( ctx, "GL_EXT_blend_minmax" ); + gl_extensions_disable( ctx, "GL_ARB_imaging" ); + gl_extensions_disable( ctx, "GL_ARB_texture_compression" ); + gl_extensions_disable( ctx, "GL_ARB_texture_cube_map" ); + + gl_extensions_disable( ctx, "GL_EXT_blend_color" ); + gl_extensions_disable( ctx, "GL_EXT_blend_func_separate" ); gl_extensions_disable( ctx, "GL_EXT_blend_logic_op" ); + gl_extensions_disable( ctx, "GL_EXT_blend_minmax" ); gl_extensions_disable( ctx, "GL_EXT_blend_subtract" ); - gl_extensions_disable( ctx, "GL_INGR_blend_func_separate" ); + gl_extensions_disable( ctx, "GL_EXT_convolution" ); + gl_extensions_disable( ctx, "GL_EXT_paletted_texture" ); + gl_extensions_disable( ctx, "GL_EXT_point_parameters" ); + gl_extensions_disable( ctx, "GL_EXT_shared_texture_palette" ); + gl_extensions_disable( ctx, "GL_EXT_texture_env_combine" ); + + gl_extensions_disable( ctx, "GL_HP_occlusion_test" ); - if ( getenv( "LIBGL_NO_MULTITEXTURE" ) ) - gl_extensions_disable( ctx, "GL_ARB_multitexture" ); + gl_extensions_disable( ctx, "GL_INGR_blend_func_separate" ); gl_extensions_disable( ctx, "GL_SGI_color_matrix" ); gl_extensions_disable( ctx, "GL_SGI_color_table" ); gl_extensions_disable( ctx, "GL_SGIX_pixel_texture" ); - gl_extensions_disable( ctx, "GL_ARB_texture_cube_map" ); - gl_extensions_disable( ctx, "GL_ARB_texture_compression" ); - gl_extensions_disable( ctx, "GL_EXT_convolution" ); } -/* Initialize the driver's misc functions */ +/* Initialize the driver's misc functions. + */ void r128DDInitDriverFuncs( GLcontext *ctx ) { - ctx->Driver.GetBufferSize = r128DDGetBufferSize; - ctx->Driver.GetString = r128DDGetString; - ctx->Driver.Finish = r128DDFinish; - ctx->Driver.Flush = r128DDFlush; - - ctx->Driver.Error = NULL; - ctx->Driver.GetParameteri = r128DDGetParameteri; - - ctx->Driver.DrawPixels = NULL; - ctx->Driver.Bitmap = NULL; - - ctx->Driver.RegisterVB = r128DDRegisterVB; - ctx->Driver.UnregisterVB = r128DDUnregisterVB; - ctx->Driver.BuildPrecalcPipeline = r128DDBuildPrecalcPipeline; + ctx->Driver.GetBufferSize = r128DDGetBufferSize; + ctx->Driver.GetString = r128DDGetString; + ctx->Driver.Finish = r128DDFinish; + ctx->Driver.Flush = r128DDFlush; + + ctx->Driver.Error = NULL; + ctx->Driver.GetParameteri = r128DDGetParameteri; + + ctx->Driver.DrawPixels = NULL; + ctx->Driver.Bitmap = NULL; + + ctx->Driver.RegisterVB = r128DDRegisterVB; + ctx->Driver.UnregisterVB = r128DDUnregisterVB; + ctx->Driver.BuildPrecalcPipeline = r128DDBuildPrecalcPipeline; } Index: xc/lib/GL/mesa/src/drv/r128/r128_dd.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_dd.h:1.2 xc/lib/GL/mesa/src/drv/r128/r128_dd.h:1.3 --- xc/lib/GL/mesa/src/drv/r128/r128_dd.h:1.2 Mon Dec 4 14:21:45 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_dd.h Sun Jan 7 20:07:20 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_dd.h,v 1.2 2000/12/04 19:21:45 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_dd.h,v 1.3 2001/01/08 01:07:20 martin Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -28,18 +28,18 @@ /* * Authors: - * Kevin E. Martin * Gareth Hughes + * Kevin E. Martin * */ -#ifndef _R128_DD_H_ -#define _R128_DD_H_ +#ifndef __R128_DD_H__ +#define __R128_DD_H__ #ifdef GLX_DIRECT_RENDERING -extern void r128DDInitExtensions(GLcontext *ctx); -extern void r128DDInitDriverFuncs(GLcontext *ctx); +extern void r128DDInitExtensions( GLcontext *ctx ); +extern void r128DDInitDriverFuncs( GLcontext *ctx ); +#endif #endif -#endif /* _R128_DD_H_ */ Index: xc/lib/GL/mesa/src/drv/r128/r128_eltpath.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_eltpath.c:1.2 xc/lib/GL/mesa/src/drv/r128/r128_eltpath.c:1.4 --- xc/lib/GL/mesa/src/drv/r128/r128_eltpath.c:1.2 Thu Dec 7 15:26:08 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_eltpath.c Sun Apr 1 10:00:00 2001 @@ -1,26 +1,36 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_eltpath.c,v 1.2 2000/12/07 20:26:08 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_eltpath.c,v 1.4 2001/04/01 14:00:00 tsi Exp $ */ +/************************************************************************** + +Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., + Cedar Park, Texas. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, PRECISION INSIGHT AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + /* - * GLX Hardware Device Driver for Matrox G400 - * Copyright (C) 1999 Keith Whitwell - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * Authors: + * Gareth Hughes + * Keith Whitwell * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * */ #include @@ -39,193 +49,168 @@ #include "mmath.h" #include "xform.h" -#define DEBUG_ELTPATH 0 /* Always use a full-sized stride for vertices. [FIXME] * Stride in the buffers must be a quadword multiple. */ #define CLIP_STRIDE 10 -static void fire_elts( r128ContextPtr r128ctx ) +static void fire_elts( r128ContextPtr rmesa ) { - int vertsize = r128ctx->vertsize; + GLuint vertsize = rmesa->vertsize; - LOCK_HARDWARE( r128ctx ); + LOCK_HARDWARE( rmesa ); - if ( DEBUG_ELTPATH ) - fprintf( stderr, "\n%s: elt=%p ret=%p vs=%d\n", - __FUNCTION__, r128ctx->elt_buf, - r128ctx->retained_buf, vertsize ); - /* Fire queued elements and discard that buffer if its contents * won't be referenced by future elements. */ - if ( r128ctx->elt_buf ) + if ( rmesa->elt_buf ) { - GLuint retain = (r128ctx->elt_buf == r128ctx->retained_buf); + GLuint retain = (rmesa->elt_buf == rmesa->retained_buf); - if ( r128ctx->first_elt != r128ctx->next_elt ) { - r128FireEltsLocked( r128ctx, - ((GLuint)r128ctx->first_elt - - (GLuint)r128ctx->elt_buf->address), - ((GLuint)r128ctx->next_elt - - (GLuint)r128ctx->elt_buf->address), + if ( rmesa->first_elt != rmesa->next_elt ) { + r128FireEltsLocked( rmesa, + ((char *)rmesa->first_elt - + (char *)rmesa->elt_buf->address), + ((char *)rmesa->next_elt - + (char *)rmesa->elt_buf->address), !retain ); } else if ( !retain ) { - r128ReleaseBufLocked( r128ctx, r128ctx->elt_buf ); + r128ReleaseBufLocked( rmesa, rmesa->elt_buf ); } - r128ctx->elt_buf = 0; + rmesa->elt_buf = 0; } - else if ( r128ctx->vert_buf ) + else if ( rmesa->vert_buf ) { - r128FlushVerticesLocked( r128ctx ); + r128FlushVerticesLocked( rmesa ); } - r128GetEltBufLocked( r128ctx ); + r128GetEltBufLocked( rmesa ); - UNLOCK_HARDWARE( r128ctx ); + UNLOCK_HARDWARE( rmesa ); /* Give the compiler a chance to optimize the divisions. */ switch ( vertsize ) { case 8: - r128ctx->next_vert_index = (GLushort) - (((r128ctx->elt_buf->idx + 1) * + rmesa->next_vert_index = (GLushort) + (((rmesa->elt_buf->idx + 1) * R128_BUFFER_SIZE / (8 * sizeof(GLuint))) - 1); - r128ctx->next_vert = (GLfloat *) - ((GLuint)r128ctx->vert_heap + - r128ctx->next_vert_index * 8 * sizeof(GLfloat)); + rmesa->next_vert = (GLfloat *) + ((char *)rmesa->vert_heap + + rmesa->next_vert_index * 8 * sizeof(GLfloat)); break; case 10: - r128ctx->next_vert_index = (GLushort) - (((r128ctx->elt_buf->idx + 1) * + rmesa->next_vert_index = (GLushort) + (((rmesa->elt_buf->idx + 1) * R128_BUFFER_SIZE / (10 * sizeof(GLuint))) - 1); - r128ctx->next_vert = (GLfloat *) - ((GLuint)r128ctx->vert_heap + - r128ctx->next_vert_index * 10 * sizeof(GLfloat)); + rmesa->next_vert = (GLfloat *) + ((char *)rmesa->vert_heap + + rmesa->next_vert_index * 10 * sizeof(GLfloat)); break; } - - r128ctx->first_elt = r128ctx->next_elt = (GLushort *) - ((GLubyte *)r128ctx->elt_buf->address + R128_INDEX_PRIM_OFFSET); - r128ctx->elt_vertsize = vertsize; + rmesa->first_elt = rmesa->next_elt = (GLushort *) + ((GLubyte *)rmesa->elt_buf->address + R128_INDEX_PRIM_OFFSET); - if ( DEBUG_ELTPATH ) - fprintf( stderr, "new elt=%p idx=%d tot=%d next=%p idx=%d\n\n", - r128ctx->elt_buf, r128ctx->elt_buf->idx, - r128ctx->elt_buf->total, - r128ctx->next_vert, r128ctx->next_vert_index ); - - { - GLint space = (GLint)((GLuint)r128ctx->next_vert - - (GLuint)r128ctx->next_elt); - if ( DEBUG_ELTPATH ) - fprintf( stderr, " new nv=%p ne=%p space=%d\n", - r128ctx->next_vert, r128ctx->next_elt, space ); - } + rmesa->elt_vertsize = vertsize; } -static void release_bufs( r128ContextPtr r128ctx ) +static void release_bufs( r128ContextPtr rmesa ) { - if ( DEBUG_ELTPATH ) - fprintf( stderr, "%s: %d idx=%d\n", - __FUNCTION__, - r128ctx->retained_buf && - r128ctx->retained_buf != r128ctx->elt_buf, - r128ctx->retained_buf ? r128ctx->retained_buf->idx : -1 ); - - if ( r128ctx->retained_buf && r128ctx->retained_buf != r128ctx->elt_buf ) + if ( rmesa->retained_buf && rmesa->retained_buf != rmesa->elt_buf ) { - LOCK_HARDWARE( r128ctx ); - if ( r128ctx->first_elt != r128ctx->next_elt ) { - r128FireEltsLocked( r128ctx, - ((GLuint)r128ctx->first_elt - - (GLuint)r128ctx->elt_buf->address), - ((GLuint)r128ctx->next_elt - - (GLuint)r128ctx->elt_buf->address), + LOCK_HARDWARE( rmesa ); + if ( rmesa->first_elt != rmesa->next_elt ) { + r128FireEltsLocked( rmesa, + ((char *)rmesa->first_elt - + (char *)rmesa->elt_buf->address), + ((char *)rmesa->next_elt - + (char *)rmesa->elt_buf->address), 0 ); - ALIGN_NEXT_ELT( r128ctx ); - r128ctx->first_elt = r128ctx->next_elt; + ALIGN_NEXT_ELT( rmesa ); + rmesa->first_elt = rmesa->next_elt; } - r128ReleaseBufLocked( r128ctx, r128ctx->retained_buf ); - UNLOCK_HARDWARE( r128ctx ); + r128ReleaseBufLocked( rmesa, rmesa->retained_buf ); + UNLOCK_HARDWARE( rmesa ); } - r128ctx->retained_buf = 0; + rmesa->retained_buf = 0; } -#define NEGATIVE(f) (f < 0) -#define DIFFERENT_SIGNS(a,b) ((a*b) < 0) -#define LINTERP( T, A, B ) ( (A) + (T) * ( (B) - (A) ) ) +#define NEGATIVE( f ) (f < 0) +#define DIFFERENT_SIGNS( a, b ) ((a * b) < 0) +#define LINTERP( T, A, B ) ((A) + (T) * ((B) - (A))) -#define INTERP_RGBA(t, out, a, b) { \ - int i; \ - for (i = 0; i < 4; i++) { \ - GLfloat fa = UBYTE_COLOR_TO_FLOAT_COLOR(a[i]); \ - GLfloat fb = UBYTE_COLOR_TO_FLOAT_COLOR(b[i]); \ - GLfloat fo = LINTERP(t, fa, fb); \ - FLOAT_COLOR_TO_UBYTE_COLOR(out[i], fo); \ - } \ +#define INTERP_RGBA( t, out, a, b ) { \ + GLuint i; \ + for ( i = 0 ; i < 4 ; i++ ) { \ + GLfloat fa = UBYTE_COLOR_TO_FLOAT_COLOR( a[i] ); \ + GLfloat fb = UBYTE_COLOR_TO_FLOAT_COLOR( b[i] ); \ + GLfloat fo = LINTERP( t, fa, fb ); \ + FLOAT_COLOR_TO_UBYTE_COLOR( out[i], fo ); \ + } \ } -#define CLIP(SGN,V,PLANE) \ -if (mask & PLANE) { \ - GLuint *indata = inlist[in]; \ - GLuint *outdata = inlist[in ^= 1]; \ - GLuint nr = n; \ - GLfloat *J = verts[indata[nr-1]]; \ - GLfloat dpJ = (SGN J[V]) + J[3]; \ - \ - for (i = n = 0 ; i < nr ; i++) { \ - GLuint elt_i = indata[i]; \ - GLfloat *I = verts[elt_i]; \ - GLfloat dpI = (SGN I[V]) + I[3]; \ - \ - if (DIFFERENT_SIGNS(dpI, dpJ)) { \ - GLfloat *O = verts[next_vert]; \ - outdata[n++] = next_vert++; \ - \ - if (NEGATIVE(dpI)) { \ - GLfloat t = dpI / (dpI - dpJ); \ - interp(t, O, I, J); \ - } \ - else \ - { \ - GLfloat t = dpJ / (dpJ - dpI); \ - interp(t, O, J, I); \ - } \ - } \ - \ - if (!NEGATIVE(dpI)) \ - outdata[n++] = elt_i; \ - \ - J = I; \ - dpJ = dpI; \ - } \ - \ - if (n < 3) return; \ -} +#define CLIP( SGN, V, PLANE ) \ +do { \ + if ( mask & PLANE ) { \ + GLuint *indata = inlist[in]; \ + GLuint *outdata = inlist[in ^= 1]; \ + GLuint nr = n; \ + GLfloat *J = verts[indata[nr-1]]; \ + GLfloat dpJ = (SGN J[V]) + J[3]; \ + \ + for ( i = n = 0 ; i < nr ; i++ ) { \ + GLuint elt_i = indata[i]; \ + GLfloat *I = verts[elt_i]; \ + GLfloat dpI = (SGN I[V]) + I[3]; \ + \ + if ( DIFFERENT_SIGNS( dpI, dpJ ) ) { \ + GLfloat *O = verts[next_vert]; \ + outdata[n++] = next_vert++; \ + \ + if ( NEGATIVE( dpI ) ) { \ + GLfloat t = dpI / (dpI - dpJ); \ + interp( t, O, I, J ); \ + } \ + else \ + { \ + GLfloat t = dpJ / (dpJ - dpI); \ + interp( t, O, J, I ); \ + } \ + } \ + \ + if ( !NEGATIVE( dpI ) ) \ + outdata[n++] = elt_i; \ + \ + J = I; \ + dpJ = dpI; \ + } \ + \ + if ( n < 3 ) return; \ + } \ +} while (0) -static void r128_tri_clip( r128ContextPtr r128ctx, +static void r128_tri_clip( r128ContextPtr rmesa, struct vertex_buffer *VB, GLuint *elt, GLubyte mask ) { - struct r128_elt_tab *tab = r128ctx->elt_tab; + struct r128_elt_tab *tab = rmesa->elt_tab; r128_interp_func interp = tab->interp; - GLint vertsize = r128ctx->vertsize; + GLuint vertsize = rmesa->vertsize; GLuint inlist[2][VB_MAX_CLIPPED_VERTS]; GLuint in = 0; GLuint n = 3, next_vert = 3; @@ -235,55 +220,44 @@ /* Build temporary vertices in clipspace. This is the potential * downside to this path. */ - tab->build_tri_verts( r128ctx, VB, (GLfloat *)verts, elt ); + tab->build_tri_verts( rmesa, VB, (GLfloat *)verts, elt ); inlist[0][0] = 0; inlist[0][1] = 1; inlist[0][2] = 2; - CLIP(-,0,CLIP_RIGHT_BIT); - CLIP(+,0,CLIP_LEFT_BIT); - CLIP(-,1,CLIP_TOP_BIT); - CLIP(+,1,CLIP_BOTTOM_BIT); - CLIP(-,2,CLIP_FAR_BIT); - CLIP(+,2,CLIP_NEAR_BIT); + CLIP( -, 0, CLIP_RIGHT_BIT ); + CLIP( +, 0, CLIP_LEFT_BIT ); + CLIP( -, 1, CLIP_TOP_BIT ); + CLIP( +, 1, CLIP_BOTTOM_BIT ); + CLIP( -, 2, CLIP_FAR_BIT ); + CLIP( +, 2, CLIP_NEAR_BIT ); { GLuint *out = inlist[in]; - GLint space = (GLint)((GLuint)r128ctx->next_vert - - (GLuint)r128ctx->next_elt); - - if ( DEBUG_ELTPATH ) - fprintf( stderr, " clip nv=%p ne=%p space=%d thresh=%d %d\n", - r128ctx->next_vert, r128ctx->next_elt, - space, (GLint)n * (vertsize + 2) * (GLint)sizeof(GLuint), - space < (GLint)n * (vertsize + 2) * (GLint)sizeof(GLuint) ); + GLint space = (GLint)((char *)rmesa->next_vert - + (char *)rmesa->next_elt); - /* GH: Why the hell do we explicitly have to test the sign of the - * available space here? - */ - if ( space < (GLint)n * (vertsize + 2) * (GLint)sizeof(GLuint) ) { - fire_elts( r128ctx ); + if ( space < (GLint)(n * (vertsize + 2) * sizeof(GLuint)) ) { + fire_elts( rmesa ); } /* Project the new vertices and emit to dma buffers. Translate * out values to physical addresses for setup dma. */ - tab->project_and_emit_verts( r128ctx, (GLfloat *)verts, out, n ); + tab->project_and_emit_verts( rmesa, (GLfloat *)verts, out, n ); /* Convert the planar polygon to a list of triangles and emit to * elt buffers. */ - for (i = 2 ; i < n ; i++) { - r128ctx->next_elt[0] = (GLushort) out[0]; - r128ctx->next_elt[1] = (GLushort) out[i-1]; - r128ctx->next_elt[2] = (GLushort) out[i]; - r128ctx->next_elt += 3; + for ( i = 2 ; i < n ; i++ ) { + rmesa->next_elt[0] = (GLushort) out[0]; + rmesa->next_elt[1] = (GLushort) out[i-1]; + rmesa->next_elt[2] = (GLushort) out[i]; + rmesa->next_elt += 3; } } - if ( DEBUG_ELTPATH ) - fflush( stderr ); } @@ -295,37 +269,22 @@ * unclipped primitives from the original list. */ -#define INIT(x) +#define INIT( x ) #define TRI_THRESHOLD (GLint)(2 * sizeof(GLuint)) -#define UNCLIPPED_VERT(x) (GLushort)(r128ctx->first_vert_index - x) +#define UNCLIPPED_VERT( x ) (GLushort)(rmesa->first_vert_index - x) #define TRIANGLE( e2, e1, e0 ) \ do { \ - if ( DEBUG_ELTPATH ) \ - fprintf( stderr, " tri nv=%p ne=%p space=%d thresh=%d %d\n", \ - r128ctx->next_vert, r128ctx->next_elt, \ - (GLint)((GLuint)r128ctx->next_vert - \ - (GLuint)r128ctx->next_elt), TRI_THRESHOLD, \ - ( (GLint)((GLuint)r128ctx->next_vert - \ - (GLuint)r128ctx->next_elt) < TRI_THRESHOLD ) );\ - if ( (GLint)((GLuint)r128ctx->next_vert - \ - (GLuint)r128ctx->next_elt) < TRI_THRESHOLD ) { \ - if ( DEBUG_ELTPATH ) \ - fprintf( stderr, " firing elts...\n" ); \ - fire_elts( r128ctx ); \ + if ( (GLint)((char *)rmesa->next_vert - \ + (char *)rmesa->next_elt) < TRI_THRESHOLD ) { \ + fire_elts( rmesa ); \ } \ - r128ctx->next_elt[0] = UNCLIPPED_VERT( e2 ); \ - r128ctx->next_elt[1] = UNCLIPPED_VERT( e1 ); \ - r128ctx->next_elt[2] = UNCLIPPED_VERT( e0 ); \ - if ( 0 ) \ - fprintf( stderr, " tri %d,%d,%d -> %hd,%hd,%hd\n", \ - e2, e1, e0, r128ctx->next_elt[0], \ - r128ctx->next_elt[1], r128ctx->next_elt[2]); \ - r128ctx->next_elt += 3; \ - if ( DEBUG_ELTPATH ) \ - fflush( stderr ); \ + rmesa->next_elt[0] = UNCLIPPED_VERT( e2 ); \ + rmesa->next_elt[1] = UNCLIPPED_VERT( e1 ); \ + rmesa->next_elt[2] = UNCLIPPED_VERT( e0 ); \ + rmesa->next_elt += 3; \ } while (0) #define CLIP_TRIANGLE( e2, e1, e0 ) \ @@ -337,16 +296,16 @@ out[0] = e2; \ out[1] = e1; \ out[2] = e0; \ - r128_tri_clip( r128ctx, VB, out, ormask ); \ + r128_tri_clip( rmesa, VB, out, ormask ); \ } \ } while (0) #define LOCAL_VARS \ - r128ContextPtr r128ctx = R128_CONTEXT( VB->ctx ); \ + r128ContextPtr rmesa = R128_CONTEXT(VB->ctx); \ GLuint *elt = VB->EltPtr->data; \ GLuint out[VB_MAX_CLIPPED_VERTS]; \ GLubyte *mask = VB->ClipMask; \ - (void) mask; (void) out; (void) elt; (void) r128ctx; + (void) mask; (void) out; (void) elt; (void) rmesa; @@ -355,7 +314,7 @@ #define RENDER_TRI( i2, i1, i0, pv, parity ) \ do { \ GLuint e2 = elt[i2], e1 = elt[i1], e0 = elt[i0]; \ - if (parity) e2 = elt[i1], e1 = elt[i2]; \ + if ( parity ) e2 = elt[i1], e1 = elt[i2]; \ CLIP_TRIANGLE( e2, e1, e0 ); \ } while (0) @@ -369,20 +328,20 @@ #define LOCAL_VARS \ - r128ContextPtr r128ctx = R128_CONTEXT( VB->ctx ); \ + r128ContextPtr rmesa = R128_CONTEXT(VB->ctx); \ GLuint *elt = VB->EltPtr->data; \ - (void) elt; (void) r128ctx; + (void) elt; (void) rmesa; #define RENDER_POINTS( start, count ) #define RENDER_LINE( i1, i0 ) #define RENDER_TRI( i2, i1, i0, pv, parity ) \ do { \ GLuint e2 = elt[i2], e1 = elt[i1], e0 = elt[i0]; \ - if (parity) e2 = elt[i1], e1 = elt[i2]; \ + if ( parity ) e2 = elt[i1], e1 = elt[i2]; \ TRIANGLE( e2, e1, e0 ); \ } while (0) -#define RENDER_QUAD(i3, i2, i1, i0, pv ) \ +#define RENDER_QUAD( i3, i2, i1, i0, pv ) \ TRIANGLE( elt[i3], elt[i2], elt[i0] ); \ TRIANGLE( elt[i2], elt[i1], elt[i0] ) @@ -394,16 +353,16 @@ static void refresh_projection_matrix( GLcontext *ctx ) { - r128ContextPtr r128ctx = R128_CONTEXT(ctx); + r128ContextPtr rmesa = R128_CONTEXT(ctx); GLmatrix *mat = &ctx->Viewport.WindowMap; - GLfloat *m = r128ctx->device_matrix; + GLfloat *m = rmesa->device_matrix; m[MAT_SX] = mat->m[MAT_SX]; m[MAT_TX] = mat->m[MAT_TX]; m[MAT_SY] = -mat->m[MAT_SY]; - m[MAT_TY] = -mat->m[MAT_TY] + r128ctx->driDrawable->h; - m[MAT_SZ] = mat->m[MAT_SZ] * r128ctx->depth_scale; - m[MAT_TZ] = mat->m[MAT_TZ] * r128ctx->depth_scale; + m[MAT_TY] = -mat->m[MAT_TY] + rmesa->driDrawable->h; + m[MAT_SZ] = mat->m[MAT_SZ] * rmesa->depth_scale; + m[MAT_TZ] = mat->m[MAT_TZ] * rmesa->depth_scale; } #define CLIP_UBYTE_B 0 @@ -439,7 +398,7 @@ /* Very sparsely popluated array - fix the indices. */ -static struct r128_elt_tab r128EltTab[0x80]; +static struct r128_elt_tab r128EltTab[R128_MAX_SETUPFUNC]; void r128DDEltPathInit( void ) { @@ -451,7 +410,9 @@ r128_init_eltpath_TEX0( &r128EltTab[R128_TEX0_BIT] ); r128_init_eltpath_RGBA_TEX0( &r128EltTab[R128_RGBA_BIT|R128_TEX0_BIT] ); r128_init_eltpath_TEX0_TEX1( &r128EltTab[R128_TEX0_BIT|R128_TEX1_BIT] ); - r128_init_eltpath_RGBA_TEX0_TEX1( &r128EltTab[R128_RGBA_BIT|R128_TEX0_BIT|R128_TEX1_BIT] ); + r128_init_eltpath_RGBA_TEX0_TEX1( &r128EltTab[(R128_RGBA_BIT | + R128_TEX0_BIT | + R128_TEX1_BIT)] ); } #define VALID_SETUP (R128_RGBA_BIT|R128_TEX0_BIT|R128_TEX1_BIT) @@ -473,17 +434,11 @@ { GLcontext *ctx = VB->ctx; GLenum prim = ctx->CVA.elt_mode; - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); - struct r128_elt_tab *tab = &r128EltTab[r128ctx->SetupIndex & VALID_SETUP]; - GLint vertsize = r128ctx->vertsize; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + struct r128_elt_tab *tab = &r128EltTab[rmesa->SetupIndex & VALID_SETUP]; + GLuint vertsize = rmesa->vertsize; GLint space; - if ( DEBUG_ELTPATH ) - fprintf( stderr, "\n\n\n%s: count=%d space=%d\n", - __FUNCTION__, VB->Count, - (GLint)((GLuint)r128ctx->next_vert - - (GLuint)r128ctx->next_elt) ); - VB->ClipPtr = TransformRaw( &VB->Clip, &ctx->ModelProjectMatrix, VB->ObjPtr ); @@ -498,40 +453,27 @@ &VB->ClipOrMask, &VB->ClipAndMask ); - if ( VB->ClipAndMask ) { - if ( DEBUG_ELTPATH ) - fprintf( stderr, " clipped, returning...\n" ); + if ( VB->ClipAndMask ) return; - } - if ( r128ctx->vert_buf ) { - r128FlushVertices( r128ctx ); - } - if ( r128ctx->new_state ) { + + if ( rmesa->vert_buf ) + r128FlushVertices( rmesa ); + + if ( rmesa->new_state ) r128DDUpdateHWState( ctx ); - } - space = (GLint)((GLuint)r128ctx->next_vert - - (GLuint)r128ctx->next_elt); + space = (GLint)((char *)rmesa->next_vert - + (char *)rmesa->next_elt); /* Allocate a single buffer to hold unclipped vertices. All * unclipped vertices must be contiguous. */ - if ( DEBUG_ELTPATH ) - fprintf( stderr, " top nv=%p ne=%p space=%d reqd=%d count=%d clip=0x%x\n\n", - r128ctx->next_vert, r128ctx->next_elt, space, - (GLint)VB->Count * vertsize * sizeof(GLuint), - VB->Count, VB->ClipOrMask ); - - /* Because we need to adjust the next_elt pointer to accomodate the - * CCE packet header, we can sometimes go past the next_vert pointer - * and thus have negative space. - */ - if ( space < (GLint)VB->Count * vertsize * (GLint)sizeof(GLuint) || - r128ctx->vertsize != r128ctx->elt_vertsize ) { - fire_elts( r128ctx ); + if ( space < (GLint)(VB->Count * vertsize * sizeof(GLuint)) || + rmesa->vertsize != rmesa->elt_vertsize ) { + fire_elts( rmesa ); } - r128ctx->retained_buf = r128ctx->elt_buf; + rmesa->retained_buf = rmesa->elt_buf; /* Emit unclipped vertices to the buffer. */ @@ -540,7 +482,7 @@ /* Emit indices and clipped vertices to one or more buffers. */ if ( VB->ClipOrMask ) { - r128ctx->elt_tab = tab; + rmesa->elt_tab = tab; r128_render_tab_elt[prim]( VB, 0, VB->EltPtr->count, 0 ); } else { r128_render_tab_elt_unclipped[prim]( VB, 0, VB->EltPtr->count, 0 ); @@ -548,20 +490,10 @@ /* Send to hardware and release the elt buffer. */ - release_bufs( r128ctx ); + release_bufs( rmesa ); /* This indicates that there is no cached data to reuse. */ VB->pipeline->data_valid = 0; VB->pipeline->new_state = 0; - - if ( DEBUG_ELTPATH ) { - FLUSH_BATCH( r128ctx ); - - LOCK_HARDWARE( r128ctx ); - drmR128WaitForIdleCCE( r128ctx->driFd ); - UNLOCK_HARDWARE( r128ctx ); - - __asm__ __volatile__ ( "int $3" ); - } } Index: xc/lib/GL/mesa/src/drv/r128/r128_elttmp.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_elttmp.h:1.1 xc/lib/GL/mesa/src/drv/r128/r128_elttmp.h:1.2 --- xc/lib/GL/mesa/src/drv/r128/r128_elttmp.h:1.1 Mon Dec 4 14:21:46 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_elttmp.h Sun Jan 7 20:07:20 2001 @@ -1,26 +1,36 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_elttmp.h,v 1.1 2000/12/04 19:21:46 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_elttmp.h,v 1.2 2001/01/08 01:07:20 martin Exp $ */ +/************************************************************************** + +Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., + Cedar Park, Texas. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, PRECISION INSIGHT AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + /* - * DRI Hardware Device Driver for G200/G400 - * Copyright (C) 1999 Keith Whitwell - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * Authors: + * Keith Whitwell + * Gareth Hughes * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * */ /* Buffers fill from high addresses down with vertices and from low @@ -34,8 +44,7 @@ */ static void TAG(emit_unclipped_verts)( struct vertex_buffer *VB ) { - GLuint i; - r128ContextPtr r128ctx = R128_CONTEXT(VB->ctx); + r128ContextPtr rmesa = R128_CONTEXT(VB->ctx); GLfloat *dev = VB->Projected->start; GLubyte *color = VB->ColorPtr->start; GLfloat *tex0_data = VB->TexCoordPtr[0]->start; @@ -43,45 +52,38 @@ GLuint color_stride = VB->ColorPtr->stride; GLuint tex0_stride = VB->TexCoordPtr[0]->stride; GLuint tex1_stride = VB->TexCoordPtr[1]->stride; - GLuint buffer_stride = r128ctx->vertsize; + GLuint buffer_stride = rmesa->vertsize; - GLfloat *f = r128ctx->next_vert; + GLfloat *f = rmesa->next_vert; GLuint count = VB->Count; GLubyte *clipmask = VB->ClipMask; - const GLfloat *m = r128ctx->device_matrix; + const GLfloat *m = rmesa->device_matrix; const GLfloat sx = m[0], sy = m[5], sz = m[10]; const GLfloat tx = m[12], ty = m[13], tz = m[14]; - - if ( 0 ) - fprintf( stderr, "%s: stride=%d\n", __FUNCTION__, buffer_stride ); + GLuint i; - r128ctx->retained_buf = r128ctx->elt_buf; - r128ctx->first_vert_index = r128ctx->next_vert_index; + rmesa->retained_buf = rmesa->elt_buf; + rmesa->first_vert_index = rmesa->next_vert_index; for ( i = 0 ; i < count ; f -= buffer_stride, i++ ) { if ( !clipmask[i] ) { - if ( 0 ) - fprintf( stderr, "vert=%d addr=%p space=0x%x\n", - i, f, (GLuint)f - (GLuint)r128ctx->elt_buf->address ); - f[0] = sx * dev[0] + tx; f[1] = sy * dev[1] + ty; f[2] = sz * dev[2] + tz; f[3] = dev[3]; - if (TYPE & R128_RGBA_BIT) { + if ( TYPE & R128_RGBA_BIT ) { #if 0 /*defined(USE_X86_ASM)*/ - __asm__ ( - "movl (%%edx),%%eax \n" - "bswap %%eax \n" - "rorl $8,%%eax \n" - "movl %%eax,16(%%edi) \n" - : - : "d" (color), "D" (f) - : "%eax" ); + __asm__ ( "movl (%%edx),%%eax \n" + "bswap %%eax \n" + "rorl $8,%%eax \n" + "movl %%eax,16(%%edi) \n" + : + : "d" (color), "D" (f) + : "%eax" ); #else GLubyte *b = (GLubyte *)&f[4]; b[CLIP_UBYTE_B] = color[2]; @@ -91,25 +93,25 @@ #endif } - if (TYPE & R128_TEX0_BIT) { - *(int*)&f[6] = *(int*)&tex0_data[0]; - *(int*)&f[7] = *(int*)&tex0_data[1]; + if ( TYPE & R128_TEX0_BIT ) { + *(GLuint *)&f[6] = *(GLuint *)&tex0_data[0]; + *(GLuint *)&f[7] = *(GLuint *)&tex0_data[1]; } - if (TYPE & R128_TEX1_BIT) { - *(int*)&f[8] = *(int*)&tex1_data[0]; - *(int*)&f[9] = *(int*)&tex1_data[1]; + if ( TYPE & R128_TEX1_BIT ) { + *(GLuint *)&f[8] = *(GLuint *)&tex1_data[0]; + *(GLuint *)&f[9] = *(GLuint *)&tex1_data[1]; } } - STRIDE_F(dev, 16); - if (TYPE & R128_RGBA_BIT) color += color_stride; - if (TYPE & R128_TEX0_BIT) STRIDE_F(tex0_data, tex0_stride); - if (TYPE & R128_TEX1_BIT) STRIDE_F(tex1_data, tex1_stride); + STRIDE_F( dev, 16 ); + if ( TYPE & R128_RGBA_BIT ) color += color_stride; + if ( TYPE & R128_TEX0_BIT ) STRIDE_F( tex0_data, tex0_stride ); + if ( TYPE & R128_TEX1_BIT ) STRIDE_F( tex1_data, tex1_stride ); } - r128ctx->next_vert = f; - r128ctx->next_vert_index -= count; + rmesa->next_vert = f; + rmesa->next_vert_index -= count; } @@ -117,12 +119,12 @@ * Recreate from the VB data rather than trying to read back from * uncached memory. */ -static void TAG(build_tri_verts)( r128ContextPtr r128ctx, +static void TAG(build_tri_verts)( r128ContextPtr rmesa, struct vertex_buffer *VB, GLfloat *O, GLuint *elt ) { - int i; + GLint i; for ( i = 0 ; i < 3 ; i++, O += CLIP_STRIDE ) { GLfloat *clip = VB->Clip.start + elt[i]*4; @@ -132,8 +134,8 @@ O[2] = clip[2]; O[3] = clip[3]; - if (TYPE & R128_RGBA_BIT) { - GLubyte *col = VEC_ELT(VB->ColorPtr, GLubyte, elt[i]); + if ( TYPE & R128_RGBA_BIT ) { + GLubyte *col = VEC_ELT( VB->ColorPtr, GLubyte, elt[i] ); GLubyte *b = (GLubyte *)&O[4]; b[CLIP_UBYTE_R] = col[0]; b[CLIP_UBYTE_G] = col[1]; @@ -141,22 +143,16 @@ b[CLIP_UBYTE_A] = col[3]; } - if ( 0 ) - fprintf(stderr, - "build_tri_vert elt[%d]=%d index=0x%x (first_index=0x%x)\n", - i, elt[i], (GLuint)UNCLIPPED_VERT(elt[i]), - (GLuint)r128ctx->first_vert_index); - *(GLuint *)&O[5] = UNCLIPPED_VERT(elt[i]); - if (TYPE & R128_TEX0_BIT) { - GLfloat *tex0_data = VEC_ELT(VB->TexCoordPtr[0], GLfloat, elt[i]); + if ( TYPE & R128_TEX0_BIT ) { + GLfloat *tex0_data = VEC_ELT( VB->TexCoordPtr[0], GLfloat, elt[i] ); *(int*)&O[6] = *(int*)&tex0_data[0]; *(int*)&O[7] = *(int*)&tex0_data[1]; } - if (TYPE & R128_TEX1_BIT) { - GLfloat *tex1_data = VEC_ELT(VB->TexCoordPtr[1], GLfloat, elt[i]); + if ( TYPE & R128_TEX1_BIT ) { + GLfloat *tex1_data = VEC_ELT( VB->TexCoordPtr[1], GLfloat, elt[i] ); *(int*)&O[8] = *(int*)&tex1_data[0]; *(int*)&O[9] = *(int*)&tex1_data[1]; } @@ -171,30 +167,28 @@ const GLfloat *I, const GLfloat *J ) { - O[0] = LINTERP(t, I[0], J[0]); - O[1] = LINTERP(t, I[1], J[1]); - O[2] = LINTERP(t, I[2], J[2]); - O[3] = LINTERP(t, I[3], J[3]); - - if (TYPE & R128_RGBA_BIT) { - INTERP_RGBA(t, - ((GLubyte *)&(O[4])), - ((GLubyte *)&(I[4])), - ((GLubyte *)&(J[4]))); + O[0] = LINTERP( t, I[0], J[0] ); + O[1] = LINTERP( t, I[1], J[1] ); + O[2] = LINTERP( t, I[2], J[2] ); + O[3] = LINTERP( t, I[3], J[3] ); + + if ( TYPE & R128_RGBA_BIT ) { + INTERP_RGBA( t, + ((GLubyte *)&(O[4])), + ((GLubyte *)&(I[4])), + ((GLubyte *)&(J[4])) ); } - if (0) fprintf(stderr, "setting 0x%x to ~0\n", (GLuint)&O[5]); - *(GLuint *)&O[5] = ~0; /* note that this is a new vertex */ - if (TYPE & R128_TEX0_BIT) { - O[6] = LINTERP(t, I[6], J[6]); - O[7] = LINTERP(t, I[7], J[7]); + if ( TYPE & R128_TEX0_BIT ) { + O[6] = LINTERP( t, I[6], J[6] ); + O[7] = LINTERP( t, I[7], J[7] ); } - if (TYPE & R128_TEX1_BIT) { - O[8] = LINTERP(t, I[8], J[8]); - O[9] = LINTERP(t, I[9], J[9]); + if ( TYPE & R128_TEX1_BIT ) { + O[8] = LINTERP( t, I[8], J[8] ); + O[9] = LINTERP( t, I[9], J[9] ); } } @@ -204,30 +198,26 @@ * new ones to dma buffers. Update the element list to a format * suitable for sending to hardware. */ -static void TAG(project_and_emit_verts)( r128ContextPtr r128ctx, +static void TAG(project_and_emit_verts)( r128ContextPtr rmesa, const GLfloat *verts, GLuint *elt, - int nr) + GLuint nr) { - GLfloat *O = r128ctx->next_vert; - GLushort index = r128ctx->next_vert_index; - GLuint buffer_stride = r128ctx->vertsize; + GLfloat *O = rmesa->next_vert; + GLushort index = rmesa->next_vert_index; + GLuint buffer_stride = rmesa->vertsize; - const GLfloat *m = r128ctx->device_matrix; + const GLfloat *m = rmesa->device_matrix; const GLfloat sx = m[0], sy = m[5], sz = m[10]; const GLfloat tx = m[12], ty = m[13], tz = m[14]; GLuint i; - for (i = 0 ; i < nr ; i++) { + for ( i = 0 ; i < nr ; i++ ) { const GLfloat *I = &verts[elt[i] * CLIP_STRIDE]; GLuint tmp = *(GLuint *)&I[5]; - - if (0) fprintf(stderr, "elt[%d] (tmp 0x%x %d) %d --> ", - i, (GLuint)&I[5], tmp, elt[i]); - if ((elt[i] = tmp) == ~0) - { - GLfloat oow = 1.0/I[3]; + if ( (elt[i] = tmp) == ~0 ) { + GLfloat oow = 1.0 / I[3]; elt[i] = index--; @@ -236,37 +226,36 @@ O[2] = sz * I[2] * oow + tz; O[3] = oow; - if (TYPE & R128_RGBA_BIT) { - *(int*)&O[4] = *(int*)&I[4]; + if ( TYPE & R128_RGBA_BIT ) { + *(GLuint *)&O[4] = *(GLuint *)&I[4]; } - if (TYPE & R128_TEX0_BIT) { - *(int*)&O[6] = *(int*)&I[6]; - *(int*)&O[7] = *(int*)&I[7]; + if ( TYPE & R128_TEX0_BIT ) { + *(GLuint *)&O[6] = *(GLuint *)&I[6]; + *(GLuint *)&O[7] = *(GLuint *)&I[7]; } - if (TYPE & R128_TEX1_BIT) { - *(int*)&O[8] = *(int*)&I[8]; - *(int*)&O[9] = *(int*)&I[9]; + if ( TYPE & R128_TEX1_BIT ) { + *(GLuint *)&O[8] = *(GLuint *)&I[8]; + *(GLuint *)&O[9] = *(GLuint *)&I[9]; } O -= buffer_stride; } - if (0) fprintf(stderr, "0x%x\n", elt[i]); } - r128ctx->next_vert = O; - r128ctx->next_vert_index = index; + rmesa->next_vert = O; + rmesa->next_vert_index = index; } static void TAG(r128_init_eltpath)( struct r128_elt_tab *tab ) { - tab->emit_unclipped_verts = TAG(emit_unclipped_verts); - tab->build_tri_verts = TAG(build_tri_verts); - tab->interp = TAG(interp); - tab->project_and_emit_verts = TAG(project_and_emit_verts); + tab->emit_unclipped_verts = TAG(emit_unclipped_verts); + tab->build_tri_verts = TAG(build_tri_verts); + tab->interp = TAG(interp); + tab->project_and_emit_verts = TAG(project_and_emit_verts); } #undef TYPE Index: xc/lib/GL/mesa/src/drv/r128/r128_fastpath.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_fastpath.c:1.4 xc/lib/GL/mesa/src/drv/r128/r128_fastpath.c:1.5 --- xc/lib/GL/mesa/src/drv/r128/r128_fastpath.c:1.4 Mon Dec 4 14:21:46 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_fastpath.c Sun Jan 7 20:07:20 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_fastpath.c,v 1.4 2000/12/04 19:21:46 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_fastpath.c,v 1.5 2001/01/08 01:07:20 martin Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -29,8 +29,8 @@ /* * Authors: * Keith Whitwell - * Kevin E. Martin * Gareth Hughes + * Kevin E. Martin * */ @@ -44,67 +44,58 @@ #include "cva.h" #include "vertices.h" -/* HACK: Declare this global for now */ -static GLfloat m[16] __attribute__ ((aligned (16))); - -/* FIXME: These routines were copied from the i810 driver, and were only - slightly modified for the Rage 128. They still need to be optmizied - and cleaned up. Also, support for USE_RHW2 needs to be added. - - KW: The fastpath never does projective texturing, so RHW2 support - isn't necesary here. -*/ struct r128_fast_tab { void (*build_vertices)( struct vertex_buffer *VB, GLuint do_cliptest ); void (*interp)( GLfloat t, GLfloat *O, const GLfloat *I, const GLfloat *J ); }; -#define POINT(x) r128_draw_point( r128ctx, &vert[x], psize ) -#define LINE(x,y) r128_draw_line( r128ctx, &vert[x], &vert[y], lwidth ) -#define TRI(x,y,z) r128_draw_triangle( r128ctx, &vert[x], &vert[y], &vert[z] ) +#define POINT(x) r128_draw_point( rmesa, &vert[x], psize ) +#define LINE(x,y) r128_draw_line( rmesa, &vert[x], &vert[y], lwidth ) +#define TRI(x,y,z) r128_draw_triangle( rmesa, &vert[x], &vert[y], &vert[z] ) /* Direct, and no clipping required. The clip funcs have not been - written yet, so this is only useful for the fast path. */ -#define RENDER_POINTS(start, count) \ + * written yet, so this is only useful for the fast path. + */ +#define RENDER_POINTS( start, count ) \ do { \ GLuint e; \ - for (e = start; e < count; e++) \ - POINT(elt[e]); \ + for ( e = start ; e < count ; e++ ) \ + POINT( elt[e] ); \ } while (0) -#define RENDER_LINE(i1, i) \ +#define RENDER_LINE( i1, i ) \ do { \ GLuint e1 = elt[i1], e = elt[i]; \ - LINE(e1, e); \ + LINE( e1, e ); \ } while (0) -#define RENDER_TRI(i2, i1, i, pv, parity) \ +#define RENDER_TRI( i2, i1, i, pv, parity ) \ do { \ GLuint e2 = elt[i2], e1 = elt[i1], e = elt[i]; \ - if (parity) { \ + if ( parity ) { \ GLuint tmp = e2; \ e2 = e1; \ e1 = tmp; \ } \ - TRI(e2, e1, e); \ + TRI( e2, e1, e ); \ } while (0) -#define RENDER_QUAD(i3, i2, i1, i, pv) \ +#define RENDER_QUAD( i3, i2, i1, i, pv ) \ do { \ GLuint e3 = elt[i3], e2 = elt[i2], e1 = elt[i1], e = elt[i]; \ - TRI(e3, e2, e); \ - TRI(e2, e1, e); \ + TRI( e3, e2, e ); \ + TRI( e2, e1, e ); \ } while (0) #define LOCAL_VARS \ - r128VertexPtr vert = R128_DRIVER_DATA(VB)->verts; \ - const GLuint *elt = VB->EltPtr->data; \ - GLcontext *ctx = VB->ctx; \ - r128ContextPtr r128ctx = R128_CONTEXT(ctx); \ - const GLfloat lwidth = ctx->Line.Width; \ - const GLfloat psize = ctx->Point.Size; \ + r128VertexPtr vert = R128_DRIVER_DATA(VB)->verts; \ + const GLuint *elt = VB->EltPtr->data; \ + GLcontext *ctx = VB->ctx; \ + r128ContextPtr rmesa = R128_CONTEXT(ctx); \ + const GLfloat lwidth = ctx->Line.Width; \ + const GLfloat psize = ctx->Point.Size; \ (void) lwidth; (void) psize; (void) vert; #define TAG(x) r128_##x##_smooth_indirect @@ -112,12 +103,12 @@ -#define NEGATIVE(f) (f < 0) -#define DIFFERENT_SIGNS(a,b) ((a*b) < 0) -#define LINTERP(T, A, B) ((A) + (T) * ((B) - (A))) +#define NEGATIVE( f ) (f < 0) +#define DIFFERENT_SIGNS( a, b ) ((a * b) < 0) +#define LINTERP( T, A, B ) ((A) + (T) * ((B) - (A))) -#define INTERP_RGBA(t, out, a, b) \ +#define INTERP_RGBA( t, out, a, b ) \ do { \ int i; \ for (i = 0; i < 4; i++) { \ @@ -129,9 +120,9 @@ } while (0) -#define CLIP(SGN, V, PLANE) \ +#define CLIP( SGN, V, PLANE ) \ do { \ - if (mask & PLANE) { \ + if ( mask & PLANE ) { \ GLuint *indata = inlist[in]; \ GLuint *outdata = inlist[in ^= 1]; \ GLuint nr = n; \ @@ -139,16 +130,16 @@ GLfloat dpJ = (SGN J[V]) + J[3]; \ \ inlist[0] = vlist1; \ - for (i = n = 0 ; i < nr ; i++) { \ + for ( i = n = 0 ; i < nr ; i++ ) { \ GLuint elt_i = indata[i]; \ GLfloat *I = verts[elt_i].f; \ GLfloat dpI = (SGN I[V]) + I[3]; \ \ - if (DIFFERENT_SIGNS(dpI, dpJ)) { \ + if ( DIFFERENT_SIGNS( dpI, dpJ ) ) { \ GLfloat *O = verts[next_vert].f; \ GLfloat t, *in, *out; \ \ - if (NEGATIVE(dpI)) { \ + if ( NEGATIVE( dpI ) ) { \ t = dpI / (dpI - dpJ); \ in = I; \ out = J; \ @@ -158,7 +149,7 @@ out = I; \ } \ \ - interp(t, O, in, out); \ + interp( t, O, in, out ); \ \ clipmask[next_vert] = 0; \ outdata[n++] = next_vert++; \ @@ -166,7 +157,7 @@ \ clipmask[elt_i] |= PLANE; /* don't set up */ \ \ - if (!NEGATIVE(dpI)) { \ + if ( !NEGATIVE( dpI ) ) { \ outdata[n++] = elt_i; \ clipmask[elt_i] &= ~PLANE; /* set up after all */ \ } \ @@ -175,25 +166,25 @@ dpJ = dpI; \ } \ \ - if (n < 3) return; \ + if ( n < 3 ) return; \ } \ } while (0) -#define LINE_CLIP(x,y,z,w,PLANE) \ +#define LINE_CLIP( x, y, z, w, PLANE ) \ do { \ - if (mask & PLANE) { \ - GLfloat dpI = DOT4V(I,x,y,z,w); \ - GLfloat dpJ = DOT4V(J,x,y,z,w); \ + if ( mask & PLANE ) { \ + GLfloat dpI = DOT4V( I, x, y, z, w ); \ + GLfloat dpJ = DOT4V( J, x, y, z, w ); \ \ - if (DIFFERENT_SIGNS(dpI, dpJ)) { \ + if ( DIFFERENT_SIGNS( dpI, dpJ ) ) { \ GLfloat *O = verts[next_vert].f; \ GLfloat t = dpI / (dpI - dpJ); \ \ - interp(t, O, I, J); \ + interp( t, O, I, J ); \ \ clipmask[next_vert] = 0; \ \ - if (NEGATIVE(dpI)) { \ + if ( NEGATIVE( dpI ) ) { \ clipmask[elts[0]] |= PLANE; \ I = O; \ elts[0] = next_vert++; \ @@ -202,13 +193,13 @@ J = O; \ elts[1] = next_vert++; \ } \ - } else if (NEGATIVE(dpI)) return; \ + } else if ( NEGATIVE( dpI ) ) return; \ } \ } while (0) static __inline void r128_tri_clip( GLuint **p_elts, - r128Vertex *verts, + r128VertexPtr verts, GLubyte *clipmask, GLuint *p_next_vert, GLubyte mask, @@ -237,7 +228,7 @@ /* Convert the planar polygon to a list of triangles */ out = inlist[in]; - for (i = 2 ; i < n ; i++) { + for ( i = 2 ; i < n ; i++ ) { elts[0] = out[0]; elts[1] = out[i-1]; elts[2] = out[i]; @@ -250,7 +241,7 @@ static __inline void r128_line_clip( GLuint **p_elts, - r128Vertex *verts, + r128VertexPtr verts, GLubyte *clipmask, GLuint *p_next_vert, GLubyte mask, @@ -274,26 +265,27 @@ -#define CLIP_POINT(e) \ +#define CLIP_POINT( e ) \ do { \ if (mask[e]) *out++ = e; \ } while (0) -#define CLIP_LINE(e1, e0) \ +#define CLIP_LINE( e1, e0 ) \ do { \ GLubyte ormask = mask[e0] | mask[e1]; \ out[0] = e1; \ out[1] = e0; \ out += 2; \ - if (ormask) { \ + if ( ormask ) { \ out-=2; \ - if (!(mask[e0] & mask[e1])) { \ - r128_line_clip(&out, verts, mask, &next_vert, ormask, interp); \ + if ( !(mask[e0] & mask[e1]) ) { \ + r128_line_clip( &out, verts, mask, \ + &next_vert, ormask, interp ); \ } \ } \ } while (0) -#define CLIP_TRIANGLE(e2, e1, e0) \ +#define CLIP_TRIANGLE( e2, e1, e0 ) \ do { \ GLubyte ormask; \ out[0] = e2; \ @@ -301,10 +293,11 @@ out[2] = e0; \ out += 3; \ ormask = mask[e2] | mask[e1] | mask[e0]; \ - if (ormask) { \ + if ( ormask ) { \ out -= 3; \ - if (!(mask[e2] & mask[e1] & mask[e0])) { \ - r128_tri_clip(&out, verts, mask, &next_vert, ormask, interp); \ + if ( !(mask[e2] & mask[e1] & mask[e0]) ) { \ + r128_tri_clip( &out, verts, mask, \ + &next_vert, ormask, interp ); \ } \ } \ } while (0) @@ -316,47 +309,47 @@ * ie (points, lines, triangles) containing all the clipped and * unclipped primitives from the original list. */ -#define LOCAL_VARS \ - r128ContextPtr r128ctx = R128_CONTEXT(VB->ctx); \ - r128VertexBufferPtr r128VB = R128_DRIVER_DATA(VB); \ - GLuint *elt = VB->EltPtr->data; \ - r128Vertex *verts = r128VB->verts; \ - GLuint next_vert = r128VB->last_vert; \ - GLuint *out = r128VB->clipped_elements.data; \ - GLubyte *mask = VB->ClipMask; \ - r128_interp_func interp = r128ctx->interp; \ +#define LOCAL_VARS \ + r128ContextPtr rmesa = R128_CONTEXT(VB->ctx); \ + r128VertexBufferPtr r128VB = R128_DRIVER_DATA(VB); \ + GLuint *elt = VB->EltPtr->data; \ + r128VertexPtr verts = r128VB->verts; \ + GLuint next_vert = r128VB->last_vert; \ + GLuint *out = r128VB->clipped_elements.data; \ + GLubyte *mask = VB->ClipMask; \ + r128_interp_func interp = rmesa->interp; \ (void) interp; (void) verts; -#define POSTFIX \ - r128VB->clipped_elements.count = out - r128VB->clipped_elements.data; \ +#define POSTFIX \ + r128VB->clipped_elements.count = out - r128VB->clipped_elements.data;\ r128VB->last_vert = next_vert; -#define INIT(x) +#define INIT( x ) -#define RENDER_POINTS(start, count) \ -do { \ - GLuint i; \ - for (i = start; i < count; i++) \ - CLIP_POINT(elt[i]); \ +#define RENDER_POINTS( start, count ) \ +do { \ + GLuint i; \ + for ( i = start ; i < count ; i++ ) \ + CLIP_POINT( elt[i] ); \ } while (0) -#define RENDER_LINE(i1, i0) \ -do { \ - CLIP_LINE(elt[i1], elt[i0]); \ +#define RENDER_LINE( i1, i0 ) \ +do { \ + CLIP_LINE( elt[i1], elt[i0] ); \ } while (0) -#define RENDER_TRI(i2, i1, i0, pv, parity) \ -do { \ - GLuint e2 = elt[i2], e1 = elt[i1], e0 = elt[i0]; \ - if (parity) e2 = elt[i1], e1 = elt[i2]; \ - CLIP_TRIANGLE(e2, e1, e0); \ +#define RENDER_TRI( i2, i1, i0, pv, parity ) \ +do { \ + GLuint e2 = elt[i2], e1 = elt[i1], e0 = elt[i0]; \ + if ( parity ) e2 = elt[i1], e1 = elt[i2]; \ + CLIP_TRIANGLE( e2, e1, e0 ); \ } while (0) -#define RENDER_QUAD(i3, i2, i1, i0, pv) \ -do { \ - CLIP_TRIANGLE(elt[i3], elt[i2], elt[i0]); \ - CLIP_TRIANGLE(elt[i2], elt[i1], elt[i0]); \ +#define RENDER_QUAD( i3, i2, i1, i0, pv ) \ +do { \ + CLIP_TRIANGLE( elt[i3], elt[i2], elt[i0] ); \ + CLIP_TRIANGLE( elt[i2], elt[i1], elt[i0] ); \ } while (0) #define TAG(x) r128_##x##_clip_elt @@ -406,17 +399,16 @@ -/* Render elements directly from original list of vertices. */ static void r128_render_elements_direct( struct vertex_buffer *VB ) { - GLcontext *ctx = VB->ctx; - r128ContextPtr r128ctx = R128_CONTEXT(ctx); - GLenum prim = ctx->CVA.elt_mode; - GLuint nr = VB->EltPtr->count; - render_func func = r128_render_tab_smooth_indirect[prim]; - GLuint p = 0; + GLcontext *ctx = VB->ctx; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + GLenum prim = ctx->CVA.elt_mode; + GLuint nr = VB->EltPtr->count; + render_func func = r128_render_tab_smooth_indirect[prim]; + GLuint p = 0; - if ( r128ctx->new_state ) + if ( rmesa->new_state ) r128DDUpdateHWState( ctx ); do { @@ -425,20 +417,20 @@ ctx->Driver.MultipassFunc( VB, ++p ) ); } -/* Project vertices from clip to device space */ static void r128_project_vertices( struct vertex_buffer *VB ) { - GLcontext *ctx = VB->ctx; - GLmatrix *mat = &ctx->Viewport.WindowMap; - r128ContextPtr r128ctx = R128_CONTEXT(ctx); - r128VertexBufferPtr r128VB = R128_DRIVER_DATA(VB); + GLcontext *ctx = VB->ctx; + GLmatrix *mat = &ctx->Viewport.WindowMap; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + r128VertexBufferPtr r128VB = R128_DRIVER_DATA(VB); + GLfloat *m = rmesa->tmp_matrix; m[MAT_SX] = mat->m[MAT_SX]; m[MAT_TX] = mat->m[MAT_TX]; m[MAT_SY] = -mat->m[MAT_SY]; - m[MAT_TY] = -mat->m[MAT_TY] + r128ctx->driDrawable->h; - m[MAT_SZ] = mat->m[MAT_SZ] * r128ctx->depth_scale; - m[MAT_TZ] = mat->m[MAT_TZ] * r128ctx->depth_scale; + m[MAT_TY] = -mat->m[MAT_TY] + rmesa->driDrawable->h; + m[MAT_SZ] = mat->m[MAT_SZ] * rmesa->depth_scale; + m[MAT_TZ] = mat->m[MAT_TZ] * rmesa->depth_scale; gl_project_v16( r128VB->verts[VB->CopyStart].f, r128VB->verts[r128VB->last_vert].f, @@ -446,20 +438,20 @@ 16 * 4 ); } -/* Project clipped vertices from clip to device space */ static void r128_project_clipped_vertices( struct vertex_buffer *VB ) { - GLcontext *ctx = VB->ctx; - GLmatrix *mat = &ctx->Viewport.WindowMap; - r128ContextPtr r128ctx = R128_CONTEXT(ctx); - r128VertexBufferPtr r128VB = R128_DRIVER_DATA(VB); + GLcontext *ctx = VB->ctx; + GLmatrix *mat = &ctx->Viewport.WindowMap; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + r128VertexBufferPtr r128VB = R128_DRIVER_DATA(VB); + GLfloat *m = rmesa->tmp_matrix; m[MAT_SX] = mat->m[MAT_SX]; m[MAT_TX] = mat->m[MAT_TX]; m[MAT_SY] = -mat->m[MAT_SY]; - m[MAT_TY] = -mat->m[MAT_TY] + r128ctx->driDrawable->h; - m[MAT_SZ] = mat->m[MAT_SZ] * r128ctx->depth_scale; - m[MAT_TZ] = mat->m[MAT_TZ] * r128ctx->depth_scale; + m[MAT_TY] = -mat->m[MAT_TY] + rmesa->driDrawable->h; + m[MAT_SZ] = mat->m[MAT_SZ] * rmesa->depth_scale; + m[MAT_TZ] = mat->m[MAT_TZ] * rmesa->depth_scale; gl_project_clipped_v16( r128VB->verts[VB->CopyStart].f, r128VB->verts[r128VB->last_vert].f, @@ -468,9 +460,8 @@ VB->ClipMask + VB->CopyStart ); } -static struct r128_fast_tab r128FastTab[0x80]; +static struct r128_fast_tab r128FastTab[R128_MAX_SETUPFUNC]; -/* Initialize the table of fast path support functions */ void r128DDFastPathInit( void ) { r128_render_init_clip_elt(); @@ -481,25 +472,26 @@ r128_init_fastpath_TEX0( &r128FastTab[R128_TEX0_BIT] ); r128_init_fastpath_RGBA_TEX0( &r128FastTab[R128_RGBA_BIT|R128_TEX0_BIT] ); r128_init_fastpath_TEX0_TEX1( &r128FastTab[R128_TEX0_BIT|R128_TEX1_BIT] ); - r128_init_fastpath_RGBA_TEX0_TEX1( &r128FastTab[R128_RGBA_BIT|R128_TEX0_BIT| - R128_TEX1_BIT] ); + r128_init_fastpath_RGBA_TEX0_TEX1( &r128FastTab[(R128_RGBA_BIT | + R128_TEX0_BIT | + R128_TEX1_BIT)] ); } #define VALID_SETUP (R128_RGBA_BIT | R128_TEX0_BIT | R128_TEX1_BIT) void r128DDFastPath( struct vertex_buffer *VB ) { - GLcontext *ctx = VB->ctx; + GLcontext *ctx = VB->ctx; GLenum prim = ctx->CVA.elt_mode; - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); - struct r128_fast_tab *tab = &r128FastTab[r128ctx->SetupIndex & VALID_SETUP]; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + struct r128_fast_tab *tab = &r128FastTab[rmesa->SetupIndex & VALID_SETUP]; GLuint do_cliptest = 1; gl_prepare_arrays_cva( VB ); /* still need this */ if ( ( gl_reduce_prim[prim] == GL_TRIANGLES ) && ( VB->Count < (R128_BUFFER_SIZE / (10 * sizeof(GLuint))) ) && - ( ctx->ModelProjectMatrix.flags & (MAT_FLAG_GENERAL| + ( ctx->ModelProjectMatrix.flags & (MAT_FLAG_GENERAL | MAT_FLAG_PERSPECTIVE) ) ) { r128DDEltPath( VB ); @@ -514,14 +506,14 @@ tab->build_vertices( VB, do_cliptest ); /* object->clip space */ - if ( r128ctx->new_state ) + if ( rmesa->new_state ) r128DDUpdateHWState( ctx ); if ( VB->ClipOrMask ) { if ( !VB->ClipAndMask ) { render_func *clip = r128_render_tab_clip_elt; - r128ctx->interp = tab->interp; + rmesa->interp = tab->interp; clip[prim]( VB, 0, VB->EltPtr->count, 0 ); /* build new elts */ Index: xc/lib/GL/mesa/src/drv/r128/r128_fasttmp.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_fasttmp.h:1.2 xc/lib/GL/mesa/src/drv/r128/r128_fasttmp.h:1.3 --- xc/lib/GL/mesa/src/drv/r128/r128_fasttmp.h:1.2 Mon Dec 4 14:21:46 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_fasttmp.h Sun Jan 7 20:07:20 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_fasttmp.h,v 1.2 2000/12/04 19:21:46 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_fasttmp.h,v 1.3 2001/01/08 01:07:20 martin Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -33,12 +33,8 @@ * */ -/* FIXME: These routines were copied from the i810 driver, and were only - slightly modified for the Rage 128. They still need to be optmizied - and cleaned up. Also, support for USE_RHW2 needs to be added. */ - /* The first part of setup is applied to all vertices, clipped or - * unclipped. This data w!ill be used for clipping, and then all + * unclipped. This data will be used for clipping, and then all * vertices with a zero clipmask will be projected to device space. * * This could be split into several loops, but - it seems that the @@ -46,106 +42,107 @@ * performance factor, and that multiple loops mean multiple cache * misses.... */ -static void TAG(r128_setup_full)(struct vertex_buffer *VB, GLuint do_cliptest) +static void TAG(r128_setup_full)( struct vertex_buffer *VB, + GLuint do_cliptest ) { - GLcontext *ctx = VB->ctx; - r128VertexBufferPtr r128VB = R128_DRIVER_DATA(VB); - const GLfloat *m = ctx->ModelProjectMatrix.m; - GLuint start = VB->CopyStart; - GLuint count = VB->Count; + GLcontext *ctx = VB->ctx; + r128VertexBufferPtr rvb = R128_DRIVER_DATA(VB); + const GLfloat *m = ctx->ModelProjectMatrix.m; + GLuint start = VB->CopyStart; + GLuint count = VB->Count; - gl_xform_points3_v16_general(r128VB->verts[start].f, + gl_xform_points3_v16_general( rvb->verts[start].f, m, VB->ObjPtr->start, VB->ObjPtr->stride, - count - start); + count - start ); - if (do_cliptest) { - VB->ClipAndMask = ~0; - VB->ClipOrMask = 0; - gl_cliptest_points4_v16(r128VB->verts[start].f, - r128VB->verts[count].f, - &(VB->ClipOrMask), - &(VB->ClipAndMask), - VB->ClipMask + start); - } - - /* These branches are all resolved at compile time. Hopefully all - * the pointers are valid addresses even when not enabled. - */ - if (TYPE) { - GLubyte *color = VB->ColorPtr->start; - GLfloat *tex0_data = VB->TexCoordPtr[0]->start; - GLfloat *tex1_data = VB->TexCoordPtr[1]->start; - - GLuint color_stride = VB->ColorPtr->stride; - GLuint tex0_stride = VB->TexCoordPtr[0]->stride; - GLuint tex1_stride = VB->TexCoordPtr[1]->stride; + if ( do_cliptest ) { + VB->ClipAndMask = ~0; + VB->ClipOrMask = 0; + gl_cliptest_points4_v16( rvb->verts[start].f, + rvb->verts[count].f, + &(VB->ClipOrMask), + &(VB->ClipAndMask), + VB->ClipMask + start ); + } + + /* These branches are all resolved at compile time. Hopefully all + * the pointers are valid addresses even when not enabled. + */ + if ( TYPE ) { + GLubyte *color = VB->ColorPtr->start; + GLfloat *tex0_data = VB->TexCoordPtr[0]->start; + GLfloat *tex1_data = VB->TexCoordPtr[1]->start; + + GLuint color_stride = VB->ColorPtr->stride; + GLuint tex0_stride = VB->TexCoordPtr[0]->stride; + GLuint tex1_stride = VB->TexCoordPtr[1]->stride; - GLfloat *f = r128VB->verts[start].f; - GLfloat *end = f + (16 * (count - start)); + GLfloat *f = rvb->verts[start].f; + GLfloat *end = f + (16 * (count - start)); - while (f != end) { - if (TYPE & R128_RGBA_BIT) { + while ( f != end ) { + if ( TYPE & R128_RGBA_BIT ) { #if defined(USE_X86_ASM) - /* GTH: I'd like to get some accurate timing data on the - * bswap instruction, but it gives a nice speedup anyway. - */ - __asm__ ("movl (%%edx),%%eax \n" + /* GH: I'd like to get some accurate timing data on the + * bswap instruction, but it gives a nice speedup anyway. + */ + __asm__ ( "movl (%%edx),%%eax \n" "bswap %%eax \n" "rorl $8,%%eax \n" "movl %%eax,16(%%edi) \n" : : "d" (color), "D" (f) - : "%eax"); + : "%eax" ); #else - GLubyte *col = color; - GLubyte *b = (GLubyte *)&f[CLIP_UBYTE_COLOR]; - b[CLIP_UBYTE_B] = col[2]; - b[CLIP_UBYTE_G] = col[1]; - b[CLIP_UBYTE_R] = col[0]; - b[CLIP_UBYTE_A] = col[3]; + GLubyte *col = color; + GLubyte *b = (GLubyte *)&f[CLIP_UBYTE_COLOR]; + b[CLIP_UBYTE_B] = col[2]; + b[CLIP_UBYTE_G] = col[1]; + b[CLIP_UBYTE_R] = col[0]; + b[CLIP_UBYTE_A] = col[3]; #endif - } - if (TYPE & R128_TEX0_BIT) { + } + if ( TYPE & R128_TEX0_BIT ) { #if defined (USE_X86_ASM) - __asm__ ("movl (%%ecx), %%eax \n" + __asm__ ( "movl (%%ecx), %%eax \n" "movl %%eax, 24(%%edi) \n" "movl 4(%%ecx), %%eax \n" "movl %%eax, 28(%%edi)" : : "c" (tex0_data), "D" (f) - : "%eax"); + : "%eax" ); #else - *(unsigned int *)(f+CLIP_S0) = *(unsigned int *)tex0_data; - *(unsigned int *)(f+CLIP_T0) = *(unsigned int *)(tex0_data+1); + *(GLuint *)(f+CLIP_S0) = *(GLuint *)tex0_data; + *(GLuint *)(f+CLIP_T0) = *(GLuint *)(tex0_data+1); #endif - } - if (TYPE & R128_TEX1_BIT) { - /* Hits a second cache line. - */ + } + if ( TYPE & R128_TEX1_BIT ) { + /* Hits a second cache line. + */ #if defined (USE_X86_ASM) - __asm__ ("movl (%%esi), %%eax \n" + __asm__ ( "movl (%%esi), %%eax \n" "movl %%eax, 32(%%edi) \n" "movl 4(%%esi), %%eax \n" "movl %%eax, 36(%%edi)" : : "S" (tex1_data), "D" (f) - : "%eax"); + : "%eax" ); #else - *(unsigned int *)(f+CLIP_S1) = *(unsigned int *)tex1_data; - *(unsigned int *)(f+CLIP_T1) = *(unsigned int *)(tex1_data+1); + *(GLuint *)(f+CLIP_S1) = *(GLuint *)tex1_data; + *(GLuint *)(f+CLIP_T1) = *(GLuint *)(tex1_data+1); #endif - } - if (TYPE & R128_RGBA_BIT) color += color_stride; - if (TYPE & R128_TEX0_BIT) STRIDE_F(tex0_data, tex0_stride); - if (TYPE & R128_TEX1_BIT) STRIDE_F(tex1_data, tex1_stride); - f += 16; - } - } + } + if ( TYPE & R128_RGBA_BIT ) color += color_stride; + if ( TYPE & R128_TEX0_BIT ) STRIDE_F( tex0_data, tex0_stride ); + if ( TYPE & R128_TEX1_BIT ) STRIDE_F( tex1_data, tex1_stride ); + f += 16; + } + } - r128VB->clipped_elements.count = start; - r128VB->last_vert = count; + rvb->clipped_elements.count = start; + rvb->last_vert = count; } @@ -153,39 +150,39 @@ * routine into the header. Less code and better chance of doing some * of this stuff in assembly. */ -static void TAG(r128_interp_vert)(GLfloat t, - GLfloat *O, - const GLfloat *I, - const GLfloat *J) +static void TAG(r128_interp_vert)( GLfloat t, + GLfloat *O, + const GLfloat *I, + const GLfloat *J ) { - O[0] = LINTERP(t, I[0], J[0]); - O[1] = LINTERP(t, I[1], J[1]); - O[2] = LINTERP(t, I[2], J[2]); - O[3] = LINTERP(t, I[3], J[3]); - - if (TYPE & R128_RGBA_BIT) { - INTERP_RGBA(t, - ((GLubyte *)&(O[4])), - ((GLubyte *)&(I[4])), - ((GLubyte *)&(J[4]))); - } - - if (TYPE & R128_TEX0_BIT) { - O[6] = LINTERP(t, I[6], J[6]); - O[7] = LINTERP(t, I[7], J[7]); - } - - if (TYPE & R128_TEX1_BIT) { - O[8] = LINTERP(t, I[8], J[8]); - O[9] = LINTERP(t, I[9], J[9]); - } + O[0] = LINTERP( t, I[0], J[0] ); + O[1] = LINTERP( t, I[1], J[1] ); + O[2] = LINTERP( t, I[2], J[2] ); + O[3] = LINTERP( t, I[3], J[3] ); + + if ( TYPE & R128_RGBA_BIT ) { + INTERP_RGBA( t, + ((GLubyte *)&(O[4])), + ((GLubyte *)&(I[4])), + ((GLubyte *)&(J[4])) ); + } + + if ( TYPE & R128_TEX0_BIT ) { + O[6] = LINTERP( t, I[6], J[6] ); + O[7] = LINTERP( t, I[7], J[7] ); + } + + if ( TYPE & R128_TEX1_BIT ) { + O[8] = LINTERP( t, I[8], J[8] ); + O[9] = LINTERP( t, I[9], J[9] ); + } } static void TAG(r128_init_fastpath)(struct r128_fast_tab *tab) { - tab->build_vertices = TAG(r128_setup_full); - tab->interp = TAG(r128_interp_vert); + tab->build_vertices = TAG(r128_setup_full); + tab->interp = TAG(r128_interp_vert); } #undef TYPE Index: xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c:1.2 xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c:1.6 --- xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c:1.2 Tue Dec 12 12:17:07 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c Tue Apr 10 12:07:52 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c,v 1.2 2000/12/12 17:17:07 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c,v 1.6 2001/04/10 16:07:52 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -38,7 +38,7 @@ #include "mem.h" -#define R128_TIMEOUT 2000000 +#define R128_TIMEOUT 2048 /* ============================================================= @@ -47,9 +47,9 @@ /* Get a new VB from the pool of vertex buffers in AGP space. */ -drmBufPtr r128GetBufferLocked( r128ContextPtr r128ctx ) +drmBufPtr r128GetBufferLocked( r128ContextPtr rmesa ) { - int fd = r128ctx->r128Screen->driScreen->fd; + int fd = rmesa->r128Screen->driScreen->fd; int index = 0; int size = 0; drmDMAReq dma; @@ -57,7 +57,7 @@ int to = 0; int ret; - dma.context = r128ctx->hHWContext; + dma.context = rmesa->hHWContext; dma.send_count = 0; dma.send_list = NULL; dma.send_sizes = NULL; @@ -68,15 +68,15 @@ dma.request_sizes = &size; dma.granted_count = 0; - while ( !buf && ( to++ < r128ctx->CCEtimeout ) ) { + while ( !buf && ( to++ < R128_TIMEOUT ) ) { ret = drmDMA( fd, &dma ); if ( ret == 0 ) { - buf = &r128ctx->r128Screen->buffers->list[index]; + buf = &rmesa->r128Screen->buffers->list[index]; buf->used = 0; #if ENABLE_PERF_BOXES /* Bump the performance counter */ - r128ctx->c_vertexBuffers++; + rmesa->c_vertexBuffers++; #endif return buf; } @@ -84,6 +84,7 @@ if ( !buf ) { drmR128EngineReset( fd ); + UNLOCK_HARDWARE( rmesa ); fprintf( stderr, "Error: Could not get new VB... exiting\n" ); exit( -1 ); } @@ -91,57 +92,50 @@ return buf; } -void r128FlushVerticesLocked( r128ContextPtr r128ctx ) +void r128FlushVerticesLocked( r128ContextPtr rmesa ) { - XF86DRIClipRectPtr pbox = r128ctx->pClipRects; - int nbox = r128ctx->numClipRects; - drmBufPtr buffer = r128ctx->vert_buf; - int count = r128ctx->num_verts; + XF86DRIClipRectPtr pbox = rmesa->pClipRects; + int nbox = rmesa->numClipRects; + drmBufPtr buffer = rmesa->vert_buf; + int count = rmesa->num_verts; int prim = R128_TRIANGLES; - int fd = r128ctx->driScreen->fd; + int fd = rmesa->driScreen->fd; int i; - if ( 0 ) - fprintf( stderr, "%s: buf=%d count=%d\n", - __FUNCTION__, buffer ? buffer->idx : -1, count ); + rmesa->num_verts = 0; + rmesa->vert_buf = NULL; - r128ctx->num_verts = 0; - r128ctx->vert_buf = NULL; - - if ( !buffer ) { + if ( !buffer ) return; - } - if ( r128ctx->dirty & ~R128_UPLOAD_CLIPRECTS ) { - r128EmitHwStateLocked( r128ctx ); - } + if ( rmesa->dirty & ~R128_UPLOAD_CLIPRECTS ) + r128EmitHwStateLocked( rmesa ); - if ( !nbox ) { + if ( !nbox ) count = 0; - } - if ( nbox >= R128_NR_SAREA_CLIPRECTS ) { - r128ctx->dirty |= R128_UPLOAD_CLIPRECTS; - } + + if ( nbox >= R128_NR_SAREA_CLIPRECTS ) + rmesa->dirty |= R128_UPLOAD_CLIPRECTS; - if ( !count || !(r128ctx->dirty & R128_UPLOAD_CLIPRECTS) ) + if ( !count || !(rmesa->dirty & R128_UPLOAD_CLIPRECTS) ) { if ( nbox < 3 ) { - r128ctx->sarea->nbox = 0; + rmesa->sarea->nbox = 0; } else { - r128ctx->sarea->nbox = nbox; + rmesa->sarea->nbox = nbox; } drmR128FlushVertexBuffer( fd, prim, buffer->idx, count, 1 ); } else { - for (i = 0 ; i < nbox ; ) { + for ( i = 0 ; i < nbox ; ) { int nr = MIN2( i + R128_NR_SAREA_CLIPRECTS, nbox ); - XF86DRIClipRectPtr b = r128ctx->sarea->boxes; + XF86DRIClipRectPtr b = rmesa->sarea->boxes; int discard = 0; - r128ctx->sarea->nbox = nr - i; - for ( ; i < nr ; i++) { + rmesa->sarea->nbox = nr - i; + for ( ; i < nr ; i++ ) { *b++ = pbox[i]; } @@ -151,12 +145,12 @@ discard = 1; } - r128ctx->sarea->dirty |= R128_UPLOAD_CLIPRECTS; + rmesa->sarea->dirty |= R128_UPLOAD_CLIPRECTS; drmR128FlushVertexBuffer( fd, prim, buffer->idx, count, discard ); } } - r128ctx->dirty &= ~R128_UPLOAD_CLIPRECTS; + rmesa->dirty &= ~R128_UPLOAD_CLIPRECTS; } @@ -165,60 +159,53 @@ * Indexed vertex buffer handling */ -void r128GetEltBufLocked( r128ContextPtr r128ctx ) +void r128GetEltBufLocked( r128ContextPtr rmesa ) { - r128ctx->elt_buf = r128GetBufferLocked( r128ctx ); + rmesa->elt_buf = r128GetBufferLocked( rmesa ); } -void r128FireEltsLocked( r128ContextPtr r128ctx, +void r128FireEltsLocked( r128ContextPtr rmesa, GLuint start, GLuint end, GLuint discard ) { - XF86DRIClipRectPtr pbox = r128ctx->pClipRects; - int nbox = r128ctx->numClipRects; - drmBufPtr buffer = r128ctx->elt_buf; + XF86DRIClipRectPtr pbox = rmesa->pClipRects; + int nbox = rmesa->numClipRects; + drmBufPtr buffer = rmesa->elt_buf; int prim = R128_TRIANGLES; - int fd = r128ctx->driScreen->fd; + int fd = rmesa->driScreen->fd; int i; - if ( 0 ) - fprintf( stderr, "%s: start=%d end=%d discard=%d\n", - __FUNCTION__, start, end, discard ); - - if ( !buffer ) { + if ( !buffer ) return; - } - if ( r128ctx->dirty & ~R128_UPLOAD_CLIPRECTS ) { - r128EmitHwStateLocked( r128ctx ); - } + if ( rmesa->dirty & ~R128_UPLOAD_CLIPRECTS ) + r128EmitHwStateLocked( rmesa ); - if ( !nbox ) { + if ( !nbox ) end = start; - } - if ( nbox >= R128_NR_SAREA_CLIPRECTS ) { - r128ctx->dirty |= R128_UPLOAD_CLIPRECTS; - } + + if ( nbox >= R128_NR_SAREA_CLIPRECTS ) + rmesa->dirty |= R128_UPLOAD_CLIPRECTS; - if ( start == end || !(r128ctx->dirty & R128_UPLOAD_CLIPRECTS) ) + if ( start == end || !(rmesa->dirty & R128_UPLOAD_CLIPRECTS) ) { if ( nbox < 3 ) { - r128ctx->sarea->nbox = 0; + rmesa->sarea->nbox = 0; } else { - r128ctx->sarea->nbox = nbox; + rmesa->sarea->nbox = nbox; } drmR128FlushIndices( fd, prim, buffer->idx, start, end, discard ); } else { - for (i = 0 ; i < nbox ; ) { + for ( i = 0 ; i < nbox ; ) { int nr = MIN2( i + R128_NR_SAREA_CLIPRECTS, nbox ); - XF86DRIClipRectPtr b = r128ctx->sarea->boxes; + XF86DRIClipRectPtr b = rmesa->sarea->boxes; int d = 0; - r128ctx->sarea->nbox = nr - i; - for ( ; i < nr ; i++) { + rmesa->sarea->nbox = nr - i; + for ( ; i < nr ; i++ ) { *b++ = pbox[i]; } @@ -228,44 +215,40 @@ d = discard; } - r128ctx->sarea->dirty |= R128_UPLOAD_CLIPRECTS; - drmR128FlushIndices( fd, prim, buffer->idx, start, end, discard ); + rmesa->sarea->dirty |= R128_UPLOAD_CLIPRECTS; + drmR128FlushIndices( fd, prim, buffer->idx, start, end, d ); } } if ( R128_DEBUG & DEBUG_ALWAYS_SYNC ) { - drmR128WaitForIdleCCE( r128ctx->driFd ); + drmR128WaitForIdleCCE( rmesa->driFd ); } - r128ctx->dirty &= ~R128_UPLOAD_CLIPRECTS; + rmesa->dirty &= ~R128_UPLOAD_CLIPRECTS; } -void r128FlushEltsLocked( r128ContextPtr r128ctx ) +void r128FlushEltsLocked( r128ContextPtr rmesa ) { - if ( r128ctx->first_elt != r128ctx->next_elt ) { - r128FireEltsLocked( r128ctx, - ((GLuint)r128ctx->first_elt - - (GLuint)r128ctx->elt_buf->address), - ((GLuint)r128ctx->next_elt - - (GLuint)r128ctx->elt_buf->address), + if ( rmesa->first_elt != rmesa->next_elt ) { + r128FireEltsLocked( rmesa, + ((char *)rmesa->first_elt - + (char *)rmesa->elt_buf->address), + ((char *)rmesa->next_elt - + (char *)rmesa->elt_buf->address), 0 ); - ALIGN_NEXT_ELT( r128ctx ); - r128ctx->first_elt = r128ctx->next_elt; + ALIGN_NEXT_ELT( rmesa ); + rmesa->first_elt = rmesa->next_elt; } } -void r128ReleaseBufLocked( r128ContextPtr r128ctx, drmBufPtr buffer ) +void r128ReleaseBufLocked( r128ContextPtr rmesa, drmBufPtr buffer ) { - int fd = r128ctx->driScreen->fd; - - if ( 0 ) - fprintf( stderr, "%s: buffer=%p\n", - __FUNCTION__, buffer ); + int fd = rmesa->driScreen->fd; - if ( !buffer ) { + if ( !buffer ) return; - } + drmR128FlushVertexBuffer( fd, R128_TRIANGLES, buffer->idx, 0, 1 ); } @@ -273,28 +256,28 @@ /* Allocate some space in the current vertex buffer. If the current * buffer is full, flush it and grab another one. */ -CARD32 *r128AllocVertices( r128ContextPtr r128ctx, int count ) +CARD32 *r128AllocVertices( r128ContextPtr rmesa, int count ) { - return r128AllocVerticesInline( r128ctx, count ); + return r128AllocVerticesInline( rmesa, count ); } - /* ================================================================ * Texture uploads */ -void r128FireBlitLocked( r128ContextPtr r128ctx, drmBufPtr buffer, +void r128FireBlitLocked( r128ContextPtr rmesa, drmBufPtr buffer, GLint offset, GLint pitch, GLint format, GLint x, GLint y, GLint width, GLint height ) { GLint ret; - ret = drmR128TextureBlit( r128ctx->driFd, buffer->idx, + ret = drmR128TextureBlit( rmesa->driFd, buffer->idx, offset, pitch, format, x, y, width, height ); if ( ret ) { + UNLOCK_HARDWARE( rmesa ); fprintf( stderr, "drmR128TextureBlit: return = %d\n", ret ); exit( 1 ); } @@ -317,16 +300,28 @@ * long as we want for a frame to complete. If it never does, then * the card has locked. */ -static int r128WaitForFrameCompletion( r128ContextPtr r128ctx ) +static int r128WaitForFrameCompletion( r128ContextPtr rmesa ) { - unsigned char *R128MMIO = r128ctx->r128Screen->mmio; + unsigned char *R128MMIO = rmesa->r128Screen->mmio.map; CARD32 frame; int i; int wait = 0; while ( 1 ) { +#if defined(__alpha__) + /* necessary to preserve the Alpha paradigm */ + /* NOTE: this will not work on SPARSE machines */ + mem_barrier(); + frame = *(volatile CARD32 *)(void *)(R128MMIO + R128_LAST_FRAME_REG); +#else frame = INREG( R128_LAST_FRAME_REG ); - if ( r128ctx->sarea->last_frame - frame <= R128_MAX_OUTSTANDING ) { +#endif + + if ( 0 ) + fprintf( stderr, " last=0x%08x frame=0x%08x\n", + rmesa->sarea->last_frame, frame ); + + if ( rmesa->sarea->last_frame - frame <= R128_MAX_OUTSTANDING ) { break; } @@ -340,68 +335,131 @@ return wait; } -/* Copy the back color buffer to the front color buffer */ -void r128SwapBuffers( r128ContextPtr r128ctx ) +/* Copy the back color buffer to the front color buffer. + */ +void r128SwapBuffers( r128ContextPtr rmesa ) { - GLint nbox = r128ctx->numClipRects; + GLint nbox; GLint i; GLint ret; if ( R128_DEBUG & DEBUG_VERBOSE_API ) { fprintf( stderr, "\n********************************\n" ); fprintf( stderr, "\n%s( %p )\n\n", - __FUNCTION__, r128ctx->glCtx ); + __FUNCTION__, rmesa->glCtx ); fflush( stderr ); } + + FLUSH_BATCH( rmesa ); - /* Flush any outstanding vertex buffers */ - FLUSH_BATCH( r128ctx ); + LOCK_HARDWARE( rmesa ); - LOCK_HARDWARE( r128ctx ); + nbox = rmesa->numClipRects; /* must be in locked region */ /* Throttle the frame rate -- only allow one pending swap buffers * request at a time. */ - if ( !r128WaitForFrameCompletion( r128ctx ) ) { - r128ctx->hardwareWentIdle = 1; + if ( !r128WaitForFrameCompletion( rmesa ) ) { + rmesa->hardwareWentIdle = 1; } else { - r128ctx->hardwareWentIdle = 0; + rmesa->hardwareWentIdle = 0; } for ( i = 0 ; i < nbox ; ) { GLint nr = MIN2( i + R128_NR_SAREA_CLIPRECTS , nbox ); - XF86DRIClipRectPtr box = r128ctx->pClipRects; - XF86DRIClipRectPtr b = r128ctx->sarea->boxes; + XF86DRIClipRectPtr box = rmesa->pClipRects; + XF86DRIClipRectPtr b = rmesa->sarea->boxes; GLint n = 0; for ( ; i < nr ; i++ ) { *b++ = *(XF86DRIClipRectRec *)&box[i]; n++; } - r128ctx->sarea->nbox = n; + rmesa->sarea->nbox = n; - ret = drmR128SwapBuffers( r128ctx->driFd ); + ret = drmR128SwapBuffers( rmesa->driFd ); if ( ret ) { + UNLOCK_HARDWARE( rmesa ); fprintf( stderr, "drmR128SwapBuffers: return = %d\n", ret ); exit( 1 ); } } if ( R128_DEBUG & DEBUG_ALWAYS_SYNC ) { - drmR128WaitForIdleCCE( r128ctx->driFd ); + drmR128WaitForIdleCCE( rmesa->driFd ); + } + + UNLOCK_HARDWARE( rmesa ); + + rmesa->new_state |= R128_NEW_CONTEXT; + rmesa->dirty |= (R128_UPLOAD_CONTEXT | + R128_UPLOAD_MASKS | + R128_UPLOAD_CLIPRECTS); + +#if ENABLE_PERF_BOXES + /* Log the performance counters if necessary */ + r128PerformanceCounters( rmesa ); +#endif +} + +void r128PageFlip( r128ContextPtr rmesa ) +{ + GLint ret; + + if ( R128_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "\n%s( %p ): page=%d\n\n", + __FUNCTION__, rmesa->glCtx, rmesa->currentPage ); + } + + FLUSH_BATCH( rmesa ); + + LOCK_HARDWARE( rmesa ); + + /* Throttle the frame rate -- only allow one pending swap buffers + * request at a time. + */ + if ( !r128WaitForFrameCompletion( rmesa ) ) { + rmesa->hardwareWentIdle = 1; + } else { + rmesa->hardwareWentIdle = 0; + } + + /* The kernel will have been initialized to perform page flipping + * on a swapbuffers ioctl. + */ + ret = drmR128SwapBuffers( rmesa->driFd ); + + UNLOCK_HARDWARE( rmesa ); + + if ( ret ) { + fprintf( stderr, "drmR128SwapBuffers: return = %d\n", ret ); + exit( 1 ); } - UNLOCK_HARDWARE( r128ctx ); + if ( rmesa->currentPage == 0 ) { + rmesa->drawOffset = rmesa->r128Screen->frontOffset; + rmesa->drawPitch = rmesa->r128Screen->frontPitch; + rmesa->currentPage = 1; + } else { + rmesa->drawOffset = rmesa->r128Screen->backOffset; + rmesa->drawPitch = rmesa->r128Screen->backPitch; + rmesa->currentPage = 0; + } - r128ctx->new_state |= R128_NEW_CONTEXT; - r128ctx->dirty |= (R128_UPLOAD_CONTEXT | - R128_UPLOAD_MASKS | - R128_UPLOAD_CLIPRECTS); + rmesa->setup.dst_pitch_offset_c = (((rmesa->drawPitch/8) << 21) | + (rmesa->drawOffset >> 5)); + rmesa->new_state |= R128_NEW_WINDOW; + + /* FIXME: Do we need this anymore? */ + rmesa->new_state |= R128_NEW_CONTEXT; + rmesa->dirty |= (R128_UPLOAD_CONTEXT | + R128_UPLOAD_MASKS | + R128_UPLOAD_CLIPRECTS); #if ENABLE_PERF_BOXES /* Log the performance counters if necessary */ - r128PerformanceCounters( r128ctx ); + r128PerformanceCounters( rmesa ); #endif } @@ -413,9 +471,11 @@ static GLbitfield r128DDClear( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint cx, GLint cy, GLint cw, GLint ch ) { - r128ContextPtr r128ctx = R128_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = r128ctx->driDrawable; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + __DRIdrawablePrivate *dPriv = rmesa->driDrawable; GLuint flags = 0; + GLuint color_mask = 0; + GLuint depth_mask = 0; GLint i; GLint ret; @@ -423,55 +483,54 @@ fprintf( stderr, "%s:\n", __FUNCTION__ ); } - FLUSH_BATCH( r128ctx ); + FLUSH_BATCH( rmesa ); /* Update and emit any new state. We need to do this here to catch * changes to the masks. * FIXME: Just update the masks? */ - if ( r128ctx->new_state ) + if ( rmesa->new_state ) r128DDUpdateHWState( ctx ); if ( mask & DD_FRONT_LEFT_BIT ) { flags |= DRM_R128_FRONT; + color_mask = rmesa->setup.plane_3d_mask_c; mask &= ~DD_FRONT_LEFT_BIT; } if ( mask & DD_BACK_LEFT_BIT ) { flags |= DRM_R128_BACK; + color_mask = rmesa->setup.plane_3d_mask_c; mask &= ~DD_BACK_LEFT_BIT; } if ( ( mask & DD_DEPTH_BIT ) && ctx->Depth.Mask ) { flags |= DRM_R128_DEPTH; + depth_mask |= rmesa->DepthMask; mask &= ~DD_DEPTH_BIT; } #if 0 /* FIXME: Add stencil support */ if ( mask & DD_STENCIL_BIT ) { flags |= DRM_R128_DEPTH; + depth_mask |= rmesa->StencilMask; mask &= ~DD_STENCIL_BIT; } #endif - if ( !flags ) { + if ( !flags ) return mask; - } /* Flip top to bottom */ cx += dPriv->x; cy = dPriv->y + dPriv->h - cy - ch; - LOCK_HARDWARE( r128ctx ); - - if ( r128ctx->dirty & ~R128_UPLOAD_CLIPRECTS ) { - r128EmitHwStateLocked( r128ctx ); - } + LOCK_HARDWARE( rmesa ); - for ( i = 0 ; i < r128ctx->numClipRects ; ) { - GLint nr = MIN2( i + R128_NR_SAREA_CLIPRECTS , r128ctx->numClipRects ); - XF86DRIClipRectPtr box = r128ctx->pClipRects; - XF86DRIClipRectPtr b = r128ctx->sarea->boxes; + for ( i = 0 ; i < rmesa->numClipRects ; ) { + GLint nr = MIN2( i + R128_NR_SAREA_CLIPRECTS , rmesa->numClipRects ); + XF86DRIClipRectPtr box = rmesa->pClipRects; + XF86DRIClipRectPtr b = rmesa->sarea->boxes; GLint n = 0; if ( !all ) { @@ -502,30 +561,31 @@ } } - r128ctx->sarea->nbox = n; + rmesa->sarea->nbox = n; if ( R128_DEBUG & DEBUG_VERBOSE_IOCTL ) { fprintf( stderr, "drmR128Clear: flag 0x%x color %x depth %x nbox %d\n", flags, - (GLuint)r128ctx->ClearColor, - (GLuint)r128ctx->ClearDepth, - r128ctx->sarea->nbox ); + (GLuint)rmesa->ClearColor, + (GLuint)rmesa->ClearDepth, + rmesa->sarea->nbox ); } - ret = drmR128Clear( r128ctx->driFd, flags, - cx, cy, cw, ch, - r128ctx->ClearColor, r128ctx->ClearDepth ); + ret = drmR128Clear( rmesa->driFd, flags, + rmesa->ClearColor, rmesa->ClearDepth, + color_mask, depth_mask ); if ( ret ) { + UNLOCK_HARDWARE( rmesa ); fprintf( stderr, "drmR128Clear: return = %d\n", ret ); exit( 1 ); } } - UNLOCK_HARDWARE( r128ctx ); + UNLOCK_HARDWARE( rmesa ); - r128ctx->dirty |= R128_UPLOAD_CLIPRECTS; + rmesa->dirty |= R128_UPLOAD_CLIPRECTS; return mask; } @@ -535,29 +595,29 @@ * Depth spans, pixels */ -void r128WriteDepthSpanLocked( r128ContextPtr r128ctx, +void r128WriteDepthSpanLocked( r128ContextPtr rmesa, GLuint n, GLint x, GLint y, const GLdepth depth[], const GLubyte mask[] ) { - XF86DRIClipRectPtr pbox = r128ctx->pClipRects; - int nbox = r128ctx->numClipRects; - int fd = r128ctx->driScreen->fd; + XF86DRIClipRectPtr pbox = rmesa->pClipRects; + int nbox = rmesa->numClipRects; + int fd = rmesa->driScreen->fd; int i; if ( !nbox || !n ) { return; } if ( nbox >= R128_NR_SAREA_CLIPRECTS ) { - r128ctx->dirty |= R128_UPLOAD_CLIPRECTS; + rmesa->dirty |= R128_UPLOAD_CLIPRECTS; } - if ( !(r128ctx->dirty & R128_UPLOAD_CLIPRECTS) ) + if ( !(rmesa->dirty & R128_UPLOAD_CLIPRECTS) ) { if ( nbox < 3 ) { - r128ctx->sarea->nbox = 0; + rmesa->sarea->nbox = 0; } else { - r128ctx->sarea->nbox = nbox; + rmesa->sarea->nbox = nbox; } drmR128WriteDepthSpan( fd, n, x, y, depth, mask ); @@ -566,44 +626,44 @@ { for (i = 0 ; i < nbox ; ) { int nr = MIN2( i + R128_NR_SAREA_CLIPRECTS, nbox ); - XF86DRIClipRectPtr b = r128ctx->sarea->boxes; + XF86DRIClipRectPtr b = rmesa->sarea->boxes; - r128ctx->sarea->nbox = nr - i; + rmesa->sarea->nbox = nr - i; for ( ; i < nr ; i++) { *b++ = pbox[i]; } - r128ctx->sarea->dirty |= R128_UPLOAD_CLIPRECTS; + rmesa->sarea->dirty |= R128_UPLOAD_CLIPRECTS; drmR128WriteDepthSpan( fd, n, x, y, depth, mask ); } } - r128ctx->dirty &= ~R128_UPLOAD_CLIPRECTS; + rmesa->dirty &= ~R128_UPLOAD_CLIPRECTS; } -void r128WriteDepthPixelsLocked( r128ContextPtr r128ctx, GLuint n, +void r128WriteDepthPixelsLocked( r128ContextPtr rmesa, GLuint n, const GLint x[], const GLint y[], const GLdepth depth[], const GLubyte mask[] ) { - XF86DRIClipRectPtr pbox = r128ctx->pClipRects; - int nbox = r128ctx->numClipRects; - int fd = r128ctx->driScreen->fd; + XF86DRIClipRectPtr pbox = rmesa->pClipRects; + int nbox = rmesa->numClipRects; + int fd = rmesa->driScreen->fd; int i; if ( !nbox || !n ) { return; } if ( nbox >= R128_NR_SAREA_CLIPRECTS ) { - r128ctx->dirty |= R128_UPLOAD_CLIPRECTS; + rmesa->dirty |= R128_UPLOAD_CLIPRECTS; } - if ( !(r128ctx->dirty & R128_UPLOAD_CLIPRECTS) ) + if ( !(rmesa->dirty & R128_UPLOAD_CLIPRECTS) ) { if ( nbox < 3 ) { - r128ctx->sarea->nbox = 0; + rmesa->sarea->nbox = 0; } else { - r128ctx->sarea->nbox = nbox; + rmesa->sarea->nbox = nbox; } drmR128WriteDepthPixels( fd, n, x, y, depth, mask ); @@ -612,42 +672,42 @@ { for (i = 0 ; i < nbox ; ) { int nr = MIN2( i + R128_NR_SAREA_CLIPRECTS, nbox ); - XF86DRIClipRectPtr b = r128ctx->sarea->boxes; + XF86DRIClipRectPtr b = rmesa->sarea->boxes; - r128ctx->sarea->nbox = nr - i; + rmesa->sarea->nbox = nr - i; for ( ; i < nr ; i++) { *b++ = pbox[i]; } - r128ctx->sarea->dirty |= R128_UPLOAD_CLIPRECTS; + rmesa->sarea->dirty |= R128_UPLOAD_CLIPRECTS; drmR128WriteDepthPixels( fd, n, x, y, depth, mask ); } } - r128ctx->dirty &= ~R128_UPLOAD_CLIPRECTS; + rmesa->dirty &= ~R128_UPLOAD_CLIPRECTS; } -void r128ReadDepthSpanLocked( r128ContextPtr r128ctx, +void r128ReadDepthSpanLocked( r128ContextPtr rmesa, GLuint n, GLint x, GLint y ) { - XF86DRIClipRectPtr pbox = r128ctx->pClipRects; - int nbox = r128ctx->numClipRects; - int fd = r128ctx->driScreen->fd; + XF86DRIClipRectPtr pbox = rmesa->pClipRects; + int nbox = rmesa->numClipRects; + int fd = rmesa->driScreen->fd; int i; if ( !nbox || !n ) { return; } if ( nbox >= R128_NR_SAREA_CLIPRECTS ) { - r128ctx->dirty |= R128_UPLOAD_CLIPRECTS; + rmesa->dirty |= R128_UPLOAD_CLIPRECTS; } - if ( !(r128ctx->dirty & R128_UPLOAD_CLIPRECTS) ) + if ( !(rmesa->dirty & R128_UPLOAD_CLIPRECTS) ) { if ( nbox < 3 ) { - r128ctx->sarea->nbox = 0; + rmesa->sarea->nbox = 0; } else { - r128ctx->sarea->nbox = nbox; + rmesa->sarea->nbox = nbox; } drmR128ReadDepthSpan( fd, n, x, y ); @@ -656,42 +716,42 @@ { for (i = 0 ; i < nbox ; ) { int nr = MIN2( i + R128_NR_SAREA_CLIPRECTS, nbox ); - XF86DRIClipRectPtr b = r128ctx->sarea->boxes; + XF86DRIClipRectPtr b = rmesa->sarea->boxes; - r128ctx->sarea->nbox = nr - i; + rmesa->sarea->nbox = nr - i; for ( ; i < nr ; i++) { *b++ = pbox[i]; } - r128ctx->sarea->dirty |= R128_UPLOAD_CLIPRECTS; + rmesa->sarea->dirty |= R128_UPLOAD_CLIPRECTS; drmR128ReadDepthSpan( fd, n, x, y ); } } - r128ctx->dirty &= ~R128_UPLOAD_CLIPRECTS; + rmesa->dirty &= ~R128_UPLOAD_CLIPRECTS; } -void r128ReadDepthPixelsLocked( r128ContextPtr r128ctx, GLuint n, +void r128ReadDepthPixelsLocked( r128ContextPtr rmesa, GLuint n, const GLint x[], const GLint y[] ) { - XF86DRIClipRectPtr pbox = r128ctx->pClipRects; - int nbox = r128ctx->numClipRects; - int fd = r128ctx->driScreen->fd; + XF86DRIClipRectPtr pbox = rmesa->pClipRects; + int nbox = rmesa->numClipRects; + int fd = rmesa->driScreen->fd; int i; if ( !nbox || !n ) { return; } if ( nbox >= R128_NR_SAREA_CLIPRECTS ) { - r128ctx->dirty |= R128_UPLOAD_CLIPRECTS; + rmesa->dirty |= R128_UPLOAD_CLIPRECTS; } - if ( !(r128ctx->dirty & R128_UPLOAD_CLIPRECTS) ) + if ( !(rmesa->dirty & R128_UPLOAD_CLIPRECTS) ) { if ( nbox < 3 ) { - r128ctx->sarea->nbox = 0; + rmesa->sarea->nbox = 0; } else { - r128ctx->sarea->nbox = nbox; + rmesa->sarea->nbox = nbox; } drmR128ReadDepthPixels( fd, n, x, y ); @@ -700,60 +760,35 @@ { for (i = 0 ; i < nbox ; ) { int nr = MIN2( i + R128_NR_SAREA_CLIPRECTS, nbox ); - XF86DRIClipRectPtr b = r128ctx->sarea->boxes; + XF86DRIClipRectPtr b = rmesa->sarea->boxes; - r128ctx->sarea->nbox = nr - i; + rmesa->sarea->nbox = nr - i; for ( ; i < nr ; i++) { *b++ = pbox[i]; } - r128ctx->sarea->dirty |= R128_UPLOAD_CLIPRECTS; + rmesa->sarea->dirty |= R128_UPLOAD_CLIPRECTS; drmR128ReadDepthPixels( fd, n, x, y ); } } - r128ctx->dirty &= ~R128_UPLOAD_CLIPRECTS; + rmesa->dirty &= ~R128_UPLOAD_CLIPRECTS; } - -/* ================================================================ - * Deprecated function... - */ -void r128SubmitPacketLocked( r128ContextPtr r128ctx, - CARD32 *buf, GLuint count ) -{ - CARD32 *b; - int c = count; - int fd = r128ctx->r128Screen->driScreen->fd; - int to = 0; - int ret; - - do { - b = buf + (count - c); - ret = drmR128SubmitPacket( fd, b, &c, 0 ); - } while ( ( ret == -EBUSY ) && ( to++ < r128ctx->CCEtimeout ) ); - - if ( ret < 0 ) { - drmR128EngineReset( fd ); - fprintf( stderr, "Error: Could not submit packet... exiting\n" ); - exit( -1 ); - } -} - - -void r128WaitForIdleLocked( r128ContextPtr r128ctx ) +void r128WaitForIdleLocked( r128ContextPtr rmesa ) { - int fd = r128ctx->r128Screen->driScreen->fd; + int fd = rmesa->r128Screen->driScreen->fd; int to = 0; int ret; do { ret = drmR128WaitForIdleCCE( fd ); - } while ( ( ret == -EBUSY ) && ( to++ < r128ctx->CCEtimeout ) ); + } while ( ( ret == -EBUSY ) && ( to++ < R128_TIMEOUT ) ); if ( ret < 0 ) { drmR128EngineReset( fd ); + UNLOCK_HARDWARE( rmesa ); fprintf( stderr, "Error: Rage 128 timed out... exiting\n" ); exit( -1 ); } @@ -762,5 +797,5 @@ void r128DDInitIoctlFuncs( GLcontext *ctx ) { - ctx->Driver.Clear = r128DDClear; + ctx->Driver.Clear = r128DDClear; } Index: xc/lib/GL/mesa/src/drv/r128/r128_ioctl.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_ioctl.h:1.1 xc/lib/GL/mesa/src/drv/r128/r128_ioctl.h:1.3 --- xc/lib/GL/mesa/src/drv/r128/r128_ioctl.h:1.1 Mon Dec 4 14:21:46 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_ioctl.h Sun Apr 1 10:00:00 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_ioctl.h,v 1.1 2000/12/04 19:21:46 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_ioctl.h,v 1.3 2001/04/01 14:00:00 tsi Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -44,174 +44,128 @@ #include "xf86drm.h" #include "xf86drmR128.h" -#define R128_DEFAULT_TOTAL_CCE_TIMEOUT 1000000 /* usecs */ - #define R128_BUFFER_MAX_DWORDS (R128_BUFFER_SIZE / sizeof(CARD32)) - -#define FLUSH_BATCH( r128ctx ) \ -do { \ - if ( R128_DEBUG & DEBUG_VERBOSE_IOCTL ) \ - fprintf( stderr, "FLUSH_BATCH in %s\n", __FUNCTION__ ); \ - if ( r128ctx->vert_buf ) { \ - r128FlushVertices( r128ctx ); \ - } else if ( r128ctx->next_elt != r128ctx->first_elt ) { \ - r128FlushElts( r128ctx ); \ - } \ -} while (0) - -#define r128FlushVertices( r128ctx ) \ -do { \ - LOCK_HARDWARE( r128ctx ); \ - r128FlushVerticesLocked( r128ctx ); \ - UNLOCK_HARDWARE( r128ctx ); \ -} while (0) - -extern drmBufPtr r128GetBufferLocked( r128ContextPtr r128ctx ); -extern void r128FlushVerticesLocked( r128ContextPtr r128ctx ); +extern drmBufPtr r128GetBufferLocked( r128ContextPtr rmesa ); +extern void r128FlushVerticesLocked( r128ContextPtr rmesa ); - -#define r128FlushElts( r128ctx ) \ -do { \ - LOCK_HARDWARE( r128ctx ); \ - r128FlushEltsLocked( r128ctx ); \ - UNLOCK_HARDWARE( r128ctx ); \ -} while (0) - -extern void r128GetEltBufLocked( r128ContextPtr r128ctx ); -extern void r128FlushEltsLocked( r128ContextPtr r128ctx ); -extern void r128FireEltsLocked( r128ContextPtr r128ctx, +extern void r128GetEltBufLocked( r128ContextPtr rmesa ); +extern void r128FlushEltsLocked( r128ContextPtr rmesa ); +extern void r128FireEltsLocked( r128ContextPtr rmesa, GLuint start, GLuint end, GLuint discard ); -extern void r128ReleaseBufLocked( r128ContextPtr r128ctx, drmBufPtr buffer ); - - -/* 64-bit align the next element address, and then make room for the - * next indexed prim packet header. - */ -#define ALIGN_NEXT_ELT( r128ctx ) \ -do { \ - r128ctx->next_elt = (GLushort *) \ - (((GLuint)r128ctx->next_elt + 7) & ~0x7); \ - r128ctx->next_elt = (GLushort *) \ - ((GLubyte *)r128ctx->next_elt + R128_INDEX_PRIM_OFFSET); \ -} while (0) +extern void r128ReleaseBufLocked( r128ContextPtr rmesa, drmBufPtr buffer ); - /* Make this available as both a regular and an inline function. */ -extern CARD32 *r128AllocVertices( r128ContextPtr r128ctx, int count ); +extern CARD32 *r128AllocVertices( r128ContextPtr rmesa, int count ); -static __inline CARD32 *r128AllocVerticesInline( r128ContextPtr r128ctx, +static __inline CARD32 *r128AllocVerticesInline( r128ContextPtr rmesa, int count ) { - int bytes = count * r128ctx->vertsize * sizeof(CARD32); - CARD32 *head; + int bytes = count * rmesa->vertsize * sizeof(CARD32); + CARD32 *head; - if ( !r128ctx->vert_buf ) { - LOCK_HARDWARE( r128ctx ); + if ( !rmesa->vert_buf ) { + LOCK_HARDWARE( rmesa ); - if ( r128ctx->first_elt != r128ctx->next_elt ) { - r128FlushEltsLocked( r128ctx ); - } + if ( rmesa->first_elt != rmesa->next_elt ) { + r128FlushEltsLocked( rmesa ); + } - r128ctx->vert_buf = r128GetBufferLocked( r128ctx ); + rmesa->vert_buf = r128GetBufferLocked( rmesa ); - UNLOCK_HARDWARE( r128ctx ); - } else if ( r128ctx->vert_buf->used + bytes > r128ctx->vert_buf->total ) { - LOCK_HARDWARE( r128ctx ); + UNLOCK_HARDWARE( rmesa ); + } else if ( rmesa->vert_buf->used + bytes > rmesa->vert_buf->total ) { + LOCK_HARDWARE( rmesa ); - r128FlushVerticesLocked( r128ctx ); - r128ctx->vert_buf = r128GetBufferLocked( r128ctx ); + r128FlushVerticesLocked( rmesa ); + rmesa->vert_buf = r128GetBufferLocked( rmesa ); - UNLOCK_HARDWARE( r128ctx ); - } + UNLOCK_HARDWARE( rmesa ); + } - head = (CARD32 *)((char *)r128ctx->vert_buf->address + - r128ctx->vert_buf->used); + head = (CARD32 *)((char *)rmesa->vert_buf->address + + rmesa->vert_buf->used); - r128ctx->num_verts += count; - r128ctx->vert_buf->used += bytes; - return head; + rmesa->num_verts += count; + rmesa->vert_buf->used += bytes; + return head; } - -extern void r128FireBlitLocked( r128ContextPtr r128ctx, drmBufPtr buffer, +extern void r128FireBlitLocked( r128ContextPtr rmesa, drmBufPtr buffer, GLint offset, GLint pitch, GLint format, GLint x, GLint y, GLint width, GLint height ); - -extern void r128WriteDepthSpanLocked( r128ContextPtr r128ctx, +extern void r128WriteDepthSpanLocked( r128ContextPtr rmesa, GLuint n, GLint x, GLint y, const GLdepth depth[], const GLubyte mask[] ); -extern void r128WriteDepthPixelsLocked( r128ContextPtr r128ctx, GLuint n, +extern void r128WriteDepthPixelsLocked( r128ContextPtr rmesa, GLuint n, const GLint x[], const GLint y[], const GLdepth depth[], const GLubyte mask[] ); -extern void r128ReadDepthSpanLocked( r128ContextPtr r128ctx, +extern void r128ReadDepthSpanLocked( r128ContextPtr rmesa, GLuint n, GLint x, GLint y ); -extern void r128ReadDepthPixelsLocked( r128ContextPtr r128ctx, GLuint n, +extern void r128ReadDepthPixelsLocked( r128ContextPtr rmesa, GLuint n, const GLint x[], const GLint y[] ); - - -extern void r128SwapBuffers( r128ContextPtr r128ctx ); +extern void r128SwapBuffers( r128ContextPtr rmesa ); +extern void r128PageFlip( r128ContextPtr rmesa ); -#define r128WaitForIdle( r128ctx ) \ -do { \ - LOCK_HARDWARE( r128ctx ); \ - r128WaitForIdleLocked( r128ctx ); \ - UNLOCK_HARDWARE( r128ctx ); \ -} while (0) - -extern void r128WaitForIdleLocked( r128ContextPtr r128ctx ); +extern void r128WaitForIdleLocked( r128ContextPtr rmesa ); extern void r128DDInitIoctlFuncs( GLcontext *ctx ); - /* ================================================================ - * Deprecated functions: + * Helper macros: */ + +#define FLUSH_BATCH( rmesa ) \ +do { \ + if ( R128_DEBUG & DEBUG_VERBOSE_IOCTL ) \ + fprintf( stderr, "FLUSH_BATCH in %s\n", __FUNCTION__ ); \ + if ( rmesa->vert_buf ) { \ + r128FlushVertices( rmesa ); \ + } else if ( rmesa->next_elt != rmesa->first_elt ) { \ + r128FlushElts( rmesa ); \ + } \ +} while (0) -typedef union { - float f; - int i; -} floatTOint; - -/* Insert an integer value into the CCE ring buffer. */ -#define R128CCE(v) \ -do { \ - r128ctx->CCEbuf[r128ctx->CCEcount] = (v); \ - r128ctx->CCEcount++; \ +/* 64-bit align the next element address, and then make room for the + * next indexed prim packet header. + */ +#define ALIGN_NEXT_ELT( rmesa ) \ +do { \ + rmesa->next_elt = (GLushort *) \ + (((unsigned long)rmesa->next_elt + 7) & ~0x7); \ + rmesa->next_elt = (GLushort *) \ + ((GLubyte *)rmesa->next_elt + R128_INDEX_PRIM_OFFSET); \ } while (0) -/* Insert an floating point value into the CCE ring buffer. */ -#define R128CCEF(v) \ -do { \ - floatTOint fTi; \ - fTi.f = (v); \ - r128ctx->CCEbuf[r128ctx->CCEcount] = fTi.i; \ - r128ctx->CCEcount++; \ +#define r128FlushVertices( rmesa ) \ +do { \ + LOCK_HARDWARE( rmesa ); \ + r128FlushVerticesLocked( rmesa ); \ + UNLOCK_HARDWARE( rmesa ); \ } while (0) -/* Insert a type-[0123] packet header into the ring buffer */ -#define R128CCE0(p,r,n) R128CCE((p) | ((n) << 16) | ((r) >> 2)) -#define R128CCE1(p,r1,r2) R128CCE((p) | (((r2) >> 2) << 11) | ((r1) >> 2)) -#define R128CCE2(p) R128CCE((p)) -#define R128CCE3(p,n) R128CCE((p) | ((n) << 16)) - -#define R128CCE_SUBMIT_PACKET() \ -do { \ - r128SubmitPacketLocked( r128ctx, r128ctx->CCEbuf, r128ctx->CCEcount ); \ - r128ctx->CCEcount = 0; \ +#define r128FlushElts( rmesa ) \ +do { \ + LOCK_HARDWARE( rmesa ); \ + r128FlushEltsLocked( rmesa ); \ + UNLOCK_HARDWARE( rmesa ); \ } while (0) -extern void r128SubmitPacketLocked( r128ContextPtr r128ctx, - CARD32 *buf, GLuint count ); +#define r128WaitForIdle( rmesa ) \ + do { \ + LOCK_HARDWARE( rmesa ); \ + r128WaitForIdleLocked( rmesa ); \ + UNLOCK_HARDWARE( rmesa ); \ + } while (0) #endif #endif /* __R128_IOCTL_H__ */ Index: xc/lib/GL/mesa/src/drv/r128/r128_lock.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_lock.c:1.1 xc/lib/GL/mesa/src/drv/r128/r128_lock.c:1.3 --- xc/lib/GL/mesa/src/drv/r128/r128_lock.c:1.1 Mon Dec 4 14:21:46 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_lock.c Wed Mar 21 11:14:23 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_lock.c,v 1.1 2000/12/04 19:21:46 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_lock.c,v 1.3 2001/03/21 16:14:23 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -38,7 +38,7 @@ #if DEBUG_LOCKING char *prevLockFile = NULL; -int prevLockLine = 0; +int prevLockLine = 0; #endif @@ -50,15 +50,14 @@ * the hardware lock when it changes the window state, this routine will * automatically be called after such a change. */ -void r128GetLock( r128ContextPtr r128ctx, GLuint flags ) +void r128GetLock( r128ContextPtr rmesa, GLuint flags ) { - __DRIdrawablePrivate *dPriv = r128ctx->driDrawable; - __DRIscreenPrivate *sPriv = r128ctx->driScreen; - R128SAREAPriv *sarea = r128ctx->sarea; - int stamp = dPriv->lastStamp; + __DRIdrawablePrivate *dPriv = rmesa->driDrawable; + __DRIscreenPrivate *sPriv = rmesa->driScreen; + R128SAREAPrivPtr sarea = rmesa->sarea; int i; - drmGetLock( r128ctx->driFd, r128ctx->hHWContext, flags ); + drmGetLock( rmesa->driFd, rmesa->hHWContext, flags ); /* The window might have moved, so we might need to get new clip * rects. @@ -68,26 +67,27 @@ * Since the hardware state depends on having the latest drawable * clip rects, all state checking must be done _after_ this call. */ - XMESA_VALIDATE_DRAWABLE_INFO( r128ctx->display, sPriv, dPriv ); + XMESA_VALIDATE_DRAWABLE_INFO( rmesa->display, sPriv, dPriv ); - if ( stamp != dPriv->lastStamp ) { - r128ctx->new_state |= R128_NEW_WINDOW | R128_NEW_CLIP; - r128ctx->SetupDone = 0; + if ( rmesa->lastStamp != dPriv->lastStamp ) { + rmesa->lastStamp = dPriv->lastStamp; + rmesa->new_state |= R128_NEW_WINDOW | R128_NEW_CLIP; + rmesa->SetupDone = 0; } - r128ctx->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_CLIPRECTS; + rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_CLIPRECTS; - r128ctx->numClipRects = dPriv->numClipRects; - r128ctx->pClipRects = dPriv->pClipRects; + rmesa->numClipRects = dPriv->numClipRects; + rmesa->pClipRects = dPriv->pClipRects; - if ( sarea->ctxOwner != r128ctx->hHWContext ) { - sarea->ctxOwner = r128ctx->hHWContext; - r128ctx->dirty = R128_UPLOAD_ALL; + if ( sarea->ctxOwner != rmesa->hHWContext ) { + sarea->ctxOwner = rmesa->hHWContext; + rmesa->dirty = R128_UPLOAD_ALL; } - for ( i = 0 ; i < r128ctx->lastTexHeap ; i++ ) { - if ( sarea->texAge[i] != r128ctx->lastTexAge[i] ) { - r128AgeTextures( r128ctx, i ); + for ( i = 0 ; i < rmesa->lastTexHeap ; i++ ) { + if ( sarea->texAge[i] != rmesa->lastTexAge[i] ) { + r128AgeTextures( rmesa, i ); } } } Index: xc/lib/GL/mesa/src/drv/r128/r128_lock.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_lock.h:1.3 xc/lib/GL/mesa/src/drv/r128/r128_lock.h:1.4 --- xc/lib/GL/mesa/src/drv/r128/r128_lock.h:1.3 Thu Dec 7 10:43:37 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_lock.h Sun Jan 7 20:07:21 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_lock.h,v 1.3 2000/12/07 15:43:37 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_lock.h,v 1.4 2001/01/08 01:07:21 martin Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -33,40 +33,42 @@ * */ -#ifndef _R128_LOCK_H_ -#define _R128_LOCK_H_ +#ifndef __R128_LOCK_H__ +#define __R128_LOCK_H__ #ifdef GLX_DIRECT_RENDERING -extern void r128GetLock( r128ContextPtr r128ctx, GLuint flags ); +extern void r128GetLock( r128ContextPtr rmesa, GLuint flags ); +/* Turn DEBUG_LOCKING on to find locking conflicts. + */ +#define DEBUG_LOCKING 0 -/* Turn DEBUG_LOCKING on to find locking conflicts (see r128_init.h) */ -#ifdef DEBUG_LOCKING +#if DEBUG_LOCKING extern char *prevLockFile; -extern int prevLockLine; +extern int prevLockLine; -#define DEBUG_LOCK() \ - do { \ - prevLockFile = (__FILE__); \ - prevLockLine = (__LINE__); \ - } while (0) - -#define DEBUG_RESET() \ - do { \ - prevLockFile = 0; \ - prevLockLine = 0; \ - } while (0) - -#define DEBUG_CHECK_LOCK() \ - do { \ - if (prevLockFile) { \ - fprintf(stderr, \ - "LOCK SET!\n\tPrevious %s:%d\n\tCurrent: %s:%d\n", \ - prevLockFile, prevLockLine, __FILE__, __LINE__); \ - exit(1); \ - } \ - } while (0) +#define DEBUG_LOCK() \ + do { \ + prevLockFile = (__FILE__); \ + prevLockLine = (__LINE__); \ + } while (0) + +#define DEBUG_RESET() \ + do { \ + prevLockFile = 0; \ + prevLockLine = 0; \ + } while (0) + +#define DEBUG_CHECK_LOCK() \ + do { \ + if ( prevLockFile ) { \ + fprintf( stderr, \ + "LOCK SET!\n\tPrevious %s:%d\n\tCurrent: %s:%d\n", \ + prevLockFile, prevLockLine, __FILE__, __LINE__ ); \ + exit( 1 ); \ + } \ + } while (0) #else @@ -84,26 +86,26 @@ /* Lock the hardware and validate our state. */ -#define LOCK_HARDWARE( r128ctx ) \ +#define LOCK_HARDWARE( rmesa ) \ do { \ char __ret = 0; \ DEBUG_CHECK_LOCK(); \ - DRM_CAS( r128ctx->driHwLock, r128ctx->hHWContext, \ - (DRM_LOCK_HELD | r128ctx->hHWContext), __ret ); \ + DRM_CAS( rmesa->driHwLock, rmesa->hHWContext, \ + (DRM_LOCK_HELD | rmesa->hHWContext), __ret ); \ if ( __ret ) \ - r128GetLock( r128ctx, 0 ); \ + r128GetLock( rmesa, 0 ); \ DEBUG_LOCK(); \ } while (0) /* Unlock the hardware. */ -#define UNLOCK_HARDWARE( r128ctx ) \ +#define UNLOCK_HARDWARE( rmesa ) \ do { \ - DRM_UNLOCK( r128ctx->driFd, \ - r128ctx->driHwLock, \ - r128ctx->hHWContext ); \ + DRM_UNLOCK( rmesa->driFd, \ + rmesa->driHwLock, \ + rmesa->hHWContext ); \ DEBUG_RESET(); \ } while (0) #endif -#endif /* _R128_LOCK_H_ */ +#endif /* __R128_LOCK_H__ */ Index: xc/lib/GL/mesa/src/drv/r128/r128_pipeline.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_pipeline.c:1.3 xc/lib/GL/mesa/src/drv/r128/r128_pipeline.c:1.4 --- xc/lib/GL/mesa/src/drv/r128/r128_pipeline.c:1.3 Mon Dec 4 14:21:46 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_pipeline.c Sun Jan 7 20:07:21 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_pipeline.c,v 1.3 2000/12/04 19:21:46 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_pipeline.c,v 1.4 2001/01/08 01:07:21 martin Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -41,7 +41,7 @@ #include "fog.h" static struct gl_pipeline_stage r128_fast_stage = { - "R128 Fast Path", + "r128 Fast Path", (PIPE_OP_VERT_XFORM | PIPE_OP_RAST_SETUP_0 | PIPE_OP_RAST_SETUP_1 | @@ -66,10 +66,10 @@ */ GLboolean r128DDBuildPrecalcPipeline( GLcontext *ctx ) { - r128ContextPtr r128ctx = R128_CONTEXT(ctx); + r128ContextPtr rmesa = R128_CONTEXT(ctx); struct gl_pipeline *pipe = &ctx->CVA.pre; - if ( r128ctx->RenderIndex == 0 && + if ( rmesa->RenderIndex == 0 && (ctx->Enabled & ILLEGAL_ENABLES) == 0 && (ctx->Array.Flags & (VERT_OBJ_234 | VERT_TEX0_4 | @@ -81,15 +81,15 @@ pipe->new_inputs = ctx->RenderFlags & VERT_DATA; pipe->ops = pipe->stages[0]->ops; - r128ctx->useFastPath = GL_TRUE; + rmesa->OnFastPath = GL_TRUE; return GL_TRUE; } - if ( r128ctx->useFastPath ) { - r128ctx->useFastPath = GL_FALSE; + if ( rmesa->OnFastPath ) { + rmesa->OnFastPath = GL_FALSE; - ctx->CVA.VB->ClipOrMask = 0; - ctx->CVA.VB->ClipAndMask = CLIP_ALL_BITS; + ctx->CVA.VB->ClipOrMask = 0; + ctx->CVA.VB->ClipAndMask = CLIP_ALL_BITS; ctx->Array.NewArrayState |= ctx->Array.Summary; } @@ -123,7 +123,6 @@ } -/* Register the pipeline with our stages included */ GLuint r128DDRegisterPipelineStages( struct gl_pipeline_stage *out, const struct gl_pipeline_stage *in, GLuint nr ) Index: xc/lib/GL/mesa/src/drv/r128/r128_pipeline.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_pipeline.h:1.3 xc/lib/GL/mesa/src/drv/r128/r128_pipeline.h:1.4 --- xc/lib/GL/mesa/src/drv/r128/r128_pipeline.h:1.3 Mon Dec 4 14:21:46 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_pipeline.h Sun Jan 7 20:07:21 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_pipeline.h,v 1.3 2000/12/04 19:21:46 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_pipeline.h,v 1.4 2001/01/08 01:07:21 martin Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -28,13 +28,15 @@ /* * Authors: - * Kevin E. Martin * Gareth Hughes + * Kevin E. Martin * */ + +#ifndef __R128_PIPELINE_H__ +#define __R128_PIPELINE_H__ -#ifndef _R128_PIPELINE_H_ -#define _R128_PIPELINE_H_ +#ifdef GLX_DIRECT_RENDERING extern GLboolean r128DDBuildPrecalcPipeline( GLcontext *ctx ); extern GLuint r128DDRegisterPipelineStages( struct gl_pipeline_stage *out, @@ -47,4 +49,5 @@ extern void r128DDEltPathInit( void ); extern void r128DDEltPath( struct vertex_buffer *VB ); -#endif /* _R128_PIPELINE_H_ */ +#endif +#endif Index: xc/lib/GL/mesa/src/drv/r128/r128_screen.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_screen.c:1.3 xc/lib/GL/mesa/src/drv/r128/r128_screen.c:1.5 --- xc/lib/GL/mesa/src/drv/r128/r128_screen.c:1.3 Mon Dec 4 14:21:46 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_screen.c Wed Mar 21 11:14:23 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_screen.c,v 1.3 2000/12/04 19:21:46 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_screen.c,v 1.5 2001/03/21 16:14:23 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -28,8 +28,8 @@ /* * Authors: - * Kevin E. Martin * Gareth Hughes + * Kevin E. Martin * */ @@ -41,7 +41,7 @@ #include "r128_vb.h" #include "r128_pipeline.h" -#include +#include "mem.h" #if 1 /* Including xf86PciInfo.h introduces a bunch of errors... @@ -57,208 +57,125 @@ #endif -/* Create the device specific screen private data struct */ -r128ScreenPtr r128CreateScreen(__DRIscreenPrivate *sPriv) +/* Create the device specific screen private data struct. + */ +r128ScreenPtr r128CreateScreen( __DRIscreenPrivate *sPriv ) { - r128ScreenPtr r128Screen; - R128DRIPtr r128DRIPriv = (R128DRIPtr)sPriv->pDevPriv; - int cpp; - - /* Allocate the private area */ - r128Screen = (r128ScreenPtr)Xmalloc(sizeof(*r128Screen)); - if (!r128Screen) return NULL; - - /* This is first since which regions we map depends on whether or - not we are using a PCI card */ - r128Screen->IsPCI = r128DRIPriv->IsPCI; - - r128Screen->mmioRgn.handle = r128DRIPriv->registerHandle; - r128Screen->mmioRgn.size = r128DRIPriv->registerSize; - if (drmMap(sPriv->fd, - r128Screen->mmioRgn.handle, - r128Screen->mmioRgn.size, - (drmAddressPtr)&r128Screen->mmio)) { - Xfree(r128Screen); - return NULL; - } - - if (!r128Screen->IsPCI) { - r128Screen->ringRgn.handle = r128DRIPriv->ringHandle; - r128Screen->ringRgn.size = r128DRIPriv->ringMapSize; - if (drmMap(sPriv->fd, - r128Screen->ringRgn.handle, - r128Screen->ringRgn.size, - (drmAddressPtr)&r128Screen->ring)) { - drmUnmap((drmAddress)r128Screen->mmio, r128Screen->mmioRgn.size); - Xfree(r128Screen); - return NULL; - } - - r128Screen->ringReadRgn.handle = r128DRIPriv->ringReadPtrHandle; - r128Screen->ringReadRgn.size = r128DRIPriv->ringReadMapSize; - if (drmMap(sPriv->fd, - r128Screen->ringReadRgn.handle, - r128Screen->ringReadRgn.size, - (drmAddressPtr)&r128Screen->ringReadPtr)) { - drmUnmap((drmAddress)r128Screen->ring, r128Screen->ringRgn.size); - drmUnmap((drmAddress)r128Screen->mmio, r128Screen->mmioRgn.size); - Xfree(r128Screen); - return NULL; - } - - r128Screen->bufRgn.handle = r128DRIPriv->bufHandle; - r128Screen->bufRgn.size = r128DRIPriv->bufMapSize; - if (drmMap(sPriv->fd, - r128Screen->bufRgn.handle, - r128Screen->bufRgn.size, - (drmAddressPtr)&r128Screen->buf)) { - drmUnmap((drmAddress)r128Screen->ringReadPtr, - r128Screen->ringReadRgn.size); - drmUnmap((drmAddress)r128Screen->ring, r128Screen->ringRgn.size); - drmUnmap((drmAddress)r128Screen->mmio, r128Screen->mmioRgn.size); - Xfree(r128Screen); - return NULL; - } - r128Screen->bufOffset = r128DRIPriv->bufOffset; - - r128Screen->agpTexRgn.handle = r128DRIPriv->agpTexHandle; - r128Screen->agpTexRgn.size = r128DRIPriv->agpTexMapSize; - if (drmMap(sPriv->fd, - r128Screen->agpTexRgn.handle, - r128Screen->agpTexRgn.size, - (drmAddressPtr)&r128Screen->agpTex)) { - drmUnmap((drmAddress)r128Screen->buf, r128Screen->bufRgn.size); - drmUnmap((drmAddress)r128Screen->ringReadPtr, - r128Screen->ringReadRgn.size); - drmUnmap((drmAddress)r128Screen->ring, r128Screen->ringRgn.size); - drmUnmap((drmAddress)r128Screen->mmio, r128Screen->mmioRgn.size); - Xfree(r128Screen); - return NULL; - } - r128Screen->agpTexOffset = r128DRIPriv->agpTexOffset; - - if (!(r128Screen->buffers = drmMapBufs(sPriv->fd))) { - drmUnmap((drmAddress)r128Screen->agpTex, - r128Screen->agpTexRgn.size); - drmUnmap((drmAddress)r128Screen->buf, r128Screen->bufRgn.size); - drmUnmap((drmAddress)r128Screen->ringReadPtr, - r128Screen->ringReadRgn.size); - drmUnmap((drmAddress)r128Screen->ring, r128Screen->ringRgn.size); - drmUnmap((drmAddress)r128Screen->mmio, r128Screen->mmioRgn.size); - Xfree(r128Screen); - return NULL; - } - } - - /* Allow both AGP and PCI cards to use vertex buffers. PCI cards use - * the ring walker method, ie. the vertex buffer data is actually part - * of the command stream. - */ - r128Screen->bufMapSize = r128DRIPriv->bufMapSize; - - r128Screen->deviceID = r128DRIPriv->deviceID; - - r128Screen->depth = r128DRIPriv->depth; - r128Screen->bpp = r128DRIPriv->bpp; - r128Screen->pixel_code = (r128Screen->bpp != 16 ? - r128Screen->bpp : - r128Screen->depth); - - cpp = r128Screen->bpp / 8; - - r128Screen->fb = sPriv->pFB; - r128Screen->fbOffset = sPriv->fbOrigin; - r128Screen->fbStride = sPriv->fbStride; - r128Screen->fbSize = sPriv->fbSize; - - r128Screen->frontOffset = r128DRIPriv->frontOffset; - r128Screen->frontPitch = r128DRIPriv->frontPitch; - r128Screen->backOffset = r128DRIPriv->backOffset; - r128Screen->backPitch = r128DRIPriv->backPitch; - r128Screen->depthOffset = r128DRIPriv->depthOffset; - r128Screen->depthPitch = r128DRIPriv->depthPitch; - r128Screen->spanOffset = r128DRIPriv->spanOffset; - - r128Screen->texOffset[R128_LOCAL_TEX_HEAP] = r128DRIPriv->textureOffset; - r128Screen->texSize[R128_LOCAL_TEX_HEAP] = r128DRIPriv->textureSize; - r128Screen->log2TexGran[R128_LOCAL_TEX_HEAP] = r128DRIPriv->log2TexGran; - - if (r128Screen->IsPCI) { - r128Screen->texOffset[R128_AGP_TEX_HEAP] = 0; - r128Screen->texSize[R128_AGP_TEX_HEAP] = 0; - r128Screen->log2TexGran[R128_AGP_TEX_HEAP] = 0; - r128Screen->NRTexHeaps = R128_NR_TEX_HEAPS-1; - } else { - r128Screen->texOffset[R128_AGP_TEX_HEAP] = 0; - r128Screen->texSize[R128_AGP_TEX_HEAP] = - r128DRIPriv->agpTexMapSize; - r128Screen->log2TexGran[R128_AGP_TEX_HEAP] = - r128DRIPriv->log2AGPTexGran; - r128Screen->NRTexHeaps = R128_NR_TEX_HEAPS; - } - - r128Screen->AGPMode = r128DRIPriv->AGPMode; - - r128Screen->CCEMode = r128DRIPriv->CCEMode; - r128Screen->CCEFifoSize = r128DRIPriv->CCEFifoSize; - - r128Screen->ringEntries = r128DRIPriv->ringSize/sizeof(CARD32); - if (!r128Screen->IsPCI) { - r128Screen->ringStartPtr = (int *)r128Screen->ring; - r128Screen->ringEndPtr = (int *)(r128Screen->ring - + r128DRIPriv->ringSize); - } - - r128Screen->MMIOFifoSlots = 0; - r128Screen->CCEFifoSlots = 0; - - r128Screen->CCEFifoAddr = R128_PM4_FIFO_DATA_EVEN; - - r128Screen->driScreen = sPriv; - - switch ( r128DRIPriv->deviceID ) { - case PCI_CHIP_RAGE128RE: - case PCI_CHIP_RAGE128RF: - case PCI_CHIP_RAGE128RK: - case PCI_CHIP_RAGE128RL: - r128Screen->chipset = R128_CARD_TYPE_R128; - break; - case PCI_CHIP_RAGE128PF: - r128Screen->chipset = R128_CARD_TYPE_R128_PRO; - break; - case PCI_CHIP_RAGE128LE: - case PCI_CHIP_RAGE128LF: - r128Screen->chipset = R128_CARD_TYPE_R128_MOBILITY; - break; - default: - r128Screen->chipset = R128_CARD_TYPE_R128; - break; - } - - r128DDFastPathInit(); - r128DDEltPathInit(); - r128DDTriangleFuncsInit(); - r128DDSetupInit(); + r128ScreenPtr r128Screen; + R128DRIPtr r128DRIPriv = (R128DRIPtr)sPriv->pDevPriv; - return r128Screen; + /* Allocate the private area */ + r128Screen = (r128ScreenPtr) CALLOC( sizeof(*r128Screen) ); + if ( !r128Screen ) return NULL; + + /* This is first since which regions we map depends on whether or + * not we are using a PCI card. + */ + r128Screen->IsPCI = r128DRIPriv->IsPCI; + r128Screen->sarea_priv_offset = r128DRIPriv->sarea_priv_offset; + + r128Screen->mmio.handle = r128DRIPriv->registerHandle; + r128Screen->mmio.size = r128DRIPriv->registerSize; + if ( drmMap( sPriv->fd, + r128Screen->mmio.handle, + r128Screen->mmio.size, + (drmAddressPtr)&r128Screen->mmio.map ) ) { + FREE( r128Screen ); + return NULL; + } + + r128Screen->buffers = drmMapBufs( sPriv->fd ); + if ( !r128Screen->buffers ) { + drmUnmap( (drmAddress)r128Screen->mmio.map, r128Screen->mmio.size ); + FREE( r128Screen ); + return NULL; + } + + if ( !r128Screen->IsPCI ) { + r128Screen->agpTextures.handle = r128DRIPriv->agpTexHandle; + r128Screen->agpTextures.size = r128DRIPriv->agpTexMapSize; + if ( drmMap( sPriv->fd, + r128Screen->agpTextures.handle, + r128Screen->agpTextures.size, + (drmAddressPtr)&r128Screen->agpTextures.map ) ) { + drmUnmapBufs( r128Screen->buffers ); + drmUnmap( (drmAddress)r128Screen->mmio.map, r128Screen->mmio.size ); + FREE( r128Screen ); + return NULL; + } + } + + switch ( r128DRIPriv->deviceID ) { + case PCI_CHIP_RAGE128RE: + case PCI_CHIP_RAGE128RF: + case PCI_CHIP_RAGE128RK: + case PCI_CHIP_RAGE128RL: + r128Screen->chipset = R128_CARD_TYPE_R128; + break; + case PCI_CHIP_RAGE128PF: + r128Screen->chipset = R128_CARD_TYPE_R128_PRO; + break; + case PCI_CHIP_RAGE128LE: + case PCI_CHIP_RAGE128LF: + r128Screen->chipset = R128_CARD_TYPE_R128_MOBILITY; + break; + default: + r128Screen->chipset = R128_CARD_TYPE_R128; + break; + } + + r128Screen->cpp = r128DRIPriv->bpp / 8; + r128Screen->AGPMode = r128DRIPriv->AGPMode; + + r128Screen->frontOffset = r128DRIPriv->frontOffset; + r128Screen->frontPitch = r128DRIPriv->frontPitch; + r128Screen->backOffset = r128DRIPriv->backOffset; + r128Screen->backPitch = r128DRIPriv->backPitch; + r128Screen->depthOffset = r128DRIPriv->depthOffset; + r128Screen->depthPitch = r128DRIPriv->depthPitch; + r128Screen->spanOffset = r128DRIPriv->spanOffset; + + r128Screen->texOffset[R128_CARD_HEAP] = r128DRIPriv->textureOffset; + r128Screen->texSize[R128_CARD_HEAP] = r128DRIPriv->textureSize; + r128Screen->logTexGranularity[R128_CARD_HEAP] = r128DRIPriv->log2TexGran; + + if ( r128Screen->IsPCI ) { + r128Screen->numTexHeaps = R128_NR_TEX_HEAPS - 1; + r128Screen->texOffset[R128_AGP_HEAP] = 0; + r128Screen->texSize[R128_AGP_HEAP] = 0; + r128Screen->logTexGranularity[R128_AGP_HEAP] = 0; + } else { + r128Screen->numTexHeaps = R128_NR_TEX_HEAPS; + r128Screen->texOffset[R128_AGP_HEAP] = + r128DRIPriv->agpTexOffset + R128_AGP_TEX_OFFSET; + r128Screen->texSize[R128_AGP_HEAP] = r128DRIPriv->agpTexMapSize; + r128Screen->logTexGranularity[R128_AGP_HEAP] = + r128DRIPriv->log2AGPTexGran; + } + + r128Screen->driScreen = sPriv; + + r128DDSetupInit(); + r128DDTriangleFuncsInit(); + r128DDFastPathInit(); + r128DDEltPathInit(); + + return r128Screen; } -/* Destroy the device specific screen private data struct */ -void r128DestroyScreen(__DRIscreenPrivate *sPriv) +/* Destroy the device specific screen private data struct. + */ +void r128DestroyScreen( __DRIscreenPrivate *sPriv ) { - r128ScreenPtr r128Screen = (r128ScreenPtr)sPriv->private; - - if (!r128Screen->IsPCI) { - drmUnmapBufs(r128Screen->buffers); + r128ScreenPtr r128Screen = (r128ScreenPtr)sPriv->private; - drmUnmap((drmAddress)r128Screen->agpTex, r128Screen->agpTexRgn.size); - drmUnmap((drmAddress)r128Screen->buf, r128Screen->bufRgn.size); - drmUnmap((drmAddress)r128Screen->ringReadPtr, - r128Screen->ringReadRgn.size); - drmUnmap((drmAddress)r128Screen->ring, r128Screen->ringRgn.size); - } - drmUnmap((drmAddress)r128Screen->mmio, r128Screen->mmioRgn.size); + if ( !r128Screen->IsPCI ) { + drmUnmap( (drmAddress)r128Screen->agpTextures.map, + r128Screen->agpTextures.size ); + } + drmUnmapBufs( r128Screen->buffers ); + drmUnmap( (drmAddress)r128Screen->mmio.map, r128Screen->mmio.size ); - Xfree(r128Screen); - sPriv->private = NULL; + FREE( r128Screen ); + sPriv->private = NULL; } Index: xc/lib/GL/mesa/src/drv/r128/r128_screen.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_screen.h:1.3 xc/lib/GL/mesa/src/drv/r128/r128_screen.h:1.5 --- xc/lib/GL/mesa/src/drv/r128/r128_screen.h:1.3 Mon Dec 4 14:21:47 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_screen.h Wed Mar 21 11:14:23 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_screen.h,v 1.3 2000/12/04 19:21:47 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_screen.h,v 1.5 2001/03/21 16:14:23 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -28,98 +28,59 @@ /* * Authors: - * Kevin E. Martin * Gareth Hughes + * Kevin E. Martin * */ -#ifndef _R128_SCREEN_H_ -#define _R128_SCREEN_H_ +#ifndef __R128_SCREEN_H__ +#define __R128_SCREEN_H__ #ifdef GLX_DIRECT_RENDERING #include "r128_sarea.h" typedef struct { - drmHandle handle; /* Handle to the DRM region */ - drmSize size; /* Size of the DRM region */ + drmHandle handle; /* Handle to the DRM region */ + drmSize size; /* Size of the DRM region */ + unsigned char *map; /* Mapping of the DRM region */ } r128RegionRec, *r128RegionPtr; typedef struct { - /* MMIO register data */ - r128RegionRec mmioRgn; - unsigned char *mmio; - - /* CCE ring buffer data */ - r128RegionRec ringRgn; - unsigned char *ring; - - /* CCE ring read pointer data */ - r128RegionRec ringReadRgn; - - /* CCE vertex/indirect buffer data */ - r128RegionRec bufRgn; - unsigned char *buf; - int bufOffset; - int bufMapSize; - drmBufMapPtr buffers; - - /* CCE AGP Texture data */ - r128RegionRec agpTexRgn; - unsigned char *agpTex; - int agpTexOffset; - - /* Frame buffer data */ - unsigned char *fb; - unsigned long fbOffset; - int fbStride; - int fbSize; - - unsigned int frontX, frontY; /* Start of front buffer */ - unsigned int frontOffset, frontPitch; - unsigned int backX, backY; /* Start of shared back buffer */ - unsigned int backOffset, backPitch; - unsigned int depthX, depthY; /* Start of shared depth buffer */ - unsigned int depthOffset, depthPitch; - unsigned int spanOffset; - - int chipset; - int IsPCI; /* Current card is a PCI card */ - int AGPMode; - - int CCEMode; /* CCE mode that server/clients use */ - int CCEFifoSize; /* Size of the CCE command FIFO */ - - /* CCE ring buffer data */ - int ringEntries; - - volatile int *ringReadPtr; /* Pointer to current read addr */ - int *ringStartPtr; /* Pointer to end of ring buffer */ - int *ringEndPtr; /* Pointer to end of ring buffer */ - - /* DRI screen private data */ - int deviceID; /* PCI device ID */ - int depth; /* Depth of display (8, 15, 16, 24) */ - int bpp; /* Bit depth of disp (8, 16, 24, 32) */ - int pixel_code; /* 8, 15, 16, 24, 32 */ + GLint chipset; + GLint cpp; + GLint IsPCI; /* Current card is a PCI card */ + GLint AGPMode; + + GLuint frontOffset; + GLuint frontPitch; + GLuint backOffset; + GLuint backPitch; + + GLuint depthOffset; + GLuint depthPitch; + GLuint spanOffset; + /* Shared texture data */ - int NRTexHeaps; - int texOffset[R128_NR_TEX_HEAPS]; - int texSize[R128_NR_TEX_HEAPS]; - int log2TexGran[R128_NR_TEX_HEAPS]; - - int MMIOFifoSlots; /* Free slots in the FIFO (64 max) */ - int CCEFifoSlots; /* Free slots in the CCE FIFO */ - - int CCEFifoAddr; /* MMIO offset to write next CCE - value (only used when CCE is - in PIO mode). */ - __DRIscreenPrivate *driScreen; + GLint numTexHeaps; + GLint texOffset[R128_NR_TEX_HEAPS]; + GLint texSize[R128_NR_TEX_HEAPS]; + GLint logTexGranularity[R128_NR_TEX_HEAPS]; + + r128RegionRec mmio; + r128RegionRec agpTextures; + + drmBufMapPtr buffers; + + __DRIscreenPrivate *driScreen; + unsigned int sarea_priv_offset; + } r128ScreenRec, *r128ScreenPtr; + -r128ScreenPtr r128CreateScreen(__DRIscreenPrivate *sPriv); -void r128DestroyScreen(__DRIscreenPrivate *sPriv); +extern r128ScreenPtr r128CreateScreen( __DRIscreenPrivate *sPriv ); +extern void r128DestroyScreen( __DRIscreenPrivate *sPriv ); #endif -#endif /* _R128_SCREEN_H_ */ +#endif /* __R128_SCREEN_H__ */ Index: xc/lib/GL/mesa/src/drv/r128/r128_span.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_span.c:1.4 xc/lib/GL/mesa/src/drv/r128/r128_span.c:1.6 --- xc/lib/GL/mesa/src/drv/r128/r128_span.c:1.4 Tue Dec 12 12:17:07 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_span.c Wed Mar 21 11:14:23 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_span.c,v 1.4 2000/12/12 17:17:07 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_span.c,v 1.6 2001/03/21 16:14:23 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -28,9 +28,9 @@ /* * Authors: - * Kevin E. Martin - * Keith Whitwell * Gareth Hughes + * Keith Whitwell + * Kevin E. Martin * */ @@ -47,59 +47,61 @@ #define HAVE_HW_DEPTH_PIXELS 1 #define LOCAL_VARS \ - r128ContextPtr r128ctx = R128_CONTEXT(ctx); \ - r128ScreenPtr r128scrn = r128ctx->r128Screen; \ - __DRIdrawablePrivate *dPriv = r128ctx->driDrawable; \ - GLuint pitch = r128scrn->fbStride; \ + r128ContextPtr rmesa = R128_CONTEXT(ctx); \ + r128ScreenPtr r128scrn = rmesa->r128Screen; \ + __DRIscreenPrivate *sPriv = rmesa->driScreen; \ + __DRIdrawablePrivate *dPriv = rmesa->driDrawable; \ + GLuint pitch = r128scrn->frontPitch * r128scrn->cpp; \ GLuint height = dPriv->h; \ - char *buf = (char *)(r128scrn->fb + \ - r128ctx->drawOffset + \ - (dPriv->x * r128scrn->bpp/8) + \ + char *buf = (char *)(sPriv->pFB + \ + rmesa->drawOffset + \ + (dPriv->x * r128scrn->cpp) + \ (dPriv->y * pitch)); \ - char *read_buf = (char *)(r128scrn->fb + \ - r128ctx->readOffset + \ - (dPriv->x * r128scrn->bpp/8) + \ + char *read_buf = (char *)(sPriv->pFB + \ + rmesa->readOffset + \ + (dPriv->x * r128scrn->cpp) + \ (dPriv->y * pitch)); \ - GLushort p; \ + GLuint p; \ (void) read_buf; (void) buf; (void) p #define LOCAL_DEPTH_VARS \ - r128ContextPtr r128ctx = R128_CONTEXT(ctx); \ - __DRIdrawablePrivate *dPriv = r128ctx->driDrawable; \ + r128ContextPtr rmesa = R128_CONTEXT(ctx); \ + r128ScreenPtr r128scrn = rmesa->r128Screen; \ + __DRIscreenPrivate *sPriv = rmesa->driScreen; \ + __DRIdrawablePrivate *dPriv = rmesa->driDrawable; \ GLuint height = dPriv->h; \ - (void) height + (void) r128scrn; (void) sPriv; (void) height #define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS -#define INIT_MONO_PIXEL( p ) \ - p = r128ctx->Color +#define INIT_MONO_PIXEL( p ) p = rmesa->Color #define CLIPPIXEL( _x, _y ) \ ((_x >= minx) && (_x < maxx) && (_y >= miny) && (_y < maxy)) #define CLIPSPAN( _x, _y, _n, _x1, _n1, _i ) \ - if (( _y < miny) || (_y >= maxy)) { \ + if ( _y < miny || _y >= maxy ) { \ _n1 = 0, _x1 = x; \ } else { \ _n1 = _n; \ _x1 = _x; \ - if (_x1 < minx) _i += (minx - _x1), _x1 = minx; \ - if (_x1 + _n1 >= maxx) n1 -= (_x1 + n1 - maxx) + 1; \ + if ( _x1 < minx ) _i += (minx-_x1), n1 -= (minx-_x1), _x1 = minx; \ + if ( _x1 + _n1 >= maxx ) n1 -= (_x1 + n1 - maxx); \ } -#define Y_FLIP( _y ) (height - _y - 1) +#define Y_FLIP( _y ) (height - _y - 1) #define HW_LOCK() \ - r128ContextPtr r128ctx = R128_CONTEXT(ctx); \ - FLUSH_BATCH( r128ctx ); \ - LOCK_HARDWARE( r128ctx ); \ - r128WaitForIdleLocked( r128ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); \ + FLUSH_BATCH( rmesa ); \ + LOCK_HARDWARE( rmesa ); \ + r128WaitForIdleLocked( rmesa ); #define HW_CLIPLOOP() \ do { \ - __DRIdrawablePrivate *dPriv = r128ctx->driDrawable; \ + __DRIdrawablePrivate *dPriv = rmesa->driDrawable; \ int _nc = dPriv->numClipRects; \ \ while ( _nc-- ) { \ @@ -113,7 +115,7 @@ } while (0) #define HW_UNLOCK() \ - UNLOCK_HARDWARE( r128ctx ) \ + UNLOCK_HARDWARE( rmesa ) @@ -122,27 +124,32 @@ */ /* 16 bit, RGB565 color spanline and pixel functions - */ \ + */ #define WRITE_RGBA( _x, _y, r, g, b, a ) \ *(GLushort *)(buf + _x*2 + _y*pitch) = ((((int)r & 0xf8) << 8) | \ (((int)g & 0xfc) << 3) | \ (((int)b & 0xf8) >> 3)) #define WRITE_PIXEL( _x, _y, p ) \ - *(GLushort *)(buf + _x*2 + _y*pitch) = p + *(GLushort *)(buf + _x*2 + _y*pitch) = p #define READ_RGBA( rgba, _x, _y ) \ - do { \ - GLushort p = *(GLushort *)(read_buf + _x*2 + _y*pitch); \ - rgba[0] = (p >> 8) & 0xf8; \ - rgba[1] = (p >> 3) & 0xfc; \ - rgba[2] = (p << 3) & 0xf8; \ - rgba[3] = 0xff; \ - } while (0) + do { \ + GLushort p = *(GLushort *)(read_buf + _x*2 + _y*pitch); \ + rgba[0] = (p >> 8) & 0xf8; \ + rgba[1] = (p >> 3) & 0xfc; \ + rgba[2] = (p << 3) & 0xf8; \ + rgba[3] = 0xff; \ + if ( rgba[0] & 0x08 ) rgba[0] |= 0x07; \ + if ( rgba[1] & 0x04 ) rgba[1] |= 0x03; \ + if ( rgba[2] & 0x08 ) rgba[2] |= 0x07; \ + } while (0) #define TAG(x) r128##x##_RGB565 #include "spantmp.h" +#define READ_DEPTH(d, _x, _y) \ + d = *(GLushort *)(buf + _x*2 + _y*pitch) /* 32 bit, ARGB8888 color spanline and pixel functions */ @@ -168,6 +175,23 @@ #include "spantmp.h" +/* 24 bit, RGB888 color spanline and pixel functions */ +#define WRITE_RGBA(_x, _y, r, g, b, a) \ + *(GLuint *)(buf + _x*3 + _y*pitch) = ((r << 16) | \ + (g << 8) | \ + (b << 0)) + +#define WRITE_PIXEL(_x, _y, p) \ + *(GLuint *)(buf + _x*3 + _y*pitch) = p + +#define READ_RGBA(rgba, _x, _y) \ + do { \ + GLuint p = *(GLuint *)(read_buf + _x*3 + _y*pitch); \ + rgba[0] = (p >> 16) & 0xff; \ + rgba[1] = (p >> 8) & 0xff; \ + rgba[2] = (p >> 0) & 0xff; \ + rgba[3] = 0xff; \ + } while (0) /* ================================================================ * Depth buffer @@ -175,9 +199,8 @@ /* 16-bit depth buffer functions */ - #define WRITE_DEPTH_SPAN() \ - r128WriteDepthSpanLocked( r128ctx, n, \ + r128WriteDepthSpanLocked( rmesa, n, \ x + dPriv->x, \ y + dPriv->y, \ depth, mask ); @@ -192,20 +215,19 @@ for ( i = 0 ; i < n ; i++ ) { \ oy[i] = Y_FLIP( y[i] ) + dPriv->y; \ } \ - r128WriteDepthPixelsLocked( r128ctx, n, ox, oy, depth, mask ); \ + r128WriteDepthPixelsLocked( rmesa, n, ox, oy, depth, mask ); \ } while (0) #define READ_DEPTH_SPAN() \ do { \ - r128ScreenPtr r128scrn = r128ctx->r128Screen; \ - GLushort *buf = (GLushort *)((GLubyte *)r128scrn->fb + \ + GLushort *buf = (GLushort *)((GLubyte *)sPriv->pFB + \ r128scrn->spanOffset); \ GLint i; \ \ - r128ReadDepthSpanLocked( r128ctx, n, \ + r128ReadDepthSpanLocked( rmesa, n, \ x + dPriv->x, \ y + dPriv->y ); \ - r128WaitForIdleLocked( r128ctx ); \ + r128WaitForIdleLocked( rmesa ); \ \ for ( i = 0 ; i < n ; i++ ) { \ depth[i] = buf[i]; \ @@ -214,8 +236,7 @@ #define READ_DEPTH_PIXELS() \ do { \ - r128ScreenPtr r128scrn = r128ctx->r128Screen; \ - GLushort *buf = (GLushort *)((GLubyte *)r128scrn->fb + \ + GLushort *buf = (GLushort *)((GLubyte *)sPriv->pFB + \ r128scrn->spanOffset); \ GLint i, remaining = n; \ \ @@ -236,8 +257,8 @@ oy[i] = Y_FLIP( y[i] ) + dPriv->y; \ } \ \ - r128ReadDepthPixelsLocked( r128ctx, count, ox, oy ); \ - r128WaitForIdleLocked( r128ctx ); \ + r128ReadDepthPixelsLocked( rmesa, count, ox, oy ); \ + r128WaitForIdleLocked( rmesa ); \ \ for ( i = 0 ; i < count ; i++ ) { \ depth[i] = buf[i]; \ @@ -256,7 +277,7 @@ /* 24-bit depth, 8-bit stencil buffer functions */ #define WRITE_DEPTH_SPAN() \ - r128WriteDepthSpanLocked( r128ctx, n, \ + r128WriteDepthSpanLocked( rmesa, n, \ x + dPriv->x, \ y + dPriv->y, \ depth, mask ); @@ -271,20 +292,19 @@ for ( i = 0 ; i < n ; i++ ) { \ oy[i] = Y_FLIP( y[i] ) + dPriv->y; \ } \ - r128WriteDepthPixelsLocked( r128ctx, n, ox, oy, depth, mask ); \ + r128WriteDepthPixelsLocked( rmesa, n, ox, oy, depth, mask ); \ } while (0) #define READ_DEPTH_SPAN() \ do { \ - r128ScreenPtr r128scrn = r128ctx->r128Screen; \ - GLuint *buf = (GLuint *)((GLubyte *)r128scrn->fb + \ + GLuint *buf = (GLuint *)((GLubyte *)sPriv->pFB + \ r128scrn->spanOffset); \ GLint i; \ \ - r128ReadDepthSpanLocked( r128ctx, n, \ + r128ReadDepthSpanLocked( rmesa, n, \ x + dPriv->x, \ y + dPriv->y ); \ - r128WaitForIdleLocked( r128ctx ); \ + r128WaitForIdleLocked( rmesa ); \ \ for ( i = 0 ; i < n ; i++ ) { \ depth[i] = buf[i] & 0x00ffffff; \ @@ -293,8 +313,7 @@ #define READ_DEPTH_PIXELS() \ do { \ - r128ScreenPtr r128scrn = r128ctx->r128Screen; \ - GLuint *buf = (GLuint *)((GLubyte *)r128scrn->fb + \ + GLuint *buf = (GLuint *)((GLubyte *)sPriv->pFB + \ r128scrn->spanOffset); \ GLint i, remaining = n; \ \ @@ -315,8 +334,8 @@ oy[i] = Y_FLIP( y[i] ) + dPriv->y; \ } \ \ - r128ReadDepthPixelsLocked( r128ctx, count, ox, oy ); \ - r128WaitForIdleLocked( r128ctx ); \ + r128ReadDepthPixelsLocked( rmesa, count, ox, oy ); \ + r128WaitForIdleLocked( rmesa ); \ \ for ( i = 0 ; i < count ; i++ ) { \ depth[i] = buf[i] & 0x00ffffff; \ @@ -341,13 +360,16 @@ */ +/* 32 bit depthbuffer functions */ +#define WRITE_DEPTH(_x, _y, d) \ + *(GLuint *)(buf + _x*4 + _y*pitch) = d void r128DDInitSpanFuncs( GLcontext *ctx ) { - r128ContextPtr r128ctx = R128_CONTEXT(ctx); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - switch ( r128ctx->r128Screen->bpp ) { - case 16: + switch ( rmesa->r128Screen->cpp ) { + case 2: ctx->Driver.WriteRGBASpan = r128WriteRGBASpan_RGB565; ctx->Driver.WriteRGBSpan = r128WriteRGBSpan_RGB565; ctx->Driver.WriteMonoRGBASpan = r128WriteMonoRGBASpan_RGB565; @@ -357,7 +379,7 @@ ctx->Driver.ReadRGBAPixels = r128ReadRGBAPixels_RGB565; break; - case 32: + case 4: ctx->Driver.WriteRGBASpan = r128WriteRGBASpan_ARGB8888; ctx->Driver.WriteRGBSpan = r128WriteRGBSpan_ARGB8888; ctx->Driver.WriteMonoRGBASpan = r128WriteMonoRGBASpan_ARGB8888; @@ -371,7 +393,7 @@ break; } - switch ( r128ctx->DepthSize ) { + switch ( rmesa->glCtx->Visual->DepthBits ) { case 16: ctx->Driver.ReadDepthSpan = r128ReadDepthSpan_16; ctx->Driver.WriteDepthSpan = r128WriteDepthSpan_16; Index: xc/lib/GL/mesa/src/drv/r128/r128_span.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_span.h:1.2 xc/lib/GL/mesa/src/drv/r128/r128_span.h:1.3 --- xc/lib/GL/mesa/src/drv/r128/r128_span.h:1.2 Mon Dec 4 14:21:47 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_span.h Sun Jan 7 20:07:21 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_span.h,v 1.2 2000/12/04 19:21:47 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_span.h,v 1.3 2001/01/08 01:07:21 martin Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -28,17 +28,17 @@ /* * Authors: - * Kevin E. Martin * Gareth Hughes + * Kevin E. Martin * */ -#ifndef _R128_SPAN_H_ -#define _R128_SPAN_H_ +#ifndef __R128_SPAN_H__ +#define __R128_SPAN_H__ #ifdef GLX_DIRECT_RENDERING -extern void r128DDInitSpanFuncs(GLcontext *ctx); +extern void r128DDInitSpanFuncs( GLcontext *ctx ); +#endif #endif -#endif /* _R128_SPAN_H_ */ Index: xc/lib/GL/mesa/src/drv/r128/r128_state.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_state.c:1.6 xc/lib/GL/mesa/src/drv/r128/r128_state.c:1.8 --- xc/lib/GL/mesa/src/drv/r128/r128_state.c:1.6 Tue Dec 12 12:17:07 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_state.c Wed Mar 21 11:14:23 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_state.c,v 1.6 2000/12/12 17:17:07 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_state.c,v 1.8 2001/03/21 16:14:23 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -29,6 +29,7 @@ /* * Authors: * Gareth Hughes + * Kevin E. Martin * Keith Whitwell * */ @@ -40,6 +41,7 @@ #include "r128_vb.h" #include "r128_tex.h" +#include "context.h" #include "mmath.h" #include "pb.h" #include "enums.h" @@ -51,9 +53,9 @@ static void r128UpdateAlphaMode( GLcontext *ctx ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); - CARD32 a = r128ctx->setup.misc_3d_state_cntl_reg; - CARD32 t = r128ctx->setup.tex_cntl_c; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + GLuint a = rmesa->setup.misc_3d_state_cntl_reg; + GLuint t = rmesa->setup.tex_cntl_c; if ( ctx->Color.AlphaEnabled ) { GLubyte ref = ctx->Color.AlphaRef; @@ -63,7 +65,6 @@ switch ( ctx->Color.AlphaFunc ) { case GL_NEVER: a |= R128_ALPHA_TEST_NEVER; - ref = 0; break; case GL_LESS: a |= R128_ALPHA_TEST_LESS; @@ -159,48 +160,54 @@ t &= ~R128_ALPHA_ENABLE; } - if ( r128ctx->setup.misc_3d_state_cntl_reg != a ) { - r128ctx->setup.misc_3d_state_cntl_reg = a; - r128ctx->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_MASKS; - } - if ( r128ctx->setup.tex_cntl_c != t ) { - r128ctx->setup.tex_cntl_c = t; - r128ctx->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_MASKS; + if ( rmesa->setup.misc_3d_state_cntl_reg != a ) { + rmesa->setup.misc_3d_state_cntl_reg = a; + rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_MASKS; + } + if ( rmesa->setup.tex_cntl_c != t ) { + rmesa->setup.tex_cntl_c = t; + rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_MASKS; } } static void r128DDAlphaFunc( GLcontext *ctx, GLenum func, GLclampf ref ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_ALPHA; + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_ALPHA; } static void r128DDBlendEquation( GLcontext *ctx, GLenum mode ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_ALPHA; + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_ALPHA; + + if ( ctx->Color.ColorLogicOpEnabled && ctx->Color.LogicOp != GL_COPY ) { + rmesa->Fallback |= R128_FALLBACK_LOGICOP; + } else { + rmesa->Fallback &= ~R128_FALLBACK_LOGICOP; + } } static void r128DDBlendFunc( GLcontext *ctx, GLenum sfactor, GLenum dfactor ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_ALPHA; + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_ALPHA; } static void r128DDBlendFuncSeparate( GLcontext *ctx, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorA, GLenum dfactorA ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_ALPHA; + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_ALPHA; } @@ -210,9 +217,9 @@ static void r128UpdateZMode( GLcontext *ctx ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); - CARD32 z = r128ctx->setup.z_sten_cntl_c; - CARD32 t = r128ctx->setup.tex_cntl_c; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + GLuint z = rmesa->setup.z_sten_cntl_c; + GLuint t = rmesa->setup.tex_cntl_c; if ( ctx->Depth.Test ) { z &= ~R128_Z_TEST_MASK; @@ -255,45 +262,45 @@ t &= ~R128_Z_WRITE_ENABLE; } - if ( r128ctx->setup.z_sten_cntl_c != z ) { - r128ctx->setup.z_sten_cntl_c = z; - r128ctx->dirty |= R128_UPLOAD_CONTEXT; - } - if ( r128ctx->setup.tex_cntl_c != t ) { - r128ctx->setup.tex_cntl_c = t; - r128ctx->dirty |= R128_UPLOAD_CONTEXT; + if ( rmesa->setup.z_sten_cntl_c != z ) { + rmesa->setup.z_sten_cntl_c = z; + rmesa->dirty |= R128_UPLOAD_CONTEXT; + } + if ( rmesa->setup.tex_cntl_c != t ) { + rmesa->setup.tex_cntl_c = t; + rmesa->dirty |= R128_UPLOAD_CONTEXT; } } static void r128DDDepthFunc( GLcontext *ctx, GLenum func ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_DEPTH; + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_DEPTH; } static void r128DDDepthMask( GLcontext *ctx, GLboolean flag ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_DEPTH; + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_DEPTH; } static void r128DDClearDepth( GLcontext *ctx, GLclampd d ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - switch ( r128ctx->DepthSize ) { - case 16: - r128ctx->ClearDepth = d * 0x0000ffff; + switch ( rmesa->setup.z_sten_cntl_c & R128_Z_PIX_WIDTH_MASK ) { + case R128_Z_PIX_WIDTH_16: + rmesa->ClearDepth = d * 0x0000ffff; break; - case 24: - r128ctx->ClearDepth = d * 0x00ffffff; + case R128_Z_PIX_WIDTH_24: + rmesa->ClearDepth = d * 0x00ffffff; break; - case 32: - r128ctx->ClearDepth = d * 0xffffffff; + case R128_Z_PIX_WIDTH_32: + rmesa->ClearDepth = d * 0xffffffff; break; } } @@ -305,10 +312,10 @@ static void r128UpdateFogAttrib( GLcontext *ctx ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); - CARD32 t = r128ctx->setup.tex_cntl_c; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + GLuint t = rmesa->setup.tex_cntl_c; GLubyte c[4]; - CARD32 col; + GLuint col; if ( ctx->FogMode == FOG_FRAGMENT ) { t |= R128_FOG_ENABLE; @@ -316,25 +323,25 @@ t &= ~R128_FOG_ENABLE; } - FLOAT_RGBA_TO_UBYTE_RGBA( c, ctx->Fog.Color ); - col = r128PackColor( 32, c[0], c[1], c[2], c[3] ); + FLOAT_RGB_TO_UBYTE_RGB( c, ctx->Fog.Color ); + col = r128PackColor( 4, c[0], c[1], c[2], 0 ); - if ( r128ctx->setup.fog_color_c != col ) { - r128ctx->setup.fog_color_c = col; - r128ctx->dirty |= R128_UPLOAD_CONTEXT; - } - if ( r128ctx->setup.tex_cntl_c != t ) { - r128ctx->setup.tex_cntl_c = t; - r128ctx->dirty |= R128_UPLOAD_CONTEXT; + if ( rmesa->setup.fog_color_c != col ) { + rmesa->setup.fog_color_c = col; + rmesa->dirty |= R128_UPLOAD_CONTEXT; + } + if ( rmesa->setup.tex_cntl_c != t ) { + rmesa->setup.tex_cntl_c = t; + rmesa->dirty |= R128_UPLOAD_CONTEXT; } } static void r128DDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_FOG; + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_FOG; } @@ -344,14 +351,14 @@ static void r128UpdateClipping( GLcontext *ctx ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - if ( r128ctx->driDrawable ) { - __DRIdrawablePrivate *drawable = r128ctx->driDrawable; + if ( rmesa->driDrawable ) { + __DRIdrawablePrivate *drawable = rmesa->driDrawable; int x1 = 0; int y1 = 0; - int x2 = r128ctx->driDrawable->w - 1; - int y2 = r128ctx->driDrawable->h - 1; + int x2 = drawable->w - 1; + int y2 = drawable->h - 1; if ( ctx->Scissor.Enabled ) { if ( ctx->Scissor.X > x1 ) { @@ -368,51 +375,25 @@ } } - x1 += r128ctx->driDrawable->x; - y1 += r128ctx->driDrawable->y; - x2 += r128ctx->driDrawable->x; - y2 += r128ctx->driDrawable->y; - - if ( 0 ) { - fprintf( stderr, "%s: drawable %3d %3d %3d %3d\n", - __FUNCTION__, - r128ctx->driDrawable->x, - r128ctx->driDrawable->y, - r128ctx->driDrawable->w, - r128ctx->driDrawable->h ); - fprintf( stderr, "%s: draw buf %3d %3d %3d %3d\n", - __FUNCTION__, - ctx->DrawBuffer->Xmin, - ctx->DrawBuffer->Ymin, - ctx->DrawBuffer->Xmax, - ctx->DrawBuffer->Ymax ); - fprintf( stderr, "%s: scissor %3d %3d %3d %3d\n", - __FUNCTION__, - ctx->Scissor.X, - ctx->Scissor.Y, - ctx->Scissor.Width, - ctx->Scissor.Height ); - fprintf( stderr, "%s: final %3d %3d %3d %3d\n", - __FUNCTION__, x1, y1, x2, y2 ); - fprintf( stderr, "\n" ); - } + x1 += drawable->x; + y1 += drawable->y; + x2 += drawable->x; + y2 += drawable->y; - r128ctx->setup.sc_top_left_c = ((x1 << 0) | - (y1 << 16)); - r128ctx->setup.sc_bottom_right_c = ((x2 << 0) | - (y2 << 16)); + rmesa->setup.sc_top_left_c = ((y1 << 16) | x1); + rmesa->setup.sc_bottom_right_c = ((y2 << 16) | x2); - r128ctx->dirty |= R128_UPLOAD_CONTEXT; + rmesa->dirty |= R128_UPLOAD_CONTEXT; } } static void r128DDScissor( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_CLIP; + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_CLIP; } @@ -422,8 +403,8 @@ static void r128UpdateCull( GLcontext *ctx ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); - CARD32 f = r128ctx->setup.pm4_vc_fpu_setup; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + GLuint f = rmesa->setup.pm4_vc_fpu_setup; f &= ~R128_FRONT_DIR_MASK; @@ -453,26 +434,26 @@ } } - if ( r128ctx->setup.pm4_vc_fpu_setup != f ) { - r128ctx->setup.pm4_vc_fpu_setup = f; - r128ctx->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_SETUP; + if ( rmesa->setup.pm4_vc_fpu_setup != f ) { + rmesa->setup.pm4_vc_fpu_setup = f; + rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_SETUP; } } static void r128DDCullFace( GLcontext *ctx, GLenum mode ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_CULL; + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_CULL; } static void r128DDFrontFace( GLcontext *ctx, GLenum mode ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_CULL; + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_CULL; } @@ -482,17 +463,17 @@ static void r128UpdateMasks( GLcontext *ctx ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - GLuint mask = r128PackColor( r128ctx->r128Screen->bpp, + GLuint mask = r128PackColor( rmesa->r128Screen->cpp, ctx->Color.ColorMask[RCOMP], ctx->Color.ColorMask[GCOMP], ctx->Color.ColorMask[BCOMP], ctx->Color.ColorMask[ACOMP] ); - if ( r128ctx->setup.plane_3d_mask_c != mask ) { - r128ctx->setup.plane_3d_mask_c = mask; - r128ctx->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_MASKS; + if ( rmesa->setup.plane_3d_mask_c != mask ) { + rmesa->setup.plane_3d_mask_c = mask; + rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_MASKS; } } @@ -500,12 +481,13 @@ GLboolean r, GLboolean g, GLboolean b, GLboolean a ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_MASKS; + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_MASKS; - return GL_TRUE; + return GL_FALSE; /* This forces the software paths to do colormasking. */ + /* This function will return void when we use Mesa 3.5 */ } @@ -517,48 +499,33 @@ * sense to break them out of the core texture state update routines. */ -static void r128UpdateRenderAttrib( GLcontext *ctx ) -{ - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); - CARD32 t = r128ctx->setup.tex_cntl_c; - CARD32 bias = r128ctx->lod_bias & 0xff;; - - t &= ~R128_LOD_BIAS_MASK; - t |= (bias << R128_LOD_BIAS_SHIFT); - - if ( ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR ) { - t |= R128_SPEC_LIGHT_ENABLE; - } else { - t &= ~R128_SPEC_LIGHT_ENABLE; - } - - if ( ctx->Color.DitherFlag ) { - t |= R128_DITHER_ENABLE; - } else { - t &= ~R128_DITHER_ENABLE; - } - - if ( r128ctx->setup.tex_cntl_c != t ) { - r128ctx->setup.tex_cntl_c = t; - r128ctx->dirty |= R128_UPLOAD_CONTEXT; - } -} - static void r128DDLightModelfv( GLcontext *ctx, GLenum pname, const GLfloat *param ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); if ( pname == GL_LIGHT_MODEL_COLOR_CONTROL ) { - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_RENDER; + GLuint t = rmesa->setup.tex_cntl_c; + + FLUSH_BATCH( rmesa ); + + if ( ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR ) { + t |= R128_SPEC_LIGHT_ENABLE; + } else { + t &= ~R128_SPEC_LIGHT_ENABLE; + } + + if ( rmesa->setup.tex_cntl_c != t ) { + rmesa->setup.tex_cntl_c = t; + rmesa->dirty |= R128_UPLOAD_CONTEXT; + } } } static void r128DDShadeModel( GLcontext *ctx, GLenum mode ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); - CARD32 s = r128ctx->setup.pm4_vc_fpu_setup; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + GLuint s = rmesa->setup.pm4_vc_fpu_setup; s &= ~R128_FPU_COLOR_MASK; @@ -573,12 +540,12 @@ return; } - if ( r128ctx->setup.pm4_vc_fpu_setup != s ) { - FLUSH_BATCH( r128ctx ); - r128ctx->setup.pm4_vc_fpu_setup = s; + if ( rmesa->setup.pm4_vc_fpu_setup != s ) { + FLUSH_BATCH( rmesa ); + rmesa->setup.pm4_vc_fpu_setup = s; - r128ctx->new_state |= R128_NEW_CONTEXT; - r128ctx->dirty |= R128_UPLOAD_SETUP; + rmesa->new_state |= R128_NEW_CONTEXT; + rmesa->dirty |= R128_UPLOAD_SETUP; } } @@ -589,14 +556,14 @@ void r128UpdateWindow( GLcontext *ctx ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); - int x = r128ctx->driDrawable->x; - int y = r128ctx->driDrawable->y; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + int x = rmesa->driDrawable->x; + int y = rmesa->driDrawable->y; - r128ctx->setup.window_xy_offset = ((y << R128_WINDOW_Y_SHIFT) | - (x << R128_WINDOW_X_SHIFT)); + rmesa->setup.window_xy_offset = ((y << R128_WINDOW_Y_SHIFT) | + (x << R128_WINDOW_X_SHIFT)); - r128ctx->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_WINDOW; + rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_WINDOW; } @@ -607,73 +574,67 @@ static void r128DDClearColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - r128ctx->ClearColor = r128PackColor( r128ctx->r128Screen->bpp, - r, g, b, a ); + rmesa->ClearColor = r128PackColor( rmesa->r128Screen->cpp, + r, g, b, a ); } static void r128DDColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - r128ctx->Color = r128PackColor( r128ctx->r128Screen->bpp, - r, g, b, a ); + rmesa->Color = r128PackColor( rmesa->r128Screen->cpp, + r, g, b, a ); } static void r128DDLogicOpCode( GLcontext *ctx, GLenum opcode ) { - if ( ctx->Color.ColorLogicOpEnabled ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - FLUSH_BATCH( r128ctx ); + if ( ctx->Color.ColorLogicOpEnabled ) { + FLUSH_BATCH( rmesa ); if ( opcode == GL_COPY ) { - r128ctx->Fallback &= ~R128_FALLBACK_LOGICOP; + rmesa->Fallback &= ~R128_FALLBACK_LOGICOP; } else { - r128ctx->Fallback |= R128_FALLBACK_LOGICOP; + rmesa->Fallback |= R128_FALLBACK_LOGICOP; } + } else { + rmesa->Fallback &= ~R128_FALLBACK_LOGICOP; } } static GLboolean r128DDSetDrawBuffer( GLcontext *ctx, GLenum mode ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); int found = GL_TRUE; - FLUSH_BATCH( r128ctx ); + FLUSH_BATCH( rmesa ); - if ( r128ctx->DrawBuffer != mode ) { - r128ctx->DrawBuffer = mode; - r128ctx->Fallback &= ~R128_FALLBACK_DRAW_BUFFER; + if ( rmesa->DrawBuffer != mode ) { + rmesa->DrawBuffer = mode; + rmesa->Fallback &= ~R128_FALLBACK_DRAW_BUFFER; switch ( mode ) { case GL_FRONT_LEFT: - r128ctx->drawX = r128ctx->r128Screen->frontX; - r128ctx->drawY = r128ctx->r128Screen->frontY; - r128ctx->drawOffset = r128ctx->r128Screen->frontOffset; - r128ctx->drawPitch = r128ctx->r128Screen->frontPitch; - r128ctx->readX = r128ctx->r128Screen->frontX; - r128ctx->readY = r128ctx->r128Screen->frontY; + rmesa->drawOffset = rmesa->r128Screen->frontOffset; + rmesa->drawPitch = rmesa->r128Screen->frontPitch; break; case GL_BACK_LEFT: - r128ctx->drawX = r128ctx->r128Screen->backX; - r128ctx->drawY = r128ctx->r128Screen->backY; - r128ctx->drawOffset = r128ctx->r128Screen->backOffset; - r128ctx->drawPitch = r128ctx->r128Screen->backPitch; - r128ctx->readX = r128ctx->r128Screen->backX; - r128ctx->readY = r128ctx->r128Screen->backY; + rmesa->drawOffset = rmesa->r128Screen->backOffset; + rmesa->drawPitch = rmesa->r128Screen->backPitch; break; default: - r128ctx->Fallback |= R128_FALLBACK_DRAW_BUFFER; + rmesa->Fallback |= R128_FALLBACK_DRAW_BUFFER; found = GL_FALSE; break; } - r128ctx->setup.dst_pitch_offset_c = (((r128ctx->drawPitch/8) << 21) | - (r128ctx->drawOffset >> 5)); - r128ctx->new_state |= R128_NEW_WINDOW; + rmesa->setup.dst_pitch_offset_c = (((rmesa->drawPitch/8) << 21) | + (rmesa->drawOffset >> 5)); + rmesa->new_state |= R128_NEW_WINDOW; } return found; @@ -683,25 +644,21 @@ GLframebuffer *colorBuffer, GLenum mode ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); - r128ctx->Fallback &= ~R128_FALLBACK_READ_BUFFER; + rmesa->Fallback &= ~R128_FALLBACK_READ_BUFFER; switch ( mode ) { case GL_FRONT_LEFT: - r128ctx->readOffset = r128ctx->r128Screen->frontOffset; - r128ctx->readPitch = r128ctx->r128Screen->frontPitch; - r128ctx->readX = r128ctx->r128Screen->frontX; - r128ctx->readY = r128ctx->r128Screen->frontY; + rmesa->readOffset = rmesa->r128Screen->frontOffset; + rmesa->readPitch = rmesa->r128Screen->frontPitch; break; case GL_BACK_LEFT: - r128ctx->readOffset = r128ctx->r128Screen->backOffset; - r128ctx->readPitch = r128ctx->r128Screen->backPitch; - r128ctx->readX = r128ctx->r128Screen->backX; - r128ctx->readY = r128ctx->r128Screen->backY; + rmesa->readOffset = rmesa->r128Screen->backOffset; + rmesa->readPitch = rmesa->r128Screen->backPitch; break; default: - r128ctx->Fallback |= R128_FALLBACK_READ_BUFFER; + rmesa->Fallback |= R128_FALLBACK_READ_BUFFER; break; } } @@ -713,28 +670,27 @@ static void r128DDPolygonStipple( GLcontext *ctx, const GLubyte *mask ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); GLuint *stipple = (GLuint *)mask; - FLUSH_BATCH( r128ctx ); - ctx->Driver.TriangleCaps |= DD_TRI_STIPPLE; + FLUSH_BATCH( rmesa ); - r128ctx->setup.dp_gui_master_cntl_c &= ~R128_GMC_BRUSH_NONE; + rmesa->setup.dp_gui_master_cntl_c &= ~R128_GMC_BRUSH_NONE; if ( ctx->Polygon.StippleFlag && ctx->PB->primitive == GL_POLYGON ) { - r128ctx->setup.dp_gui_master_cntl_c |= R128_GMC_BRUSH_32x32_MONO_FG_LA; + rmesa->setup.dp_gui_master_cntl_c |= R128_GMC_BRUSH_32x32_MONO_FG_LA; } else { - r128ctx->setup.dp_gui_master_cntl_c |= R128_GMC_BRUSH_SOLID_COLOR; + rmesa->setup.dp_gui_master_cntl_c |= R128_GMC_BRUSH_SOLID_COLOR; } - LOCK_HARDWARE( r128ctx ); + LOCK_HARDWARE( rmesa ); - drmR128PolygonStipple( r128ctx->driFd, stipple ); + drmR128PolygonStipple( rmesa->driFd, stipple ); - UNLOCK_HARDWARE( r128ctx ); + UNLOCK_HARDWARE( rmesa ); - r128ctx->new_state |= R128_NEW_CONTEXT; - r128ctx->dirty |= R128_UPLOAD_CONTEXT; + rmesa->new_state |= R128_NEW_CONTEXT; + rmesa->dirty |= R128_UPLOAD_CONTEXT; } @@ -744,7 +700,7 @@ static void r128DDEnable( GLcontext *ctx, GLenum cap, GLboolean state ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); if ( R128_DEBUG & DEBUG_VERBOSE_API ) { fprintf( stderr, "%s( %s = %s )\n", @@ -754,69 +710,91 @@ switch ( cap ) { case GL_ALPHA_TEST: + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_ALPHA; + break; + case GL_BLEND: - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_ALPHA; + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_ALPHA; + + if ( ctx->Color.ColorLogicOpEnabled && ctx->Color.LogicOp != GL_COPY ) { + rmesa->Fallback |= R128_FALLBACK_LOGICOP; + } else { + rmesa->Fallback &= ~R128_FALLBACK_LOGICOP; + } break; case GL_CULL_FACE: - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_CULL; + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_CULL; break; case GL_DEPTH_TEST: - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_DEPTH; + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_DEPTH; break; case GL_DITHER: - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_RENDER; + do { + GLuint t = rmesa->setup.tex_cntl_c; + FLUSH_BATCH( rmesa ); + + if ( ctx->Color.DitherFlag ) { + t |= R128_DITHER_ENABLE; + } else { + t &= ~R128_DITHER_ENABLE; + } + + if ( rmesa->setup.tex_cntl_c != t ) { + rmesa->setup.tex_cntl_c = t; + rmesa->dirty |= R128_UPLOAD_CONTEXT; + } + } while (0); break; case GL_FOG: - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_FOG; + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_FOG; break; - case GL_INDEX_LOGIC_OP: case GL_COLOR_LOGIC_OP: - FLUSH_BATCH( r128ctx ); + FLUSH_BATCH( rmesa ); if ( state && ctx->Color.LogicOp != GL_COPY ) { - r128ctx->Fallback |= R128_FALLBACK_LOGICOP; + rmesa->Fallback |= R128_FALLBACK_LOGICOP; } else { - r128ctx->Fallback &= ~R128_FALLBACK_LOGICOP; + rmesa->Fallback &= ~R128_FALLBACK_LOGICOP; } break; case GL_SCISSOR_TEST: - FLUSH_BATCH( r128ctx ); - r128ctx->scissor = state; - r128ctx->new_state |= R128_NEW_CLIP; + FLUSH_BATCH( rmesa ); + rmesa->scissor = state; + rmesa->new_state |= R128_NEW_CLIP; break; case GL_TEXTURE_1D: case GL_TEXTURE_2D: case GL_TEXTURE_3D: - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_TEXTURE; + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_TEXTURE; break; case GL_POLYGON_STIPPLE: if ( (ctx->Driver.TriangleCaps & DD_TRI_STIPPLE) && ctx->PB->primitive == GL_POLYGON ) { - FLUSH_BATCH( r128ctx ); - r128ctx->setup.dp_gui_master_cntl_c &= ~R128_GMC_BRUSH_NONE; + FLUSH_BATCH( rmesa ); + rmesa->setup.dp_gui_master_cntl_c &= ~R128_GMC_BRUSH_NONE; if ( state ) { - r128ctx->setup.dp_gui_master_cntl_c |= + rmesa->setup.dp_gui_master_cntl_c |= R128_GMC_BRUSH_32x32_MONO_FG_LA; } else { - r128ctx->setup.dp_gui_master_cntl_c |= + rmesa->setup.dp_gui_master_cntl_c |= R128_GMC_BRUSH_SOLID_COLOR; } - r128ctx->new_state |= R128_NEW_CONTEXT; - r128ctx->dirty |= R128_UPLOAD_CONTEXT; + rmesa->new_state |= R128_NEW_CONTEXT; + rmesa->dirty |= R128_UPLOAD_CONTEXT; } break; @@ -860,51 +838,65 @@ * Blits of any type should always upload the context and masks after * they are done. */ -void r128EmitHwStateLocked( r128ContextPtr r128ctx ) +void r128EmitHwStateLocked( r128ContextPtr rmesa ) { - R128SAREAPrivPtr sarea = r128ctx->sarea; - r128_context_regs_t *regs = &(r128ctx->setup); - r128TexObjPtr t0 = r128ctx->CurrentTexObj[0]; - r128TexObjPtr t1 = r128ctx->CurrentTexObj[1]; + R128SAREAPrivPtr sarea = rmesa->sarea; + r128_context_regs_t *regs = &(rmesa->setup); + r128TexObjPtr t0 = rmesa->CurrentTexObj[0]; + r128TexObjPtr t1 = rmesa->CurrentTexObj[1]; if ( R128_DEBUG & DEBUG_VERBOSE_MSG ) { - r128DDPrintDirty( "r128EmitHwStateLocked", r128ctx->dirty ); + r128DDPrintDirty( "r128EmitHwStateLocked", rmesa->dirty ); } - if ( r128ctx->dirty & R128_UPLOAD_TEX0IMAGES ) { - if ( t0 ) r128UploadTexImages( r128ctx, t0 ); - r128ctx->dirty &= ~R128_UPLOAD_TEX0IMAGES; + if ( rmesa->dirty & R128_UPLOAD_TEX0IMAGES ) { + if ( t0 ) r128UploadTexImages( rmesa, t0 ); + rmesa->dirty &= ~R128_UPLOAD_TEX0IMAGES; } - if ( r128ctx->dirty & R128_UPLOAD_TEX1IMAGES ) { - if ( t1 ) r128UploadTexImages( r128ctx, t1 ); - r128ctx->dirty &= ~R128_UPLOAD_TEX1IMAGES; + if ( rmesa->dirty & R128_UPLOAD_TEX1IMAGES ) { + if ( t1 ) r128UploadTexImages( rmesa, t1 ); + rmesa->dirty &= ~R128_UPLOAD_TEX1IMAGES; } - if ( r128ctx->dirty & (R128_UPLOAD_CONTEXT | - R128_UPLOAD_SETUP | - R128_UPLOAD_MASKS | - R128_UPLOAD_WINDOW | - R128_UPLOAD_CORE | - R128_UPLOAD_TEX0) ) { + if ( rmesa->dirty & (R128_UPLOAD_CONTEXT | + R128_UPLOAD_SETUP | + R128_UPLOAD_MASKS | + R128_UPLOAD_WINDOW | + R128_UPLOAD_CORE | + R128_UPLOAD_TEX0) ) { memcpy( &sarea->ContextState, regs, sizeof(sarea->ContextState) ); } - if ( (r128ctx->dirty & R128_UPLOAD_TEX0) && t0 ) { - memcpy( &sarea->TexState[0], &t0->setup, sizeof(sarea->TexState[0]) ); - } + if ( (rmesa->dirty & R128_UPLOAD_TEX0) && t0 ) { + r128_texture_regs_t *tex = &sarea->TexState[0]; - if ( (r128ctx->dirty & R128_UPLOAD_TEX1) && t1 ) { - memcpy( &sarea->TexState[1], &t1->setup, sizeof(sarea->TexState[1]) ); + tex->tex_cntl = t0->setup.tex_cntl; + tex->tex_combine_cntl = rmesa->tex_combine[0]; + tex->tex_size_pitch = t0->setup.tex_size_pitch; + memcpy( &tex->tex_offset[0], &t0->setup.tex_offset[0], + sizeof(tex->tex_offset ) ); + tex->tex_border_color = t0->setup.tex_border_color; + } + + if ( (rmesa->dirty & R128_UPLOAD_TEX1) && t1 ) { + r128_texture_regs_t *tex = &sarea->TexState[1]; + + tex->tex_cntl = t1->setup.tex_cntl; + tex->tex_combine_cntl = rmesa->tex_combine[1]; + tex->tex_size_pitch = t1->setup.tex_size_pitch; + memcpy( &tex->tex_offset[0], &t1->setup.tex_offset[0], + sizeof(tex->tex_offset ) ); + tex->tex_border_color = t1->setup.tex_border_color; } - sarea->vertsize = r128ctx->vertsize; - sarea->vc_format = r128ctx->vc_format; + sarea->vertsize = rmesa->vertsize; + sarea->vc_format = rmesa->vc_format; /* Turn off the texture cache flushing */ - r128ctx->setup.tex_cntl_c &= ~R128_TEX_CACHE_FLUSH; + rmesa->setup.tex_cntl_c &= ~R128_TEX_CACHE_FLUSH; - sarea->dirty |= r128ctx->dirty; - r128ctx->dirty &= R128_UPLOAD_CLIPRECTS; + sarea->dirty |= rmesa->dirty; + rmesa->dirty &= R128_UPLOAD_CLIPRECTS; } static void r128DDPrintState( const char *msg, GLuint flags ) @@ -924,17 +916,16 @@ (flags & R128_NEW_WINDOW) ? "window, " : "" ); } -/* Update the hardware state */ void r128DDUpdateHWState( GLcontext *ctx ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); - int new_state = r128ctx->new_state; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + int new_state = rmesa->new_state; if ( new_state ) { - FLUSH_BATCH( r128ctx ); + FLUSH_BATCH( rmesa ); - r128ctx->new_state = 0; + rmesa->new_state = 0; if ( R128_DEBUG & DEBUG_VERBOSE_MSG ) r128DDPrintState( "r128UpdateHwState", new_state ); @@ -959,9 +950,6 @@ if ( new_state & R128_NEW_MASKS ) r128UpdateMasks( ctx ); - if ( new_state & R128_NEW_RENDER ) - r128UpdateRenderAttrib( ctx ); - if ( new_state & R128_NEW_WINDOW ) r128UpdateWindow( ctx ); @@ -980,8 +968,8 @@ */ static void r128DDReducedPrimitiveChange( GLcontext *ctx, GLenum prim ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); - CARD32 f = r128ctx->setup.pm4_vc_fpu_setup; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + GLuint f = rmesa->setup.pm4_vc_fpu_setup; f |= R128_BACKFACE_SOLID | R128_FRONTFACE_SOLID; @@ -1000,14 +988,14 @@ } } - if ( r128ctx->setup.pm4_vc_fpu_setup != f ) { - FLUSH_BATCH( r128ctx ); - r128ctx->setup.pm4_vc_fpu_setup = f; + if ( rmesa->setup.pm4_vc_fpu_setup != f ) { + FLUSH_BATCH( rmesa ); + rmesa->setup.pm4_vc_fpu_setup = f; /* NOTE: Only upload the setup state, everything else has been * uploaded by the usual means already. */ - r128ctx->dirty |= R128_UPLOAD_SETUP; + rmesa->dirty |= R128_UPLOAD_SETUP; } } @@ -1020,7 +1008,7 @@ void r128DDUpdateState( GLcontext *ctx ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); if ( ctx->NewState & INTERESTED ) { r128DDChooseRenderState( ctx ); @@ -1030,188 +1018,184 @@ /* Need to do this here to detect texture fallbacks before * setting triangle functions. */ - if ( r128ctx->new_state & R128_NEW_TEXTURE ) { + if ( rmesa->new_state & R128_NEW_TEXTURE ) { r128DDUpdateHWState( ctx ); } - if ( !r128ctx->Fallback ) { + if ( !rmesa->Fallback ) { ctx->IndirectTriangles &= ~DD_SW_RASTERIZE; - ctx->IndirectTriangles |= r128ctx->IndirectTriangles; + ctx->IndirectTriangles |= rmesa->IndirectTriangles; - ctx->Driver.PointsFunc = r128ctx->PointsFunc; - ctx->Driver.LineFunc = r128ctx->LineFunc; - ctx->Driver.TriangleFunc = r128ctx->TriangleFunc; - ctx->Driver.QuadFunc = r128ctx->QuadFunc; + ctx->Driver.PointsFunc = rmesa->PointsFunc; + ctx->Driver.LineFunc = rmesa->LineFunc; + ctx->Driver.TriangleFunc = rmesa->TriangleFunc; + ctx->Driver.QuadFunc = rmesa->QuadFunc; } } -/* Initialize the context's hardware state */ -void r128DDInitState( r128ContextPtr r128ctx ) +/* Initialize the context's hardware state. + */ +void r128DDInitState( r128ContextPtr rmesa ) { int dst_bpp, depth_bpp; - CARD32 bias; - switch ( r128ctx->r128Screen->bpp ) { - case 16: dst_bpp = R128_GMC_DST_16BPP; break; - case 32: dst_bpp = R128_GMC_DST_32BPP; break; + switch ( rmesa->r128Screen->cpp ) { + case 2: + dst_bpp = R128_GMC_DST_16BPP; + break; + case 4: + dst_bpp = R128_GMC_DST_32BPP; + break; default: - fprintf( stderr, "Error: Unsupported pixel depth %d... exiting\n", - r128ctx->r128Screen->bpp ); + fprintf( stderr, "Error: Unsupported pixel depth... exiting\n" ); exit( -1 ); } + + rmesa->ClearColor = 0x00000000; - switch ( r128ctx->DepthSize ) { + switch ( rmesa->glCtx->Visual->DepthBits ) { case 16: - r128ctx->ClearDepth = 0x0000ffff; + rmesa->ClearDepth = 0x0000ffff; + rmesa->DepthMask = 0xffffffff; depth_bpp = R128_Z_PIX_WIDTH_16; - r128ctx->depth_scale = 1.0 / 65536.0; + rmesa->depth_scale = 1.0 / (GLfloat)0xffff; break; case 24: - r128ctx->ClearDepth = 0x00ffffff; + rmesa->ClearDepth = 0x00ffffff; + rmesa->DepthMask = 0x00ffffff; depth_bpp = R128_Z_PIX_WIDTH_24; - r128ctx->depth_scale = 1.0 / 16777216.0; - break; - case 32: - r128ctx->ClearDepth = 0xffffffff; - depth_bpp = R128_Z_PIX_WIDTH_32; - r128ctx->depth_scale = 1.0 / 4294967296.0; + rmesa->depth_scale = 1.0 / (GLfloat)0xffffff; break; default: fprintf( stderr, "Error: Unsupported depth %d... exiting\n", - r128ctx->DepthSize ); + rmesa->glCtx->Visual->DepthBits ); exit( -1 ); } - r128ctx->ClearColor = 0x00000000; - - r128ctx->RenderIndex = R128_FALLBACK_BIT; - r128ctx->PointsFunc = NULL; - r128ctx->LineFunc = NULL; - r128ctx->TriangleFunc = NULL; - r128ctx->QuadFunc = NULL; - - r128ctx->IndirectTriangles = 0; - r128ctx->Fallback = 0; - - if ( r128ctx->glCtx->Visual->DBflag ) { - r128ctx->DrawBuffer = GL_BACK_LEFT; - r128ctx->drawOffset = r128ctx->readOffset = - r128ctx->r128Screen->backOffset; - r128ctx->drawPitch = r128ctx->readPitch = - r128ctx->r128Screen->backPitch; + rmesa->RenderIndex = R128_FALLBACK_BIT; + rmesa->PointsFunc = NULL; + rmesa->LineFunc = NULL; + rmesa->TriangleFunc = NULL; + rmesa->QuadFunc = NULL; + + rmesa->IndirectTriangles = 0; + rmesa->Fallback = 0; + + if ( rmesa->glCtx->Visual->DBflag ) { + rmesa->DrawBuffer = GL_BACK_LEFT; + rmesa->drawOffset = rmesa->readOffset = rmesa->r128Screen->backOffset; + rmesa->drawPitch = rmesa->readPitch = rmesa->r128Screen->backPitch; } else { - r128ctx->DrawBuffer = GL_FRONT_LEFT; - r128ctx->drawOffset = r128ctx->readOffset = - r128ctx->r128Screen->frontOffset; - r128ctx->drawPitch = r128ctx->readPitch = - r128ctx->r128Screen->frontPitch; + rmesa->DrawBuffer = GL_FRONT_LEFT; + rmesa->drawOffset = rmesa->readOffset = rmesa->r128Screen->frontOffset; + rmesa->drawPitch = rmesa->readPitch = rmesa->r128Screen->frontPitch; } /* Harware state: */ - r128ctx->setup.dst_pitch_offset_c = (((r128ctx->drawPitch/8) << 21) | - (r128ctx->drawOffset >> 5)); + rmesa->setup.dst_pitch_offset_c = (((rmesa->drawPitch/8) << 21) | + (rmesa->drawOffset >> 5)); - r128ctx->setup.dp_gui_master_cntl_c = (R128_GMC_DST_PITCH_OFFSET_CNTL | - R128_GMC_DST_CLIPPING | - R128_GMC_BRUSH_SOLID_COLOR | - dst_bpp | - R128_GMC_SRC_DATATYPE_COLOR | - R128_GMC_BYTE_MSB_TO_LSB | - R128_GMC_CONVERSION_TEMP_6500 | - R128_ROP3_S | - R128_DP_SRC_SOURCE_MEMORY | - R128_GMC_3D_FCN_EN | - R128_GMC_CLR_CMP_CNTL_DIS | - R128_GMC_AUX_CLIP_DIS | - R128_GMC_WR_MSK_DIS); - - r128ctx->setup.sc_top_left_c = 0x00000000; - r128ctx->setup.sc_bottom_right_c = 0x1fff1fff; - - r128ctx->setup.z_offset_c = r128ctx->r128Screen->depthOffset; - r128ctx->setup.z_pitch_c = ((r128ctx->r128Screen->depthPitch >> 3) | - R128_Z_TILE); - - r128ctx->setup.z_sten_cntl_c = (depth_bpp | - R128_Z_TEST_LESS | - R128_STENCIL_TEST_ALWAYS | - R128_STENCIL_S_FAIL_KEEP | - R128_STENCIL_ZPASS_KEEP | - R128_STENCIL_ZFAIL_KEEP); - - bias = r128ctx->lod_bias & 0xff; - r128ctx->setup.tex_cntl_c = (R128_Z_WRITE_ENABLE | - R128_SHADE_ENABLE | - R128_DITHER_ENABLE | - R128_ALPHA_IN_TEX_COMPLETE_A | - R128_LIGHT_DIS | - R128_ALPHA_LIGHT_DIS | - R128_TEX_CACHE_FLUSH | - (bias << R128_LOD_BIAS_SHIFT)); - - r128ctx->setup.misc_3d_state_cntl_reg = (R128_MISC_SCALE_3D_TEXMAP_SHADE | - R128_MISC_SCALE_PIX_REPLICATE | - R128_ALPHA_COMB_ADD_CLAMP | - R128_FOG_VERTEX | - R128_ALPHA_BLEND_SRC_ONE | - R128_ALPHA_BLEND_DST_ZERO | - R128_ALPHA_TEST_ALWAYS); - - r128ctx->setup.texture_clr_cmp_clr_c = 0x00000000; - r128ctx->setup.texture_clr_cmp_msk_c = 0xffffffff; - - r128ctx->setup.fog_color_c = 0x00000000; - - r128ctx->setup.pm4_vc_fpu_setup = (R128_FRONT_DIR_CCW | - R128_BACKFACE_SOLID | - R128_FRONTFACE_SOLID | - R128_FPU_COLOR_GOURAUD | - R128_FPU_SUB_PIX_4BITS | - R128_FPU_MODE_3D | - R128_TRAP_BITS_DISABLE | - R128_XFACTOR_2 | - R128_YFACTOR_2 | - R128_FLAT_SHADE_VERTEX_OGL | - R128_FPU_ROUND_TRUNCATE | - R128_WM_SEL_8DW); - - r128ctx->setup.setup_cntl = (R128_COLOR_GOURAUD | - R128_PRIM_TYPE_TRI | - R128_TEXTURE_ST_MULT_W | - R128_STARTING_VERTEX_1 | - R128_ENDING_VERTEX_3 | - R128_SU_POLY_LINE_NOT_LAST | - R128_SUB_PIX_4BITS); - - r128ctx->setup.tex_size_pitch_c = 0x00000000; - r128ctx->setup.constant_color_c = 0x00ffffff; - - r128ctx->setup.dp_write_mask = 0xffffffff; - r128ctx->setup.sten_ref_mask_c = 0xffff0000; - r128ctx->setup.plane_3d_mask_c = 0xffffffff; - - r128ctx->setup.window_xy_offset = 0x00000000; - - r128ctx->setup.scale_3d_cntl = (R128_SCALE_DITHER_TABLE | - R128_TEX_CACHE_SIZE_FULL | - R128_DITHER_INIT_RESET | - R128_SCALE_3D_TEXMAP_SHADE | - R128_SCALE_PIX_REPLICATE | - R128_ALPHA_COMB_ADD_CLAMP | - R128_FOG_VERTEX | - R128_ALPHA_BLEND_SRC_ONE | - R128_ALPHA_BLEND_DST_ZERO | - R128_ALPHA_TEST_ALWAYS | - R128_COMPOSITE_SHADOW_CMP_EQUAL | - R128_TEX_MAP_ALPHA_IN_TEXTURE | - R128_TEX_CACHE_LINE_SIZE_4QW); + rmesa->setup.dp_gui_master_cntl_c = (R128_GMC_DST_PITCH_OFFSET_CNTL | + R128_GMC_DST_CLIPPING | + R128_GMC_BRUSH_SOLID_COLOR | + dst_bpp | + R128_GMC_SRC_DATATYPE_COLOR | + R128_GMC_BYTE_MSB_TO_LSB | + R128_GMC_CONVERSION_TEMP_6500 | + R128_ROP3_S | + R128_DP_SRC_SOURCE_MEMORY | + R128_GMC_3D_FCN_EN | + R128_GMC_CLR_CMP_CNTL_DIS | + R128_GMC_AUX_CLIP_DIS | + R128_GMC_WR_MSK_DIS); + + rmesa->setup.sc_top_left_c = 0x00000000; + rmesa->setup.sc_bottom_right_c = 0x1fff1fff; + + rmesa->setup.z_offset_c = rmesa->r128Screen->depthOffset; + rmesa->setup.z_pitch_c = ((rmesa->r128Screen->depthPitch >> 3) | + R128_Z_TILE); + + rmesa->setup.z_sten_cntl_c = (depth_bpp | + R128_Z_TEST_LESS | + R128_STENCIL_TEST_ALWAYS | + R128_STENCIL_S_FAIL_KEEP | + R128_STENCIL_ZPASS_KEEP | + R128_STENCIL_ZFAIL_KEEP); + + rmesa->setup.tex_cntl_c = (R128_Z_WRITE_ENABLE | + R128_SHADE_ENABLE | + R128_DITHER_ENABLE | + R128_ALPHA_IN_TEX_COMPLETE_A | + R128_LIGHT_DIS | + R128_ALPHA_LIGHT_DIS | + R128_TEX_CACHE_FLUSH | + (0x3f << R128_LOD_BIAS_SHIFT)); + + rmesa->setup.misc_3d_state_cntl_reg = (R128_MISC_SCALE_3D_TEXMAP_SHADE | + R128_MISC_SCALE_PIX_REPLICATE | + R128_ALPHA_COMB_ADD_CLAMP | + R128_FOG_VERTEX | + R128_ALPHA_BLEND_SRC_ONE | + R128_ALPHA_BLEND_DST_ZERO | + R128_ALPHA_TEST_ALWAYS); + + rmesa->setup.texture_clr_cmp_clr_c = 0x00000000; + rmesa->setup.texture_clr_cmp_msk_c = 0xffffffff; + + rmesa->setup.fog_color_c = 0x00000000; + + rmesa->setup.pm4_vc_fpu_setup = (R128_FRONT_DIR_CCW | + R128_BACKFACE_SOLID | + R128_FRONTFACE_SOLID | + R128_FPU_COLOR_GOURAUD | + R128_FPU_SUB_PIX_4BITS | + R128_FPU_MODE_3D | + R128_TRAP_BITS_DISABLE | + R128_XFACTOR_2 | + R128_YFACTOR_2 | + R128_FLAT_SHADE_VERTEX_OGL | + R128_FPU_ROUND_TRUNCATE | + R128_WM_SEL_8DW); + + rmesa->setup.setup_cntl = (R128_COLOR_GOURAUD | + R128_PRIM_TYPE_TRI | + R128_TEXTURE_ST_MULT_W | + R128_STARTING_VERTEX_1 | + R128_ENDING_VERTEX_3 | + R128_SU_POLY_LINE_NOT_LAST | + R128_SUB_PIX_4BITS); + + rmesa->setup.tex_size_pitch_c = 0x00000000; + rmesa->setup.constant_color_c = 0x00ffffff; + + rmesa->setup.dp_write_mask = 0xffffffff; + rmesa->setup.sten_ref_mask_c = 0xffff0000; + rmesa->setup.plane_3d_mask_c = 0xffffffff; + + rmesa->setup.window_xy_offset = 0x00000000; + + rmesa->setup.scale_3d_cntl = (R128_SCALE_DITHER_TABLE | + R128_TEX_CACHE_SIZE_FULL | + R128_DITHER_INIT_RESET | + R128_SCALE_3D_TEXMAP_SHADE | + R128_SCALE_PIX_REPLICATE | + R128_ALPHA_COMB_ADD_CLAMP | + R128_FOG_VERTEX | + R128_ALPHA_BLEND_SRC_ONE | + R128_ALPHA_BLEND_DST_ZERO | + R128_ALPHA_TEST_ALWAYS | + R128_COMPOSITE_SHADOW_CMP_EQUAL | + R128_TEX_MAP_ALPHA_IN_TEXTURE | + R128_TEX_CACHE_LINE_SIZE_4QW); - r128ctx->new_state = R128_NEW_ALL; + rmesa->new_state = R128_NEW_ALL; } -/* Initialize the driver's state functions */ +/* Initialize the driver's state functions. + */ void r128DDInitStateFuncs( GLcontext *ctx ) { ctx->Driver.UpdateState = r128DDUpdateState; Index: xc/lib/GL/mesa/src/drv/r128/r128_state.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_state.h:1.2 xc/lib/GL/mesa/src/drv/r128/r128_state.h:1.3 --- xc/lib/GL/mesa/src/drv/r128/r128_state.h:1.2 Mon Dec 4 14:21:47 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_state.h Sun Jan 7 20:07:21 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_state.h,v 1.2 2000/12/04 19:21:47 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_state.h,v 1.3 2001/01/08 01:07:21 martin Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -28,29 +28,27 @@ /* * Authors: - * Kevin E. Martin * Gareth Hughes + * Kevin E. Martin * */ -#ifndef _R128_STATE_H_ -#define _R128_STATE_H_ +#ifndef __R128_STATE_H__ +#define __R128_STATE_H__ #ifdef GLX_DIRECT_RENDERING #include "r128_context.h" -extern void r128DDInitState( r128ContextPtr r128ctx ); +extern void r128DDInitState( r128ContextPtr rmesa ); extern void r128DDInitStateFuncs( GLcontext *ctx ); extern void r128DDUpdateState( GLcontext *ctx ); extern void r128DDUpdateHWState( GLcontext *ctx ); extern void r128UpdateWindow( GLcontext *ctx ); -extern void r128SetClipRects( r128ContextPtr r128ctx, - XF86DRIClipRectPtr pc, int nc ); -extern void r128EmitHwStateLocked( r128ContextPtr r128ctx ); +extern void r128EmitHwStateLocked( r128ContextPtr rmesa ); +#endif #endif -#endif /* _R128_STATE_H_ */ Index: xc/lib/GL/mesa/src/drv/r128/r128_tex.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_tex.c:1.6 xc/lib/GL/mesa/src/drv/r128/r128_tex.c:1.9 --- xc/lib/GL/mesa/src/drv/r128/r128_tex.c:1.6 Mon Dec 4 14:21:47 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_tex.c Tue Apr 10 12:07:52 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tex.c,v 1.6 2000/12/04 19:21:47 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tex.c,v 1.9 2001/04/10 16:07:52 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -28,8 +28,9 @@ /* * Authors: - * Kevin E. Martin * Gareth Hughes + * Kevin E. Martin + * Michel Dänzer * */ @@ -44,14 +45,77 @@ #include "enums.h" #include "mem.h" +#define TEX_0 1 +#define TEX_1 2 -static void r128SetTexWrap(r128TexObjPtr t, GLenum srwap, GLenum twrap); -static void r128SetTexFilter(r128TexObjPtr t, GLenum minf, GLenum magf); -static void r128SetTexBorderColor(r128TexObjPtr t, GLubyte c[4]); -/* Allocate and initialize hardware state associated with texture `t' */ -/* NOTE: This function is only called while holding the hardware lock */ -static r128TexObjPtr r128CreateTexObj( r128ContextPtr r128ctx, +static void r128SetTexWrap( r128TexObjPtr t, GLenum swrap, GLenum twrap ) +{ + t->setup.tex_cntl &= ~(R128_TEX_CLAMP_S_MASK | R128_TEX_CLAMP_T_MASK); + + switch ( swrap ) { + case GL_CLAMP: + t->setup.tex_cntl |= R128_TEX_CLAMP_S_CLAMP; + break; + case GL_REPEAT: + t->setup.tex_cntl |= R128_TEX_CLAMP_S_WRAP; + break; + } + + switch ( twrap ) { + case GL_CLAMP: + t->setup.tex_cntl |= R128_TEX_CLAMP_T_CLAMP; + break; + case GL_REPEAT: + t->setup.tex_cntl |= R128_TEX_CLAMP_T_WRAP; + break; + } +} + +static void r128SetTexFilter( r128TexObjPtr t, GLenum minf, GLenum magf ) +{ + t->setup.tex_cntl &= ~(R128_MIN_BLEND_MASK | R128_MAG_BLEND_MASK); + + switch ( minf ) { + case GL_NEAREST: + t->setup.tex_cntl |= R128_MIN_BLEND_NEAREST; + break; + case GL_LINEAR: + t->setup.tex_cntl |= R128_MIN_BLEND_LINEAR; + break; + case GL_NEAREST_MIPMAP_NEAREST: + t->setup.tex_cntl |= R128_MIN_BLEND_MIPNEAREST; + break; + case GL_LINEAR_MIPMAP_NEAREST: + t->setup.tex_cntl |= R128_MIN_BLEND_LINEARMIPNEAREST; + break; + case GL_NEAREST_MIPMAP_LINEAR: + t->setup.tex_cntl |= R128_MIN_BLEND_MIPLINEAR; + break; + case GL_LINEAR_MIPMAP_LINEAR: + t->setup.tex_cntl |= R128_MIN_BLEND_LINEARMIPLINEAR; + break; + } + + switch ( magf ) { + case GL_NEAREST: + t->setup.tex_cntl |= R128_MAG_BLEND_NEAREST; + break; + case GL_LINEAR: + t->setup.tex_cntl |= R128_MAG_BLEND_LINEAR; + break; + } +} + +static void r128SetTexBorderColor( r128TexObjPtr t, GLubyte c[4] ) +{ + t->setup.tex_border_color = r128PackColor( 4, c[0], c[1], c[2], c[3] ); +} + + +/* Allocate and initialize hardware state associated with texture `t'. + */ +static r128TexObjPtr r128CreateTexObj( r128ContextPtr rmesa, struct gl_texture_object *tObj ) { r128TexObjPtr t; @@ -64,7 +128,7 @@ if ( !image ) return NULL; - t = (r128TexObjPtr)CALLOC( sizeof(*t) ); + t = (r128TexObjPtr) CALLOC( sizeof(*t) ); if ( !t ) return NULL; @@ -75,8 +139,7 @@ case GL_RGBA: case GL_ALPHA: case GL_LUMINANCE_ALPHA: - case GL_INTENSITY: - if ( r128ctx->r128Screen->bpp == 32 ) { + if ( rmesa->r128Screen->cpp == 4 ) { t->texelBytes = 4; t->textureFormat = R128_DATATYPE_ARGB8888; } else { @@ -86,7 +149,7 @@ break; case GL_RGB: - if ( r128ctx->r128Screen->bpp == 32 ) { + if ( rmesa->r128Screen->cpp == 4 ) { t->texelBytes = 4; t->textureFormat = R128_DATATYPE_ARGB8888; } else { @@ -96,14 +159,9 @@ break; case GL_LUMINANCE: - if ( r128ctx->r128Screen->bpp == 32 ) { - t->texelBytes = 4; - t->textureFormat = R128_DATATYPE_ARGB8888; - } else { - t->texelBytes = 2; - /* Use this to get true greys */ - t->textureFormat = R128_DATATYPE_ARGB1555; - } + case GL_INTENSITY: + t->texelBytes = 1; + t->textureFormat = R128_DATATYPE_RGB8; break; case GL_COLOR_INDEX: @@ -176,7 +234,7 @@ (log2Height << R128_TEX_HEIGHT_SHIFT) | (log2MinSize << R128_TEX_MIN_SIZE_SHIFT)); - for ( i = 0 ; i < R128_TEX_MAXLEVELS ; i++ ) { + for ( i = 0 ; i < R128_MAX_TEXTURE_LEVELS ; i++ ) { t->setup.tex_offset[i] = 0x00000000; } t->setup.tex_border_color = 0x00000000; @@ -196,12 +254,13 @@ return t; } -/* Destroy hardware state associated with texture `t' */ -void r128DestroyTexObj( r128ContextPtr r128ctx, r128TexObjPtr t ) +/* Destroy hardware state associated with texture `t'. + */ +void r128DestroyTexObj( r128ContextPtr rmesa, r128TexObjPtr t ) { #if ENABLE_PERF_BOXES /* Bump the performace counter */ - r128ctx->c_textureSwaps++; + rmesa->c_textureSwaps++; #endif if ( !t ) return; @@ -212,19 +271,21 @@ if ( t->tObj ) t->tObj->DriverData = NULL; - if ( t->bound ) - r128ctx->CurrentTexObj[t->bound-1] = NULL; + + if ( t->bound & TEX_0 ) rmesa->CurrentTexObj[0] = NULL; + if ( t->bound & TEX_1 ) rmesa->CurrentTexObj[1] = NULL; remove_from_list( t ); FREE( t ); } -/* Keep track of swapped out texture objects */ -static void r128SwapOutTexObj( r128ContextPtr r128ctx, r128TexObjPtr t ) +/* Keep track of swapped out texture objects. + */ +static void r128SwapOutTexObj( r128ContextPtr rmesa, r128TexObjPtr t ) { #if ENABLE_PERF_BOXES /* Bump the performace counter */ - r128ctx->c_textureSwaps++; + rmesa->c_textureSwaps++; #endif if ( t->memBlock ) { mmFreeMem( t->memBlock ); @@ -232,18 +293,19 @@ } t->dirty_images = ~0; - move_to_tail( &r128ctx->SwappedOut, t ); + move_to_tail( &rmesa->SwappedOut, t ); } -/* Print out debugging information about texture LRU */ -void r128PrintLocalLRU( r128ContextPtr r128ctx, int heap ) +/* Print out debugging information about texture LRU. + */ +void r128PrintLocalLRU( r128ContextPtr rmesa, int heap ) { r128TexObjPtr t; - int sz = 1 << (r128ctx->r128Screen->log2TexGran[heap]); + int sz = 1 << (rmesa->r128Screen->logTexGranularity[heap]); fprintf( stderr, "\nLocal LRU, heap %d:\n", heap ); - foreach( t, &r128ctx->TexObjList[heap] ) { + foreach ( t, &rmesa->TexObjList[heap] ) { if ( !t->tObj ) { fprintf( stderr, "Placeholder %d at 0x%x sz 0x%x\n", t->memBlock->ofs / sz, @@ -260,9 +322,9 @@ fprintf( stderr, "\n" ); } -void r128PrintGlobalLRU( r128ContextPtr r128ctx, int heap ) +void r128PrintGlobalLRU( r128ContextPtr rmesa, int heap ) { - r128_tex_region_t *list = r128ctx->sarea->texList[heap]; + r128_tex_region_t *list = rmesa->sarea->texList[heap]; int i, j; fprintf( stderr, "\nGlobal LRU, heap %d list %p:\n", heap, list ); @@ -285,12 +347,12 @@ fprintf( stderr, "\n" ); } -/* Reset the global texture LRU */ -/* NOTE: This function is only called while holding the hardware lock */ -static void r128ResetGlobalLRU( r128ContextPtr r128ctx, int heap ) +/* Reset the global texture LRU. + */ +static void r128ResetGlobalLRU( r128ContextPtr rmesa, int heap ) { - r128_tex_region_t *list = r128ctx->sarea->texList[heap]; - int sz = 1 << r128ctx->r128Screen->log2TexGran[heap]; + r128_tex_region_t *list = rmesa->sarea->texList[heap]; + int sz = 1 << rmesa->r128Screen->logTexGranularity[heap]; int i; /* (Re)initialize the global circular LRU list. The last element in @@ -298,7 +360,7 @@ * the end of the array allows it to be addressed rationally when * looking up objects at a particular location in texture memory. */ - for ( i = 0 ; (i+1) * sz <= r128ctx->r128Screen->texSize[heap] ; i++ ) { + for ( i = 0 ; (i+1) * sz <= rmesa->r128Screen->texSize[heap] ; i++ ) { list[i].prev = i-1; list[i].next = i+1; list[i].age = 0; @@ -310,21 +372,21 @@ list[i].next = R128_NR_TEX_REGIONS; list[R128_NR_TEX_REGIONS].prev = i; list[R128_NR_TEX_REGIONS].next = 0; - r128ctx->sarea->texAge[heap] = 0; + rmesa->sarea->texAge[heap] = 0; } -/* Update the local and glock texture LRUs */ -/* NOTE: This function is only called while holding the hardware lock */ -static void r128UpdateTexLRU( r128ContextPtr r128ctx, r128TexObjPtr t ) +/* Update the local and glock texture LRUs. + */ +static void r128UpdateTexLRU( r128ContextPtr rmesa, r128TexObjPtr t ) { int heap = t->heap; - r128_tex_region_t *list = r128ctx->sarea->texList[heap]; - int log2sz = r128ctx->r128Screen->log2TexGran[heap]; + r128_tex_region_t *list = rmesa->sarea->texList[heap]; + int log2sz = rmesa->r128Screen->logTexGranularity[heap]; int start = t->memBlock->ofs >> log2sz; int end = (t->memBlock->ofs + t->memBlock->size - 1) >> log2sz; int i; - r128ctx->lastTexAge[heap] = ++r128ctx->sarea->texAge[heap]; + rmesa->lastTexAge[heap] = ++rmesa->sarea->texAge[heap]; if ( !t->memBlock ) { fprintf( stderr, "no memblock\n\n" ); @@ -332,12 +394,12 @@ } /* Update our local LRU */ - move_to_head( &r128ctx->TexObjList[heap], t ); + move_to_head( &rmesa->TexObjList[heap], t ); /* Update the global LRU */ for ( i = start ; i <= end ; i++ ) { list[i].in_use = 1; - list[i].age = r128ctx->lastTexAge[heap]; + list[i].age = rmesa->lastTexAge[heap]; /* remove_from_list(i) */ list[(CARD32)list[i].next].prev = list[i].prev; @@ -351,23 +413,23 @@ } if ( 0 ) { - r128PrintGlobalLRU( r128ctx, t->heap ); - r128PrintLocalLRU( r128ctx, t->heap ); + r128PrintGlobalLRU( rmesa, t->heap ); + r128PrintLocalLRU( rmesa, t->heap ); } } /* Update our notion of what textures have been changed since we last - held the lock. This pertains to both our local textures and the - textures belonging to other clients. Keep track of other client's - textures by pushing a placeholder texture onto the LRU list -- these - are denoted by (tObj == NULL). */ -/* NOTE: This function is only called while holding the hardware lock */ -static void r128TexturesGone( r128ContextPtr r128ctx, int heap, + * held the lock. This pertains to both our local textures and the + * textures belonging to other clients. Keep track of other client's + * textures by pushing a placeholder texture onto the LRU list -- these + * are denoted by (tObj == NULL). + */ +static void r128TexturesGone( r128ContextPtr rmesa, int heap, int offset, int size, int in_use ) { r128TexObjPtr t, tmp; - foreach_s ( t, tmp, &r128ctx->TexObjList[heap] ) { + foreach_s ( t, tmp, &rmesa->TexObjList[heap] ) { if ( t->memBlock->ofs >= offset + size || t->memBlock->ofs + t->memBlock->size <= offset ) continue; @@ -376,37 +438,38 @@ * bound objects, however. */ if ( t->bound ) { - r128SwapOutTexObj( r128ctx, t ); + r128SwapOutTexObj( rmesa, t ); } else { - r128DestroyTexObj( r128ctx, t ); + r128DestroyTexObj( rmesa, t ); } } if ( in_use ) { t = (r128TexObjPtr) CALLOC( sizeof(*t) ); - if (!t) return; + if ( !t ) return; - t->memBlock = mmAllocMem( r128ctx->texHeap[heap], size, 0, offset ); + t->memBlock = mmAllocMem( rmesa->texHeap[heap], size, 0, offset ); if ( !t->memBlock ) { fprintf( stderr, "Couldn't alloc placeholder sz %x ofs %x\n", (int)size, (int)offset ); - mmDumpMemInfo( r128ctx->texHeap[heap] ); + mmDumpMemInfo( rmesa->texHeap[heap] ); return; } - insert_at_head( &r128ctx->TexObjList[heap], t ); + insert_at_head( &rmesa->TexObjList[heap], t ); } } /* Update our client's shared texture state. If another client has - modified a region in which we have textures, then we need to figure - out which of our textures has been removed, and update our global - LRU. */ -void r128AgeTextures( r128ContextPtr r128ctx, int heap ) + * modified a region in which we have textures, then we need to figure + * out which of our textures has been removed, and update our global + * LRU. + */ +void r128AgeTextures( r128ContextPtr rmesa, int heap ) { - R128SAREAPriv *sarea = r128ctx->sarea; + R128SAREAPrivPtr sarea = rmesa->sarea; - if ( sarea->texAge[heap] != r128ctx->lastTexAge[heap] ) { - int sz = 1 << r128ctx->r128Screen->log2TexGran[heap]; + if ( sarea->texAge[heap] != rmesa->lastTexAge[heap] ) { + int sz = 1 << rmesa->r128Screen->logTexGranularity[heap]; int nr = 0; int idx; @@ -418,15 +481,16 @@ idx = sarea->texList[heap][idx].prev, nr++ ) { /* If switching texturing schemes, then the SAREA might not - have been properly cleared, so we need to reset the - global texture LRU. */ - if ( idx * sz > r128ctx->r128Screen->texSize[heap] ) { + * have been properly cleared, so we need to reset the + * global texture LRU. + */ + if ( idx * sz > rmesa->r128Screen->texSize[heap] ) { nr = R128_NR_TEX_REGIONS; break; } - if ( sarea->texList[heap][idx].age > r128ctx->lastTexAge[heap] ) { - r128TexturesGone( r128ctx, heap, idx * sz, sz, + if ( sarea->texList[heap][idx].age > rmesa->lastTexAge[heap] ) { + r128TexturesGone( rmesa, heap, idx * sz, sz, sarea->texList[heap][idx].in_use ); } } @@ -436,24 +500,30 @@ * global texture LRU. */ if ( nr == R128_NR_TEX_REGIONS ) { - r128TexturesGone( r128ctx, heap, 0, - r128ctx->r128Screen->texSize[heap], 0 ); - r128ResetGlobalLRU( r128ctx, heap ); + r128TexturesGone( rmesa, heap, 0, + rmesa->r128Screen->texSize[heap], 0 ); + r128ResetGlobalLRU( rmesa, heap ); } if ( 0 ) { - r128PrintGlobalLRU( r128ctx, heap ); - r128PrintLocalLRU( r128ctx, heap ); + r128PrintGlobalLRU( rmesa, heap ); + r128PrintLocalLRU( rmesa, heap ); } - r128ctx->dirty |= (R128_UPLOAD_CONTEXT | - R128_UPLOAD_TEX0IMAGES | - R128_UPLOAD_TEX1IMAGES); - r128ctx->lastTexAge[heap] = sarea->texAge[heap]; + rmesa->dirty |= (R128_UPLOAD_CONTEXT | + R128_UPLOAD_TEX0IMAGES | + R128_UPLOAD_TEX1IMAGES); + rmesa->lastTexAge[heap] = sarea->texAge[heap]; } } -/* Convert a block of Mesa-formatted texture to an 8bpp hardware format */ + +/* ================================================================ + * Texture image conversions + */ + +/* Convert a block of Mesa-formatted texture to an 8bpp hardware format. + */ static void r128ConvertTexture8bpp( CARD32 *dst, struct gl_texture_image *image, int x, int y, int width, int height, @@ -463,20 +533,6 @@ int i, j; switch ( image->Format ) { - case GL_RGB: - for ( i = 0 ; i < height ; i++ ) { - src = (CARD8 *)image->Data + ((y + i) * pitch + x) * 3; - for ( j = width >> 2 ; j ; j-- ) { - *dst++= ((R128PACKCOLOR332( src[0], src[1], src[2] )) | - (R128PACKCOLOR332( src[3], src[4], src[5] ) << 8) | - (R128PACKCOLOR332( src[6], src[7], src[8] ) << 16) | - (R128PACKCOLOR332( src[9], src[10], src[11] ) << 24)); - src += 12; - } - } - break; - - case GL_ALPHA: case GL_LUMINANCE: case GL_INTENSITY: case GL_COLOR_INDEX: @@ -496,7 +552,8 @@ } } -/* Convert a block of Mesa-formatted texture to a 16bpp hardware format */ +/* Convert a block of Mesa-formatted texture to a 16bpp hardware format. + */ static void r128ConvertTexture16bpp( CARD32 *dst, struct gl_texture_image *image, int x, int y, int width, int height, @@ -512,45 +569,34 @@ switch ( image->Format ) { - case GL_RGB: - for ( i = 0 ; i < height ; i++ ) { - src = (CARD8 *)image->Data + ((y + i) * pitch + x) * 3; - for ( j = width >> 1 ; j ; j-- ) { - *dst++ = ((R128PACKCOLOR565( src[0], src[1], src[2] )) | - (R128PACKCOLOR565( src[3], src[4], src[5] ) << 16)); - src += 6; - } - } - break; - case GL_RGBA: for ( i = 0 ; i < height ; i++ ) { src = (CARD8 *)image->Data + ((y + i) * pitch + x) * 4; for ( j = width >> 1 ; j ; j-- ) { - *dst++ = ((R128PACKCOLOR4444( src[0], src[1], src[2], src[3] )) | - (R128PACKCOLOR4444( src[4], src[5], src[6], src[7] ) << 16)); + *dst++ = R128PACKCOLORS4444( src[0], src[1], src[2], src[3], + src[4], src[5], src[6], src[7] ); src += 8; } } break; - case GL_ALPHA: + case GL_RGB: for ( i = 0 ; i < height ; i++ ) { - src = (CARD8 *)image->Data + ((y + i) * pitch + x); + src = (CARD8 *)image->Data + ((y + i) * pitch + x) * 3; for ( j = width >> 1 ; j ; j-- ) { - *dst++ = ((R128PACKCOLOR4444( 0xff, 0xff, 0xff, src[0] )) | - (R128PACKCOLOR4444( 0xff, 0xff, 0xff, src[1] ) << 16)); - src += 2; + *dst++ = R128PACKCOLORS565( src[0], src[1], src[2], + src[3], src[4], src[5] ); + src += 6; } } break; - case GL_LUMINANCE: + case GL_ALPHA: for ( i = 0 ; i < height ; i++ ) { src = (CARD8 *)image->Data + ((y + i) * pitch + x); for ( j = width >> 1 ; j ; j-- ) { - *dst++ = ((R128PACKCOLOR1555( src[0], src[0], src[0], 0xff )) | - (R128PACKCOLOR1555( src[1], src[1], src[1], 0xff ) << 16)); + *dst++ = R128PACKCOLORS4444( 0xff, 0xff, 0xff, src[0], + 0xff, 0xff, 0xff, src[1] ); src += 2; } } @@ -560,24 +606,13 @@ for ( i = 0 ; i < height ; i++ ) { src = (CARD8 *)image->Data + ((y + i) * pitch + x) * 2; for ( j = width >> 1 ; j ; j-- ) { - *dst++ = ((R128PACKCOLOR4444( src[0], src[0], src[0], src[1] )) | - (R128PACKCOLOR4444( src[2], src[2], src[2], src[3] ) << 16)); + *dst++ = R128PACKCOLORS4444( src[0], src[0], src[0], src[1], + src[2], src[2], src[2], src[3] ); src += 4; } } break; - case GL_INTENSITY: - for ( i = 0 ; i < height ; i++ ) { - src = (CARD8 *)image->Data + ((y + i) * pitch + x); - for ( j = width >> 1 ; j ; j-- ) { - *dst++ = ((R128PACKCOLOR4444( src[0], src[0], src[0], src[0] )) | - (R128PACKCOLOR4444( src[1], src[1], src[1], src[1] ) << 16)); - src += 2; - } - } - break; - default: fprintf( stderr, "%s: unsupported format 0x%x\n", __FUNCTION__, image->Format ); @@ -585,7 +620,8 @@ } } -/* Convert a block of Mesa-formatted texture to a 32bpp hardware format */ +/* Convert a block of Mesa-formatted texture to a 32bpp hardware format. + */ static void r128ConvertTexture32bpp( CARD32 *dst, struct gl_texture_image *image, int x, int y, int width, int height, @@ -595,16 +631,6 @@ int i, j; switch ( image->Format ) { - case GL_RGB: - for ( i = 0 ; i < height ; i++ ) { - src = (CARD8 *)image->Data + ((y + i) * pitch + x) * 3; - for ( j = width ; j ; j-- ) { - *dst++ = R128PACKCOLOR8888( src[0], src[1], src[2], 0xff ); - src += 3; - } - } - break; - case GL_RGBA: for ( i = 0 ; i < height ; i++ ) { src = (CARD8 *)image->Data + ((y + i) * pitch + x) * 4; @@ -615,21 +641,21 @@ } break; - case GL_ALPHA: + case GL_RGB: for ( i = 0 ; i < height ; i++ ) { - src = (CARD8 *)image->Data + ((y + i) * pitch + x); + src = (CARD8 *)image->Data + ((y + i) * pitch + x) * 3; for ( j = width ; j ; j-- ) { - *dst++ = R128PACKCOLOR8888( 0xff, 0xff, 0xff, src[0] ); - src += 1; + *dst++ = R128PACKCOLOR8888( src[0], src[1], src[2], 0xff ); + src += 3; } } break; - case GL_LUMINANCE: + case GL_ALPHA: for ( i = 0 ; i < height ; i++ ) { src = (CARD8 *)image->Data + ((y + i) * pitch + x); for ( j = width ; j ; j-- ) { - *dst++ = R128PACKCOLOR8888( src[0], src[0], src[0], 0xff ); + *dst++ = R128PACKCOLOR8888( 0xff, 0xff, 0xff, src[0] ); src += 1; } } @@ -645,16 +671,6 @@ } break; - case GL_INTENSITY: - for ( i = 0 ; i < height ; i++ ) { - src = (CARD8 *)image->Data + ((y + i) * pitch + x); - for ( j = width ; j ; j-- ) { - *dst++ = R128PACKCOLOR8888( src[0], src[0], src[0], src[0] ); - src += 1; - } - } - break; - default: fprintf( stderr, "%s: unsupported format 0x%x\n", __FUNCTION__, image->Format ); @@ -663,9 +679,9 @@ } /* Upload the texture image associated with texture `t' at level `level' - at the address relative to `start'. */ -/* NOTE: This function is only called while holding the hardware lock */ -static void r128UploadSubImage( r128ContextPtr r128ctx, + * at the address relative to `start'. + */ +static void r128UploadSubImage( r128ContextPtr rmesa, r128TexObjPtr t, int level, int x, int y, int width, int height ) { @@ -680,7 +696,7 @@ int i; /* Ensure we have a valid texture to upload */ - if ( ( level < 0 ) || ( level > R128_TEX_MAXLEVELS ) ) + if ( ( level < 0 ) || ( level > R128_MAX_TEXTURE_LEVELS ) ) return; image = t->tObj->Image[level]; @@ -694,7 +710,7 @@ } #if 1 - /* FIXME: The subimage index calcs are wrong - who changed them? */ + /* FIXME: The subimage index calcs are wrong... */ x = 0; y = 0; width = image->Width; @@ -768,23 +784,17 @@ dwords = width * height / texelsPerDword; offset = t->bufAddr + t->image[level].offset; - /* Fix offset for AGP textures */ - if ( t->heap == R128_AGP_TEX_HEAP ) { - offset += R128_AGP_TEX_OFFSET + r128ctx->r128Screen->agpTexOffset; - } - #if ENABLE_PERF_BOXES /* Bump the performace counter */ - r128ctx->c_textureBytes += (dwords << 2); + rmesa->c_textureBytes += (dwords << 2); #endif - if ( R128_DEBUG & DEBUG_VERBOSE_API ) { fprintf( stderr, "r128UploadSubImage: %d,%d of %d,%d at %d,%d\n", width, height, image->Width, image->Height, x, y ); fprintf( stderr, " blit ofs: 0x%07x pitch: 0x%x dwords: %d " "level: %d format: %x\n", - (int)offset, pitch, dwords, level, format ); + (GLuint)offset, (GLuint)pitch, dwords, level, format ); } /* Subdivide the texture if required */ @@ -803,11 +813,11 @@ if ( R128_DEBUG & DEBUG_VERBOSE_API ) { fprintf( stderr, " blitting: %d,%d at %d,%d - %d dwords\n", - width, height, x, y, dwords ); + width, height, x, y, dwords ); } /* Grab the indirect buffer for the texture blit */ - buffer = r128GetBufferLocked( r128ctx ); + buffer = r128GetBufferLocked( rmesa ); dst = (CARD32 *)((char *)buffer->address + R128_HOSTDATA_BLIT_OFFSET); @@ -827,13 +837,13 @@ break; } - r128FireBlitLocked( r128ctx, buffer, + r128FireBlitLocked( rmesa, buffer, offset, pitch, format, x, y, width, height ); } - r128ctx->new_state |= R128_NEW_CONTEXT; - r128ctx->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_MASKS; + rmesa->new_state |= R128_NEW_CONTEXT; + rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_MASKS; } /* Upload the texture images associated with texture `t'. This might @@ -841,7 +851,7 @@ * make room for these images. */ /* NOTE: This function is only called while holding the hardware lock */ -int r128UploadTexImages( r128ContextPtr r128ctx, r128TexObjPtr t ) +int r128UploadTexImages( r128ContextPtr rmesa, r128TexObjPtr t ) { int i; int minLevel; @@ -850,47 +860,48 @@ if ( R128_DEBUG & DEBUG_VERBOSE_API ) { fprintf( stderr, "%s( %p, %p )\n", - __FUNCTION__, r128ctx->glCtx, t ); + __FUNCTION__, rmesa->glCtx, t ); } if ( !t ) return 0; /* Choose the heap appropriately */ - heap = t->heap = R128_LOCAL_TEX_HEAP; - if ( !r128ctx->r128Screen->IsPCI && - t->totalSize > r128ctx->r128Screen->texSize[heap] ) { - heap = t->heap = R128_AGP_TEX_HEAP; + heap = t->heap = R128_CARD_HEAP; + if ( !rmesa->r128Screen->IsPCI && + t->totalSize > rmesa->r128Screen->texSize[heap] ) { + heap = t->heap = R128_AGP_HEAP; } /* Do we need to eject LRU texture objects? */ if ( !t->memBlock ) { /* Allocate a memory block on a 4k boundary (1<<12 == 4096) */ - t->memBlock = mmAllocMem( r128ctx->texHeap[heap], t->totalSize, 12, 0 ); + t->memBlock = mmAllocMem( rmesa->texHeap[heap], t->totalSize, 12, 0 ); /* Try AGP before kicking anything out of local mem */ - if ( !t->memBlock && heap == R128_LOCAL_TEX_HEAP ) { - t->memBlock = mmAllocMem( r128ctx->texHeap[R128_AGP_TEX_HEAP], + if ( !rmesa->r128Screen->IsPCI && + !t->memBlock && heap == R128_CARD_HEAP ) { + t->memBlock = mmAllocMem( rmesa->texHeap[R128_AGP_HEAP], t->totalSize, 12, 0 ); if ( t->memBlock ) - heap = t->heap = R128_AGP_TEX_HEAP; + heap = t->heap = R128_AGP_HEAP; } /* Kick out textures until the requested texture fits */ while ( !t->memBlock ) { - if ( r128ctx->TexObjList[heap].prev->bound ) { + if ( rmesa->TexObjList[heap].prev->bound ) { fprintf( stderr, "r128UploadTexImages: ran into bound texture\n" ); return -1; } - if ( r128ctx->TexObjList[heap].prev == &r128ctx->TexObjList[heap] ) { - if ( r128ctx->r128Screen->IsPCI ) { + if ( rmesa->TexObjList[heap].prev == &rmesa->TexObjList[heap] ) { + if ( rmesa->r128Screen->IsPCI ) { fprintf( stderr, "r128UploadTexImages: upload texture " "failure on local texture heaps, sz=%d\n", t->totalSize ); return -1; - } else if ( heap == R128_LOCAL_TEX_HEAP ) { - heap = t->heap = R128_AGP_TEX_HEAP; + } else if ( heap == R128_CARD_HEAP ) { + heap = t->heap = R128_AGP_HEAP; continue; } else { fprintf( stderr, "r128UploadTexImages: upload texture " @@ -901,14 +912,14 @@ } } - r128DestroyTexObj( r128ctx, r128ctx->TexObjList[heap].prev ); + r128DestroyTexObj( rmesa, rmesa->TexObjList[heap].prev ); - t->memBlock = mmAllocMem( r128ctx->texHeap[heap], + t->memBlock = mmAllocMem( rmesa->texHeap[heap], t->totalSize, 12, 0 ); } /* Set the base offset of the texture image */ - t->bufAddr = r128ctx->r128Screen->texOffset[heap] + t->memBlock->ofs; + t->bufAddr = rmesa->r128Screen->texOffset[heap] + t->memBlock->ofs; maxLevel = ((t->setup.tex_size_pitch & R128_TEX_SIZE_MASK) >> R128_TEX_SIZE_SHIFT); @@ -917,7 +928,7 @@ /* Set texture offsets */ if ( t->setup.tex_cntl & R128_MIP_MAP_DISABLE ) { - for ( i = 0 ; i < R128_TEX_MAXLEVELS ; i++ ) { + for ( i = 0 ; i < R128_MAX_TEXTURE_LEVELS ; i++ ) { t->setup.tex_offset[i] = t->bufAddr; } } else { @@ -926,22 +937,15 @@ (t->image[maxLevel-i].offset + t->bufAddr); } } - /* Fix AGP texture offsets */ - if ( heap == R128_AGP_TEX_HEAP ) { - for ( i = 0 ; i < R128_TEX_MAXLEVELS ; i++ ) { - t->setup.tex_offset[i] += R128_AGP_TEX_OFFSET + - r128ctx->r128Screen->agpTexOffset; - } - } /* Force loading the new state into the hardware */ switch ( t->bound ) { case 1: - r128ctx->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_TEX0; + rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_TEX0; break; case 2: - r128ctx->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_TEX1; + rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_TEX1; break; default: @@ -950,7 +954,7 @@ } /* Let the world know we've used this memory recently */ - r128UpdateTexLRU( r128ctx, t ); + r128UpdateTexLRU( rmesa, t ); /* Upload any images that are new */ if ( t->dirty_images ) { @@ -961,14 +965,14 @@ for ( i = 0 ; i <= num_levels ; i++ ) { if ( t->dirty_images & (1 << i) ) { - r128UploadSubImage( r128ctx, t, i, 0, 0, + r128UploadSubImage( rmesa, t, i, 0, 0, t->image[i].width, t->image[i].height ); } } - r128ctx->setup.tex_cntl_c |= R128_TEX_CACHE_FLUSH; + rmesa->setup.tex_cntl_c |= R128_TEX_CACHE_FLUSH; - r128ctx->dirty |= R128_UPLOAD_CONTEXT; + rmesa->dirty |= R128_UPLOAD_CONTEXT; } t->dirty_images = 0; @@ -976,47 +980,50 @@ } -/* - * Texture combiners: +/* ================================================================ + * Texture combine functions */ -#define COLOR_COMB_DISABLE (R128_COMB_DIS | \ - R128_COLOR_FACTOR_TEX) -#define COLOR_COMB_COPY_INPUT (R128_COMB_COPY_INP | \ - R128_COLOR_FACTOR_TEX) -#define COLOR_COMB_MODULATE (R128_COMB_MODULATE | \ - R128_COLOR_FACTOR_TEX) -#define COLOR_COMB_MODULATE_NTEX (R128_COMB_MODULATE | \ - R128_COLOR_FACTOR_NTEX) -#define COLOR_COMB_ADD (R128_COMB_ADD | \ - R128_COLOR_FACTOR_TEX) -#define COLOR_COMB_BLEND_TEX (R128_COMB_BLEND_TEXTURE | \ - R128_COLOR_FACTOR_TEX) - -#define ALPHA_COMB_DISABLE (R128_COMB_ALPHA_DIS | \ - R128_ALPHA_FACTOR_TEX_ALPHA) -#define ALPHA_COMB_COPY_INPUT (R128_COMB_ALPHA_COPY_INP | \ - R128_ALPHA_FACTOR_TEX_ALPHA) -#define ALPHA_COMB_MODULATE (R128_COMB_ALPHA_MODULATE | \ - R128_ALPHA_FACTOR_TEX_ALPHA) -#define ALPHA_COMB_MODULATE_NTEX (R128_COMB_ALPHA_MODULATE | \ - R128_ALPHA_FACTOR_NTEX_ALPHA) -#define ALPHA_COMB_ADD (R128_COMB_ADD | \ - R128_ALPHA_FACTOR_TEX_ALPHA) - -#define INPUT_INTERP (R128_INPUT_FACTOR_INT_COLOR | \ - R128_INP_FACTOR_A_INT_ALPHA) -#define INPUT_PREVIOUS (R128_INPUT_FACTOR_PREV_COLOR | \ - R128_INP_FACTOR_A_PREV_ALPHA) +#define COLOR_COMB_DISABLE (R128_COMB_DIS | \ + R128_COLOR_FACTOR_TEX) +#define COLOR_COMB_COPY_INPUT (R128_COMB_COPY_INP | \ + R128_COLOR_FACTOR_TEX) +#define COLOR_COMB_MODULATE (R128_COMB_MODULATE | \ + R128_COLOR_FACTOR_TEX) +#define COLOR_COMB_MODULATE_NTEX (R128_COMB_MODULATE | \ + R128_COLOR_FACTOR_NTEX) +#define COLOR_COMB_ADD (R128_COMB_ADD | \ + R128_COLOR_FACTOR_TEX) +#define COLOR_COMB_BLEND_TEX (R128_COMB_BLEND_TEXTURE | \ + R128_COLOR_FACTOR_TEX) +/* Rage 128 Pro/M3 only! */ +#define COLOR_COMB_BLEND_COLOR (R128_COMB_MODULATE2X | \ + R128_COMB_FCN_MSB | \ + R128_COLOR_FACTOR_CONST_COLOR) + +#define ALPHA_COMB_DISABLE (R128_COMB_ALPHA_DIS | \ + R128_ALPHA_FACTOR_TEX_ALPHA) +#define ALPHA_COMB_COPY_INPUT (R128_COMB_ALPHA_COPY_INP | \ + R128_ALPHA_FACTOR_TEX_ALPHA) +#define ALPHA_COMB_MODULATE (R128_COMB_ALPHA_MODULATE | \ + R128_ALPHA_FACTOR_TEX_ALPHA) +#define ALPHA_COMB_MODULATE_NTEX (R128_COMB_ALPHA_MODULATE | \ + R128_ALPHA_FACTOR_NTEX_ALPHA) +#define ALPHA_COMB_ADD (R128_COMB_ALPHA_ADD | \ + R128_ALPHA_FACTOR_TEX_ALPHA) + +#define INPUT_INTERP (R128_INPUT_FACTOR_INT_COLOR | \ + R128_INP_FACTOR_A_INT_ALPHA) +#define INPUT_PREVIOUS (R128_INPUT_FACTOR_PREV_COLOR | \ + R128_INP_FACTOR_A_PREV_ALPHA) -static void r128UpdateTextureStage( GLcontext *ctx, int unit ) +static void r128UpdateTextureEnv( GLcontext *ctx, int unit ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); - int source = r128ctx->tmu_source[unit]; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + GLint source = rmesa->tmu_source[unit]; struct gl_texture_object *tObj; - r128TexObjPtr t; GLuint enabled; - CARD32 combine; + GLuint combine; if ( R128_DEBUG & DEBUG_VERBOSE_API ) { fprintf( stderr, "%s( %p, %d )\n", @@ -1038,9 +1045,6 @@ ( tObj != ctx->Texture.Unit[source].CurrentD[1] ) ) return; - /* We definately have a valid texture now */ - t = tObj->DriverData; - if ( unit == 0 ) { combine = INPUT_INTERP; } else { @@ -1120,20 +1124,63 @@ break; case GL_BLEND: - /* Catch the cases of GL_BLEND we can't handle (yet, in some cases). + /* Rage 128 Pro and M3 can handle GL_BLEND texturing. */ - if ( r128ctx->blend_flags ) { - r128ctx->Fallback |= R128_FALLBACK_TEXTURE; + if ( !R128_IS_PLAIN( rmesa ) ) { + switch ( tObj->Image[0]->Format ) { + case GL_RGBA: + case GL_LUMINANCE_ALPHA: + combine |= (COLOR_COMB_BLEND_COLOR | /* C = Cf(1-Ct)+CcCt */ + ALPHA_COMB_MODULATE); /* A = AfAt */ + break; + + case GL_RGB: + case GL_LUMINANCE: + combine |= (COLOR_COMB_BLEND_COLOR | /* C = Cf(1-Ct)+CcCt */ + ALPHA_COMB_COPY_INPUT); /* A = Af */ + break; + + case GL_ALPHA: + combine |= (COLOR_COMB_COPY_INPUT | /* C = Cf */ + ALPHA_COMB_MODULATE); /* A = AfAt */ + break; + + case GL_INTENSITY: + /* GH: We could be smarter about this... */ + switch ( rmesa->env_color & 0xff000000 ) { + case 0x00000000: + combine |= (COLOR_COMB_BLEND_COLOR | /* C = Cf(1-It)+CcIt */ + ALPHA_COMB_MODULATE_NTEX); /* A = Af(1-It) */ + default: + combine |= (COLOR_COMB_MODULATE | /* C = fallback */ + ALPHA_COMB_MODULATE); /* A = fallback */ + rmesa->Fallback |= R128_FALLBACK_TEXTURE; + break; + } + break; + + case GL_COLOR_INDEX: + default: + return; + } + break; } + + /* Rage 128 has to fake some cases of GL_BLEND, otherwise fallback + * to software rendering. + */ + if ( rmesa->blend_flags ) { + rmesa->Fallback |= R128_FALLBACK_TEXTURE; + } switch ( tObj->Image[0]->Format ) { case GL_RGBA: case GL_LUMINANCE_ALPHA: - switch ( r128ctx->env_color ) { + switch ( rmesa->env_color & 0x00ffffff ) { case 0x00000000: combine |= (COLOR_COMB_MODULATE_NTEX | /* C = Cf(1-Ct) */ ALPHA_COMB_MODULATE); /* A = AfAt */ break; - case 0xffffffff: + case 0x00ffffff: if ( unit == 0 ) { combine |= (COLOR_COMB_MODULATE_NTEX | /* C = Cf(1-Ct) */ ALPHA_COMB_MODULATE); /* A = AfAt */ @@ -1145,18 +1192,18 @@ default: combine |= (COLOR_COMB_MODULATE | /* C = fallback */ ALPHA_COMB_MODULATE); /* A = fallback */ - r128ctx->Fallback |= R128_FALLBACK_TEXTURE; + rmesa->Fallback |= R128_FALLBACK_TEXTURE; break; } break; case GL_RGB: case GL_LUMINANCE: - switch ( r128ctx->env_color ) { + switch ( rmesa->env_color & 0x00ffffff ) { case 0x00000000: combine |= (COLOR_COMB_MODULATE_NTEX | /* C = Cf(1-Ct) */ ALPHA_COMB_COPY_INPUT); /* A = Af */ break; - case 0xffffffff: + case 0x00ffffff: if ( unit == 0 ) { combine |= (COLOR_COMB_MODULATE_NTEX | /* C = Cf(1-Ct) */ ALPHA_COMB_COPY_INPUT); /* A = Af */ @@ -1168,42 +1215,52 @@ default: combine |= (COLOR_COMB_MODULATE | /* C = fallback */ ALPHA_COMB_COPY_INPUT); /* A = fallback */ - r128ctx->Fallback |= R128_FALLBACK_TEXTURE; + rmesa->Fallback |= R128_FALLBACK_TEXTURE; break; } break; case GL_ALPHA: - combine |= (COLOR_COMB_COPY_INPUT | /* C = Cf */ - ALPHA_COMB_MODULATE); /* A = AfAt */ + if ( unit == 0 ) { + combine |= (COLOR_COMB_COPY_INPUT | /* C = Cf */ + ALPHA_COMB_MODULATE); /* A = AfAt */ + } else { + combine |= (COLOR_COMB_COPY_INPUT | /* C = Cf */ + ALPHA_COMB_COPY_INPUT); /* A = Af */ + } break; case GL_INTENSITY: - switch ( r128ctx->env_color ) { + switch ( rmesa->env_color & 0x00ffffff ) { case 0x00000000: - combine |= (COLOR_COMB_MODULATE_NTEX | /* C = Cf(1-Ct) */ - ALPHA_COMB_MODULATE_NTEX); /* A = Af(1-Ct) */ + combine |= COLOR_COMB_MODULATE_NTEX; /* C = Cf(1-It) */ break; case 0x00ffffff: if ( unit == 0 ) { - combine |= (COLOR_COMB_MODULATE_NTEX | /* C = Cf(1-Ct) */ - ALPHA_COMB_MODULATE_NTEX); /* A = Af(1-Ct) */ + combine |= COLOR_COMB_MODULATE_NTEX; /* C = Cf(1-It) */ } else { - combine |= (COLOR_COMB_ADD | /* C = Cf+Ct */ - ALPHA_COMB_COPY_INPUT); /* A = Af */ + combine |= COLOR_COMB_ADD; /* C = Cf+It */ } + break; + default: + combine |= (COLOR_COMB_MODULATE | /* C = fallback */ + ALPHA_COMB_MODULATE); /* A = fallback */ + rmesa->Fallback |= R128_FALLBACK_TEXTURE; break; - case 0xffffffff: + } + switch ( rmesa->env_color & 0xff000000 ) { + case 0x00000000: + combine |= ALPHA_COMB_MODULATE_NTEX; /* A = Af(1-It) */ + break; + case 0xff000000: if ( unit == 0 ) { - combine |= (COLOR_COMB_MODULATE_NTEX | /* C = Cf(1-Ct) */ - ALPHA_COMB_MODULATE_NTEX); /* A = Af(1-Ct) */ + combine |= ALPHA_COMB_MODULATE_NTEX; /* A = Af(1-It) */ } else { - combine |= (COLOR_COMB_ADD | /* C = Cf+Ct */ - ALPHA_COMB_ADD); /* A = Af+At */ + combine |= ALPHA_COMB_ADD; /* A = Af+It */ } break; default: combine |= (COLOR_COMB_MODULATE | /* C = fallback */ ALPHA_COMB_MODULATE); /* A = fallback */ - r128ctx->Fallback |= R128_FALLBACK_TEXTURE; + rmesa->Fallback |= R128_FALLBACK_TEXTURE; break; } break; @@ -1217,7 +1274,6 @@ switch ( tObj->Image[0]->Format ) { case GL_RGBA: case GL_LUMINANCE_ALPHA: - case GL_INTENSITY: combine |= (COLOR_COMB_ADD | /* C = Cf+Ct */ ALPHA_COMB_MODULATE); /* A = AfAt */ break; @@ -1230,6 +1286,10 @@ combine |= (COLOR_COMB_COPY_INPUT | /* C = Cf */ ALPHA_COMB_MODULATE); /* A = AfAt */ break; + case GL_INTENSITY: + combine |= (COLOR_COMB_ADD | /* C = Cf+Ct */ + ALPHA_COMB_ADD); /* A = Af+At */ + break; case GL_COLOR_INDEX: default: return; @@ -1240,13 +1300,13 @@ return; } - t->setup.tex_combine_cntl = combine; + rmesa->tex_combine[unit] = combine; } static void r128UpdateTextureObject( GLcontext *ctx, int unit ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); - int source = r128ctx->tmu_source[unit]; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + int source = rmesa->tmu_source[unit]; struct gl_texture_object *tObj; r128TexObjPtr t; GLuint enabled; @@ -1256,14 +1316,10 @@ __FUNCTION__, ctx, unit, ctx->Texture.ReallyEnabled ); } - /* Disable all texturing until it is known to be good */ - r128ctx->setup.tex_cntl_c &= ~(R128_TEXMAP_ENABLE | - R128_SEC_TEXMAP_ENABLE); - enabled = (ctx->Texture.ReallyEnabled >> (source * 4)) & TEXTURE0_ANY; if ( enabled != TEXTURE0_2D && enabled != TEXTURE0_1D ) { if ( enabled ) - r128ctx->Fallback |= R128_FALLBACK_TEXTURE; + rmesa->Fallback |= R128_FALLBACK_TEXTURE; return; } @@ -1272,13 +1328,13 @@ */ tObj = ctx->Texture.Unit[source].Current; if ( !tObj || !tObj->Complete ) { - r128ctx->Fallback |= R128_FALLBACK_TEXTURE; + rmesa->Fallback |= R128_FALLBACK_TEXTURE; return; } if ( ( tObj != ctx->Texture.Unit[source].CurrentD[2] ) && ( tObj != ctx->Texture.Unit[source].CurrentD[1] ) ) { - r128ctx->Fallback |= R128_FALLBACK_TEXTURE; + rmesa->Fallback |= R128_FALLBACK_TEXTURE; return; } @@ -1286,13 +1342,13 @@ /* If this is the first time the texture has been used, then create * a new texture object for it. */ - r128CreateTexObj( r128ctx, tObj ); + r128CreateTexObj( rmesa, tObj ); if ( !tObj->DriverData ) { /* Can't create a texture object... */ fprintf( stderr, "%s: texture object creation failed!\n", __FUNCTION__ ); - r128ctx->Fallback |= R128_FALLBACK_TEXTURE; + rmesa->Fallback |= R128_FALLBACK_TEXTURE; return; } } @@ -1301,39 +1357,37 @@ t = tObj->DriverData; /* Force the texture unit state to be loaded into the hardware */ - r128ctx->dirty |= R128_UPLOAD_CONTEXT | (R128_UPLOAD_TEX0 << unit); + rmesa->dirty |= R128_UPLOAD_CONTEXT | (R128_UPLOAD_TEX0 << unit); /* Force any texture images to be loaded into the hardware */ if ( t->dirty_images ) - r128ctx->dirty |= (R128_UPLOAD_TEX0IMAGES << unit); + rmesa->dirty |= (R128_UPLOAD_TEX0IMAGES << unit); /* Bind to the given texture unit */ - r128ctx->CurrentTexObj[unit] = t; - t->bound = unit + 1; + rmesa->CurrentTexObj[unit] = t; + t->bound |= unit + 1; if ( t->memBlock ) - r128UpdateTexLRU( r128ctx, t ); + r128UpdateTexLRU( rmesa, t ); if ( unit == 0 ) { - r128ctx->setup.tex_cntl_c |= R128_TEXMAP_ENABLE; - r128ctx->setup.tex_size_pitch_c |= t->setup.tex_size_pitch << 0; - r128ctx->setup.scale_3d_cntl &= ~R128_TEX_CACHE_SPLIT; + rmesa->setup.tex_cntl_c |= R128_TEXMAP_ENABLE; + rmesa->setup.tex_size_pitch_c |= t->setup.tex_size_pitch << 0; + rmesa->setup.scale_3d_cntl &= ~R128_TEX_CACHE_SPLIT; t->setup.tex_cntl &= ~R128_SEC_SELECT_SEC_ST; } else { t->setup.tex_cntl |= R128_SEC_SELECT_SEC_ST; - r128ctx->setup.tex_cntl_c |= (R128_TEXMAP_ENABLE | - R128_SEC_TEXMAP_ENABLE) ; - r128ctx->setup.tex_size_pitch_c |= t->setup.tex_size_pitch << 16; - r128ctx->setup.scale_3d_cntl |= R128_TEX_CACHE_SPLIT; + rmesa->setup.tex_cntl_c |= R128_SEC_TEXMAP_ENABLE; + rmesa->setup.tex_size_pitch_c |= t->setup.tex_size_pitch << 16; + rmesa->setup.scale_3d_cntl |= R128_TEX_CACHE_SPLIT; } } -/* Update the hardware texture state */ void r128UpdateTextureState( GLcontext *ctx ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); if ( R128_DEBUG & DEBUG_VERBOSE_API ) { fprintf( stderr, "%s( %p ) en=0x%x\n", @@ -1341,112 +1395,47 @@ } /* Clear any texturing fallbacks */ - r128ctx->Fallback &= ~R128_FALLBACK_TEXTURE; + rmesa->Fallback &= ~R128_FALLBACK_TEXTURE; - /* Unbind any currently bound textures */ - if ( r128ctx->CurrentTexObj[0] ) r128ctx->CurrentTexObj[0]->bound = 0; - if ( r128ctx->CurrentTexObj[1] ) r128ctx->CurrentTexObj[1]->bound = 0; - r128ctx->CurrentTexObj[0] = NULL; - r128ctx->CurrentTexObj[1] = NULL; + /* Unbind any currently bound textures */ + if ( rmesa->CurrentTexObj[0] ) rmesa->CurrentTexObj[0]->bound = 0; + if ( rmesa->CurrentTexObj[1] ) rmesa->CurrentTexObj[1]->bound = 0; + rmesa->CurrentTexObj[0] = NULL; + rmesa->CurrentTexObj[1] = NULL; - r128ctx->setup.tex_size_pitch_c = 0x00000000; + if ( ctx->Enabled & (TEXTURE0_3D|TEXTURE1_3D) ) + rmesa->Fallback |= R128_FALLBACK_TEXTURE; + /* Disable all texturing until it is known to be good */ + rmesa->setup.tex_cntl_c &= ~(R128_TEXMAP_ENABLE | + R128_SEC_TEXMAP_ENABLE); + rmesa->setup.tex_size_pitch_c = 0x00000000; + r128UpdateTextureObject( ctx, 0 ); - r128UpdateTextureStage( ctx, 0 ); + r128UpdateTextureEnv( ctx, 0 ); - if ( r128ctx->multitex ) { + if ( rmesa->multitex ) { r128UpdateTextureObject( ctx, 1 ); - r128UpdateTextureStage( ctx, 1 ); + r128UpdateTextureEnv( ctx, 1 ); } - r128ctx->dirty |= R128_UPLOAD_CONTEXT; + rmesa->dirty |= R128_UPLOAD_CONTEXT; } - -/* Set the texture wrap mode */ -static void r128SetTexWrap( r128TexObjPtr t, GLenum swrap, GLenum twrap ) -{ - t->setup.tex_cntl &= ~(R128_TEX_CLAMP_S_MASK | R128_TEX_CLAMP_T_MASK); - switch ( swrap ) { - case GL_CLAMP: - t->setup.tex_cntl |= R128_TEX_CLAMP_S_CLAMP; - break; - case GL_REPEAT: - t->setup.tex_cntl |= R128_TEX_CLAMP_S_WRAP; - break; - } - - switch ( twrap ) { - case GL_CLAMP: - t->setup.tex_cntl |= R128_TEX_CLAMP_T_CLAMP; - break; - case GL_REPEAT: - t->setup.tex_cntl |= R128_TEX_CLAMP_T_WRAP; - break; - } -} - -/* Set the texture filter mode */ -static void r128SetTexFilter( r128TexObjPtr t, GLenum minf, GLenum magf ) -{ - t->setup.tex_cntl &= ~(R128_MIN_BLEND_MASK | R128_MAG_BLEND_MASK); - - switch ( minf ) { - case GL_NEAREST: - t->setup.tex_cntl |= R128_MIN_BLEND_NEAREST; - break; - case GL_LINEAR: - t->setup.tex_cntl |= R128_MIN_BLEND_LINEAR; - break; - case GL_NEAREST_MIPMAP_NEAREST: - t->setup.tex_cntl |= R128_MIN_BLEND_MIPNEAREST; - break; - case GL_LINEAR_MIPMAP_NEAREST: - t->setup.tex_cntl |= R128_MIN_BLEND_LINEARMIPNEAREST; - break; - case GL_NEAREST_MIPMAP_LINEAR: - t->setup.tex_cntl |= R128_MIN_BLEND_MIPLINEAR; - break; - case GL_LINEAR_MIPMAP_LINEAR: - t->setup.tex_cntl |= R128_MIN_BLEND_LINEARMIPLINEAR; - break; - } - - switch ( magf ) { - case GL_NEAREST: - t->setup.tex_cntl |= R128_MAG_BLEND_NEAREST; - break; - case GL_LINEAR: - t->setup.tex_cntl |= R128_MAG_BLEND_LINEAR; - break; - } -} - -/* Set the texture border color */ -static void r128SetTexBorderColor( r128TexObjPtr t, GLubyte c[4] ) -{ - t->setup.tex_border_color = r128PackColor( 32, c[0], c[1], c[2], c[3] ); -} - - -/* -============================================================================ - -Driver functions called directly from mesa - -============================================================================ -*/ - +/* ================================================================ + * DD interface texturing functions + * + * FIXME: Many of these are deprecated -- we should move to the new + * single-copy texture interface. + */ -/* Set the texture environment state */ static void r128DDTexEnv( GLcontext *ctx, GLenum target, GLenum pname, const GLfloat *param ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); struct gl_texture_unit *texUnit; GLubyte c[4]; - int bias; if ( R128_DEBUG & DEBUG_VERBOSE_API ) { fprintf( stderr, "%s( %s )\n", @@ -1455,59 +1444,71 @@ switch ( pname ) { case GL_TEXTURE_ENV_MODE: - /* TexEnv modes are handled in UpdateTextureState */ - FLUSH_BATCH( r128ctx ); - r128ctx->new_state |= R128_NEW_TEXTURE | R128_NEW_ALPHA; + FLUSH_BATCH( rmesa ); + rmesa->new_state |= R128_NEW_TEXTURE | R128_NEW_ALPHA; break; case GL_TEXTURE_ENV_COLOR: texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; FLOAT_RGBA_TO_UBYTE_RGBA( c, texUnit->EnvColor ); - r128ctx->env_color = r128PackColor( 32, c[0], c[1], c[2], c[3] ); - if ( r128ctx->setup.constant_color_c != r128ctx->env_color ) { - FLUSH_BATCH( r128ctx ); - r128ctx->setup.constant_color_c = r128ctx->env_color; + rmesa->env_color = r128PackColor( 4, c[0], c[1], c[2], c[3] ); + if ( rmesa->setup.constant_color_c != rmesa->env_color ) { + FLUSH_BATCH( rmesa ); + rmesa->setup.constant_color_c = rmesa->env_color; - r128ctx->new_state |= R128_NEW_TEXTURE; + rmesa->new_state |= R128_NEW_TEXTURE; /* More complex multitexture/multipass fallbacks for GL_BLEND * can be done later, but this allows a single pass GL_BLEND - * in some cases (ie. Performer town demo). + * in some cases (ie. Performer town demo). This is only + * applicable to the regular Rage 128, as the Pro and M3 can + * handle true single-pass GL_BLEND texturing. */ - r128ctx->blend_flags &= ~R128_BLEND_ENV_COLOR; - if ( r128ctx->env_color != 0x00000000 && - r128ctx->env_color != 0xff000000 /*&& - r128ctx->env_color != 0x00ffffff && - r128ctx->env_color != 0xffffffff */ ) { - r128ctx->blend_flags |= R128_BLEND_ENV_COLOR; + rmesa->blend_flags &= ~R128_BLEND_ENV_COLOR; + if ( R128_IS_PLAIN( rmesa ) && + rmesa->env_color != 0x00000000 && + rmesa->env_color != 0xff000000 && + rmesa->env_color != 0x00ffffff && + rmesa->env_color != 0xffffffff ) { + rmesa->blend_flags |= R128_BLEND_ENV_COLOR; } } break; case GL_TEXTURE_LOD_BIAS_EXT: - /* GTH: This isn't exactly correct, but gives good results up to a - * certain point. It is better than completely ignoring the LOD - * bias. Unfortunately there isn't much range in the bias, the - * spec mentions strides that vary between 0.5 and 2.0 but these - * numbers don't seem to relate the the GL LOD bias value at all. - */ - if ( param[0] >= 1.0 ) { - bias = -128; - } else if ( param[0] >= 0.5 ) { - bias = -64; - } else if ( param[0] >= 0.25 ) { - bias = 0; - } else if ( param[0] >= 0.0 ) { - bias = 63; - } else { - bias = 127; - } - if ( r128ctx->lod_bias != bias ) { - FLUSH_BATCH( r128ctx ); - r128ctx->lod_bias = bias; - - r128ctx->new_state |= R128_NEW_RENDER; - } + do { + CARD32 t = rmesa->setup.tex_cntl_c; + GLint bias; + CARD32 b; + + /* GTH: This isn't exactly correct, but gives good results up to a + * certain point. It is better than completely ignoring the LOD + * bias. Unfortunately there isn't much range in the bias, the + * spec mentions strides that vary between 0.5 and 2.0 but these + * numbers don't seem to relate the the GL LOD bias value at all. + */ + if ( param[0] >= 1.0 ) { + bias = -128; + } else if ( param[0] >= 0.5 ) { + bias = -64; + } else if ( param[0] >= 0.25 ) { + bias = 0; + } else if ( param[0] >= 0.0 ) { + bias = 63; + } else { + bias = 127; + } + + b = (CARD32)bias & 0xff; + t &= ~R128_LOD_BIAS_MASK; + t |= (b << R128_LOD_BIAS_SHIFT); + + if ( rmesa->setup.tex_cntl_c != t ) { + FLUSH_BATCH( rmesa ); + rmesa->setup.tex_cntl_c = t; + rmesa->dirty |= R128_UPLOAD_CONTEXT; + } + } while (0); break; default: @@ -1515,35 +1516,37 @@ } } -/* Upload a new texture image */ static void r128DDTexImage( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLint level, GLint internalFormat, const struct gl_texture_image *image ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); r128TexObjPtr t; if ( R128_DEBUG & DEBUG_VERBOSE_API ) fprintf( stderr, "%s( %p, level %d )\n", __FUNCTION__, tObj, level ); + + if ( ( target != GL_TEXTURE_2D ) && + ( target != GL_TEXTURE_1D ) ) + return; - if ( ( target != GL_TEXTURE_2D ) && ( target != GL_TEXTURE_1D ) ) return; - if ( level >= R128_TEX_MAXLEVELS ) return; + if ( level >= R128_MAX_TEXTURE_LEVELS ) + return; t = (r128TexObjPtr)tObj->DriverData; if ( t ) { - if ( t->bound ) FLUSH_BATCH( r128ctx ); + if ( t->bound ) FLUSH_BATCH( rmesa ); /* Destroy the old texture, and upload a new one. The actual * uploading of the texture image occurs in the UploadSubImage * function. */ - r128DestroyTexObj( r128ctx, t ); - r128ctx->new_state |= R128_NEW_TEXTURE; + r128DestroyTexObj( rmesa, t ); + rmesa->new_state |= R128_NEW_TEXTURE; } } -/* Upload a new texture sub-image */ static void r128DDTexSubImage( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLint level, GLint xoffset, GLint yoffset, @@ -1551,7 +1554,7 @@ GLint internalFormat, const struct gl_texture_image *image ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); r128TexObjPtr t; if ( R128_DEBUG & DEBUG_VERBOSE_API ) { @@ -1560,31 +1563,40 @@ image->Width, image->Height ); } - if ( ( target != GL_TEXTURE_2D ) && ( target != GL_TEXTURE_1D ) ) return; - if ( level >= R128_TEX_MAXLEVELS ) return; + if ( ( target != GL_TEXTURE_2D ) && + ( target != GL_TEXTURE_1D ) ) + return; + + if ( level >= R128_MAX_TEXTURE_LEVELS ) + return; t = (r128TexObjPtr)tObj->DriverData; if ( t ) { - if ( t->bound ) FLUSH_BATCH( r128ctx ); + if ( t->bound ) FLUSH_BATCH( rmesa ); - LOCK_HARDWARE( r128ctx ); - r128UploadSubImage( r128ctx, t, level, +#if 0 + /* FIXME: Only upload textures if we already have space in the heap. + */ + LOCK_HARDWARE( rmesa ); + r128UploadSubImage( rmesa, t, level, xoffset, yoffset, width, height ); - UNLOCK_HARDWARE( r128ctx ); + UNLOCK_HARDWARE( rmesa ); /* Update the context state */ - r128ctx->setup.tex_cntl_c |= R128_TEX_CACHE_FLUSH; + rmesa->setup.tex_cntl_c |= R128_TEX_CACHE_FLUSH; +#else + r128DestroyTexObj( rmesa, t ); +#endif - r128ctx->new_state |= R128_NEW_TEXTURE; + rmesa->new_state |= R128_NEW_TEXTURE; } } -/* Set the texture parameter state */ static void r128DDTexParameter( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLenum pname, const GLfloat *params ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); r128TexObjPtr t = (r128TexObjPtr)tObj->DriverData; if ( R128_DEBUG & DEBUG_VERBOSE_API ) { @@ -1592,24 +1604,32 @@ __FUNCTION__, gl_lookup_enum_by_nr( pname ) ); } - if ( !t || !t->bound ) return; - if ( ( target != GL_TEXTURE_2D ) && ( target != GL_TEXTURE_1D ) ) return; + /* If we don't have a hardware texture, it will be automatically + * created with current state before it is used, so we don't have + * to do anything now. + */ + if ( !t || !t->bound ) + return; + if ( ( target != GL_TEXTURE_2D ) && + ( target != GL_TEXTURE_1D ) ) + return; + switch ( pname ) { case GL_TEXTURE_MIN_FILTER: case GL_TEXTURE_MAG_FILTER: - if ( t->bound ) FLUSH_BATCH( r128ctx ); + if ( t->bound ) FLUSH_BATCH( rmesa ); r128SetTexFilter( t, tObj->MinFilter, tObj->MagFilter ); break; case GL_TEXTURE_WRAP_S: case GL_TEXTURE_WRAP_T: - if ( t->bound ) FLUSH_BATCH( r128ctx ); + if ( t->bound ) FLUSH_BATCH( rmesa ); r128SetTexWrap( t, tObj->WrapS, tObj->WrapT ); break; case GL_TEXTURE_BORDER_COLOR: - if ( t->bound ) FLUSH_BATCH( r128ctx ); + if ( t->bound ) FLUSH_BATCH( rmesa ); r128SetTexBorderColor( t, tObj->BorderColor ); break; @@ -1617,14 +1637,13 @@ return; } - r128ctx->new_state |= R128_NEW_TEXTURE; + rmesa->new_state |= R128_NEW_TEXTURE; } -/* Bind a texture to the currently active texture unit */ static void r128DDBindTexture( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); GLint unit = ctx->Texture.CurrentUnit; if ( R128_DEBUG & DEBUG_VERBOSE_API ) { @@ -1632,50 +1651,46 @@ __FUNCTION__, tObj, unit ); } - FLUSH_BATCH( r128ctx ); + FLUSH_BATCH( rmesa ); - /* Unbind the old texture */ - if ( r128ctx->CurrentTexObj[unit] ) { - r128ctx->CurrentTexObj[unit]->bound &= ~(unit+1); - r128ctx->CurrentTexObj[unit] = NULL; + if ( rmesa->CurrentTexObj[unit] ) { + rmesa->CurrentTexObj[unit]->bound &= ~(unit+1); + rmesa->CurrentTexObj[unit] = NULL; } - /* The actualy binding occurs in the Tex[01]UpdateState function */ - r128ctx->new_state |= R128_NEW_TEXTURE; + rmesa->new_state |= R128_NEW_TEXTURE; } -/* Remove texture from AGP/local texture memory */ static void r128DDDeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); r128TexObjPtr t = (r128TexObjPtr)tObj->DriverData; if ( t ) { if ( t->bound ) { - FLUSH_BATCH( r128ctx ); + FLUSH_BATCH( rmesa ); - r128ctx->CurrentTexObj[t->bound-1] = 0; - r128ctx->new_state |= R128_NEW_TEXTURE; + if ( t->bound & TEX_0 ) rmesa->CurrentTexObj[0] = NULL; + if ( t->bound & TEX_1 ) rmesa->CurrentTexObj[1] = NULL; + rmesa->new_state |= R128_NEW_TEXTURE; } - r128DestroyTexObj( r128ctx, t ); + r128DestroyTexObj( rmesa, t ); tObj->DriverData = NULL; } } -/* Determine if a texture is currently residing in either AGP/local - * texture memory. - */ static GLboolean r128DDIsTextureResident( GLcontext *ctx, struct gl_texture_object *tObj ) { r128TexObjPtr t = (r128TexObjPtr)tObj->DriverData; - return t && t->memBlock; + return ( t && t->memBlock ); } + + -/* Initialize the driver's texture functions */ void r128DDInitTextureFuncs( GLcontext *ctx ) { ctx->Driver.TexEnv = r128DDTexEnv; Index: xc/lib/GL/mesa/src/drv/r128/r128_tex.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_tex.h:1.3 xc/lib/GL/mesa/src/drv/r128/r128_tex.h:1.6 --- xc/lib/GL/mesa/src/drv/r128/r128_tex.h:1.3 Tue Dec 12 12:17:08 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_tex.h Tue Apr 10 13:53:07 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tex.h,v 1.3 2000/12/12 17:17:08 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tex.h,v 1.6 2001/04/10 17:53:07 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -28,58 +28,83 @@ /* * Authors: - * Kevin E. Martin * Gareth Hughes + * Kevin E. Martin * */ -#ifndef _R128_TEX_H_ -#define _R128_TEX_H_ +#ifndef __R128_TEX_H__ +#define __R128_TEX_H__ #ifdef GLX_DIRECT_RENDERING extern void r128UpdateTextureState( GLcontext *ctx ); -extern int r128UploadTexImages( r128ContextPtr r128ctx, r128TexObjPtr t ); +extern int r128UploadTexImages( r128ContextPtr rmesa, r128TexObjPtr t ); -extern void r128AgeTextures( r128ContextPtr r128ctx, int heap ); -extern void r128DestroyTexObj( r128ContextPtr r128ctx, r128TexObjPtr t ); +extern void r128AgeTextures( r128ContextPtr rmesa, int heap ); +extern void r128DestroyTexObj( r128ContextPtr rmesa, r128TexObjPtr t ); -extern void r128PrintLocalLRU( r128ContextPtr r128ctx, int heap ); -extern void r128PrintGlobalLRU( r128ContextPtr r128ctx, int heap ); +extern void r128PrintLocalLRU( r128ContextPtr rmesa, int heap ); +extern void r128PrintGlobalLRU( r128ContextPtr rmesa, int heap ); extern void r128DDInitTextureFuncs( GLcontext *ctx ); - -#define R128PACKCOLOR332(r, g, b) \ - (((r) & 0xe0) | (((g) & 0xe0) >> 3) | (((b) & 0xc0) >> 6)) -#define R128PACKCOLOR1555(r, g, b, a) \ - ((((r) & 0xf8) << 7) | (((g) & 0xf8) << 2) | (((b) & 0xf8) >> 3) | \ - ((a) ? 0x8000 : 0)) - -#define R128PACKCOLOR565(r, g, b) \ - ((((r) & 0xf8) << 8) | (((g) & 0xfc) << 3) | (((b) & 0xf8) >> 3)) +/* ================================================================ + * Color conversion macros: + */ -#define R128PACKCOLOR888(r, g, b) \ - (((r) << 16) | ((g) << 8) | (b)) +#define R128PACKCOLOR332( r, g, b ) \ + (((r) & 0xe0) | (((g) & 0xe0) >> 3) | (((b) & 0xc0) >> 6)) -#define R128PACKCOLOR8888(r, g, b, a) \ - (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)) +#define R128PACKCOLOR1555( r, g, b, a ) \ + ((((r) & 0xf8) << 7) | (((g) & 0xf8) << 2) | (((b) & 0xf8) >> 3) | \ + ((a) ? 0x8000 : 0)) + +#define R128PACKCOLOR565( r, g, b ) \ + ((((r) & 0xf8) << 8) | (((g) & 0xfc) << 3) | (((b) & 0xf8) >> 3)) + +#define R128PACKCOLOR888( r, g, b ) \ + (((r) << 16) | ((g) << 8) | (b)) + +#define R128PACKCOLOR8888( r, g, b, a ) \ + (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)) + +#define R128PACKCOLOR4444( r, g, b, a ) \ + ((((a) & 0xf0) << 8) | (((r) & 0xf0) << 4) | ((g) & 0xf0) | ((b) >> 4)) + +#include "X11/Xarch.h" +#if X_BYTE_ORDER == X_LITTLE_ENDIAN +#define R128PACKCOLORS565( r0, g0, b0, r1, g1, b1 ) \ + ((R128PACKCOLOR565( r0, g0, b0 )) | \ + (R128PACKCOLOR565( r1, g1, b1 ) << 16)) +#define R128PACKCOLORS4444( r0, g0, b0, a0, r1, g1, b1, a1 ) \ + ((R128PACKCOLOR4444( r0, g0, b0, a0 )) | \ + (R128PACKCOLOR4444( r1, g1, b1, a1 ) << 16)) +#else +#define R128PACKCOLORS565( r0, g0, b0, r1, g1, b1 ) \ + ((R128PACKCOLOR565( r1, g1, b1 )) | \ + (R128PACKCOLOR565( r0, g0, b0 ) << 16)) +#define R128PACKCOLORS4444( r0, g0, b0, a0, r1, g1, b1, a1 ) \ + ((R128PACKCOLOR4444( r1, g1, b1, a1 )) | \ + (R128PACKCOLOR4444( r0, g0, b0, a0 ) << 16)) -#define R128PACKCOLOR4444(r, g, b, a) \ - ((((a) & 0xf0) << 8) | (((r) & 0xf0) << 4) | ((g) & 0xf0) | ((b) >> 4)) +#endif -static __inline__ CARD32 r128PackColor( GLuint bpp, +static __inline__ CARD32 r128PackColor( GLuint cpp, GLubyte r, GLubyte g, GLubyte b, GLubyte a ) { - switch ( bpp ) { - case 16: return R128PACKCOLOR565( r, g, b ); - case 32: return R128PACKCOLOR8888( r, g, b, a ); - default: return 0; + switch ( cpp ) { + case 2: + return R128PACKCOLOR565( r, g, b ); + case 4: + return R128PACKCOLOR8888( r, g, b, a ); + default: + return 0; } } #endif -#endif /* _R128_TEX_H_ */ +#endif /* __R128_TEX_H__ */ Index: xc/lib/GL/mesa/src/drv/r128/r128_texobj.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_texobj.h:1.3 xc/lib/GL/mesa/src/drv/r128/r128_texobj.h:1.4 --- xc/lib/GL/mesa/src/drv/r128/r128_texobj.h:1.3 Mon Dec 4 14:21:47 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_texobj.h Sun Jan 7 20:07:24 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_texobj.h,v 1.3 2000/12/04 19:21:47 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_texobj.h,v 1.4 2001/01/08 01:07:24 martin Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -39,44 +39,45 @@ #include "r128_sarea.h" #include "mm.h" -/* Individual texture image information */ +/* Individual texture image information. + */ typedef struct { - GLuint offset; /* Offset into locally shared texture space (i.e., - relative to bufAddr (below) */ - GLuint width; /* Width of texture image */ - GLuint height; /* Height of texture image */ + GLuint offset; /* Relative to local texture space */ + GLuint width; + GLuint height; } r128TexImage; typedef struct r128_tex_obj r128TexObj, *r128TexObjPtr; -/* Texture object in locally shared texture space */ +/* Texture object in locally shared texture space. + */ struct r128_tex_obj { - r128TexObjPtr next, prev; + r128TexObjPtr next, prev; struct gl_texture_object *tObj; /* Mesa texture object */ - PMemBlock memBlock; /* Memory block containing texture */ - CARD32 bufAddr; /* Offset to start of locally + PMemBlock memBlock; /* Memory block containing texture */ + CARD32 bufAddr; /* Offset to start of locally shared texture block */ - CARD32 dirty_images; /* Flags for whether or not + CARD32 dirty_images; /* Flags for whether or not images need to be uploaded to local or AGP texture space */ - GLuint age; - GLint bound; /* Texture unit currently bound to */ - GLint heap; /* Texture heap currently stored in */ - r128TexImage image[R128_TEX_MAXLEVELS]; /* Image data for all - mipmap levels */ + GLuint age; + GLint bound; /* Texture unit currently bound to */ + GLint heap; /* Texture heap currently stored in */ + r128TexImage image[R128_MAX_TEXTURE_LEVELS]; /* Image data for all + mipmap levels */ - GLint totalSize; /* Total size of the texture + GLint totalSize; /* Total size of the texture including all mipmap levels */ - GLuint internFormat; /* Internal GL format used to store + GLuint internFormat; /* Internal GL format used to store texture on card */ - CARD32 textureFormat; /* Actual hardware format */ - GLint texelBytes; /* Number of bytes per texel */ + CARD32 textureFormat; /* Actual hardware format */ + GLint texelBytes; /* Number of bytes per texel */ - r128_texture_regs_t setup; /* Setup regs for texture */ + r128_texture_regs_t setup; /* Setup regs for texture */ }; #endif /* _R128_TEXOBJ_H_ */ Index: xc/lib/GL/mesa/src/drv/r128/r128_tris.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_tris.c:1.3 xc/lib/GL/mesa/src/drv/r128/r128_tris.c:1.6 --- xc/lib/GL/mesa/src/drv/r128/r128_tris.c:1.3 Mon Dec 4 14:21:47 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_tris.c Tue Apr 10 13:53:07 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tris.c,v 1.3 2000/12/04 19:21:47 dawes Exp $ */ /* -*- c-basic-offset: 3 -*- */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tris.c,v 1.6 2001/04/10 17:53:07 dawes Exp $ */ /* -*- c-basic-offset: 3 -*- */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -28,8 +28,9 @@ /* * Authors: - * Kevin E. Martin * Gareth Hughes + * Kevin E. Martin + * Michel Dänzer * */ @@ -49,25 +50,38 @@ quad_func quad; } rast_tab[R128_MAX_TRIFUNC]; -#define R128_COLOR(to, from) \ -do { \ - (to)[0] = (from)[2]; \ - (to)[1] = (from)[1]; \ - (to)[2] = (from)[0]; \ - (to)[3] = (from)[3]; \ +#if X_BYTE_ORDER == X_LITTLE_ENDIAN +#define R128_COLOR( to, from ) \ +do { \ + (to)[0] = (from)[2]; \ + (to)[1] = (from)[1]; \ + (to)[2] = (from)[0]; \ + (to)[3] = (from)[3]; \ +} while (0) +#else +#define R128_COLOR( to, from ) \ +do { \ + (to)[0] = (from)[3]; \ + (to)[1] = (from)[0]; \ + (to)[2] = (from)[1]; \ + (to)[3] = (from)[2]; \ } while (0) +#endif static void r128_null_quad( GLcontext *ctx, GLuint v0, - GLuint v1, GLuint v2, GLuint v3, GLuint pv ) { + GLuint v1, GLuint v2, GLuint v3, GLuint pv ) +{ } static void r128_null_triangle( GLcontext *ctx, GLuint v0, - GLuint v1, GLuint v2, GLuint pv ) { + GLuint v1, GLuint v2, GLuint pv ) +{ } -static void r128_null_line( GLcontext *ctx, GLuint v1, GLuint v2, GLuint pv ) { +static void r128_null_line( GLcontext *ctx, GLuint v1, GLuint v2, GLuint pv ) +{ } - -static void r128_null_points( GLcontext *ctx, GLuint first, GLuint last ) { +static void r128_null_points( GLcontext *ctx, GLuint first, GLuint last ) +{ } static void r128PrintRenderState( const char *msg, GLuint state ) @@ -114,10 +128,9 @@ #include "r128_tritmp.h" -/* Initialize the table of points, line and triangle drawing functions */ void r128DDTriangleFuncsInit( void ) { - int i; + GLint i; init(); init_flat(); @@ -128,12 +141,12 @@ init_twoside_offset(); init_twoside_offset_flat(); - for ( i = 0 ; i < 0x20 ; i++ ) { - if ( (i & (R128_NODRAW_BIT | R128_FALLBACK_BIT)) == R128_NODRAW_BIT ) { - rast_tab[i].points = r128_null_points; - rast_tab[i].line = r128_null_line; - rast_tab[i].triangle = r128_null_triangle; - rast_tab[i].quad = r128_null_quad; + for ( i = 0 ; i < R128_MAX_TRIFUNC ; i++ ) { + if ( i & R128_NODRAW_BIT ) { + rast_tab[i].points = r128_null_points; + rast_tab[i].line = r128_null_line; + rast_tab[i].triangle = r128_null_triangle; + rast_tab[i].quad = r128_null_quad; } } } @@ -147,7 +160,7 @@ #define LINE_FALLBACK (ALL_FALLBACK | DD_LINE_SMOOTH | DD_LINE_STIPPLE) #define TRI_FALLBACK (ALL_FALLBACK | DD_TRI_SMOOTH | DD_TRI_STIPPLE | DD_TRI_UNFILLED) #define ANY_FALLBACK (POINT_FALLBACK | LINE_FALLBACK | TRI_FALLBACK) -#define ANY_RASTER_FLAGS (/*DD_FLATSHADE |*/ DD_TRI_LIGHT_TWOSIDE | DD_TRI_OFFSET | DD_Z_NEVER) +#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE | DD_TRI_OFFSET | DD_Z_NEVER) /* Setup the Point, Line, Triangle and Quad functions based on the * current rendering state. Wherever possible, use the hardware to @@ -155,12 +168,12 @@ */ void r128DDChooseRenderState( GLcontext *ctx ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); + r128ContextPtr rmesa = R128_CONTEXT(ctx); GLuint flags = ctx->TriangleCaps; - CARD32 index = 0; + GLuint index = 0; - if ( r128ctx->Fallback ) { - r128ctx->RenderIndex = R128_FALLBACK_BIT; + if ( rmesa->Fallback ) { + rmesa->RenderIndex = R128_FALLBACK_BIT; return; } @@ -171,37 +184,38 @@ if ( flags & DD_Z_NEVER ) index |= R128_NODRAW_BIT; } - r128ctx->PointsFunc = rast_tab[index].points; - r128ctx->LineFunc = rast_tab[index].line; - r128ctx->TriangleFunc = rast_tab[index].triangle; - r128ctx->QuadFunc = rast_tab[index].quad; + rmesa->PointsFunc = rast_tab[index].points; + rmesa->LineFunc = rast_tab[index].line; + rmesa->TriangleFunc = rast_tab[index].triangle; + rmesa->QuadFunc = rast_tab[index].quad; - r128ctx->RenderIndex = index; - r128ctx->IndirectTriangles = 0; + rmesa->RenderIndex = index; + rmesa->IndirectTriangles = 0; if ( flags & ANY_FALLBACK ) { - r128ctx->RenderIndex |= R128_FALLBACK_BIT; - if ( flags & POINT_FALLBACK ) { - r128ctx->PointsFunc = 0; - r128ctx->IndirectTriangles |= DD_POINT_SW_RASTERIZE; + rmesa->RenderIndex |= R128_FALLBACK_BIT; + rmesa->PointsFunc = 0; + rmesa->IndirectTriangles |= DD_POINT_SW_RASTERIZE; } if ( flags & LINE_FALLBACK ) { - r128ctx->LineFunc = 0; - r128ctx->IndirectTriangles |= DD_LINE_SW_RASTERIZE; + rmesa->RenderIndex |= R128_FALLBACK_BIT; + rmesa->LineFunc = 0; + rmesa->IndirectTriangles |= DD_LINE_SW_RASTERIZE; } if ( flags & TRI_FALLBACK ) { - r128ctx->TriangleFunc = 0; - r128ctx->QuadFunc = 0; - r128ctx->IndirectTriangles |= (DD_TRI_SW_RASTERIZE | - DD_QUAD_SW_RASTERIZE); + rmesa->RenderIndex |= R128_FALLBACK_BIT; + rmesa->TriangleFunc = 0; + rmesa->QuadFunc = 0; + rmesa->IndirectTriangles |= (DD_TRI_SW_RASTERIZE | + DD_QUAD_SW_RASTERIZE); } } if ( 0 ) { gl_print_tri_caps( "tricaps", ctx->TriangleCaps ); - r128PrintRenderState( "r128 render state", r128ctx->RenderIndex ); + r128PrintRenderState( "r128 render state", rmesa->RenderIndex ); } } Index: xc/lib/GL/mesa/src/drv/r128/r128_tris.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_tris.h:1.3 xc/lib/GL/mesa/src/drv/r128/r128_tris.h:1.6 --- xc/lib/GL/mesa/src/drv/r128/r128_tris.h:1.3 Mon Dec 4 14:21:47 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_tris.h Tue Apr 10 12:07:53 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tris.h,v 1.3 2000/12/04 19:21:47 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tris.h,v 1.6 2001/04/10 16:07:53 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -28,41 +28,40 @@ /* * Authors: - * Kevin E. Martin * Gareth Hughes + * Kevin E. Martin * */ -#ifndef _R128_TRIS_H_ -#define _R128_TRIS_H_ +#ifndef __R128_TRIS_H__ +#define __R128_TRIS_H__ #ifdef GLX_DIRECT_RENDERING #include "r128_vb.h" -extern void r128DDChooseRenderState(GLcontext *ctx); -extern void r128DDTriangleFuncsInit(void); +extern void r128DDChooseRenderState( GLcontext *ctx ); +extern void r128DDTriangleFuncsInit( void ); -#define R128_ANTIALIAS_BIT 0x00 /* Ignored for now */ #define R128_FLAT_BIT 0x01 #define R128_OFFSET_BIT 0x02 #define R128_TWOSIDE_BIT 0x04 #define R128_NODRAW_BIT 0x08 #define R128_FALLBACK_BIT 0x10 #define R128_MAX_TRIFUNC 0x20 + -/* Draw a triangle from the vertices in the vertex buffer */ -static __inline void r128_draw_triangle( r128ContextPtr r128ctx, - r128Vertex *v0, - r128Vertex *v1, - r128Vertex *v2 ) +static __inline void r128_draw_triangle( r128ContextPtr rmesa, + r128VertexPtr v0, + r128VertexPtr v1, + r128VertexPtr v2 ) { - int vertsize = r128ctx->vertsize; - CARD32 *vb = r128AllocVerticesInline( r128ctx, 3 ); + GLuint vertsize = rmesa->vertsize; + CARD32 *vb = r128AllocVerticesInline( rmesa, 3 ); int j; #if defined (USE_X86_ASM) - /* GTH: We can safely assume the vertex stride is some number of + /* GH: We can safely assume the vertex stride is some number of * dwords, and thus a "rep movsd" is okay. The vb pointer is * automagically updated with this instruction, so we don't have * to manually take care of incrementing it. @@ -81,31 +80,30 @@ : "memory" ); #else for ( j = 0 ; j < vertsize ; j++ ) - vb[j] = v0->ui[j]; + LE32_OUT( vb[j], v0->ui[j] ); vb += vertsize; for ( j = 0 ; j < vertsize ; j++ ) - vb[j] = v1->ui[j]; + LE32_OUT( vb[j], v1->ui[j] ); vb += vertsize; for ( j = 0 ; j < vertsize ; j++ ) - vb[j] = v2->ui[j]; + LE32_OUT( vb[j], v2->ui[j] ); #endif } -/* Draw a quad from the vertices in the vertex buffer */ -static __inline void r128_draw_quad( r128ContextPtr r128ctx, - r128Vertex *v0, - r128Vertex *v1, - r128Vertex *v2, - r128Vertex *v3 ) +static __inline void r128_draw_quad( r128ContextPtr rmesa, + r128VertexPtr v0, + r128VertexPtr v1, + r128VertexPtr v2, + r128VertexPtr v3 ) { - int vertsize = r128ctx->vertsize; - CARD32 *vb = r128AllocVerticesInline( r128ctx, 6 ); + GLuint vertsize = rmesa->vertsize; + CARD32 *vb = r128AllocVerticesInline( rmesa, 6 ); int j; #if defined (USE_X86_ASM) - /* GTH: We can safely assume the vertex stride is some number of + /* GH: We can safely assume the vertex stride is some number of * dwords, and thus a "rep movsd" is okay. The vb pointer is * automagically updated with this instruction, so we don't have * to manually take care of incrementing it. @@ -136,97 +134,119 @@ : "memory" ); #else for ( j = 0 ; j < vertsize ; j++ ) - vb[j] = v0->ui[j]; + LE32_OUT( vb[j], v0->ui[j] ); vb += vertsize; for ( j = 0 ; j < vertsize ; j++ ) - vb[j] = v1->ui[j]; + LE32_OUT( vb[j], v1->ui[j] ); vb += vertsize; for ( j = 0 ; j < vertsize ; j++ ) - vb[j] = v3->ui[j]; + LE32_OUT( vb[j], v3->ui[j] ); vb += vertsize; for ( j = 0 ; j < vertsize ; j++ ) - vb[j] = v1->ui[j]; + LE32_OUT( vb[j], v1->ui[j] ); vb += vertsize; for ( j = 0 ; j < vertsize ; j++ ) - vb[j] = v2->ui[j]; + LE32_OUT( vb[j], v2->ui[j] ); vb += vertsize; for ( j = 0 ; j < vertsize ; j++ ) - vb[j] = v3->ui[j]; + LE32_OUT( vb[j], v3->ui[j] ); #endif } -/* Draw a line from the vertices in the vertex buffer */ -static __inline void r128_draw_line( r128ContextPtr r128ctx, - r128Vertex *tmp0, - r128Vertex *tmp1, - float width ) +static __inline void r128_draw_line( r128ContextPtr rmesa, + r128VertexPtr tmp0, + r128VertexPtr tmp1, + GLfloat width ) { #if 1 - int vertsize = r128ctx->vertsize; - CARD32 *vb = r128AllocVerticesInline( r128ctx, 6 ); - float dx, dy, ix, iy; - int j; + GLuint vertsize = rmesa->vertsize; + CARD32 *vb = r128AllocVerticesInline( rmesa, 6 ); + GLfloat hw, dx, dy, ix, iy; + GLuint j; + GLfloat x0 = tmp0->v.x; + GLfloat y0 = tmp0->v.y; + GLfloat x1 = tmp1->v.x; + GLfloat y1 = tmp1->v.y; + + hw = 0.5F * width; + if (hw > 0.1F && hw < 0.5F) { + hw = 0.5F; + } + /* adjust vertices depending on line direction */ dx = tmp0->v.x - tmp1->v.x; dy = tmp0->v.y - tmp1->v.y; - - ix = width * .5; iy = 0; - - if ((ix<.5) && (ix>0.1)) ix = .5; /* I want to see lines with width - 0.5 also */ - if (dx * dx > dy * dy) { - iy = ix; ix = 0; + /* X-major line */ + ix = 0.0F; + iy = hw; + if (x1 < x0) { + x0 += 0.5F; + x1 += 0.5F; + } + y0 -= 0.5F; + y1 -= 0.5F; + } + else { + /* Y-major line */ + ix = hw; + iy = 0.0F; + if (y1 > y0) { + y0 -= 0.5F; + y1 -= 0.5F; + } + x0 += 0.5F; + x1 += 0.5F; } - *(float *)&vb[0] = tmp0->v.x - ix; - *(float *)&vb[1] = tmp0->v.y - iy; + LE32_OUT_FLOAT( vb[0], x0 - ix ); + LE32_OUT_FLOAT( vb[1], y0 - iy ); for (j = 2 ; j < vertsize ; j++) - vb[j] = tmp0->ui[j]; + LE32_OUT( vb[j], tmp0->ui[j] ); vb += vertsize; - *(float *)&vb[0] = tmp1->v.x + ix; - *(float *)&vb[1] = tmp1->v.y + iy; + LE32_OUT_FLOAT( vb[0], x1 + ix ); + LE32_OUT_FLOAT( vb[1], y1 + iy ); for (j = 2 ; j < vertsize ; j++) - vb[j] = tmp1->ui[j]; + LE32_OUT( vb[j], tmp1->ui[j] ); vb += vertsize; - *(float *)&vb[0] = tmp0->v.x + ix; - *(float *)&vb[1] = tmp0->v.y + iy; + LE32_OUT_FLOAT( vb[0], x0 + ix ); + LE32_OUT_FLOAT( vb[1], y0 + iy ); for (j = 2 ; j < vertsize ; j++) - vb[j] = tmp0->ui[j]; + LE32_OUT( vb[j], tmp0->ui[j] ); vb += vertsize; - *(float *)&vb[0] = tmp0->v.x - ix; - *(float *)&vb[1] = tmp0->v.y - iy; + LE32_OUT_FLOAT( vb[0], x0 - ix ); + LE32_OUT_FLOAT( vb[1], y0 - iy ); for (j = 2 ; j < vertsize ; j++) - vb[j] = tmp0->ui[j]; + LE32_OUT( vb[j], tmp0->ui[j] ); vb += vertsize; - *(float *)&vb[0] = tmp1->v.x - ix; - *(float *)&vb[1] = tmp1->v.y - iy; + LE32_OUT_FLOAT( vb[0], x1 - ix ); + LE32_OUT_FLOAT( vb[1], y1 - iy ); for (j = 2 ; j < vertsize ; j++) - vb[j] = tmp1->ui[j]; + LE32_OUT( vb[j], tmp1->ui[j] ); vb += vertsize; - *(float *)&vb[0] = tmp1->v.x + ix; - *(float *)&vb[1] = tmp1->v.y + iy; + LE32_OUT_FLOAT( vb[0], x1 + ix ); + LE32_OUT_FLOAT( vb[1], y1 + iy ); for (j = 2 ; j < vertsize ; j++) - vb[j] = tmp1->ui[j]; + LE32_OUT( vb[j], tmp1->ui[j] ); #else - int vertsize = r128ctx->vertsize; - CARD32 *vb = r128AllocVerticesInline( r128ctx, 2 ); + int vertsize = rmesa->vertsize; + CARD32 *vb = r128AllocVerticesInline( rmesa, 2 ); int j; #if defined (USE_X86_ASM) - /* GTH: We can safely assume the vertex stride is some number of + /* GH: We can safely assume the vertex stride is some number of * dwords, and thus a "rep movsd" is okay. The vb pointer is * automagically updated with this instruction, so we don't have * to manually take care of incrementing it. @@ -250,57 +270,59 @@ #endif } -/* Draw a point from the vertices in the vertex buffer */ -static __inline void r128_draw_point( r128ContextPtr r128ctx, - r128Vertex *tmp, float sz ) +static __inline void r128_draw_point( r128ContextPtr rmesa, + r128VertexPtr tmp, GLfloat sz ) { #if 1 - int vertsize = r128ctx->vertsize; - CARD32 *vb = r128AllocVerticesInline( r128ctx, 6 ); + GLuint vertsize = rmesa->vertsize; + CARD32 *vb = r128AllocVerticesInline( rmesa, 6 ); int j; + const float x = tmp->v.x + PNT_X_OFFSET; + const float y = tmp->v.y + PNT_Y_OFFSET; - *(float *)&vb[0] = tmp->v.x - sz; - *(float *)&vb[1] = tmp->v.y - sz; + LE32_OUT_FLOAT( vb[0], x - sz ); + LE32_OUT_FLOAT( vb[1], y - sz ); for (j = 2 ; j < vertsize ; j++) - vb[j] = tmp->ui[j]; + LE32_OUT( vb[j], tmp->ui[j] ); vb += vertsize; - *(float *)&vb[0] = tmp->v.x + sz; - *(float *)&vb[1] = tmp->v.y - sz; + LE32_OUT_FLOAT( vb[0], x + sz ); + LE32_OUT_FLOAT( vb[1], y - sz ); for (j = 2 ; j < vertsize ; j++) - vb[j] = tmp->ui[j]; + LE32_OUT( vb[j], tmp->ui[j] ); vb += vertsize; - *(float *)&vb[0] = tmp->v.x + sz; - *(float *)&vb[1] = tmp->v.y + sz; + LE32_OUT_FLOAT( vb[0], x + sz ); + LE32_OUT_FLOAT( vb[1], y + sz ); for (j = 2 ; j < vertsize ; j++) - vb[j] = tmp->ui[j]; + LE32_OUT( vb[j], tmp->ui[j] ); vb += vertsize; - *(float *)&vb[0] = tmp->v.x + sz; - *(float *)&vb[1] = tmp->v.y + sz; + LE32_OUT_FLOAT( vb[0], x + sz ); + LE32_OUT_FLOAT( vb[1], y + sz ); for (j = 2 ; j < vertsize ; j++) - vb[j] = tmp->ui[j]; + LE32_OUT( vb[j], tmp->ui[j] ); vb += vertsize; - *(float *)&vb[0] = tmp->v.x - sz; - *(float *)&vb[1] = tmp->v.y + sz; + LE32_OUT_FLOAT( vb[0], x - sz ); + LE32_OUT_FLOAT( vb[1], y + sz ); for (j = 2 ; j < vertsize ; j++) - vb[j] = tmp->ui[j]; + LE32_OUT( vb[j], tmp->ui[j] ); vb += vertsize; - *(float *)&vb[0] = tmp->v.x - sz; - *(float *)&vb[1] = tmp->v.y - sz; + LE32_OUT_FLOAT( vb[0], x - sz ); + LE32_OUT_FLOAT( vb[1], y - sz ); for (j = 2 ; j < vertsize ; j++) - vb[j] = tmp->ui[j]; + LE32_OUT( vb[j], tmp->ui[j] ); + #else - int vertsize = r128ctx->vertsize; - CARD32 *vb = r128AllocVerticesInline( r128ctx, 1 ); + int vertsize = rmesa->vertsize; + CARD32 *vb = r128AllocVerticesInline( rmesa, 1 ); int j; #if defined (USE_X86_ASM) - /* GTH: We can safely assume the vertex stride is some number of + /* GH: We can safely assume the vertex stride is some number of * dwords, and thus a "rep movsd" is okay. The vb pointer is * automagically updated with this instruction, so we don't have * to manually take care of incrementing it. @@ -317,4 +339,4 @@ } #endif -#endif /* _R128_TRIS_H_ */ +#endif /* __R128_TRIS_H__ */ Index: xc/lib/GL/mesa/src/drv/r128/r128_tritmp.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_tritmp.h:1.4 xc/lib/GL/mesa/src/drv/r128/r128_tritmp.h:1.5 --- xc/lib/GL/mesa/src/drv/r128/r128_tritmp.h:1.4 Mon Dec 4 17:46:01 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_tritmp.h Sun Jan 7 20:07:24 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tritmp.h,v 1.4 2000/12/04 22:46:01 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tritmp.h,v 1.5 2001/01/08 01:07:24 martin Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -28,38 +28,31 @@ /* * Authors: - * Kevin E. Martin * Gareth Hughes + * Kevin E. Martin * */ -#if !defined(TAG) || !defined(IND) -this is an error -#endif - -/* Draw a single triangle. Note that the device-dependent vertex data - might need to be changed based on the render state. */ static __inline void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2, GLuint pv ) { - r128ContextPtr r128ctx = R128_CONTEXT(ctx); + r128ContextPtr rmesa = R128_CONTEXT(ctx); struct vertex_buffer *VB = ctx->VB; - r128VertexPtr r128verts = R128_DRIVER_DATA(VB)->verts; - r128Vertex *v[3]; + r128VertexPtr verts = R128_DRIVER_DATA(VB)->verts; + r128VertexPtr v[3]; #if (IND & R128_OFFSET_BIT) GLfloat offset; GLfloat z[3]; #endif - #if (IND & R128_TWOSIDE_BIT) GLuint c[3]; #endif - v[0] = &r128verts[e0]; - v[1] = &r128verts[e1]; - v[2] = &r128verts[e2]; + v[0] = &verts[e0]; + v[1] = &verts[e1]; + v[2] = &verts[e2]; #if (IND & R128_TWOSIDE_BIT) c[0] = v[0]->ui[4]; @@ -73,13 +66,13 @@ GLfloat ey = v[0]->v.y - v[2]->v.y; GLfloat fx = v[1]->v.x - v[2]->v.x; GLfloat fy = v[1]->v.y - v[2]->v.y; - GLfloat cc = ex*fy - ey*fx; + GLfloat cc = ex*fy - ey*fx; #if (IND & R128_TWOSIDE_BIT) { - GLuint facing = (cc > 0.0) ^ ctx->Polygon.FrontBit; + GLuint facing = ( cc > 0.0 ) ^ ctx->Polygon.FrontBit; GLubyte (*vbcolor)[4] = VB->Color[facing]->data; - if (IND & R128_FLAT_BIT) { + if ( IND & R128_FLAT_BIT ) { R128_COLOR( (char *)&v[0]->ui[4], vbcolor[pv] ); v[2]->ui[4] = v[1]->ui[4] = v[0]->ui[4]; } else { @@ -92,21 +85,21 @@ #if (IND & R128_OFFSET_BIT) { - offset = ctx->Polygon.OffsetUnits * r128ctx->depth_scale; + offset = ctx->Polygon.OffsetUnits * rmesa->depth_scale; z[0] = v[0]->v.z; z[1] = v[1]->v.z; z[2] = v[2]->v.z; - if (cc * cc > 1e-16) { - GLfloat ez = z[0] - z[2]; - GLfloat fz = z[1] - z[2]; - GLfloat a = ey*fz - ez*fy; - GLfloat b = ez*fx - ex*fz; - GLfloat ic = 1.0 / cc; - GLfloat ac = a * ic; - GLfloat bc = b * ic; - if (ac < 0.0f) ac = -ac; - if (bc < 0.0f) bc = -bc; - offset += MAX2(ac, bc) * ctx->Polygon.OffsetFactor; + if ( cc * cc > 1e-16 ) { + GLfloat ez = z[0] - z[2]; + GLfloat fz = z[1] - z[2]; + GLfloat a = ey*fz - ez*fy; + GLfloat b = ez*fx - ex*fz; + GLfloat ic = 1.0 / cc; + GLfloat ac = a * ic; + GLfloat bc = b * ic; + if ( ac < 0.0f ) ac = -ac; + if ( bc < 0.0f ) bc = -bc; + offset += MAX2( ac, bc ) * ctx->Polygon.OffsetFactor; } v[0]->v.z += offset; v[1]->v.z += offset; @@ -116,7 +109,7 @@ } #endif - r128_draw_triangle( r128ctx, v[0], v[1], v[2] ); + r128_draw_triangle( rmesa, v[0], v[1], v[2] ); #if (IND & R128_OFFSET_BIT) v[0]->v.z = z[0]; @@ -140,24 +133,23 @@ TAG(triangle)( ctx, e0, e1, e3, pv ); TAG(triangle)( ctx, e1, e2, e3, pv ); #else - r128ContextPtr r128ctx = R128_CONTEXT(ctx); + r128ContextPtr rmesa = R128_CONTEXT(ctx); struct vertex_buffer *VB = ctx->VB; - r128VertexPtr r128verts = R128_DRIVER_DATA(VB)->verts; - r128Vertex *v[4]; + r128VertexPtr verts = R128_DRIVER_DATA(VB)->verts; + r128VertexPtr v[4]; #if (IND & R128_OFFSET_BIT) GLfloat offset; GLfloat z[4]; #endif - #if (IND & R128_TWOSIDE_BIT) int c[4]; #endif - v[0] = &r128verts[e0]; - v[1] = &r128verts[e1]; - v[2] = &r128verts[e2]; - v[3] = &r128verts[e3]; + v[0] = &verts[e0]; + v[1] = &verts[e1]; + v[2] = &verts[e2]; + v[3] = &verts[e3]; #if (IND & R128_TWOSIDE_BIT) c[0] = v[0]->ui[4]; @@ -172,42 +164,42 @@ GLfloat ey = v[0]->v.y - v[2]->v.y; GLfloat fx = v[1]->v.x - v[2]->v.x; GLfloat fy = v[1]->v.y - v[2]->v.y; - GLfloat cc = ex*fy - ey*fx; + GLfloat cc = ex*fy - ey*fx; #if (IND & R128_TWOSIDE_BIT) { - GLuint facing = (cc > 0.0) ^ ctx->Polygon.FrontBit; + GLuint facing = ( cc > 0.0 ) ^ ctx->Polygon.FrontBit; GLubyte (*vbcolor)[4] = VB->Color[facing]->data; - if (IND & R128_FLAT_BIT) { - R128_COLOR((char *)&v[0]->ui[4], vbcolor[pv]); + if ( IND & R128_FLAT_BIT ) { + R128_COLOR( (char *)&v[0]->ui[4], vbcolor[pv] ); v[3]->ui[4] = v[2]->ui[4] = v[1]->ui[4] = v[0]->ui[4]; } else { - R128_COLOR((char *)&v[0]->ui[4], vbcolor[e0]); - R128_COLOR((char *)&v[1]->ui[4], vbcolor[e1]); - R128_COLOR((char *)&v[2]->ui[4], vbcolor[e2]); - R128_COLOR((char *)&v[3]->ui[4], vbcolor[e3]); + R128_COLOR( (char *)&v[0]->ui[4], vbcolor[e0] ); + R128_COLOR( (char *)&v[1]->ui[4], vbcolor[e1] ); + R128_COLOR( (char *)&v[2]->ui[4], vbcolor[e2] ); + R128_COLOR( (char *)&v[3]->ui[4], vbcolor[e3] ); } } #endif #if (IND & R128_OFFSET_BIT) { - offset = ctx->Polygon.OffsetUnits * r128ctx->depth_scale; + offset = ctx->Polygon.OffsetUnits * rmesa->depth_scale; z[0] = v[0]->v.z; z[1] = v[1]->v.z; z[2] = v[2]->v.z; z[3] = v[3]->v.z; - if (cc * cc > 1e-16) { - GLfloat ez = z[0] - z[2]; - GLfloat fz = z[1] - z[2]; - GLfloat a = ey*fz - ez*fy; - GLfloat b = ez*fx - ex*fz; - GLfloat ic = 1.0 / cc; - GLfloat ac = a * ic; - GLfloat bc = b * ic; - if (ac < 0.0f) ac = -ac; - if (bc < 0.0f) bc = -bc; - offset += MAX2(ac, bc) * ctx->Polygon.OffsetFactor; + if ( cc * cc > 1e-16 ) { + GLfloat ez = z[0] - z[2]; + GLfloat fz = z[1] - z[2]; + GLfloat a = ey*fz - ez*fy; + GLfloat b = ez*fx - ex*fz; + GLfloat ic = 1.0 / cc; + GLfloat ac = a * ic; + GLfloat bc = b * ic; + if ( ac < 0.0f ) ac = -ac; + if ( bc < 0.0f ) bc = -bc; + offset += MAX2( ac, bc ) * ctx->Polygon.OffsetFactor; } v[0]->v.z += offset; v[1]->v.z += offset; @@ -218,7 +210,7 @@ } #endif - r128_draw_quad( r128ctx, v[0], v[1], v[2], v[3] ); + r128_draw_quad( rmesa, v[0], v[1], v[2], v[3] ); #if (IND & R128_OFFSET_BIT) v[0]->v.z = z[0]; @@ -237,23 +229,15 @@ } -/* Draw a single line. Note that the device-dependent vertex data - * might need to be changed based on the render state. - * - * Polygon offset for GL_LINE triangles is dependent on a harness in - * core mesa setting up LineZoffset on a per-triangle basis. - * - * Twosided lighting for GL_LINE triangles is dependent on the same - * harness. - */ static void TAG(line)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint pv ) { - r128ContextPtr r128ctx = R128_CONTEXT(ctx); - r128VertexPtr r128verts = R128_DRIVER_DATA(ctx->VB)->verts; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + struct vertex_buffer *VB = ctx->VB; + r128VertexPtr verts = R128_DRIVER_DATA(VB)->verts; GLfloat width = ctx->Line.Width; - r128Vertex *v[2]; + r128VertexPtr v[2]; #if (IND & R128_OFFSET_BIT) GLfloat offset; @@ -263,8 +247,8 @@ int c[2]; #endif - v[0] = &r128verts[e0]; - v[1] = &r128verts[e1]; + v[0] = &verts[e0]; + v[1] = &verts[e1]; #if (IND & R128_TWOSIDE_BIT) c[0] = v[0]->ui[4]; @@ -274,7 +258,7 @@ #if (IND & R128_TWOSIDE_BIT) { GLubyte (*vbcolor)[4] = ctx->VB->ColorPtr->data; - if (IND & R128_FLAT_BIT) { + if ( IND & R128_FLAT_BIT ) { R128_COLOR( (char *)&v[0]->ui[4], vbcolor[pv] ); v[1]->ui[4] = v[0]->ui[4]; } else { @@ -285,14 +269,14 @@ #endif #if (IND & R128_OFFSET_BIT) - offset = ctx->LineZoffset * r128ctx->depth_scale; + offset = ctx->LineZoffset * rmesa->depth_scale; z[0] = v[0]->v.z; z[1] = v[1]->v.z; v[0]->v.z += offset; v[1]->v.z += offset; #endif - r128_draw_line( r128ctx, v[0], v[1], width ); + r128_draw_line( rmesa, v[0], v[1], width ); #if (IND & R128_OFFSET_BIT) v[0]->v.z = z[0]; @@ -303,81 +287,46 @@ v[0]->ui[4] = c[0]; v[1]->ui[4] = c[1]; #endif - -#if 0 - - - if (IND & (R128_TWOSIDE_BIT|R128_FLAT_BIT|R128_OFFSET_BIT)) { - r128Vertex tmp0 = r128verts[e0]; - r128Vertex tmp1 = r128verts[e1]; - - if (IND & R128_TWOSIDE_BIT) { - GLubyte (*vbcolor)[4] = ctx->VB->ColorPtr->data; - - if (IND & R128_FLAT_BIT) { - R128_COLOR((char *)&tmp0.v.color, vbcolor[pv]); - *(int *)&tmp1.v.color = *(int *)&tmp0.v.color; - } else { - R128_COLOR((char *)&tmp0.v.color, vbcolor[e0]); - R128_COLOR((char *)&tmp1.v.color, vbcolor[e1]); - } - } else if (IND & R128_FLAT_BIT) { - *(int *)&tmp0.v.color = *(int *)&r128verts[pv].v.color; - *(int *)&tmp1.v.color = *(int *)&r128verts[pv].v.color; - } - - if (IND & R128_OFFSET_BIT) { - GLfloat offset = ctx->LineZoffset * r128ctx->depth_scale; - tmp0.v.z += offset; - tmp1.v.z += offset; - } - - r128_draw_line( r128ctx, &tmp0, &tmp1, width ); - } else { - r128_draw_line( r128ctx, &r128verts[e0], &r128verts[e1], width ); - } -#endif } -/* Draw a set of points. Note that the device-dependent vertex data - might need to be changed based on the render state. */ -static void TAG(points)(GLcontext *ctx, - GLuint first, GLuint last) -{ - r128ContextPtr r128ctx = R128_CONTEXT(ctx); - struct vertex_buffer *VB = ctx->VB; - r128VertexPtr r128verts = R128_DRIVER_DATA(VB)->verts; - GLfloat size = ctx->Point.Size * 0.5; - int i; - - for(i = first; i < last; i++) { - if(VB->ClipMask[i] == 0) { - if (IND & (R128_TWOSIDE_BIT|R128_OFFSET_BIT)) { - r128Vertex tmp0 = r128verts[i]; +static void TAG(points)( GLcontext *ctx, + GLuint first, GLuint last ) +{ + r128ContextPtr rmesa = R128_CONTEXT(ctx); + struct vertex_buffer *VB = ctx->VB; + r128VertexPtr verts = R128_DRIVER_DATA(VB)->verts; + GLfloat size = ctx->Point.Size * 0.5; + int i; + + for ( i = first ; i < last ; i++) { + if ( VB->ClipMask[i] == 0 ) { + if ( IND & (R128_TWOSIDE_BIT|R128_OFFSET_BIT) ) { + r128Vertex tmp0 = verts[i]; - if (IND & R128_TWOSIDE_BIT) { + if ( IND & R128_TWOSIDE_BIT ) { GLubyte (*vbcolor)[4] = VB->ColorPtr->data; - R128_COLOR((char *)&tmp0.v.color, vbcolor[i]); + R128_COLOR( (char *)&tmp0.v.color, vbcolor[i] ); } - if (IND & R128_OFFSET_BIT) { - GLfloat offset = ctx->PointZoffset * r128ctx->depth_scale; + if ( IND & R128_OFFSET_BIT ) { + GLfloat offset = ctx->PointZoffset * rmesa->depth_scale; tmp0.v.z += offset; } - r128_draw_point( r128ctx, &tmp0, size ); - } else - r128_draw_point( r128ctx, &r128verts[i], size ); + r128_draw_point( rmesa, &tmp0, size ); + } else { + r128_draw_point( rmesa, &verts[i], size ); + } } } } + -/* Initialize the table of primitives to render. */ -static void TAG(init)(void) +static void TAG(init)( void ) { - rast_tab[IND].triangle = TAG(triangle); - rast_tab[IND].quad = TAG(quad); - rast_tab[IND].line = TAG(line); - rast_tab[IND].points = TAG(points); + rast_tab[IND].points = TAG(points); + rast_tab[IND].line = TAG(line); + rast_tab[IND].triangle = TAG(triangle); + rast_tab[IND].quad = TAG(quad); } #undef IND Index: xc/lib/GL/mesa/src/drv/r128/r128_vb.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_vb.c:1.10 xc/lib/GL/mesa/src/drv/r128/r128_vb.c:1.11 --- xc/lib/GL/mesa/src/drv/r128/r128_vb.c:1.10 Tue Dec 12 12:17:08 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_vb.c Sun Jan 7 20:07:24 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_vb.c,v 1.10 2000/12/12 17:17:08 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_vb.c,v 1.11 2001/01/08 01:07:24 martin Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -28,8 +28,8 @@ /* * Authors: - * Kevin E. Martin * Gareth Hughes + * Kevin E. Martin * */ @@ -78,10 +78,10 @@ #define TEX0_4 \ do { \ - if (VB->TexCoordPtr[0]->size == 4) { \ + if ( VB->TexCoordPtr[0]->size == 4 ) { \ GLfloat (*tc)[4] = VB->TexCoordPtr[0]->data; \ v = &(R128_DRIVER_DATA(VB)->verts[start]); \ - for (i = start; i < end; i++, v++) { \ + for ( i = start ; i < end ; i++, v++ ) { \ float oow = 1.0 / tc[i][3]; \ v->v.rhw *= tc[i][3]; \ v->v.tu0 *= oow; \ @@ -94,10 +94,10 @@ #define TEX1_4 \ do { \ - if (VB->TexCoordPtr[1]->size == 4) { \ + if ( VB->TexCoordPtr[1]->size == 4 ) { \ GLfloat (*tc)[4] = VB->TexCoordPtr[1]->data; \ v = &(R128_DRIVER_DATA(VB)->verts[start]); \ - for (i = start; i < end; i++, v++) { \ + for ( i = start ; i < end ; i++, v++ ) { \ float oow = 1.0 / tc[i][3]; \ v->v.rhw2 *= tc[i][3]; \ v->v.tu1 *= oow; \ @@ -109,9 +109,9 @@ #define COORD \ do { \ GLfloat *win = VB->Win.data[i]; \ - v->v.x = win[0] + SUBPIXEL_X; \ - v->v.y = r128height - win[1] + SUBPIXEL_Y; \ - v->v.z = scale * win[2]; \ + v->v.x = win[0] + xoffset; \ + v->v.y = - win[1] + yoffset; \ + v->v.z = depth_scale * win[2]; \ v->v.rhw = v->v.rhw2 = win[3]; \ } while (0) @@ -122,43 +122,44 @@ #define COORD \ do { \ GLfloat *win = VB->Win.data[i]; \ - v->v.x = win[0] + SUBPIXEL_X; \ - v->v.y = r128height - win[1] + SUBPIXEL_Y; \ - v->v.z = scale * win[2]; \ - v->v.rhw = win[3]; \ + v->v.x = win[0] + xoffset; \ + v->v.y = - win[1] + yoffset; \ + v->v.z = depth_scale * win[2]; \ + v->v.rhw = win[3]; \ } while (0) #endif /* USE_RHW2 */ #define NOP -/* Setup the r128 vertex buffer entries */ + #define SETUPFUNC(name,win,col,tex0,tex1,tex0_4,tex1_4,spec,fog) \ -static void name(struct vertex_buffer *VB, GLuint start, GLuint end) \ +static void name( struct vertex_buffer *VB, GLuint start, GLuint end ) \ { \ - r128ContextPtr r128ctx = R128_CONTEXT(VB->ctx); \ - __DRIdrawablePrivate *dPriv = r128ctx->driDrawable; \ - r128VertexPtr v; \ - GLfloat (*tc0)[4]; \ - GLfloat (*tc1)[4]; \ - GLfloat r128height = dPriv->h; \ - GLfloat scale = r128ctx->depth_scale; \ - int i; \ + r128ContextPtr rmesa = R128_CONTEXT(VB->ctx); \ + __DRIdrawablePrivate *dPriv = rmesa->driDrawable; \ + r128VertexPtr v; \ + GLfloat (*tc0)[4]; \ + GLfloat (*tc1)[4]; \ + const GLfloat depth_scale = rmesa->depth_scale; \ + const GLfloat xoffset = SUBPIXEL_X; \ + const GLfloat yoffset = dPriv->h + SUBPIXEL_Y; \ + GLint i; \ \ - (void) r128height; (void) r128ctx; (void) scale; \ + (void) xoffset; (void) yoffset; (void) depth_scale; \ \ - gl_import_client_data(VB, VB->ctx->RenderFlags, \ - (VB->ClipOrMask \ - ? VEC_WRITABLE | VEC_GOOD_STRIDE \ - : VEC_GOOD_STRIDE)); \ + gl_import_client_data( VB, VB->ctx->RenderFlags, \ + (VB->ClipOrMask \ + ? VEC_WRITABLE | VEC_GOOD_STRIDE \ + : VEC_GOOD_STRIDE) ); \ \ - tc0 = VB->TexCoordPtr[r128ctx->tmu_source[0]]->data; \ - tc1 = VB->TexCoordPtr[r128ctx->tmu_source[1]]->data; \ + tc0 = VB->TexCoordPtr[rmesa->tmu_source[0]]->data; \ + tc1 = VB->TexCoordPtr[rmesa->tmu_source[1]]->data; \ \ v = &(R128_DRIVER_DATA(VB)->verts[start]); \ \ - if (VB->ClipOrMask == 0) { \ - for (i = start; i < end; i++, v++) { \ + if ( VB->ClipOrMask == 0 ) { \ + for ( i = start ; i < end ; i++, v++ ) { \ win; \ col; \ spec; \ @@ -167,8 +168,8 @@ tex1; \ } \ } else { \ - for (i = start; i < end; i++, v++) { \ - if (VB->ClipMask[i] == 0) { \ + for ( i = start ; i < end ; i++, v++ ) { \ + if ( VB->ClipMask[i] == 0 ) { \ win; \ spec; \ fog; \ @@ -221,20 +222,23 @@ static void rs_invalid( struct vertex_buffer *VB, GLuint start, GLuint end ) { - fprintf(stderr, "r128RasterSetup(): invalid setup function\n"); + fprintf( stderr, "r128RasterSetup(): invalid setup function\n" ); } + +typedef void (*setupFunc)( struct vertex_buffer *, GLuint, GLuint ); +static setupFunc setup_func[R128_MAX_SETUPFUNC]; -typedef void (*setupFunc)(struct vertex_buffer *, GLuint, GLuint); -static setupFunc setup_func[0x40]; -/* Initialize the table of vertex buffer setup functions */ void r128DDSetupInit( void ) { - int i; + GLint i; - for (i = 0; i < 0x20; i++) setup_func[i] = rs_invalid; + for ( i = 0 ; i < R128_MAX_SETUPFUNC ; i++ ) { + setup_func[i] = rs_invalid; + } - /* Functions to build vertices from scratch */ + /* Functions to build vertices from scratch + */ setup_func[R128_WIN_BIT|R128_TEX0_BIT] = rs_wt0; setup_func[R128_WIN_BIT|R128_TEX0_BIT|R128_TEX1_BIT] = rs_wt0t1; setup_func[R128_WIN_BIT|R128_FOG_BIT|R128_TEX0_BIT] = rs_wft0; @@ -252,7 +256,8 @@ setup_func[R128_WIN_BIT|R128_RGBA_BIT|R128_FOG_BIT|R128_SPEC_BIT|R128_TEX0_BIT] = rs_wgfst0; setup_func[R128_WIN_BIT|R128_RGBA_BIT|R128_FOG_BIT|R128_SPEC_BIT|R128_TEX0_BIT|R128_TEX1_BIT] = rs_wgfst0t1; - /* Repair functions */ + /* Repair functions + */ setup_func[R128_TEX0_BIT] = rs_t0; setup_func[R128_TEX0_BIT|R128_TEX1_BIT] = rs_t0t1; setup_func[R128_FOG_BIT] = rs_f; @@ -272,6 +277,7 @@ setup_func[R128_RGBA_BIT|R128_FOG_BIT|R128_SPEC_BIT|R128_TEX0_BIT|R128_TEX1_BIT] = rs_gfst0t1; } + void r128PrintSetupFlags( char *msg, GLuint flags ) { fprintf( stderr, "%s: %d %s%s%s%s%s%s\n", @@ -285,29 +291,31 @@ (flags & R128_TEX1_BIT) ? " tex-1," : "" ); } + /* Initialize the vertex buffer setup functions based on the current - rendering state */ + * rendering state. + */ void r128DDChooseRasterSetupFunc( GLcontext *ctx ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); - int index = R128_WIN_BIT | R128_RGBA_BIT; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + GLint index = R128_WIN_BIT | R128_RGBA_BIT; - r128ctx->multitex = 0; - r128ctx->vertsize = 8; - r128ctx->vc_format = R128_TEX0_VERTEX_FORMAT; - r128ctx->tmu_source[0] = 0; - r128ctx->tmu_source[1] = 1; - r128ctx->tex_dest[0] = R128_TEX0_BIT; - r128ctx->tex_dest[1] = R128_TEX1_BIT; - r128ctx->blend_flags &= ~R128_BLEND_MULTITEX; + rmesa->multitex = 0; + rmesa->vertsize = 8; + rmesa->vc_format = R128_TEX0_VERTEX_FORMAT; + rmesa->tmu_source[0] = 0; + rmesa->tmu_source[1] = 1; + rmesa->tex_dest[0] = R128_TEX0_BIT; + rmesa->tex_dest[1] = R128_TEX1_BIT; + rmesa->blend_flags &= ~R128_BLEND_MULTITEX; if ( ctx->Texture.ReallyEnabled & ENABLE_TEX0 ) { - if ( ctx->Texture.Unit[0].EnvMode == GL_BLEND && - (r128ctx->env_color & 0x00ffffff) ) { - r128ctx->multitex = 1; - r128ctx->vertsize = 10; - r128ctx->vc_format = R128_TEX1_VERTEX_FORMAT; - r128ctx->tmu_source[1] = 0; + if ( R128_IS_PLAIN( rmesa ) && /* Pro/M3 support GL_BLEND */ + ctx->Texture.Unit[0].EnvMode == GL_BLEND && rmesa->env_color ) { + rmesa->multitex = 1; + rmesa->vertsize = 10; + rmesa->vc_format = R128_TEX1_VERTEX_FORMAT; + rmesa->tmu_source[1] = 0; index |= R128_TEX1_BIT; } @@ -316,23 +324,24 @@ if ( ctx->Texture.ReallyEnabled & ENABLE_TEX1 ) { if ( ctx->Texture.ReallyEnabled & ENABLE_TEX0 ) { - r128ctx->multitex = 1; - r128ctx->vertsize = 10; - r128ctx->vc_format = R128_TEX1_VERTEX_FORMAT; - r128ctx->blend_flags |= R128_BLEND_MULTITEX; + rmesa->multitex = 1; + rmesa->vertsize = 10; + rmesa->vc_format = R128_TEX1_VERTEX_FORMAT; + if ( R128_IS_PLAIN( rmesa ) ) /* Pro/M3 support GL_BLEND */ + rmesa->blend_flags |= R128_BLEND_MULTITEX; index |= R128_TEX1_BIT; } else { /* Just a funny way of doing single texturing. */ - r128ctx->tmu_source[0] = 1; - r128ctx->tex_dest[1] = R128_TEX0_BIT; + rmesa->tmu_source[0] = 1; + rmesa->tex_dest[1] = R128_TEX0_BIT; - if ( ctx->Texture.Unit[1].EnvMode == GL_BLEND && - (r128ctx->env_color & 0x00ffffff) ) { - r128ctx->multitex = 1; - r128ctx->vertsize = 10; - r128ctx->vc_format = R128_TEX1_VERTEX_FORMAT; - r128ctx->tmu_source[1] = 1; + if ( R128_IS_PLAIN( rmesa ) && /* Pro/M3 support GL_BLEND */ + ctx->Texture.Unit[1].EnvMode == GL_BLEND && rmesa->env_color ) { + rmesa->multitex = 1; + rmesa->vertsize = 10; + rmesa->vc_format = R128_TEX1_VERTEX_FORMAT; + rmesa->tmu_source[1] = 1; index |= R128_TEX1_BIT; } @@ -351,57 +360,61 @@ r128PrintSetupFlags( "full setup function", index ); } - r128ctx->new_state |= R128_NEW_TEXTURE; - r128ctx->SetupIndex = index; + rmesa->new_state |= R128_NEW_TEXTURE; + rmesa->SetupIndex = index; ctx->Driver.RasterSetup = setup_func[index]; } -/* Check to see if any updates of the vertex buffer entries are needed */ +/* Check to see if any updates of the vertex buffer entries are needed. + */ void r128DDCheckPartialRasterSetup( GLcontext *ctx, struct gl_pipeline_stage *s ) { - r128ContextPtr r128ctx = R128_CONTEXT( ctx ); - int tmp = r128ctx->SetupDone; + r128ContextPtr rmesa = R128_CONTEXT( ctx ); + GLint tmp = rmesa->SetupDone; s->type = 0; - r128ctx->SetupDone = GL_FALSE; + rmesa->SetupDone = 0; - if ((ctx->Array.Summary & VERT_OBJ_ANY) == 0) return; - if (ctx->IndirectTriangles) return; + if ( (ctx->Array.Summary & VERT_OBJ_ANY) == 0 ) + return; - r128ctx->SetupDone = tmp; -} + if ( ctx->IndirectTriangles ) + return; + rmesa->SetupDone = tmp; +} -/* Update the vertex buffer entries, if necessary */ +/* Repair existing precalculated vertices with new data. + */ void r128DDPartialRasterSetup( struct vertex_buffer *VB ) { - r128ContextPtr r128ctx = R128_CONTEXT( VB->ctx ); - int new = VB->pipeline->new_outputs; - int available = VB->pipeline->outputs; - int index = 0; + r128ContextPtr rmesa = R128_CONTEXT(VB->ctx); + GLuint new = VB->pipeline->new_outputs; + GLuint available = VB->pipeline->outputs; + GLuint index = 0; - if (new & VERT_WIN) { + if ( new & VERT_WIN ) { new = available; index |= R128_WIN_BIT | R128_FOG_BIT; } - if (new & VERT_RGBA) + if ( new & VERT_RGBA ) index |= R128_RGBA_BIT | R128_SPEC_BIT; - if (new & VERT_TEX0_ANY) + if ( new & VERT_TEX0_ANY ) index |= R128_TEX0_BIT; - if (new & VERT_TEX1_ANY) - index |= r128ctx->tex_dest[1]; + if ( new & VERT_TEX1_ANY ) + index |= rmesa->tex_dest[1]; - if (new & VERT_FOG_COORD) + if ( new & VERT_FOG_COORD ) index |= R128_FOG_BIT; - r128ctx->SetupDone &= ~index; - index &= r128ctx->SetupIndex; - r128ctx->SetupDone |= index; + rmesa->SetupDone &= ~index; + index &= rmesa->SetupIndex; + rmesa->SetupDone |= index; if ( R128_DEBUG & DEBUG_VERBOSE_MSG ) r128PrintSetupFlags( "partial setup function", index ); @@ -410,7 +423,6 @@ setup_func[index]( VB, VB->Start, VB->Count ); } -/* Perform the raster setup for the fast path, if using CVA */ void r128DDDoRasterSetup( struct vertex_buffer *VB ) { GLcontext *ctx = VB->ctx; @@ -418,87 +430,85 @@ if ( VB->Type == VB_CVA_PRECALC ) { r128DDPartialRasterSetup( VB ); } else if ( ctx->Driver.RasterSetup ) { - ctx->Driver.RasterSetup( VB, - VB->CopyStart, - VB->Count ); + ctx->Driver.RasterSetup( VB, VB->CopyStart, VB->Count ); } } + + +/* ================================================================ + * Hardware-format vertex buffers + */ -/* Resize an existing vertex buffer */ void r128DDResizeVB( struct vertex_buffer *VB, GLuint size ) { - r128VertexBufferPtr r128vb = R128_DRIVER_DATA(VB); + r128VertexBufferPtr rvb = R128_DRIVER_DATA(VB); - while ( r128vb->size < size ) - r128vb->size *= 2; + while ( rvb->size < size ) + rvb->size *= 2; - ALIGN_FREE( r128vb->vert_store ); - r128vb->vert_store = ALIGN_MALLOC( sizeof(r128Vertex) * r128vb->size, 32 ); - if ( !r128vb->vert_store ) { + ALIGN_FREE( rvb->vert_store ); + rvb->vert_store = ALIGN_MALLOC( sizeof(r128Vertex) * rvb->size, 32 ); + if ( !rvb->vert_store ) { fprintf( stderr, "Cannot allocate vertex store! Exiting...\n" ); exit( 1 ); } - r128vb->verts = (r128VertexPtr)r128vb->vert_store; + rvb->verts = (r128VertexPtr)rvb->vert_store; - gl_vector1ui_free( &r128vb->clipped_elements ); - gl_vector1ui_alloc( &r128vb->clipped_elements, - VEC_WRITABLE, r128vb->size, 32 ); - if ( !r128vb->clipped_elements.start ) { + gl_vector1ui_free( &rvb->clipped_elements ); + gl_vector1ui_alloc( &rvb->clipped_elements, VEC_WRITABLE, rvb->size, 32 ); + if ( !rvb->clipped_elements.start ) { fprintf( stderr, "Cannot allocate clipped elements! Exiting...\n" ); exit( 1 ); } ALIGN_FREE( VB->ClipMask ); - VB->ClipMask = (GLubyte *)ALIGN_MALLOC( sizeof(GLubyte) * r128vb->size, 32 ); + VB->ClipMask = (GLubyte *)ALIGN_MALLOC( sizeof(GLubyte) * rvb->size, 32 ); if ( !VB->ClipMask ) { fprintf( stderr, "Cannot allocate clipmask! Exiting...\n" ); exit( 1 ); } } -/* Create a new device-dependent vertex buffer */ void r128DDRegisterVB( struct vertex_buffer *VB ) { - r128VertexBufferPtr r128vb; + r128VertexBufferPtr rvb; - r128vb = (r128VertexBufferPtr)CALLOC( sizeof(*r128vb) ); + rvb = (r128VertexBufferPtr)CALLOC( sizeof(*rvb) ); - r128vb->size = VB->Size * 2; - r128vb->vert_store = ALIGN_MALLOC( sizeof(r128Vertex) * r128vb->size, 32 ); - if ( !r128vb->vert_store ) { + rvb->size = VB->Size * 2; + rvb->vert_store = ALIGN_MALLOC( sizeof(r128Vertex) * rvb->size, 32 ); + if ( !rvb->vert_store ) { fprintf( stderr, "Cannot allocate vertex store! Exiting...\n" ); exit( 1 ); } - r128vb->verts = (r128VertexPtr)r128vb->vert_store; + rvb->verts = (r128VertexPtr)rvb->vert_store; - gl_vector1ui_alloc( &r128vb->clipped_elements, - VEC_WRITABLE, r128vb->size, 32 ); - if ( !r128vb->clipped_elements.start ) { + gl_vector1ui_alloc( &rvb->clipped_elements, VEC_WRITABLE, rvb->size, 32 ); + if ( !rvb->clipped_elements.start ) { fprintf( stderr, "Cannot allocate clipped elements! Exiting...\n" ); exit( 1 ); } ALIGN_FREE( VB->ClipMask ); - VB->ClipMask = (GLubyte *)ALIGN_MALLOC( sizeof(GLubyte) * r128vb->size, 32 ); + VB->ClipMask = (GLubyte *)ALIGN_MALLOC( sizeof(GLubyte) * rvb->size, 32 ); if ( !VB->ClipMask ) { fprintf( stderr, "Cannot allocate clipmask! Exiting...\n" ); exit( 1 ); } - VB->driver_data = r128vb; + VB->driver_data = rvb; } -/* Destroy a device-dependent vertex buffer */ void r128DDUnregisterVB( struct vertex_buffer *VB ) { - r128VertexBufferPtr r128vb = R128_DRIVER_DATA(VB); + r128VertexBufferPtr rvb = R128_DRIVER_DATA(VB); - if ( r128vb ) { - if ( r128vb->vert_store ) ALIGN_FREE( r128vb->vert_store ); - gl_vector1ui_free( &r128vb->clipped_elements ); - FREE( r128vb ); + if ( rvb ) { + if ( rvb->vert_store ) ALIGN_FREE( rvb->vert_store ); + gl_vector1ui_free( &rvb->clipped_elements ); + FREE( rvb ); VB->driver_data = 0; } } Index: xc/lib/GL/mesa/src/drv/r128/r128_vb.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_vb.h:1.3 xc/lib/GL/mesa/src/drv/r128/r128_vb.h:1.6 --- xc/lib/GL/mesa/src/drv/r128/r128_vb.h:1.3 Mon Dec 4 14:21:48 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_vb.h Tue Apr 10 13:53:07 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_vb.h,v 1.3 2000/12/04 19:21:48 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_vb.h,v 1.6 2001/04/10 17:53:07 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -28,80 +28,88 @@ /* * Authors: - * Kevin E. Martin * Gareth Hughes + * Kevin E. Martin + * Michel Dänzer * */ -#ifndef _R128_VB_H_ -#define _R128_VB_H_ +#ifndef __R128_VB_H__ +#define __R128_VB_H__ #ifdef GLX_DIRECT_RENDERING -/* FIXME: This is endian-specific */ +#include "X11/Xarch.h" +#if X_BYTE_ORDER == X_LITTLE_ENDIAN +typedef struct { + GLubyte blue; + GLubyte green; + GLubyte red; + GLubyte alpha; +} r128_color_t; +#else typedef struct { - GLubyte blue; - GLubyte green; - GLubyte red; - GLubyte alpha; + GLubyte alpha; + GLubyte red; + GLubyte green; + GLubyte blue; } r128_color_t; +#endif /* The vertex structure. The final tu1/tv1 values are only used in * multitexture modes, and the rhw2 value is currently never used. */ typedef struct { - GLfloat x, y, z; /* Coordinates in screen space */ - GLfloat rhw; /* Reciprocal homogeneous w */ - r128_color_t color; /* Diffuse color */ - r128_color_t specular; /* Specular color (alpha is fog) */ - GLfloat tu0, tv0; /* Texture 0 coordinates */ - GLfloat tu1, tv1; /* Texture 1 coordinates */ - GLfloat rhw2; /* Reciprocal homogeneous w2 */ + GLfloat x, y, z; /* Coordinates in screen space */ + GLfloat rhw; /* Reciprocal homogeneous w */ + r128_color_t color; /* Diffuse color */ + r128_color_t specular; /* Specular color (alpha is fog) */ + GLfloat tu0, tv0; /* Texture 0 coordinates */ + GLfloat tu1, tv1; /* Texture 1 coordinates */ + GLfloat rhw2; /* Reciprocal homogeneous w2 */ } r128_vertex; -/* Format of vertices in r128_vertex struct */ -#define R128_TEX0_VERTEX_FORMAT \ - R128_CCE_VC_FRMT_RHW | \ - R128_CCE_VC_FRMT_DIFFUSE_ARGB | \ - R128_CCE_VC_FRMT_SPEC_FRGB | \ - R128_CCE_VC_FRMT_S_T - -#define R128_TEX1_VERTEX_FORMAT \ - R128_CCE_VC_FRMT_RHW | \ - R128_CCE_VC_FRMT_DIFFUSE_ARGB | \ - R128_CCE_VC_FRMT_SPEC_FRGB | \ - R128_CCE_VC_FRMT_S_T | \ - R128_CCE_VC_FRMT_S2_T2 - -#define R128_PROJ_TEX1_VERTEX_FORMAT \ - R128_CCE_VC_FRMT_RHW | \ - R128_CCE_VC_FRMT_DIFFUSE_ARGB | \ - R128_CCE_VC_FRMT_SPEC_FRGB | \ - R128_CCE_VC_FRMT_S_T | \ - R128_CCE_VC_FRMT_S2_T2 | \ - R128_CCE_VC_FRMT_RHW2 +/* Format of vertices in r128_vertex struct: + */ +#define R128_TEX0_VERTEX_FORMAT (R128_CCE_VC_FRMT_RHW | \ + R128_CCE_VC_FRMT_DIFFUSE_ARGB |\ + R128_CCE_VC_FRMT_SPEC_FRGB | \ + R128_CCE_VC_FRMT_S_T) + +#define R128_TEX1_VERTEX_FORMAT (R128_CCE_VC_FRMT_RHW | \ + R128_CCE_VC_FRMT_DIFFUSE_ARGB |\ + R128_CCE_VC_FRMT_SPEC_FRGB | \ + R128_CCE_VC_FRMT_S_T | \ + R128_CCE_VC_FRMT_S2_T2) + +#define R128_PROJ_TEX1_VERTEX_FORMAT (R128_CCE_VC_FRMT_RHW | \ + R128_CCE_VC_FRMT_DIFFUSE_ARGB |\ + R128_CCE_VC_FRMT_SPEC_FRGB | \ + R128_CCE_VC_FRMT_S_T | \ + R128_CCE_VC_FRMT_S2_T2 | \ + R128_CCE_VC_FRMT_RHW2) -/* FIXME: We currently only have assembly for 16-stride vertices */ +/* The fastpath code still expects a 16-float stride vertex. + */ union r128_vertex_t { - r128_vertex v; - GLfloat f[16]; - CARD32 ui[16]; + r128_vertex v; + GLfloat f[16]; + GLuint ui[16]; }; typedef union r128_vertex_t r128Vertex; typedef union r128_vertex_t *r128VertexPtr; -/* Vertex buffer for use when on the fast path */ typedef struct { - GLuint size; /* Number of vertices in store */ - void *vert_store; /* Storage for vertex buffer */ - r128VertexPtr verts; /* Aligned start of verts in storage */ - int last_vert; /* Index of last vertex used */ - GLvector1ui clipped_elements; /* List of clipped elements */ + r128VertexPtr verts; + GLvector1ui clipped_elements; + GLint last_vert; + void *vert_store; + GLuint size; } *r128VertexBufferPtr; -#define R128_DRIVER_DATA(vb) ((r128VertexBufferPtr)((vb)->driver_data)) +#define R128_DRIVER_DATA(vb) ((r128VertexBufferPtr)((vb)->driver_data)) #define R128_WIN_BIT 0x01 #define R128_RGBA_BIT 0x02 @@ -109,20 +117,21 @@ #define R128_SPEC_BIT 0x08 #define R128_TEX0_BIT 0x10 #define R128_TEX1_BIT 0x20 - -extern void r128DDSetupInit( void ); +#define R128_MAX_SETUPFUNC 0x40 extern void r128DDChooseRasterSetupFunc( GLcontext *ctx ); extern void r128PrintSetupFlags( char *msg, GLuint flags ); extern void r128DDCheckPartialRasterSetup( GLcontext *ctx, - struct gl_pipeline_stage *s ); -extern void r128DDPartialRasterSetup(struct vertex_buffer *VB); -extern void r128DDDoRasterSetup(struct vertex_buffer *VB); - -extern void r128DDResizeVB(struct vertex_buffer *VB, GLuint size); -extern void r128DDRegisterVB(struct vertex_buffer *VB); -extern void r128DDUnregisterVB(struct vertex_buffer *VB); + struct gl_pipeline_stage *s ); +extern void r128DDPartialRasterSetup( struct vertex_buffer *VB ); +extern void r128DDDoRasterSetup( struct vertex_buffer *VB ); + +extern void r128DDResizeVB( struct vertex_buffer *VB, GLuint size ); +extern void r128DDRegisterVB( struct vertex_buffer *VB ); +extern void r128DDUnregisterVB( struct vertex_buffer *VB ); + +extern void r128DDSetupInit( void ); #endif -#endif /* _R128_VB_H_ */ +#endif /* __R128_VB_H__ */ Index: xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c:1.4 xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c:1.8 --- xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c:1.4 Tue Dec 12 12:17:08 2000 +++ xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c Wed Mar 21 11:14:24 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c,v 1.4 2000/12/12 17:17:08 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c,v 1.8 2001/03/21 16:14:24 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -48,42 +48,77 @@ extern void __driRegisterExtensions( void ); -static r128ContextPtr r128Context = NULL; +static r128ContextPtr r128Ctx = NULL; -/* Initialize the driver specific screen private data */ -GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv) +/* Initialize the driver specific screen private data. + */ +GLboolean XMesaInitDriver( __DRIscreenPrivate *sPriv ) { - sPriv->private = (void *)r128CreateScreen(sPriv); - if (!sPriv->private) { - r128DestroyScreen(sPriv); - return GL_FALSE; - } + sPriv->private = (void *) r128CreateScreen( sPriv ); + + /* Check the DRI version */ + { + int major, minor, patch; + if ( XF86DRIQueryVersion( sPriv->display, &major, &minor, &patch ) ) { + if ( major != 4 || minor < 0 ) { + char msg[1000]; + sprintf( msg, "R128 DRI driver expected DRI version 4.0.x but got version %d.%d.%d", major, minor, patch ); + __driMesaMessage( msg ); + return GL_FALSE; + } + } + } + + /* Check that the DDX driver version is compatible */ + if ( sPriv->ddxMajor != 4 || + sPriv->ddxMinor < 0 ) { + char msg[1000]; + sprintf( msg, "R128 DRI driver expected DDX driver version 4.0.x but got version %d.%d.%d", sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch ); + __driMesaMessage( msg ); + return GL_FALSE; + } + + /* Check that the DRM driver version is compatible */ + if ( sPriv->drmMajor != 2 || + sPriv->drmMinor < 1 ) { + char msg[1000]; + sprintf( msg, "R128 DRI driver expected DRM driver version 2.1.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch ); + __driMesaMessage( msg ); + return GL_FALSE; + } + + if ( !sPriv->private ) { + r128DestroyScreen( sPriv ); + return GL_FALSE; + } - return GL_TRUE; + return GL_TRUE; } -/* Reset the driver specific screen private data */ -void XMesaResetDriver(__DRIscreenPrivate *sPriv) +/* Reset the driver specific screen private data. + */ +void XMesaResetDriver( __DRIscreenPrivate *sPriv ) { - r128DestroyScreen(sPriv); + r128DestroyScreen( sPriv ); } -/* Create and initialize the Mesa and driver specific visual data */ -GLvisual *XMesaCreateVisual(Display *dpy, - __DRIscreenPrivate *driScrnPriv, - const XVisualInfo *visinfo, - const __GLXvisualConfig *config) +/* Create and initialize the Mesa and driver specific visual data. + */ +GLvisual *XMesaCreateVisual( Display *dpy, + __DRIscreenPrivate *driScrnPriv, + const XVisualInfo *visinfo, + const __GLXvisualConfig *config ) { - /* Drivers may change the args to _mesa_create_visual() in order to - * setup special visuals. + /* Drivers may change the args to _mesa_create_visual() in order to + * setup special visuals. */ - return _mesa_create_visual(config->rgba, + return _mesa_create_visual( config->rgba, config->doubleBuffer, config->stereo, - _mesa_bitcount(visinfo->red_mask), - _mesa_bitcount(visinfo->green_mask), - _mesa_bitcount(visinfo->blue_mask), + _mesa_bitcount( visinfo->red_mask ), + _mesa_bitcount( visinfo->green_mask ), + _mesa_bitcount( visinfo->blue_mask ), config->alphaSize, 0, /* index bits */ config->depthSize, @@ -92,134 +127,192 @@ config->accumGreenSize, config->accumBlueSize, config->accumAlphaSize, - 0 /* num samples */); + 0 /* num samples */ ); } -/* Create and initialize the Mesa and driver specific context data */ -GLboolean XMesaCreateContext(Display *dpy, GLvisual *mesaVis, - __DRIcontextPrivate *driContextPriv) +/* Create and initialize the Mesa and driver specific context data. + */ +GLboolean XMesaCreateContext( Display *dpy, GLvisual *mesaVis, + __DRIcontextPrivate *driContextPriv ) { - return r128CreateContext(dpy, mesaVis, driContextPriv); + return r128CreateContext( dpy, mesaVis, driContextPriv ); } -/* Destroy the Mesa and driver specific context data */ +/* Destroy the Mesa and driver specific context data. + */ void XMesaDestroyContext(__DRIcontextPrivate *driContextPriv) { - r128ContextPtr r128ctx = (r128ContextPtr)driContextPriv->driverPrivate; + r128ContextPtr rmesa = (r128ContextPtr)driContextPriv->driverPrivate; - if (r128ctx == (void *)r128Context) r128Context = NULL; - r128DestroyContext(r128ctx); + if ( rmesa == r128Ctx ) r128Ctx = NULL; + r128DestroyContext(rmesa); } -/* Create and initialize the Mesa and driver specific pixmap buffer data */ -GLframebuffer *XMesaCreateWindowBuffer(Display *dpy, - __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, - GLvisual *mesaVis) -{ - return gl_create_framebuffer(mesaVis, - GL_FALSE, /* software depth buffer? */ - mesaVis->StencilBits > 0, - mesaVis->AccumRedBits > 0, - mesaVis->AlphaBits > 0 - ); +/* Create and initialize the Mesa and driver specific pixmap buffer + * data. + */ +GLframebuffer *XMesaCreateWindowBuffer( Display *dpy, + __DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + GLvisual *mesaVis ) +{ + GLboolean swStencil; + swStencil = (mesaVis->StencilBits > 0) /* && (mesaVis->RedBits < 8) */ ; + return gl_create_framebuffer( mesaVis, + GL_FALSE, /* software depth buffer? */ + swStencil, + mesaVis->AccumRedBits > 0, + GL_FALSE /* software alpha buffer? */ ); } -/* Create and initialize the Mesa and driver specific pixmap buffer data */ +/* Create and initialize the Mesa and driver specific pixmap buffer + * data. + */ GLframebuffer *XMesaCreatePixmapBuffer( Display *dpy, __DRIscreenPrivate *driScrnPriv, __DRIdrawablePrivate *driDrawPriv, - GLvisual *mesaVis) + GLvisual *mesaVis ) { #if 0 - /* Different drivers may have different combinations of hardware and - * software ancillary buffers. - */ - return gl_create_framebuffer(mesaVis, + /* Different drivers may have different combinations of hardware and + * software ancillary buffers. + */ + return gl_create_framebuffer( mesaVis, GL_FALSE, /* software depth buffer? */ mesaVis->StencilBits > 0, mesaVis->AccumRedBits > 0, - mesaVis->AlphaBits > 0); + mesaVis->AlphaBits > 0 ); #else - return NULL; /* not implemented yet */ + return NULL; /* not implemented yet */ #endif } /* Copy the back color buffer to the front color buffer */ -void XMesaSwapBuffers(__DRIdrawablePrivate *driDrawPriv) +void XMesaSwapBuffers( __DRIdrawablePrivate *driDrawPriv ) { - /* FIXME: This assumes buffer is currently bound to a context. This - needs to be able to swap buffers when not currently bound. Also, - this needs to swap according to buffer, and NOT according to - context! */ - if (r128Context == NULL) return; - - /* Only swap buffers when a back buffer exists */ - if (R128_MESACTX(r128Context)->Visual->DBflag) { - FLUSH_VB(R128_MESACTX(r128Context), "swap buffers"); - r128SwapBuffers(r128Context); - } + /* FIXME: This assumes buffer is currently bound to a context. This + * needs to be able to swap buffers when not currently bound. Also, + * this needs to swap according to buffer, and NOT according to + * context! + */ + if ( r128Ctx == NULL ) + return; + + /* Only swap buffers when a back buffer exists. + */ + if ( r128Ctx->glCtx->Visual->DBflag ) { + FLUSH_VB( r128Ctx->glCtx, "swap buffers" ); + if ( !r128Ctx->doPageFlip ) { + r128SwapBuffers( r128Ctx ); + } else { + r128PageFlip( r128Ctx ); + } + } } /* Force the context `c' to be the current context and associate with it - buffer `b' */ -GLboolean XMesaMakeCurrent(__DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv) + * buffer `b'. + */ +GLboolean XMesaMakeCurrent( __DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv ) { - if (driContextPriv) { - r128ContextPtr r128ctx = (r128ContextPtr)driContextPriv->driverPrivate; + if ( driContextPriv ) { + r128ContextPtr rmesa = (r128ContextPtr)driContextPriv->driverPrivate; - r128Context = r128MakeCurrent(r128Context, r128ctx, driDrawPriv); + r128Ctx = r128MakeCurrent( r128Ctx, rmesa, driDrawPriv ); - gl_make_current2(R128_MESACTX(r128Context), - driDrawPriv->mesaBuffer, driReadPriv->mesaBuffer); + gl_make_current2( r128Ctx->glCtx, + driDrawPriv->mesaBuffer, + driReadPriv->mesaBuffer ); - if (r128Context->driDrawable != driDrawPriv) { - r128Context->driDrawable = driDrawPriv; - r128Context->dirty = R128_UPLOAD_ALL; - } + if ( r128Ctx->driDrawable != driDrawPriv ) { + r128Ctx->driDrawable = driDrawPriv; + r128Ctx->dirty = R128_UPLOAD_ALL; + } - /* GH: We need this to correctly calculate the window offset - * and aux scissor rects. - */ - r128Context->new_state = R128_NEW_WINDOW | R128_NEW_CLIP; + /* GH: We need this to correctly calculate the window offset + * and aux scissor rects. + */ + r128Ctx->new_state = R128_NEW_WINDOW | R128_NEW_CLIP; - if (!R128_MESACTX(r128Context)->Viewport.Width) { - gl_Viewport(R128_MESACTX(r128Context), 0, 0, - driDrawPriv->w, driDrawPriv->h); - } - } else { - gl_make_current(0,0); - r128Context = NULL; - } + if ( !r128Ctx->glCtx->Viewport.Width ) { + gl_Viewport( r128Ctx->glCtx, 0, 0, driDrawPriv->w, driDrawPriv->h ); + } + } else { + gl_make_current( 0, 0 ); + r128Ctx = NULL; + } - return GL_TRUE; + return GL_TRUE; } -/* Force the context `c' to be unbound from its buffer */ -GLboolean XMesaUnbindContext(__DRIcontextPrivate *driContextPriv) +/* Force the context `c' to be unbound from its buffer. + */ +GLboolean XMesaUnbindContext( __DRIcontextPrivate *driContextPriv ) { - return GL_TRUE; + return GL_TRUE; } /* This function is called by libGL.so as soon as libGL.so is loaded. - * This is where we'd register new extension functions with the dispatcher. + * This is where we'd register new extension functions with the + * dispatcher. */ void __driRegisterExtensions( void ) { } +/* Initialize the fullscreen mode. + */ GLboolean -XMesaOpenFullScreen(__DRIcontextPrivate *driContextPriv) +XMesaOpenFullScreen( __DRIcontextPrivate *driContextPriv ) { - return GL_TRUE; +#if 0 + r128ContextPtr rmesa = (r128ContextPtr)driContextPriv->driverPrivate; + GLint ret; + + /* FIXME: Do we need to check this? + */ + if ( !r128Ctx->glCtx->Visual->DBflag ) + return GL_TRUE; + + LOCK_HARDWARE( rmesa ); + r128WaitForIdleLocked( rmesa ); + + /* Ignore errors. If this fails, we simply don't do page flipping. + */ + ret = drmR128FullScreen( rmesa->driFd, GL_TRUE ); + + UNLOCK_HARDWARE( rmesa ); + + rmesa->doPageFlip = ( ret == 0 ); +#endif + + return GL_TRUE; } +/* Shut down the fullscreen mode. + */ GLboolean -XMesaCloseFullScreen(__DRIcontextPrivate *driContextPriv) +XMesaCloseFullScreen( __DRIcontextPrivate *driContextPriv ) { - return GL_TRUE; + r128ContextPtr rmesa = (r128ContextPtr)driContextPriv->driverPrivate; + +#if 0 + LOCK_HARDWARE( rmesa ); + r128WaitForIdleLocked( rmesa ); + + /* Don't care if this fails, we're not page flipping anymore. + */ + drmR128FullScreen( rmesa->driFd, GL_FALSE ); + + UNLOCK_HARDWARE( rmesa ); + + rmesa->doPageFlip = GL_FALSE; + rmesa->currentPage = 0; +#endif + + return GL_TRUE; } #endif Index: xc/lib/GL/mesa/src/drv/radeon/Imakefile diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/Imakefile:1.6 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/Imakefile Thu May 10 12:56:11 2001 @@ -0,0 +1,72 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/radeon/Imakefile,v 1.6 2001/05/10 16:56:11 dawes Exp $ + +#include + +#if GlxUseBuiltInDRIDriver +#define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) +#define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) +#define DoExtraLib SharedLibGlx +#define DoDebugLib DebugLibGlx +#define DoProfileLib ProfileLibGlx +#else +#define DoNormalLib SharedLibGlxWithoutPIC +#define DoSharedLib !SharedLibGlxWithoutPIC +#define DoExtrasLib NO +#define DoDebugLib NO +#define DoProfileLib NO +#endif + +#include "../common/Imakefile.inc" +#include "Imakefile.inc" +#include "../../Imakefile.inc" +#ifdef i386Architecture +#include "../../X86/Imakefile.inc" +#endif + + DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(MESA_ASM_DEFINES) + INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES) + + DRIOBJS = $(GLXLIBSRC)/mesa/dri/dri_mesa.o \ + $(GLXLIBSRC)/dri/dri_tmm.o + + DRMOBJS = $(GLXLIBSRC)/dri/drm/xf86drm.o \ + $(GLXLIBSRC)/dri/drm/xf86drmHash.o \ + $(GLXLIBSRC)/dri/drm/xf86drmRandom.o \ + $(GLXLIBSRC)/dri/drm/xf86drmSL.o \ + $(GLXLIBSRC)/dri/drm/xf86drmRadeon.o + +#ifdef GlxSoProf + LOSRCS = ../../../../lowpc.c + HISRCS = ../../../../highpc.c + + LOOBJS = ../../../../lowpc.o + HIOBJS = ../../../../highpc.o +#endif + + SRCS = $(RADEONSRCS) + OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ + $(MESA_ASM_OBJS) $(COMMONOBJS) $(RADEONOBJS) $(HIOBJS) + +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) + +#include + +LibraryObjectRule() + +SubdirLibraryRule($(RADEONOBJS)) +NormalLintTarget($(SRCS)) + +#if !GlxUseBuiltInDRIDriver +LIBNAME = radeon_dri.so +SharedDepModuleTarget($(LIBNAME),DONE $(OBJS),$(OBJS)) +InstallDynamicModule($(LIBNAME),$(MODULEDIR),dri) + +#ifdef GlxSoProf +SOPROF_LIBNAME = _radeon_dri_p +NormalDepLibraryTarget($(SOPROF_LIBNAME),DONE $(OBJS),$(OBJS)) +InstallLibrary($(SOPROF_LIBNAME),$(MODULEDIR)/dri) +#endif +#endif + +DependTarget() + Index: xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc:1.2 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc Wed May 2 11:06:04 2001 @@ -0,0 +1,140 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc,v 1.2 2001/05/02 15:06:04 dawes Exp $ + +#ifndef MesaDrvSrcDir +#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv +#endif + +MESADRVSRCDIR = MesaDrvSrcDir + +#ifndef MesaDrvRadeonBuildDir +#define MesaDrvRadeonBuildDir /**/ +#endif +MESADRVRADEONBUILDDIR = MesaDrvRadeonBuildDir + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + +#if BuildXF86DRI + DRI_DEFINES = GlxDefines + DRI_INCLUDES = -I$(GLXLIBSRC)/dri \ + -I$(GLXLIBSRC)/glx \ + -I$(INCLUDESRC) \ + -I$(INCLUDESRC)/GL \ + -I$(GLXLIBSRC)/mesa/dri \ + -I$(SERVERSRC)/GL/dri \ + -I$(XF86OSSRC) \ + -I$(XF86DRIVERSRC)/ati \ + -I$(XF86COMSRC) \ + -I$(GLXLIBSRC)/dri/drm +#endif + +MESA_INCLUDES = -I$(MESASRCDIR)/src \ + -I$(MESADRVSRCDIR)/common \ + -I$(MESADRVSRCDIR)/radeon + X_INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) + + RADEONSRCS = $(MESADRVRADEONBUILDDIR)radeon_context.c \ + $(MESADRVRADEONBUILDDIR)radeon_dd.c \ + $(MESADRVRADEONBUILDDIR)radeon_fastpath.c \ + $(MESADRVRADEONBUILDDIR)radeon_eltpath.c \ + $(MESADRVRADEONBUILDDIR)radeon_ioctl.c \ + $(MESADRVRADEONBUILDDIR)radeon_lock.c \ + $(MESADRVRADEONBUILDDIR)radeon_pipeline.c \ + $(MESADRVRADEONBUILDDIR)radeon_screen.c \ + $(MESADRVRADEONBUILDDIR)radeon_span.c \ + $(MESADRVRADEONBUILDDIR)radeon_state.c \ + $(MESADRVRADEONBUILDDIR)radeon_tex.c \ + $(MESADRVRADEONBUILDDIR)radeon_texmem.c \ + $(MESADRVRADEONBUILDDIR)radeon_texstate.c \ + $(MESADRVRADEONBUILDDIR)radeon_tris.c \ + $(MESADRVRADEONBUILDDIR)radeon_vb.c \ + $(MESADRVRADEONBUILDDIR)radeon_xmesa.c + + RADEONOBJS = $(MESADRVRADEONBUILDDIR)radeon_context.o \ + $(MESADRVRADEONBUILDDIR)radeon_dd.o \ + $(MESADRVRADEONBUILDDIR)radeon_fastpath.o \ + $(MESADRVRADEONBUILDDIR)radeon_eltpath.o \ + $(MESADRVRADEONBUILDDIR)radeon_ioctl.o \ + $(MESADRVRADEONBUILDDIR)radeon_lock.o \ + $(MESADRVRADEONBUILDDIR)radeon_pipeline.o \ + $(MESADRVRADEONBUILDDIR)radeon_screen.o \ + $(MESADRVRADEONBUILDDIR)radeon_span.o \ + $(MESADRVRADEONBUILDDIR)radeon_state.o \ + $(MESADRVRADEONBUILDDIR)radeon_tex.o \ + $(MESADRVRADEONBUILDDIR)radeon_texmem.o \ + $(MESADRVRADEONBUILDDIR)radeon_texstate.o \ + $(MESADRVRADEONBUILDDIR)radeon_tris.o \ + $(MESADRVRADEONBUILDDIR)radeon_vb.o \ + $(MESADRVRADEONBUILDDIR)radeon_xmesa.o + + RADEONUOBJS = $(MESADRVRADEONBUILDDIR)unshared/radeon_context.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_dd.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_fastpath.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_eltpath.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_ioctl.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_lock.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_pipeline.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_screen.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_span.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_state.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_tex.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_texmem.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_texstate.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_tris.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_vb.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_xmesa.o + + RADEONDOBJS = $(MESADRVRADEONBUILDDIR)debugger/radeon_context.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_dd.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_fastpath.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_eltpath.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_ioctl.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_lock.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_pipeline.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_screen.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_span.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_state.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_tex.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_texmem.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_texstate.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_tris.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_vb.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_xmesa.o + + RADEONPOBJS = $(MESADRVRADEONBUILDDIR)profiled/radeon_context.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_dd.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_fastpath.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_eltpath.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_ioctl.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_lock.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_pipeline.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_screen.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_span.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_state.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_tex.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_texmem.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_texstate.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_tris.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_vb.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_xmesa.o + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(radeon_context.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_dd.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_fastpath.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_eltpath.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_ioctl.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_lock.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_pipeline.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_screen.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_span.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_state.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_tex.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_texmem.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_texstate.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_tris.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_vb.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_xmesa.c, $(MESADRVSRCDIR)/radeon) +#endif + Index: xc/lib/GL/mesa/src/drv/radeon/radeon_context.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_context.c:1.2 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_context.c Wed Mar 21 11:14:24 2001 @@ -0,0 +1,266 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_context.c,v 1.2 2001/03/21 16:14:24 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#include + +#include "radeon_context.h" +#include "radeon_ioctl.h" +#include "radeon_dd.h" +#include "radeon_state.h" +#include "radeon_span.h" +#include "radeon_tex.h" +#include "radeon_vb.h" +#include "radeon_pipeline.h" + +#include "context.h" +#include "simple_list.h" +#include "mem.h" + +#ifndef RADEON_DEBUG +int RADEON_DEBUG = (0 +/* | DEBUG_ALWAYS_SYNC */ +/* | DEBUG_VERBOSE_API */ +/* | DEBUG_VERBOSE_MSG */ +/* | DEBUG_VERBOSE_LRU */ +/* | DEBUG_VERBOSE_DRI */ +/* | DEBUG_VERBOSE_IOCTL */ +/* | DEBUG_VERBOSE_2D */ +/* | DEBUG_VERBOSE_TEXTURE */ + ); +#endif + +#ifdef PER_CONTEXT_SAREA +char *radeonGetPerContextSAREA(int fd, + drmContext hHWContext, + drmSize size) +{ + drmHandle handle; + drmAddress address; + + if(drmGetContextPrivateMapping(fd, hHWContext, &handle) < 0) { + return NULL; + } + if(drmMap(fd, handle, size, &address) < 0) { + return NULL; + } + + return address; +} +#endif + +/* Create the device specific context. + */ +GLboolean radeonCreateContext( Display *dpy, GLvisual *glVisual, + __DRIcontextPrivate *driContextPriv ) +{ + GLcontext *ctx = driContextPriv->mesaContext; + __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + radeonContextPtr rmesa; + radeonScreenPtr radeonScreen; + int i; + + rmesa = (radeonContextPtr) CALLOC( sizeof(*rmesa) ); + if ( !rmesa ) return GL_FALSE; + + rmesa->glCtx = ctx; + rmesa->display = dpy; + + rmesa->driContext = driContextPriv; + rmesa->driScreen = sPriv; + rmesa->driDrawable = NULL; /* Set by XMesaMakeCurrent */ + + rmesa->hHWContext = driContextPriv->hHWContext; + rmesa->driHwLock = &sPriv->pSAREA->lock; + rmesa->driFd = sPriv->fd; + + radeonScreen = rmesa->radeonScreen = (radeonScreenPtr)(sPriv->private); + + rmesa->sarea = (RADEONSAREAPrivPtr)((char *)sPriv->pSAREA + + radeonScreen->sarea_priv_offset); + +#ifdef PER_CONTEXT_SAREA + rmesa->private_sarea = radeonGetPerContextSAREA(rmesa->driFd, + rmesa->hHWContext, + radeonScreen->private_sarea_size); + if(!rmesa->private_sarea) { + fprintf(stderr, "Can't map private SAREA\n"); + FREE( rmesa ); + return GL_FALSE; + } +#endif + + rmesa->tmp_matrix = (GLfloat *) ALIGN_MALLOC( 16 * sizeof(GLfloat), 16 ); + if ( !rmesa->tmp_matrix ) { + FREE( rmesa ); + return GL_FALSE; + } + + make_empty_list( &rmesa->SwappedOut ); + + for ( i = 0 ; i < radeonScreen->numTexHeaps ; i++ ) { + rmesa->CurrentTexObj[i] = NULL; + make_empty_list( &rmesa->TexObjList[i] ); + rmesa->texHeap[i] = mmInit( 0, radeonScreen->texSize[i] ); + rmesa->lastTexAge[i] = -1; + } + rmesa->lastTexHeap = radeonScreen->numTexHeaps; + + rmesa->RenderIndex = -1; /* Impossible value */ + rmesa->OnFastPath = 0; + + rmesa->vert_buf = NULL; + rmesa->num_verts = 0; + + rmesa->elt_buf = NULL; + rmesa->retained_buf = NULL; + rmesa->vert_heap = radeonScreen->buffers->list->address; + + /* KW: Set the maximum texture size small enough that we can + * guarentee that both texture units can bind a maximal texture + * and have them both in on-card memory at once. (Kevin or + * Gareth: Please check these numbers are OK) + */ + if ( radeonScreen->texSize[0] < 2*1024*1024 ) { + ctx->Const.MaxTextureLevels = 9; + ctx->Const.MaxTextureSize = (1 << 8); + } else if ( radeonScreen->texSize[0] < 8*1024*1024 ) { + ctx->Const.MaxTextureLevels = 10; + ctx->Const.MaxTextureSize = (1 << 9); + } else { + ctx->Const.MaxTextureLevels = 11; + ctx->Const.MaxTextureSize = (1 << 10); + } + + ctx->Const.MaxTextureUnits = 2; + + ctx->DriverCtx = (void *)rmesa; + + radeonDDInitExtensions( ctx ); + + radeonDDInitDriverFuncs( ctx ); + radeonDDInitIoctlFuncs( ctx ); + radeonDDInitStateFuncs( ctx ); + radeonDDInitSpanFuncs( ctx ); + radeonDDInitTextureFuncs( ctx ); + + ctx->Driver.TriangleCaps = (DD_TRI_CULL | + DD_TRI_LIGHT_TWOSIDE | + DD_TRI_STIPPLE | + DD_TRI_OFFSET); + + /* Ask Mesa to clip fog coordinates for us. + */ + ctx->TriangleCaps |= DD_CLIP_FOG_COORD; + + if ( ctx->VB ) + radeonDDRegisterVB( ctx->VB ); + + if ( ctx->NrPipelineStages ) { + ctx->NrPipelineStages = + radeonDDRegisterPipelineStages( ctx->PipelineStage, + ctx->PipelineStage, + ctx->NrPipelineStages ); + } + + radeonDDInitState( rmesa ); + + driContextPriv->driverPrivate = (void *)rmesa; + + return GL_TRUE; +} + +/* Destroy the device specific context. + */ +void radeonDestroyContext( radeonContextPtr rmesa ) +{ + if ( rmesa ) { + radeonScreenPtr radeonScreen = rmesa->radeonScreen; + radeonTexObjPtr t, next_t; + int i; + +#ifdef PER_CONTEXT_SAREA + if ( rmesa->private_sarea ) { + drmUnmap( (drmAddress)rmesa->private_sarea, + radeonScreen->private_sarea_size ); + rmesa->private_sarea = NULL; + } +#endif + + for ( i = 0 ; i < radeonScreen->numTexHeaps ; i++ ) { + foreach_s ( t, next_t, &rmesa->TexObjList[i] ) { + radeonDestroyTexObj( rmesa, t ); + } + mmDestroy( rmesa->texHeap[i] ); + } + + foreach_s ( t, next_t, &rmesa->SwappedOut ) { + radeonDestroyTexObj( rmesa, t ); + } + + ALIGN_FREE( rmesa->tmp_matrix ); + FREE( rmesa ); + } + +#if 0 + /* Use this to force shared object profiling. */ + glx_fini_prof(); +#endif +} + +/* Load the device specific context into the hardware. The actual + * setting of the hardware state is done in the radeonUpdateHWState(). + */ +radeonContextPtr radeonMakeCurrent( radeonContextPtr oldCtx, + radeonContextPtr newCtx, + __DRIdrawablePrivate *dPriv ) +{ + if ( oldCtx ) { + if ( oldCtx != newCtx ) { + newCtx->new_state |= RADEON_NEW_CONTEXT; + newCtx->dirty = RADEON_UPLOAD_ALL; + } + if ( oldCtx->driDrawable != dPriv ) { + newCtx->new_state |= RADEON_NEW_WINDOW | RADEON_NEW_CLIP; + } + } else { + newCtx->new_state |= RADEON_NEW_CONTEXT; + newCtx->dirty = RADEON_UPLOAD_ALL; + } + + newCtx->driDrawable = dPriv; + + return newCtx; +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_context.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_context.h:1.2 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_context.h Wed Mar 21 11:14:24 2001 @@ -0,0 +1,272 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_context.h,v 1.2 2001/03/21 16:14:24 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#ifndef __RADEON_CONTEXT_H__ +#define __RADEON_CONTEXT_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include + +#include "dri_mesaint.h" +#include "dri_tmm.h" + +#include "xf86drm.h" +#include "xf86drmRadeon.h" + +#include "types.h" + +#include "radeon_sarea.h" +#include "radeon_reg.h" + +struct radeon_context; +typedef struct radeon_context radeonContextRec; +typedef struct radeon_context *radeonContextPtr; + +#include "radeon_lock.h" +#include "radeon_texobj.h" +#include "radeon_screen.h" + +/* Flags for what context state needs to be updated */ +#define RADEON_NEW_ALPHA 0x0001 +#define RADEON_NEW_DEPTH 0x0002 +#define RADEON_NEW_FOG 0x0004 +#define RADEON_NEW_CLIP 0x0008 +#define RADEON_NEW_CULL 0x0010 +#define RADEON_NEW_MASKS 0x0020 +#define RADEON_NEW_WINDOW 0x0040 +#define RADEON_NEW_TEXTURE 0x0080 +#define RADEON_NEW_CONTEXT 0x0100 +#define RADEON_NEW_ALL 0x01ff + +/* Flags for software fallback cases */ +#define RADEON_FALLBACK_TEXTURE 0x0001 +#define RADEON_FALLBACK_DRAW_BUFFER 0x0002 +#define RADEON_FALLBACK_READ_BUFFER 0x0004 +#define RADEON_FALLBACK_STENCIL 0x0008 +#define RADEON_FALLBACK_RENDER_MODE 0x0010 +#define RADEON_FALLBACK_MULTIDRAW 0x0020 +#define RADEON_FALLBACK_LOGICOP 0x0040 + +/* Subpixel offsets for window coordinates (triangles): + */ +#define SUBPIXEL_X (0.0625) +#define SUBPIXEL_Y (0.125) + +/* Offset for points: + */ +#define PNT_X_OFFSET ( 0.125F) +#define PNT_Y_OFFSET (-0.125F) + +typedef void (*radeon_interp_func)( GLfloat t, + GLfloat *result, + const GLfloat *in, + const GLfloat *out ); + +struct radeon_elt_tab { + void (*emit_unclipped_verts)( struct vertex_buffer *VB ); + + void (*build_tri_verts)( radeonContextPtr rmesa, + struct vertex_buffer *VB, + GLfloat *O, GLuint *elt ); + + void (*interp)( GLfloat t, GLfloat *O, + const GLfloat *I, const GLfloat *J ); + + void (*project_and_emit_verts)( radeonContextPtr rmesa, + const GLfloat *verts, + GLuint *elts, + GLuint nr ); +}; + +struct radeon_context { + GLcontext *glCtx; /* Mesa context */ + + /* Driver and hardware state management + */ + GLuint new_state; + GLuint dirty; /* Hardware state to be updated */ + radeon_context_regs_t setup; + + GLuint vertsize; + GLuint vc_format; + GLfloat depth_scale; + + GLuint Color; /* Current draw color */ + GLuint ClearColor; /* Color used to clear color buffer */ + GLuint ClearDepth; /* Value used to clear depth buffer */ + GLuint ClearStencil; /* Value used to clear stencil */ + GLuint DepthMask; + GLuint StencilMask; + + /* Map GL texture units onto hardware + */ + GLint multitex; + GLint tmu_source[RADEON_MAX_TEXTURE_UNITS]; + GLint tex_dest[RADEON_MAX_TEXTURE_UNITS]; + GLuint color_combine[RADEON_MAX_TEXTURE_UNITS]; + GLuint alpha_combine[RADEON_MAX_TEXTURE_UNITS]; + GLuint env_color[RADEON_MAX_TEXTURE_UNITS]; + GLuint lod_bias[RADEON_MAX_TEXTURE_UNITS]; + + /* Texture object bookkeeping + */ + radeonTexObjPtr CurrentTexObj[RADEON_MAX_TEXTURE_UNITS]; + radeonTexObj TexObjList[RADEON_NR_TEX_HEAPS]; + radeonTexObj SwappedOut; + memHeap_t *texHeap[RADEON_NR_TEX_HEAPS]; + GLint lastTexAge[RADEON_NR_TEX_HEAPS]; + GLint lastTexHeap; + + /* Current rendering state, fallbacks + */ + points_func PointsFunc; + line_func LineFunc; + triangle_func TriangleFunc; + quad_func QuadFunc; + + GLuint IndirectTriangles; + GLuint Fallback; + + /* Fast path + */ + GLuint SetupIndex; + GLuint SetupDone; + GLuint RenderIndex; + GLuint OnFastPath; + radeon_interp_func interp; + GLfloat *tmp_matrix; + + /* Vertex buffers + */ + drmBufPtr vert_buf; + GLuint vert_prim; + GLuint num_verts; + + /* Elt path + */ + drmBufPtr elt_buf, retained_buf; + GLushort *first_elt, *next_elt; + GLfloat *next_vert, *vert_heap; + GLushort next_vert_index; + GLushort first_vert_index; + GLuint elt_vertsize; + struct radeon_elt_tab *elt_tab; + GLfloat device_matrix[16]; + + /* Page flipping + */ + GLuint doPageFlip; + GLuint currentPage; + + /* Drawable, cliprect and scissor information + */ + GLenum DrawBuffer; /* Optimize draw buffer update */ + GLint drawOffset, drawPitch; + GLint readOffset, readPitch; + + GLuint numClipRects; /* Cliprects for the draw buffer */ + XF86DRIClipRectPtr pClipRects; + + GLuint scissor; + XF86DRIClipRectRec scissor_rect; /* Current software scissor */ + + /* Mirrors of some DRI state + */ + Display *display; /* X server display */ + + __DRIcontextPrivate *driContext; /* DRI context */ + __DRIscreenPrivate *driScreen; /* DRI screen */ + __DRIdrawablePrivate *driDrawable; /* DRI drawable bound to this ctx */ + + int lastStamp; /* mirror driDrawable->lastStamp */ + + drmContext hHWContext; + drmLock *driHwLock; + int driFd; + + radeonScreenPtr radeonScreen; /* Screen private DRI data */ + RADEONSAREAPrivPtr sarea; /* Private SAREA data */ + +#ifdef PER_CONTEXT_SAREA + char *private_sarea; /* Per-context private SAREA */ +#endif + + /* Performance counters + */ + GLuint boxes; /* Draw performance boxes */ + GLuint hardwareWentIdle; + GLuint c_clears; + GLuint c_drawWaits; + GLuint c_textureSwaps; + GLuint c_textureBytes; + GLuint c_vertexBuffers; +}; + +#define RADEON_CONTEXT(ctx) ((radeonContextPtr)(ctx->DriverCtx)) + + +extern GLboolean radeonCreateContext( Display *dpy, GLvisual *glVisual, + __DRIcontextPrivate *driContextPriv ); +extern void radeonDestroyContext( radeonContextPtr rmesa ); +extern radeonContextPtr radeonMakeCurrent( radeonContextPtr oldCtx, + radeonContextPtr newCtx, + __DRIdrawablePrivate *dPriv ); + + +/* ================================================================ + * Debugging: + */ +#define DO_DEBUG 0 +#define ENABLE_PERF_BOXES 0 + +#if DO_DEBUG +extern int RADEON_DEBUG; +#else +#define RADEON_DEBUG 0 +#endif + +#define DEBUG_ALWAYS_SYNC 0x01 +#define DEBUG_VERBOSE_API 0x02 +#define DEBUG_VERBOSE_MSG 0x04 +#define DEBUG_VERBOSE_LRU 0x08 +#define DEBUG_VERBOSE_DRI 0x10 +#define DEBUG_VERBOSE_IOCTL 0x20 +#define DEBUG_VERBOSE_2D 0x40 +#define DEBUG_VERBOSE_TEXTURE 0x80 + +#endif +#endif /* __RADEON_CONTEXT_H__ */ Index: xc/lib/GL/mesa/src/drv/radeon/radeon_dd.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_dd.c:1.6 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_dd.c Tue Apr 10 12:07:53 2001 @@ -0,0 +1,226 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_dd.c,v 1.6 2001/04/10 16:07:53 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#include "radeon_context.h" +#include "radeon_ioctl.h" +#include "radeon_state.h" +#include "radeon_vb.h" +#include "radeon_pipeline.h" +#include "radeon_dd.h" + +#include "extensions.h" +#if defined(USE_X86_ASM) || defined(USE_3DNOW_ASM) || defined(USE_KATMAI_ASM) +#include "X86/common_x86_asm.h" +#endif + +#define RADEON_DATE "20010402" + + +/* Return the width and height of the current color buffer. + */ +static void radeonDDGetBufferSize( GLcontext *ctx, + GLuint *width, GLuint *height ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + LOCK_HARDWARE( rmesa ); + *width = rmesa->driDrawable->w; + *height = rmesa->driDrawable->h; + UNLOCK_HARDWARE( rmesa ); +} + +/* Return various strings for glGetString(). + */ +static const GLubyte *radeonDDGetString( GLcontext *ctx, GLenum name ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + static char buffer[128]; + + switch ( name ) { + case GL_VENDOR: + return (GLubyte *)"VA Linux Systems, Inc."; + + case GL_RENDERER: + sprintf( buffer, "Mesa DRI Radeon " RADEON_DATE ); + + /* Append any chipset-specific information. None yet. + */ + + /* Append any AGP/PCI-specific information. + */ + if ( rmesa->radeonScreen->IsPCI ) { + strncat( buffer, " PCI", 4 ); + } else { + switch ( rmesa->radeonScreen->AGPMode ) { + case 1: + strncat( buffer, " AGP 1x", 7 ); + break; + case 2: + strncat( buffer, " AGP 2x", 7 ); + break; + case 4: + strncat( buffer, " AGP 4x", 7 ); + break; + } + } + + /* Append any CPU-specific information. + */ +#ifdef USE_X86_ASM + if ( gl_x86_cpu_features ) { + strncat( buffer, " x86", 4 ); + } +#endif +#ifdef USE_MMX_ASM + if ( cpu_has_mmx ) { + strncat( buffer, "/MMX", 4 ); + } +#endif +#ifdef USE_3DNOW_ASM + if ( cpu_has_3dnow ) { + strncat( buffer, "/3DNow!", 7 ); + } +#endif +#ifdef USE_KATMAI_ASM + if ( cpu_has_xmm ) { + strncat( buffer, "/SSE", 4 ); + } +#endif + return (GLubyte *)buffer; + + default: + return NULL; + } +} + +/* Send all commands to the hardware. If vertex buffers or indirect + * buffers are in use, then we need to make sure they are sent to the + * hardware. All commands that are normally sent to the ring are + * already considered `flushed'. + */ +static void radeonDDFlush( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + FLUSH_BATCH( rmesa ); + +#if ENABLE_PERF_BOXES + if ( rmesa->boxes ) { + LOCK_HARDWARE( rmesa ); + radeonPerformanceBoxesLocked( rmesa ); + UNLOCK_HARDWARE( rmesa ); + } + + /* Log the performance counters if necessary */ + radeonPerformanceCounters( rmesa ); +#endif +} + +/* Make sure all commands have been sent to the hardware and have + * completed processing. + */ +static void radeonDDFinish( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + +#if ENABLE_PERF_BOXES + /* Bump the performance counter */ + rmesa->c_drawWaits++; +#endif + + radeonDDFlush( ctx ); + radeonWaitForIdle( rmesa ); +} + +/* Return various parameters requested by Mesa (this is deprecated). + */ +static GLint radeonDDGetParameteri( const GLcontext *ctx, GLint param ) +{ + switch ( param ) { + case DD_HAVE_HARDWARE_FOG: + return 1; + default: + return 0; + } +} + +/* Initialize the extensions supported by this driver. + */ +void radeonDDInitExtensions( GLcontext *ctx ) +{ + gl_extensions_disable( ctx, "GL_ARB_imaging" ); + gl_extensions_disable( ctx, "GL_ARB_texture_compression" ); + gl_extensions_disable( ctx, "GL_ARB_texture_cube_map" ); + + gl_extensions_disable( ctx, "GL_EXT_blend_color" ); + gl_extensions_disable( ctx, "GL_EXT_blend_logic_op" ); + gl_extensions_disable( ctx, "GL_EXT_blend_minmax" ); + gl_extensions_disable( ctx, "GL_EXT_blend_subtract" ); + gl_extensions_disable( ctx, "GL_EXT_convolution" ); + gl_extensions_disable( ctx, "GL_EXT_paletted_texture" ); + gl_extensions_disable( ctx, "GL_EXT_point_parameters" ); + gl_extensions_disable( ctx, "GL_EXT_shared_texture_palette" ); + gl_extensions_enable( ctx, "GL_EXT_texture_env_combine" ); + gl_extensions_enable( ctx, "GL_EXT_texture_env_dot3" ); + + gl_extensions_disable( ctx, "GL_HP_occlusion_test" ); + + gl_extensions_disable( ctx, "GL_INGR_blend_func_separate" ); + + gl_extensions_disable( ctx, "GL_SGI_color_matrix" ); + gl_extensions_disable( ctx, "GL_SGI_color_table" ); + gl_extensions_disable( ctx, "GL_SGIX_pixel_texture" ); +} + +/* Initialize the driver's misc functions. + */ +void radeonDDInitDriverFuncs( GLcontext *ctx ) +{ + ctx->Driver.GetBufferSize = radeonDDGetBufferSize; + ctx->Driver.GetString = radeonDDGetString; + ctx->Driver.Finish = radeonDDFinish; + ctx->Driver.Flush = radeonDDFlush; + + ctx->Driver.Error = NULL; + ctx->Driver.GetParameteri = radeonDDGetParameteri; + + ctx->Driver.DrawPixels = NULL; + ctx->Driver.Bitmap = NULL; + + ctx->Driver.RegisterVB = radeonDDRegisterVB; + ctx->Driver.UnregisterVB = radeonDDUnregisterVB; + ctx->Driver.BuildPrecalcPipeline = radeonDDBuildPrecalcPipeline; +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_dd.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_dd.h:1.1 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_dd.h Sun Jan 7 20:07:26 2001 @@ -0,0 +1,46 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_dd.h,v 1.1 2001/01/08 01:07:26 martin Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#ifndef __RADEON_DD_H__ +#define __RADEON_DD_H__ + +#ifdef GLX_DIRECT_RENDERING + +extern void radeonDDInitExtensions( GLcontext *ctx ); +extern void radeonDDInitDriverFuncs( GLcontext *ctx ); + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/radeon/radeon_eltpath.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_eltpath.c:1.2 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_eltpath.c Sun Apr 1 10:00:00 2001 @@ -0,0 +1,504 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_eltpath.c,v 1.2 2001/04/01 14:00:00 tsi Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Gareth Hughes + * Keith Whitwell + * + */ + +#include + +#include "radeon_context.h" +#include "radeon_pipeline.h" +#include "radeon_ioctl.h" +#include "radeon_tris.h" +#include "radeon_state.h" +#include "radeon_vb.h" + +#include "types.h" +#include "enums.h" +#include "cva.h" +#include "vertices.h" +#include "mmath.h" +#include "xform.h" + +/* Always use a full-sized stride for vertices. [FIXME] + * Stride in the buffers must be a quadword multiple. + */ +#define CLIP_STRIDE 10 + +static void fire_elts( radeonContextPtr rmesa ) +{ + GLuint vertsize = rmesa->vertsize; + + LOCK_HARDWARE( rmesa ); + + /* Fire queued elements and discard that buffer if its contents + * won't be referenced by future elements. + */ + if ( rmesa->elt_buf ) + { + GLuint retain = (rmesa->elt_buf == rmesa->retained_buf); + + if ( rmesa->first_elt != rmesa->next_elt ) { + radeonFireEltsLocked( rmesa, + ((char *)rmesa->first_elt - + (char *)rmesa->elt_buf->address), + ((char *)rmesa->next_elt - + (char *)rmesa->elt_buf->address), + !retain ); + } else if ( !retain ) { + radeonReleaseBufLocked( rmesa, rmesa->elt_buf ); + } + + rmesa->elt_buf = 0; + } + else if ( rmesa->vert_buf ) + { + radeonFlushVerticesLocked( rmesa ); + } + + radeonGetEltBufLocked( rmesa ); + + UNLOCK_HARDWARE( rmesa ); + + /* Give the compiler a chance to optimize the divisions. + */ + switch ( vertsize ) { + case 8: + rmesa->next_vert_index = (GLushort) + (((rmesa->elt_buf->idx + 1) * + RADEON_BUFFER_SIZE / (8 * sizeof(GLuint))) - 1); + rmesa->next_vert = (GLfloat *) + ((char *)rmesa->vert_heap + + rmesa->next_vert_index * 8 * sizeof(GLfloat)); + break; + + case 10: + rmesa->next_vert_index = (GLushort) + (((rmesa->elt_buf->idx + 1) * + RADEON_BUFFER_SIZE / (10 * sizeof(GLuint))) - 1); + rmesa->next_vert = (GLfloat *) + ((char *)rmesa->vert_heap + + rmesa->next_vert_index * 10 * sizeof(GLfloat)); + break; + } + + rmesa->first_elt = rmesa->next_elt = (GLushort *) + ((GLubyte *)rmesa->elt_buf->address + RADEON_INDEX_PRIM_OFFSET); + + rmesa->elt_vertsize = vertsize; +} + + +static void release_bufs( radeonContextPtr rmesa ) +{ + if ( rmesa->retained_buf && rmesa->retained_buf != rmesa->elt_buf ) + { + LOCK_HARDWARE( rmesa ); + if ( rmesa->first_elt != rmesa->next_elt ) { + radeonFireEltsLocked( rmesa, + ((char *)rmesa->first_elt - + (char *)rmesa->elt_buf->address), + ((char *)rmesa->next_elt - + (char *)rmesa->elt_buf->address), + 0 ); + + ALIGN_NEXT_ELT( rmesa ); + rmesa->first_elt = rmesa->next_elt; + } + + radeonReleaseBufLocked( rmesa, rmesa->retained_buf ); + UNLOCK_HARDWARE( rmesa ); + } + + rmesa->retained_buf = 0; +} + + + + +#define NEGATIVE( f ) (f < 0) +#define DIFFERENT_SIGNS( a, b ) ((a * b) < 0) +#define LINTERP( T, A, B ) ((A) + (T) * ((B) - (A))) + + +#define INTERP_RGBA( t, out, a, b ) { \ + GLuint i; \ + for ( i = 0 ; i < 4 ; i++ ) { \ + GLfloat fa = UBYTE_COLOR_TO_FLOAT_COLOR( a[i] ); \ + GLfloat fb = UBYTE_COLOR_TO_FLOAT_COLOR( b[i] ); \ + GLfloat fo = LINTERP( t, fa, fb ); \ + FLOAT_COLOR_TO_UBYTE_COLOR( out[i], fo ); \ + } \ +} + + +#define CLIP( SGN, V, PLANE ) \ +do { \ + if ( mask & PLANE ) { \ + GLuint *indata = inlist[in]; \ + GLuint *outdata = inlist[in ^= 1]; \ + GLuint nr = n; \ + GLfloat *J = verts[indata[nr-1]]; \ + GLfloat dpJ = (SGN J[V]) + J[3]; \ + \ + for ( i = n = 0 ; i < nr ; i++ ) { \ + GLuint elt_i = indata[i]; \ + GLfloat *I = verts[elt_i]; \ + GLfloat dpI = (SGN I[V]) + I[3]; \ + \ + if ( DIFFERENT_SIGNS( dpI, dpJ ) ) { \ + GLfloat *O = verts[next_vert]; \ + outdata[n++] = next_vert++; \ + \ + if ( NEGATIVE( dpI ) ) { \ + GLfloat t = dpI / (dpI - dpJ); \ + interp( t, O, I, J ); \ + } \ + else \ + { \ + GLfloat t = dpJ / (dpJ - dpI); \ + interp( t, O, J, I ); \ + } \ + } \ + \ + if ( !NEGATIVE( dpI ) ) \ + outdata[n++] = elt_i; \ + \ + J = I; \ + dpJ = dpI; \ + } \ + \ + if ( n < 3 ) return; \ + } \ +} while (0) + + +static void radeon_tri_clip( radeonContextPtr rmesa, + struct vertex_buffer *VB, + GLuint *elt, + GLubyte mask ) +{ + struct radeon_elt_tab *tab = rmesa->elt_tab; + radeon_interp_func interp = tab->interp; + GLuint vertsize = rmesa->vertsize; + GLuint inlist[2][VB_MAX_CLIPPED_VERTS]; + GLuint in = 0; + GLuint n = 3, next_vert = 3; + GLuint i; + GLfloat verts[VB_MAX_CLIPPED_VERTS][CLIP_STRIDE]; + + /* Build temporary vertices in clipspace. This is the potential + * downside to this path. + */ + tab->build_tri_verts( rmesa, VB, (GLfloat *)verts, elt ); + + inlist[0][0] = 0; + inlist[0][1] = 1; + inlist[0][2] = 2; + + CLIP( -, 0, CLIP_RIGHT_BIT ); + CLIP( +, 0, CLIP_LEFT_BIT ); + CLIP( -, 1, CLIP_TOP_BIT ); + CLIP( +, 1, CLIP_BOTTOM_BIT ); + CLIP( -, 2, CLIP_FAR_BIT ); + CLIP( +, 2, CLIP_NEAR_BIT ); + + + { + GLuint *out = inlist[in]; + GLint space = (GLint)((char *)rmesa->next_vert - + (char *)rmesa->next_elt); + + if ( space < (GLint)(n * (vertsize + 2) * sizeof(GLuint)) ) { + fire_elts( rmesa ); + } + + /* Project the new vertices and emit to dma buffers. Translate + * out values to physical addresses for setup dma. + */ + tab->project_and_emit_verts( rmesa, (GLfloat *)verts, out, n ); + + /* Convert the planar polygon to a list of triangles and emit to + * elt buffers. + */ + for ( i = 2 ; i < n ; i++ ) { + rmesa->next_elt[0] = (GLushort) out[0]; + rmesa->next_elt[1] = (GLushort) out[i-1]; + rmesa->next_elt[2] = (GLushort) out[i]; + rmesa->next_elt += 3; + } + } +} + + + + +/* Build a table of functions to clip each primitive type. These + * produce a list of elements in the appropriate 'reduced' primitive, + * ie (points, lines, triangles) containing all the clipped and + * unclipped primitives from the original list. + */ + +#define INIT( x ) + +#define TRI_THRESHOLD (GLint)(2 * sizeof(GLuint)) + +#define UNCLIPPED_VERT( x ) (GLushort)(rmesa->first_vert_index - x) + +#define TRIANGLE( e2, e1, e0 ) \ +do { \ + if ( (GLint)((char *)rmesa->next_vert - \ + (char *)rmesa->next_elt) < TRI_THRESHOLD ) { \ + fire_elts( rmesa ); \ + } \ + rmesa->next_elt[0] = UNCLIPPED_VERT( e2 ); \ + rmesa->next_elt[1] = UNCLIPPED_VERT( e1 ); \ + rmesa->next_elt[2] = UNCLIPPED_VERT( e0 ); \ + rmesa->next_elt += 3; \ +} while (0) + +#define CLIP_TRIANGLE( e2, e1, e0 ) \ +do { \ + GLubyte ormask = mask[e2] | mask[e1] | mask[e0]; \ + if ( ormask == 0 ) { \ + TRIANGLE( e2, e1, e0 ); \ + } else if ( (mask[e2] & mask[e1] & mask[e0]) == 0 ) { \ + out[0] = e2; \ + out[1] = e1; \ + out[2] = e0; \ + radeon_tri_clip( rmesa, VB, out, ormask ); \ + } \ +} while (0) + +#define LOCAL_VARS \ + radeonContextPtr rmesa = RADEON_CONTEXT(VB->ctx); \ + GLuint *elt = VB->EltPtr->data; \ + GLuint out[VB_MAX_CLIPPED_VERTS]; \ + GLubyte *mask = VB->ClipMask; \ + (void) mask; (void) out; (void) elt; (void) rmesa; + + + +#define RENDER_POINTS( start, count ) +#define RENDER_LINE( i1, i0 ) +#define RENDER_TRI( i2, i1, i0, pv, parity ) \ +do { \ + GLuint e2 = elt[i2], e1 = elt[i1], e0 = elt[i0]; \ + if ( parity ) e2 = elt[i1], e1 = elt[i2]; \ + CLIP_TRIANGLE( e2, e1, e0 ); \ +} while (0) + +#define RENDER_QUAD( i3, i2, i1, i0, pv ) \ + CLIP_TRIANGLE( elt[i3], elt[i2], elt[i0] ); \ + CLIP_TRIANGLE( elt[i2], elt[i1], elt[i0] ) + +#define TAG(x) radeon_##x##_elt +#include "render_tmp.h" + + + +#define LOCAL_VARS \ + radeonContextPtr rmesa = RADEON_CONTEXT(VB->ctx); \ + GLuint *elt = VB->EltPtr->data; \ + (void) elt; (void) rmesa; + +#define RENDER_POINTS( start, count ) +#define RENDER_LINE( i1, i0 ) +#define RENDER_TRI( i2, i1, i0, pv, parity ) \ +do { \ + GLuint e2 = elt[i2], e1 = elt[i1], e0 = elt[i0]; \ + if ( parity ) e2 = elt[i1], e1 = elt[i2]; \ + TRIANGLE( e2, e1, e0 ); \ +} while (0) + +#define RENDER_QUAD( i3, i2, i1, i0, pv ) \ + TRIANGLE( elt[i3], elt[i2], elt[i0] ); \ + TRIANGLE( elt[i2], elt[i1], elt[i0] ) + +#define TAG(x) radeon_##x##_elt_unclipped +#include "render_tmp.h" + + + + +static void refresh_projection_matrix( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLmatrix *mat = &ctx->Viewport.WindowMap; + GLfloat *m = rmesa->device_matrix; + + m[MAT_SX] = mat->m[MAT_SX]; + m[MAT_TX] = mat->m[MAT_TX]; + m[MAT_SY] = -mat->m[MAT_SY]; + m[MAT_TY] = -mat->m[MAT_TY]; + m[MAT_SZ] = mat->m[MAT_SZ]; + m[MAT_TZ] = mat->m[MAT_TZ]; +} + +#define CLIP_UBYTE_R 0 +#define CLIP_UBYTE_G 1 +#define CLIP_UBYTE_B 2 +#define CLIP_UBYTE_A 3 + + +#define TYPE (0) +#define TAG(x) x +#include "radeon_elttmp.h" + +#define TYPE (RADEON_RGBA_BIT) +#define TAG(x) x##_RGBA +#include "radeon_elttmp.h" + +#define TYPE (RADEON_TEX0_BIT) +#define TAG(x) x##_TEX0 +#include "radeon_elttmp.h" + +#define TYPE (RADEON_RGBA_BIT|RADEON_TEX0_BIT) +#define TAG(x) x##_RGBA_TEX0 +#include "radeon_elttmp.h" + +#define TYPE (RADEON_RGBA_BIT|RADEON_TEX0_BIT|RADEON_TEX1_BIT) +#define TAG(x) x##_RGBA_TEX0_TEX1 +#include "radeon_elttmp.h" + +#define TYPE (RADEON_TEX0_BIT|RADEON_TEX1_BIT) +#define TAG(x) x##_TEX0_TEX1 +#include "radeon_elttmp.h" + + +/* Very sparsely popluated array - fix the indices. + */ +static struct radeon_elt_tab radeonEltTab[RADEON_MAX_SETUPFUNC]; + +void radeonDDEltPathInit( void ) +{ + radeon_render_init_elt(); + radeon_render_init_elt_unclipped(); + + radeon_init_eltpath( &radeonEltTab[0] ); + radeon_init_eltpath_RGBA( &radeonEltTab[RADEON_RGBA_BIT] ); + radeon_init_eltpath_TEX0( &radeonEltTab[RADEON_TEX0_BIT] ); + radeon_init_eltpath_RGBA_TEX0( &radeonEltTab[(RADEON_RGBA_BIT | + RADEON_TEX0_BIT)] ); + radeon_init_eltpath_TEX0_TEX1( &radeonEltTab[(RADEON_TEX0_BIT | + RADEON_TEX1_BIT)] ); + radeon_init_eltpath_RGBA_TEX0_TEX1( &radeonEltTab[(RADEON_RGBA_BIT | + RADEON_TEX0_BIT | + RADEON_TEX1_BIT)] ); +} + +#define VALID_SETUP (RADEON_RGBA_BIT|RADEON_TEX0_BIT|RADEON_TEX1_BIT) + + + +/* Use a temporary array for device coordinates, so that we can easily + * tap into existing mesa assembly. Otherwise consider emitting + * device coordinates to dma buffers directly from the project/cliptest + * routine. (requires output stride, potential loss of writecombining + * efficiency?) + * + * This path is a lot closer to the standard vertex path in the + * initial stages than the original fastpath. A slightly more optimal + * path could be constructed, but would require us to write new + * assembly. + */ +void radeonDDEltPath( struct vertex_buffer *VB ) +{ + GLcontext *ctx = VB->ctx; + GLenum prim = ctx->CVA.elt_mode; + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + struct radeon_elt_tab *tab = + &radeonEltTab[rmesa->SetupIndex & VALID_SETUP]; + GLint vertsize = rmesa->vertsize; + GLint space; + + VB->ClipPtr = TransformRaw( &VB->Clip, + &ctx->ModelProjectMatrix, + VB->ObjPtr ); + + refresh_projection_matrix( ctx ); + + VB->ClipAndMask = ~0; + VB->ClipOrMask = 0; + VB->Projected = gl_clip_tab[VB->ClipPtr->size]( VB->ClipPtr, + &VB->Win, + VB->ClipMask, + &VB->ClipOrMask, + &VB->ClipAndMask ); + + if ( VB->ClipAndMask ) + return; + + if ( rmesa->vert_buf ) + radeonFlushVertices( rmesa ); + + if ( rmesa->new_state ) + radeonDDUpdateHWState( ctx ); + + space = (GLint)((char *)rmesa->next_vert - + (char *)rmesa->next_elt); + + /* Allocate a single buffer to hold unclipped vertices. All + * unclipped vertices must be contiguous. + */ + if ( space < (GLint)(VB->Count * vertsize * sizeof(GLuint)) || + rmesa->vertsize != rmesa->elt_vertsize ) { + fire_elts( rmesa ); + } + + rmesa->retained_buf = rmesa->elt_buf; + + /* Emit unclipped vertices to the buffer. + */ + tab->emit_unclipped_verts( VB ); + + /* Emit indices and clipped vertices to one or more buffers. + */ + if ( VB->ClipOrMask ) { + rmesa->elt_tab = tab; + radeon_render_tab_elt[prim]( VB, 0, VB->EltPtr->count, 0 ); + } else { + radeon_render_tab_elt_unclipped[prim]( VB, 0, VB->EltPtr->count, 0 ); + } + + /* Send to hardware and release the elt buffer. + */ + release_bufs( rmesa ); + + /* This indicates that there is no cached data to reuse. + */ + VB->pipeline->data_valid = 0; + VB->pipeline->new_state = 0; + + FLUSH_BATCH( rmesa ); +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_elttmp.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_elttmp.h:1.1 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_elttmp.h Sun Jan 7 20:07:27 2001 @@ -0,0 +1,246 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_elttmp.h,v 1.1 2001/01/08 01:07:27 martin Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Keith Whitwell + * Gareth Hughes + * + */ + +/* Buffers fill from high addresses down with vertices and from low + * addresses up with elements. + */ + + +/* Emit the bulk of the vertices to the first dma buffer. Leave + * empty slots for clipped vertices so that we can still address + * vertices by index. + */ +static void TAG(emit_unclipped_verts)( struct vertex_buffer *VB ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(VB->ctx); + GLfloat *dev = VB->Projected->start; + GLubyte *color = VB->ColorPtr->start; + GLfloat *tex0_data = VB->TexCoordPtr[0]->start; + GLfloat *tex1_data = VB->TexCoordPtr[1]->start; + GLuint color_stride = VB->ColorPtr->stride; + GLuint tex0_stride = VB->TexCoordPtr[0]->stride; + GLuint tex1_stride = VB->TexCoordPtr[1]->stride; + GLuint buffer_stride = rmesa->vertsize; + + GLfloat *f = rmesa->next_vert; + GLuint count = VB->Count; + GLubyte *clipmask = VB->ClipMask; + + const GLfloat *m = rmesa->device_matrix; + const GLfloat sx = m[0], sy = m[5], sz = m[10]; + const GLfloat tx = m[12], ty = m[13], tz = m[14]; + GLuint i; + + rmesa->retained_buf = rmesa->elt_buf; + rmesa->first_vert_index = rmesa->next_vert_index; + + for ( i = 0 ; i < count ; f -= buffer_stride, i++ ) + { + if ( !clipmask[i] ) + { + f[0] = sx * dev[0] + tx; + f[1] = sy * dev[1] + ty; + f[2] = sz * dev[2] + tz; + f[3] = dev[3]; + + if ( TYPE & RADEON_RGBA_BIT ) { + *(GLuint *)&f[4] = *(GLuint *)color; + } + + if ( TYPE & RADEON_TEX0_BIT ) { + *(GLuint *)&f[6] = *(GLuint *)&tex0_data[0]; + *(GLuint *)&f[7] = *(GLuint *)&tex0_data[1]; + } + + if ( TYPE & RADEON_TEX1_BIT ) { + *(GLuint *)&f[8] = *(GLuint *)&tex1_data[0]; + *(GLuint *)&f[9] = *(GLuint *)&tex1_data[1]; + } + } + + STRIDE_F( dev, 16 ); + if ( TYPE & RADEON_RGBA_BIT ) color += color_stride; + if ( TYPE & RADEON_TEX0_BIT ) STRIDE_F( tex0_data, tex0_stride ); + if ( TYPE & RADEON_TEX1_BIT ) STRIDE_F( tex1_data, tex1_stride ); + } + + rmesa->next_vert = f; + rmesa->next_vert_index -= count; +} + + +/* Build three temporary clipspace vertex for clipping a triangle. + * Recreate from the VB data rather than trying to read back from + * uncached memory. + */ +static void TAG(build_tri_verts)( radeonContextPtr rmesa, + struct vertex_buffer *VB, + GLfloat *O, + GLuint *elt ) +{ + GLint i; + + for ( i = 0 ; i < 3 ; i++, O += CLIP_STRIDE ) { + GLfloat *clip = VB->Clip.start + elt[i]*4; + + O[0] = clip[0]; + O[1] = clip[1]; + O[2] = clip[2]; + O[3] = clip[3]; + + if ( TYPE & RADEON_RGBA_BIT ) { + GLubyte *color = VEC_ELT(VB->ColorPtr, GLubyte, elt[i]); + *(GLuint *)&O[4] = *(GLuint *)color; + } + + *(GLuint *)&O[5] = UNCLIPPED_VERT(elt[i]); + + if ( TYPE & RADEON_TEX0_BIT ) { + GLfloat *tex0_data = VEC_ELT(VB->TexCoordPtr[0], GLfloat, elt[i]); + *(GLuint *)&O[6] = *(GLuint *)&tex0_data[0]; + *(GLuint *)&O[7] = *(GLuint *)&tex0_data[1]; + } + + if ( TYPE & RADEON_TEX1_BIT ) { + GLfloat *tex1_data = VEC_ELT(VB->TexCoordPtr[1], GLfloat, elt[i]); + *(GLuint *)&O[8] = *(GLuint *)&tex1_data[0]; + *(GLuint *)&O[9] = *(GLuint *)&tex1_data[1]; + } + } +} + + +/* Interpolate between two of the vertices constructed above. + */ +static void TAG(interp)( GLfloat t, + GLfloat *O, + const GLfloat *I, + const GLfloat *J ) +{ + O[0] = LINTERP( t, I[0], J[0] ); + O[1] = LINTERP( t, I[1], J[1] ); + O[2] = LINTERP( t, I[2], J[2] ); + O[3] = LINTERP( t, I[3], J[3] ); + + if ( TYPE & RADEON_RGBA_BIT ) { + INTERP_RGBA( t, + ((GLubyte *)&(O[4])), + ((GLubyte *)&(I[4])), + ((GLubyte *)&(J[4])) ); + } + + *(GLuint *)&O[5] = ~0; /* note that this is a new vertex */ + + if ( TYPE & RADEON_TEX0_BIT ) { + O[6] = LINTERP( t, I[6], J[6] ); + O[7] = LINTERP( t, I[7], J[7] ); + } + + if ( TYPE & RADEON_TEX1_BIT ) { + O[8] = LINTERP( t, I[8], J[8] ); + O[9] = LINTERP( t, I[9], J[9] ); + } +} + + + +/* When clipping is complete, scan the final vertex list and emit any + * new ones to dma buffers. Update the element list to a format + * suitable for sending to hardware. + */ +static void TAG(project_and_emit_verts)( radeonContextPtr rmesa, + const GLfloat *verts, + GLuint *elt, + GLuint nr) +{ + GLfloat *O = rmesa->next_vert; + GLushort index = rmesa->next_vert_index; + GLuint buffer_stride = rmesa->vertsize; + + const GLfloat *m = rmesa->device_matrix; + const GLfloat sx = m[0], sy = m[5], sz = m[10]; + const GLfloat tx = m[12], ty = m[13], tz = m[14]; + GLuint i; + + for ( i = 0 ; i < nr ; i++ ) { + const GLfloat *I = &verts[elt[i] * CLIP_STRIDE]; + GLuint tmp = *(GLuint *)&I[5]; + + if ( (elt[i] = tmp) == ~0 ) { + GLfloat oow = 1.0 / I[3]; + + elt[i] = index--; + + O[0] = sx * I[0] * oow + tx; + O[1] = sy * I[1] * oow + ty; + O[2] = sz * I[2] * oow + tz; + O[3] = oow; + + if ( TYPE & RADEON_RGBA_BIT ) { + *(GLuint *)&O[4] = *(GLuint *)&I[4]; + } + + if ( TYPE & RADEON_TEX0_BIT ) { + *(GLuint *)&O[6] = *(GLuint *)&I[6]; + *(GLuint *)&O[7] = *(GLuint *)&I[7]; + } + + if ( TYPE & RADEON_TEX1_BIT ) { + *(GLuint *)&O[8] = *(GLuint *)&I[8]; + *(GLuint *)&O[9] = *(GLuint *)&I[9]; + } + + O -= buffer_stride; + } + } + + rmesa->next_vert = O; + rmesa->next_vert_index = index; +} + + + +static void TAG(radeon_init_eltpath)( struct radeon_elt_tab *tab ) +{ + tab->emit_unclipped_verts = TAG(emit_unclipped_verts); + tab->build_tri_verts = TAG(build_tri_verts); + tab->interp = TAG(interp); + tab->project_and_emit_verts = TAG(project_and_emit_verts); +} + +#undef TYPE +#undef TAG +#undef STRIDE Index: xc/lib/GL/mesa/src/drv/radeon/radeon_fastpath.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_fastpath.c:1.1 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_fastpath.c Sun Jan 7 20:07:27 2001 @@ -0,0 +1,542 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_fastpath.c,v 1.1 2001/01/08 01:07:27 martin Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Keith Whitwell + * Kevin E. Martin + * Gareth Hughes + * + */ + +#include "radeon_state.h" +#include "radeon_vb.h" +#include "radeon_pipeline.h" +#include "radeon_ioctl.h" +#include "radeon_tris.h" + +#include "mmath.h" +#include "cva.h" +#include "vertices.h" + + +struct radeon_fast_tab { + void (*build_vertices)( struct vertex_buffer *VB, GLuint do_cliptest ); + void (*interp)( GLfloat t, GLfloat *O, const GLfloat *I, const GLfloat *J ); +}; + +#define POINT(x) radeon_draw_point( rmesa, &vert[x], psize ) +#define LINE(x,y) radeon_draw_line( rmesa, &vert[x], &vert[y], lwidth ) +#define TRI(x,y,z) radeon_draw_triangle( rmesa, &vert[x], &vert[y], &vert[z] ) + + +/* Direct, and no clipping required. The clip funcs have not been + * written yet, so this is only useful for the fast path. + */ +#define RENDER_POINTS( start, count ) \ +do { \ + GLuint e; \ + for ( e = start ; e < count ; e++ ) \ + POINT( elt[e] ); \ +} while (0) + +#define RENDER_LINE( i1, i ) \ +do { \ + GLuint e1 = elt[i1], e = elt[i]; \ + LINE( e1, e ); \ +} while (0) + +#define RENDER_TRI( i2, i1, i, pv, parity ) \ +do { \ + GLuint e2 = elt[i2], e1 = elt[i1], e = elt[i]; \ + if ( parity ) { \ + GLuint tmp = e2; \ + e2 = e1; \ + e1 = tmp; \ + } \ + TRI( e2, e1, e ); \ +} while (0) + +#define RENDER_QUAD( i3, i2, i1, i, pv ) \ +do { \ + GLuint e3 = elt[i3], e2 = elt[i2], e1 = elt[i1], e = elt[i]; \ + TRI( e3, e2, e ); \ + TRI( e2, e1, e ); \ +} while (0) + +#define LOCAL_VARS \ + radeonVertexPtr vert = RADEON_DRIVER_DATA(VB)->verts; \ + const GLuint *elt = VB->EltPtr->data; \ + GLcontext *ctx = VB->ctx; \ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); \ + const GLfloat lwidth = ctx->Line.Width; \ + const GLfloat psize = ctx->Point.Size; \ + (void) lwidth; (void) psize; (void) vert; + +#define TAG(x) radeon_##x##_smooth_indirect +#include "render_tmp.h" + + + +#define NEGATIVE( f ) (f < 0) +#define DIFFERENT_SIGNS( a, b ) ((a * b) < 0) +#define LINTERP( T, A, B ) ((A) + (T) * ((B) - (A))) + + +#define INTERP_RGBA( t, out, a, b ) \ +do { \ + int i; \ + for ( i = 0 ; i < 4 ; i++ ) { \ + GLfloat fa = UBYTE_COLOR_TO_FLOAT_COLOR( a[i] ); \ + GLfloat fb = UBYTE_COLOR_TO_FLOAT_COLOR( b[i] ); \ + GLfloat fo = LINTERP( t, fa, fb ); \ + FLOAT_COLOR_TO_UBYTE_COLOR( out[i], fo ); \ + } \ +} while (0) + + +#define CLIP( SGN, V, PLANE ) \ +do { \ + if ( mask & PLANE ) { \ + GLuint *indata = inlist[in]; \ + GLuint *outdata = inlist[in ^= 1]; \ + GLuint nr = n; \ + GLfloat *J = verts[indata[nr-1]].f; \ + GLfloat dpJ = (SGN J[V]) + J[3]; \ + \ + inlist[0] = vlist1; \ + for ( i = n = 0 ; i < nr ; i++ ) { \ + GLuint elt_i = indata[i]; \ + GLfloat *I = verts[elt_i].f; \ + GLfloat dpI = (SGN I[V]) + I[3]; \ + \ + if ( DIFFERENT_SIGNS( dpI, dpJ ) ) { \ + GLfloat *O = verts[next_vert].f; \ + GLfloat t, *in, *out; \ + \ + if ( NEGATIVE( dpI ) ) { \ + t = dpI / (dpI - dpJ); \ + in = I; \ + out = J; \ + } else { \ + t = dpJ / (dpJ - dpI); \ + in = J; \ + out = I; \ + } \ + \ + interp( t, O, in, out ); \ + \ + clipmask[next_vert] = 0; \ + outdata[n++] = next_vert++; \ + } \ + \ + clipmask[elt_i] |= PLANE; /* don't set up */ \ + \ + if ( !NEGATIVE( dpI ) ) { \ + outdata[n++] = elt_i; \ + clipmask[elt_i] &= ~PLANE; /* set up after all */ \ + } \ + \ + J = I; \ + dpJ = dpI; \ + } \ + \ + if ( n < 3 ) return; \ + } \ +} while (0) + +#define LINE_CLIP( x, y, z, w, PLANE ) \ +do { \ + if ( mask & PLANE ) { \ + GLfloat dpI = DOT4V( I, x, y, z, w); \ + GLfloat dpJ = DOT4V( J, x, y, z, w); \ + \ + if ( DIFFERENT_SIGNS( dpI, dpJ ) ) { \ + GLfloat *O = verts[next_vert].f; \ + GLfloat t = dpI / (dpI - dpJ); \ + \ + interp( t, O, I, J ); \ + \ + clipmask[next_vert] = 0; \ + \ + if ( NEGATIVE( dpI ) ) { \ + clipmask[elts[0]] |= PLANE; \ + I = O; \ + elts[0] = next_vert++; \ + } else { \ + clipmask[elts[1]] |= PLANE; \ + J = O; \ + elts[1] = next_vert++; \ + } \ + } else if ( NEGATIVE( dpI ) ) return; \ + } \ +} while (0) + + +static __inline void radeon_tri_clip( GLuint **p_elts, + radeonVertexPtr verts, + GLubyte *clipmask, + GLuint *p_next_vert, + GLubyte mask, + radeon_interp_func interp ) +{ + GLuint *elts = *p_elts; + GLuint next_vert = *p_next_vert; + GLuint in = 0; + GLuint n = 3; + GLuint vlist1[VB_MAX_CLIPPED_VERTS]; + GLuint vlist2[VB_MAX_CLIPPED_VERTS]; + GLuint *inlist[2]; + GLuint *out; + GLuint i; + + inlist[0] = elts; + inlist[1] = vlist2; + + CLIP( -, 0, CLIP_RIGHT_BIT ); + CLIP( +, 0, CLIP_LEFT_BIT ); + CLIP( -, 1, CLIP_TOP_BIT ); + CLIP( +, 1, CLIP_BOTTOM_BIT ); + CLIP( -, 2, CLIP_FAR_BIT ); + CLIP( +, 2, CLIP_NEAR_BIT ); + + /* Convert the planar polygon to a list of triangles */ + out = inlist[in]; + + for ( i = 2 ; i < n ; i++ ) { + elts[0] = out[0]; + elts[1] = out[i-1]; + elts[2] = out[i]; + elts += 3; + } + + *p_next_vert = next_vert; + *p_elts = elts; +} + + +static __inline void radeon_line_clip( GLuint **p_elts, + radeonVertexPtr verts, + GLubyte *clipmask, + GLuint *p_next_vert, + GLubyte mask, + radeon_interp_func interp ) +{ + GLuint *elts = *p_elts; + GLfloat *I = verts[elts[0]].f; + GLfloat *J = verts[elts[1]].f; + GLuint next_vert = *p_next_vert; + + LINE_CLIP( 1, 0, 0, -1, CLIP_LEFT_BIT ); + LINE_CLIP( -1, 0, 0, 1, CLIP_RIGHT_BIT ); + LINE_CLIP( 0, 1, 0, -1, CLIP_TOP_BIT ); + LINE_CLIP( 0, -1, 0, 1, CLIP_BOTTOM_BIT ); + LINE_CLIP( 0, 0, 1, -1, CLIP_FAR_BIT ); + LINE_CLIP( 0, 0, -1, 1, CLIP_NEAR_BIT ); + + *p_next_vert = next_vert; + *p_elts += 2; +} + + + +#define CLIP_POINT( e ) \ +do { \ + if ( mask[e] ) *out++ = e; \ +} while (0) + +#define CLIP_LINE( e1, e0 ) \ +do { \ + GLubyte ormask = mask[e0] | mask[e1]; \ + out[0] = e1; \ + out[1] = e0; \ + out += 2; \ + if ( ormask ) { \ + out-=2; \ + if ( !(mask[e0] & mask[e1]) ) { \ + radeon_line_clip( &out, verts, mask, \ + &next_vert, ormask, interp ); \ + } \ + } \ +} while (0) + +#define CLIP_TRIANGLE( e2, e1, e0 ) \ +do { \ + GLubyte ormask; \ + out[0] = e2; \ + out[1] = e1; \ + out[2] = e0; \ + out += 3; \ + ormask = mask[e2] | mask[e1] | mask[e0]; \ + if ( ormask ) { \ + out -= 3; \ + if ( !(mask[e2] & mask[e1] & mask[e0]) ) { \ + radeon_tri_clip( &out, verts, mask, \ + &next_vert, ormask, interp ); \ + } \ + } \ +} while (0) + + + +/* Build a table of functions to clip each primitive type. These + * produce a list of elements in the appropriate 'reduced' primitive, + * ie (points, lines, triangles) containing all the clipped and + * unclipped primitives from the original list. + */ +#define LOCAL_VARS \ + radeonContextPtr rmesa = RADEON_CONTEXT(VB->ctx); \ + radeonVertexBufferPtr rvb = RADEON_DRIVER_DATA(VB); \ + GLuint *elt = VB->EltPtr->data; \ + radeonVertexPtr verts = rvb->verts; \ + GLuint next_vert = rvb->last_vert; \ + GLuint *out = rvb->clipped_elements.data; \ + GLubyte *mask = VB->ClipMask; \ + radeon_interp_func interp = rmesa->interp; \ + (void) interp; (void) verts; + +#define POSTFIX \ + rvb->clipped_elements.count = out - rvb->clipped_elements.data; \ + rvb->last_vert = next_vert; + + +#define INIT( x ) + +#define RENDER_POINTS( start, count ) \ +do { \ + GLuint i; \ + for ( i = start; i < count ; i++ ) \ + CLIP_POINT( elt[i] ); \ +} while (0) + +#define RENDER_LINE( i1, i0 ) \ +do { \ + CLIP_LINE( elt[i1], elt[i0] ); \ +} while (0) + +#define RENDER_TRI( i2, i1, i0, pv, parity ) \ +do { \ + GLuint e2 = elt[i2], e1 = elt[i1], e0 = elt[i0]; \ + if ( parity ) e2 = elt[i1], e1 = elt[i2]; \ + CLIP_TRIANGLE( e2, e1, e0 ); \ +} while (0) + +#define RENDER_QUAD( i3, i2, i1, i0, pv ) \ +do { \ + CLIP_TRIANGLE( elt[i3], elt[i2], elt[i0] ); \ + CLIP_TRIANGLE( elt[i2], elt[i1], elt[i0] ); \ +} while (0) + +#define TAG(x) radeon_##x##_clip_elt +#include "render_tmp.h" + + + +/* Pack rgba and/or texture into the remaining half of a 32 byte vertex. + */ +#define CLIP_UBYTE_COLOR 4 +#define CLIP_UBYTE_R 0 +#define CLIP_UBYTE_G 1 +#define CLIP_UBYTE_B 2 +#define CLIP_UBYTE_A 3 +#define CLIP_S0 6 +#define CLIP_T0 7 +#define CLIP_S1 8 +#define CLIP_T1 9 + +#define TYPE (0) +#define TAG(x) x +#include "radeon_fasttmp.h" + +#define TYPE (RADEON_RGBA_BIT) +#define TAG(x) x##_RGBA +#include "radeon_fasttmp.h" + +#define TYPE (RADEON_TEX0_BIT) +#define TAG(x) x##_TEX0 +#include "radeon_fasttmp.h" + +#define TYPE (RADEON_RGBA_BIT | RADEON_TEX0_BIT) +#define TAG(x) x##_RGBA_TEX0 +#include "radeon_fasttmp.h" + +#define TYPE (RADEON_RGBA_BIT | RADEON_TEX0_BIT | RADEON_TEX1_BIT) +#define TAG(x) x##_RGBA_TEX0_TEX1 +#include "radeon_fasttmp.h" + +/* This one *could* get away with sneaking TEX1 into the color and + * specular slots, thus fitting inside a cache line. Would be even + * better to switch to a smaller vertex. + */ +#define TYPE (RADEON_TEX0_BIT | RADEON_TEX1_BIT) +#define TAG(x) x##_TEX0_TEX1 +#include "radeon_fasttmp.h" + + + +static void radeon_render_elements_direct( struct vertex_buffer *VB ) +{ + GLcontext *ctx = VB->ctx; + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLenum prim = ctx->CVA.elt_mode; + GLuint nr = VB->EltPtr->count; + render_func func = radeon_render_tab_smooth_indirect[prim]; + GLuint p = 0; + + if ( rmesa->new_state ) + radeonDDUpdateHWState( ctx ); + + do { + func( VB, 0, nr, 0 ); + } while ( ctx->Driver.MultipassFunc && + ctx->Driver.MultipassFunc( VB, ++p ) ); +} + +/* GH: These should go away altogether on the Radeon. We should disable + * the viewport mapping entirely in Mesa and let the hardware do it in + * all cases. + */ +static void radeon_project_vertices( struct vertex_buffer *VB ) +{ + GLcontext *ctx = VB->ctx; + GLmatrix *mat = &ctx->Viewport.WindowMap; + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + radeonVertexBufferPtr rvb = RADEON_DRIVER_DATA(VB); + GLfloat *m = rmesa->tmp_matrix; + + m[MAT_SX] = mat->m[MAT_SX]; + m[MAT_TX] = mat->m[MAT_TX]; + m[MAT_SY] = -mat->m[MAT_SY]; + m[MAT_TY] = -mat->m[MAT_TY]; + m[MAT_SZ] = mat->m[MAT_SZ]; + m[MAT_TZ] = mat->m[MAT_TZ]; + + gl_project_v16( rvb->verts[VB->CopyStart].f, + rvb->verts[rvb->last_vert].f, + m, + 16 * 4 ); +} + +static void radeon_project_clipped_vertices( struct vertex_buffer *VB ) +{ + GLcontext *ctx = VB->ctx; + GLmatrix *mat = &ctx->Viewport.WindowMap; + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + radeonVertexBufferPtr rvb = RADEON_DRIVER_DATA(VB); + GLfloat *m = rmesa->tmp_matrix; + + m[MAT_SX] = mat->m[MAT_SX]; + m[MAT_TX] = mat->m[MAT_TX]; + m[MAT_SY] = -mat->m[MAT_SY]; + m[MAT_TY] = -mat->m[MAT_TY]; + m[MAT_SZ] = mat->m[MAT_SZ]; + m[MAT_TZ] = mat->m[MAT_TZ]; + + gl_project_clipped_v16( rvb->verts[VB->CopyStart].f, + rvb->verts[rvb->last_vert].f, + m, + 16 * 4, + VB->ClipMask + VB->CopyStart ); +} + +static struct radeon_fast_tab radeonFastTab[RADEON_MAX_SETUPFUNC]; + +void radeonDDFastPathInit( void ) +{ + radeon_render_init_clip_elt(); + radeon_render_init_smooth_indirect(); + + radeon_init_fastpath( &radeonFastTab[0] ); + radeon_init_fastpath_RGBA( &radeonFastTab[RADEON_RGBA_BIT] ); + radeon_init_fastpath_TEX0( &radeonFastTab[RADEON_TEX0_BIT] ); + radeon_init_fastpath_RGBA_TEX0( &radeonFastTab[(RADEON_RGBA_BIT | + RADEON_TEX0_BIT)] ); + radeon_init_fastpath_TEX0_TEX1( &radeonFastTab[(RADEON_TEX0_BIT | + RADEON_TEX1_BIT)] ); + radeon_init_fastpath_RGBA_TEX0_TEX1( &radeonFastTab[(RADEON_RGBA_BIT | + RADEON_TEX0_BIT | + RADEON_TEX1_BIT)] ); +} + +#define VALID_SETUP (RADEON_RGBA_BIT | RADEON_TEX0_BIT | RADEON_TEX1_BIT) + +void radeonDDFastPath( struct vertex_buffer *VB ) +{ + GLcontext *ctx = VB->ctx; + GLenum prim = ctx->CVA.elt_mode; + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + struct radeon_fast_tab *tab = + &radeonFastTab[rmesa->SetupIndex & VALID_SETUP]; + GLuint do_cliptest = 1; + + gl_prepare_arrays_cva( VB ); /* still need this */ + + if ( ( gl_reduce_prim[prim] == GL_TRIANGLES ) && + ( VB->Count < (RADEON_BUFFER_SIZE / (10 * sizeof(GLuint))) ) && + ( ctx->ModelProjectMatrix.flags & (MAT_FLAG_GENERAL | + MAT_FLAG_PERSPECTIVE) ) ) + { + radeonDDEltPath( VB ); + return; + } + + /* Reserve enough space for the pathological case */ + if ( VB->EltPtr->count * 12 > RADEON_DRIVER_DATA(VB)->size ) { + radeonDDResizeVB( VB, VB->EltPtr->count * 12 ); + do_cliptest = 1; + } + + tab->build_vertices( VB, do_cliptest ); /* object->clip space */ + + if ( rmesa->new_state ) + radeonDDUpdateHWState( ctx ); + + if ( VB->ClipOrMask ) { + if ( !VB->ClipAndMask ) { + render_func *clip = radeon_render_tab_clip_elt; + + rmesa->interp = tab->interp; + + clip[prim]( VB, 0, VB->EltPtr->count, 0 ); /* build new elts */ + + ctx->CVA.elt_mode = gl_reduce_prim[prim]; + VB->EltPtr = &(RADEON_DRIVER_DATA(VB)->clipped_elements); + + radeon_project_clipped_vertices( VB ); /* clip->device space */ + radeon_render_elements_direct( VB ); /* render using new list */ + } + } else { + radeon_project_vertices( VB ); /* clip->device space */ + radeon_render_elements_direct( VB ); /* render using orig list */ + } + + /* This indicates that there is no cached data to reuse */ + VB->pipeline->data_valid = 0; + VB->pipeline->new_state = 0; +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_fasttmp.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_fasttmp.h:1.1 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_fasttmp.h Sun Jan 7 20:07:27 2001 @@ -0,0 +1,185 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_fasttmp.h,v 1.1 2001/01/08 01:07:27 martin Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Keith Whitwell + * Kevin E. Martin + * Gareth Hughes + * + */ + +/* The first part of setup is applied to all vertices, clipped or + * unclipped. This data w!ill be used for clipping, and then all + * vertices with a zero clipmask will be projected to device space. + * + * This could be split into several loops, but - it seems that the + * large stride of the fxVertices makes cache issues the big + * performance factor, and that multiple loops mean multiple cache + * misses.... + */ +static void TAG(radeon_setup_full)( struct vertex_buffer *VB, + GLuint do_cliptest ) +{ + GLcontext *ctx = VB->ctx; + radeonVertexBufferPtr rvb = RADEON_DRIVER_DATA(VB); + const GLfloat *m = ctx->ModelProjectMatrix.m; + GLuint start = VB->CopyStart; + GLuint count = VB->Count; + + gl_xform_points3_v16_general( rvb->verts[start].f, + m, + VB->ObjPtr->start, + VB->ObjPtr->stride, + count - start ); + + if ( do_cliptest ) { + VB->ClipAndMask = ~0; + VB->ClipOrMask = 0; + gl_cliptest_points4_v16( rvb->verts[start].f, + rvb->verts[count].f, + &(VB->ClipOrMask), + &(VB->ClipAndMask), + VB->ClipMask + start ); + } + + /* These branches are all resolved at compile time. Hopefully all + * the pointers are valid addresses even when not enabled. + */ + if ( TYPE ) { + GLubyte *color = VB->ColorPtr->start; + GLfloat *tex0_data = VB->TexCoordPtr[0]->start; + GLfloat *tex1_data = VB->TexCoordPtr[1]->start; + + GLuint color_stride = VB->ColorPtr->stride; + GLuint tex0_stride = VB->TexCoordPtr[0]->stride; + GLuint tex1_stride = VB->TexCoordPtr[1]->stride; + + GLfloat *f = rvb->verts[start].f; + GLfloat *end = f + (16 * (count - start)); + + while ( f != end ) { + if ( TYPE & RADEON_RGBA_BIT ) { +#if defined (USE_X86_ASM) + /* GH: Finally! Some damned hardware manufacturer uses + * little-endian RGBA for vertex color... + */ + __asm__ ( "movl (%%ecx), %%eax \n" + "movl %%eax, 16(%%edi) \n" + : + : "c" (color), "D" (f) + : "%eax" ); +#else + *(GLuint *)(f+CLIP_UBYTE_COLOR) = *(GLuint *)color; +#endif + } + if ( TYPE & RADEON_TEX0_BIT ) { +#if defined (USE_X86_ASM) + __asm__ ( "movl (%%ecx), %%eax \n" + "movl %%eax, 24(%%edi) \n" + "movl 4(%%ecx), %%eax \n" + "movl %%eax, 28(%%edi)" + : + : "c" (tex0_data), "D" (f) + : "%eax" ); +#else + *(GLuint *)(f+CLIP_S0) = *(GLuint *)tex0_data; + *(GLuint *)(f+CLIP_T0) = *(GLuint *)(tex0_data+1); +#endif + } + if ( TYPE & RADEON_TEX1_BIT ) { + /* Hits a second cache line. + */ +#if defined (USE_X86_ASM) + __asm__ ( "movl (%%esi), %%eax \n" + "movl %%eax, 32(%%edi) \n" + "movl 4(%%esi), %%eax \n" + "movl %%eax, 36(%%edi)" + : + : "S" (tex1_data), "D" (f) + : "%eax" ); +#else + *(GLuint *)(f+CLIP_S1) = *(GLuint *)tex1_data; + *(GLuint *)(f+CLIP_T1) = *(GLuint *)(tex1_data+1); +#endif + } + if ( TYPE & RADEON_RGBA_BIT ) color += color_stride; + if ( TYPE & RADEON_TEX0_BIT ) STRIDE_F( tex0_data, tex0_stride ); + if ( TYPE & RADEON_TEX1_BIT ) STRIDE_F( tex1_data, tex1_stride ); + f += 16; + } + } + + rvb->clipped_elements.count = start; + rvb->last_vert = count; +} + + +/* Changed to just put the interp func instead of the whole clip + * routine into the header. Less code and better chance of doing some + * of this stuff in assembly. + */ +static void TAG(radeon_interp_vert)( GLfloat t, + GLfloat *O, + const GLfloat *I, + const GLfloat *J ) +{ + O[0] = LINTERP( t, I[0], J[0] ); + O[1] = LINTERP( t, I[1], J[1] ); + O[2] = LINTERP( t, I[2], J[2] ); + O[3] = LINTERP( t, I[3], J[3] ); + + if ( TYPE & RADEON_RGBA_BIT ) { + INTERP_RGBA( t, + ((GLubyte *)&(O[4])), + ((GLubyte *)&(I[4])), + ((GLubyte *)&(J[4])) ); + } + + if ( TYPE & RADEON_TEX0_BIT ) { + O[6] = LINTERP( t, I[6], J[6] ); + O[7] = LINTERP( t, I[7], J[7] ); + } + + if ( TYPE & RADEON_TEX1_BIT ) { + O[8] = LINTERP( t, I[8], J[8] ); + O[9] = LINTERP( t, I[9], J[9] ); + } +} + + +static void TAG(radeon_init_fastpath)( struct radeon_fast_tab *tab ) +{ + tab->build_vertices = TAG(radeon_setup_full); + tab->interp = TAG(radeon_interp_vert); +} + +#undef TYPE +#undef TAG +#undef SIZE Index: xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.c:1.4 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.c Tue Apr 10 12:07:53 2001 @@ -0,0 +1,724 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.c,v 1.4 2001/04/10 16:07:53 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#include "radeon_context.h" +#include "radeon_state.h" +#include "radeon_ioctl.h" + +#include "mem.h" + +#define RADEON_TIMEOUT 2048 +#define USE_IN_MEMORY_SCRATCH_REGS 0 + + +/* ============================================================= + * Hardware vertex buffer handling + */ + +/* Get a new VB from the pool of vertex buffers in AGP space. + */ +drmBufPtr radeonGetBufferLocked( radeonContextPtr rmesa ) +{ + int fd = rmesa->radeonScreen->driScreen->fd; + int index = 0; + int size = 0; + drmDMAReq dma; + drmBufPtr buf = NULL; + int to = 0; + int ret; + + dma.context = rmesa->hHWContext; + dma.send_count = 0; + dma.send_list = NULL; + dma.send_sizes = NULL; + dma.flags = 0; + dma.request_count = 1; + dma.request_size = RADEON_BUFFER_SIZE; + dma.request_list = &index; + dma.request_sizes = &size; + dma.granted_count = 0; + + while ( !buf && ( to++ < RADEON_TIMEOUT ) ) { + ret = drmDMA( fd, &dma ); + + if ( ret == 0 ) { + buf = &rmesa->radeonScreen->buffers->list[index]; + buf->used = 0; +#if ENABLE_PERF_BOXES + /* Bump the performance counter */ + rmesa->c_vertexBuffers++; +#endif + return buf; + } + } + + if ( !buf ) { + drmRadeonEngineReset( fd ); + UNLOCK_HARDWARE( rmesa ); + fprintf( stderr, "Error: Could not get new VB... exiting\n" ); + exit( -1 ); + } + + return buf; +} + +static GLboolean intersect_rect( XF86DRIClipRectPtr out, + XF86DRIClipRectPtr a, + XF86DRIClipRectPtr b ) +{ + *out = *a; + if ( b->x1 > out->x1 ) out->x1 = b->x1; + if ( b->y1 > out->y1 ) out->y1 = b->y1; + if ( b->x2 < out->x2 ) out->x2 = b->x2; + if ( b->y2 < out->y2 ) out->y2 = b->y2; + if ( out->x1 >= out->x2 ) return GL_FALSE; + if ( out->y1 >= out->y2 ) return GL_FALSE; + return GL_TRUE; +} + +void radeonFlushVerticesLocked( radeonContextPtr rmesa ) +{ + XF86DRIClipRectPtr pbox = rmesa->pClipRects; + int nbox = rmesa->numClipRects; + drmBufPtr buffer = rmesa->vert_buf; + int count = rmesa->num_verts; + int prim = RADEON_TRIANGLES; + int fd = rmesa->driScreen->fd; + int i; + + rmesa->vert_buf = NULL; + rmesa->num_verts = 0; + + if ( !buffer ) + return; + + if ( rmesa->dirty & ~RADEON_UPLOAD_CLIPRECTS ) + radeonEmitHwStateLocked( rmesa ); + + if ( !nbox ) + count = 0; + + if ( nbox >= RADEON_NR_SAREA_CLIPRECTS ) + rmesa->dirty |= RADEON_UPLOAD_CLIPRECTS; + + if ( !count || !(rmesa->dirty & RADEON_UPLOAD_CLIPRECTS) ) + { + if ( nbox == 1 ) { + rmesa->sarea->nbox = 0; + } else { + rmesa->sarea->nbox = nbox; + } + + drmRadeonFlushVertexBuffer( fd, prim, buffer->idx, count, 1 ); + } + else + { + for ( i = 0 ; i < nbox ; ) { + int nr = MIN2( i + RADEON_NR_SAREA_CLIPRECTS, nbox ); + XF86DRIClipRectPtr b = rmesa->sarea->boxes; + int discard = 0; + + if ( rmesa->scissor ) { + rmesa->sarea->nbox = 0; + + for ( ; i < nr ; i++ ) { + *b = pbox[i]; + if ( intersect_rect( b, b, &rmesa->scissor_rect ) ) { + rmesa->sarea->nbox++; + b++; + } + } + + /* Culled? + */ + if ( !rmesa->sarea->nbox ) { + if ( nr < nbox ) continue; + count = 0; + } + } else { + rmesa->sarea->nbox = nr - i; + for ( ; i < nr ; i++) { + *b++ = pbox[i]; + } + } + + /* Finished with the buffer? + */ + if ( nr == nbox ) { + discard = 1; + } + + rmesa->sarea->dirty |= RADEON_UPLOAD_CLIPRECTS; + drmRadeonFlushVertexBuffer( fd, prim, buffer->idx, count, discard ); + } + } + + rmesa->dirty &= ~RADEON_UPLOAD_CLIPRECTS; +} + + + +/* ================================================================ + * Indexed vertex buffer handling + */ + +void radeonGetEltBufLocked( radeonContextPtr rmesa ) +{ + rmesa->elt_buf = radeonGetBufferLocked( rmesa ); +} + +void radeonFireEltsLocked( radeonContextPtr rmesa, + GLuint start, GLuint end, + GLuint discard ) +{ + XF86DRIClipRectPtr pbox = rmesa->pClipRects; + int nbox = rmesa->numClipRects; + drmBufPtr buffer = rmesa->elt_buf; + int prim = RADEON_TRIANGLES; + int fd = rmesa->driScreen->fd; + int i; + + if ( !buffer ) + return; + + if ( rmesa->dirty & ~RADEON_UPLOAD_CLIPRECTS ) + radeonEmitHwStateLocked( rmesa ); + + if ( !nbox ) + end = start; + + if ( nbox >= RADEON_NR_SAREA_CLIPRECTS ) + rmesa->dirty |= RADEON_UPLOAD_CLIPRECTS; + + if ( start == end || !(rmesa->dirty & RADEON_UPLOAD_CLIPRECTS) ) + { + if ( nbox == 1 ) { + rmesa->sarea->nbox = 0; + } else { + rmesa->sarea->nbox = nbox; + } + + drmRadeonFlushIndices( fd, prim, buffer->idx, start, end, discard ); + } + else + { + for ( i = 0 ; i < nbox ; ) { + int nr = MIN2( i + RADEON_NR_SAREA_CLIPRECTS, nbox ); + XF86DRIClipRectPtr b = rmesa->sarea->boxes; + int d = 0; + + if ( rmesa->scissor ) { + rmesa->sarea->nbox = 0; + + for ( ; i < nr ; i++ ) { + *b = pbox[i]; + if ( intersect_rect( b, b, &rmesa->scissor_rect ) ) { + rmesa->sarea->nbox++; + b++; + } + } + + /* Culled? + */ + if ( !rmesa->sarea->nbox ) { + if ( nr < nbox ) continue; + end = start; + } + } else { + rmesa->sarea->nbox = nr - i; + for ( ; i < nr ; i++) { + *b++ = pbox[i]; + } + } + + /* Finished with the buffer? + */ + if ( nr == nbox ) { + d = discard; + } + + rmesa->sarea->dirty |= RADEON_UPLOAD_CLIPRECTS; + drmRadeonFlushIndices( fd, prim, buffer->idx, start, end, d ); + } + } + + rmesa->dirty &= ~RADEON_UPLOAD_CLIPRECTS; +} + +void radeonFlushEltsLocked( radeonContextPtr rmesa ) +{ + if ( rmesa->first_elt != rmesa->next_elt ) { + radeonFireEltsLocked( rmesa, + ((char *)rmesa->first_elt - + (char *)rmesa->elt_buf->address), + ((char *)rmesa->next_elt - + (char *)rmesa->elt_buf->address), + 0 ); + + ALIGN_NEXT_ELT( rmesa ); + rmesa->first_elt = rmesa->next_elt; + } +} + +void radeonReleaseBufLocked( radeonContextPtr rmesa, drmBufPtr buffer ) +{ + int fd = rmesa->driScreen->fd; + + if ( !buffer ) + return; + + drmRadeonFlushVertexBuffer( fd, RADEON_TRIANGLES, buffer->idx, 0, 1 ); +} + + +/* Allocate some space in the current vertex buffer. If the current + * buffer is full, flush it and grab another one. + */ +CARD32 *radeonAllocVertices( radeonContextPtr rmesa, GLuint count ) +{ + return radeonAllocVerticesInline( rmesa, count ); +} + + +/* ================================================================ + * Texture uploads + */ + +void radeonFireBlitLocked( radeonContextPtr rmesa, drmBufPtr buffer, + GLint offset, GLint pitch, GLint format, + GLint x, GLint y, GLint width, GLint height ) +{ +#if 0 + GLint ret; + + ret = drmRadeonTextureBlit( rmesa->driFd, buffer->idx, + offset, pitch, format, + x, y, width, height ); + + if ( ret ) { + UNLOCK_HARDWARE( rmesa ); + fprintf( stderr, "drmRadeonTextureBlit: return = %d\n", ret ); + exit( 1 ); + } +#endif +} + + +/* ================================================================ + * SwapBuffers with client-side throttling + */ + +#define RADEON_MAX_OUTSTANDING 2 + +/* Throttle the frame rate -- only allow one pending swap buffers + * request at a time. + * GH: We probably don't want a timeout here, as we can wait as + * long as we want for a frame to complete. If it never does, then + * the card has locked. + */ +#if USE_IN_MEMORY_SCRATCH_REGS +static int radeonWaitForFrameCompletion( radeonContextPtr rmesa ) +{ + RADEONSAREAPrivPtr sarea = rmesa->sarea; + __volatile__ CARD32 *scratch = rmesa->radeonScreen->scratch; + CARD32 frame; + int wait = 0; + + while ( 1 ) { + /* Read the frame counter from the in-memory copy of the scratch + * register. Nifty, eh? Should significantly reduce the bus + * traffic for SwapBuffers-limited apps (generally pretty trivial + * ones, but anyway). + */ + frame = scratch[0]; + if ( sarea->last_frame - frame <= RADEON_MAX_OUTSTANDING ) { + break; + } + wait++; + } + + return wait; +} +#else +static void delay( void ) { +/* Prevent an optimizing compiler from removing a spin loop */ +} + +static int radeonWaitForFrameCompletion( radeonContextPtr rmesa ) +{ + unsigned char *RADEONMMIO = rmesa->radeonScreen->mmio.map; + RADEONSAREAPrivPtr sarea = rmesa->sarea; + CARD32 frame; + int wait = 0; + int i; + + while ( 1 ) { +#if defined(__alpha__) + /* necessary to preserve the Alpha paradigm */ + /* NOTE: this will not work on SPARSE machines */ + mem_barrier(); + frame = *(volatile CARD32 *)(void *)(RADEONMMIO + RADEON_LAST_FRAME_REG); +#else + frame = INREG( RADEON_LAST_FRAME_REG ); +#endif + if ( sarea->last_frame - frame <= RADEON_MAX_OUTSTANDING ) { + break; + } + wait++; + /* Spin in place a bit so we aren't hammering the bus */ + for ( i = 0 ; i < 1024 ; i++ ) { + delay(); + } + } + + return wait; +} +#endif + +/* Copy the back color buffer to the front color buffer. + */ +void radeonSwapBuffers( radeonContextPtr rmesa ) +{ + GLint nbox; + GLint i; + GLint ret; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "\n%s( %p )\n\n", __FUNCTION__, rmesa->glCtx ); + } + + FLUSH_BATCH( rmesa ); + + LOCK_HARDWARE( rmesa ); + + nbox = rmesa->numClipRects; /* must be in locked region */ + + /* Throttle the frame rate -- only allow one pending swap buffers + * request at a time. + */ + if ( !radeonWaitForFrameCompletion( rmesa ) ) { + rmesa->hardwareWentIdle = 1; + } else { + rmesa->hardwareWentIdle = 0; + } + + for ( i = 0 ; i < nbox ; ) { + GLint nr = MIN2( i + RADEON_NR_SAREA_CLIPRECTS , nbox ); + XF86DRIClipRectPtr box = rmesa->pClipRects; + XF86DRIClipRectPtr b = rmesa->sarea->boxes; + GLint n = 0; + + for ( ; i < nr ; i++ ) { + *b++ = *(XF86DRIClipRectPtr)&box[i]; + n++; + } + rmesa->sarea->nbox = n; + + ret = drmRadeonSwapBuffers( rmesa->driFd ); + + if ( ret ) { + fprintf( stderr, "drmRadeonSwapBuffers: return = %d\n", ret ); + UNLOCK_HARDWARE( rmesa ); + exit( 1 ); + } + } + + UNLOCK_HARDWARE( rmesa ); + + rmesa->new_state |= RADEON_NEW_CONTEXT; + rmesa->dirty |= (RADEON_UPLOAD_CONTEXT | + RADEON_UPLOAD_MASKS | + RADEON_UPLOAD_CLIPRECTS); + +#if ENABLE_PERF_BOXES + /* Log the performance counters if necessary */ + radeonPerformanceCounters( rmesa ); +#endif +} + +void radeonPageFlip( radeonContextPtr rmesa ) +{ + GLint ret; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "\n%s( %p ): page=%d\n\n", + __FUNCTION__, rmesa->glCtx, rmesa->currentPage ); + } + + FLUSH_BATCH( rmesa ); + + LOCK_HARDWARE( rmesa ); + + /* Throttle the frame rate -- only allow one pending swap buffers + * request at a time. + */ + if ( !radeonWaitForFrameCompletion( rmesa ) ) { + rmesa->hardwareWentIdle = 1; + } else { + rmesa->hardwareWentIdle = 0; + } + + /* The kernel will have been initialized to perform page flipping + * on a swapbuffers ioctl. + */ + ret = drmRadeonSwapBuffers( rmesa->driFd ); + + UNLOCK_HARDWARE( rmesa ); + + if ( ret ) { + fprintf( stderr, "drmRadeonSwapBuffers: return = %d\n", ret ); + exit( 1 ); + } + + if ( rmesa->currentPage == 0 ) { + rmesa->drawOffset = rmesa->radeonScreen->frontOffset; + rmesa->drawPitch = rmesa->radeonScreen->frontPitch; + rmesa->currentPage = 1; + } else { + rmesa->drawOffset = rmesa->radeonScreen->backOffset; + rmesa->drawPitch = rmesa->radeonScreen->backPitch; + rmesa->currentPage = 0; + } + + rmesa->setup.rb3d_coloroffset = rmesa->drawOffset; + rmesa->setup.rb3d_colorpitch = rmesa->drawPitch; + + rmesa->new_state |= RADEON_NEW_WINDOW; + + /* FIXME: Do we need this anymore? */ + rmesa->new_state |= RADEON_NEW_CONTEXT; + rmesa->dirty |= (RADEON_UPLOAD_CONTEXT | + RADEON_UPLOAD_MASKS | + RADEON_UPLOAD_CLIPRECTS); + +#if ENABLE_PERF_BOXES + /* Log the performance counters if necessary */ + radeonPerformanceCounters( rmesa ); +#endif +} + + +/* ================================================================ + * Buffer clear + */ +#define RADEON_MAX_CLEARS 256 + +static GLbitfield radeonDDClear( GLcontext *ctx, GLbitfield mask, + GLboolean all, + GLint cx, GLint cy, GLint cw, GLint ch ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + __DRIdrawablePrivate *dPriv = rmesa->driDrawable; + RADEONSAREAPrivPtr sarea = rmesa->sarea; +#if USE_IN_MEMORY_SCRATCH_REGS + __volatile__ CARD32 *scratch = rmesa->radeonScreen->scratch; +#else + unsigned char *RADEONMMIO = rmesa->radeonScreen->mmio.map; +#endif + CARD32 clear; + GLuint flags = 0; + GLuint color_mask = 0; + GLuint depth_mask = 0; + GLint ret, i; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s: all=%d cx=%d cy=%d cw=%d ch=%d\n", + __FUNCTION__, all, cx, cy, cw, ch ); + } + + FLUSH_BATCH( rmesa ); + + /* Update and emit any new state. We need to do this here to catch + * changes to the masks. + * FIXME: Just update the masks? + */ + if ( rmesa->new_state ) + radeonDDUpdateHWState( ctx ); + + if ( mask & DD_FRONT_LEFT_BIT ) { + flags |= DRM_RADEON_FRONT; + color_mask = rmesa->setup.rb3d_planemask; + mask &= ~DD_FRONT_LEFT_BIT; + } + + if ( mask & DD_BACK_LEFT_BIT ) { + flags |= DRM_RADEON_BACK; + color_mask = rmesa->setup.rb3d_planemask; + mask &= ~DD_BACK_LEFT_BIT; + } + + if ( mask & DD_DEPTH_BIT ) { + if ( ctx->Depth.Mask ) { + flags |= DRM_RADEON_DEPTH; + depth_mask |= rmesa->DepthMask; + } + mask &= ~DD_DEPTH_BIT; + } +#if 0 + /* FIXME: Add stencil support */ + if ( mask & DD_STENCIL_BIT ) { + flags |= DRM_RADEON_DEPTH; + depth_mask |= rmesa->StencilMask; + mask &= ~DD_STENCIL_BIT; + } +#endif + + if ( !flags ) + return mask; + + /* Flip top to bottom */ + cx += dPriv->x; + cy = dPriv->y + dPriv->h - cy - ch; + + LOCK_HARDWARE( rmesa ); + + /* Throttle the number of clear ioctls we do. + */ +#if USE_IN_MEMORY_SCRATCH_REGS + while ( 1 ) { + clear = scratch[2]; + if ( sarea->last_clear - clear <= RADEON_MAX_CLEARS ) { + break; + } + } +#else + while ( 1 ) { +#if defined(__alpha__) + /* necessary to preserve the Alpha paradigm */ + /* NOTE: this will not work on SPARSE machines */ + mem_barrier(); + clear = *(volatile CARD32 *)(void *)(RADEONMMIO + RADEON_LAST_CLEAR_REG); +#else + clear = INREG( RADEON_LAST_CLEAR_REG ); +#endif + if ( sarea->last_clear - clear <= RADEON_MAX_CLEARS ) { + break; + } + /* Spin in place a bit so we aren't hammering the bus */ + for ( i = 0 ; i < 1024 ; i++ ) { + delay(); + } + } +#endif + + for ( i = 0 ; i < rmesa->numClipRects ; ) { + GLint nr = MIN2( i + RADEON_NR_SAREA_CLIPRECTS, rmesa->numClipRects ); + XF86DRIClipRectPtr box = rmesa->pClipRects; + XF86DRIClipRectPtr b = rmesa->sarea->boxes; + GLint n = 0; + + if ( !all ) { + for ( ; i < nr ; i++ ) { + GLint x = box[i].x1; + GLint y = box[i].y1; + GLint w = box[i].x2 - x; + GLint h = box[i].y2 - y; + + if ( x < cx ) w -= cx - x, x = cx; + if ( y < cy ) h -= cy - y, y = cy; + if ( x + w > cx + cw ) w = cx + cw - x; + if ( y + h > cy + ch ) h = cy + ch - y; + if ( w <= 0 ) continue; + if ( h <= 0 ) continue; + + b->x1 = x; + b->y1 = y; + b->x2 = x + w; + b->y2 = y + h; + b++; + n++; + } + } else { + for ( ; i < nr ; i++ ) { + *b++ = *(XF86DRIClipRectPtr)&box[i]; + n++; + } + } + + rmesa->sarea->nbox = n; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_IOCTL ) { + fprintf( stderr, + "drmRadeonClear: flag 0x%x color %x depth %x nbox %d\n", + flags, + (GLuint)rmesa->ClearColor, + (GLuint)rmesa->ClearDepth, + rmesa->sarea->nbox ); + } + + ret = drmRadeonClear( rmesa->driFd, flags, + rmesa->ClearColor, rmesa->ClearDepth, + color_mask, depth_mask, + rmesa->sarea->boxes, rmesa->sarea->nbox ); + + if ( ret ) { + UNLOCK_HARDWARE( rmesa ); + fprintf( stderr, "drmRadeonClear: return = %d\n", ret ); + exit( 1 ); + } + } + + UNLOCK_HARDWARE( rmesa ); + + rmesa->dirty |= RADEON_UPLOAD_CLIPRECTS; + + return mask; +} + + +void radeonWaitForIdleLocked( radeonContextPtr rmesa ) +{ + int fd = rmesa->radeonScreen->driScreen->fd; + int to = 0; + int ret; + + do { + ret = drmRadeonWaitForIdleCP( fd ); + } while ( ( ret == -EBUSY ) && ( to++ < RADEON_TIMEOUT ) ); + + if ( ret < 0 ) { + drmRadeonEngineReset( fd ); + UNLOCK_HARDWARE( rmesa ); + fprintf( stderr, "Error: Radeon timed out... exiting\n" ); + exit( -1 ); + } +} + + +void radeonDDInitIoctlFuncs( GLcontext *ctx ) +{ + ctx->Driver.Clear = radeonDDClear; +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.h:1.2 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.h Sun Apr 1 10:00:00 2001 @@ -0,0 +1,161 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.h,v 1.2 2001/04/01 14:00:00 tsi Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#ifndef __RADEON_IOCTL_H__ +#define __RADEON_IOCTL_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "radeon_dri.h" +#include "radeon_lock.h" + +#include "xf86drm.h" +#include "xf86drmRadeon.h" + +#define RADEON_BUFFER_MAX_DWORDS (RADEON_BUFFER_SIZE / sizeof(CARD32)) + + +extern drmBufPtr radeonGetBufferLocked( radeonContextPtr rmesa ); +extern void radeonFlushVerticesLocked( radeonContextPtr rmesa ); + +extern void radeonGetEltBufLocked( radeonContextPtr rmesa ); +extern void radeonFlushEltsLocked( radeonContextPtr rmesa ); +extern void radeonFireEltsLocked( radeonContextPtr rmesa, + GLuint start, GLuint end, + GLuint discard ); +extern void radeonReleaseBufLocked( radeonContextPtr rmesa, drmBufPtr buffer ); + +/* Make this available as both a regular and an inline function. + */ +extern CARD32 *radeonAllocVertices( radeonContextPtr rmesa, GLuint count ); + +static __inline CARD32 *radeonAllocVerticesInline( radeonContextPtr rmesa, + GLuint count ) +{ + int bytes = count * rmesa->vertsize * 4; + CARD32 *head; + + if ( !rmesa->vert_buf ) { + LOCK_HARDWARE( rmesa ); + + if ( rmesa->first_elt != rmesa->next_elt ) { + radeonFlushEltsLocked( rmesa ); + } + + rmesa->vert_buf = radeonGetBufferLocked( rmesa ); + + UNLOCK_HARDWARE( rmesa ); + } else if ( rmesa->vert_buf->used + bytes > rmesa->vert_buf->total ) { + LOCK_HARDWARE( rmesa ); + + radeonFlushVerticesLocked( rmesa ); + rmesa->vert_buf = radeonGetBufferLocked( rmesa ); + + UNLOCK_HARDWARE( rmesa ); + } + + head = (CARD32 *)((char *)rmesa->vert_buf->address + + rmesa->vert_buf->used); + + rmesa->vert_buf->used += bytes; + rmesa->num_verts += count; + return head; +} + +extern void radeonFireBlitLocked( radeonContextPtr rmesa, + drmBufPtr buffer, + GLint offset, GLint pitch, GLint format, + GLint x, GLint y, + GLint width, GLint height ); + +extern void radeonSwapBuffers( radeonContextPtr rmesa ); +extern void radeonPageFlip( radeonContextPtr rmesa ); + +extern void radeonWaitForIdleLocked( radeonContextPtr rmesa ); + + +extern void radeonDDInitIoctlFuncs( GLcontext *ctx ); + + +/* ================================================================ + * Helper macros: + */ + +#define FLUSH_BATCH( rmesa ) \ +do { \ + if ( RADEON_DEBUG & DEBUG_VERBOSE_IOCTL ) \ + fprintf( stderr, "FLUSH_BATCH in %s\n", __FUNCTION__ ); \ + if ( rmesa->vert_buf ) { \ + radeonFlushVertices( rmesa ); \ + } else if ( rmesa->next_elt != rmesa->first_elt ) { \ + radeonFlushElts( rmesa ); \ + } \ +} while (0) + +/* 64-bit align the next element address, and then make room for the + * next indexed prim packet header. + */ +#define ALIGN_NEXT_ELT( rmesa ) \ +do { \ + rmesa->next_elt = (GLushort *) \ + (((unsigned long)rmesa->next_elt + 7) & ~0x7); \ + rmesa->next_elt = (GLushort *) \ + ((GLubyte *)rmesa->next_elt + RADEON_INDEX_PRIM_OFFSET); \ +} while (0) + +#define radeonFlushVertices( rmesa ) \ +do { \ + LOCK_HARDWARE( rmesa ); \ + radeonFlushVerticesLocked( rmesa ); \ + UNLOCK_HARDWARE( rmesa ); \ +} while (0) + +#define radeonFlushElts( rmesa ) \ +do { \ + LOCK_HARDWARE( rmesa ); \ + radeonFlushEltsLocked( rmesa ); \ + UNLOCK_HARDWARE( rmesa ); \ +} while (0) + +#define radeonWaitForIdle( rmesa ) \ +do { \ + LOCK_HARDWARE( rmesa ); \ + radeonWaitForIdleLocked( rmesa ); \ + UNLOCK_HARDWARE( rmesa ); \ +} while (0) + +#endif +#endif /* __RADEON_IOCTL_H__ */ Index: xc/lib/GL/mesa/src/drv/radeon/radeon_lock.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_lock.c:1.3 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_lock.c Tue Apr 10 12:07:53 2001 @@ -0,0 +1,95 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_lock.c,v 1.3 2001/04/10 16:07:53 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#include "radeon_context.h" +#include "radeon_lock.h" +#include "radeon_tex.h" + +#if DEBUG_LOCKING +char *prevLockFile = NULL; +int prevLockLine = 0; +#endif + + +/* Update the hardware state. This is called if another context has + * grabbed the hardware lock, which includes the X server. This + * function also updates the driver's window state after the X server + * moves, resizes or restacks a window -- the change will be reflected + * in the drawable position and clip rects. Since the X server grabs + * the hardware lock when it changes the window state, this routine will + * automatically be called after such a change. + */ +void radeonGetLock( radeonContextPtr rmesa, GLuint flags ) +{ + __DRIdrawablePrivate *dPriv = rmesa->driDrawable; + __DRIscreenPrivate *sPriv = rmesa->driScreen; + RADEONSAREAPrivPtr sarea = rmesa->sarea; + int i; + + drmGetLock( rmesa->driFd, rmesa->hHWContext, flags ); + + /* The window might have moved, so we might need to get new clip + * rects. + * + * NOTE: This releases and regrabs the hw lock to allow the X server + * to respond to the DRI protocol request for new drawable info. + * Since the hardware state depends on having the latest drawable + * clip rects, all state checking must be done _after_ this call. + */ + XMESA_VALIDATE_DRAWABLE_INFO( rmesa->display, sPriv, dPriv ); + + if ( rmesa->lastStamp != *(dPriv->pStamp) ) { + rmesa->lastStamp = *(dPriv->pStamp); + rmesa->new_state |= RADEON_NEW_WINDOW | RADEON_NEW_CLIP; + rmesa->SetupDone = 0; + } + + rmesa->dirty |= RADEON_UPLOAD_CONTEXT | RADEON_UPLOAD_CLIPRECTS; + + rmesa->numClipRects = dPriv->numClipRects; + rmesa->pClipRects = dPriv->pClipRects; + + if ( sarea->ctxOwner != rmesa->hHWContext ) { + sarea->ctxOwner = rmesa->hHWContext; + rmesa->dirty = RADEON_UPLOAD_ALL; + } + + for ( i = 0 ; i < rmesa->lastTexHeap ; i++ ) { + if ( sarea->texAge[i] != rmesa->lastTexAge[i] ) { + radeonAgeTextures( rmesa, i ); + } + } +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_lock.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_lock.h:1.1 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_lock.h Sun Jan 7 20:07:27 2001 @@ -0,0 +1,112 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_lock.h,v 1.1 2001/01/08 01:07:27 martin Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#ifndef __RADEON_LOCK_H__ +#define __RADEON_LOCK_H__ + +#ifdef GLX_DIRECT_RENDERING + +extern void radeonGetLock( radeonContextPtr rmesa, GLuint flags ); + +/* Turn DEBUG_LOCKING on to find locking conflicts. + */ +#define DEBUG_LOCKING 0 + +#if DEBUG_LOCKING +extern char *prevLockFile; +extern int prevLockLine; + +#define DEBUG_LOCK() \ + do { \ + prevLockFile = (__FILE__); \ + prevLockLine = (__LINE__); \ + } while (0) + +#define DEBUG_RESET() \ + do { \ + prevLockFile = 0; \ + prevLockLine = 0; \ + } while (0) + +#define DEBUG_CHECK_LOCK() \ + do { \ + if ( prevLockFile ) { \ + fprintf( stderr, \ + "LOCK SET!\n\tPrevious %s:%d\n\tCurrent: %s:%d\n", \ + prevLockFile, prevLockLine, __FILE__, __LINE__ ); \ + exit( 1 ); \ + } \ + } while (0) + +#else + +#define DEBUG_LOCK() +#define DEBUG_RESET() +#define DEBUG_CHECK_LOCK() + +#endif + +/* + * !!! We may want to separate locks from locks with validation. This + * could be used to improve performance for those things commands that + * do not do any drawing !!! + */ + +/* Lock the hardware and validate our state. + */ +#define LOCK_HARDWARE( rmesa ) \ + do { \ + char __ret = 0; \ + DEBUG_CHECK_LOCK(); \ + DRM_CAS( rmesa->driHwLock, rmesa->hHWContext, \ + (DRM_LOCK_HELD | rmesa->hHWContext), __ret ); \ + if ( __ret ) \ + radeonGetLock( rmesa, 0 ); \ + DEBUG_LOCK(); \ + } while (0) + +/* Unlock the hardware. + */ +#define UNLOCK_HARDWARE( rmesa ) \ + do { \ + DRM_UNLOCK( rmesa->driFd, \ + rmesa->driHwLock, \ + rmesa->hHWContext ); \ + DEBUG_RESET(); \ + } while (0) + +#endif +#endif /* __RADEON_LOCK_H__ */ Index: xc/lib/GL/mesa/src/drv/radeon/radeon_pipeline.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_pipeline.c:1.1 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_pipeline.c Sun Jan 7 20:07:27 2001 @@ -0,0 +1,168 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_pipeline.c,v 1.1 2001/01/08 01:07:27 martin Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#include "radeon_context.h" +#include "radeon_vb.h" +#include "radeon_pipeline.h" + +#include "types.h" +#include "fog.h" + +static struct gl_pipeline_stage radeon_fast_stage = { + "Radeon Fast Path", + (PIPE_OP_VERT_XFORM | + PIPE_OP_RAST_SETUP_0 | + PIPE_OP_RAST_SETUP_1 | + PIPE_OP_RENDER), + PIPE_PRECALC, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + radeonDDFastPath +}; + +#define ILLEGAL_ENABLES (TEXTURE0_3D | \ + TEXTURE1_3D | \ + ENABLE_TEXMAT0 | \ + ENABLE_TEXMAT1 | \ + ENABLE_TEXGEN0 | \ + ENABLE_TEXGEN1 | \ + ENABLE_USERCLIP | \ + ENABLE_LIGHT | \ + ENABLE_FOG) + +/* Build the PRECALC pipeline with our stage, if possible. Otherwise, + * return GL_FALSE. + */ +GLboolean radeonDDBuildPrecalcPipeline( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + struct gl_pipeline *pipe = &ctx->CVA.pre; + + if ( rmesa->RenderIndex == 0 && + (ctx->Enabled & ILLEGAL_ENABLES) == 0 && + (ctx->Array.Flags & (VERT_OBJ_234 | + VERT_TEX0_4 | + VERT_TEX1_4 | + VERT_ELT)) == (VERT_OBJ_23 | VERT_ELT) ) + { + pipe->stages[0] = &radeon_fast_stage; + pipe->stages[1] = 0; + pipe->new_inputs = ctx->RenderFlags & VERT_DATA; + pipe->ops = pipe->stages[0]->ops; + + rmesa->OnFastPath = GL_TRUE; + return GL_TRUE; + } + + if ( rmesa->OnFastPath ) { + rmesa->OnFastPath = GL_FALSE; + + ctx->CVA.VB->ClipOrMask = 0; + ctx->CVA.VB->ClipAndMask = CLIP_ALL_BITS; + ctx->Array.NewArrayState |= ctx->Array.Summary; + } + + return GL_FALSE; +} + + +/* Still do the normal fixup and copy-to-current, so this isn't so + * bad. + */ +#define ILLEGAL_INPUTS_IMM (VERT_OBJ_4 | \ + VERT_TEX0_4 | \ + VERT_TEX1_4 | \ + VERT_MATERIAL) + +static void radeonDDCheckRasterSetup( GLcontext *ctx, + struct gl_pipeline_stage *d ) +{ + d->type = PIPE_IMMEDIATE | PIPE_PRECALC; + d->inputs = ctx->RenderFlags; + + /* Radeon requires an extra input: + */ + if ( ctx->FogMode == FOG_FRAGMENT ) + d->inputs |= VERT_FOG_COORD; + + d->outputs = VERT_SETUP_FULL; + + if ( ctx->IndirectTriangles & DD_SW_SETUP ) + d->type = PIPE_IMMEDIATE; +} + + +GLuint radeonDDRegisterPipelineStages( struct gl_pipeline_stage *out, + const struct gl_pipeline_stage *in, + GLuint nr ) +{ + int i, o; + + for ( i = o = 0 ; i < nr ; i++ ) { + switch ( in[i].ops ) { + /* Completely replace Mesa's fog processing to generate fog + * coordinates instead of messing with colors. + */ + case PIPE_OP_FOG: + out[o] = gl_fog_coord_stage; + o++; + break; + + case PIPE_OP_RAST_SETUP_0: + out[o] = in[i]; + out[o].cva_state_change = (NEW_LIGHTING | + NEW_TEXTURING | + NEW_RASTER_OPS); + out[o].state_change = ~0; + out[o].check = radeonDDCheckPartialRasterSetup; + out[o].run = radeonDDPartialRasterSetup; + o++; + break; + + case PIPE_OP_RAST_SETUP_0 | PIPE_OP_RAST_SETUP_1: + out[o] = in[i]; + out[o].check = radeonDDCheckRasterSetup; + out[o].run = radeonDDDoRasterSetup; + o++; + break; + + default: + out[o++] = in[i]; + break; + } + } + + return o; +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_pipeline.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_pipeline.h:1.1 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_pipeline.h Sun Jan 7 20:07:27 2001 @@ -0,0 +1,54 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_pipeline.h,v 1.1 2001/01/08 01:07:27 martin Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#ifndef __RADEON_PIPELINE_H__ +#define __RADEON_PIPELINE_H__ + +#ifdef GLX_DIRECT_RENDERING + +extern GLboolean radeonDDBuildPrecalcPipeline( GLcontext *ctx ); +extern GLuint radeonDDRegisterPipelineStages( struct gl_pipeline_stage *out, + const struct gl_pipeline_stage *in, + GLuint nr ); + +extern void radeonDDFastPathInit( void ); +extern void radeonDDFastPath( struct vertex_buffer *VB ); + +extern void radeonDDEltPathInit( void ); +extern void radeonDDEltPath( struct vertex_buffer *VB ); + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c:1.3 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c Wed May 2 11:06:04 2001 @@ -0,0 +1,194 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c,v 1.3 2001/05/02 15:06:04 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#include "radeon_dri.h" + +#include "radeon_context.h" +#include "radeon_ioctl.h" +#include "radeon_tris.h" +#include "radeon_vb.h" +#include "radeon_pipeline.h" + +#include "mem.h" + +#if 1 +/* Including xf86PciInfo.h introduces a bunch of errors... + */ +#define PCI_CHIP_RADEON_QD 0x5144 +#define PCI_CHIP_RADEON_QE 0x5145 +#define PCI_CHIP_RADEON_QF 0x5146 +#define PCI_CHIP_RADEON_QG 0x5147 +#define PCI_CHIP_RADEON_VE 0x5159 +#endif + + +/* Create the device specific screen private data struct. + */ +radeonScreenPtr radeonCreateScreen( __DRIscreenPrivate *sPriv ) +{ + radeonScreenPtr radeonScreen; + RADEONDRIPtr radeonDRIPriv = (RADEONDRIPtr)sPriv->pDevPriv; + + /* Allocate the private area */ + radeonScreen = (radeonScreenPtr) CALLOC( sizeof(*radeonScreen) ); + if ( !radeonScreen ) return NULL; + + /* This is first since which regions we map depends on whether or + * not we are using a PCI card. + */ + radeonScreen->IsPCI = radeonDRIPriv->IsPCI; + + radeonScreen->mmio.handle = radeonDRIPriv->registerHandle; + radeonScreen->mmio.size = radeonDRIPriv->registerSize; + if ( drmMap( sPriv->fd, + radeonScreen->mmio.handle, + radeonScreen->mmio.size, + &radeonScreen->mmio.map ) ) { + FREE( radeonScreen ); + return NULL; + } + + radeonScreen->status.handle = radeonDRIPriv->statusHandle; + radeonScreen->status.size = radeonDRIPriv->statusSize; + if ( drmMap( sPriv->fd, + radeonScreen->status.handle, + radeonScreen->status.size, + &radeonScreen->status.map ) ) { + drmUnmap( radeonScreen->mmio.map, radeonScreen->mmio.size ); + FREE( radeonScreen ); + return NULL; + } + radeonScreen->scratch = (__volatile__ CARD32 *) + ((GLubyte *)radeonScreen->status.map + RADEON_SCRATCH_REG_OFFSET); + + radeonScreen->buffers = drmMapBufs( sPriv->fd ); + if ( !radeonScreen->buffers ) { + drmUnmap( radeonScreen->status.map, radeonScreen->status.size ); + drmUnmap( radeonScreen->mmio.map, radeonScreen->mmio.size ); + FREE( radeonScreen ); + return NULL; + } + + if ( !radeonScreen->IsPCI ) { + radeonScreen->agpTextures.handle = radeonDRIPriv->agpTexHandle; + radeonScreen->agpTextures.size = radeonDRIPriv->agpTexMapSize; + if ( drmMap( sPriv->fd, + radeonScreen->agpTextures.handle, + radeonScreen->agpTextures.size, + (drmAddressPtr)&radeonScreen->agpTextures.map ) ) { + drmUnmapBufs( radeonScreen->buffers ); + drmUnmap( radeonScreen->status.map, radeonScreen->status.size ); + drmUnmap( radeonScreen->mmio.map, radeonScreen->mmio.size ); + FREE( radeonScreen ); + return NULL; + } + } + + + switch ( radeonDRIPriv->deviceID ) { + case PCI_CHIP_RADEON_QD: + case PCI_CHIP_RADEON_QE: + case PCI_CHIP_RADEON_QF: + case PCI_CHIP_RADEON_QG: + case PCI_CHIP_RADEON_VE: + radeonScreen->chipset = RADEON_CARD_TYPE_RADEON; + break; + default: + radeonScreen->chipset = RADEON_CARD_TYPE_RADEON; + break; + } + + radeonScreen->cpp = radeonDRIPriv->bpp / 8; + radeonScreen->AGPMode = radeonDRIPriv->AGPMode; + + radeonScreen->frontOffset = radeonDRIPriv->frontOffset; + radeonScreen->frontPitch = radeonDRIPriv->frontPitch; + radeonScreen->backOffset = radeonDRIPriv->backOffset; + radeonScreen->backPitch = radeonDRIPriv->backPitch; + radeonScreen->depthOffset = radeonDRIPriv->depthOffset; + radeonScreen->depthPitch = radeonDRIPriv->depthPitch; + + radeonScreen->texOffset[RADEON_CARD_HEAP] = radeonDRIPriv->textureOffset; + radeonScreen->texSize[RADEON_CARD_HEAP] = radeonDRIPriv->textureSize; + radeonScreen->logTexGranularity[RADEON_CARD_HEAP] = + radeonDRIPriv->log2TexGran; + + if ( radeonScreen->IsPCI ) { + radeonScreen->numTexHeaps = RADEON_NR_TEX_HEAPS - 1; + radeonScreen->texOffset[RADEON_AGP_HEAP] = 0; + radeonScreen->texSize[RADEON_AGP_HEAP] = 0; + radeonScreen->logTexGranularity[RADEON_AGP_HEAP] = 0; + } else { + radeonScreen->numTexHeaps = RADEON_NR_TEX_HEAPS; + radeonScreen->texOffset[RADEON_AGP_HEAP] = + radeonDRIPriv->agpTexOffset + RADEON_AGP_TEX_OFFSET; + radeonScreen->texSize[RADEON_AGP_HEAP] = radeonDRIPriv->agpTexMapSize; + radeonScreen->logTexGranularity[RADEON_AGP_HEAP] = + radeonDRIPriv->log2AGPTexGran; + } + + radeonScreen->driScreen = sPriv; + radeonScreen->sarea_priv_offset = radeonDRIPriv->sarea_priv_offset; + +#ifdef PER_CONTEXT_SAREA + radeonScreen->perctx_sarea_size = radeonDRIPriv->perctx_sarea_size; +#endif + + radeonDDSetupInit(); + radeonDDTriangleFuncsInit(); + radeonDDFastPathInit(); + radeonDDEltPathInit(); + + return radeonScreen; +} + +/* Destroy the device specific screen private data struct. + */ +void radeonDestroyScreen( __DRIscreenPrivate *sPriv ) +{ + radeonScreenPtr radeonScreen = (radeonScreenPtr)sPriv->private; + + if ( !radeonScreen->IsPCI ) { + drmUnmap( radeonScreen->agpTextures.map, + radeonScreen->agpTextures.size ); + } + drmUnmapBufs( radeonScreen->buffers ); + drmUnmap( radeonScreen->status.map, radeonScreen->status.size ); + drmUnmap( radeonScreen->mmio.map, radeonScreen->mmio.size ); + + FREE( radeonScreen ); + sPriv->private = NULL; +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_screen.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_screen.h:1.2 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_screen.h Wed Mar 21 11:14:25 2001 @@ -0,0 +1,91 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_screen.h,v 1.2 2001/03/21 16:14:25 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#ifndef __RADEON_SCREEN_H__ +#define __RADEON_SCREEN_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "radeon_sarea.h" + +typedef struct { + drmHandle handle; /* Handle to the DRM region */ + drmSize size; /* Size of the DRM region */ + drmAddress map; /* Mapping of the DRM region */ +} radeonRegionRec, *radeonRegionPtr; + +typedef struct { + + GLint chipset; + GLint cpp; + GLint IsPCI; /* Current card is a PCI card */ + GLint AGPMode; + + GLuint frontOffset; + GLuint frontPitch; + GLuint backOffset; + GLuint backPitch; + + GLuint depthOffset; + GLuint depthPitch; + + /* Shared texture data */ + int numTexHeaps; + int texOffset[RADEON_NR_TEX_HEAPS]; + int texSize[RADEON_NR_TEX_HEAPS]; + int logTexGranularity[RADEON_NR_TEX_HEAPS]; + +#ifdef PER_CONTEXT_SAREA + drmSize private_sarea_size; +#endif + + radeonRegionRec mmio; + radeonRegionRec status; + radeonRegionRec agpTextures; + + drmBufMapPtr buffers; + + __volatile__ CARD32 *scratch; + + __DRIscreenPrivate *driScreen; + unsigned int sarea_priv_offset; +} radeonScreenRec, *radeonScreenPtr; + +extern radeonScreenPtr radeonCreateScreen( __DRIscreenPrivate *sPriv ); +extern void radeonDestroyScreen( __DRIscreenPrivate *sPriv ); + +#endif +#endif /* __RADEON_SCREEN_H__ */ Index: xc/lib/GL/mesa/src/drv/radeon/radeon_span.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_span.c:1.4 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_span.c Tue Apr 10 12:07:53 2001 @@ -0,0 +1,350 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_span.c,v 1.4 2001/04/10 16:07:53 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * Keith Whitwell + * + */ + +#include "radeon_context.h" +#include "radeon_ioctl.h" +#include "radeon_state.h" +#include "radeon_span.h" + +#define DBG 0 + +#define LOCAL_VARS \ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); \ + radeonScreenPtr radeonScreen = rmesa->radeonScreen; \ + __DRIscreenPrivate *sPriv = rmesa->driScreen; \ + __DRIdrawablePrivate *dPriv = rmesa->driDrawable; \ + GLuint pitch = radeonScreen->frontPitch * radeonScreen->cpp; \ + GLuint height = dPriv->h; \ + char *buf = (char *)(sPriv->pFB + \ + rmesa->drawOffset + \ + (dPriv->x * radeonScreen->cpp) + \ + (dPriv->y * pitch)); \ + char *read_buf = (char *)(sPriv->pFB + \ + rmesa->readOffset + \ + (dPriv->x * radeonScreen->cpp) + \ + (dPriv->y * pitch)); \ + GLuint p; \ + (void) read_buf; (void) buf; (void) p + +#define LOCAL_DEPTH_VARS \ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); \ + radeonScreenPtr radeonScreen = rmesa->radeonScreen; \ + __DRIscreenPrivate *sPriv = rmesa->driScreen; \ + __DRIdrawablePrivate *dPriv = rmesa->driDrawable; \ + GLuint height = dPriv->h; \ + GLuint xo = dPriv->x; \ + GLuint yo = dPriv->y; \ + char *buf = (char *)(sPriv->pFB + radeonScreen->depthOffset); \ + (void) buf + +#define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS + +#define INIT_MONO_PIXEL( p ) p = rmesa->Color + +#define CLIPPIXEL( _x, _y ) \ + ((_x >= minx) && (_x < maxx) && (_y >= miny) && (_y < maxy)) + + +#define CLIPSPAN( _x, _y, _n, _x1, _n1, _i ) \ + if ( _y < miny || _y >= maxy ) { \ + _n1 = 0, _x1 = x; \ + } else { \ + _n1 = _n; \ + _x1 = _x; \ + if ( _x1 < minx ) _i += (minx-_x1), n1 -= (minx-_x1), _x1 = minx; \ + if ( _x1 + _n1 >= maxx ) n1 -= (_x1 + n1 - maxx); \ + } + +#define Y_FLIP( _y ) (height - _y - 1) + + +#define HW_LOCK() \ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); \ + FLUSH_BATCH( rmesa ); \ + LOCK_HARDWARE( rmesa ); \ + radeonWaitForIdleLocked( rmesa ); + +#define HW_CLIPLOOP() \ + do { \ + __DRIdrawablePrivate *dPriv = rmesa->driDrawable; \ + int _nc = dPriv->numClipRects; \ + \ + while ( _nc-- ) { \ + int minx = dPriv->pClipRects[_nc].x1 - dPriv->x; \ + int miny = dPriv->pClipRects[_nc].y1 - dPriv->y; \ + int maxx = dPriv->pClipRects[_nc].x2 - dPriv->x; \ + int maxy = dPriv->pClipRects[_nc].y2 - dPriv->y; + +#define HW_ENDCLIPLOOP() \ + } \ + } while (0) + +#define HW_UNLOCK() \ + UNLOCK_HARDWARE( rmesa ) + + + +/* ================================================================ + * Color buffer + */ + +/* 16 bit, RGB565 color spanline and pixel functions + */ +#define WRITE_RGBA( _x, _y, r, g, b, a ) \ + *(GLushort *)(buf + _x*2 + _y*pitch) = ((((int)r & 0xf8) << 8) | \ + (((int)g & 0xfc) << 3) | \ + (((int)b & 0xf8) >> 3)) + +#define WRITE_PIXEL( _x, _y, p ) \ + *(GLushort *)(buf + _x*2 + _y*pitch) = p + +#define READ_RGBA( rgba, _x, _y ) \ + do { \ + GLushort p = *(GLushort *)(read_buf + _x*2 + _y*pitch); \ + rgba[0] = (p >> 8) & 0xf8; \ + rgba[1] = (p >> 3) & 0xfc; \ + rgba[2] = (p << 3) & 0xf8; \ + rgba[3] = 0xff; \ + if ( rgba[0] & 0x08 ) rgba[0] |= 0x07; \ + if ( rgba[1] & 0x04 ) rgba[1] |= 0x03; \ + if ( rgba[2] & 0x08 ) rgba[2] |= 0x07; \ + } while (0) + +#define TAG(x) radeon##x##_RGB565 +#include "spantmp.h" + +/* 32 bit, ARGB8888 color spanline and pixel functions + */ +#define WRITE_RGBA( _x, _y, r, g, b, a ) \ + *(GLuint *)(buf + _x*4 + _y*pitch) = ((b << 0) | \ + (g << 8) | \ + (r << 16) | \ + (a << 24) ) + +#define WRITE_PIXEL( _x, _y, p ) \ + *(GLuint *)(buf + _x*4 + _y*pitch) = p + +#define READ_RGBA( rgba, _x, _y ) \ +do { \ + GLuint p = *(GLuint *)(read_buf + _x*4 + _y*pitch); \ + rgba[0] = (p >> 16) & 0xff; \ + rgba[1] = (p >> 8) & 0xff; \ + rgba[2] = (p >> 0) & 0xff; \ + rgba[3] = (p >> 24) & 0xff; \ +} while (0) + +#define TAG(x) radeon##x##_ARGB8888 +#include "spantmp.h" + + + +/* ================================================================ + * Depth buffer + */ + +/* The Radeon has depth tiling on all the time, so we have to convert + * the x,y coordinates into the memory bus address (mba) in the same + * manner as the engine. In each case, the linear block address (ba) + * is calculated, and then wired with x and y to produce the final + * memory address. + */ +static __inline GLuint radeon_mba_z16( radeonContextPtr rmesa, + GLint x, GLint y ) +{ + radeonScreenPtr radeonScreen = rmesa->radeonScreen; + GLuint pitch = radeonScreen->frontPitch; + GLuint ba, address = 0; /* a[0] = 0 */ + + ba = (y / 16) * (pitch / 32) + (x / 32); + + address |= (x & 0x7) << 1; /* a[1..3] = x[0..2] */ + address |= (y & 0x7) << 4; /* a[4..6] = y[0..2] */ + address |= (x & 0x8) << 4; /* a[7] = x[3] */ + address |= (ba & 0x3) << 8; /* a[8..9] = ba[0..1] */ + address |= (y & 0x8) << 7; /* a[10] = y[3] */ + address |= ((x & 0x10) ^ (y & 0x10)) << 7; /* a[11] = x[4] ^ y[4] */ + address |= (ba & ~0x3) << 10; /* a[12..] = ba[2..] */ + + return address; +} + +static GLuint radeon_mba_z32( radeonContextPtr rmesa, + GLint x, GLint y ) +{ + radeonScreenPtr radeonScreen = rmesa->radeonScreen; + GLuint pitch = radeonScreen->frontPitch; + GLuint ba, address = 0; /* a[0..1] = 0 */ + + ba = (y / 16) * (pitch / 16) + (x / 16); + + address |= (x & 0x7) << 2; /* a[2..4] = x[0..2] */ + address |= (y & 0x3) << 5; /* a[5..6] = y[0..1] */ + address |= + (((x & 0x10) >> 2) ^ (y & 0x4)) << 5; /* a[7] = x[4] ^ y[2] */ + address |= (ba & 0x3) << 8; /* a[8..9] = ba[0..1] */ + + address |= (y & 0x8) << 7; /* a[10] = y[3] */ + address |= + (((x & 0x8) << 1) ^ (y & 0x10)) << 7; /* a[11] = x[3] ^ y[4] */ + address |= (ba & ~0x3) << 10; /* a[12..] = ba[2..] */ + + return address; +} + + +/* 16-bit depth buffer functions + */ +#define WRITE_DEPTH( _x, _y, d ) \ + *(GLushort *)(buf + radeon_mba_z16( rmesa, _x + xo, _y + yo )) = d; + +#define READ_DEPTH( d, _x, _y ) \ + d = *(GLushort *)(buf + radeon_mba_z16( rmesa, _x + xo, _y + yo )); + +#define TAG(x) radeon##x##_16 +#include "depthtmp.h" + +/* 24 bit depth, 8 bit stencil depthbuffer functions + */ +#define WRITE_DEPTH( _x, _y, d ) \ +do { \ + GLuint offset = radeon_mba_z32( rmesa, _x + xo, _y + yo ); \ + GLuint tmp = *(GLuint *)(buf + offset); \ + tmp &= 0xff000000; \ + tmp |= ((d) & 0x00ffffff); \ + *(GLuint *)(buf + offset) = tmp; \ +} while (0) + +#define READ_DEPTH( d, _x, _y ) \ + d = *(GLuint *)(buf + radeon_mba_z32( rmesa, _x + xo, \ + _y + yo )) & 0x00ffffff; + +#define TAG(x) radeon##x##_24_8 +#include "depthtmp.h" + + +/* ================================================================ + * Stencil buffer + */ + +#if 0 +/* 24 bit depth, 8 bit stencil depthbuffer functions + */ +#define WRITE_STENCIL( _x, _y, d ) \ +do { \ + GLuint offset = radeon_mba_z32( rmesa, _x + xo, _y + yo ); \ + GLuint tmp = *(GLuint *)(buf + offset); \ + tmp &= 0x00ffffff; \ + tmp |= (((d) & 0xff) << 24); \ + *(GLuint *)(buf + offset) = tmp; \ +} while (0) + +#define READ_STENCIL( d, _x, _y ) \ +do { \ + GLuint offset = radeon_mba_z32( rmesa, _x + xo, _y + yo ); \ + GLuint tmp = *(GLuint *)(buf + offset); \ + tmp &= 0xff000000; \ + d = tmp >> 24; \ +} while (0) + +#define TAG(x) radeon##x##_24_8 +#include "stenciltmp.h" +#endif + + +void radeonDDInitSpanFuncs( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + switch ( rmesa->radeonScreen->cpp ) { + case 2: + ctx->Driver.WriteRGBASpan = radeonWriteRGBASpan_RGB565; + ctx->Driver.WriteRGBSpan = radeonWriteRGBSpan_RGB565; + ctx->Driver.WriteMonoRGBASpan = radeonWriteMonoRGBASpan_RGB565; + ctx->Driver.WriteRGBAPixels = radeonWriteRGBAPixels_RGB565; + ctx->Driver.WriteMonoRGBAPixels = radeonWriteMonoRGBAPixels_RGB565; + ctx->Driver.ReadRGBASpan = radeonReadRGBASpan_RGB565; + ctx->Driver.ReadRGBAPixels = radeonReadRGBAPixels_RGB565; + break; + + case 4: + ctx->Driver.WriteRGBASpan = radeonWriteRGBASpan_ARGB8888; + ctx->Driver.WriteRGBSpan = radeonWriteRGBSpan_ARGB8888; + ctx->Driver.WriteMonoRGBASpan = radeonWriteMonoRGBASpan_ARGB8888; + ctx->Driver.WriteRGBAPixels = radeonWriteRGBAPixels_ARGB8888; + ctx->Driver.WriteMonoRGBAPixels = radeonWriteMonoRGBAPixels_ARGB8888; + ctx->Driver.ReadRGBASpan = radeonReadRGBASpan_ARGB8888; + ctx->Driver.ReadRGBAPixels = radeonReadRGBAPixels_ARGB8888; + break; + + default: + break; + } + + switch ( rmesa->glCtx->Visual->DepthBits ) { + case 16: + ctx->Driver.ReadDepthSpan = radeonReadDepthSpan_16; + ctx->Driver.WriteDepthSpan = radeonWriteDepthSpan_16; + ctx->Driver.ReadDepthPixels = radeonReadDepthPixels_16; + ctx->Driver.WriteDepthPixels = radeonWriteDepthPixels_16; + break; + + case 24: + ctx->Driver.ReadDepthSpan = radeonReadDepthSpan_24_8; + ctx->Driver.WriteDepthSpan = radeonWriteDepthSpan_24_8; + ctx->Driver.ReadDepthPixels = radeonReadDepthPixels_24_8; + ctx->Driver.WriteDepthPixels = radeonWriteDepthPixels_24_8; + +#if 0 /* only need these for hardware stencil buffers */ + ctx->Driver.ReadStencilSpan = radeonReadStencilSpan_24_8; + ctx->Driver.WriteStencilSpan = radeonWriteStencilSpan_24_8; + ctx->Driver.ReadStencilPixels = radeonReadStencilPixels_24_8; + ctx->Driver.WriteStencilPixels = radeonWriteStencilPixels_24_8; +#endif + break; + + default: + break; + } + + ctx->Driver.WriteCI8Span = NULL; + ctx->Driver.WriteCI32Span = NULL; + ctx->Driver.WriteMonoCISpan = NULL; + ctx->Driver.WriteCI32Pixels = NULL; + ctx->Driver.WriteMonoCIPixels = NULL; + ctx->Driver.ReadCI32Span = NULL; + ctx->Driver.ReadCI32Pixels = NULL; +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_span.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_span.h:1.1 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_span.h Sun Jan 7 20:07:28 2001 @@ -0,0 +1,45 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_span.h,v 1.1 2001/01/08 01:07:28 martin Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#ifndef __RADEON_SPAN_H__ +#define __RADEON_SPAN_H__ + +#ifdef GLX_DIRECT_RENDERING + +extern void radeonDDInitSpanFuncs( GLcontext *ctx ); + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/radeon/radeon_state.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_state.c:1.2 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_state.c Wed Mar 21 11:14:25 2001 @@ -0,0 +1,1376 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_state.c,v 1.2 2001/03/21 16:14:25 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * Keith Whitwell + * + */ + +#include "radeon_context.h" +#include "radeon_state.h" +#include "radeon_ioctl.h" +#include "radeon_tris.h" +#include "radeon_vb.h" +#include "radeon_tex.h" + +#include "mmath.h" +#include "pb.h" +#include "enums.h" + + +/* ============================================================= + * Alpha blending + */ + +static void radeonUpdateAlphaMode( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint a = rmesa->setup.pp_misc; + GLuint p = rmesa->setup.pp_cntl; + GLuint b = rmesa->setup.rb3d_blendcntl; + GLuint c = rmesa->setup.rb3d_cntl; + + if ( ctx->Color.AlphaEnabled ) { + GLubyte ref = ctx->Color.AlphaRef; + + a &= ~(RADEON_ALPHA_TEST_OP_MASK | RADEON_REF_ALPHA_MASK); + + switch ( ctx->Color.AlphaFunc ) { + case GL_NEVER: + a |= RADEON_ALPHA_TEST_FAIL; + break; + case GL_LESS: + a |= RADEON_ALPHA_TEST_LESS; + break; + case GL_LEQUAL: + a |= RADEON_ALPHA_TEST_LEQUAL; + break; + case GL_EQUAL: + a |= RADEON_ALPHA_TEST_EQUAL; + break; + case GL_GEQUAL: + a |= RADEON_ALPHA_TEST_GEQUAL; + break; + case GL_GREATER: + a |= RADEON_ALPHA_TEST_GREATER; + break; + case GL_NOTEQUAL: + a |= RADEON_ALPHA_TEST_NEQUAL; + break; + case GL_ALWAYS: + a |= RADEON_ALPHA_TEST_PASS; + break; + } + + a |= (ref & RADEON_REF_ALPHA_MASK); + p |= RADEON_ALPHA_TEST_ENABLE; + } else { + p &= ~RADEON_ALPHA_TEST_ENABLE; + } + + if ( ctx->Color.BlendEnabled ) { + b &= ~(RADEON_SRC_BLEND_MASK | RADEON_DST_BLEND_MASK); + + switch ( ctx->Color.BlendSrcRGB ) { + case GL_ZERO: + b |= RADEON_SRC_BLEND_GL_ZERO; + break; + case GL_ONE: + b |= RADEON_SRC_BLEND_GL_ONE; + break; + case GL_DST_COLOR: + b |= RADEON_SRC_BLEND_GL_DST_COLOR; + break; + case GL_ONE_MINUS_DST_COLOR: + b |= RADEON_SRC_BLEND_GL_ONE_MINUS_DST_COLOR; + break; + case GL_SRC_ALPHA: + b |= RADEON_SRC_BLEND_GL_SRC_ALPHA; + break; + case GL_ONE_MINUS_SRC_ALPHA: + b |= RADEON_SRC_BLEND_GL_ONE_MINUS_SRC_ALPHA; + break; + case GL_DST_ALPHA: + b |= RADEON_SRC_BLEND_GL_DST_ALPHA; + break; + case GL_ONE_MINUS_DST_ALPHA: + b |= RADEON_SRC_BLEND_GL_ONE_MINUS_DST_ALPHA; + break; + case GL_SRC_ALPHA_SATURATE: + b |= RADEON_SRC_BLEND_GL_SRC_ALPHA_SATURATE; + break; + } + + switch ( ctx->Color.BlendDstRGB ) { + case GL_ZERO: + b |= RADEON_DST_BLEND_GL_ZERO; + break; + case GL_ONE: + b |= RADEON_DST_BLEND_GL_ONE; + break; + case GL_SRC_COLOR: + b |= RADEON_DST_BLEND_GL_SRC_COLOR; + break; + case GL_ONE_MINUS_SRC_COLOR: + b |= RADEON_DST_BLEND_GL_ONE_MINUS_SRC_COLOR; + break; + case GL_SRC_ALPHA: + b |= RADEON_DST_BLEND_GL_SRC_ALPHA; + break; + case GL_ONE_MINUS_SRC_ALPHA: + b |= RADEON_DST_BLEND_GL_ONE_MINUS_SRC_ALPHA; + break; + case GL_DST_ALPHA: + b |= RADEON_DST_BLEND_GL_DST_ALPHA; + break; + case GL_ONE_MINUS_DST_ALPHA: + b |= RADEON_DST_BLEND_GL_ONE_MINUS_DST_ALPHA; + break; + } + + c |= RADEON_ALPHA_BLEND_ENABLE; + } else { + c &= ~RADEON_ALPHA_BLEND_ENABLE; + } + + if ( rmesa->setup.pp_misc != a ) { + rmesa->setup.pp_misc = a; + rmesa->dirty |= RADEON_UPLOAD_CONTEXT | RADEON_UPLOAD_MASKS; + } + if ( rmesa->setup.pp_cntl != p ) { + rmesa->setup.pp_cntl = p; + rmesa->dirty |= RADEON_UPLOAD_CONTEXT | RADEON_UPLOAD_MASKS; + } + if ( rmesa->setup.rb3d_blendcntl != b ) { + rmesa->setup.rb3d_blendcntl = b; + rmesa->dirty |= RADEON_UPLOAD_CONTEXT | RADEON_UPLOAD_MASKS; + } + if ( rmesa->setup.rb3d_cntl != c ) { + rmesa->setup.rb3d_cntl = c; + rmesa->dirty |= RADEON_UPLOAD_CONTEXT | RADEON_UPLOAD_MASKS; + } +} + +static void radeonDDAlphaFunc( GLcontext *ctx, GLenum func, GLclampf ref ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_ALPHA; +} + +static void radeonDDBlendEquation( GLcontext *ctx, GLenum mode ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_ALPHA; + + if (ctx->Color.ColorLogicOpEnabled && ctx->Color.LogicOp != GL_COPY) + rmesa->Fallback |= RADEON_FALLBACK_LOGICOP; + else + rmesa->Fallback &= ~RADEON_FALLBACK_LOGICOP; +} + +static void radeonDDBlendFunc( GLcontext *ctx, GLenum sfactor, GLenum dfactor ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_ALPHA; +} + +static void radeonDDBlendFuncSeparate( GLcontext *ctx, + GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorA, GLenum dfactorA ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_ALPHA; +} + + +/* ============================================================= + * Depth testing + */ + +static void radeonUpdateZMode( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint z = rmesa->setup.rb3d_zstencilcntl; + GLuint c = rmesa->setup.rb3d_cntl; + + if ( ctx->Depth.Test ) { + z &= ~RADEON_Z_TEST_MASK; + + switch ( ctx->Depth.Func ) { + case GL_NEVER: + z |= RADEON_Z_TEST_NEVER; + break; + case GL_ALWAYS: + z |= RADEON_Z_TEST_ALWAYS; + break; + case GL_LESS: + z |= RADEON_Z_TEST_LESS; + break; + case GL_LEQUAL: + z |= RADEON_Z_TEST_LEQUAL; + break; + case GL_EQUAL: + z |= RADEON_Z_TEST_EQUAL; + break; + case GL_GEQUAL: + z |= RADEON_Z_TEST_GEQUAL; + break; + case GL_GREATER: + z |= RADEON_Z_TEST_GREATER; + break; + case GL_NOTEQUAL: + z |= RADEON_Z_TEST_NEQUAL; + break; + } + + c |= RADEON_Z_ENABLE; + } else { + c &= ~RADEON_Z_ENABLE; + } + + if ( ctx->Depth.Mask ) { + z |= RADEON_Z_WRITE_ENABLE; + } else { + z &= ~RADEON_Z_WRITE_ENABLE; + } + + if ( rmesa->setup.rb3d_zstencilcntl != z ) { + rmesa->setup.rb3d_zstencilcntl = z; + rmesa->dirty |= RADEON_UPLOAD_CONTEXT; + } + if ( rmesa->setup.rb3d_cntl != c ) { + rmesa->setup.rb3d_cntl = c; + rmesa->dirty |= RADEON_UPLOAD_CONTEXT; + } +} + +static void radeonDDDepthFunc( GLcontext *ctx, GLenum func ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_DEPTH; +} + +static void radeonDDDepthMask( GLcontext *ctx, GLboolean flag ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_DEPTH; +} + +static void radeonDDClearDepth( GLcontext *ctx, GLclampd d ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + switch ( rmesa->setup.rb3d_zstencilcntl & RADEON_DEPTH_FORMAT_MASK ) { + case RADEON_DEPTH_FORMAT_16BIT_INT_Z: + rmesa->ClearDepth = d * 0x0000ffff; + break; + case RADEON_DEPTH_FORMAT_24BIT_INT_Z: + rmesa->ClearDepth = d * 0x00ffffff; + break; + } +} + + +/* ============================================================= + * Fog + */ + +static void radeonUpdateFogAttrib( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint p = rmesa->setup.pp_cntl; + GLubyte c[4]; + GLuint col; + + if ( ctx->FogMode == FOG_FRAGMENT ) { + p |= RADEON_FOG_ENABLE; + } else { + p &= ~RADEON_FOG_ENABLE; + } + + FLOAT_RGB_TO_UBYTE_RGB( c, ctx->Fog.Color ); + col = radeonPackColor( 4, c[0], c[1], c[2], 0 ); + + if ( rmesa->setup.pp_fog_color != col ) { + rmesa->setup.pp_fog_color = col; + rmesa->dirty |= RADEON_UPLOAD_CONTEXT; + } + if ( rmesa->setup.pp_cntl != p ) { + rmesa->setup.pp_cntl = p; + rmesa->dirty |= RADEON_UPLOAD_CONTEXT; + } +} + +static void radeonDDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_FOG; +} + + +/* ============================================================= + * Clipping + */ + +static void radeonUpdateClipping( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if ( rmesa->driDrawable ) { + __DRIdrawablePrivate *drawable = rmesa->driDrawable; + int x = 0; + int y = 0; + int w = drawable->w - 1; + int h = drawable->h - 1; + + if ( ctx->Scissor.Enabled ) { + if ( ctx->Scissor.X > x ) { + x = ctx->Scissor.X; + } + if ( drawable->h - ctx->Scissor.Y - ctx->Scissor.Height > y ) { + y = drawable->h - ctx->Scissor.Y - ctx->Scissor.Height; + } + if ( ctx->Scissor.X + ctx->Scissor.Width - 1 < w ) { + w = ctx->Scissor.X + ctx->Scissor.Width - 1; + } + if ( drawable->h - ctx->Scissor.Y - 1 < h ) { + h = drawable->h - ctx->Scissor.Y - 1; + } + } + + rmesa->scissor_rect.x1 = x + rmesa->driDrawable->x; + rmesa->scissor_rect.y1 = y + rmesa->driDrawable->y; + rmesa->scissor_rect.x2 = w + rmesa->driDrawable->x + 1; + rmesa->scissor_rect.y2 = h + rmesa->driDrawable->y + 1; + + rmesa->dirty |= RADEON_UPLOAD_CLIPRECTS; + } +} + +static void radeonDDScissor( GLcontext *ctx, + GLint x, GLint y, GLsizei w, GLsizei h ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_CLIP; +} + + +/* ============================================================= + * Culling + */ + +static void radeonUpdateCull( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint s = rmesa->setup.se_cntl; + + s &= ~RADEON_FFACE_CULL_DIR_MASK; + + switch ( ctx->Polygon.FrontFace ) { + case GL_CW: + s |= RADEON_FFACE_CULL_CW; + break; + case GL_CCW: + s |= RADEON_FFACE_CULL_CCW; + break; + } + + s |= RADEON_FFACE_SOLID | RADEON_BFACE_SOLID; + + if ( ctx->Polygon.CullFlag && ctx->PB->primitive == GL_POLYGON ) { + switch ( ctx->Polygon.CullFaceMode ) { + case GL_FRONT: + s &= ~RADEON_FFACE_SOLID; + break; + case GL_BACK: + s &= ~RADEON_BFACE_SOLID; + break; + case GL_FRONT_AND_BACK: + s &= ~(RADEON_FFACE_SOLID | RADEON_BFACE_SOLID); + break; + } + } + + if ( rmesa->setup.se_cntl != s ) { + rmesa->setup.se_cntl = s; + rmesa->dirty |= RADEON_UPLOAD_CONTEXT | RADEON_UPLOAD_SETUP; + } +} + +static void radeonDDCullFace( GLcontext *ctx, GLenum mode ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_CULL; +} + +static void radeonDDFrontFace( GLcontext *ctx, GLenum mode ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_CULL; +} + + +/* ============================================================= + * Masks + */ + +static void radeonUpdateMasks( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + GLuint mask = radeonPackColor( rmesa->radeonScreen->cpp, + ctx->Color.ColorMask[RCOMP], + ctx->Color.ColorMask[GCOMP], + ctx->Color.ColorMask[BCOMP], + ctx->Color.ColorMask[ACOMP] ); + + if ( rmesa->setup.rb3d_planemask != mask ) { + rmesa->setup.rb3d_planemask = mask; + rmesa->dirty |= RADEON_UPLOAD_CONTEXT | RADEON_UPLOAD_MASKS; + } +} + +static GLboolean radeonDDColorMask( GLcontext *ctx, + GLboolean r, GLboolean g, + GLboolean b, GLboolean a ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_MASKS; + + return GL_FALSE; /* This forces the software paths to do colormasking. */ + /* This function will return void when we use Mesa 3.5 */ +} + + +/* ============================================================= + * Rendering attributes + * + * We really don't want to recalculate all this every time we bind a + * texture. These things shouldn't change all that often, so it makes + * sense to break them out of the core texture state update routines. + */ + +static void radeonDDLightModelfv( GLcontext *ctx, GLenum pname, + const GLfloat *param ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if ( pname == GL_LIGHT_MODEL_COLOR_CONTROL ) { + GLuint p = rmesa->setup.pp_cntl; + + FLUSH_BATCH( rmesa ); + + if ( ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR && + ctx->Light.Enabled && ctx->Texture.ReallyEnabled) { + p |= RADEON_SPECULAR_ENABLE; + } else { + p &= ~RADEON_SPECULAR_ENABLE; + } + + if ( rmesa->setup.pp_cntl != p ) { + rmesa->setup.pp_cntl = p; + rmesa->dirty |= RADEON_UPLOAD_CONTEXT; + } + } +} + +static void radeonDDShadeModel( GLcontext *ctx, GLenum mode ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint s = rmesa->setup.se_cntl; + + s &= ~(RADEON_DIFFUSE_SHADE_MASK | + RADEON_ALPHA_SHADE_MASK | + RADEON_SPECULAR_SHADE_MASK | + RADEON_FOG_SHADE_MASK); + + switch ( mode ) { + case GL_FLAT: + s |= (RADEON_DIFFUSE_SHADE_FLAT | + RADEON_ALPHA_SHADE_FLAT | + RADEON_SPECULAR_SHADE_FLAT | + RADEON_FOG_SHADE_FLAT); + break; + case GL_SMOOTH: + s |= (RADEON_DIFFUSE_SHADE_GOURAUD | + RADEON_ALPHA_SHADE_GOURAUD | + RADEON_SPECULAR_SHADE_GOURAUD | + RADEON_FOG_SHADE_GOURAUD); + break; + default: + return; + } + + if ( rmesa->setup.se_cntl != s ) { + FLUSH_BATCH( rmesa ); + rmesa->setup.se_cntl = s; + + rmesa->new_state |= RADEON_NEW_CONTEXT; + rmesa->dirty |= RADEON_UPLOAD_SETUP; + } +} + + +/* ============================================================= + * Window position + */ + +void radeonUpdateWindow( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + __DRIdrawablePrivate *dPriv = rmesa->driDrawable; + GLfloat xoffset = (GLfloat)dPriv->x; + GLfloat yoffset = (GLfloat)dPriv->y + dPriv->h; + const GLfloat one = 1.0; + GLuint m = rmesa->setup.re_misc; + GLuint sx, sy; + + rmesa->setup.se_vport_xscale = *(GLuint *)&one; + rmesa->setup.se_vport_xoffset = *(GLuint *)&xoffset; + rmesa->setup.se_vport_yscale = *(GLuint *)&one; + rmesa->setup.se_vport_yoffset = *(GLuint *)&yoffset; + rmesa->setup.se_vport_zscale = *(GLuint *)&rmesa->depth_scale; + rmesa->setup.se_vport_zoffset = 0x00000000; + + /* Update polygon stipple offsets */ + m &= ~(RADEON_STIPPLE_X_OFFSET_MASK | + RADEON_STIPPLE_Y_OFFSET_MASK); + + /* add magic offsets, then invert */ + sx = 31 - ((rmesa->driDrawable->x - 1) & RADEON_STIPPLE_COORD_MASK); + sy = 31 - ((rmesa->driDrawable->y + rmesa->driDrawable->h - 1) + & RADEON_STIPPLE_COORD_MASK); + + m |= ((sx << RADEON_STIPPLE_X_OFFSET_SHIFT) | + (sy << RADEON_STIPPLE_Y_OFFSET_SHIFT)); + + if ( rmesa->setup.re_misc != m ) { + rmesa->setup.re_misc = m; + rmesa->dirty |= RADEON_UPLOAD_MISC; + } + + rmesa->dirty |= RADEON_UPLOAD_VIEWPORT; +} + + +/* ============================================================= + * Miscellaneous + */ + +static void radeonDDClearColor( GLcontext *ctx, + GLubyte r, GLubyte g, GLubyte b, GLubyte a ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + rmesa->ClearColor = radeonPackColor( rmesa->radeonScreen->cpp, + r, g, b, a ); +} + +static void radeonDDColor( GLcontext *ctx, + GLubyte r, GLubyte g, GLubyte b, GLubyte a ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + rmesa->Color = radeonPackColor( rmesa->radeonScreen->cpp, + r, g, b, a ); +} + +static void radeonDDLogicOpCode( GLcontext *ctx, GLenum opcode ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if ( ctx->Color.ColorLogicOpEnabled ) { + FLUSH_BATCH( rmesa ); + + /* FIXME: We can do color logic ops. + */ + if ( opcode == GL_COPY ) { + rmesa->Fallback &= ~RADEON_FALLBACK_LOGICOP; + } else { + rmesa->Fallback |= RADEON_FALLBACK_LOGICOP; + } + } + else + rmesa->Fallback &= ~RADEON_FALLBACK_LOGICOP; +} + +static GLboolean radeonDDSetDrawBuffer( GLcontext *ctx, GLenum mode ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + int found = GL_TRUE; + + FLUSH_BATCH( rmesa ); + + if ( rmesa->DrawBuffer != mode ) { + rmesa->DrawBuffer = mode; + rmesa->Fallback &= ~RADEON_FALLBACK_DRAW_BUFFER; + + switch ( mode ) { + case GL_FRONT_LEFT: + rmesa->drawOffset = rmesa->radeonScreen->frontOffset; + rmesa->drawPitch = rmesa->radeonScreen->frontPitch; + break; + case GL_BACK_LEFT: + rmesa->drawOffset = rmesa->radeonScreen->backOffset; + rmesa->drawPitch = rmesa->radeonScreen->backPitch; + break; + default: + rmesa->Fallback |= RADEON_FALLBACK_DRAW_BUFFER; + found = GL_FALSE; + break; + } + + rmesa->setup.rb3d_coloroffset = + (rmesa->drawOffset & RADEON_COLOROFFSET_MASK); + rmesa->setup.rb3d_colorpitch = rmesa->drawPitch; + + rmesa->new_state |= RADEON_NEW_WINDOW; + } + + return found; +} + +static void radeonDDSetReadBuffer( GLcontext *ctx, + GLframebuffer *colorBuffer, + GLenum mode ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + rmesa->Fallback &= ~RADEON_FALLBACK_READ_BUFFER; + + switch ( mode ) { + case GL_FRONT_LEFT: + rmesa->readOffset = rmesa->radeonScreen->frontOffset; + rmesa->readPitch = rmesa->radeonScreen->frontPitch; + break; + case GL_BACK_LEFT: + rmesa->readOffset = rmesa->radeonScreen->backOffset; + rmesa->readPitch = rmesa->radeonScreen->backPitch; + break; + default: + rmesa->Fallback |= RADEON_FALLBACK_READ_BUFFER; + break; + } +} + + +/* ============================================================= + * Polygon stipple + */ + +static void radeonDDPolygonStipple( GLcontext *ctx, const GLubyte *mask ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint i, stipple[32]; + + /* must flip pattern upside down */ + for (i = 0; i < 32; i++) { + stipple[31 - i] = ((GLuint *) mask)[i]; + } + + FLUSH_BATCH( rmesa ); + + if ( ctx->Polygon.StippleFlag && ctx->PB->primitive == GL_POLYGON ) { + rmesa->setup.pp_cntl |= RADEON_STIPPLE_ENABLE; + } else { + rmesa->setup.pp_cntl &= ~RADEON_STIPPLE_ENABLE; + } + + LOCK_HARDWARE( rmesa ); + + /* FIXME: Use window x,y offsets into stipple RAM. + */ + drmRadeonPolygonStipple( rmesa->driFd, stipple ); + + UNLOCK_HARDWARE( rmesa ); + + rmesa->new_state |= RADEON_NEW_CONTEXT; + rmesa->dirty |= RADEON_UPLOAD_CONTEXT; +} + + +/* ============================================================= + * State enable/disable + */ + +static void radeonDDEnable( GLcontext *ctx, GLenum cap, GLboolean state ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + switch ( cap ) { + case GL_ALPHA_TEST: + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_ALPHA; + break; + + case GL_BLEND: + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_ALPHA; + + if (ctx->Color.ColorLogicOpEnabled && ctx->Color.LogicOp != GL_COPY) + rmesa->Fallback |= RADEON_FALLBACK_LOGICOP; + else + rmesa->Fallback &= ~RADEON_FALLBACK_LOGICOP; + break; + + case GL_CULL_FACE: + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_CULL; + break; + + case GL_DEPTH_TEST: + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_DEPTH; + break; + + case GL_DITHER: + do { + GLuint r = rmesa->setup.rb3d_cntl; + FLUSH_BATCH( rmesa ); + + if ( ctx->Color.DitherFlag ) { + r |= RADEON_DITHER_ENABLE; + } else { + r &= ~RADEON_DITHER_ENABLE; + } + + if ( rmesa->setup.rb3d_cntl != r ) { + rmesa->setup.rb3d_cntl = r; + rmesa->dirty |= RADEON_UPLOAD_CONTEXT; + } + } while (0); + break; + + case GL_FOG: + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_FOG; + break; + + case GL_COLOR_LOGIC_OP: + FLUSH_BATCH( rmesa ); + if ( state && ctx->Color.LogicOp != GL_COPY ) { + rmesa->Fallback |= RADEON_FALLBACK_LOGICOP; + } else { + rmesa->Fallback &= ~RADEON_FALLBACK_LOGICOP; + } + break; + + case GL_LIGHTING: + { + GLuint p = rmesa->setup.pp_cntl; + if ( ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR && + ctx->Light.Enabled && ctx->Texture.ReallyEnabled) { + p |= RADEON_SPECULAR_ENABLE; + } else { + p &= ~RADEON_SPECULAR_ENABLE; + } + if ( rmesa->setup.pp_cntl != p ) { + rmesa->setup.pp_cntl = p; + rmesa->dirty |= RADEON_UPLOAD_CONTEXT; + } + break; + } + + case GL_SCISSOR_TEST: + FLUSH_BATCH( rmesa ); + rmesa->scissor = state; + rmesa->new_state |= RADEON_NEW_CLIP; + break; + + case GL_TEXTURE_1D: + case GL_TEXTURE_2D: + case GL_TEXTURE_3D: + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_TEXTURE; + break; + + case GL_POLYGON_STIPPLE: + if ( ctx->PB->primitive == GL_POLYGON ) { + FLUSH_BATCH( rmesa ); + if ( state ) { + rmesa->setup.pp_cntl |= RADEON_STIPPLE_ENABLE; + } else { + rmesa->setup.pp_cntl &= ~RADEON_STIPPLE_ENABLE; + } + rmesa->new_state |= RADEON_NEW_CONTEXT; + rmesa->dirty |= RADEON_UPLOAD_CONTEXT; + } + break; + + default: + return; + } +} + + +/* ============================================================= + * State initialization, management + */ + +static void radeonDDPrintDirty( const char *msg, GLuint state ) +{ + fprintf( stderr, + "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", + msg, + state, + (state & RADEON_UPLOAD_CONTEXT) ? "context, " : "", + (state & RADEON_UPLOAD_VERTFMT) ? "vertfmt, " : "", + (state & RADEON_UPLOAD_LINE) ? "line, " : "", + (state & RADEON_UPLOAD_BUMPMAP) ? "bumpmap, " : "", + (state & RADEON_UPLOAD_MASKS) ? "masks, " : "", + (state & RADEON_UPLOAD_VIEWPORT) ? "viewport, " : "", + (state & RADEON_UPLOAD_SETUP) ? "setup, " : "", + (state & RADEON_UPLOAD_TCL) ? "tcl, " : "", + (state & RADEON_UPLOAD_MISC) ? "misc, " : "", + (state & RADEON_UPLOAD_TEX0) ? "tex0, " : "", + (state & RADEON_UPLOAD_TEX1) ? "tex1, " : "", + (state & RADEON_UPLOAD_TEX2) ? "tex2, " : "", + (state & RADEON_UPLOAD_TEX0IMAGES) ? "tex0 images, " : "", + (state & RADEON_UPLOAD_TEX1IMAGES) ? "tex1 images, " : "", + (state & RADEON_UPLOAD_TEX2IMAGES) ? "tex2 images, " : "", + (state & RADEON_UPLOAD_CLIPRECTS) ? "cliprects, " : "", + (state & RADEON_REQUIRE_QUIESCENCE) ? "quiescence, " : "" ); +} + +/* + * Load the current context's state into the hardware. + * + * NOTE: Be VERY careful about ensuring the context state is marked for + * upload, the only place it shouldn't be uploaded is when the setup + * state has changed in ReducedPrimitiveChange as this comes right after + * a state update. + * + * Blits of any type should always upload the context and masks after + * they are done. + */ +void radeonEmitHwStateLocked( radeonContextPtr rmesa ) +{ + RADEONSAREAPrivPtr sarea = rmesa->sarea; + radeon_context_regs_t *regs = &(rmesa->setup); + radeonTexObjPtr t0 = rmesa->CurrentTexObj[0]; + radeonTexObjPtr t1 = rmesa->CurrentTexObj[1]; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_MSG ) { + radeonDDPrintDirty( "radeonEmitHwStateLocked", rmesa->dirty ); + } + + if ( (rmesa->dirty & RADEON_UPLOAD_TEX0IMAGES) && t0 ) { + radeonUploadTexImages( rmesa, t0 ); + rmesa->dirty &= ~RADEON_UPLOAD_TEX0IMAGES; + } + if ( (rmesa->dirty & RADEON_UPLOAD_TEX1IMAGES) && t1 ) { + radeonUploadTexImages( rmesa, t1 ); + rmesa->dirty &= ~RADEON_UPLOAD_TEX1IMAGES; + } + if ( rmesa->dirty & RADEON_UPLOAD_TEX2IMAGES ) { + /* FIXME: Enable the third texture unit... */ + rmesa->dirty &= ~RADEON_UPLOAD_TEX2IMAGES; + } + + if ( rmesa->dirty & (RADEON_UPLOAD_CONTEXT | + RADEON_UPLOAD_VERTFMT | + RADEON_UPLOAD_LINE | + RADEON_UPLOAD_BUMPMAP | + RADEON_UPLOAD_MASKS | + RADEON_UPLOAD_VIEWPORT | + RADEON_UPLOAD_SETUP | + RADEON_UPLOAD_TCL | + RADEON_UPLOAD_MISC) ) { + memcpy( &sarea->ContextState, regs, sizeof(sarea->ContextState) ); + } + + /* Assemble the texture state, combining the texture object and + * texture environment state into the hardware texture unit state. + */ + if ( (rmesa->dirty & RADEON_UPLOAD_TEX0) && t0 ) { + radeon_texture_regs_t *tex = &sarea->TexState[0]; + + tex->pp_txfilter = t0->pp_txfilter | rmesa->lod_bias[0] << 8; + tex->pp_txformat = t0->pp_txformat | RADEON_TXFORMAT_ST_ROUTE_STQ0; + tex->pp_txoffset = t0->pp_txoffset; + + tex->pp_txcblend = rmesa->color_combine[0]; + tex->pp_txablend = rmesa->alpha_combine[0]; + tex->pp_tfactor = rmesa->env_color[0]; + + tex->pp_border_color = t0->pp_border_color; + } + + if ( (rmesa->dirty & RADEON_UPLOAD_TEX1) && t1 ) { + radeon_texture_regs_t *tex = &sarea->TexState[1]; + + tex->pp_txfilter = t1->pp_txfilter | rmesa->lod_bias[1] << 8; + tex->pp_txformat = t1->pp_txformat | RADEON_TXFORMAT_ST_ROUTE_STQ1; + tex->pp_txoffset = t1->pp_txoffset; + + tex->pp_txcblend = rmesa->color_combine[1]; + tex->pp_txablend = rmesa->alpha_combine[1]; + tex->pp_tfactor = rmesa->env_color[1]; + + tex->pp_border_color = t1->pp_border_color; + } + + if ( rmesa->dirty & RADEON_UPLOAD_TEX2 ) { + /* FIXME: Enable the third texture unit... */ + memset( &sarea->TexState[2], 0, sizeof(sarea->TexState[2]) ); + } + + sarea->vertsize = rmesa->vertsize; + sarea->vc_format = rmesa->vc_format; + + sarea->dirty |= rmesa->dirty; + rmesa->dirty &= RADEON_UPLOAD_CLIPRECTS; +} + +static void radeonDDPrintState( const char *msg, GLuint flags ) +{ + fprintf( stderr, + "%s: (0x%x) %s%s%s%s%s%s%s%s%s\n", + msg, + flags, + (flags & RADEON_NEW_CONTEXT) ? "context, " : "", + (flags & RADEON_NEW_ALPHA) ? "alpha, " : "", + (flags & RADEON_NEW_DEPTH) ? "depth, " : "", + (flags & RADEON_NEW_FOG) ? "fog, " : "", + (flags & RADEON_NEW_CLIP) ? "clip, " : "", + (flags & RADEON_NEW_TEXTURE) ? "texture, " : "", + (flags & RADEON_NEW_CULL) ? "cull, " : "", + (flags & RADEON_NEW_MASKS) ? "masks, " : "", + (flags & RADEON_NEW_WINDOW) ? "window, " : "" ); +} + +void radeonDDUpdateHWState( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + int new_state = rmesa->new_state; + + if ( new_state ) { + FLUSH_BATCH( rmesa ); + + rmesa->new_state = 0; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_MSG ) + radeonDDPrintState( "radeonUpdateHwState", new_state ); + + /* Update the various parts of the context's state. + */ + if ( new_state & RADEON_NEW_ALPHA ) + radeonUpdateAlphaMode( ctx ); + + if ( new_state & RADEON_NEW_DEPTH ) + radeonUpdateZMode( ctx ); + + if ( new_state & RADEON_NEW_FOG ) + radeonUpdateFogAttrib( ctx ); + + if ( new_state & RADEON_NEW_CLIP ) + radeonUpdateClipping( ctx ); + + if ( new_state & RADEON_NEW_CULL ) + radeonUpdateCull( ctx ); + + if ( new_state & RADEON_NEW_MASKS ) + radeonUpdateMasks( ctx ); + + if ( new_state & RADEON_NEW_WINDOW ) + radeonUpdateWindow( ctx ); + + if ( new_state & RADEON_NEW_TEXTURE ) + radeonUpdateTextureState( ctx ); + } +} + +/* This is called when Mesa switches between rendering triangle + * primitives (such as GL_POLYGON, GL_QUADS, GL_TRIANGLE_STRIP, etc), + * and lines, points and bitmaps. + * + * As the radeon uses triangles to render lines and points, it is + * necessary to turn off hardware culling when rendering these + * primitives. + */ +static void radeonDDReducedPrimitiveChange( GLcontext *ctx, GLenum prim ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint s = rmesa->setup.se_cntl; + + s |= RADEON_FFACE_SOLID | RADEON_BFACE_SOLID; + + if ( ctx->Polygon.CullFlag && ctx->PB->primitive == GL_POLYGON ) { + switch ( ctx->Polygon.CullFaceMode ) { + case GL_FRONT: + s &= ~RADEON_FFACE_SOLID; + break; + case GL_BACK: + s &= ~RADEON_BFACE_SOLID; + break; + case GL_FRONT_AND_BACK: + s &= ~(RADEON_FFACE_SOLID | RADEON_BFACE_SOLID); + break; + } + } + + if ( rmesa->setup.se_cntl != s ) { + FLUSH_BATCH( rmesa ); + rmesa->setup.se_cntl = s; + + /* NOTE: Only upload the setup state, everything else has been + * uploaded by the usual means already. Also, note that this is + * an optimization (see comment in the kernel's radeon_state.c), + * which will not be necessary when/if we use the Radeon's + * native point/line support. + */ + rmesa->dirty |= RADEON_UPLOAD_SETUP; + } +} + + +#define INTERESTED (~(NEW_MODELVIEW | \ + NEW_PROJECTION | \ + NEW_TEXTURE_MATRIX | \ + NEW_USER_CLIP | \ + NEW_CLIENT_STATE)) + +void radeonDDUpdateState( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if ( ctx->NewState & INTERESTED ) { + radeonDDChooseRenderState( ctx ); + radeonDDChooseRasterSetupFunc( ctx ); + } + + /* Need to do this here to detect texture fallbacks before + * setting triangle functions. + * GH: Do we need this anymore? The Radeon doesn't really have + * texturing fallbacks like the r128... + */ + if ( rmesa->new_state & RADEON_NEW_TEXTURE ) { + radeonDDUpdateHWState( ctx ); + } + + if ( !rmesa->Fallback ) { + ctx->IndirectTriangles &= ~DD_SW_RASTERIZE; + ctx->IndirectTriangles |= rmesa->IndirectTriangles; + + ctx->Driver.PointsFunc = rmesa->PointsFunc; + ctx->Driver.LineFunc = rmesa->LineFunc; + ctx->Driver.TriangleFunc = rmesa->TriangleFunc; + ctx->Driver.QuadFunc = rmesa->QuadFunc; + } +} + + +/* Initialize the context's hardware state. + */ +void radeonDDInitState( radeonContextPtr rmesa ) +{ + GLuint color_fmt, depth_fmt; + + switch ( rmesa->radeonScreen->cpp ) { + case 2: + color_fmt = RADEON_COLOR_FORMAT_RGB565; + break; + case 4: + color_fmt = RADEON_COLOR_FORMAT_ARGB8888; + break; + default: + fprintf( stderr, "Error: Unsupported pixel depth... exiting\n" ); + exit( -1 ); + } + + rmesa->ClearColor = 0x00000000; + + switch ( rmesa->glCtx->Visual->DepthBits ) { + case 16: + rmesa->ClearDepth = 0x0000ffff; + rmesa->DepthMask= 0xffffffff; + depth_fmt = RADEON_DEPTH_FORMAT_16BIT_INT_Z; + rmesa->depth_scale = 1.0 / (GLfloat)0xffff; + break; + case 24: + rmesa->ClearDepth = 0x00ffffff; + rmesa->DepthMask= 0x00ffffff; + depth_fmt = RADEON_DEPTH_FORMAT_24BIT_INT_Z; + rmesa->depth_scale = 1.0 / (GLfloat)0xffffff; + break; + default: + fprintf( stderr, "Error: Unsupported depth %d... exiting\n", + rmesa->glCtx->Visual->DepthBits ); + exit( -1 ); + } + + rmesa->RenderIndex = RADEON_FALLBACK_BIT; + rmesa->PointsFunc = NULL; + rmesa->LineFunc = NULL; + rmesa->TriangleFunc = NULL; + rmesa->QuadFunc = NULL; + + rmesa->IndirectTriangles = 0; + rmesa->Fallback = 0; + + if ( rmesa->glCtx->Visual->DBflag ) { + rmesa->DrawBuffer = GL_BACK_LEFT; + rmesa->drawOffset = rmesa->readOffset = rmesa->radeonScreen->backOffset; + rmesa->drawPitch = rmesa->readPitch = rmesa->radeonScreen->backPitch; + } else { + rmesa->DrawBuffer = GL_FRONT_LEFT; + rmesa->drawOffset = rmesa->readOffset = rmesa->radeonScreen->frontOffset; + rmesa->drawPitch = rmesa->readPitch = rmesa->radeonScreen->frontPitch; + } + + /* Harware state: + */ + rmesa->setup.pp_misc = (RADEON_ALPHA_TEST_PASS | + RADEON_CHROMA_FUNC_FAIL | + RADEON_CHROMA_KEY_NEAREST | + RADEON_SHADOW_FUNC_EQUAL | + RADEON_SHADOW_PASS_1 | + RADEON_RIGHT_HAND_CUBE_OGL); + + rmesa->setup.pp_fog_color = ((0x00000000 & RADEON_FOG_COLOR_MASK) | + RADEON_FOG_VERTEX | + RADEON_FOG_USE_DEPTH); + + rmesa->setup.re_solid_color = 0x00000000; + + rmesa->setup.rb3d_blendcntl = (RADEON_SRC_BLEND_GL_ONE | + RADEON_DST_BLEND_GL_ZERO ); + + rmesa->setup.rb3d_depthoffset = rmesa->radeonScreen->depthOffset; + + rmesa->setup.rb3d_depthpitch = ((rmesa->radeonScreen->depthPitch & + RADEON_DEPTHPITCH_MASK) | + RADEON_DEPTH_ENDIAN_NO_SWAP); + + rmesa->setup.rb3d_zstencilcntl = (depth_fmt | + RADEON_Z_TEST_LESS | + RADEON_STENCIL_TEST_ALWAYS | + RADEON_STENCIL_S_FAIL_KEEP | + RADEON_STENCIL_ZPASS_KEEP | + RADEON_STENCIL_ZFAIL_KEEP | + RADEON_Z_WRITE_ENABLE); + + rmesa->setup.pp_cntl = (RADEON_SCISSOR_ENABLE | + RADEON_ANTI_ALIAS_NONE); + + rmesa->setup.rb3d_cntl = (RADEON_PLANE_MASK_ENABLE | + color_fmt | + RADEON_ZBLOCK16); + + rmesa->setup.rb3d_coloroffset = (rmesa->drawOffset & + RADEON_COLOROFFSET_MASK); + + rmesa->setup.re_width_height = ((0x7ff << RADEON_RE_WIDTH_SHIFT) | + (0x7ff << RADEON_RE_HEIGHT_SHIFT)); + + rmesa->setup.rb3d_colorpitch = ((rmesa->drawPitch & + RADEON_COLORPITCH_MASK) | + RADEON_COLOR_ENDIAN_NO_SWAP); + + rmesa->setup.se_cntl = (RADEON_FFACE_CULL_CW | + RADEON_BFACE_SOLID | + RADEON_FFACE_SOLID | + RADEON_FLAT_SHADE_VTX_LAST | + RADEON_DIFFUSE_SHADE_GOURAUD | + RADEON_ALPHA_SHADE_GOURAUD | + RADEON_SPECULAR_SHADE_GOURAUD | + RADEON_FOG_SHADE_GOURAUD | + RADEON_VPORT_XY_XFORM_ENABLE | + RADEON_VPORT_Z_XFORM_ENABLE | + RADEON_VTX_PIX_CENTER_OGL | + RADEON_ROUND_MODE_TRUNC | + RADEON_ROUND_PREC_8TH_PIX); + + rmesa->setup.se_coord_fmt = (RADEON_VTX_XY_PRE_MULT_1_OVER_W0 | + RADEON_VTX_Z_PRE_MULT_1_OVER_W0 | + RADEON_TEX1_W_ROUTING_USE_Q1); + + rmesa->setup.re_line_pattern = ((0x0000 & RADEON_LINE_PATTERN_MASK) | + (0 << RADEON_LINE_REPEAT_COUNT_SHIFT) | + (0 << RADEON_LINE_PATTERN_START_SHIFT) | + RADEON_LINE_PATTERN_LITTLE_BIT_ORDER); + + rmesa->setup.re_line_state = ((0 << RADEON_LINE_CURRENT_PTR_SHIFT) | + (0 << RADEON_LINE_CURRENT_COUNT_SHIFT)); + + rmesa->setup.se_line_width = 0x0000000; + + rmesa->setup.pp_lum_matrix = 0x00000000; + + rmesa->setup.pp_rot_matrix_0 = 0x00000000; + rmesa->setup.pp_rot_matrix_1 = 0x00000000; + + rmesa->setup.rb3d_stencilrefmask = ((0x00 << RADEON_STENCIL_REF_SHIFT) | + (0xff << RADEON_STENCIL_MASK_SHIFT) | + (0xff << RADEON_STENCIL_WRITEMASK_SHIFT)); + + rmesa->setup.rb3d_ropcntl = 0x00000000; + rmesa->setup.rb3d_planemask = 0xffffffff; + + rmesa->setup.se_vport_xscale = 0x00000000; + rmesa->setup.se_vport_xoffset = 0x00000000; + rmesa->setup.se_vport_yscale = 0x00000000; + rmesa->setup.se_vport_yoffset = 0x00000000; + rmesa->setup.se_vport_zscale = 0x00000000; + rmesa->setup.se_vport_zoffset = 0x00000000; + + rmesa->setup.se_cntl_status = (RADEON_VC_NO_SWAP | + RADEON_TCL_BYPASS); + +#ifdef TCL_ENABLE + /* FIXME: Obviously these need to be properly initialized */ + rmesa->setup.se_tcl_material_emmissive.red = 0x00000000; + rmesa->setup.se_tcl_material_emmissive.green = 0x00000000; + rmesa->setup.se_tcl_material_emmissive.blue = 0x00000000; + rmesa->setup.se_tcl_material_emmissive.alpha = 0x00000000; + + rmesa->setup.se_tcl_material_ambient.red = 0x00000000; + rmesa->setup.se_tcl_material_ambient.green = 0x00000000; + rmesa->setup.se_tcl_material_ambient.blue = 0x00000000; + rmesa->setup.se_tcl_material_ambient.alpha = 0x00000000; + + rmesa->setup.se_tcl_material_diffuse.red = 0x00000000; + rmesa->setup.se_tcl_material_diffuse.green = 0x00000000; + rmesa->setup.se_tcl_material_diffuse.blue = 0x00000000; + rmesa->setup.se_tcl_material_diffuse.alpha = 0x00000000; + + rmesa->setup.se_tcl_material_specular.red = 0x00000000; + rmesa->setup.se_tcl_material_specular.green = 0x00000000; + rmesa->setup.se_tcl_material_specular.blue = 0x00000000; + rmesa->setup.se_tcl_material_specular.alpha = 0x00000000; + + rmesa->setup.se_tcl_shininess = 0x00000000; + rmesa->setup.se_tcl_output_vtx_fmt = 0x00000000; + rmesa->setup.se_tcl_output_vtx_sel = 0x00000000; + rmesa->setup.se_tcl_matrix_select_0 = 0x00000000; + rmesa->setup.se_tcl_matrix_select_1 = 0x00000000; + rmesa->setup.se_tcl_ucp_vert_blend_ctl = 0x00000000; + rmesa->setup.se_tcl_texture_proc_ctl = 0x00000000; + rmesa->setup.se_tcl_light_model_ctl = 0x00000000; + for ( i = 0 ; i < 4 ; i++ ) { + rmesa->setup.se_tcl_per_light_ctl[i] = 0x00000000; + } +#endif + + rmesa->setup.re_top_left = ((0 << RADEON_RE_LEFT_SHIFT) | + (0 << RADEON_RE_TOP_SHIFT) ); + + rmesa->setup.re_misc = ((0 << RADEON_STIPPLE_X_OFFSET_SHIFT) | + (0 << RADEON_STIPPLE_Y_OFFSET_SHIFT) | + RADEON_STIPPLE_BIG_BIT_ORDER); + + rmesa->env_color[0] = 0x00000000; + rmesa->env_color[1] = 0x00000000; + rmesa->env_color[2] = 0x00000000; + + rmesa->new_state = RADEON_NEW_ALL; +} + +/* Initialize the driver's state functions. + */ +void radeonDDInitStateFuncs( GLcontext *ctx ) +{ + ctx->Driver.UpdateState = radeonDDUpdateState; + + ctx->Driver.ClearIndex = NULL; + ctx->Driver.ClearColor = radeonDDClearColor; + ctx->Driver.Index = NULL; + ctx->Driver.Color = radeonDDColor; + ctx->Driver.SetDrawBuffer = radeonDDSetDrawBuffer; + ctx->Driver.SetReadBuffer = radeonDDSetReadBuffer; + + ctx->Driver.IndexMask = NULL; + ctx->Driver.ColorMask = radeonDDColorMask; + ctx->Driver.LogicOp = NULL; + ctx->Driver.Dither = NULL; + + ctx->Driver.NearFar = NULL; + + ctx->Driver.RenderStart = radeonDDUpdateHWState; + ctx->Driver.RenderFinish = NULL; + ctx->Driver.RasterSetup = NULL; + + ctx->Driver.RenderVBClippedTab = NULL; + ctx->Driver.RenderVBCulledTab = NULL; + ctx->Driver.RenderVBRawTab = NULL; + + ctx->Driver.ReducedPrimitiveChange = radeonDDReducedPrimitiveChange; + ctx->Driver.MultipassFunc = NULL; + + ctx->Driver.AlphaFunc = radeonDDAlphaFunc; + ctx->Driver.BlendEquation = radeonDDBlendEquation; + ctx->Driver.BlendFunc = radeonDDBlendFunc; + ctx->Driver.BlendFuncSeparate = radeonDDBlendFuncSeparate; + ctx->Driver.ClearDepth = radeonDDClearDepth; + ctx->Driver.CullFace = radeonDDCullFace; + ctx->Driver.FrontFace = radeonDDFrontFace; + ctx->Driver.DepthFunc = radeonDDDepthFunc; + ctx->Driver.DepthMask = radeonDDDepthMask; + ctx->Driver.DepthRange = NULL; + ctx->Driver.Enable = radeonDDEnable; + ctx->Driver.Fogfv = radeonDDFogfv; + ctx->Driver.Hint = NULL; + ctx->Driver.Lightfv = NULL; + ctx->Driver.LightModelfv = radeonDDLightModelfv; + ctx->Driver.LogicOpcode = radeonDDLogicOpCode; + ctx->Driver.PolygonMode = NULL; + ctx->Driver.PolygonStipple = radeonDDPolygonStipple; + ctx->Driver.Scissor = radeonDDScissor; + ctx->Driver.ShadeModel = radeonDDShadeModel; + ctx->Driver.ClearStencil = NULL; + ctx->Driver.StencilFunc = NULL; + ctx->Driver.StencilMask = NULL; + ctx->Driver.StencilOp = NULL; + ctx->Driver.Viewport = NULL; +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_state.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_state.h:1.1 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_state.h Sun Jan 7 20:07:28 2001 @@ -0,0 +1,55 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_state.h,v 1.1 2001/01/08 01:07:28 martin Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#ifndef __RADEON_STATE_H__ +#define __RADEON_STATE_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "radeon_context.h" + +extern void radeonDDInitState( radeonContextPtr rmesa ); +extern void radeonDDInitStateFuncs( GLcontext *ctx ); + +extern void radeonDDUpdateState( GLcontext *ctx ); +extern void radeonDDUpdateHWState( GLcontext *ctx ); + +extern void radeonUpdateWindow( GLcontext *ctx ); + +extern void radeonEmitHwStateLocked( radeonContextPtr rmesa ); + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c:1.3.2.1 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c Tue May 22 17:25:41 2001 @@ -0,0 +1,960 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c,v 1.3.2.1 2001/05/22 21:25:41 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#include "radeon_context.h" +#include "radeon_state.h" +#include "radeon_ioctl.h" +#include "radeon_vb.h" +#include "radeon_tex.h" + +#include "mmath.h" +#include "simple_list.h" +#include "enums.h" +#include "mem.h" +#include "texutil.h" + + +static void radeonSetTexWrap( radeonTexObjPtr t, GLenum swrap, GLenum twrap ) +{ + t->pp_txfilter &= ~(RADEON_CLAMP_S_MASK | RADEON_CLAMP_T_MASK); + + switch ( swrap ) { + case GL_REPEAT: + t->pp_txfilter |= RADEON_CLAMP_S_WRAP; + break; + case GL_CLAMP: + t->pp_txfilter |= RADEON_CLAMP_S_CLAMP_LAST; + break; + case GL_CLAMP_TO_EDGE: + t->pp_txfilter |= RADEON_CLAMP_S_CLAMP_LAST; + break; + } + + switch ( twrap ) { + case GL_REPEAT: + t->pp_txfilter |= RADEON_CLAMP_T_WRAP; + break; + case GL_CLAMP: + t->pp_txfilter |= RADEON_CLAMP_T_CLAMP_LAST; + break; + case GL_CLAMP_TO_EDGE: + t->pp_txfilter |= RADEON_CLAMP_T_CLAMP_LAST; + break; + } +} + +static void radeonSetTexFilter( radeonTexObjPtr t, GLenum minf, GLenum magf ) +{ + t->pp_txfilter &= ~(RADEON_MIN_FILTER_MASK | RADEON_MAG_FILTER_MASK); + + switch ( minf ) { + case GL_NEAREST: + t->pp_txfilter |= RADEON_MIN_FILTER_NEAREST; + break; + case GL_LINEAR: + t->pp_txfilter |= RADEON_MIN_FILTER_LINEAR; + break; + case GL_NEAREST_MIPMAP_NEAREST: + t->pp_txfilter |= RADEON_MIN_FILTER_NEAREST_MIP_NEAREST; + break; + case GL_NEAREST_MIPMAP_LINEAR: + t->pp_txfilter |= RADEON_MIN_FILTER_LINEAR_MIP_NEAREST; + break; + case GL_LINEAR_MIPMAP_NEAREST: + t->pp_txfilter |= RADEON_MIN_FILTER_NEAREST_MIP_LINEAR; + break; + case GL_LINEAR_MIPMAP_LINEAR: + t->pp_txfilter |= RADEON_MIN_FILTER_LINEAR_MIP_LINEAR; + break; + } + + switch ( magf ) { + case GL_NEAREST: + t->pp_txfilter |= RADEON_MAG_FILTER_NEAREST; + break; + case GL_LINEAR: + t->pp_txfilter |= RADEON_MAG_FILTER_LINEAR; + break; + } +} + +static void radeonSetTexBorderColor( radeonTexObjPtr t, GLubyte c[4] ) +{ + t->pp_border_color = radeonPackColor( 4, c[0], c[1], c[2], c[3] ); +} + +static radeonTexObjPtr radeonAllocTexObj( struct gl_texture_object *texObj ) +{ + radeonTexObjPtr t; + + t = CALLOC_STRUCT( radeon_tex_obj ); + + if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s( %p, %p )\n", __FUNCTION__, texObj, t ); + } + + /* Initialize non-image-dependent parts of the state: + */ + t->tObj = texObj; +#if 0 + t->dirty_images = ~0; +#endif + t->pp_txfilter = RADEON_BORDER_MODE_OGL; + t->pp_txformat = (RADEON_TXFORMAT_ENDIAN_NO_SWAP | + RADEON_TXFORMAT_PERSPECTIVE_ENABLE); + + make_empty_list( t ); + + radeonSetTexWrap( t, texObj->WrapS, texObj->WrapT ); + radeonSetTexFilter( t, texObj->MinFilter, texObj->MagFilter ); + radeonSetTexBorderColor( t, texObj->BorderColor ); + + return t; +} + + +static GLint radeonChooseTexFormat( radeonContextPtr rmesa, + struct gl_texture_image *texImage, + GLenum format, GLenum type ) +{ + const GLboolean do32bpt = ( rmesa->radeonScreen->cpp == 4 ); + const struct gl_texture_format *texFormat; + GLint ret; + + if ( 0 ) + fprintf( stderr, "internal=%s format=%s type=%s\n", + texImage->IntFormat == 3 ? "GL_RGB (3)" : + texImage->IntFormat == 4 ? "GL_RGBA (4)" : + gl_lookup_enum_by_nr( texImage->IntFormat ), + gl_lookup_enum_by_nr( format ), + gl_lookup_enum_by_nr( type ) ); + +#define SET_FORMAT( r, gl ) \ + do { \ + ret = (r); \ + texFormat = &(gl); \ + } while (0) + +#define SET_FORMAT_32BPT( r32, gl32, r16, gl16 ) \ + do { \ + if ( do32bpt ) { \ + ret = (r32); \ + texFormat = &(gl32); \ + } else { \ + ret = (r16); \ + texFormat = &(gl16); \ + } \ + } while (0) + + switch ( texImage->IntFormat ) { + /* GH: Bias towards GL_RGB, GL_RGBA texture formats. This has + * got to be better than sticking them way down the end of this + * huge list. + */ + case GL_RGBA: + case 4: + if ( format == GL_BGRA ) { + if ( type == GL_UNSIGNED_INT_8_8_8_8_REV ) { + SET_FORMAT( RADEON_TXFORMAT_ARGB8888, _mesa_texformat_argb8888 ); + break; + } else if ( type == GL_UNSIGNED_SHORT_4_4_4_4_REV ) { + SET_FORMAT( RADEON_TXFORMAT_ARGB4444, _mesa_texformat_argb4444 ); + break; + } else if ( type == GL_UNSIGNED_SHORT_1_5_5_5_REV ) { + SET_FORMAT( RADEON_TXFORMAT_ARGB1555, _mesa_texformat_argb1555 ); + break; + } + } + SET_FORMAT_32BPT( RADEON_TXFORMAT_RGBA8888, _mesa_texformat_rgba8888, + RADEON_TXFORMAT_ARGB4444, _mesa_texformat_argb4444 ); + break; + + case GL_RGB: + case 3: + if ( format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5 ) { + SET_FORMAT( RADEON_TXFORMAT_RGB565, _mesa_texformat_rgb565 ); + break; + } + SET_FORMAT_32BPT( RADEON_TXFORMAT_RGBA8888, _mesa_texformat_rgba8888, + RADEON_TXFORMAT_RGB565, _mesa_texformat_rgb565 ); + break; + + /* GH: Okay, keep checking as normal. Still test for GL_RGB, + * GL_RGBA formats first. + */ + case GL_RGBA8: + case GL_RGB10_A2: + case GL_RGBA12: + case GL_RGBA16: + SET_FORMAT_32BPT( RADEON_TXFORMAT_RGBA8888, _mesa_texformat_rgba8888, + RADEON_TXFORMAT_ARGB4444, _mesa_texformat_argb4444 ); + break; + + case GL_RGBA4: + case GL_RGBA2: + SET_FORMAT( RADEON_TXFORMAT_ARGB4444, _mesa_texformat_argb4444 ); + break; + + case GL_RGB5_A1: + SET_FORMAT( RADEON_TXFORMAT_ARGB1555, _mesa_texformat_argb1555 ); + break; + + case GL_RGB8: + case GL_RGB10: + case GL_RGB12: + case GL_RGB16: + SET_FORMAT_32BPT( RADEON_TXFORMAT_RGBA8888, _mesa_texformat_rgba8888, + RADEON_TXFORMAT_RGB565, _mesa_texformat_rgb565 ); + break; + + case GL_RGB5: + case GL_RGB4: + case GL_R3_G3_B2: + SET_FORMAT( RADEON_TXFORMAT_RGB565, _mesa_texformat_rgb565 ); + break; + + case GL_ALPHA: + case GL_ALPHA4: + case GL_ALPHA8: + case GL_ALPHA12: + case GL_ALPHA16: + SET_FORMAT( RADEON_TXFORMAT_AI88, _mesa_texformat_al88 ); + break; + + case 1: + case GL_LUMINANCE: + case GL_LUMINANCE4: + case GL_LUMINANCE8: + case GL_LUMINANCE12: + case GL_LUMINANCE16: + SET_FORMAT( RADEON_TXFORMAT_AI88, _mesa_texformat_al88 ); + break; + + case 2: + case GL_LUMINANCE_ALPHA: + case GL_LUMINANCE4_ALPHA4: + case GL_LUMINANCE6_ALPHA2: + case GL_LUMINANCE8_ALPHA8: + case GL_LUMINANCE12_ALPHA4: + case GL_LUMINANCE12_ALPHA12: + case GL_LUMINANCE16_ALPHA16: + SET_FORMAT( RADEON_TXFORMAT_AI88, _mesa_texformat_al88 ); + break; + + case GL_INTENSITY: + case GL_INTENSITY4: + case GL_INTENSITY8: + case GL_INTENSITY12: + case GL_INTENSITY16: + SET_FORMAT( RADEON_TXFORMAT_I8, _mesa_texformat_i8 ); + break; + + case GL_COLOR_INDEX: + case GL_COLOR_INDEX1_EXT: + case GL_COLOR_INDEX2_EXT: + case GL_COLOR_INDEX4_EXT: + case GL_COLOR_INDEX8_EXT: + case GL_COLOR_INDEX12_EXT: + case GL_COLOR_INDEX16_EXT: + default: + fprintf( stderr, "bad texture format in radeonChooseTexFormat() %d", + texImage->IntFormat ); + return -1; + } + + texImage->TexFormat = texFormat; + + return ret; +} + + +/* ================================================================ + * Texture image callbacks + */ + +static GLboolean +radeonDDTexImage1D( GLcontext *ctx, GLenum target, GLint level, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage, + GLboolean *retainInternalCopy ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + radeonTexObjPtr t = (radeonTexObjPtr)texObj->DriverData; + const struct gl_texture_format *texFormat; + GLuint texSize; + GLint txformat; + GLubyte *data; + + if ( target != GL_TEXTURE_1D ) + return GL_FALSE; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s( %p, %d )\n", __FUNCTION__, texObj, level ); + } + + if ( t ) { + if ( t->bound ) FLUSH_BATCH( rmesa ); + radeonSwapOutTexObj( rmesa, t ); + } else { + t = radeonAllocTexObj( texObj ); + texObj->DriverData = t; + } + + txformat = radeonChooseTexFormat( rmesa, texImage, format, type ); + if ( txformat < 0 ) + return GL_FALSE; + + texFormat = texImage->TexFormat; + texSize = texImage->Width * texFormat->TexelBytes; + + /* We really shouldn't have to keep the texture image, it should be + * hung from the main texImage structure. + */ + if ( t->image[level].data ) { + FREE( t->image[level].data ); + t->image[level].data = NULL; + } + + data = (GLubyte *) MALLOC( texSize ); + if ( !data ) + return GL_FALSE; + + if ( !_mesa_convert_texsubimage1d( texFormat->IntFormat, + 0, texImage->Width, + format, type, packing, + pixels, data ) ) { + /*fprintf( stderr, " *** convert failed!\n" );*/ + FREE( data ); + return GL_FALSE; + } + + t->image[level].data = data; + t->dirty_images |= (1 << level); + + /* Format-specific hardware state: + */ + t->pp_txformat &= ~(RADEON_TXFORMAT_FORMAT_MASK | + RADEON_TXFORMAT_ALPHA_IN_MAP); + t->pp_txformat |= txformat; + + if ( txformat == RADEON_TXFORMAT_RGBA8888 || + txformat == RADEON_TXFORMAT_ARGB4444 || + txformat == RADEON_TXFORMAT_ARGB1555 || + txformat == RADEON_TXFORMAT_AI88 ) { + t->pp_txformat |= RADEON_TXFORMAT_ALPHA_IN_MAP; + } + + ASSERT( t->image[level].data ); + + rmesa->new_state |= RADEON_NEW_TEXTURE; + + *retainInternalCopy = GL_FALSE; + return GL_TRUE; +} + +static GLboolean +radeonDDTexImage2D( GLcontext *ctx, GLenum target, GLint level, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage, + GLboolean *retainInternalCopy ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + radeonTexObjPtr t = (radeonTexObjPtr)texObj->DriverData; + const struct gl_texture_format *texFormat; + GLuint texSize; + GLint txformat; + GLubyte *data; + + if ( target != GL_TEXTURE_2D ) + return GL_FALSE; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s( %p, %d )\n", __FUNCTION__, texObj, level ); + } + + if ( t ) { + if ( t->bound ) FLUSH_BATCH( rmesa ); + if ( t->image[level].data ) radeonSwapOutTexObj( rmesa, t ); + } else { + t = radeonAllocTexObj( texObj ); + texObj->DriverData = t; + } + + txformat = radeonChooseTexFormat( rmesa, texImage, format, type ); + if ( txformat < 0 ) + return GL_FALSE; + + texFormat = texImage->TexFormat; + texSize = texImage->Width * texImage->Height * texFormat->TexelBytes; + + /* We really shouldn't have to keep the texture image, it should be + * hung from the main texImage structure. + */ + if ( t->image[level].data ) { + FREE( t->image[level].data ); + t->image[level].data = NULL; + } + + data = (GLubyte *) MALLOC( texSize ); + if ( !data ) + return GL_FALSE; + + if ( !_mesa_convert_texsubimage2d( texFormat->IntFormat, + 0, 0, texImage->Width, texImage->Height, + texImage->Width, format, type, packing, + pixels, data ) ) { + if ( 0 ) + fprintf( stderr, " *** convert failed! %s/%s-> %s\n", + gl_lookup_enum_by_nr( format ), + gl_lookup_enum_by_nr( type ), + gl_lookup_enum_by_nr( texImage->IntFormat ) ); + FREE( data ); + return GL_FALSE; + } + + t->image[level].data = data; + t->dirty_images |= (1 << level); + + /* Format-specific hardware state: + */ + t->pp_txformat &= ~(RADEON_TXFORMAT_FORMAT_MASK | + RADEON_TXFORMAT_ALPHA_IN_MAP); + t->pp_txformat |= txformat; + + if ( txformat == RADEON_TXFORMAT_RGBA8888 || + txformat == RADEON_TXFORMAT_ARGB4444 || + txformat == RADEON_TXFORMAT_ARGB1555 || + txformat == RADEON_TXFORMAT_AI88 ) { + t->pp_txformat |= RADEON_TXFORMAT_ALPHA_IN_MAP; + } + + ASSERT( t->image[level].data ); + + rmesa->new_state |= RADEON_NEW_TEXTURE; + + *retainInternalCopy = GL_FALSE; + return GL_TRUE; +} + +/* GH: This is undoubtedly broken... + */ +static GLboolean +radeonDDTexImage3D( GLcontext *ctx, GLenum target, GLint level, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage, + GLboolean *retainInternalCopy ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + radeonTexObjPtr t = (radeonTexObjPtr)texObj->DriverData; + const struct gl_texture_format *texFormat; + GLuint texSize; + GLint txformat; + GLubyte *data; + + if ( target != GL_TEXTURE_3D ) + return GL_FALSE; + + if ( t ) { + if ( t->bound ) FLUSH_BATCH( rmesa ); + radeonSwapOutTexObj( rmesa, t ); + } else { + t = radeonAllocTexObj( texObj ); + texObj->DriverData = t; + } + + txformat = radeonChooseTexFormat( rmesa, texImage, format, type ); + if ( txformat < 0 ) + return GL_FALSE; + + texFormat = texImage->TexFormat; + texSize = (texImage->Width * texImage->Height * + texImage->Depth * texFormat->TexelBytes); + + /* We really shouldn't have to keep the texture image, it should be + * hung from the main texImage structure. + */ + if ( t->image[level].data ) { + FREE( t->image[level].data ); + t->image[level].data = NULL; + } + + data = (GLubyte *) MALLOC( texSize ); + if ( !data ) + return GL_FALSE; + + if ( !_mesa_convert_texsubimage3d( texFormat->IntFormat, + 0, 0, 0, texImage->Width, + texImage->Height, texImage->Depth, + texImage->Width, texImage->Height, + format, type, packing, + pixels, data ) ) { + FREE( data ); + return GL_FALSE; + } + + t->image[level].data = data; + t->dirty_images |= (1 << level); + + ASSERT( t->image[level].data ); + + rmesa->new_state |= RADEON_NEW_TEXTURE; + + *retainInternalCopy = GL_FALSE; + return GL_TRUE; +} + + +/* ================================================================ + * Texture subimage callbacks + */ + +static GLboolean +radeonDDTexSubImage1D( GLcontext *ctx, GLenum target, GLint level, + GLint xoffset, GLsizei width, + GLenum format, GLenum type, + const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + radeonTexObjPtr t = (radeonTexObjPtr)texObj->DriverData; + const struct gl_texture_format *texFormat; + + if ( target != GL_TEXTURE_1D ) + return GL_FALSE; + + /* FIXME: Can this ever be NULL??? + */ + ASSERT( t ); + ASSERT( t->image[level].data ); + + if ( t->bound ) + FLUSH_BATCH( rmesa ); + + texFormat = texImage->TexFormat; + + if ( !_mesa_convert_texsubimage1d( texFormat->IntFormat, + xoffset, width, format, type, packing, + pixels, t->image[level].data ) ) { + /*fprintf( stderr, " *** convert failed!\n" );*/ + return GL_FALSE; + } + + t->dirty_images |= (1 << level); + rmesa->new_state |= RADEON_NEW_TEXTURE; + + return GL_TRUE; +} + +static GLboolean +radeonDDTexSubImage2D( GLcontext *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + radeonTexObjPtr t = (radeonTexObjPtr)texObj->DriverData; + const struct gl_texture_format *texFormat; + + if ( target != GL_TEXTURE_2D ) + return GL_FALSE; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s( %p, %d )\n", __FUNCTION__, texObj, level ); + } + + /* FIXME: Can this ever be NULL??? + */ + ASSERT( t ); + ASSERT( t->image[level].data ); + + if ( t->bound ) + FLUSH_BATCH( rmesa ); + + texFormat = texImage->TexFormat; + + if ( !_mesa_convert_texsubimage2d( texFormat->IntFormat, + xoffset, yoffset, width, height, + texImage->Width, format, type, packing, + pixels, t->image[level].data ) ) { + /*fprintf( stderr, " *** convert failed!\n" );*/ + return GL_FALSE; + } + + t->dirty_images |= (1 << level); + rmesa->new_state |= RADEON_NEW_TEXTURE; + + return GL_TRUE; +} + +/* GH: This is undoubtedly broken... + */ +static GLboolean +radeonDDTexSubImage3D( GLcontext *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLint depth, + GLenum format, GLenum type, + const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + radeonTexObjPtr t = (radeonTexObjPtr)texObj->DriverData; + const struct gl_texture_format *texFormat; + + if ( target != GL_TEXTURE_3D ) + return GL_FALSE; + + /* FIXME: Can this ever be NULL??? + */ + ASSERT( t ); + ASSERT( t->image[level].data ); + + if ( t->bound ) + FLUSH_BATCH( rmesa ); + + texFormat = texImage->TexFormat; + + if ( !_mesa_convert_texsubimage3d( texFormat->IntFormat, + xoffset, yoffset, zoffset, + width, height, depth, + texImage->Width, texImage->Height, + format, type, packing, + pixels, t->image[level].data ) ) { + /*fprintf( stderr, " *** convert failed!\n" );*/ + return GL_FALSE; + } + + t->dirty_images |= (1 << level); + rmesa->new_state |= RADEON_NEW_TEXTURE; + + return GL_TRUE; +} + + +/* ================================================================ + * DEPRECATED... + */ + +static GLvoid *radeonDDGetTexImage( GLcontext *ctx, GLenum target, GLint level, + const struct gl_texture_object *texObj, + GLenum *formatOut, GLenum *typeOut, + GLboolean *freeImageOut ) +{ + const struct gl_texture_image *texImage = texObj->Image[level]; + const struct gl_texture_format *texFormat = texImage->TexFormat; + radeonTexObjPtr t = (radeonTexObjPtr)texObj->DriverData; + GLubyte *data; + + if ( !t || !t->image[level].data ) + return NULL; + + data = (GLubyte *) MALLOC( texImage->Width * texImage->Height * 4 ); + if ( !data ) + return NULL; + + if ( 0 ) + fprintf( stderr, " in=%d out=%s\n", + texFormat->IntFormat, + gl_lookup_enum_by_nr( texImage->Format ) ); + + switch ( target ) { + case GL_TEXTURE_1D: + _mesa_unconvert_teximage1d( texFormat->IntFormat, texImage->Format, + texImage->Width, + t->image[level].data, data ); + break; + case GL_TEXTURE_2D: + _mesa_unconvert_teximage2d( texFormat->IntFormat, texImage->Format, + texImage->Width, texImage->Height, + t->image[level].data, data ); + break; + default: + return NULL; + } + + *formatOut = texImage->Format; + *typeOut = GL_UNSIGNED_BYTE; + *freeImageOut = GL_TRUE; + + return data; +} + + +/* ================================================================ + * Texture state callbacks + */ + +#define SCALED_FLOAT_TO_BYTE( x, scale ) \ + ((((GLint)((256.0F / scale) * (x))) - 1) / 2) + +static void radeonDDTexEnv( GLcontext *ctx, GLenum target, + GLenum pname, const GLfloat *param ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + struct gl_texture_unit *texUnit; + GLuint source; + GLubyte c[4]; + GLuint col; + GLfloat bias; + GLubyte b; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s( %s )\n", + __FUNCTION__, gl_lookup_enum_by_nr( pname ) ); + } + + switch ( pname ) { + case GL_TEXTURE_ENV_MODE: + FLUSH_BATCH( rmesa ); + rmesa->new_state |= RADEON_NEW_TEXTURE | RADEON_NEW_ALPHA; + break; + + case GL_TEXTURE_ENV_COLOR: + source = rmesa->tmu_source[ctx->Texture.CurrentUnit]; + texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; + FLOAT_RGBA_TO_UBYTE_RGBA( c, texUnit->EnvColor ); + col = radeonPackColor( 4, c[0], c[1], c[2], c[3] ); + if ( rmesa->env_color[source] != col ) { + FLUSH_BATCH( rmesa ); + rmesa->env_color[source] = col; + + rmesa->new_state |= RADEON_NEW_TEXTURE; + } + break; + + case GL_TEXTURE_LOD_BIAS_EXT: + /* The Radeon's LOD bias is a signed 2's complement value with a + * range of -1.0 <= bias < 4.0. We break this into two linear + * functions, one mapping [-1.0,0.0] to [-128,0] and one mapping + * [0.0,4.0] to [0,127]. + */ + source = rmesa->tmu_source[ctx->Texture.CurrentUnit]; + bias = CLAMP( *param, -1.0, 4.0 ); + if ( bias == 0 ) { + b = 0; + } else if ( bias > 0 ) { + b = (GLubyte) SCALED_FLOAT_TO_BYTE( bias, 4.0 ); + } else { + b = (GLubyte) SCALED_FLOAT_TO_BYTE( bias, 1.0 ); + } + if ( rmesa->lod_bias[source] != (GLuint)b ) { + FLUSH_BATCH( rmesa ); + rmesa->lod_bias[source] = (GLuint)b; + + rmesa->new_state |= RADEON_NEW_TEXTURE; + } + break; + + default: + return; + } +} + +static void radeonDDTexParameter( GLcontext *ctx, GLenum target, + struct gl_texture_object *tObj, + GLenum pname, const GLfloat *params ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + radeonTexObjPtr t = (radeonTexObjPtr)tObj->DriverData; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s( %s )\n", + __FUNCTION__, gl_lookup_enum_by_nr( pname ) ); + } + + /* If we don't have a hardware texture, it will be automatically + * created with current state before it is used, so we don't have + * to do anything now. + */ + if ( !t ) + return; + + if ( ( target != GL_TEXTURE_2D ) && + ( target != GL_TEXTURE_1D ) ) + return; + + switch ( pname ) { + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_MAG_FILTER: + if ( t->bound ) FLUSH_BATCH( rmesa ); + radeonSetTexFilter( t, tObj->MinFilter, tObj->MagFilter ); + break; + + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + if ( t->bound ) FLUSH_BATCH( rmesa ); + radeonSetTexWrap( t, tObj->WrapS, tObj->WrapT ); + break; + + case GL_TEXTURE_BORDER_COLOR: + if ( t->bound ) FLUSH_BATCH( rmesa ); + radeonSetTexBorderColor( t, tObj->BorderColor ); + break; + + default: + return; + } + + rmesa->new_state |= RADEON_NEW_TEXTURE; +} + +static void radeonDDBindTexture( GLcontext *ctx, GLenum target, + struct gl_texture_object *tObj ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + radeonTexObjPtr t = (radeonTexObjPtr) tObj->DriverData; + GLuint unit = ctx->Texture.CurrentUnit; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s( %p ) unit=%d\n", + __FUNCTION__, tObj, unit ); + } + + FLUSH_BATCH( rmesa ); + + if ( !t ) { + t = radeonAllocTexObj( tObj ); + tObj->DriverData = t; + } + + /* Unbind a currently bound texture. + */ + if ( rmesa->CurrentTexObj[unit] ) { + rmesa->CurrentTexObj[unit]->bound &= ~(unit + 1); + rmesa->CurrentTexObj[unit] = NULL; + } + + /* Bind to the given texture unit. + */ + rmesa->CurrentTexObj[unit] = t; + t->bound |= unit + 1; + + rmesa->new_state |= RADEON_NEW_TEXTURE; +} + +static void radeonDDDeleteTexture( GLcontext *ctx, + struct gl_texture_object *tObj ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + radeonTexObjPtr t = (radeonTexObjPtr)tObj->DriverData; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, __FUNCTION__ "( %p )\n", tObj ); + } + + if ( t ) { + if ( t->bound ) { + FLUSH_BATCH( rmesa ); + if ( t->bound & TEX_0 ) rmesa->CurrentTexObj[0] = NULL; + if ( t->bound & TEX_1 ) rmesa->CurrentTexObj[1] = NULL; + rmesa->new_state |= RADEON_NEW_TEXTURE; + } + + radeonDestroyTexObj( rmesa, t ); + tObj->DriverData = NULL; + } +} + +static GLboolean radeonDDIsTextureResident( GLcontext *ctx, + struct gl_texture_object *tObj ) +{ + radeonTexObjPtr t = (radeonTexObjPtr)tObj->DriverData; + + return ( t && t->memBlock ); +} + +static void radeonDDInitTextureObjects( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + struct gl_texture_object *texObj; + GLuint tmp = ctx->Texture.CurrentUnit; + + ctx->Texture.CurrentUnit = 0; + + texObj = ctx->Texture.Unit[0].CurrentD[1]; + radeonDDBindTexture( ctx, GL_TEXTURE_1D, texObj ); + move_to_tail( &rmesa->SwappedOut, (radeonTexObjPtr)texObj->DriverData ); + + texObj = ctx->Texture.Unit[0].CurrentD[2]; + radeonDDBindTexture( ctx, GL_TEXTURE_2D, texObj ); + move_to_tail( &rmesa->SwappedOut, (radeonTexObjPtr)texObj->DriverData ); + + ctx->Texture.CurrentUnit = 1; + + texObj = ctx->Texture.Unit[1].CurrentD[1]; + radeonDDBindTexture( ctx, GL_TEXTURE_1D, texObj ); + move_to_tail( &rmesa->SwappedOut, (radeonTexObjPtr)texObj->DriverData ); + + texObj = ctx->Texture.Unit[1].CurrentD[2]; + radeonDDBindTexture( ctx, GL_TEXTURE_2D, texObj ); + move_to_tail( &rmesa->SwappedOut, (radeonTexObjPtr)texObj->DriverData ); + + ctx->Texture.CurrentUnit = tmp; +} + +void radeonDDInitTextureFuncs( GLcontext *ctx ) +{ + ctx->Driver.TexImage1D = radeonDDTexImage1D; + ctx->Driver.TexImage2D = radeonDDTexImage2D; + ctx->Driver.TexImage3D = NULL; (void) radeonDDTexImage3D; + ctx->Driver.TexSubImage1D = radeonDDTexSubImage1D; + ctx->Driver.TexSubImage2D = radeonDDTexSubImage2D; + ctx->Driver.TexSubImage3D = NULL; (void) radeonDDTexSubImage3D; + ctx->Driver.GetTexImage = radeonDDGetTexImage; + ctx->Driver.TexEnv = radeonDDTexEnv; + ctx->Driver.TexParameter = radeonDDTexParameter; + ctx->Driver.BindTexture = radeonDDBindTexture; + ctx->Driver.DeleteTexture = radeonDDDeleteTexture; + ctx->Driver.IsTextureResident = radeonDDIsTextureResident; + ctx->Driver.PrioritizeTexture = NULL; + ctx->Driver.ActiveTexture = NULL; + ctx->Driver.UpdateTexturePalette = NULL; + + radeonDDInitTextureObjects( ctx ); +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_tex.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_tex.h:1.2 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_tex.h Wed Mar 21 11:14:25 2001 @@ -0,0 +1,98 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_tex.h,v 1.2 2001/03/21 16:14:25 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#ifndef __RADEON_TEX_H__ +#define __RADEON_TEX_H__ + +#ifdef GLX_DIRECT_RENDERING + +extern void radeonUpdateTextureState( GLcontext *ctx ); + +extern int radeonUploadTexImages( radeonContextPtr rmesa, radeonTexObjPtr t ); + +extern void radeonAgeTextures( radeonContextPtr rmesa, int heap ); +extern void radeonDestroyTexObj( radeonContextPtr rmesa, radeonTexObjPtr t ); +extern void radeonSwapOutTexObj( radeonContextPtr rmesa, radeonTexObjPtr t ); + +extern void radeonPrintLocalLRU( radeonContextPtr rmesa, int heap ); +extern void radeonPrintGlobalLRU( radeonContextPtr rmesa, int heap ); +extern void radeonUpdateTexLRU(radeonContextPtr rmesa, radeonTexObjPtr t ); + +extern void radeonDDInitTextureFuncs( GLcontext *ctx ); + + +/* ================================================================ + * Color conversion macros: + */ + +#define RADEONPACKCOLOR332( r, g, b ) \ + (((r) & 0xe0) | (((g) & 0xe0) >> 3) | (((b) & 0xc0) >> 6)) + +#define RADEONPACKCOLOR1555( r, g, b, a ) \ + ((((r) & 0xf8) << 7) | (((g) & 0xf8) << 2) | (((b) & 0xf8) >> 3) | \ + ((a) ? 0x8000 : 0)) + +#define RADEONPACKCOLOR565( r, g, b ) \ + ((((r) & 0xf8) << 8) | (((g) & 0xfc) << 3) | (((b) & 0xf8) >> 3)) + +#define RADEONPACKCOLOR88( i, a ) \ + (((a) << 8) | (i)) + +#define RADEONPACKCOLOR888( r, g, b ) \ + (((r) << 16) | ((g) << 8) | (b)) + +#define RADEONPACKCOLOR8888( r, g, b, a ) \ + (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)) + +#define RADEONPACKCOLOR4444( r, g, b, a ) \ + ((((a) & 0xf0) << 8) | (((r) & 0xf0) << 4) | ((g) & 0xf0) | ((b) >> 4)) + +static __inline__ CARD32 radeonPackColor( GLuint cpp, + GLubyte r, GLubyte g, + GLubyte b, GLubyte a ) +{ + switch ( cpp ) { + case 2: + return RADEONPACKCOLOR565( r, g, b ); + case 4: + return RADEONPACKCOLOR8888( r, g, b, a ); + default: + return 0; + } +} + +#endif +#endif /* __RADEON_TEX_H__ */ Index: xc/lib/GL/mesa/src/drv/radeon/radeon_texmem.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_texmem.c:1.2 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_texmem.c Tue Apr 10 12:07:53 2001 @@ -0,0 +1,522 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_texmem.c,v 1.2 2001/04/10 16:07:53 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#include "radeon_context.h" +#include "radeon_state.h" +#include "radeon_ioctl.h" +#include "radeon_vb.h" +#include "radeon_tex.h" + +#include "mmath.h" +#include "simple_list.h" +#include "enums.h" +#include "mem.h" + + +/* Destroy hardware state associated with texture `t'. + */ +void radeonDestroyTexObj( radeonContextPtr rmesa, radeonTexObjPtr t ) +{ + GLint i; +#if ENABLE_PERF_BOXES + /* Bump the performace counter */ + rmesa->c_textureSwaps++; +#endif + if ( !t ) return; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_TEXTURE ) { + fprintf( stderr, "%s( %p, %p )\n", __FUNCTION__, t, t->tObj ); + } + + for ( i = 0 ; i < RADEON_MAX_TEXTURE_LEVELS ; i++ ) { + if ( t->image[i].data ) FREE( t->image[i].data ); + } + + if ( t->memBlock ) { + mmFreeMem( t->memBlock ); + t->memBlock = NULL; + } + + if ( t->tObj ) + t->tObj->DriverData = NULL; + + if ( t->bound & TEX_0 ) rmesa->CurrentTexObj[0] = NULL; + if ( t->bound & TEX_1 ) rmesa->CurrentTexObj[1] = NULL; + + remove_from_list( t ); + FREE( t ); +} + +/* Keep track of swapped out texture objects. + */ +void radeonSwapOutTexObj( radeonContextPtr rmesa, radeonTexObjPtr t ) +{ + if ( RADEON_DEBUG & DEBUG_VERBOSE_TEXTURE ) { + fprintf( stderr, "%s( %p, %p )\n", __FUNCTION__, t, t->tObj ); + } +#if ENABLE_PERF_BOXES + /* Bump the performace counter */ + rmesa->c_textureSwaps++; +#endif + if ( t->memBlock ) { + mmFreeMem( t->memBlock ); + t->memBlock = NULL; + } + + t->dirty_images = ~0; + move_to_tail( &rmesa->SwappedOut, t ); +} + +/* Print out debugging information about texture LRU. + */ +void radeonPrintLocalLRU( radeonContextPtr rmesa, int heap ) +{ + radeonTexObjPtr t; + int sz = 1 << (rmesa->radeonScreen->logTexGranularity[heap]); + + fprintf( stderr, "\nLocal LRU, heap %d:\n", heap ); + + foreach ( t, &rmesa->TexObjList[heap] ) { + if (!t->tObj) { + fprintf( stderr, "Placeholder %d at 0x%x sz 0x%x\n", + t->memBlock->ofs / sz, + t->memBlock->ofs, + t->memBlock->size ); + } else { + fprintf( stderr, "Texture (bound %d) at 0x%x sz 0x%x\n", + t->bound, + t->memBlock->ofs, + t->memBlock->size ); + } + } + + fprintf( stderr, "\n" ); +} + +void radeonPrintGlobalLRU( radeonContextPtr rmesa, int heap ) +{ + radeon_tex_region_t *list = rmesa->sarea->texList[heap]; + int i, j; + + fprintf( stderr, "\nGlobal LRU, heap %d list %p:\n", heap, list ); + + for ( i = 0, j = RADEON_NR_TEX_REGIONS ; i < RADEON_NR_TEX_REGIONS ; i++ ) { + fprintf( stderr, "list[%d] age %d next %d prev %d\n", + j, list[j].age, list[j].next, list[j].prev ); + j = list[j].next; + if ( j == RADEON_NR_TEX_REGIONS ) break; + } + + if ( j != RADEON_NR_TEX_REGIONS ) { + fprintf( stderr, "Loop detected in global LRU\n" ); + for ( i = 0 ; i < RADEON_NR_TEX_REGIONS ; i++ ) { + fprintf( stderr, "list[%d] age %d next %d prev %d\n", + i, list[i].age, list[i].next, list[i].prev ); + } + } + + fprintf( stderr, "\n" ); +} + +/* Reset the global texture LRU. + */ +static void radeonResetGlobalLRU( radeonContextPtr rmesa, int heap ) +{ + radeon_tex_region_t *list = rmesa->sarea->texList[heap]; + int sz = 1 << rmesa->radeonScreen->logTexGranularity[heap]; + int i; + + /* + * (Re)initialize the global circular LRU list. The last element in + * the array (RADEON_NR_TEX_REGIONS) is the sentinal. Keeping it at + * the end of the array allows it to be addressed rationally when + * looking up objects at a particular location in texture memory. + */ + for ( i = 0 ; (i+1) * sz <= rmesa->radeonScreen->texSize[heap] ; i++ ) { + list[i].prev = i-1; + list[i].next = i+1; + list[i].age = 0; + } + + i--; + list[0].prev = RADEON_NR_TEX_REGIONS; + list[i].prev = i-1; + list[i].next = RADEON_NR_TEX_REGIONS; + list[RADEON_NR_TEX_REGIONS].prev = i; + list[RADEON_NR_TEX_REGIONS].next = 0; + rmesa->sarea->texAge[heap] = 0; +} + +/* Update the local and glock texture LRUs. + */ +void radeonUpdateTexLRU( radeonContextPtr rmesa, radeonTexObjPtr t ) +{ + int heap = t->heap; + radeon_tex_region_t *list = rmesa->sarea->texList[heap]; + int sz = rmesa->radeonScreen->logTexGranularity[heap]; + int start = t->memBlock->ofs >> sz; + int end = (t->memBlock->ofs + t->memBlock->size-1) >> sz; + int i; + + rmesa->lastTexAge[heap] = ++rmesa->sarea->texAge[heap]; + + if ( !t->memBlock ) { + fprintf( stderr, "no memblock\n\n" ); + return; + } + + /* Update our local LRU */ + move_to_head( &rmesa->TexObjList[heap], t ); + + /* Update the global LRU */ + for ( i = start ; i <= end ; i++ ) { + list[i].in_use = 1; + list[i].age = rmesa->lastTexAge[heap]; + + /* remove_from_list(i) */ + list[(CARD32)list[i].next].prev = list[i].prev; + list[(CARD32)list[i].prev].next = list[i].next; + + /* insert_at_head(list, i) */ + list[i].prev = RADEON_NR_TEX_REGIONS; + list[i].next = list[RADEON_NR_TEX_REGIONS].next; + list[(CARD32)list[RADEON_NR_TEX_REGIONS].next].prev = i; + list[RADEON_NR_TEX_REGIONS].next = i; + } + + if ( 0 ) { + radeonPrintGlobalLRU( rmesa, t->heap ); + radeonPrintLocalLRU( rmesa, t->heap ); + } +} + +/* Update our notion of what textures have been changed since we last + * held the lock. This pertains to both our local textures and the + * textures belonging to other clients. Keep track of other client's + * textures by pushing a placeholder texture onto the LRU list -- these + * are denoted by (tObj == NULL). + */ +static void radeonTexturesGone( radeonContextPtr rmesa, int heap, + int offset, int size, int in_use ) +{ + radeonTexObjPtr t, tmp; + + foreach_s ( t, tmp, &rmesa->TexObjList[heap] ) { + if ( t->memBlock->ofs >= offset + size || + t->memBlock->ofs + t->memBlock->size <= offset ) + continue; + + /* It overlaps - kick it out. Need to hold onto the currently + * bound objects, however. + */ + radeonSwapOutTexObj( rmesa, t ); + } + + if ( in_use ) { + t = (radeonTexObjPtr) CALLOC( sizeof(*t) ); + if ( !t ) return; + + t->memBlock = mmAllocMem( rmesa->texHeap[heap], size, 0, offset ); + if ( !t->memBlock ) { + fprintf( stderr, "Couldn't alloc placeholder sz %x ofs %x\n", + (int)size, (int)offset ); + mmDumpMemInfo( rmesa->texHeap[heap] ); + return; + } + insert_at_head( &rmesa->TexObjList[heap], t ); + } +} + +/* Update our client's shared texture state. If another client has + * modified a region in which we have textures, then we need to figure + * out which of our textures has been removed, and update our global + * LRU. + */ +void radeonAgeTextures( radeonContextPtr rmesa, int heap ) +{ + RADEONSAREAPrivPtr sarea = rmesa->sarea; + + if ( sarea->texAge[heap] != rmesa->lastTexAge[heap] ) { + int sz = 1 << rmesa->radeonScreen->logTexGranularity[heap]; + int nr = 0; + int idx; + + for ( idx = sarea->texList[heap][RADEON_NR_TEX_REGIONS].prev ; + idx != RADEON_NR_TEX_REGIONS && nr < RADEON_NR_TEX_REGIONS ; + idx = sarea->texList[heap][idx].prev, nr++ ) + { + /* If switching texturing schemes, then the SAREA might not + * have been properly cleared, so we need to reset the + * global texture LRU. + */ + if ( idx * sz > rmesa->radeonScreen->texSize[heap] ) { + nr = RADEON_NR_TEX_REGIONS; + break; + } + + if ( sarea->texList[heap][idx].age > rmesa->lastTexAge[heap] ) { + radeonTexturesGone( rmesa, heap, idx * sz, sz, + sarea->texList[heap][idx].in_use ); + } + } + + if ( nr == RADEON_NR_TEX_REGIONS ) { + radeonTexturesGone( rmesa, heap, 0, + rmesa->radeonScreen->texSize[heap], 0 ); + radeonResetGlobalLRU( rmesa, heap ); + } + + rmesa->dirty |= (RADEON_UPLOAD_CONTEXT | + RADEON_UPLOAD_TEX0IMAGES | + RADEON_UPLOAD_TEX1IMAGES); + rmesa->lastTexAge[heap] = sarea->texAge[heap]; + } +} + + +/* ================================================================ + * Texture image uploads + */ + +/* Upload the texture image associated with texture `t' at level `level' + * at the address relative to `start'. + */ +static void radeonUploadSubImage( radeonContextPtr rmesa, + radeonTexObjPtr t, GLint level, + GLint x, GLint y, GLint width, GLint height ) +{ + struct gl_texture_image *texImage; + const struct gl_texture_format *texFormat; + GLint texelsPerDword = 0; + GLint imageX, imageY, imageWidth, imageHeight; + GLint blitX, blitY, blitWidth, blitHeight; + GLuint format, pitch, offset; + GLint ret; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_TEXTURE ) { + fprintf( stderr, "%s( %p, %p )\n", __FUNCTION__, t, t->tObj ); + } + + /* Ensure we have a valid texture to upload */ + texImage = t->tObj->Image[level]; + if ( !texImage ) { + if ( RADEON_DEBUG & DEBUG_VERBOSE_TEXTURE ) + fprintf( stderr, __FUNCTION__ ": texImage %d is NULL!\n", level ); + return; + } + if ( !t->image[level].data ) { + if ( RADEON_DEBUG & DEBUG_VERBOSE_TEXTURE ) + fprintf( stderr, __FUNCTION__ ": image data is NULL!\n" ); + return; + } + + texFormat = texImage->TexFormat; + + switch ( texFormat->TexelBytes ) { + case 1: + texelsPerDword = 4; + break; + case 2: + texelsPerDword = 2; + break; + case 4: + texelsPerDword = 1; + break; + } + + format = t->pp_txformat & RADEON_TXFORMAT_FORMAT_MASK; + + imageX = 0; + imageY = 0; + imageWidth = texImage->Width; + imageHeight = texImage->Height; + + blitX = t->image[level].x; + blitY = t->image[level].y; + blitWidth = t->image[level].width; + blitHeight = t->image[level].height; + + offset = t->bufAddr; + pitch = (t->image[0].width * texFormat->TexelBytes) / 64; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_MSG ) { + fprintf( stderr, " upload image: %d,%d at %d,%d\n", + imageWidth, imageHeight, imageX, imageY ); + fprintf( stderr, " upload blit: %d,%d at %d,%d\n", + blitWidth, blitHeight, blitX, blitY ); + fprintf( stderr, " blit ofs: 0x%07x pitch: 0x%x " + "level: %d format: %x\n", + (GLuint)offset, (GLuint)pitch, level, format ); + } + + ret = drmRadeonLoadTexture( rmesa->driFd, offset, pitch, format, + imageWidth, imageHeight, &t->image[level] ); + + if ( ret ) { + UNLOCK_HARDWARE( rmesa ); + fprintf( stderr, "drmRadeonTextureBlit: return = %d\n", ret ); + fprintf( stderr, " offset=0x%08x pitch=0x%x format=%d\n", + offset, pitch, format ); + fprintf( stderr, " image width=%d height=%d\n", + imageWidth, imageHeight ); + fprintf( stderr, " blit width=%d height=%d data=%p\n", + t->image[level].width, t->image[level].height, + t->image[level].data ); + exit( 1 ); + } + + rmesa->new_state |= RADEON_NEW_CONTEXT; + rmesa->dirty |= RADEON_UPLOAD_CONTEXT | RADEON_UPLOAD_MASKS; +} + +/* Upload the texture images associated with texture `t'. This might + * require removing our own and/or other client's texture objects to + * make room for these images. + */ +int radeonUploadTexImages( radeonContextPtr rmesa, radeonTexObjPtr t ) +{ + int i; + int heap; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_TEXTURE ) { + fprintf( stderr, "%s( %p, %p ) sz=%d\n", + __FUNCTION__, rmesa->glCtx, t->tObj, t->totalSize ); + } + + if ( !t || t->totalSize == 0 ) + return 0; + + /* Choose the heap appropriately */ + heap = t->heap = RADEON_CARD_HEAP; +#if 0 + if ( !rmesa->radeonScreen->IsPCI && + t->totalSize > rmesa->radeonScreen->texSize[heap] ) { + heap = t->heap = RADEON_AGP_HEAP; + } +#endif + + /* Do we need to eject LRU texture objects? */ + if ( !t->memBlock ) { + /* Allocate a memory block on a 4k boundary (1<<12 == 4096) */ + t->memBlock = mmAllocMem( rmesa->texHeap[heap], + t->totalSize, 12, 0 ); + +#if 0 + /* Try AGP before kicking anything out of local mem */ + if ( !t->memBlock && heap == RADEON_CARD_HEAP ) { + t->memBlock = mmAllocMem( rmesa->texHeap[RADEON_AGP_HEAP], + t->totalSize, 12, 0 ); + + if ( t->memBlock ) + heap = t->heap = RADEON_AGP_HEAP; + } +#endif + + /* Kick out textures until the requested texture fits */ + while ( !t->memBlock ) { + if ( rmesa->TexObjList[heap].prev->bound ) { + fprintf( stderr, + "radeonUploadTexImages: ran into bound texture\n" ); + return -1; + } + if ( rmesa->TexObjList[heap].prev == &rmesa->TexObjList[heap] ) { + if ( rmesa->radeonScreen->IsPCI ) { + fprintf( stderr, "radeonUploadTexImages: upload texture " + "failure on local texture heaps, sz=%d\n", + t->totalSize ); + return -1; +#if 0 + } else if ( heap == RADEON_CARD_HEAP ) { + heap = t->heap = RADEON_AGP_HEAP; + continue; +#endif + } else { + fprintf( stderr, "radeonUploadTexImages: upload texture " + "failure on both local and AGP texture heaps, " + "sz=%d\n", + t->totalSize ); + return -1; + } + } + + radeonSwapOutTexObj( rmesa, rmesa->TexObjList[heap].prev ); + + t->memBlock = mmAllocMem( rmesa->texHeap[heap], + t->totalSize, 12, 0 ); + } + + /* Set the base offset of the texture image */ + t->bufAddr = rmesa->radeonScreen->texOffset[heap] + t->memBlock->ofs; + + t->pp_txoffset = t->bufAddr; +#if 0 + /* Fix AGP texture offsets */ + if ( heap == RADEON_AGP_HEAP ) { + t->setup.pp_tx_offset += RADEON_AGP_TEX_OFFSET + + rmesa->radeonScreen->agpTexOffset; + } +#endif + + /* Force loading the new state into the hardware */ + if ( t->bound & TEX_0 ) { + rmesa->dirty |= RADEON_UPLOAD_CONTEXT | RADEON_UPLOAD_TEX0; + } + if ( t->bound & TEX_1 ) { + rmesa->dirty |= RADEON_UPLOAD_CONTEXT | RADEON_UPLOAD_TEX1; + } + } + + /* Let the world know we've used this memory recently */ + radeonUpdateTexLRU( rmesa, t ); + + /* Upload any images that are new */ + if ( t->dirty_images ) { + int levels = ((t->pp_txfilter & RADEON_MAX_MIP_LEVEL_MASK) >> + RADEON_MAX_MIP_LEVEL_SHIFT); + + for ( i = 0 ; i <= levels ; i++ ) { + if ( (t->dirty_images & (1 << i)) && t->image[i].data ) { + radeonUploadSubImage( rmesa, t, i, 0, 0, + t->image[i].width, t->image[i].height ); + } + } + + rmesa->dirty |= RADEON_UPLOAD_CONTEXT; + } + + t->dirty_images = 0; + return 0; +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_texobj.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_texobj.h:1.3 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_texobj.h Tue Apr 10 12:07:53 2001 @@ -0,0 +1,77 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_texobj.h,v 1.3 2001/04/10 16:07:53 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#ifndef __RADEON_TEXOBJ_H__ +#define __RADEON_TEXOBJ_H__ + +#include "radeon_sarea.h" +#include "mm.h" + +#define TEX_0 1 +#define TEX_1 2 + +typedef struct radeon_tex_obj radeonTexObj, *radeonTexObjPtr; + +/* Texture object in locally shared texture space. + */ +struct radeon_tex_obj { + radeonTexObjPtr next, prev; + + struct gl_texture_object *tObj; /* Mesa texture object */ + + PMemBlock memBlock; /* Memory block containing texture */ + GLuint bufAddr; /* Offset to start of locally + shared texture block */ + + GLuint dirty_images; /* Flags for whether or not + images need to be uploaded to + local or AGP texture space */ + + GLint bound; /* Texture unit currently bound to */ + GLint heap; /* Texture heap currently stored in */ + + drmRadeonTexImage image[RADEON_MAX_TEXTURE_LEVELS]; + + GLint totalSize; /* Total size of the texture + including all mipmap levels */ + + GLuint pp_txfilter; /* Hardware register values */ + GLuint pp_txformat; + GLuint pp_txoffset; + GLuint pp_border_color; +}; + +#endif /* __RADEON_TEXOBJ_H__ */ Index: xc/lib/GL/mesa/src/drv/radeon/radeon_texstate.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_texstate.c:1.1 --- /dev/null Mon Jun 4 12:37:36 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_texstate.c Wed Mar 21 11:14:25 2001 @@ -0,0 +1,1103 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_texstate.c,v 1.1 2001/03/21 16:14:25 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#include "radeon_context.h" +#include "radeon_state.h" +#include "radeon_ioctl.h" +#include "radeon_vb.h" +#include "radeon_tex.h" + +#include "mmath.h" +#include "simple_list.h" +#include "enums.h" +#include "mem.h" + +static void radeonSetTexImages( radeonContextPtr rmesa, + struct gl_texture_object *tObj ) +{ + radeonTexObjPtr t = (radeonTexObjPtr)tObj->DriverData; + struct gl_texture_image *texImage = tObj->Image[0]; + const struct gl_texture_format *texFormat = texImage->TexFormat; + GLint log2Width, log2Height, log2Size; + GLint totalSize; + GLint texelsPerDword = 0, blitWidth = 0, blitPitch = 0; + GLint x, y, width, height; + GLint i; + + /* Calculate dimensions in log domain. + */ + for ( i = 1, log2Height = 0 ; i < texImage->Height ; i *= 2 ) { + log2Height++; + } + for ( i = 1, log2Width = 0 ; i < texImage->Width ; i *= 2 ) { + log2Width++; + } + log2Size = MAX2( log2Width, log2Height ); + + /* The Radeon has a 64-byte minimum pitch for all blits. We + * calculate the equivalent number of texels to simplify the + * calculation of the texture image area. + */ + switch ( texFormat->TexelBytes ) { + case 4: + texelsPerDword = 1; + blitPitch = 16; + break; + case 2: + texelsPerDword = 2; + blitPitch = 32; + break; + case 1: + texelsPerDword = 4; + blitPitch = 64; + break; + } + + /* Select the larger of the two widths for our global texture image + * coordinate space. As the Radeon has very strict offset rules, we + * can't upload mipmaps directly and have to reference their location + * from the aligned start of the whole image. + */ + blitWidth = MAX2( texImage->Width, blitPitch ); + + /* Calculate mipmap offsets and dimensions. + */ + totalSize = 0; + x = 0; + y = 0; + + for ( i = 0 ; i <= log2Size ; i++ ) { + GLuint size; + + texImage = tObj->Image[i]; + if ( !texImage ) + break; + + width = texImage->Width; + height = texImage->Height; + + /* Texture images have a minimum pitch of 32 bytes (half of the + * 64-byte minimum pitch for blits). For images that have a + * width smaller than this, we must pad each texture image + * scanline out to this amount. + */ + if ( width < blitPitch / 2 ) { + width = blitPitch / 2; + } + + size = width * height * texFormat->TexelBytes; + totalSize += size; + ASSERT( (totalSize & 31) == 0 ); + + while ( width < blitWidth && height > 1 ) { + width *= 2; + height /= 2; + } + + t->image[i].x = x; + t->image[i].y = y; + + t->image[i].width = width; + t->image[i].height = height; + + /* While blits must have a pitch of at least 64 bytes, mipmaps + * must be aligned on a 32-byte boundary (just like each texture + * image scanline). + */ + if ( width >= blitWidth ) { + y += height; + } else { + x += width; + if ( x >= blitWidth ) { + x = 0; + y++; + } + } + + if ( 0 ) { + fprintf( stderr, "level=%d p=%d %dx%d -> %dx%d at (%d,%d)\n", + i, blitWidth, texImage->Width, texImage->Height, + t->image[i].width, t->image[i].height, + t->image[i].x, t->image[i].y ); + } + } + + /* Align the total size of texture memory block. + */ + t->totalSize = (totalSize + RADEON_OFFSET_MASK) & ~RADEON_OFFSET_MASK; + + /* Hardware state: + */ + t->pp_txfilter &= ~RADEON_MAX_MIP_LEVEL_MASK; + t->pp_txfilter |= i << RADEON_MAX_MIP_LEVEL_SHIFT; + + t->pp_txformat &= ~(RADEON_TXFORMAT_WIDTH_MASK | + RADEON_TXFORMAT_HEIGHT_MASK); + t->pp_txformat |= ((log2Width << RADEON_TXFORMAT_WIDTH_SHIFT) | + (log2Height << RADEON_TXFORMAT_HEIGHT_SHIFT)); +} + + +/* ================================================================ + * Texture combine functions + */ + +#define RADEON_DISABLE 0 +#define RADEON_REPLACE 1 +#define RADEON_MODULATE 2 +#define RADEON_DECAL 3 +#define RADEON_BLEND 4 +#define RADEON_ADD 5 +#define RADEON_MAX_COMBFUNC 6 + +static GLuint radeon_color_combine[][RADEON_MAX_COMBFUNC] = +{ + /* Unit 0: + */ + { + /* Disable combiner stage + */ + (RADEON_COLOR_ARG_A_ZERO | + RADEON_COLOR_ARG_B_ZERO | + RADEON_COLOR_ARG_C_CURRENT_COLOR | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_REPLACE = 0x00802800 + */ + (RADEON_COLOR_ARG_A_ZERO | + RADEON_COLOR_ARG_B_ZERO | + RADEON_COLOR_ARG_C_T0_COLOR | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_MODULATE = 0x00800142 + */ + (RADEON_COLOR_ARG_A_CURRENT_COLOR | + RADEON_COLOR_ARG_B_T0_COLOR | + RADEON_COLOR_ARG_C_ZERO | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_DECAL = 0x008c2d42 + */ + (RADEON_COLOR_ARG_A_CURRENT_COLOR | + RADEON_COLOR_ARG_B_T0_COLOR | + RADEON_COLOR_ARG_C_T0_ALPHA | + RADEON_BLEND_CTL_BLEND | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_BLEND = 0x008c2902 + */ + (RADEON_COLOR_ARG_A_CURRENT_COLOR | + RADEON_COLOR_ARG_B_TFACTOR_COLOR | + RADEON_COLOR_ARG_C_T0_COLOR | + RADEON_BLEND_CTL_BLEND | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_ADD = 0x00812802 + */ + (RADEON_COLOR_ARG_A_CURRENT_COLOR | + RADEON_COLOR_ARG_B_ZERO | + RADEON_COLOR_ARG_C_T0_COLOR | + RADEON_COMP_ARG_B | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + }, + + /* Unit 1: + */ + { + /* Disable combiner stage + */ + (RADEON_COLOR_ARG_A_ZERO | + RADEON_COLOR_ARG_B_ZERO | + RADEON_COLOR_ARG_C_CURRENT_COLOR | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_REPLACE = 0x00803000 + */ + (RADEON_COLOR_ARG_A_ZERO | + RADEON_COLOR_ARG_B_ZERO | + RADEON_COLOR_ARG_C_T1_COLOR | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_MODULATE = 0x00800182 + */ + (RADEON_COLOR_ARG_A_CURRENT_COLOR | + RADEON_COLOR_ARG_B_T1_COLOR | + RADEON_COLOR_ARG_C_ZERO | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_DECAL = 0x008c3582 + */ + (RADEON_COLOR_ARG_A_CURRENT_COLOR | + RADEON_COLOR_ARG_B_T1_COLOR | + RADEON_COLOR_ARG_C_T1_ALPHA | + RADEON_BLEND_CTL_BLEND | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_BLEND = 0x008c3102 + */ + (RADEON_COLOR_ARG_A_CURRENT_COLOR | + RADEON_COLOR_ARG_B_TFACTOR_COLOR | + RADEON_COLOR_ARG_C_T1_COLOR | + RADEON_BLEND_CTL_BLEND | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_ADD = 0x00813002 + */ + (RADEON_COLOR_ARG_A_CURRENT_COLOR | + RADEON_COLOR_ARG_B_ZERO | + RADEON_COLOR_ARG_C_T1_COLOR | + RADEON_COMP_ARG_B | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + }, + + /* Unit 2: + */ + { + /* Disable combiner stage + */ + (RADEON_COLOR_ARG_A_ZERO | + RADEON_COLOR_ARG_B_ZERO | + RADEON_COLOR_ARG_C_CURRENT_COLOR | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_REPLACE = 0x00803800 + */ + (RADEON_COLOR_ARG_A_ZERO | + RADEON_COLOR_ARG_B_ZERO | + RADEON_COLOR_ARG_C_T2_COLOR | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_MODULATE = 0x008001c2 + */ + (RADEON_COLOR_ARG_A_CURRENT_COLOR | + RADEON_COLOR_ARG_B_T2_COLOR | + RADEON_COLOR_ARG_C_ZERO | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_DECAL = 0x008c3dc2 + */ + (RADEON_COLOR_ARG_A_CURRENT_COLOR | + RADEON_COLOR_ARG_B_T2_COLOR | + RADEON_COLOR_ARG_C_T2_ALPHA | + RADEON_BLEND_CTL_BLEND | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_BLEND = 0x008c3902 + */ + (RADEON_COLOR_ARG_A_CURRENT_COLOR | + RADEON_COLOR_ARG_B_TFACTOR_COLOR | + RADEON_COLOR_ARG_C_T2_COLOR | + RADEON_BLEND_CTL_BLEND | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_ADD = 0x00813802 + */ + (RADEON_COLOR_ARG_A_CURRENT_COLOR | + RADEON_COLOR_ARG_B_ZERO | + RADEON_COLOR_ARG_C_T2_COLOR | + RADEON_COMP_ARG_B | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + } +}; + +static GLuint radeon_alpha_combine[][RADEON_MAX_COMBFUNC] = +{ + /* Unit 0: + */ + { + /* Disable combiner stage + */ + (RADEON_ALPHA_ARG_A_ZERO | + RADEON_ALPHA_ARG_B_ZERO | + RADEON_ALPHA_ARG_C_CURRENT_ALPHA | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_REPLACE = 0x00800500 + */ + (RADEON_ALPHA_ARG_A_ZERO | + RADEON_ALPHA_ARG_B_ZERO | + RADEON_ALPHA_ARG_C_T0_ALPHA | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_MODULATE = 0x00800051 + */ + (RADEON_ALPHA_ARG_A_CURRENT_ALPHA | + RADEON_ALPHA_ARG_B_T0_ALPHA | + RADEON_ALPHA_ARG_C_ZERO | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_DECAL = 0x00800100 + */ + (RADEON_ALPHA_ARG_A_ZERO | + RADEON_ALPHA_ARG_B_ZERO | + RADEON_ALPHA_ARG_C_CURRENT_ALPHA | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_BLEND = 0x00800051 + */ + (RADEON_ALPHA_ARG_A_CURRENT_ALPHA | + RADEON_ALPHA_ARG_B_TFACTOR_ALPHA | + RADEON_ALPHA_ARG_C_T0_ALPHA | + RADEON_BLEND_CTL_BLEND | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_ADD = 0x00800051 + */ + (RADEON_ALPHA_ARG_A_CURRENT_ALPHA | + RADEON_ALPHA_ARG_B_ZERO | + RADEON_ALPHA_ARG_C_T0_ALPHA | + RADEON_COMP_ARG_B | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + }, + + /* Unit 1: + */ + { + /* Disable combiner stage + */ + (RADEON_ALPHA_ARG_A_ZERO | + RADEON_ALPHA_ARG_B_ZERO | + RADEON_ALPHA_ARG_C_CURRENT_ALPHA | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_REPLACE = 0x00800600 + */ + (RADEON_ALPHA_ARG_A_ZERO | + RADEON_ALPHA_ARG_B_ZERO | + RADEON_ALPHA_ARG_C_T1_ALPHA | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_MODULATE = 0x00800061 + */ + (RADEON_ALPHA_ARG_A_CURRENT_ALPHA | + RADEON_ALPHA_ARG_B_T1_ALPHA | + RADEON_ALPHA_ARG_C_ZERO | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_DECAL = 0x00800100 + */ + (RADEON_ALPHA_ARG_A_ZERO | + RADEON_ALPHA_ARG_B_ZERO | + RADEON_ALPHA_ARG_C_CURRENT_ALPHA | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_BLEND = 0x00800061 + */ + (RADEON_ALPHA_ARG_A_CURRENT_ALPHA | + RADEON_ALPHA_ARG_B_TFACTOR_ALPHA | + RADEON_ALPHA_ARG_C_T1_ALPHA | + RADEON_BLEND_CTL_BLEND | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_ADD = 0x00800061 + */ + (RADEON_ALPHA_ARG_A_CURRENT_ALPHA | + RADEON_ALPHA_ARG_B_ZERO | + RADEON_ALPHA_ARG_C_T1_ALPHA | + RADEON_COMP_ARG_B | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + }, + + /* Unit 2: + */ + { + /* Disable combiner stage + */ + (RADEON_ALPHA_ARG_A_ZERO | + RADEON_ALPHA_ARG_B_ZERO | + RADEON_ALPHA_ARG_C_CURRENT_ALPHA | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_REPLACE = 0x00800700 + */ + (RADEON_ALPHA_ARG_A_ZERO | + RADEON_ALPHA_ARG_B_ZERO | + RADEON_ALPHA_ARG_C_T2_ALPHA | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_MODULATE = 0x00800071 + */ + (RADEON_ALPHA_ARG_A_CURRENT_ALPHA | + RADEON_ALPHA_ARG_B_T2_ALPHA | + RADEON_ALPHA_ARG_C_ZERO | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_DECAL = 0x00800100 + */ + (RADEON_ALPHA_ARG_A_ZERO | + RADEON_ALPHA_ARG_B_ZERO | + RADEON_ALPHA_ARG_C_CURRENT_ALPHA | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_BLEND = 0x00800071 + */ + (RADEON_ALPHA_ARG_A_CURRENT_ALPHA | + RADEON_ALPHA_ARG_B_TFACTOR_ALPHA | + RADEON_ALPHA_ARG_C_T2_ALPHA | + RADEON_BLEND_CTL_BLEND | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + + /* GL_ADD = 0x00800021 + */ + (RADEON_ALPHA_ARG_A_CURRENT_ALPHA | + RADEON_ALPHA_ARG_B_ZERO | + RADEON_ALPHA_ARG_C_T2_ALPHA | + RADEON_COMP_ARG_B | + RADEON_BLEND_CTL_ADD | + RADEON_SCALE_1X | + RADEON_CLAMP_TX), + } +}; + + +/* GL_EXT_texture_env_combine support + */ + +/* The color tables have combine functions for GL_SRC_COLOR, + * GL_ONE_MINUS_SRC_COLOR, GL_SRC_ALPHA and GL_ONE_MINUS_SRC_ALPHA. + */ +static GLuint radeon_texture_color[][RADEON_MAX_TEXTURE_UNITS] = +{ + { + RADEON_COLOR_ARG_A_T0_COLOR, + RADEON_COLOR_ARG_A_T1_COLOR, + RADEON_COLOR_ARG_A_T2_COLOR + }, + { + RADEON_COLOR_ARG_A_T0_COLOR | RADEON_COMP_ARG_A, + RADEON_COLOR_ARG_A_T1_COLOR | RADEON_COMP_ARG_A, + RADEON_COLOR_ARG_A_T2_COLOR | RADEON_COMP_ARG_A + }, + { + RADEON_COLOR_ARG_A_T0_ALPHA, + RADEON_COLOR_ARG_A_T1_ALPHA, + RADEON_COLOR_ARG_A_T2_ALPHA + }, + { + RADEON_COLOR_ARG_A_T0_ALPHA | RADEON_COMP_ARG_A, + RADEON_COLOR_ARG_A_T1_ALPHA | RADEON_COMP_ARG_A, + RADEON_COLOR_ARG_A_T2_ALPHA | RADEON_COMP_ARG_A + }, +}; + +static GLuint radeon_tfactor_color[] = +{ + RADEON_COLOR_ARG_A_TFACTOR_COLOR, + RADEON_COLOR_ARG_A_TFACTOR_COLOR | RADEON_COMP_ARG_A, + RADEON_COLOR_ARG_A_TFACTOR_ALPHA, + RADEON_COLOR_ARG_A_TFACTOR_ALPHA | RADEON_COMP_ARG_A +}; + +static GLuint radeon_primary_color[] = +{ + RADEON_COLOR_ARG_A_DIFFUSE_COLOR, + RADEON_COLOR_ARG_A_DIFFUSE_COLOR | RADEON_COMP_ARG_A, + RADEON_COLOR_ARG_A_DIFFUSE_ALPHA, + RADEON_COLOR_ARG_A_DIFFUSE_ALPHA | RADEON_COMP_ARG_A +}; + +static GLuint radeon_previous_color[] = +{ + RADEON_COLOR_ARG_A_CURRENT_COLOR, + RADEON_COLOR_ARG_A_CURRENT_COLOR | RADEON_COMP_ARG_A, + RADEON_COLOR_ARG_A_CURRENT_ALPHA, + RADEON_COLOR_ARG_A_CURRENT_ALPHA | RADEON_COMP_ARG_A +}; + +/* The alpha tables only have GL_SRC_ALPHA and GL_ONE_MINUS_SRC_ALPHA. + */ +static GLuint radeon_texture_alpha[][RADEON_MAX_TEXTURE_UNITS] = +{ + { + RADEON_ALPHA_ARG_A_T0_ALPHA, + RADEON_ALPHA_ARG_A_T1_ALPHA, + RADEON_ALPHA_ARG_A_T2_ALPHA + }, + { + RADEON_ALPHA_ARG_A_T0_ALPHA | RADEON_COMP_ARG_A, + RADEON_ALPHA_ARG_A_T1_ALPHA | RADEON_COMP_ARG_A, + RADEON_ALPHA_ARG_A_T2_ALPHA | RADEON_COMP_ARG_A + }, +}; + +static GLuint radeon_tfactor_alpha[] = +{ + RADEON_ALPHA_ARG_A_TFACTOR_ALPHA, + RADEON_ALPHA_ARG_A_TFACTOR_ALPHA | RADEON_COMP_ARG_A +}; + +static GLuint radeon_primary_alpha[] = +{ + RADEON_ALPHA_ARG_A_DIFFUSE_ALPHA, + RADEON_ALPHA_ARG_A_DIFFUSE_ALPHA | RADEON_COMP_ARG_A +}; + +static GLuint radeon_previous_alpha[] = +{ + RADEON_ALPHA_ARG_A_CURRENT_ALPHA, + RADEON_ALPHA_ARG_A_CURRENT_ALPHA | RADEON_COMP_ARG_A +}; + + +/* Extract the arg from slot A, shift it into the correct argument slot + * and set the corresponding complement bit. + */ +#define RADEON_COLOR_ARG( n, arg ) \ +do { \ + color_combine |= \ + ((color_arg[n] & RADEON_COLOR_ARG_MASK) \ + << RADEON_COLOR_ARG_##arg##_SHIFT); \ + color_combine |= \ + ((color_arg[n] >> RADEON_COMP_ARG_SHIFT) \ + << RADEON_COMP_ARG_##arg##_SHIFT); \ +} while (0) + +#define RADEON_ALPHA_ARG( n, arg ) \ +do { \ + alpha_combine |= \ + ((alpha_arg[n] & RADEON_ALPHA_ARG_MASK) \ + << RADEON_ALPHA_ARG_##arg##_SHIFT); \ + alpha_combine |= \ + ((alpha_arg[n] >> RADEON_COMP_ARG_SHIFT) \ + << RADEON_COMP_ARG_##arg##_SHIFT); \ +} while (0) + + +/* ================================================================ + * Texture unit state management + */ + +static void radeonUpdateTextureEnv( GLcontext *ctx, int unit ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + int source = rmesa->tmu_source[unit]; + struct gl_texture_object *tObj; + struct gl_texture_unit *texUnit; + GLuint enabled; + GLuint color_combine, alpha_combine; + GLuint color_arg[3], alpha_arg[3]; + GLuint i, numColorArgs = 0, numAlphaArgs = 0; + GLuint op; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_MSG ) { + fprintf( stderr, "%s( %p, %d )\n", + __FUNCTION__, ctx, unit ); + } + + enabled = (ctx->Texture.ReallyEnabled >> (source * 4)) & TEXTURE0_ANY; + if ( enabled != TEXTURE0_2D && enabled != TEXTURE0_1D ) + return; + + /* Only update the hardware texture state if the texture is current, + * complete and enabled. + */ + texUnit = &ctx->Texture.Unit[source]; + tObj = texUnit->Current; + if ( !tObj || !tObj->Complete ) + return; + + if ( ( tObj != texUnit->CurrentD[2] ) && + ( tObj != texUnit->CurrentD[1] ) ) + return; + + /* Set the texture environment state. Isn't this nice and clean? + * The Radeon will automagically set the texture alpha to 0xff when + * the texture format does not include an alpha component. This + * reduces the amount of special-casing we have to do, alpha-only + * textures being a notable exception. + */ + switch ( texUnit->EnvMode ) { + case GL_REPLACE: + switch ( tObj->Image[0]->Format ) { + case GL_RGBA: + case GL_RGB: + case GL_LUMINANCE: + case GL_LUMINANCE_ALPHA: + case GL_INTENSITY: + color_combine = radeon_color_combine[unit][RADEON_REPLACE]; + alpha_combine = radeon_alpha_combine[unit][RADEON_REPLACE]; + break; + case GL_ALPHA: + color_combine = radeon_color_combine[unit][RADEON_DISABLE]; + alpha_combine = radeon_alpha_combine[unit][RADEON_REPLACE]; + break; + case GL_COLOR_INDEX: + default: + return; + } + break; + + case GL_MODULATE: + switch ( tObj->Image[0]->Format ) { + case GL_RGBA: + case GL_RGB: + case GL_LUMINANCE: + case GL_LUMINANCE_ALPHA: + case GL_INTENSITY: + color_combine = radeon_color_combine[unit][RADEON_MODULATE]; + alpha_combine = radeon_alpha_combine[unit][RADEON_MODULATE]; + break; + case GL_ALPHA: + color_combine = radeon_color_combine[unit][RADEON_DISABLE]; + alpha_combine = radeon_alpha_combine[unit][RADEON_MODULATE]; + break; + case GL_COLOR_INDEX: + default: + return; + } + break; + + case GL_DECAL: + switch ( tObj->Image[0]->Format ) { + case GL_RGBA: + case GL_RGB: + color_combine = radeon_color_combine[unit][RADEON_DECAL]; + alpha_combine = radeon_alpha_combine[unit][RADEON_DISABLE]; + break; + case GL_ALPHA: + case GL_LUMINANCE: + case GL_LUMINANCE_ALPHA: + case GL_INTENSITY: + color_combine = radeon_color_combine[unit][RADEON_DISABLE]; + alpha_combine = radeon_alpha_combine[unit][RADEON_DISABLE]; + break; + case GL_COLOR_INDEX: + default: + return; + } + break; + + case GL_BLEND: + switch ( tObj->Image[0]->Format ) { + case GL_RGBA: + case GL_RGB: + case GL_LUMINANCE: + case GL_LUMINANCE_ALPHA: + color_combine = radeon_color_combine[unit][RADEON_BLEND]; + alpha_combine = radeon_alpha_combine[unit][RADEON_MODULATE]; + break; + case GL_ALPHA: + color_combine = radeon_color_combine[unit][RADEON_DISABLE]; + alpha_combine = radeon_alpha_combine[unit][RADEON_MODULATE]; + break; + case GL_INTENSITY: + color_combine = radeon_color_combine[unit][RADEON_BLEND]; + alpha_combine = radeon_alpha_combine[unit][RADEON_BLEND]; + break; + case GL_COLOR_INDEX: + default: + return; + } + break; + + case GL_ADD: + switch ( tObj->Image[0]->Format ) { + case GL_RGBA: + case GL_RGB: + case GL_LUMINANCE: + case GL_LUMINANCE_ALPHA: + color_combine = radeon_color_combine[unit][RADEON_ADD]; + alpha_combine = radeon_alpha_combine[unit][RADEON_MODULATE]; + break; + case GL_ALPHA: + color_combine = radeon_color_combine[unit][RADEON_DISABLE]; + alpha_combine = radeon_alpha_combine[unit][RADEON_MODULATE]; + break; + case GL_INTENSITY: + color_combine = radeon_color_combine[unit][RADEON_ADD]; + alpha_combine = radeon_alpha_combine[unit][RADEON_ADD]; + break; + case GL_COLOR_INDEX: + default: + return; + } + break; + + case GL_COMBINE_EXT: + /* Step 0: + * Calculate how many arguments we need to process. + */ + switch ( texUnit->CombineModeRGB ) { + case GL_REPLACE: + numColorArgs = 1; + break; + case GL_MODULATE: + case GL_ADD: + case GL_ADD_SIGNED_EXT: + case GL_DOT3_RGB_EXT: + case GL_DOT3_RGBA_EXT: + numColorArgs = 2; + break; + case GL_INTERPOLATE_EXT: + numColorArgs = 3; + break; + default: + return; + } + + switch ( texUnit->CombineModeA ) { + case GL_REPLACE: + numAlphaArgs = 1; + break; + case GL_MODULATE: + case GL_ADD: + case GL_ADD_SIGNED_EXT: + numAlphaArgs = 2; + break; + case GL_INTERPOLATE_EXT: + numAlphaArgs = 3; + break; + default: + return; + } + + /* Step 1: + * Extract the color and alpha combine function arguments. + */ + for ( i = 0 ; i < numColorArgs ; i++ ) { + op = texUnit->CombineOperandRGB[i] - GL_SRC_COLOR; + switch ( texUnit->CombineSourceRGB[i] ) { + case GL_TEXTURE: + color_arg[i] = radeon_texture_color[op][unit]; + break; + case GL_CONSTANT_EXT: + color_arg[i] = radeon_tfactor_color[op]; + break; + case GL_PRIMARY_COLOR_EXT: + color_arg[i] = radeon_primary_color[op]; + break; + case GL_PREVIOUS_EXT: + color_arg[i] = radeon_previous_color[op]; + break; + default: + return; + } + } + + for ( i = 0 ; i < numAlphaArgs ; i++ ) { + op = texUnit->CombineOperandA[i] - GL_SRC_ALPHA; + switch ( texUnit->CombineSourceA[i] ) { + case GL_TEXTURE: + alpha_arg[i] = radeon_texture_alpha[op][unit]; + break; + case GL_CONSTANT_EXT: + alpha_arg[i] = radeon_tfactor_alpha[op]; + break; + case GL_PRIMARY_COLOR_EXT: + alpha_arg[i] = radeon_primary_alpha[op]; + break; + case GL_PREVIOUS_EXT: + alpha_arg[i] = radeon_previous_alpha[op]; + break; + default: + return; + } + } + + /* Step 2: + * Build up the color and alpha combine functions. + */ + switch ( texUnit->CombineModeRGB ) { + case GL_REPLACE: + color_combine = (RADEON_COLOR_ARG_A_ZERO | + RADEON_COLOR_ARG_B_ZERO | + RADEON_BLEND_CTL_ADD | + RADEON_CLAMP_TX); + RADEON_COLOR_ARG( 0, C ); + break; + case GL_MODULATE: + color_combine = (RADEON_COLOR_ARG_C_ZERO | + RADEON_BLEND_CTL_ADD | + RADEON_CLAMP_TX); + RADEON_COLOR_ARG( 0, A ); + RADEON_COLOR_ARG( 1, B ); + break; + case GL_ADD: + color_combine = (RADEON_COLOR_ARG_B_ZERO | + RADEON_COMP_ARG_B | + RADEON_BLEND_CTL_ADD | + RADEON_CLAMP_TX); + RADEON_COLOR_ARG( 0, A ); + RADEON_COLOR_ARG( 1, C ); + break; + case GL_ADD_SIGNED_EXT: + color_combine = (RADEON_COLOR_ARG_B_ZERO | + RADEON_COMP_ARG_B | + RADEON_BLEND_CTL_ADDSIGNED | + RADEON_CLAMP_TX); + RADEON_COLOR_ARG( 0, A ); + RADEON_COLOR_ARG( 1, C ); + break; + case GL_INTERPOLATE_EXT: + color_combine = (RADEON_BLEND_CTL_BLEND | + RADEON_CLAMP_TX); + RADEON_COLOR_ARG( 0, B ); + RADEON_COLOR_ARG( 1, A ); + RADEON_COLOR_ARG( 2, C ); + break; + case GL_DOT3_RGB_EXT: + case GL_DOT3_RGBA_EXT: + color_combine = (RADEON_COLOR_ARG_C_ZERO | + RADEON_BLEND_CTL_DOT3 | + RADEON_CLAMP_TX); + RADEON_COLOR_ARG( 0, A ); + RADEON_COLOR_ARG( 1, B ); + break; + default: + return; + } + + switch ( texUnit->CombineModeA ) { + case GL_REPLACE: + alpha_combine = (RADEON_ALPHA_ARG_A_ZERO | + RADEON_ALPHA_ARG_B_ZERO | + RADEON_BLEND_CTL_ADD | + RADEON_CLAMP_TX); + RADEON_ALPHA_ARG( 0, C ); + break; + case GL_MODULATE: + alpha_combine = (RADEON_ALPHA_ARG_C_ZERO | + RADEON_BLEND_CTL_ADD | + RADEON_CLAMP_TX); + RADEON_ALPHA_ARG( 0, A ); + RADEON_ALPHA_ARG( 1, B ); + break; + case GL_ADD: + alpha_combine = (RADEON_ALPHA_ARG_B_ZERO | + RADEON_COMP_ARG_B | + RADEON_BLEND_CTL_ADD | + RADEON_CLAMP_TX); + RADEON_ALPHA_ARG( 0, A ); + RADEON_ALPHA_ARG( 1, C ); + break; + case GL_ADD_SIGNED_EXT: + alpha_combine = (RADEON_ALPHA_ARG_B_ZERO | + RADEON_COMP_ARG_B | + RADEON_BLEND_CTL_ADDSIGNED | + RADEON_CLAMP_TX); + RADEON_ALPHA_ARG( 0, A ); + RADEON_ALPHA_ARG( 1, C ); + break; + case GL_INTERPOLATE_EXT: + alpha_combine = (RADEON_BLEND_CTL_BLEND | + RADEON_CLAMP_TX); + RADEON_ALPHA_ARG( 0, B ); + RADEON_ALPHA_ARG( 1, A ); + RADEON_ALPHA_ARG( 2, C ); + break; + default: + return; + } + + if ( texUnit->CombineModeRGB == GL_DOT3_RGB_EXT ) { + alpha_combine |= RADEON_DOT_ALPHA_DONT_REPLICATE; + } + + /* Step 3: + * Apply the scale factor. The EXT extension has a somewhat + * unnecessary restriction that the scale must be 4x. The ARB + * extension will likely drop this and we can just apply the + * scale factors regardless. + */ + if ( texUnit->CombineModeRGB != GL_DOT3_RGB_EXT && + texUnit->CombineModeRGB != GL_DOT3_RGBA_EXT ) { + color_combine |= (texUnit->CombineScaleShiftRGB << 21); + alpha_combine |= (texUnit->CombineScaleShiftA << 21); + } else { + color_combine |= RADEON_SCALE_4X; + alpha_combine |= RADEON_SCALE_4X; + } + + /* All done! + */ + break; + + default: + return; + } + + rmesa->color_combine[source] = color_combine; + rmesa->alpha_combine[source] = alpha_combine; +} + +static void radeonUpdateTextureObject( GLcontext *ctx, int unit ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + int source = rmesa->tmu_source[unit]; + struct gl_texture_object *tObj; + radeonTexObjPtr t; + GLuint enabled; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_MSG ) { + fprintf( stderr, "%s( %p, %d )\n", + __FUNCTION__, ctx, unit ); + } + + enabled = (ctx->Texture.ReallyEnabled >> (source * 4)) & TEXTURE0_ANY; + if ( enabled != TEXTURE0_2D && enabled != TEXTURE0_1D ) { + if ( enabled ) + rmesa->Fallback |= RADEON_FALLBACK_TEXTURE; + return; + } + + /* Only update the hardware texture state if the texture is current, + * complete and enabled. + */ + tObj = ctx->Texture.Unit[source].Current; + if ( !tObj || !tObj->Complete ) + return; + + if ( ( tObj != ctx->Texture.Unit[source].CurrentD[2] ) && + ( tObj != ctx->Texture.Unit[source].CurrentD[1] ) ) + return; + + /* We definately have a valid texture now */ + t = tObj->DriverData; + + /* Force the texture unit state to be loaded into the hardware */ + rmesa->dirty |= RADEON_UPLOAD_CONTEXT | (RADEON_UPLOAD_TEX0 << unit); + + /* Force any texture images to be loaded into the hardware */ + if ( t->dirty_images ) { + if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, " t->dirty_images = 0x%x\n", t->dirty_images ); + } + radeonSetTexImages( rmesa, tObj ); + rmesa->dirty |= (RADEON_UPLOAD_TEX0IMAGES << unit); + } + + if ( t->memBlock ) + radeonUpdateTexLRU( rmesa, t ); + + switch ( unit ) { + case 0: + rmesa->setup.pp_cntl |= (RADEON_TEX_0_ENABLE | + RADEON_TEX_BLEND_0_ENABLE); + break; + case 1: + rmesa->setup.pp_cntl |= (RADEON_TEX_1_ENABLE | + RADEON_TEX_BLEND_1_ENABLE); + break; + } +} + +void radeonUpdateTextureState( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s( %p ) en=0x%x\n", + __FUNCTION__, ctx, ctx->Texture.ReallyEnabled ); + } + + /* Clear any texturing fallbacks */ + rmesa->Fallback &= ~RADEON_FALLBACK_TEXTURE; + + /* Disable all texturing until it is known to be good */ + rmesa->setup.pp_cntl &= ~(RADEON_TEX_ENABLE_MASK | + RADEON_TEX_BLEND_ENABLE_MASK); + + radeonUpdateTextureObject( ctx, 0 ); + radeonUpdateTextureEnv( ctx, 0 ); + + if ( rmesa->multitex ) { + radeonUpdateTextureObject( ctx, 1 ); + radeonUpdateTextureEnv( ctx, 1 ); + } + + rmesa->dirty |= RADEON_UPLOAD_CONTEXT; +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_tris.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_tris.c:1.2 --- /dev/null Mon Jun 4 12:37:37 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_tris.c Wed Mar 21 11:14:25 2001 @@ -0,0 +1,225 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_tris.c,v 1.2 2001/03/21 16:14:25 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#include "radeon_context.h" +#include "radeon_ioctl.h" +#include "radeon_vb.h" +#include "radeon_tris.h" +#include "radeon_state.h" + +#include "pipeline.h" +#include "vbindirect.h" + +static struct { + points_func points; + line_func line; + triangle_func triangle; + quad_func quad; +} rast_tab[RADEON_MAX_TRIFUNC]; + +#define RADEON_COLOR( to, from ) \ +do { \ + *(GLuint *)(to) = *(GLuint *)(from); \ +} while (0) + +#define RADEON_COLOR3( to, from ) \ +do { \ + (to)[0] = (from)[2]; \ + (to)[1] = (from)[1]; \ + (to)[2] = (from)[0]; \ +} while (0) + + +static void radeon_null_quad( GLcontext *ctx, GLuint v0, + GLuint v1, GLuint v2, GLuint v3, GLuint pv ) +{ +} +static void radeon_null_triangle( GLcontext *ctx, GLuint v0, + GLuint v1, GLuint v2, GLuint pv ) +{ +} +static void radeon_null_line( GLcontext *ctx, + GLuint v1, GLuint v2, GLuint pv ) +{ +} +static void radeon_null_points( GLcontext *ctx, GLuint first, GLuint last ) +{ +} + +static void radeonPrintRenderState( const char *msg, GLuint state ) +{ + fprintf( stderr, "%s: (0x%x) %s%s%s%s%s\n", + msg, state, + (state & RADEON_FLAT_BIT) ? "flat, " : "", + (state & RADEON_OFFSET_BIT) ? "offset, " : "", + (state & RADEON_TWOSIDE_BIT) ? "twoside, " : "", + (state & RADEON_NODRAW_BIT) ? "no-draw, " : "", + (state & RADEON_FALLBACK_BIT) ? "fallback" : "" ); +} + +#define IND (0) +#define TAG(x) x +#include "radeon_tritmp.h" + +#define IND (RADEON_FLAT_BIT) +#define TAG(x) x##_flat +#include "radeon_tritmp.h" + +#define IND (RADEON_OFFSET_BIT) +#define TAG(x) x##_offset +#include "radeon_tritmp.h" + +#define IND (RADEON_OFFSET_BIT | RADEON_FLAT_BIT) +#define TAG(x) x##_offset_flat +#include "radeon_tritmp.h" + +#define IND (RADEON_TWOSIDE_BIT) +#define TAG(x) x##_twoside +#include "radeon_tritmp.h" + +#define IND (RADEON_TWOSIDE_BIT | RADEON_FLAT_BIT) +#define TAG(x) x##_twoside_flat +#include "radeon_tritmp.h" + +#define IND (RADEON_TWOSIDE_BIT | RADEON_OFFSET_BIT) +#define TAG(x) x##_twoside_offset +#include "radeon_tritmp.h" + +#define IND (RADEON_TWOSIDE_BIT | RADEON_OFFSET_BIT | RADEON_FLAT_BIT) +#define TAG(x) x##_twoside_offset_flat +#include "radeon_tritmp.h" + + +void radeonDDTriangleFuncsInit( void ) +{ + GLint i; + + init(); + init_flat(); + init_offset(); + init_offset_flat(); + init_twoside(); + init_twoside_flat(); + init_twoside_offset(); + init_twoside_offset_flat(); + + for ( i = 0 ; i < RADEON_MAX_TRIFUNC ; i++ ) { + if ( i & RADEON_NODRAW_BIT ) { + rast_tab[i].points = radeon_null_points; + rast_tab[i].line = radeon_null_line; + rast_tab[i].triangle = radeon_null_triangle; + rast_tab[i].quad = radeon_null_quad; + } + } +} + + +/* FIXME: Only enable software fallback for stencil in 16 bpp mode after + * we have hardware stencil support. + */ +#define ALL_FALLBACK (DD_SELECT | DD_FEEDBACK | DD_STENCIL) +#define POINT_FALLBACK (ALL_FALLBACK | DD_POINT_SMOOTH | DD_POINT_ATTEN) +#define LINE_FALLBACK (ALL_FALLBACK | DD_LINE_SMOOTH | DD_LINE_STIPPLE) +#define TRI_FALLBACK (ALL_FALLBACK | DD_TRI_SMOOTH | DD_TRI_UNFILLED) +#define ANY_FALLBACK (POINT_FALLBACK | LINE_FALLBACK | TRI_FALLBACK) +#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE | DD_TRI_OFFSET | DD_Z_NEVER) + +/* Setup the Point, Line, Triangle and Quad functions based on the + * current rendering state. Wherever possible, use the hardware to + * render the primitive. Otherwise, fallback to software rendering. + */ +void radeonDDChooseRenderState( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint flags = ctx->TriangleCaps; + GLuint index = 0; + + if ( rmesa->Fallback ) { + rmesa->RenderIndex = RADEON_FALLBACK_BIT; + /* fixes vorder.c failure: */ + if (flags & DD_TRI_LIGHT_TWOSIDE) { + rmesa->IndirectTriangles = DD_TRI_LIGHT_TWOSIDE; + } + return; + } + + if ( flags & ANY_RASTER_FLAGS ) { + if ( flags & DD_FLATSHADE ) index |= RADEON_FLAT_BIT; + if ( flags & DD_TRI_LIGHT_TWOSIDE ) index |= RADEON_TWOSIDE_BIT; + if ( flags & DD_TRI_OFFSET ) index |= RADEON_OFFSET_BIT; + if ( flags & DD_Z_NEVER ) index |= RADEON_NODRAW_BIT; + } + + rmesa->PointsFunc = rast_tab[index].points; + rmesa->LineFunc = rast_tab[index].line; + rmesa->TriangleFunc = rast_tab[index].triangle; + rmesa->QuadFunc = rast_tab[index].quad; + + rmesa->RenderIndex = index; + rmesa->IndirectTriangles = 0; + + if ( flags & ANY_FALLBACK ) { + if ( flags & POINT_FALLBACK ) { + rmesa->RenderIndex |= RADEON_FALLBACK_BIT; + rmesa->PointsFunc = 0; + rmesa->IndirectTriangles |= DD_POINT_SW_RASTERIZE; + } + + if ( flags & LINE_FALLBACK ) { + rmesa->RenderIndex |= RADEON_FALLBACK_BIT; + rmesa->LineFunc = 0; + rmesa->IndirectTriangles |= DD_LINE_SW_RASTERIZE; + } + + if ( flags & TRI_FALLBACK ) { + rmesa->RenderIndex |= RADEON_FALLBACK_BIT; + rmesa->TriangleFunc = 0; + rmesa->QuadFunc = 0; + rmesa->IndirectTriangles |= (DD_TRI_SW_RASTERIZE | + DD_QUAD_SW_RASTERIZE); + } + + /* fixes vorder.c failure: */ + if (flags & DD_TRI_LIGHT_TWOSIDE) { + rmesa->IndirectTriangles |= DD_TRI_LIGHT_TWOSIDE; + } + } + + if ( 0 ) { + gl_print_tri_caps( "tricaps", ctx->TriangleCaps ); + radeonPrintRenderState( "radeon render state", rmesa->RenderIndex ); + } +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_tris.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_tris.h:1.2 --- /dev/null Mon Jun 4 12:37:37 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_tris.h Wed Mar 21 11:14:25 2001 @@ -0,0 +1,341 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_tris.h,v 1.2 2001/03/21 16:14:25 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#ifndef __RADEON_TRIS_H__ +#define __RADEON_TRIS_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "radeon_vb.h" + +extern void radeonDDChooseRenderState( GLcontext *ctx ); +extern void radeonDDTriangleFuncsInit( void ); + +#define RADEON_ANTIALIAS_BIT 0x00 /* GH: Do we need this? */ +#define RADEON_FLAT_BIT 0x01 +#define RADEON_OFFSET_BIT 0x02 +#define RADEON_TWOSIDE_BIT 0x04 +#define RADEON_NODRAW_BIT 0x08 +#define RADEON_FALLBACK_BIT 0x10 +#define RADEON_MAX_TRIFUNC 0x20 + + +static __inline void radeon_draw_triangle( radeonContextPtr rmesa, + radeonVertexPtr v0, + radeonVertexPtr v1, + radeonVertexPtr v2 ) +{ + GLuint vertsize = rmesa->vertsize; + CARD32 *vb = radeonAllocVerticesInline( rmesa, 3 ); + GLuint j; + +#if defined (USE_X86_ASM) + /* GH: We can safely assume the vertex stride is some number of + * dwords, and thus a "rep movsd" is okay. The vb pointer is + * automagically updated with this instruction, so we don't have + * to manually take care of incrementing it. + */ + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "D" ((long)vb), "S" ((long)v0) + : "memory" ); + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "S" ((long)v1) + : "memory" ); + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "S" ((long)v2) + : "memory" ); +#else + for ( j = 0 ; j < vertsize ; j++ ) + vb[j] = v0->ui[j]; + + vb += vertsize; + for ( j = 0 ; j < vertsize ; j++ ) + vb[j] = v1->ui[j]; + + vb += vertsize; + for ( j = 0 ; j < vertsize ; j++ ) + vb[j] = v2->ui[j]; +#endif +} + +static __inline void radeon_draw_quad( radeonContextPtr rmesa, + radeonVertexPtr v0, + radeonVertexPtr v1, + radeonVertexPtr v2, + radeonVertexPtr v3 ) +{ + GLuint vertsize = rmesa->vertsize; + CARD32 *vb = radeonAllocVerticesInline( rmesa, 6 ); + GLuint j; + +#if defined (USE_X86_ASM) + /* GH: We can safely assume the vertex stride is some number of + * dwords, and thus a "rep movsd" is okay. The vb pointer is + * automagically updated with this instruction, so we don't have + * to manually take care of incrementing it. + */ + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "D" ((long)vb), "S" ((long)v0) + : "memory" ); + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "S" ((long)v1) + : "memory" ); + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "S" ((long)v3) + : "memory" ); + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "S" ((long)v1) + : "memory" ); + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "S" ((long)v2) + : "memory" ); + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "S" ((long)v3) + : "memory" ); +#else + for ( j = 0 ; j < vertsize ; j++ ) + vb[j] = v0->ui[j]; + + vb += vertsize; + for ( j = 0 ; j < vertsize ; j++ ) + vb[j] = v1->ui[j]; + + vb += vertsize; + for ( j = 0 ; j < vertsize ; j++ ) + vb[j] = v3->ui[j]; + + vb += vertsize; + for ( j = 0 ; j < vertsize ; j++ ) + vb[j] = v1->ui[j]; + + vb += vertsize; + for ( j = 0 ; j < vertsize ; j++ ) + vb[j] = v2->ui[j]; + + vb += vertsize; + for ( j = 0 ; j < vertsize ; j++ ) + vb[j] = v3->ui[j]; +#endif +} + +static __inline void radeon_draw_line( radeonContextPtr rmesa, + radeonVertexPtr tmp0, + radeonVertexPtr tmp1, + GLfloat width ) +{ +#if 1 + GLuint vertsize = rmesa->vertsize; + CARD32 *vb = radeonAllocVerticesInline( rmesa, 6 ); + GLfloat hw, dx, dy, ix, iy; + GLuint j; + GLfloat x0 = tmp0->v.x; + GLfloat y0 = tmp0->v.y; + GLfloat x1 = tmp1->v.x; + GLfloat y1 = tmp1->v.y; + + hw = 0.5F * width; + if (hw > 0.1F && hw < 0.5F) { + hw = 0.5F; + } + + /* adjust vertices depending on line direction */ + dx = tmp0->v.x - tmp1->v.x; + dy = tmp0->v.y - tmp1->v.y; + if (dx * dx > dy * dy) { + /* X-major line */ + ix = 0.0F; + iy = hw; + if (x1 < x0) { + x0 += 0.5F; + x1 += 0.5F; + } + y0 -= 0.5F; + y1 -= 0.5F; + } + else { + /* Y-major line */ + ix = hw; + iy = 0.0F; + if (y1 > y0) { + y0 -= 0.5F; + y1 -= 0.5F; + } + x0 += 0.5F; + x1 += 0.5F; + } + + *(float *)&vb[0] = x0 - ix; + *(float *)&vb[1] = y0 - iy; + for (j = 2 ; j < vertsize ; j++) + vb[j] = tmp0->ui[j]; + vb += vertsize; + + *(float *)&vb[0] = x1 + ix; + *(float *)&vb[1] = y1 + iy; + for (j = 2 ; j < vertsize ; j++) + vb[j] = tmp1->ui[j]; + vb += vertsize; + + *(float *)&vb[0] = x0 + ix; + *(float *)&vb[1] = y0 + iy; + for (j = 2 ; j < vertsize ; j++) + vb[j] = tmp0->ui[j]; + vb += vertsize; + + *(float *)&vb[0] = x0 - ix; + *(float *)&vb[1] = y0 - iy; + for (j = 2 ; j < vertsize ; j++) + vb[j] = tmp0->ui[j]; + vb += vertsize; + + *(float *)&vb[0] = x1 - ix; + *(float *)&vb[1] = y1 - iy; + for (j = 2 ; j < vertsize ; j++) + vb[j] = tmp1->ui[j]; + vb += vertsize; + + *(float *)&vb[0] = x1 + ix; + *(float *)&vb[1] = y1 + iy; + for (j = 2 ; j < vertsize ; j++) + vb[j] = tmp1->ui[j]; +#else + GLuint vertsize = rmesa->vertsize; + CARD32 *vb = radeonAllocVerticesInline( rmesa, RADEON_LINES, 2 ); + GLuint j; + +#if defined (USE_X86_ASM) + /* GH: We can safely assume the vertex stride is some number of + * dwords, and thus a "rep movsd" is okay. The vb pointer is + * automagically updated with this instruction, so we don't have + * to manually take care of incrementing it. + */ + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "D" ((long)vb), "S" ((long)tmp0) + : "memory" ); + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "S" ((long)tmp1) + : "memory" ); +#else + for ( j = 0 ; j < vertsize ; j++ ) + vb[j] = tmp0->ui[j]; + + vb += vertsize; + for ( j = 0 ; j < vertsize ; j++ ) + vb[j] = tmp1->ui[j]; +#endif +#endif +} + +static __inline void radeon_draw_point( radeonContextPtr rmesa, + radeonVertexPtr tmp, GLfloat sz ) +{ +#if 1 + GLuint vertsize = rmesa->vertsize; + CARD32 *vb = radeonAllocVerticesInline( rmesa, 6 ); + GLuint j; + const float x = tmp->v.x + PNT_X_OFFSET; + const float y = tmp->v.y + PNT_Y_OFFSET; + + *(float *)&vb[0] = x - sz; + *(float *)&vb[1] = y - sz; + for (j = 2 ; j < vertsize ; j++) + vb[j] = tmp->ui[j]; + vb += vertsize; + + *(float *)&vb[0] = x + sz; + *(float *)&vb[1] = y - sz; + for (j = 2 ; j < vertsize ; j++) + vb[j] = tmp->ui[j]; + vb += vertsize; + + *(float *)&vb[0] = x + sz; + *(float *)&vb[1] = y + sz; + for (j = 2 ; j < vertsize ; j++) + vb[j] = tmp->ui[j]; + vb += vertsize; + + *(float *)&vb[0] = x + sz; + *(float *)&vb[1] = y + sz; + for (j = 2 ; j < vertsize ; j++) + vb[j] = tmp->ui[j]; + vb += vertsize; + + *(float *)&vb[0] = x - sz; + *(float *)&vb[1] = y + sz; + for (j = 2 ; j < vertsize ; j++) + vb[j] = tmp->ui[j]; + vb += vertsize; + + *(float *)&vb[0] = x - sz; + *(float *)&vb[1] = y - sz; + for (j = 2 ; j < vertsize ; j++) + vb[j] = tmp->ui[j]; + +#else + int vertsize = rmesa->vertsize; + CARD32 *vb = radeonAllocVerticesInline( rmesa, RADEON_3_VERTEX_POINTS, 1 ); + int j; + +#if defined (USE_X86_ASM) + /* GH: We can safely assume the vertex stride is some number of + * dwords, and thus a "rep movsd" is okay. The vb pointer is + * automagically updated with this instruction, so we don't have + * to manually take care of incrementing it. + */ + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "D" ((long)vb), "S" ((long)tmp) + : "memory" ); +#else + for ( j = 0 ; j < vertsize ; j++ ) + vb[j] = tmp->ui[j]; +#endif +#endif +} + +#endif +#endif /* __RADEON_TRIS_H__ */ Index: xc/lib/GL/mesa/src/drv/radeon/radeon_tritmp.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_tritmp.h:1.2 --- /dev/null Mon Jun 4 12:37:37 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_tritmp.h Wed Mar 21 11:14:25 2001 @@ -0,0 +1,349 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_tritmp.h,v 1.2 2001/03/21 16:14:25 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +static __inline void TAG(triangle)( GLcontext *ctx, + GLuint e0, GLuint e1, GLuint e2, + GLuint pv ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + struct vertex_buffer *VB = ctx->VB; + radeonVertexPtr verts = RADEON_DRIVER_DATA(VB)->verts; + radeonVertexPtr v[3]; + +#if (IND & RADEON_OFFSET_BIT) + GLfloat offset; + GLfloat z[3]; +#endif + +#if (IND & RADEON_TWOSIDE_BIT) + GLuint c[3]; +#endif + + v[0] = &verts[e0]; + v[1] = &verts[e1]; + v[2] = &verts[e2]; + +#if (IND & RADEON_TWOSIDE_BIT) + c[0] = v[0]->ui[4]; + c[1] = v[1]->ui[4]; + c[2] = v[2]->ui[4]; +#endif + +#if (IND & (RADEON_TWOSIDE_BIT | RADEON_OFFSET_BIT)) + { + GLfloat ex = v[0]->v.x - v[2]->v.x; + GLfloat ey = v[0]->v.y - v[2]->v.y; + GLfloat fx = v[1]->v.x - v[2]->v.x; + GLfloat fy = v[1]->v.y - v[2]->v.y; + GLfloat cc = ex*fy - ey*fx; + +#if (IND & RADEON_TWOSIDE_BIT) + { + GLuint facing = ( cc > 0.0 ) ^ ctx->Polygon.FrontBit; + GLubyte (*vbcolor)[4] = VB->Color[facing]->data; + if ( IND & RADEON_FLAT_BIT ) { + RADEON_COLOR( (char *)&v[0]->ui[4], vbcolor[pv] ); + v[2]->ui[4] = v[1]->ui[4] = v[0]->ui[4]; + } else { + RADEON_COLOR( (char *)&v[0]->ui[4], vbcolor[e0] ); + RADEON_COLOR( (char *)&v[1]->ui[4], vbcolor[e1] ); + RADEON_COLOR( (char *)&v[2]->ui[4], vbcolor[e2] ); + } + } +#endif + +#if (IND & RADEON_OFFSET_BIT) + { + offset = ctx->Polygon.OffsetUnits * rmesa->depth_scale; + z[0] = v[0]->v.z; + z[1] = v[1]->v.z; + z[2] = v[2]->v.z; + if ( cc * cc > 1e-16 ) { + GLfloat ez = z[0] - z[2]; + GLfloat fz = z[1] - z[2]; + GLfloat a = ey*fz - ez*fy; + GLfloat b = ez*fx - ex*fz; + GLfloat ic = 1.0 / cc; + GLfloat ac = a * ic; + GLfloat bc = b * ic; + if ( ac < 0.0f ) ac = -ac; + if ( bc < 0.0f ) bc = -bc; + offset += MAX2( ac, bc ) * ctx->Polygon.OffsetFactor; + } + v[0]->v.z += offset; + v[1]->v.z += offset; + v[2]->v.z += offset; + } +#endif + } +#endif + + radeon_draw_triangle( rmesa, v[0], v[1], v[2] ); + +#if (IND & RADEON_OFFSET_BIT) + v[0]->v.z = z[0]; + v[1]->v.z = z[1]; + v[2]->v.z = z[2]; +#endif + +#if (IND & RADEON_TWOSIDE_BIT) + v[0]->ui[4] = c[0]; + v[1]->ui[4] = c[1]; + v[2]->ui[4] = c[2]; +#endif +} + + +static void TAG(quad)( GLcontext *ctx, + GLuint e0, GLuint e1, GLuint e2, GLuint e3, + GLuint pv ) +{ +#if 0 + TAG(triangle)( ctx, e0, e1, e3, pv ); + TAG(triangle)( ctx, e1, e2, e3, pv ); +#else + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + struct vertex_buffer *VB = ctx->VB; + radeonVertexPtr verts = RADEON_DRIVER_DATA(VB)->verts; + radeonVertexPtr v[4]; + +#if (IND & RADEON_OFFSET_BIT) + GLfloat offset; + GLfloat z[4]; +#endif + +#if (IND & RADEON_TWOSIDE_BIT) + int c[4]; +#endif + + v[0] = &verts[e0]; + v[1] = &verts[e1]; + v[2] = &verts[e2]; + v[3] = &verts[e3]; + +#if (IND & RADEON_TWOSIDE_BIT) + c[0] = v[0]->ui[4]; + c[1] = v[1]->ui[4]; + c[2] = v[2]->ui[4]; + c[3] = v[3]->ui[4]; +#endif + +#if (IND & (RADEON_TWOSIDE_BIT | RADEON_OFFSET_BIT)) + { + GLfloat ex = v[0]->v.x - v[2]->v.x; + GLfloat ey = v[0]->v.y - v[2]->v.y; + GLfloat fx = v[1]->v.x - v[2]->v.x; + GLfloat fy = v[1]->v.y - v[2]->v.y; + GLfloat cc = ex*fy - ey*fx; + +#if (IND & RADEON_TWOSIDE_BIT) + { + GLuint facing = ( cc > 0.0 ) ^ ctx->Polygon.FrontBit; + GLubyte (*vbcolor)[4] = VB->Color[facing]->data; + if ( IND & RADEON_FLAT_BIT ) { + RADEON_COLOR( (char *)&v[0]->ui[4], vbcolor[pv] ); + v[3]->ui[4] = v[2]->ui[4] = v[1]->ui[4] = v[0]->ui[4]; + } else { + RADEON_COLOR( (char *)&v[0]->ui[4], vbcolor[e0] ); + RADEON_COLOR( (char *)&v[1]->ui[4], vbcolor[e1] ); + RADEON_COLOR( (char *)&v[2]->ui[4], vbcolor[e2] ); + RADEON_COLOR( (char *)&v[3]->ui[4], vbcolor[e3] ); + } + } +#endif + +#if (IND & RADEON_OFFSET_BIT) + { + offset = ctx->Polygon.OffsetUnits * rmesa->depth_scale; + z[0] = v[0]->v.z; + z[1] = v[1]->v.z; + z[2] = v[2]->v.z; + z[3] = v[3]->v.z; + if ( cc * cc > 1e-16 ) { + GLfloat ez = z[0] - z[2]; + GLfloat fz = z[1] - z[2]; + GLfloat a = ey*fz - ez*fy; + GLfloat b = ez*fx - ex*fz; + GLfloat ic = 1.0 / cc; + GLfloat ac = a * ic; + GLfloat bc = b * ic; + if ( ac < 0.0f ) ac = -ac; + if ( bc < 0.0f ) bc = -bc; + offset += MAX2( ac, bc ) * ctx->Polygon.OffsetFactor; + } + v[0]->v.z += offset; + v[1]->v.z += offset; + v[2]->v.z += offset; + v[3]->v.z += offset; + } +#endif + } +#endif + + radeon_draw_quad( rmesa, v[0], v[1], v[2], v[3] ); + +#if (IND & RADEON_OFFSET_BIT) + v[0]->v.z = z[0]; + v[1]->v.z = z[1]; + v[2]->v.z = z[2]; + v[3]->v.z = z[3]; +#endif + +#if (IND & RADEON_TWOSIDE_BIT) + v[0]->ui[4] = c[0]; + v[1]->ui[4] = c[1]; + v[2]->ui[4] = c[2]; + v[3]->ui[4] = c[3]; +#endif +#endif +} + + +static void TAG(line)( GLcontext *ctx, + GLuint e0, GLuint e1, + GLuint pv ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + struct vertex_buffer *VB = ctx->VB; + radeonVertexPtr verts = RADEON_DRIVER_DATA(VB)->verts; + GLfloat width = ctx->Line.Width; + radeonVertexPtr v[2]; + +#if (IND & RADEON_OFFSET_BIT) + GLfloat offset; + GLfloat z[2]; +#endif +#if (IND & RADEON_TWOSIDE_BIT) + GLuint c[2]; + GLuint s[2]; +#endif + + v[0] = &verts[e0]; + v[1] = &verts[e1]; + +#if (IND & RADEON_TWOSIDE_BIT) + c[0] = v[0]->ui[4]; + c[1] = v[1]->ui[4]; + s[0] = v[0]->ui[5]; + s[1] = v[1]->ui[5]; +#endif + +#if (IND & RADEON_TWOSIDE_BIT) + { + GLubyte (*vbcolor)[4] = ctx->VB->ColorPtr->data; + GLubyte (*vbspec)[4] = ctx->VB->Specular; + if ( IND & RADEON_FLAT_BIT ) { + RADEON_COLOR( (char *)&v[0]->ui[4], vbcolor[pv] ); + v[1]->ui[4] = v[0]->ui[4]; + RADEON_COLOR3( (char *)&v[0]->ui[5], vbspec[pv] ); + v[1]->ui[5] = v[0]->ui[5]; + } else { + RADEON_COLOR( (char *)&v[0]->ui[4], vbcolor[e0] ); + RADEON_COLOR( (char *)&v[1]->ui[4], vbcolor[e1] ); + RADEON_COLOR3( (char *)&v[0]->ui[5], vbspec[e0] ); + RADEON_COLOR3( (char *)&v[1]->ui[5], vbspec[e1] ); + } + } +#endif + +#if (IND & RADEON_OFFSET_BIT) + offset = ctx->LineZoffset * rmesa->depth_scale; + z[0] = v[0]->v.z; + z[1] = v[1]->v.z; + v[0]->v.z += offset; + v[1]->v.z += offset; +#endif + + radeon_draw_line( rmesa, v[0], v[1], width ); + +#if (IND & RADEON_OFFSET_BIT) + v[0]->v.z = z[0]; + v[1]->v.z = z[1]; +#endif + +#if (IND & RADEON_TWOSIDE_BIT) + v[0]->ui[4] = c[0]; + v[1]->ui[4] = c[1]; + v[0]->ui[5] = s[0]; + v[1]->ui[5] = s[1]; +#endif +} + + +static void TAG(points)( GLcontext *ctx, + GLuint first, GLuint last ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + struct vertex_buffer *VB = ctx->VB; + radeonVertexPtr verts = RADEON_DRIVER_DATA(VB)->verts; + GLfloat size = ctx->Point.Size * 0.5; + int i; + + for ( i = first ; i < last ; i++ ) { + if ( VB->ClipMask[i] == 0 ) { + if ( IND & (RADEON_TWOSIDE_BIT|RADEON_OFFSET_BIT) ) { + radeonVertex tmp0 = verts[i]; + + if ( IND & RADEON_TWOSIDE_BIT ) { + GLubyte (*vbcolor)[4] = VB->ColorPtr->data; + GLubyte (*vbspec)[4] = VB->Specular; + RADEON_COLOR( (char *)&tmp0.v.color, vbcolor[i] ); + if (vbspec) + RADEON_COLOR3( (char *)&tmp0.v.specular, vbspec[i] ); + } + if ( IND & RADEON_OFFSET_BIT ) { + GLfloat offset = ctx->PointZoffset * rmesa->depth_scale; + tmp0.v.z += offset; + } + radeon_draw_point( rmesa, &tmp0, size ); + } else { + radeon_draw_point( rmesa, &verts[i], size ); + } + } + } +} + + +static void TAG(init)( void ) +{ + rast_tab[IND].points = TAG(points); + rast_tab[IND].line = TAG(line); + rast_tab[IND].triangle = TAG(triangle); + rast_tab[IND].quad = TAG(quad); +} + +#undef IND +#undef TAG Index: xc/lib/GL/mesa/src/drv/radeon/radeon_vb.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_vb.c:1.4 --- /dev/null Mon Jun 4 12:37:37 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_vb.c Sun Mar 25 00:32:00 2001 @@ -0,0 +1,483 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_vb.c,v 1.4 2001/03/25 05:32:00 tsi Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#include "radeon_context.h" +#include "radeon_ioctl.h" +#include "radeon_state.h" +#include "radeon_vb.h" + +#include "mem.h" +#include "stages.h" + +#define TEX0 \ +do { \ + v->v.tu0 = tc0[i][0]; \ + v->v.tv0 = tc0[i][1]; \ +} while (0) + +#define TEX1 \ +do { \ + v->v.tu1 = tc1[i][0]; \ + v->v.tv1 = tc1[i][1]; \ +} while (0) + +#define SPC \ +do { \ + GLubyte *spec = &(VB->Spec[0][i][0]); \ + v->v.specular.red = spec[0]; \ + v->v.specular.green = spec[1]; \ + v->v.specular.blue = spec[2]; \ +} while (0) + +#define FOG \ +do { \ + GLubyte *spec = &(VB->Spec[0][i][0]); \ + v->v.specular.alpha = spec[3]; \ +} while (0) + +#define COL \ +do { \ + GLubyte *col = &(VB->Color[0]->data[i][0]); \ + v->ui[4] = *(GLuint *)col; \ +} while (0) + +#define TEX0_4 \ +do { \ + if ( VB->TexCoordPtr[0]->size == 4 ) { \ + GLfloat (*tc)[4] = VB->TexCoordPtr[0]->data; \ + v = &(RADEON_DRIVER_DATA(VB)->verts[start]); \ + for ( i = start ; i < end ; i++, v++ ) { \ + float oow = 1.0 / tc[i][3]; \ + v->v.rhw *= tc[i][3]; \ + v->v.tu0 *= oow; \ + v->v.tv0 *= oow; \ + } \ + } \ +} while (0) + +#ifdef USE_RHW2 + +#define TEX1_4 \ +do { \ + if ( VB->TexCoordPtr[1]->size == 4 ) { \ + GLfloat (*tc)[4] = VB->TexCoordPtr[1]->data; \ + v = &(RADEON_DRIVER_DATA(VB)->verts[start]); \ + for ( i = start ; i < end ; i++, v++ ) { \ + float oow = 1.0 / tc[i][3]; \ + v->v.rhw2 *= tc[i][3]; \ + v->v.tu1 *= oow; \ + v->v.tv1 *= oow; \ + } \ + } \ +} while (0) + +#define COORD \ +do { \ + GLfloat *win = VB->Win.data[i]; \ + v->v.x = win[0]; \ + v->v.y = - win[1]; \ + v->v.z = win[2]; \ + v->v.rhw = v->v.rhw2 = win[3]; \ +} while (0) + +#else /* USE_RHW2 */ + +#define TEX1_4 + +#define COORD \ +do { \ + GLfloat *win = VB->Win.data[i]; \ + v->v.x = win[0] + SUBPIXEL_X; \ + v->v.y = - win[1] + SUBPIXEL_Y; \ + v->v.z = win[2]; \ + v->v.rhw = win[3]; \ +} while (0) \ + +#endif /* USE_RHW2 */ + +#define NOP + + +#define SETUPFUNC(name,win,col,tex0,tex1,tex0_4,tex1_4,spec,fog) \ +static void name( struct vertex_buffer *VB, GLuint start, GLuint end ) \ +{ \ + radeonContextPtr rmesa = RADEON_CONTEXT(VB->ctx); \ + radeonVertexPtr v; \ + GLfloat (*tc0)[4]; \ + GLfloat (*tc1)[4]; \ + GLint i; \ + \ + gl_import_client_data( VB, VB->ctx->RenderFlags, \ + (VB->ClipOrMask \ + ? VEC_WRITABLE | VEC_GOOD_STRIDE \ + : VEC_GOOD_STRIDE) ); \ + \ + tc0 = VB->TexCoordPtr[rmesa->tmu_source[0]]->data; \ + tc1 = VB->TexCoordPtr[rmesa->tmu_source[1]]->data; \ + \ + v = &(RADEON_DRIVER_DATA(VB)->verts[start]); \ + \ + if ( VB->ClipOrMask == 0 ) { \ + for ( i = start ; i < end ; i++, v++ ) { \ + win; \ + col; \ + spec; \ + fog; \ + tex0; \ + tex1; \ + } \ + } else { \ + for ( i = start ; i < end ; i++, v++ ) { \ + if ( VB->ClipMask[i] == 0 ) { \ + win; \ + spec; \ + fog; \ + tex0; \ + tex1; \ + } \ + col; \ + } \ + } \ + tex0_4; \ + tex1_4; \ +} + + +SETUPFUNC(rs_wt0, COORD, NOP, TEX0, NOP, TEX0_4, NOP, NOP, NOP) +SETUPFUNC(rs_wt0t1, COORD, NOP, TEX0, TEX1, TEX0_4, TEX1_4, NOP, NOP) +SETUPFUNC(rs_wft0, COORD, NOP, TEX0, NOP, TEX0_4, NOP, NOP, FOG) +SETUPFUNC(rs_wft0t1, COORD, NOP, TEX0, TEX1, TEX0_4, TEX1_4, NOP, FOG) +SETUPFUNC(rs_wg, COORD, COL, NOP, NOP, NOP, NOP, NOP, NOP) +SETUPFUNC(rs_wgs, COORD, COL, NOP, NOP, NOP, NOP, SPC, NOP) +SETUPFUNC(rs_wgt0, COORD, COL, TEX0, NOP, TEX0_4, NOP, NOP, NOP) +SETUPFUNC(rs_wgt0t1, COORD, COL, TEX0, TEX1, TEX0_4, TEX1_4, NOP, NOP) +SETUPFUNC(rs_wgst0, COORD, COL, TEX0, NOP, TEX0_4, NOP, SPC, NOP) +SETUPFUNC(rs_wgst0t1, COORD, COL, TEX0, TEX1, TEX0_4, TEX1_4, SPC, NOP) +SETUPFUNC(rs_wgf, COORD, COL, NOP, NOP, NOP, NOP, NOP, FOG) +SETUPFUNC(rs_wgfs, COORD, COL, NOP, NOP, NOP, NOP, SPC, FOG) +SETUPFUNC(rs_wgft0, COORD, COL, TEX0, NOP, TEX0_4, NOP, NOP, FOG) +SETUPFUNC(rs_wgft0t1, COORD, COL, TEX0, TEX1, TEX0_4, TEX1_4, NOP, FOG) +SETUPFUNC(rs_wgfst0, COORD, COL, TEX0, NOP, TEX0_4, NOP, SPC, FOG) +SETUPFUNC(rs_wgfst0t1, COORD, COL, TEX0, TEX1, TEX0_4, TEX1_4, SPC, FOG) + +SETUPFUNC(rs_t0, NOP, NOP, TEX0, NOP, TEX0_4, NOP, NOP, NOP) +SETUPFUNC(rs_t0t1, NOP, NOP, TEX0, TEX1, TEX0_4, TEX1_4, NOP, NOP) +SETUPFUNC(rs_f, NOP, NOP, NOP, NOP, NOP, NOP, NOP, FOG) +SETUPFUNC(rs_ft0, NOP, NOP, TEX0, NOP, TEX0_4, NOP, NOP, FOG) +SETUPFUNC(rs_ft0t1, NOP, NOP, TEX0, TEX1, TEX0_4, TEX1_4, NOP, FOG) +SETUPFUNC(rs_g, NOP, COL, NOP, NOP, NOP, NOP, NOP, NOP) +SETUPFUNC(rs_gs, NOP, COL, NOP, NOP, NOP, NOP, SPC, NOP) +SETUPFUNC(rs_gt0, NOP, COL, TEX0, NOP, TEX0_4, NOP, NOP, NOP) +SETUPFUNC(rs_gt0t1, NOP, COL, TEX0, TEX1, TEX0_4, TEX1_4, NOP, NOP) +SETUPFUNC(rs_gst0, NOP, COL, TEX0, NOP, TEX0_4, NOP, SPC, NOP) +SETUPFUNC(rs_gst0t1, NOP, COL, TEX0, TEX1, TEX0_4, TEX1_4, SPC, NOP) +SETUPFUNC(rs_gf, NOP, COL, NOP, NOP, NOP, NOP, NOP, FOG) +SETUPFUNC(rs_gfs, NOP, COL, NOP, NOP, NOP, NOP, SPC, FOG) +SETUPFUNC(rs_gft0, NOP, COL, TEX0, NOP, TEX0_4, NOP, NOP, FOG) +SETUPFUNC(rs_gft0t1, NOP, COL, TEX0, TEX1, TEX0_4, TEX1_4, NOP, FOG) +SETUPFUNC(rs_gfst0, NOP, COL, TEX0, NOP, TEX0_4, NOP, SPC, FOG) +SETUPFUNC(rs_gfst0t1, NOP, COL, TEX0, TEX1, TEX0_4, TEX1_4, SPC, FOG) + + +static void rs_invalid( struct vertex_buffer *VB, GLuint start, GLuint end ) +{ + fprintf( stderr, "radeonRasterSetup(): invalid setup function\n" ); +} + +typedef void (*setupFunc)( struct vertex_buffer *, GLuint, GLuint ); +static setupFunc setup_func[RADEON_MAX_SETUPFUNC]; + + +void radeonDDSetupInit( void ) +{ + GLint i; + + for ( i = 0 ; i < RADEON_MAX_SETUPFUNC ; i++ ) { + setup_func[i] = rs_invalid; + } + + /* Functions to build vertices from scratch + */ + setup_func[RADEON_WIN_BIT|RADEON_TEX0_BIT] = rs_wt0; + setup_func[RADEON_WIN_BIT|RADEON_TEX0_BIT|RADEON_TEX1_BIT] = rs_wt0t1; + setup_func[RADEON_WIN_BIT|RADEON_FOG_BIT|RADEON_TEX0_BIT] = rs_wft0; + setup_func[RADEON_WIN_BIT|RADEON_FOG_BIT|RADEON_TEX0_BIT|RADEON_TEX1_BIT] = rs_wft0t1; + setup_func[RADEON_WIN_BIT|RADEON_RGBA_BIT] = rs_wg; + setup_func[RADEON_WIN_BIT|RADEON_RGBA_BIT|RADEON_SPEC_BIT] = rs_wgs; + setup_func[RADEON_WIN_BIT|RADEON_RGBA_BIT|RADEON_TEX0_BIT] = rs_wgt0; + setup_func[RADEON_WIN_BIT|RADEON_RGBA_BIT|RADEON_TEX0_BIT|RADEON_TEX1_BIT] = rs_wgt0t1; + setup_func[RADEON_WIN_BIT|RADEON_RGBA_BIT|RADEON_SPEC_BIT|RADEON_TEX0_BIT] = rs_wgst0; + setup_func[RADEON_WIN_BIT|RADEON_RGBA_BIT|RADEON_SPEC_BIT|RADEON_TEX0_BIT|RADEON_TEX1_BIT] = rs_wgst0t1; + setup_func[RADEON_WIN_BIT|RADEON_RGBA_BIT|RADEON_FOG_BIT] = rs_wgf; + setup_func[RADEON_WIN_BIT|RADEON_RGBA_BIT|RADEON_FOG_BIT|RADEON_SPEC_BIT] = rs_wgfs; + setup_func[RADEON_WIN_BIT|RADEON_RGBA_BIT|RADEON_FOG_BIT|RADEON_TEX0_BIT] = rs_wgft0; + setup_func[RADEON_WIN_BIT|RADEON_RGBA_BIT|RADEON_FOG_BIT|RADEON_TEX0_BIT|RADEON_TEX1_BIT] = rs_wgft0t1; + setup_func[RADEON_WIN_BIT|RADEON_RGBA_BIT|RADEON_FOG_BIT|RADEON_SPEC_BIT|RADEON_TEX0_BIT] = rs_wgfst0; + setup_func[RADEON_WIN_BIT|RADEON_RGBA_BIT|RADEON_FOG_BIT|RADEON_SPEC_BIT|RADEON_TEX0_BIT|RADEON_TEX1_BIT] = rs_wgfst0t1; + + /* Repair functions + */ + setup_func[RADEON_TEX0_BIT] = rs_t0; + setup_func[RADEON_TEX0_BIT|RADEON_TEX1_BIT] = rs_t0t1; + setup_func[RADEON_FOG_BIT] = rs_f; + setup_func[RADEON_FOG_BIT|RADEON_TEX0_BIT] = rs_ft0; + setup_func[RADEON_FOG_BIT|RADEON_TEX0_BIT|RADEON_TEX1_BIT] = rs_ft0t1; + setup_func[RADEON_RGBA_BIT] = rs_g; + setup_func[RADEON_RGBA_BIT|RADEON_SPEC_BIT] = rs_gs; + setup_func[RADEON_RGBA_BIT|RADEON_TEX0_BIT] = rs_gt0; + setup_func[RADEON_RGBA_BIT|RADEON_TEX0_BIT|RADEON_TEX1_BIT] = rs_gt0t1; + setup_func[RADEON_RGBA_BIT|RADEON_SPEC_BIT|RADEON_TEX0_BIT] = rs_gst0; + setup_func[RADEON_RGBA_BIT|RADEON_SPEC_BIT|RADEON_TEX0_BIT|RADEON_TEX1_BIT] = rs_gst0t1; + setup_func[RADEON_RGBA_BIT|RADEON_FOG_BIT] = rs_gf; + setup_func[RADEON_RGBA_BIT|RADEON_FOG_BIT|RADEON_SPEC_BIT] = rs_gfs; + setup_func[RADEON_RGBA_BIT|RADEON_FOG_BIT|RADEON_TEX0_BIT] = rs_gft0; + setup_func[RADEON_RGBA_BIT|RADEON_FOG_BIT|RADEON_TEX0_BIT|RADEON_TEX1_BIT] = rs_gft0t1; + setup_func[RADEON_RGBA_BIT|RADEON_FOG_BIT|RADEON_SPEC_BIT|RADEON_TEX0_BIT] = rs_gfst0; + setup_func[RADEON_RGBA_BIT|RADEON_FOG_BIT|RADEON_SPEC_BIT|RADEON_TEX0_BIT|RADEON_TEX1_BIT] = rs_gfst0t1; +} + + +void radeonPrintSetupFlags( char *msg, GLuint flags ) +{ + fprintf( stderr, "%s: %d %s%s%s%s%s%s\n", + msg, + (int)flags, + (flags & RADEON_WIN_BIT) ? " xyzw," : "", + (flags & RADEON_RGBA_BIT) ? " rgba," : "", + (flags & RADEON_SPEC_BIT) ? " spec," : "", + (flags & RADEON_FOG_BIT) ? " fog," : "", + (flags & RADEON_TEX0_BIT) ? " tex-0," : "", + (flags & RADEON_TEX1_BIT) ? " tex-1," : "" ); +} + + +/* Initialize the vertex buffer setup functions based on the current + * rendering state. + */ +void radeonDDChooseRasterSetupFunc( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + GLint index = RADEON_WIN_BIT | RADEON_RGBA_BIT; + + rmesa->vertsize = 8; + rmesa->vc_format = RADEON_TEX0_VERTEX_FORMAT; + rmesa->tmu_source[0] = 0; + rmesa->tmu_source[1] = 1; + rmesa->tex_dest[0] = RADEON_TEX0_BIT; + rmesa->tex_dest[1] = RADEON_TEX1_BIT; + rmesa->multitex = 0; + + if ( ctx->Texture.ReallyEnabled & ENABLE_TEX0 ) { + index |= RADEON_TEX0_BIT; + } + + if ( ctx->Texture.ReallyEnabled & ENABLE_TEX1 ) { + if ( ctx->Texture.ReallyEnabled & ENABLE_TEX0 ) { + rmesa->multitex = 1; + rmesa->vertsize = 10; + rmesa->vc_format = RADEON_TEX1_VERTEX_FORMAT; + index |= RADEON_TEX1_BIT; + } else { + /* Just a funny way of doing single texturing. + */ + rmesa->tmu_source[0] = 1; + rmesa->tex_dest[1] = RADEON_TEX0_BIT; + index |= RADEON_TEX0_BIT; + } + } + + if ( ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR ) + index |= RADEON_SPEC_BIT; + + if ( ctx->Fog.Enabled ) + index |= RADEON_FOG_BIT; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_MSG ) { + radeonPrintSetupFlags( "full setup function", index ); + } + + rmesa->new_state |= RADEON_NEW_TEXTURE; + rmesa->SetupIndex = index; + + ctx->Driver.RasterSetup = setup_func[index]; +} + +/* Check to see if any updates of the vertex buffer entries are needed. + */ +void radeonDDCheckPartialRasterSetup( GLcontext *ctx, + struct gl_pipeline_stage *s ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLint tmp = rmesa->SetupDone; + + s->type = 0; + rmesa->SetupDone = 0; + + if ( (ctx->Array.Summary & VERT_OBJ_ANY) == 0 ) + return; + + if ( ctx->IndirectTriangles ) + return; + + rmesa->SetupDone = tmp; +} + +/* Repair existing precalculated vertices with new data. + */ +void radeonDDPartialRasterSetup( struct vertex_buffer *VB ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(VB->ctx); + GLuint new = VB->pipeline->new_outputs; + GLuint available = VB->pipeline->outputs; + GLuint index = 0; + + if ( new & VERT_WIN ) { + new = available; + index |= RADEON_WIN_BIT | RADEON_FOG_BIT; + } + + if ( new & VERT_RGBA ) + index |= RADEON_RGBA_BIT | RADEON_SPEC_BIT; + + if ( new & VERT_TEX0_ANY ) + index |= RADEON_TEX0_BIT; + + if ( new & VERT_TEX1_ANY ) + index |= rmesa->tex_dest[1]; + + if ( new & VERT_FOG_COORD ) + index |= RADEON_FOG_BIT; + + rmesa->SetupDone &= ~index; + index &= rmesa->SetupIndex; + rmesa->SetupDone |= index; + + if ( RADEON_DEBUG & DEBUG_VERBOSE_MSG ) + radeonPrintSetupFlags( "partial setup function", index ); + + if ( index ) + setup_func[index]( VB, VB->Start, VB->Count ); +} + +void radeonDDDoRasterSetup( struct vertex_buffer *VB ) +{ + GLcontext *ctx = VB->ctx; + + if ( VB->Type == VB_CVA_PRECALC ) { + radeonDDPartialRasterSetup( VB ); + } else if ( ctx->Driver.RasterSetup ) { + ctx->Driver.RasterSetup( VB, VB->CopyStart, VB->Count ); + } +} + + +/* ================================================================ + * Hardware-format vertex buffers + */ + +void radeonDDResizeVB( struct vertex_buffer *VB, GLuint size ) +{ + radeonVertexBufferPtr rvb = RADEON_DRIVER_DATA(VB); + + while ( rvb->size < size ) + rvb->size *= 2; + + ALIGN_FREE( rvb->vert_store ); + rvb->vert_store = ALIGN_MALLOC( sizeof(radeonVertex) * rvb->size, 32 ); + if ( !rvb->vert_store ) { + fprintf( stderr, "Cannot allocate vertex store! Exiting...\n" ); + exit( 1 ); + } + + rvb->verts = (radeonVertexPtr)rvb->vert_store; + + gl_vector1ui_free( &rvb->clipped_elements ); + gl_vector1ui_alloc( &rvb->clipped_elements, VEC_WRITABLE, rvb->size, 32 ); + if ( !rvb->clipped_elements.start ) { + fprintf( stderr, "Cannot allocate clipped elements! Exiting...\n" ); + exit( 1 ); + } + + ALIGN_FREE( VB->ClipMask ); + VB->ClipMask = (GLubyte *)ALIGN_MALLOC( sizeof(GLubyte) * rvb->size, 32 ); + if ( !VB->ClipMask ) { + fprintf( stderr, "Cannot allocate clipmask! Exiting...\n" ); + exit( 1 ); + } +} + +void radeonDDRegisterVB( struct vertex_buffer *VB ) +{ + radeonVertexBufferPtr rvb; + + rvb = (radeonVertexBufferPtr)CALLOC( sizeof(*rvb) ); + + rvb->size = VB->Size * 2; + rvb->vert_store = ALIGN_MALLOC( sizeof(radeonVertex) * rvb->size, 32 ); + if ( !rvb->vert_store ) { + fprintf( stderr, "Cannot allocate vertex store! Exiting...\n" ); + exit( 1 ); + } + + rvb->verts = (radeonVertexPtr)rvb->vert_store; + + gl_vector1ui_alloc( &rvb->clipped_elements, VEC_WRITABLE, rvb->size, 32 ); + if ( !rvb->clipped_elements.start ) { + fprintf( stderr, "Cannot allocate clipped elements! Exiting...\n" ); + exit( 1 ); + } + + ALIGN_FREE( VB->ClipMask ); + VB->ClipMask = (GLubyte *)ALIGN_MALLOC( sizeof(GLubyte) * rvb->size, 32 ); + if ( !VB->ClipMask ) { + fprintf( stderr, "Cannot allocate clipmask! Exiting...\n" ); + exit( 1 ); + } + + VB->driver_data = rvb; +} + +void radeonDDUnregisterVB( struct vertex_buffer *VB ) +{ + radeonVertexBufferPtr rvb = RADEON_DRIVER_DATA(VB); + + if ( rvb ) { + if ( rvb->vert_store ) ALIGN_FREE( rvb->vert_store ); + gl_vector1ui_free( &rvb->clipped_elements ); + FREE( rvb ); + VB->driver_data = 0; + } +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_vb.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_vb.h:1.1 --- /dev/null Mon Jun 4 12:37:37 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_vb.h Sun Jan 7 20:07:29 2001 @@ -0,0 +1,136 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_vb.h,v 1.1 2001/01/08 01:07:29 martin Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#ifndef __RADEON_VB_H__ +#define __RADEON_VB_H__ + +#ifdef GLX_DIRECT_RENDERING + +/* FIXME: This is endian-specific */ +typedef struct { + GLubyte red; + GLubyte green; + GLubyte blue; + GLubyte alpha; +} radeon_color_t; + +/* The vertex structure. The final tu1/tv1 values are only used in + * multitexture modes, and the rhw2 value is currently never used. + */ +typedef struct { + GLfloat x, y, z; /* Coordinates in screen space */ + GLfloat rhw; /* Reciprocal homogeneous w */ + radeon_color_t color; /* Diffuse color */ + radeon_color_t specular; /* Specular color (alpha is fog) */ + GLfloat tu0, tv0; /* Texture 0 coordinates */ + GLfloat tu1, tv1; /* Texture 1 coordinates */ + GLfloat rhw2; /* Reciprocal homogeneous w2 */ +} radeon_vertex; + +/* Format of vertices in radeon_vertex struct: + */ +#define RADEON_TEX0_VERTEX_FORMAT (RADEON_CP_VC_FRMT_XY | \ + RADEON_CP_VC_FRMT_Z | \ + RADEON_CP_VC_FRMT_W0 | \ + RADEON_CP_VC_FRMT_PKCOLOR | \ + RADEON_CP_VC_FRMT_PKSPEC | \ + RADEON_CP_VC_FRMT_ST0) + +#define RADEON_TEX1_VERTEX_FORMAT (RADEON_CP_VC_FRMT_XY | \ + RADEON_CP_VC_FRMT_Z | \ + RADEON_CP_VC_FRMT_W0 | \ + RADEON_CP_VC_FRMT_PKCOLOR | \ + RADEON_CP_VC_FRMT_PKSPEC | \ + RADEON_CP_VC_FRMT_ST0 | \ + RADEON_CP_VC_FRMT_ST1) + +#if 0 +#define RADEON_PROJ_TEX1_VERTEX_FORMAT (RADEON_CP_VC_FRMT_XY | \ + RADEON_CP_VC_FRMT_Z | \ + RADEON_CP_VC_FRMT_W0 | \ + RADEON_CP_VC_FRMT_PKCOLOR | \ + RADEON_CP_VC_FRMT_PKSPEC | \ + RADEON_CP_VC_FRMT_ST0 | \ + RADEON_CP_VC_FRMT_ST1 | \ + RADEON_CP_VC_FRMT_Q1) +#endif + + +/* The fastpath code still expects a 16-float stride vertex. + */ +union radeon_vertex_t { + radeon_vertex v; + GLfloat f[16]; + GLuint ui[16]; +}; + +typedef union radeon_vertex_t radeonVertex; +typedef union radeon_vertex_t *radeonVertexPtr; + +typedef struct { + radeonVertexPtr verts; + GLvector1ui clipped_elements; + GLint last_vert; + void *vert_store; + GLuint size; +} *radeonVertexBufferPtr; + +#define RADEON_DRIVER_DATA(vb) ((radeonVertexBufferPtr)((vb)->driver_data)) + +#define RADEON_WIN_BIT 0x01 +#define RADEON_RGBA_BIT 0x02 +#define RADEON_FOG_BIT 0x04 +#define RADEON_SPEC_BIT 0x08 +#define RADEON_TEX0_BIT 0x10 +#define RADEON_TEX1_BIT 0x20 +#define RADEON_MAX_SETUPFUNC 0x40 + +extern void radeonDDChooseRasterSetupFunc( GLcontext *ctx ); +extern void radeonPrintSetupFlags( char *msg, GLuint flags ); + +extern void radeonDDCheckPartialRasterSetup( GLcontext *ctx, + struct gl_pipeline_stage *s ); +extern void radeonDDPartialRasterSetup( struct vertex_buffer *VB ); +extern void radeonDDDoRasterSetup( struct vertex_buffer *VB ); + +extern void radeonDDResizeVB( struct vertex_buffer *VB, GLuint size ); +extern void radeonDDRegisterVB( struct vertex_buffer *VB ); +extern void radeonDDUnregisterVB( struct vertex_buffer *VB ); + +extern void radeonDDSetupInit( void ); + +#endif +#endif /* __RADEON_VB_H__ */ Index: xc/lib/GL/mesa/src/drv/radeon/radeon_xmesa.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_xmesa.c:1.4 --- /dev/null Mon Jun 4 12:37:37 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_xmesa.c Tue Apr 10 12:07:53 2001 @@ -0,0 +1,312 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_xmesa.c,v 1.4 2001/04/10 16:07:53 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Gareth Hughes + * + */ + +#ifdef GLX_DIRECT_RENDERING + +/* Radeon Mesa driver includes */ +#include "radeon_context.h" +#include "radeon_ioctl.h" +#include "radeon_state.h" +#include "radeon_tex.h" + +/* Mesa src includes */ +#include "context.h" +#include "simple_list.h" +#include "mmath.h" + +extern void __driRegisterExtensions( void ); + +static radeonContextPtr radeonCtx = NULL; + + +/* Initialize the driver specific screen private data. + */ +GLboolean XMesaInitDriver( __DRIscreenPrivate *sPriv ) +{ + sPriv->private = (void *) radeonCreateScreen( sPriv ); + + /* Check the DRI version */ + { + int major, minor, patch; + if ( XF86DRIQueryVersion( sPriv->display, &major, &minor, &patch ) ) { + if ( major != 4 || minor < 0 ) { + char msg[128]; + sprintf( msg, "RADEON DRI driver expected DRI version 4.0.x but got version %d.%d.%d", major, minor, patch ); + __driMesaMessage( msg ); + return GL_FALSE; + } + } + } + + /* Check that the DDX driver version is compatible */ + if ( sPriv->ddxMajor != 4 || + sPriv->ddxMinor < 0 ) { + char msg[128]; + sprintf( msg, "RADEON DRI driver expected DDX driver version 4.0.x but got version %d.%d.%d", sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch ); + __driMesaMessage( msg ); + return GL_FALSE; + } + + /* Check that the DRM driver version is compatible */ + if ( sPriv->drmMajor != 1 || + sPriv->drmMinor < 1 ) { + char msg[128]; + sprintf( msg, "RADEON DRI driver expected DRM driver version 1.0.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch ); + __driMesaMessage( msg ); + return GL_FALSE; + } + + if ( !sPriv->private ) { + radeonDestroyScreen( sPriv ); + return GL_FALSE; + } + + return GL_TRUE; +} + +/* Reset the driver specific screen private data. + */ +void XMesaResetDriver( __DRIscreenPrivate *sPriv ) +{ + radeonDestroyScreen( sPriv ); +} + +/* Create and initialize the Mesa and driver specific visual data. + */ +GLvisual *XMesaCreateVisual( Display *dpy, + __DRIscreenPrivate *driScrnPriv, + const XVisualInfo *visinfo, + const __GLXvisualConfig *config ) +{ + /* Drivers may change the args to _mesa_create_visual() in order to + * setup special visuals. + */ + return _mesa_create_visual( config->rgba, + config->doubleBuffer, + config->stereo, + _mesa_bitcount( visinfo->red_mask ), + _mesa_bitcount( visinfo->green_mask ), + _mesa_bitcount( visinfo->blue_mask ), + config->alphaSize, + 0, /* index bits */ + config->depthSize, + config->stencilSize, + config->accumRedSize, + config->accumGreenSize, + config->accumBlueSize, + config->accumAlphaSize, + 0 /* num samples */); +} + +/* Create and initialize the Mesa and driver specific context data. + */ +GLboolean XMesaCreateContext( Display *dpy, GLvisual *mesaVis, + __DRIcontextPrivate *driContextPriv ) +{ + return radeonCreateContext( dpy, mesaVis, driContextPriv ); +} + +/* Destroy the Mesa and driver specific context data. + */ +void XMesaDestroyContext( __DRIcontextPrivate *driContextPriv ) +{ + radeonContextPtr rmesa = (radeonContextPtr)driContextPriv->driverPrivate; + + if ( rmesa == (void *)radeonCtx) radeonCtx = NULL; + radeonDestroyContext( rmesa ); +} + +/* Create and initialize the Mesa and driver specific pixmap buffer + * data. + */ +GLframebuffer *XMesaCreateWindowBuffer( Display *dpy, + __DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + GLvisual *mesaVis ) +{ + return gl_create_framebuffer( mesaVis, + GL_FALSE, /* software depth buffer? */ + mesaVis->StencilBits > 0, + mesaVis->AccumRedBits > 0, + GL_FALSE /* software alpha buffer? */ ); +} + +/* Create and initialize the Mesa and driver specific pixmap buffer + * data. + */ +GLframebuffer *XMesaCreatePixmapBuffer( Display *dpy, + __DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + GLvisual *mesaVis ) +{ +#if 0 + /* Different drivers may have different combinations of hardware and + * software ancillary buffers. + */ + return gl_create_framebuffer( mesaVis, + GL_FALSE, /* software depth buffer? */ + mesaVis->StencilBits > 0, + mesaVis->AccumRedBits > 0, + mesaVis->AlphaBits > 0 ); +#else + return NULL; /* not implemented yet */ +#endif +} + +/* Copy the back color buffer to the front color buffer. + */ +void XMesaSwapBuffers( __DRIdrawablePrivate *driDrawPriv ) +{ + /* FIXME: This assumes buffer is currently bound to a context. This + * needs to be able to swap buffers when not currently bound. Also, + * this needs to swap according to buffer, and NOT according to + * context! + */ + if ( radeonCtx == NULL ) return; + + /* Only swap buffers when a back buffer exists. + */ + if ( radeonCtx->glCtx->Visual->DBflag ) { + FLUSH_VB( radeonCtx->glCtx, "swap buffers" ); + if ( !radeonCtx->doPageFlip ) { + radeonSwapBuffers( radeonCtx ); + } else { + radeonPageFlip( radeonCtx ); + } + } +} + +/* Force the context `c' to be the current context and associate with it + * buffer `b'. + */ +GLboolean XMesaMakeCurrent( __DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv ) +{ + if ( driContextPriv ) { + radeonContextPtr rmesa = (radeonContextPtr)driContextPriv->driverPrivate; + + radeonCtx = radeonMakeCurrent( radeonCtx, rmesa, driDrawPriv ); + + gl_make_current2( radeonCtx->glCtx, + driDrawPriv->mesaBuffer, + driReadPriv->mesaBuffer ); + + if ( radeonCtx->driDrawable != driDrawPriv ) { + radeonCtx->driDrawable = driDrawPriv; + radeonCtx->dirty = RADEON_UPLOAD_ALL; + } + + /* GH: We need this to correctly calculate the window offset + * and aux scissor rects. + */ + radeonCtx->new_state = RADEON_NEW_WINDOW | RADEON_NEW_CLIP; + + if ( !radeonCtx->glCtx->Viewport.Width ) { + gl_Viewport( radeonCtx->glCtx, 0, 0, driDrawPriv->w, driDrawPriv->h ); + } + } else { + gl_make_current( 0, 0 ); + radeonCtx = NULL; + } + + return GL_TRUE; +} + +/* Force the context `c' to be unbound from its buffer. + */ +GLboolean XMesaUnbindContext( __DRIcontextPrivate *driContextPriv ) +{ + return GL_TRUE; +} + +/* This function is called by libGL.so as soon as libGL.so is loaded. + * This is where we'd register new extension functions with the dispatcher. + */ +void __driRegisterExtensions( void ) +{ +} + +/* Initialize the fullscreen mode. + */ +GLboolean +XMesaOpenFullScreen( __DRIcontextPrivate *driContextPriv ) +{ + radeonContextPtr rmesa = (radeonContextPtr)driContextPriv->driverPrivate; + GLint ret; + + /* FIXME: Do we need to check this? + */ + if ( !radeonCtx->glCtx->Visual->DBflag ) + return GL_TRUE; + + LOCK_HARDWARE( rmesa ); + radeonWaitForIdleLocked( rmesa ); + + /* Ignore errors. If this fails, we simply don't do page flipping. + */ + ret = drmRadeonFullScreen( rmesa->driFd, GL_TRUE ); + + UNLOCK_HARDWARE( rmesa ); + + rmesa->doPageFlip = ( ret == 0 ); + + return GL_TRUE; +} + +/* Shut down the fullscreen mode. + */ +GLboolean +XMesaCloseFullScreen( __DRIcontextPrivate *driContextPriv ) +{ + radeonContextPtr rmesa = (radeonContextPtr)driContextPriv->driverPrivate; + + LOCK_HARDWARE( rmesa ); + radeonWaitForIdleLocked( rmesa ); + + /* Don't care if this fails, we're not page flipping anymore. + */ + drmRadeonFullScreen( rmesa->driFd, GL_FALSE ); + + UNLOCK_HARDWARE( rmesa ); + + rmesa->doPageFlip = GL_FALSE; + rmesa->currentPage = 0; + + return GL_TRUE; +} + +#endif Index: xc/lib/GL/mesa/src/drv/sis/Imakefile diff -u xc/lib/GL/mesa/src/drv/sis/Imakefile:1.12 xc/lib/GL/mesa/src/drv/sis/Imakefile:1.17 --- xc/lib/GL/mesa/src/drv/sis/Imakefile:1.12 Tue Dec 12 18:24:28 2000 +++ xc/lib/GL/mesa/src/drv/sis/Imakefile Thu May 10 12:56:12 2001 @@ -1,349 +1,45 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/sis/Imakefile,v 1.12 2000/12/12 23:24:28 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/sis/Imakefile,v 1.17 2001/05/10 16:56:12 dawes Exp $ #include -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx +#if GlxUseBuiltInDRIDriver +#define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) +#define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) #define DoExtraLib SharedLibGlx #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx - -XCOMM SIS_DEFINES = -DSIS_USE_HW_CULL -DSIS_USE_FASTPATH -SIS_DEFINES = -DSIS_USE_HW_CULL - -XCOMM DEBUG_DEFINES = -DDEBUG_LOCKING -XCOMM DEBUG_DEFINES = -DSIS_DEBUG - -#if Malloc0ReturnsNull -ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#else +#define DoNormalLib SharedLibGlxWithoutPIC +#define DoSharedLib !SharedLibGlxWithoutPIC +#define DoExtrasLib NO +#define DoDebugLib NO +#define DoProfileLib NO #endif +#include "../common/Imakefile.inc" +#include "Imakefile.inc" +#include "../../Imakefile.inc" #ifdef i386Architecture -#if MesaUseMMX - MMX_DEFS = -DUSE_MMX_ASM -#endif -#if MesaUse3DNow - 3DNOW_DEFS = -DUSE_3DNOW_ASM +#include "../../X86/Imakefile.inc" #endif -#if MesaUseKatmai - KATMAI_DEFS = -DUSE_KATMAI_ASM -#endif - ASM_DEFINES = -DUSE_X86_ASM $(MMX_DEFS) $(3DNOW_DEFS) $(KATMAI_DEFS) -#endif - -#if BuildXF86DRI - DRI_DEFINES = GlxDefines $(SIS_DEFINES) - DRI_INCLUDES = -I../../../../dri -I../../../../glx \ - -I../../../dri \ - -I$(TOP)/include -I$(TOP)/include/GL \ - -I$(XF86OSSRC) -I$(SERVERSRC)/GL/dri \ - -I$(XF86DRIVERSRC)/sis \ - -I../../../include -I../.. -I../../X \ - -I../common/ -#endif - -MESA_INCLUDES = -I. -I.. -I../../include \ - -I../../../../dri/drm -LinkSourceFile(xdriP.h, ../../X) - -#if 0 - DEBUG_SRC = sis_debug.c - DEBUG_OBJ = sis_debug.o - DEBUG_DEFINES += -DSIS_DUMP -#endif +XCOMM SIS_DEFINES = -DSIS_USE_HW_CULL -DSIS_USE_FASTPATH +SIS_DEFINES = -DSIS_USE_HW_CULL -#if 0 - STEREO_SRC = sis_stereo.c - STEREO_OBJ = sis_stereo.o - STEREO_DEFINES = -DSIS_STEREO=1 -#else - STEREO_DEFINES = -DSIS_STEREO=0 -#endif +XCOMM DEBUG_DEFINES = -DDEBUG_LOCKING +XCOMM DEBUG_DEFINES = -DSIS_DEBUG - DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(ASM_DEFINES) \ + DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(MESA_ASM_DEFINES) \ $(DEBUG_DEFINES) $(STEREO_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) $(MESA_INCLUDES) $(DRI_INCLUDES) \ - -I./misc \ - -I$(SERVERSRC)/hw/xfree86/drivers/sis - - SISSRCS = sis_render.c \ - sis_mesa.c \ - sis_ctx.c \ - sis_alloc.c \ - sis_fog.c \ - sis_clear.c \ - sis_stencil.c \ - sis_texture.c \ - sis_xwin.c \ - sis_xmesa.c \ - sis_span.c \ - sis_fastpath.c \ - $(DEBUG_SRC) \ - $(STEREO_SRC) - - SISOBJS = sis_render.o \ - sis_mesa.o \ - sis_ctx.o \ - sis_alloc.o \ - sis_fog.o \ - sis_clear.o \ - sis_stencil.o \ - sis_texture.o \ - sis_xwin.o \ - sis_xmesa.o \ - sis_span.o \ - sis_fastpath.o \ - $(DEBUG_OBJ) \ - $(STEREO_OBJ) - - DRISRCS = ../../../dri/dri_mesa.c \ - ../../../../dri/dri_tmm.c - - DRIOBJS = ../../../dri/dri_mesa.o \ - ../../../../dri/dri_tmm.o - - DRMSRCS = ../../../../dri/drm/xf86drm.c \ - ../../../../dri/drm/xf86drmHash.c \ - ../../../../dri/drm/xf86drmRandom.c \ - ../../../../dri/drm/xf86drmSL.c - - DRMOBJS = ../../../../dri/drm/xf86drm.o \ - ../../../../dri/drm/xf86drmHash.o \ - ../../../../dri/drm/xf86drmRandom.o \ - ../../../../dri/drm/xf86drmSL.o - - MESASRCS = ../../aatriangle.c \ - ../../accum.c \ - ../../alpha.c \ - ../../alphabuf.c \ - ../../attrib.c \ - ../../bbox.c \ - ../../bitmap.c \ - ../../blend.c \ - ../../buffers.c \ - ../../clip.c \ - ../../colortab.c \ - ../../config.c \ - ../../context.c \ - ../../copypix.c \ - ../../cva.c \ - ../../debug_xform.c \ - ../../depth.c \ - ../../dlist.c \ - ../../drawpix.c \ - ../../enable.c \ - ../../enums.c \ - ../../eval.c \ - ../../extensions.c \ - ../../feedback.c \ - ../../fog.c \ - ../../get.c \ - ../../glapi.c \ - ../../glapinoop.c \ - ../../glthread.c \ - ../../hash.c \ - ../../image.c \ - ../../imaging.c \ - ../../light.c \ - ../../lines.c \ - ../../logic.c \ - ../../masking.c \ - ../../matrix.c \ - ../../mem.c \ - ../../mmath.c \ - ../../pb.c \ - ../../pipeline.c \ - ../../pixel.c \ - ../../pixeltex.c \ - ../../points.c \ - ../../polygon.c \ - ../../quads.c \ - ../../rastpos.c \ - ../../readpix.c \ - ../../rect.c \ - ../../scissor.c \ - ../../shade.c \ - ../../span.c \ - ../../stages.c \ - ../../state.c \ - ../../stencil.c \ - ../../teximage.c \ - ../../texobj.c \ - ../../texstate.c \ - ../../texture.c \ - ../../texutil.c \ - ../../translate.c \ - ../../triangle.c \ - ../../varray.c \ - ../../vb.c \ - ../../vbcull.c \ - ../../vbfill.c \ - ../../vbindirect.c \ - ../../vbrender.c \ - ../../vbxform.c \ - ../../vector.c \ - ../../vertices.c \ - ../../winpos.c \ - ../../xform.c \ - ../../zoom.c - - MESAOBJS = ../../aatriangle.o \ - ../../accum.o \ - ../../alpha.o \ - ../../alphabuf.o \ - ../../attrib.o \ - ../../bbox.o \ - ../../bitmap.o \ - ../../blend.o \ - ../../buffers.o \ - ../../clip.o \ - ../../colortab.o \ - ../../config.o \ - ../../context.o \ - ../../copypix.o \ - ../../cva.o \ - ../../debug_xform.o \ - ../../depth.o \ - ../../dlist.o \ - ../../drawpix.o \ - ../../enable.o \ - ../../enums.o \ - ../../eval.o \ - ../../extensions.o \ - ../../feedback.o \ - ../../fog.o \ - ../../get.o \ - ../../hash.o \ - ../../hint.o \ - ../../image.o \ - ../../imaging.o \ - ../../light.o \ - ../../lines.o \ - ../../logic.o \ - ../../masking.o \ - ../../matrix.o \ - ../../mem.o \ - ../../mmath.o \ - ../../pb.o \ - ../../pipeline.o \ - ../../pixel.o \ - ../../pixeltex.o \ - ../../points.o \ - ../../polygon.o \ - ../../quads.o \ - ../../rastpos.o \ - ../../readpix.o \ - ../../rect.o \ - ../../scissor.o \ - ../../shade.o \ - ../../span.o \ - ../../stages.o \ - ../../state.o \ - ../../stencil.o \ - ../../teximage.o \ - ../../texobj.o \ - ../../texstate.o \ - ../../texture.o \ - ../../texutil.o \ - ../../translate.o \ - ../../triangle.o \ - ../../varray.o \ - ../../vb.o \ - ../../vbcull.o \ - ../../vbfill.o \ - ../../vbindirect.o \ - ../../vbrender.o \ - ../../vbxform.o \ - ../../vector.o \ - ../../vertices.o \ - ../../winpos.o \ - ../../xform.o \ - ../../zoom.o - -#ifdef i386Architecture - X86_SRCS = ../../X86/common_x86.c \ - ../../X86/common_x86_asm.S \ - ../../X86/x86.c \ - ../../X86/x86_cliptest.S \ - ../../X86/x86_vertex.S \ - ../../X86/x86_xform_masked2.S \ - ../../X86/x86_xform_masked3.S \ - ../../X86/x86_xform_masked4.S \ - ../../X86/x86_xform_raw2.S \ - ../../X86/x86_xform_raw3.S \ - ../../X86/x86_xform_raw4.S - - X86_OBJS = ../../X86/common_x86.o \ - ../../X86/common_x86_asm.o \ - ../../X86/x86.o \ - ../../X86/x86_cliptest.o \ - ../../X86/x86_vertex.o \ - ../../X86/x86_xform_masked2.o \ - ../../X86/x86_xform_masked3.o \ - ../../X86/x86_xform_masked4.o \ - ../../X86/x86_xform_raw2.o \ - ../../X86/x86_xform_raw3.o \ - ../../X86/x86_xform_raw4.o - -#if MesaUseMMX - MMX_SRCS = ../../X86/mmx_blend.S - - MMX_OBJS = ../../X86/mmx_blend.o -#endif + INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES) -#if MesaUse3DNow - 3DNOW_SRCS = ../../X86/3dnow.c \ - ../../X86/3dnow_norm_raw.S \ - ../../X86/3dnow_vertex.S \ - ../../X86/3dnow_xform_masked1.S \ - ../../X86/3dnow_xform_masked2.S \ - ../../X86/3dnow_xform_masked3.S \ - ../../X86/3dnow_xform_masked4.S \ - ../../X86/3dnow_xform_raw1.S \ - ../../X86/3dnow_xform_raw2.S \ - ../../X86/3dnow_xform_raw3.S \ - ../../X86/3dnow_xform_raw4.S - - 3DNOW_OBJS = ../../X86/3dnow.o \ - ../../X86/3dnow_norm_raw.o \ - ../../X86/3dnow_vertex.o \ - ../../X86/3dnow_xform_masked1.o \ - ../../X86/3dnow_xform_masked2.o \ - ../../X86/3dnow_xform_masked3.o \ - ../../X86/3dnow_xform_masked4.o \ - ../../X86/3dnow_xform_raw1.o \ - ../../X86/3dnow_xform_raw2.o \ - ../../X86/3dnow_xform_raw3.o \ - ../../X86/3dnow_xform_raw4.o -#endif + DRIOBJS = $(GLXLIBSRC)/mesa/dri/dri_mesa.o \ + $(GLXLIBSRC)/dri/dri_tmm.o -#if MesaUseKatmai - KATMAI_SRCS = ../../X86/katmai.c \ - ../../X86/katmai_norm_raw.S \ - ../../X86/katmai_vertex.S \ - ../../X86/katmai_xform_masked1.S \ - ../../X86/katmai_xform_masked2.S \ - ../../X86/katmai_xform_masked3.S \ - ../../X86/katmai_xform_masked4.S \ - ../../X86/katmai_xform_raw1.S \ - ../../X86/katmai_xform_raw2.S \ - ../../X86/katmai_xform_raw3.S \ - ../../X86/katmai_xform_raw4.S - - KATMAI_OBJS = ../../X86/katmai.o \ - ../../X86/katmai_norm_raw.o \ - ../../X86/katmai_vertex.o \ - ../../X86/katmai_xform_masked1.o \ - ../../X86/katmai_xform_masked2.o \ - ../../X86/katmai_xform_masked3.o \ - ../../X86/katmai_xform_masked4.o \ - ../../X86/katmai_xform_raw1.o \ - ../../X86/katmai_xform_raw2.o \ - ../../X86/katmai_xform_raw3.o \ - ../../X86/katmai_xform_raw4.o -#endif -#endif + DRMOBJS = $(GLXLIBSRC)/dri/drm/xf86drm.o \ + $(GLXLIBSRC)/dri/drm/xf86drmHash.o \ + $(GLXLIBSRC)/dri/drm/xf86drmRandom.o \ + $(GLXLIBSRC)/dri/drm/xf86drmSL.o #ifdef GlxSoProf LOSRCS = ../../../../lowpc.c @@ -353,46 +49,30 @@ HIOBJS = ../../../../highpc.o #endif - ASMSRCS = $(X86_SRCS) $(MMX_SRCS) $(3DNOW_SRCS) $(KATMAI_SRCS) - ASMOBJS = $(X86_OBJS) $(MMX_OBJS) $(3DNOW_OBJS) $(KATMAI_OBJS) - - SRCS = $(LOSRCS) $(DRISRCS) $(DRMSRCS) $(MESASRCS) \ - $(ASMSRCS) $(SISSRCS) $(HISRCS) - OBJS = $(DRIOBJS) $(DRMOBJS) $(MESAOBJS) \ - $(ASMOBJS) $(SISOBJS) $(HIOBJS) - -REQUIREDLIBS += MathLibrary -#if !GlxBuiltInSIS -REQUIREDLIBS += -L../../../.. -lGL -L../../../../../X11 -lX11 -#endif + SRCS = $(SISSRCS) + OBJS = $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ + $(MESA_ASM_OBJS) $(SISOBJS) $(HIOBJS) +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) -#if !GlxUseBuiltInDRIDriver -#undef DoNormalLib NormalLibGlx -#undef DoExtraLib SharedLibGlx -#undef DoDebugLib DebugLibGlx -#undef DoProfileLib ProfileLibGlx -#endif - #include LibraryObjectRule() -SubdirLibraryRule($(OBJS)) +SubdirLibraryRule($(SISOBJS)) NormalLintTarget($(SRCS)) #if !GlxUseBuiltInDRIDriver LIBNAME = sis_dri.so -ALL_OBJS = $(OBJS) -ALL_DEPS = DONE -SharedDepModuleTarget($(LIBNAME),$(ALL_DEPS),$(ALL_OBJS)) +SharedDepModuleTarget($(LIBNAME),DONE $(OBJS),$(OBJS)) InstallDynamicModule($(LIBNAME),$(MODULEDIR),dri) #ifdef GlxSoProf SOPROF_LIBNAME = _sis_dri_p -NormalDepLibraryTarget($(SOPROF_LIBNAME),$(ALL_DEPS),$(ALL_OBJS)) +NormalDepLibraryTarget($(SOPROF_LIBNAME),DONE $(OBJS),$(OBJS)) InstallLibrary($(SOPROF_LIBNAME),$(MODULEDIR)/dri) #endif #endif DependTarget() + Index: xc/lib/GL/mesa/src/drv/sis/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/drv/sis/Imakefile.inc:1.1 --- /dev/null Mon Jun 4 12:37:37 2001 +++ xc/lib/GL/mesa/src/drv/sis/Imakefile.inc Fri Mar 23 14:18:43 2001 @@ -0,0 +1,149 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/sis/Imakefile.inc,v 1.1 2001/03/23 19:18:43 dawes Exp $ + +#ifndef MesaDrvSrcDir +#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv +#endif + +MESADRVSRCDIR = MesaDrvSrcDir + +#ifndef MesaDrvSisBuildDir +#define MesaDrvSisBuildDir /**/ +#endif +MESADRVSISBUILDDIR = MesaDrvSisBuildDir + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + +#if BuildXF86DRI + DRI_DEFINES = GlxDefines $(SIS_DEFINES) + DRI_INCLUDES = -I$(GLXLIBSRC)/dri -I$(GLXLIBSRC)/glx \ + -I$(INCLUDESRC) -I$(INCLUDESRC)/GL \ + -I$(GLXLIBSRC)/mesa/dri \ + -I$(SERVERSRC)/GL/dri \ + -I$(XF86OSSRC) \ + -I$(XF86DRIVERSRC)/sis \ + -I$(GLXLIBSRC)/dri/drm \ + -I$(GLXLIBSRC)/mesa/src/X +#endif + +MESA_INCLUDES = -I$(MESASRCDIR)/src -I$(MESASRCDIR)/include \ + -I$(MESADRVSRCDIR)/common -I$(MESADRVSRCDIR)/sis + X_INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) + +#if 0 + DEBUG_SRC = $(MESADRVSISBUILDDIR)sis_debug.c + DEBUG_OBJ = $(MESADRVSISBUILDDIR)sis_debug.o + DEBUG_UOBJ = $(MESADRVSISBUILDDIR)unshared/sis_debug.o + DEBUG_DOBJ = $(MESADRVSISBUILDDIR)debugger/sis_debug.o + DEBUG_POBJ = $(MESADRVSISBUILDDIR)profiled/sis_debug.o + DEBUG_DEFINES += -DSIS_DUMP +#ifdef NeedToLinkMesaSrc +LinkSourceFile(sis_debug.c, $(MESADRVSRCDIR)/sis) +#endif +#endif + +#if 0 + STEREO_SRC = $(MESADRVSISBUILDDIR)sis_stereo.c + STEREO_OBJ = $(MESADRVSISBUILDDIR)sis_stereo.o + STEREO_UOBJ = $(MESADRVSISBUILDDIR)unshared/sis_stereo.o + STEREO_DOBJ = $(MESADRVSISBUILDDIR)debugger/sis_stereo.o + STEREO_POBJ = $(MESADRVSISBUILDDIR)profiled/sis_stereo.o + STEREO_DEFINES = -DSIS_STEREO=1 +#ifdef NeedToLinkMesaSrc +LinkSourceFile(sis_stereo.c, $(MESADRVSRCDIR)/sis) +#endif +#else + STEREO_DEFINES = -DSIS_STEREO=0 +#endif + + SISSRCS = $(MESADRVSISBUILDDIR)sis_render.c \ + $(MESADRVSISBUILDDIR)sis_mesa.c \ + $(MESADRVSISBUILDDIR)sis_ctx.c \ + $(MESADRVSISBUILDDIR)sis_alloc.c \ + $(MESADRVSISBUILDDIR)sis_fog.c \ + $(MESADRVSISBUILDDIR)sis_clear.c \ + $(MESADRVSISBUILDDIR)sis_stencil.c \ + $(MESADRVSISBUILDDIR)sis_texture.c \ + $(MESADRVSISBUILDDIR)sis_xwin.c \ + $(MESADRVSISBUILDDIR)sis_xmesa.c \ + $(MESADRVSISBUILDDIR)sis_span.c \ + $(MESADRVSISBUILDDIR)sis_fastpath.c \ + $(DEBUG_SRC) \ + $(STEREO_SRC) + + SISOBJS = $(MESADRVSISBUILDDIR)sis_render.o \ + $(MESADRVSISBUILDDIR)sis_mesa.o \ + $(MESADRVSISBUILDDIR)sis_ctx.o \ + $(MESADRVSISBUILDDIR)sis_alloc.o \ + $(MESADRVSISBUILDDIR)sis_fog.o \ + $(MESADRVSISBUILDDIR)sis_clear.o \ + $(MESADRVSISBUILDDIR)sis_stencil.o \ + $(MESADRVSISBUILDDIR)sis_texture.o \ + $(MESADRVSISBUILDDIR)sis_xwin.o \ + $(MESADRVSISBUILDDIR)sis_xmesa.o \ + $(MESADRVSISBUILDDIR)sis_span.o \ + $(MESADRVSISBUILDDIR)sis_fastpath.o \ + $(DEBUG_OBJ) \ + $(STEREO_OBJ) + + SISUOBJS = $(MESADRVSISBUILDDIR)unshared/sis_render.o \ + $(MESADRVSISBUILDDIR)unshared/sis_mesa.o \ + $(MESADRVSISBUILDDIR)unshared/sis_ctx.o \ + $(MESADRVSISBUILDDIR)unshared/sis_alloc.o \ + $(MESADRVSISBUILDDIR)unshared/sis_fog.o \ + $(MESADRVSISBUILDDIR)unshared/sis_clear.o \ + $(MESADRVSISBUILDDIR)unshared/sis_stencil.o \ + $(MESADRVSISBUILDDIR)unshared/sis_texture.o \ + $(MESADRVSISBUILDDIR)unshared/sis_xwin.o \ + $(MESADRVSISBUILDDIR)unshared/sis_xmesa.o \ + $(MESADRVSISBUILDDIR)unshared/sis_span.o \ + $(MESADRVSISBUILDDIR)unshared/sis_fastpath.o \ + $(DEBUG_UOBJ) \ + $(STEREO_UOBJ) + + SISDOBJS = $(MESADRVSISBUILDDIR)debugger/sis_render.o \ + $(MESADRVSISBUILDDIR)debugger/sis_mesa.o \ + $(MESADRVSISBUILDDIR)debugger/sis_ctx.o \ + $(MESADRVSISBUILDDIR)debugger/sis_alloc.o \ + $(MESADRVSISBUILDDIR)debugger/sis_fog.o \ + $(MESADRVSISBUILDDIR)debugger/sis_clear.o \ + $(MESADRVSISBUILDDIR)debugger/sis_stencil.o \ + $(MESADRVSISBUILDDIR)debugger/sis_texture.o \ + $(MESADRVSISBUILDDIR)debugger/sis_xwin.o \ + $(MESADRVSISBUILDDIR)debugger/sis_xmesa.o \ + $(MESADRVSISBUILDDIR)debugger/sis_span.o \ + $(MESADRVSISBUILDDIR)debugger/sis_fastpath.o \ + $(DEBUG_DOBJ) \ + $(STEREO_DOBJ) + + SISPOBJS = $(MESADRVSISBUILDDIR)profiled/sis_render.o \ + $(MESADRVSISBUILDDIR)profiled/sis_mesa.o \ + $(MESADRVSISBUILDDIR)profiled/sis_ctx.o \ + $(MESADRVSISBUILDDIR)profiled/sis_alloc.o \ + $(MESADRVSISBUILDDIR)profiled/sis_fog.o \ + $(MESADRVSISBUILDDIR)profiled/sis_clear.o \ + $(MESADRVSISBUILDDIR)profiled/sis_stencil.o \ + $(MESADRVSISBUILDDIR)profiled/sis_texture.o \ + $(MESADRVSISBUILDDIR)profiled/sis_xwin.o \ + $(MESADRVSISBUILDDIR)profiled/sis_xmesa.o \ + $(MESADRVSISBUILDDIR)profiled/sis_span.o \ + $(MESADRVSISBUILDDIR)profiled/sis_fastpath.o \ + $(DEBUG_POBJ) \ + $(STEREO_POBJ) + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(sis_render.c, $(MESADRVSRCDIR)/sis) +LinkSourceFile(sis_mesa.c, $(MESADRVSRCDIR)/sis) +LinkSourceFile(sis_ctx.c, $(MESADRVSRCDIR)/sis) +LinkSourceFile(sis_alloc.c, $(MESADRVSRCDIR)/sis) +LinkSourceFile(sis_fog.c, $(MESADRVSRCDIR)/sis) +LinkSourceFile(sis_clear.c, $(MESADRVSRCDIR)/sis) +LinkSourceFile(sis_stencil.c, $(MESADRVSRCDIR)/sis) +LinkSourceFile(sis_texture.c, $(MESADRVSRCDIR)/sis) +LinkSourceFile(sis_xwin.c, $(MESADRVSRCDIR)/sis) +LinkSourceFile(sis_xmesa.c, $(MESADRVSRCDIR)/sis) +LinkSourceFile(sis_span.c, $(MESADRVSRCDIR)/sis) +LinkSourceFile(sis_fastpath.c, $(MESADRVSRCDIR)/sis) +#endif + Index: xc/lib/GL/mesa/src/drv/sis/sis_alloc.c diff -u xc/lib/GL/mesa/src/drv/sis/sis_alloc.c:1.6 xc/lib/GL/mesa/src/drv/sis/sis_alloc.c:1.7 --- xc/lib/GL/mesa/src/drv/sis/sis_alloc.c:1.6 Tue Sep 26 11:56:48 2000 +++ xc/lib/GL/mesa/src/drv/sis/sis_alloc.c Sun Jan 7 20:07:29 2001 @@ -24,7 +24,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_alloc.c,v 1.6 2000/09/26 15:56:48 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_alloc.c,v 1.7 2001/01/08 01:07:29 martin Exp $ */ /* * Authors: @@ -40,7 +40,9 @@ #if defined(XFree86Server) && !defined(XF86DRI) # include "xf86fbman.h" #else +# define CONFIG_DRM_SIS # include "drm.h" +# undef CONFIG_DRM_SIS # include "sis_drm.h" # include #endif Index: xc/lib/GL/mesa/src/drv/sis/sis_span.c diff -u xc/lib/GL/mesa/src/drv/sis/sis_span.c:1.4 xc/lib/GL/mesa/src/drv/sis/sis_span.c:1.5 --- xc/lib/GL/mesa/src/drv/sis/sis_span.c:1.4 Tue Sep 26 11:56:49 2000 +++ xc/lib/GL/mesa/src/drv/sis/sis_span.c Wed Mar 21 11:14:26 2001 @@ -24,7 +24,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_span.c,v 1.4 2000/09/26 15:56:49 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_span.c,v 1.5 2001/03/21 16:14:26 dawes Exp $ */ /* * Authors: @@ -51,14 +51,15 @@ #define CLIPPIXEL(_x,_y) (_x >= minx && _x < maxx && \ _y >= miny && _y < maxy) -#define CLIPSPAN(_x,_y,_n,_x1,_n1,_i) \ - if (_y < miny || _y >= maxy) _n1 = 0, _x1 = x; \ - else { \ - _n1 = _n; \ - _x1 = _x; \ - if (_x1 < minx) _i += (minx - _x1), _x1 = minx; \ - if (_x1 + _n1 > maxx) n1 -= (_x1 + n1 - maxx); \ - } +#define CLIPSPAN( _x, _y, _n, _x1, _n1, _i ) \ + if ( _y < miny || _y >= maxy ) { \ + _n1 = 0, _x1 = x; \ + } else { \ + _n1 = _n; \ + _x1 = _x; \ + if ( _x1 < minx ) _i += (minx-_x1), n1 -= (minx-_x1), _x1 = minx; \ + if ( _x1 + _n1 >= maxx ) n1 -= (_x1 + n1 - maxx); \ + } #define HW_LOCK() do{}while(0); Index: xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c diff -u xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c:1.6 xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c:1.9.2.1 --- xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c:1.6 Thu Dec 7 15:26:10 2000 +++ xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c Tue May 22 17:25:41 2001 @@ -24,7 +24,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c,v 1.6 2000/12/07 20:26:10 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c,v 1.9.2.1 2001/05/22 21:25:41 dawes Exp $ */ /* * Authors: @@ -75,6 +75,39 @@ GLboolean XMesaInitDriver (__DRIscreenPrivate * driScrnPriv) { SISDRIPtr priv = (SISDRIPtr) driScrnPriv->pDevPriv; + + /* Check the DRI version */ + { + int major, minor, patch; + if (XF86DRIQueryVersion(driScrnPriv->display, &major, &minor, &patch)) { + if (major != 4 || minor < 0) { + char msg[1000]; + sprintf(msg, "sis DRI driver expected DRI version 4.0.x but got version %d.%d.%d", major, minor, patch); + __driMesaMessage(msg); + return GL_FALSE; + } + } + } + + /* Check that the DDX driver version is compatible */ + if (driScrnPriv->ddxMajor != 0 || + driScrnPriv->ddxMinor != 1 || + driScrnPriv->ddxPatch < 0) { + char msg[1000]; + sprintf(msg, "sis DRI driver expected DDX driver version 0.1.x but got version %d.%d.%d", driScrnPriv->ddxMajor, driScrnPriv->ddxMinor, driScrnPriv->ddxPatch); + __driMesaMessage(msg); + return GL_FALSE; + } + + /* Check that the DRM driver version is compatible */ + if (driScrnPriv->drmMajor != 1 || + driScrnPriv->drmMinor != 0 || + driScrnPriv->drmPatch < 0) { + char msg[1000]; + sprintf(msg, "sis DRI driver expected DRM driver version 1.0.x but got version %d.%d.%d", driScrnPriv->drmMajor, driScrnPriv->drmMinor, driScrnPriv->drmPatch); + __driMesaMessage(msg); + return GL_FALSE; + } assert (driScrnPriv->devPrivSize == sizeof (SISDRIRec)); Index: xc/lib/GL/mesa/src/drv/tdfx/BUGS diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/BUGS:1.1 --- /dev/null Mon Jun 4 12:37:37 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/BUGS Wed Mar 21 11:14:26 2001 @@ -0,0 +1,64 @@ +REMOVE THIS FILE BEFORE MERGING WITH TRUNK +------------------------------------------ + +OUTSTANDING BUGS + +demos/reflect - reading back Z on Voodoo3, image offset to right + Fixed in latest Glide. + +Q3 - some polygons drawn as vertical strips, similar to bug that was + seen in demos/fire. Voodoo3 only. May be related to glDepthMask + or glColorMask. + +book/fog - not fogging + Fog in orthograph mode still not implemented. Checking with + 3dfx engineers for ideas. + +Q3 demo crashes after changing display settings + but the full Q3 game version seems OK. + + + +MORE OUTSTANDING BUGS + +private context was NULL! causing immediate failure of any glx prog. cant +reproduce after restarting the X server. putting it down as halluc. + +texture object image was NULL, causing segmentation failure. happens with +prboom. ive put a check in tdfx_texstate.c but this isn't a fix. + +prboom, wall textures near first chainsaw aren't bound properly. sideways +movements causes the wall textures to move with you. prboom busted? + +16bpp mode, quake3, windowed, q3dm1, floor under rocketlauncher bands. it +looks like multitexturing gone wrong. i'll disable a tmu and test. + +sof, polygons appear at wrong x,y,z positions, intermittent, have not yet +found reliable way of reproducing. culling? sometimes polys disappear. + +descent3 is all black in 16bpp mode - FIXED (palette problems) + +smeared pixels in quake3 - FIXED (texture memory overlapped FB) + + + +PERFORMANCE COMPARISON (Brian / Alan) + + V3/16 is Voodoo3 in 16bpp on a P3/500 + V5/16 is Voodoo5 in 16bpp on a P3/600 + V5/32 is Voodoo5 in 32bpp on a P3/600 + V5A/16 is Voodoo5 in 16bpp on an Alpha AXP/600 + V5A/32 is Voodoo5 in 32bpp on an Alpha AXP/600 + + tdfx-2-1-branch tdfx-3-0-0-branch +demo V3/16 V5/16 V5/32 V3/16 V5/16 V5/32 V5A/16 V5A/32 +------------------------------------------------------------------------ +gloss 257 183 174 320 308 177 313 167 +fire 42 39 52 41 +fire (no help) 98 80 50 106 113 73 124 80 +tunnel 61 50 70 58 +tunnel (no help) 167 142 57 138 152 113 171 122 +gears 663 554 540 881 1232 776 1484 830 +teapot 20 21 37 36 +teapot (no help) 22 14 14 24 30 30 43 42 + Index: xc/lib/GL/mesa/src/drv/tdfx/Imakefile diff -u xc/lib/GL/mesa/src/drv/tdfx/Imakefile:1.19 xc/lib/GL/mesa/src/drv/tdfx/Imakefile:1.25.2.1 --- xc/lib/GL/mesa/src/drv/tdfx/Imakefile:1.19 Tue Dec 12 18:24:28 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/Imakefile Fri Jun 1 03:42:23 2001 @@ -1,330 +1,42 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile,v 1.19 2000/12/12 23:24:28 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile,v 1.25.2.1 2001/06/01 07:42:23 alanh Exp $ #include -#define DoNormalLib NormalLibGlx -#define DoSharedLib SharedLibGlx +#if GlxUseBuiltInDRIDriver +#define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) +#define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) #define DoExtraLib SharedLibGlx #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx - -#if Malloc0ReturnsNull -ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#else +#define DoNormalLib SharedLibGlxWithoutPIC +#define DoSharedLib !SharedLibGlxWithoutPIC +#define DoExtrasLib NO +#define DoDebugLib NO +#define DoProfileLib NO #endif +#include "../common/Imakefile.inc" +#include "Imakefile.inc" +#include "../../Imakefile.inc" #ifdef i386Architecture -#if MesaUseMMX - MMX_DEFS = -DUSE_MMX_ASM -#endif -#if MesaUse3DNow - 3DNOW_DEFS = -DUSE_3DNOW_ASM -#endif -#if MesaUseKatmai - KATMAI_DEFS = -DUSE_KATMAI_ASM -#endif - ASM_DEFINES = -DUSE_X86_ASM $(MMX_DEFS) $(3DNOW_DEFS) $(KATMAI_DEFS) -#endif - -#if BuildXF86DRI - DRI_DEFINES = GlxDefines -DFX_GLIDE3 -DDRIVERTS - DRI_INCLUDES = -I../../../../dri -I../../../../glx \ - -I../../../dri \ - -I$(TOP)/include -I$(TOP)/include/GL \ - -I$(XF86OSSRC) -I$(SERVERSRC)/GL/dri \ - -I$(XF86DRIVERSRC)/tdfx \ - -I../../../include -I../.. -I../../X -I../common +#include "../../X86/Imakefile.inc" #endif -MESA_INCLUDES = -I. -I.. -I../../include + DEPEND_DEFINES = -D__linux__ - DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(ASM_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) $(MESA_INCLUDES) $(DRI_INCLUDES) \ + DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(MESA_ASM_DEFINES) + INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES) \ -I$(GLIDE3INCDIR) - DRISRCS = ../../../dri/dri_mesa.c \ - ../../../../dri/dri_tmm.c + DRIOBJS = $(GLXLIBSRC)/mesa/dri/dri_mesa.o \ + $(GLXLIBSRC)/dri/dri_tmm.o - DRIOBJS = ../../../dri/dri_mesa.o \ - ../../../../dri/dri_tmm.o - - DRMSRCS = ../../../../dri/drm/xf86drm.c \ - ../../../../dri/drm/xf86drmHash.c \ - ../../../../dri/drm/xf86drmRandom.c \ - ../../../../dri/drm/xf86drmSL.c - - DRMOBJS = ../../../../dri/drm/xf86drm.o \ - ../../../../dri/drm/xf86drmHash.o \ - ../../../../dri/drm/xf86drmRandom.o \ - ../../../../dri/drm/xf86drmSL.o - - TDFXSRCS = tdfx_xmesa.c \ - tdfx_init.c \ - tdfx_inithw.c \ - fxclip.c \ - fxcva.c \ - fxdd.c \ - fxddspan.c \ - fxddtex.c \ - fxfastpath.c \ - fxglidew.c \ - fxpipeline.c \ - fxrender.c \ - fxsanity.c \ - fxsetup.c \ - fxtexman.c \ - fxtrifuncs.c \ - fxvsetup.c - - TDFXOBJS = tdfx_xmesa.o \ - tdfx_init.o \ - tdfx_inithw.o \ - fxclip.o \ - fxcva.o \ - fxdd.o \ - fxddspan.o \ - fxddtex.o \ - fxfastpath.o \ - fxglidew.o \ - fxpipeline.o \ - fxrender.o \ - fxsanity.o \ - fxsetup.o \ - fxtexman.o \ - fxtrifuncs.o \ - fxvsetup.o - - MESASRCS = ../../aatriangle.c \ - ../../accum.c \ - ../../alpha.c \ - ../../alphabuf.c \ - ../../attrib.c \ - ../../bbox.c \ - ../../bitmap.c \ - ../../blend.c \ - ../../buffers.c \ - ../../clip.c \ - ../../colortab.c \ - ../../config.c \ - ../../context.c \ - ../../copypix.c \ - ../../cva.c \ - ../../debug_xform.c \ - ../../depth.c \ - ../../dlist.c \ - ../../drawpix.c \ - ../../enable.c \ - ../../enums.c \ - ../../eval.c \ - ../../extensions.c \ - ../../feedback.c \ - ../../fog.c \ - ../../get.c \ - ../../glapi.c \ - ../../glapinoop.c \ - ../../glthread.c \ - ../../hash.c \ - ../../image.c \ - ../../imaging.c \ - ../../light.c \ - ../../lines.c \ - ../../logic.c \ - ../../masking.c \ - ../../matrix.c \ - ../../mem.c \ - ../../mmath.c \ - ../../pb.c \ - ../../pipeline.c \ - ../../pixel.c \ - ../../pixeltex.c \ - ../../points.c \ - ../../polygon.c \ - ../../quads.c \ - ../../rastpos.c \ - ../../readpix.c \ - ../../rect.c \ - ../../scissor.c \ - ../../shade.c \ - ../../span.c \ - ../../stages.c \ - ../../state.c \ - ../../stencil.c \ - ../../teximage.c \ - ../../texobj.c \ - ../../texstate.c \ - ../../texture.c \ - ../../texutil.c \ - ../../translate.c \ - ../../triangle.c \ - ../../varray.c \ - ../../vb.c \ - ../../vbcull.c \ - ../../vbfill.c \ - ../../vbindirect.c \ - ../../vbrender.c \ - ../../vbxform.c \ - ../../vector.c \ - ../../vertices.c \ - ../../winpos.c \ - ../../xform.c \ - ../../zoom.c - - MESAOBJS = ../../aatriangle.o \ - ../../accum.o \ - ../../alpha.o \ - ../../alphabuf.o \ - ../../attrib.o \ - ../../bbox.o \ - ../../bitmap.o \ - ../../blend.o \ - ../../buffers.o \ - ../../clip.o \ - ../../colortab.o \ - ../../config.o \ - ../../context.o \ - ../../copypix.o \ - ../../cva.o \ - ../../debug_xform.o \ - ../../depth.o \ - ../../dlist.o \ - ../../drawpix.o \ - ../../enable.o \ - ../../enums.o \ - ../../eval.o \ - ../../extensions.o \ - ../../feedback.o \ - ../../fog.o \ - ../../get.o \ - ../../hash.o \ - ../../hint.o \ - ../../image.o \ - ../../imaging.o \ - ../../light.o \ - ../../lines.o \ - ../../logic.o \ - ../../masking.o \ - ../../matrix.o \ - ../../mem.o \ - ../../mmath.o \ - ../../pb.o \ - ../../pipeline.o \ - ../../pixel.o \ - ../../pixeltex.o \ - ../../points.o \ - ../../polygon.o \ - ../../quads.o \ - ../../rastpos.o \ - ../../readpix.o \ - ../../rect.o \ - ../../scissor.o \ - ../../shade.o \ - ../../span.o \ - ../../stages.o \ - ../../state.o \ - ../../stencil.o \ - ../../teximage.o \ - ../../texobj.o \ - ../../texstate.o \ - ../../texture.o \ - ../../texutil.o \ - ../../translate.o \ - ../../triangle.o \ - ../../varray.o \ - ../../vb.o \ - ../../vbcull.o \ - ../../vbfill.o \ - ../../vbindirect.o \ - ../../vbrender.o \ - ../../vbxform.o \ - ../../vector.o \ - ../../vertices.o \ - ../../winpos.o \ - ../../xform.o \ - ../../zoom.o - -#ifdef i386Architecture - X86_SRCS = ../../X86/common_x86.c \ - ../../X86/common_x86_asm.S \ - ../../X86/x86.c \ - ../../X86/x86_cliptest.S \ - ../../X86/x86_vertex.S \ - ../../X86/x86_xform_masked2.S \ - ../../X86/x86_xform_masked3.S \ - ../../X86/x86_xform_masked4.S \ - ../../X86/x86_xform_raw2.S \ - ../../X86/x86_xform_raw3.S \ - ../../X86/x86_xform_raw4.S - - X86_OBJS = ../../X86/common_x86.o \ - ../../X86/common_x86_asm.o \ - ../../X86/x86.o \ - ../../X86/x86_cliptest.o \ - ../../X86/x86_vertex.o \ - ../../X86/x86_xform_masked2.o \ - ../../X86/x86_xform_masked3.o \ - ../../X86/x86_xform_masked4.o \ - ../../X86/x86_xform_raw2.o \ - ../../X86/x86_xform_raw3.o \ - ../../X86/x86_xform_raw4.o - -#if MesaUseMMX - MMX_SRCS = ../../X86/mmx_blend.S - - MMX_OBJS = ../../X86/mmx_blend.o -#endif + DRMOBJS = $(GLXLIBSRC)/dri/drm/xf86drm.o \ + $(GLXLIBSRC)/dri/drm/xf86drmHash.o \ + $(GLXLIBSRC)/dri/drm/xf86drmRandom.o \ + $(GLXLIBSRC)/dri/drm/xf86drmSL.o -#if MesaUse3DNow - 3DNOW_SRCS = ../../X86/3dnow.c \ - ../../X86/3dnow_norm_raw.S \ - ../../X86/3dnow_vertex.S \ - ../../X86/3dnow_xform_masked1.S \ - ../../X86/3dnow_xform_masked2.S \ - ../../X86/3dnow_xform_masked3.S \ - ../../X86/3dnow_xform_masked4.S \ - ../../X86/3dnow_xform_raw1.S \ - ../../X86/3dnow_xform_raw2.S \ - ../../X86/3dnow_xform_raw3.S \ - ../../X86/3dnow_xform_raw4.S - - 3DNOW_OBJS = ../../X86/3dnow.o \ - ../../X86/3dnow_norm_raw.o \ - ../../X86/3dnow_vertex.o \ - ../../X86/3dnow_xform_masked1.o \ - ../../X86/3dnow_xform_masked2.o \ - ../../X86/3dnow_xform_masked3.o \ - ../../X86/3dnow_xform_masked4.o \ - ../../X86/3dnow_xform_raw1.o \ - ../../X86/3dnow_xform_raw2.o \ - ../../X86/3dnow_xform_raw3.o \ - ../../X86/3dnow_xform_raw4.o -#endif - -#if MesaUseKatmai - KATMAI_SRCS = ../../X86/katmai.c \ - ../../X86/katmai_norm_raw.S \ - ../../X86/katmai_vertex.S \ - ../../X86/katmai_xform_masked1.S \ - ../../X86/katmai_xform_masked2.S \ - ../../X86/katmai_xform_masked3.S \ - ../../X86/katmai_xform_masked4.S \ - ../../X86/katmai_xform_raw1.S \ - ../../X86/katmai_xform_raw2.S \ - ../../X86/katmai_xform_raw3.S \ - ../../X86/katmai_xform_raw4.S - - KATMAI_OBJS = ../../X86/katmai.o \ - ../../X86/katmai_norm_raw.o \ - ../../X86/katmai_vertex.o \ - ../../X86/katmai_xform_masked1.o \ - ../../X86/katmai_xform_masked2.o \ - ../../X86/katmai_xform_masked3.o \ - ../../X86/katmai_xform_masked4.o \ - ../../X86/katmai_xform_raw1.o \ - ../../X86/katmai_xform_raw2.o \ - ../../X86/katmai_xform_raw3.o \ - ../../X86/katmai_xform_raw4.o -#endif -#endif - #ifdef GlxSoProf LOSRCS = ../../../../lowpc.c HISRCS = ../../../../highpc.c @@ -333,46 +45,30 @@ HIOBJS = ../../../../highpc.o #endif - ASMSRCS = $(X86_SRCS) $(MMX_SRCS) $(3DNOW_SRCS) $(KATMAI_SRCS) - ASMOBJS = $(X86_OBJS) $(MMX_OBJS) $(3DNOW_OBJS) $(KATMAI_OBJS) + SRCS = $(TDFXSRCS) + OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ + $(MESA_ASM_OBJS) $(TDFXOBJS) $(HIOBJS) - SRCS = $(LOSRCS) $(DRISRCS) $(DRMSRCS) $(MESASRCS) \ - $(ASMSRCS) $(TDFXSRCS) $(HISRCS) - OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(MESAOBJS) \ - $(ASMOBJS) $(TDFXOBJS) $(HIOBJS) - -REQUIREDLIBS = -l$(GLIDE3LIBNAME) MathLibrary -#if !GlxBuiltInTdfx -REQUIREDLIBS += -L../../../.. -lGL -#endif +REQUIREDLIBS = -l$(GLIDE3LIBNAME) MathLibrary $(LDPRELIB) $(GLXLIB) - -#if !GlxUseBuiltInDRIDriver -#undef DoNormalLib NormalLibGlx -#undef DoExtraLib SharedLibGlx -#undef DoDebugLib DebugLibGlx -#undef DoProfileLib ProfileLibGlx -#endif - #include LibraryObjectRule() -SubdirLibraryRule($(OBJS)) +SubdirLibraryRule($(TDFXOBJS)) NormalLintTarget($(SRCS)) #if !GlxUseBuiltInDRIDriver LIBNAME = tdfx_dri.so -ALL_OBJS = $(OBJS) -ALL_DEPS = DONE -SharedDepModuleTarget($(LIBNAME),$(ALL_DEPS),$(ALL_OBJS)) +SharedDriModuleTarget($(LIBNAME),DONE $(OBJS),$(OBJS)) InstallDynamicModule($(LIBNAME),$(MODULEDIR),dri) #ifdef GlxSoProf SOPROF_LIBNAME = _tdfx_dri_p -NormalDepLibraryTarget($(SOPROF_LIBNAME),$(ALL_DEPS),$(ALL_OBJS)) +NormalDepLibraryTarget($(SOPROF_LIBNAME),DONE $(OBJS),$(OBJS)) InstallLibrary($(SOPROF_LIBNAME),$(MODULEDIR)/dri) #endif #endif DependTarget() + Index: xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc:1.2 --- /dev/null Mon Jun 4 12:37:38 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc Wed May 2 11:06:04 2001 @@ -0,0 +1,148 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc,v 1.2 2001/05/02 15:06:04 dawes Exp $ + +#ifndef MesaDrvSrcDir +#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv +#endif + +MESADRVSRCDIR = MesaDrvSrcDir + +#ifndef MesaDrvTdfxBuildDir +#define MesaDrvTdfxBuildDir /**/ +#endif +MESADRVTDFXBUILDDIR = MesaDrvTdfxBuildDir + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + +#if BuildXF86DRI + DRI_DEFINES = GlxDefines -DFX_GLIDE3 + DRI_INCLUDES = -I$(GLXLIBSRC)/dri -I$(GLXLIBSRC)/glx \ + -I$(INCLUDESRC) -I$(INCLUDESRC)/GL \ + -I$(GLXLIBSRC)/mesa/dri \ + -I$(SERVERSRC)/GL/dri \ + -I$(XF86OSSRC) \ + -I$(XF86DRIVERSRC)/tdfx \ + -I$(GLXLIBSRC)/dri/drm +#endif + +MESA_INCLUDES = -I$(MESASRCDIR)/src -I$(MESADRVSRCDIR)/common \ + -I$(MESADRVSRCDIR)/tdfx + X_INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) + + TDFXSRCS = $(MESADRVTDFXBUILDDIR)tdfx_context.c \ + $(MESADRVTDFXBUILDDIR)tdfx_dd.c \ + $(MESADRVTDFXBUILDDIR)tdfx_pixels.c \ + $(MESADRVTDFXBUILDDIR)tdfx_fastpath.c \ + $(MESADRVTDFXBUILDDIR)tdfx_g3ext.c \ + $(MESADRVTDFXBUILDDIR)tdfx_lock.c \ + $(MESADRVTDFXBUILDDIR)tdfx_pipeline.c \ + $(MESADRVTDFXBUILDDIR)tdfx_render.c \ + $(MESADRVTDFXBUILDDIR)tdfx_screen.c \ + $(MESADRVTDFXBUILDDIR)tdfx_span.c \ + $(MESADRVTDFXBUILDDIR)tdfx_state.c \ + $(MESADRVTDFXBUILDDIR)tdfx_tex.c \ + $(MESADRVTDFXBUILDDIR)tdfx_texman.c \ + $(MESADRVTDFXBUILDDIR)tdfx_texstate.c \ + $(MESADRVTDFXBUILDDIR)tdfx_tris.c \ + $(MESADRVTDFXBUILDDIR)tdfx_vb.c \ + $(MESADRVTDFXBUILDDIR)tdfx_wrapper.c \ + $(MESADRVTDFXBUILDDIR)tdfx_xmesa.c + + TDFXOBJS = $(MESADRVTDFXBUILDDIR)tdfx_context.o \ + $(MESADRVTDFXBUILDDIR)tdfx_dd.o \ + $(MESADRVTDFXBUILDDIR)tdfx_pixels.o \ + $(MESADRVTDFXBUILDDIR)tdfx_fastpath.o \ + $(MESADRVTDFXBUILDDIR)tdfx_g3ext.o \ + $(MESADRVTDFXBUILDDIR)tdfx_lock.o \ + $(MESADRVTDFXBUILDDIR)tdfx_pipeline.o \ + $(MESADRVTDFXBUILDDIR)tdfx_render.o \ + $(MESADRVTDFXBUILDDIR)tdfx_screen.o \ + $(MESADRVTDFXBUILDDIR)tdfx_span.o \ + $(MESADRVTDFXBUILDDIR)tdfx_state.o \ + $(MESADRVTDFXBUILDDIR)tdfx_tex.o \ + $(MESADRVTDFXBUILDDIR)tdfx_texman.o \ + $(MESADRVTDFXBUILDDIR)tdfx_texstate.o \ + $(MESADRVTDFXBUILDDIR)tdfx_tris.o \ + $(MESADRVTDFXBUILDDIR)tdfx_vb.o \ + $(MESADRVTDFXBUILDDIR)tdfx_wrapper.o \ + $(MESADRVTDFXBUILDDIR)tdfx_xmesa.o + + TDFXUOBJS = $(MESADRVTDFXBUILDDIR)unshared/tdfx_context.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_dd.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_pixels.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_fastpath.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_g3ext.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_lock.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_pipeline.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_render.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_screen.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_span.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_state.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_tex.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_texman.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_texstate.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_tris.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_vb.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_wrapper.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_xmesa.o + + TDFXDOBJS = $(MESADRVTDFXBUILDDIR)debugger/tdfx_context.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_dd.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_pixels.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_fastpath.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_g3ext.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_lock.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_pipeline.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_render.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_screen.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_span.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_state.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_tex.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_texman.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_texstate.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_tris.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_vb.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_wrapper.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_xmesa.o + + TDFXPOBJS = $(MESADRVTDFXBUILDDIR)profiled/tdfx_context.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_dd.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_pixels.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_fastpath.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_g3ext.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_lock.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_pipeline.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_render.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_screen.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_span.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_state.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_tex.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_texman.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_texstate.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_tris.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_vb.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_wrapper.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_xmesa.o + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(tdfx_context.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_dd.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_pixels.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_fastpath.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_g3ext.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_lock.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_pipeline.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_render.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_screen.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_span.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_state.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_tex.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_texman.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_texstate.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_tris.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_vb.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_wrapper.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_xmesa.c, $(MESADRVSRCDIR)/tdfx) +#endif + Index: xc/lib/GL/mesa/src/drv/tdfx/dri_glide.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/dri_glide.h:1.1 --- /dev/null Mon Jun 4 12:37:38 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/dri_glide.h Wed Mar 21 11:14:26 2001 @@ -0,0 +1,63 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/dri_glide.h,v 1.1 2001/03/21 16:14:26 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * + */ + +#ifndef __DRI_GLIDE_H__ +#define __DRI_GLIDE_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include +#include "dri_mesaint.h" + +/* + * This is the private interface between Glide and the DRI. + */ +extern void grDRIOpen( char *pFB, char *pRegs, int deviceID, + int width, int height, + int mem, int cpp, int stride, + int fifoOffset, int fifoSize, + int fbOffset, int backOffset, int depthOffset, + int textureOffset, int textureSize, + volatile int *fifoPtr, volatile int *fifoRead ); +extern void grDRIPosition( int x, int y, int w, int h, + int numClip, XF86DRIClipRectPtr pClip ); +extern void grDRILostContext( void ); +extern void grDRIImportFifo( int fifoPtr, int fifoRead ); +extern void grDRIInvalidateAll( void ); +extern void grDRIResetSAREA( void ); +extern void grDRIBufferSwap( FxU32 swapInterval ); +#endif +#endif Index: xc/lib/GL/mesa/src/drv/tdfx/fxclip.c diff -u xc/lib/GL/mesa/src/drv/tdfx/fxclip.c:1.2 xc/lib/GL/mesa/src/drv/tdfx/fxclip.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxclip.c:1.2 Fri Dec 8 14:36:23 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxclip.c Mon Jun 4 12:37:38 2001 @@ -1,488 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxclip.c,v 1.2 2000/12/08 19:36:23 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -#include "fxdrv.h" -#include "fxtexman.h" -#include "mmath.h" -#include "macros.h" -#include "vector.h" -#include "types.h" - - -#if 0 && defined(__i386__) -#define NEGATIVE(f) ((*(int *)&f) < 0) -#define DIFFERENT_SIGNS(a,b) (((*(int *)&a)^(*(int *)&b)) < 0) -#else -#define NEGATIVE(f) (f < 0) -#define DIFFERENT_SIGNS(a,b) ((a*b) < 0) -#endif - -#define LINTERP( T, A, B ) ( (A) + (T) * ( (B) - (A) ) ) - - -#define CLIP(sgn,v) \ -do { \ - GLuint out = in ^ 1; \ - GLfloat **indata = inlist[in]; \ - GrVertex **inverts = vertlist[in]; \ - GrVertex **outverts = vertlist[out]; \ - GLfloat **outdata = inlist[in = out]; \ - GLfloat *J = indata[n-1]; \ - GLfloat dpJ = (sgn J[v]) + J[3]; \ - GLuint nr = n; \ - \ - for (i = n = 0 ; i < nr ; i++) { \ - GLfloat *I = indata[i]; \ - GLfloat dpI = (sgn I[v]) + I[3]; \ - \ - if (DIFFERENT_SIGNS(dpI, dpJ)) { \ - GLuint j; \ - GLfloat t = dpI / (dpI - dpJ); \ - outverts[n] = 0; \ - outdata[n++] = store; \ - store[3] = LINTERP(t, I[3], J[3]); \ - store[v] = - sgn store[3]; \ - if (v != 0) store[0] = LINTERP(t, I[0], J[0]); \ - if (v != 1) store[1] = LINTERP(t, I[1], J[1]); \ - if (v != 2) store[2] = LINTERP(t, I[2], J[2]); \ - store += 4; \ - for (j = 4 ; j < sz ; j+=4,store+=4) { \ - store[0] = LINTERP(t, I[j], J[j] ); \ - store[1] = LINTERP(t, I[j+1], J[j+1] ); \ - store[2] = LINTERP(t, I[j+2], J[j+2] ); \ - store[3] = LINTERP(t, I[j+3], J[j+3] ); \ - } \ - } \ - \ - if (!NEGATIVE(dpI)) { \ - outverts[n] = inverts[i]; \ - outdata[n++] = I; \ - } \ - \ - \ - J = I; \ - dpJ = dpI; \ - } \ - \ - if (n < 3) return 0; \ -} while (0) - - -/* Originally used this for the viewclip planes as well, as in - * CLIP(-1,0,0,1), which was just as fast, but tended to lead to - * cracks. I haven't figured out exactly why this is, but the above - * code only really differs in the way it sets store[v] to +- w. - */ -#define UCLIP(a,b,c,d) \ -do { \ - GLuint out = in ^ 1; \ - GLfloat **indata = inlist[in]; \ - GrVertex **inverts = vertlist[in]; \ - GrVertex **outverts = vertlist[out]; \ - GLfloat **outdata = inlist[in = out]; \ - GLfloat *J = indata[n-1]; \ - GLfloat dpJ = DOT4V(J,a,b,c,d); \ - GLuint nr = n; \ - \ - for (i = n = 0 ; i < nr ; i++) { \ - GLfloat *I = indata[i]; \ - GLfloat dpI = DOT4V(I,a,b,c,d); \ - \ - if (DIFFERENT_SIGNS(dpI, dpJ)) { \ - GLuint j; \ - GLfloat t = dpI / (dpI - dpJ); \ - outverts[n] = 0; \ - outdata[n++] = store; \ - for (j = 0 ; j < sz ; j+=4,store+=4) { \ - store[0] = LINTERP(t, I[j], J[j] ); \ - store[1] = LINTERP(t, I[j+1], J[j+1] ); \ - store[2] = LINTERP(t, I[j+2], J[j+2] ); \ - store[3] = LINTERP(t, I[j+3], J[j+3] ); \ - } \ - } \ - \ - if (!NEGATIVE(dpI)) { \ - outverts[n] = inverts[i]; \ - outdata[n++] = I; \ - } \ - \ - \ - J = I; \ - dpJ = dpI; \ - } \ - \ - if (n < 3) return 0; \ -} while (0) - - - -/* Data parameter is organized as 4 clip coordinates followed by an - * arbitary number (sz-4) of additional data. The three original - * vertices are packed together at the start, and there is room for at - * least VB_MAX_CLIPPED_VERTS vertices of the same size in this - * storage. - * - */ -static INLINE GLuint -fx_clip_triangle(GLcontext * ctx, - GLfloat * inoutlist[], - GrVertex ** verts, GLuint sz, GLuint mask) -{ - GLuint n = 3; - GLfloat *store = inoutlist[n - 1] + sz; - GLfloat *vlist[VB_MAX_CLIPPED_VERTS]; - GrVertex *verts2[VB_MAX_CLIPPED_VERTS]; - GLfloat **inlist[2]; - GrVertex **vertlist[2]; - GLuint in = 0; - GLuint i; - - inlist[0] = inoutlist; - inlist[1] = vlist; - - vertlist[0] = verts; - vertlist[1] = verts2; - - if (mask & CLIP_ALL_BITS) { - if (mask & CLIP_RIGHT_BIT) - CLIP(-, 0); - - if (mask & CLIP_LEFT_BIT) - CLIP(+, 0); - - if (mask & CLIP_TOP_BIT) - CLIP(-, 1); - - if (mask & CLIP_BOTTOM_BIT) - CLIP(+, 1); - - if (mask & CLIP_FAR_BIT) - CLIP(-, 2); - - if (mask & CLIP_NEAR_BIT) - CLIP(+, 2); - } - - if (mask & CLIP_USER_BIT) { - GLuint bit; - GLfloat(*plane)[4] = &ctx->Transform.ClipUserPlane[0]; - for (bit = 0x100; bit < mask; plane++, bit *= 2) { - if (mask & bit) { - GLfloat a = plane[0][0]; - GLfloat b = plane[0][1]; - GLfloat c = plane[0][2]; - GLfloat d = plane[0][3]; - UCLIP(a, b, c, d); - } - } - } - - if (inlist[in] != inoutlist) - for (i = 0; i < n; i++) { - inoutlist[i] = inlist[in][i]; - verts[i] = verts2[i]; - } - - return n; -} - - - -static INLINE GLuint -fx_view_clip_triangle(GLcontext * ctx, - GLfloat * inoutlist[], - GrVertex ** verts, GLuint sz, GLubyte mask) -{ - GLuint n = 3; - GLfloat *store = inoutlist[n - 1] + sz; - GLfloat *vlist[VB_MAX_CLIPPED_VERTS]; - GrVertex *verts2[VB_MAX_CLIPPED_VERTS]; - GLfloat **inlist[2]; - GrVertex **vertlist[2]; - GLuint in = 0; - GLuint i; - - inlist[0] = inoutlist; - inlist[1] = vlist; - - vertlist[0] = verts; - vertlist[1] = verts2; - - if (mask & CLIP_RIGHT_BIT) - CLIP(-, 0); - - if (mask & CLIP_LEFT_BIT) - CLIP(+, 0); - - if (mask & CLIP_TOP_BIT) - CLIP(-, 1); - - if (mask & CLIP_BOTTOM_BIT) - CLIP(+, 1); - - if (mask & CLIP_FAR_BIT) - CLIP(-, 2); - - if (mask & CLIP_NEAR_BIT) - CLIP(+, 2); - - if (inlist[in] != inoutlist) - for (i = 0; i < n; i++) { - inoutlist[i] = inlist[in][i]; - verts[i] = verts2[i]; - } - - return n; -} - - - -#undef CLIP - -#define CLIP(x,y,z,w) \ -do { \ - GLfloat dpI = DOT4V(I,x,y,z,w); \ - GLfloat dpJ = DOT4V(J,x,y,z,w); \ - \ - if (DIFFERENT_SIGNS(dpI, dpJ)) { \ - GLuint j; \ - GLfloat t = dpI / (dpI - dpJ); \ - GLfloat *tmp = store; \ - \ - for (j = 0 ; j < sz ; j+=2) { \ - *store++ = LINTERP(t, I[j], J[j] ); \ - *store++ = LINTERP(t, I[j+1], J[j+1] ); \ - } \ - \ - if (NEGATIVE(dpI)) \ - I = tmp; \ - else \ - J = tmp; \ - \ - } \ - else if (NEGATIVE(dpI)) \ - return 0; \ - \ -} while (0) - - -static GLuint -fx_clip_line(GLcontext * ctx, - GLfloat * inoutlist[], GLuint sz, GLubyte clipor) -{ - GLfloat *I = inoutlist[0]; - GLfloat *J = inoutlist[1]; - GLfloat *store = J + sz; - - if (clipor & CLIP_ALL_BITS) { - if (clipor & CLIP_LEFT_BIT) - CLIP(1, 0, 0, 1); - - if (clipor & CLIP_RIGHT_BIT) - CLIP(-1, 0, 0, 1); - - if (clipor & CLIP_TOP_BIT) - CLIP(0, -1, 0, 1); - - if (clipor & CLIP_BOTTOM_BIT) - CLIP(0, 1, 0, 1); - - if (clipor & CLIP_FAR_BIT) - CLIP(0, 0, -1, 1); - - if (clipor & CLIP_NEAR_BIT) - CLIP(0, 0, 1, 1); - } - - if (clipor & CLIP_USER_BIT) { - GLuint i; - for (i = 0; i < MAX_CLIP_PLANES; i++) { - if (ctx->Transform.ClipEnabled[i]) { - GLfloat a = ctx->Transform.ClipUserPlane[i][0]; - GLfloat b = ctx->Transform.ClipUserPlane[i][1]; - GLfloat c = ctx->Transform.ClipUserPlane[i][2]; - GLfloat d = ctx->Transform.ClipUserPlane[i][3]; - CLIP(a, b, c, d); - } - } - } - - inoutlist[0] = I; - inoutlist[1] = J; - - return 2; -} - - -/* Add window offset to window coords to get screen coords */ - -#define VARS_XYZW \ - GLfloat vsx = mat[MAT_SX]; \ - GLfloat vsy = mat[MAT_SY]; \ - GLfloat vsz = mat[MAT_SZ]; \ - GLfloat vtx = mat[MAT_TX]+fxMesa->x_offset; \ - GLfloat vty = mat[MAT_TY]+fxMesa->y_delta; \ - GLfloat vtz = mat[MAT_TZ]; - -#define DO_SETUP_XYZW \ -{ \ - GLfloat oow = 1.0 / data[3]; \ - v->x = data[0]*oow*vsx + vtx; \ - v->y = data[1]*oow*vsy + vty; \ - v->ooz = data[2]*oow*vsz + vtz; \ - v->oow = oow; \ -} - - - -#define COPY_XYZW_STRIDE \ - { GLfloat *clip = VEC_ELT(VB->ClipPtr, GLfloat, e); \ - COPY_4FV(out, clip); } - -#define VARS_RGBA - -#define COPY_RGBA_STRIDE \ - { GLubyte *color = VEC_ELT(VB->ColorPtr, GLubyte, e); \ - UBYTE_RGBA_TO_FLOAT_255_RGBA((out+4), color); } - -#if FX_USE_PARGB -#define DO_SETUP_RGBA \ - PACK_4F_ARGB(GET_PARGB(v), data[4+3], data[4+0], data[4+1], data[4+2]); -#else -#define DO_SETUP_RGBA \ - v->r = data[4+0]; \ - v->g = data[4+1]; \ - v->b = data[4+2]; \ - v->a = data[4+3]; -#endif /* FX_USE_PARGB */ - -#define VARS_TMU0 \ - struct gl_texture_unit *t0 = &ctx->Texture.Unit[tmu0_source]; \ - GLfloat sScale0 = fxTMGetTexInfo(t0->Current)->sScale; \ - GLfloat tScale0 = fxTMGetTexInfo(t0->Current)->tScale; \ - - -#define COPY_TMU0_STRIDE(offset) \ - { GLfloat *tc0 = VEC_ELT(tc0_vec, GLfloat, e); \ - COPY_2V((out+offset), tc0); } - - -#define DO_SETUP_TMU0(offset) \ - v->tmuvtx[0].sow = data[offset+0]*sScale0*v->oow; \ - v->tmuvtx[0].tow = data[offset+1]*tScale0*v->oow; - -#define VARS_TMU1 \ - struct gl_texture_unit *t1 = &ctx->Texture.Unit[tmu1_source]; \ - GLfloat sScale1 = fxTMGetTexInfo(t1->Current)->sScale; \ - GLfloat tScale1 = fxTMGetTexInfo(t1->Current)->tScale; - -#define COPY_TMU1_STRIDE(offset) \ - { GLfloat *tc1 = VEC_ELT(tc1_vec, GLfloat, e); \ - COPY_2V((out+offset), tc1); } - - -#define DO_SETUP_TMU1(offset) \ - v->tmuvtx[1].sow = data[offset+0]*sScale1*v->oow; \ - v->tmuvtx[1].tow = data[offset+1]*tScale1*v->oow; - -#define COPY_NIL(offset) ASSIGN_2V((out+offset), 0, 0); - -#define IND 0 -#define TAG(x) x##_nil -#include "fxcliptmp.h" - -#define IND SETUP_RGBA -#define TAG(x) x##_RGBA -#include "fxcliptmp.h" - -#define IND SETUP_TMU0 -#define TAG(x) x##_TMU0 -#include "fxcliptmp.h" - -#define IND (SETUP_TMU0|SETUP_TMU1) -#define TAG(x) x##_TMU0_TMU1 -#include "fxcliptmp.h" - -#define IND (SETUP_RGBA|SETUP_TMU0) -#define TAG(x) x##_RGBA_TMU0 -#include "fxcliptmp.h" - -#define IND (SETUP_RGBA|SETUP_TMU0|SETUP_TMU1) -#define TAG(x) x##_RGBA_TMU0_TMU1 -#include "fxcliptmp.h" - -tfxTriViewClipFunc fxTriViewClipTab[0x8]; -tfxTriClipFunc fxTriClipStrideTab[0x8]; -tfxLineClipFunc fxLineClipTab[0x8]; - - -void -fxDDClipInit() -{ - fxTriViewClipTab[0] = fx_tri_view_clip_nil; - fxTriViewClipTab[SETUP_RGBA] = fx_tri_view_clip_RGBA; - fxTriViewClipTab[SETUP_TMU0] = fx_tri_view_clip_TMU0; - fxTriViewClipTab[SETUP_TMU0 | SETUP_TMU1] = fx_tri_view_clip_TMU0_TMU1; - fxTriViewClipTab[SETUP_RGBA | SETUP_TMU0] = fx_tri_view_clip_RGBA_TMU0; - fxTriViewClipTab[SETUP_RGBA | SETUP_TMU0 | SETUP_TMU1] = - fx_tri_view_clip_RGBA_TMU0_TMU1; - - fxTriClipStrideTab[0] = fx_tri_clip_stride_nil; - fxTriClipStrideTab[SETUP_RGBA] = fx_tri_clip_stride_RGBA; - fxTriClipStrideTab[SETUP_TMU0] = fx_tri_clip_stride_TMU0; - fxTriClipStrideTab[SETUP_TMU0 | SETUP_TMU1] = - fx_tri_clip_stride_TMU0_TMU1; - fxTriClipStrideTab[SETUP_RGBA | SETUP_TMU0] = - fx_tri_clip_stride_RGBA_TMU0; - fxTriClipStrideTab[SETUP_RGBA | SETUP_TMU0 | SETUP_TMU1] = - fx_tri_clip_stride_RGBA_TMU0_TMU1; - - fxLineClipTab[0] = fx_line_clip_nil; - fxLineClipTab[SETUP_RGBA] = fx_line_clip_RGBA; - fxLineClipTab[SETUP_TMU0] = fx_line_clip_TMU0; - fxLineClipTab[SETUP_TMU0 | SETUP_TMU1] = fx_line_clip_TMU0_TMU1; - fxLineClipTab[SETUP_RGBA | SETUP_TMU0] = fx_line_clip_RGBA_TMU0; - fxLineClipTab[SETUP_RGBA | SETUP_TMU0 | SETUP_TMU1] = - fx_line_clip_RGBA_TMU0_TMU1; -} Index: xc/lib/GL/mesa/src/drv/tdfx/fxcliptmp.h diff -u xc/lib/GL/mesa/src/drv/tdfx/fxcliptmp.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/fxcliptmp.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxcliptmp.h:1.1 Sun Sep 24 09:51:13 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxcliptmp.h Mon Jun 4 12:37:38 2001 @@ -1,353 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxcliptmp.h,v 1.1 2000/09/24 13:51:13 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -#define V1 VARS_XYZW -#define S1 DO_SETUP_XYZW -#define T1 COPY_XYZW_STRIDE -#define Z1 4 - -#if (IND & SETUP_RGBA) -#define V2 V1 VARS_RGBA -#define S2 S1 DO_SETUP_RGBA -#define T2 T1 COPY_RGBA_STRIDE -#define Z2 (Z1 + 4) -#else -#define V2 V1 -#define S2 S1 -#define T2 T1 -#define Z2 Z1 -#endif - -#if (IND & SETUP_TMU0) -#define V3 V2 VARS_TMU0 -#define S3 S2 DO_SETUP_TMU0(Z2) -#define T3 T2 COPY_TMU0_STRIDE(Z2) -#define Z3 (Z2 + 2) -#else -#define V3 V2 -#define S3 S2 -#define T3 T2 -#define Z3 Z2 -#endif - -#if (IND & SETUP_TMU1) -#define V4 V3 VARS_TMU1 -#define S4 S3 DO_SETUP_TMU1(Z3) -#define T4 T3 COPY_TMU1_STRIDE(Z3) -#define Z4 (Z3 + 2) -#else -#define V4 V3 -#define S4 S3 -#define T4 T3 -#define Z4 Z3 -#endif - -#if (Z4 & 2) -#define SIZE (Z4+2) -#define COPY_STRIDE T4 COPY_NIL(Z4) -#else -#define SIZE Z4 -#define COPY_STRIDE T4 -#endif - -#define VARS V4 -#define SETUP S4 - -#define DRAW_LINE(fxMesa, tmp0, tmp1, width) \ - if (width <= 1.0) { \ - FX_grDrawLine(fxMesa, tmp0, tmp1); \ - } \ - else { \ - GrVertex verts[4]; \ - float dx, dy, ix, iy; \ - \ - dx = tmp0->x - tmp1->x; \ - dy = tmp0->y - tmp1->y; \ - \ - if (dx * dx > dy * dy) { \ - iy = width * .5; \ - ix = 0; \ - } \ - else { \ - iy = 0; \ - ix = width * .5; \ - } \ - \ - verts[0] = *tmp0; \ - verts[1] = *tmp0; \ - verts[2] = *tmp1; \ - verts[3] = *tmp1; \ - \ - verts[0].x = tmp0->x - ix; \ - verts[0].y = tmp0->y - iy; \ - \ - verts[1].x = tmp0->x + ix; \ - verts[1].y = tmp0->y + iy; \ - \ - verts[2].x = tmp1->x + ix; \ - verts[2].y = tmp1->y + iy; \ - \ - verts[3].x = tmp1->x - ix; \ - verts[3].y = tmp1->y - iy; \ - \ - FX_grDrawPolygonVertexList(fxMesa, 4, verts); \ - } - - - -static void TAG(fx_tri_view_clip) (struct vertex_buffer * VB, - GLuint v[], GLubyte mask) -{ - GLcontext *ctx = VB->ctx; - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLfloat data[VB_MAX_CLIPPED_VERTS * 12]; - GLfloat *vlist[VB_MAX_CLIPPED_VERTS]; - GrVertex *verts[VB_MAX_CLIPPED_VERTS]; - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; - GLfloat *out = data; - GLfloat *mat = ctx->Viewport.WindowMap.m; - GLuint i, n; - GLubyte *clipmask = VB->ClipMask; - - GLuint tmu0_source = fxMesa->tmu_source[0]; - GLuint tmu1_source = fxMesa->tmu_source[1]; - GLvector4f *tc0_vec = VB->TexCoordPtr[tmu0_source]; - GLvector4f *tc1_vec = VB->TexCoordPtr[tmu1_source]; - - (void) fxMesa; - (void) tmu0_source; - (void) tc0_vec; - (void) tmu1_source; - (void) tc1_vec; - - for (i = 0; i < 3; i++) { - GLuint e = v[i]; - verts[i] = 0; - if (!clipmask[e]) - verts[i] = (GrVertex *) gWin[e].f; - vlist[i] = out; - COPY_STRIDE; - out += SIZE; - } - - if ((n = fx_view_clip_triangle(ctx, vlist, verts, SIZE, mask)) >= 3) { - GrVertex tmp[VB_MAX_CLIPPED_VERTS]; - GrVertex *v = tmp, *v2, *v3; - VARS; - - for (i = 0; i < n; i++) - if (!verts[i]) { - GLfloat *data = vlist[i]; - SETUP; - verts[i] = v++; - } - - v = verts[0]; - v2 = verts[1]; - v3 = verts[2]; - - for (i = 2; i < n; v2 = v3, v3 = verts[++i]) - FX_grDrawTriangle(fxMesa, v, v2, v3); - } -} - - - - - -static void TAG(fx_tri_clip_stride) (struct vertex_buffer * VB, - GLuint v[], GLuint mask) -{ - GLcontext *ctx = VB->ctx; - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLfloat data[VB_MAX_CLIPPED_VERTS * 12]; - GLfloat *vlist[VB_MAX_CLIPPED_VERTS]; - GrVertex *verts[VB_MAX_CLIPPED_VERTS]; - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; - GLfloat *out = data; - GLfloat *mat = ctx->Viewport.WindowMap.m; - GLuint i, n; - GLubyte *clipmask = VB->ClipMask; - - GLuint tmu0_source = fxMesa->tmu_source[0]; - GLuint tmu1_source = fxMesa->tmu_source[1]; - GLvector4f *tc0_vec = VB->TexCoordPtr[tmu0_source]; - GLvector4f *tc1_vec = VB->TexCoordPtr[tmu1_source]; - - (void) fxMesa; - (void) tmu0_source; - (void) tc0_vec; - (void) tmu1_source; - (void) tc1_vec; - - for (i = 0; i < 3; i++) { - GLuint e = v[i]; - verts[i] = 0; - if (!clipmask[e]) - verts[i] = (GrVertex *) gWin[e].f; - vlist[i] = out; - COPY_STRIDE; - out += SIZE; - } - - if (VB->ClipPtr->size < 4) { - vlist[0][3] = vlist[1][3] = vlist[2][3] = 1.0; - if (VB->ClipPtr->size == 2) - vlist[0][2] = vlist[1][2] = vlist[2][2] = 0.0; - } - - if ((n = fx_clip_triangle(ctx, vlist, verts, SIZE, mask)) >= 3) { - GrVertex tmp[VB_MAX_CLIPPED_VERTS]; - GrVertex *v = tmp, *v2, *v3; - VARS; - - for (i = 0; i < n; i++) - if (!verts[i]) { - GLfloat *data = vlist[i]; - SETUP; - verts[i] = v++; - } - - v = verts[0]; - v2 = verts[1]; - v3 = verts[2]; - - for (i = 2; i < n; v2 = v3, v3 = verts[++i]) - FX_grDrawTriangle(fxMesa, v, v2, v3); - } -} - - - -static void TAG(fx_line_clip) (struct vertex_buffer * VB, - GLuint v1, GLuint v2, GLubyte mask) -{ - GLcontext *ctx = VB->ctx; - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLfloat data[VB_MAX_CLIPPED_VERTS * 12]; - GLfloat *vlist[VB_MAX_CLIPPED_VERTS]; - GLfloat *out = data; - GLfloat *mat = ctx->Viewport.WindowMap.m; - GLfloat w = ctx->Line.Width * .5; - GLuint e, n; - - GLuint tmu0_source = fxMesa->tmu_source[0]; - GLuint tmu1_source = fxMesa->tmu_source[1]; - GLvector4f *tc0_vec = VB->TexCoordPtr[tmu0_source]; - GLvector4f *tc1_vec = VB->TexCoordPtr[tmu1_source]; - - VARS; - - (void) fxMesa; - (void) tmu0_source; - (void) tc0_vec; - (void) tmu1_source; - (void) tc1_vec; - - vlist[0] = out; - e = v1; - COPY_STRIDE; - out += SIZE; - - vlist[1] = out; - e = v2; - COPY_STRIDE; - out += SIZE; - - if (VB->ClipPtr->size < 4) { - vlist[0][3] = vlist[1][3] = 1.0; - if (VB->ClipPtr->size == 2) - vlist[0][2] = vlist[1][2] = 0.0; - } - - if ((n = fx_clip_line(ctx, vlist, SIZE, mask)) != 0) { - GrVertex gWin[2]; - GrVertex *v; - GLfloat *data; - - v = gWin; - data = vlist[0]; - SETUP; - - v++; - data = vlist[1]; - SETUP; - - DRAW_LINE(fxMesa, gWin, v, w); - } -} - - - -#undef V1 -#undef S1 -#undef C1 -#undef Z1 -#undef T1 - -#undef V2 -#undef S2 -#undef C2 -#undef Z2 -#undef T2 - -#undef V3 -#undef S3 -#undef C3 -#undef Z3 -#undef T3 - -#undef V4 -#undef S4 -#undef C4 -#undef Z4 -#undef T4 - -#undef VARS -#undef SETUP -#undef COPY -#undef COPY_STRIDE -#undef SIZE -#undef IND -#undef TAG Index: xc/lib/GL/mesa/src/drv/tdfx/fxcva.c diff -u xc/lib/GL/mesa/src/drv/tdfx/fxcva.c:1.2 xc/lib/GL/mesa/src/drv/tdfx/fxcva.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxcva.c:1.2 Fri Dec 8 14:36:23 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxcva.c Mon Jun 4 12:37:38 2001 @@ -1,482 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxcva.c,v 1.2 2000/12/08 19:36:23 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -/* fxcva.c - the CVA related code */ - -#include "fxdrv.h" -#include "fxtexman.h" -#include "mmath.h" -#include "vbindirect.h" -#include "pb.h" -#include "fxsetup.h" -#include "fxvsetup.h" -#include "fxcva.h" -#include "pipeline.h" -#include "stages.h" - -#define PRIM_POINTS 0 -#define PRIM_LINES 1 -#define PRIM_TRIS 2 -#define PRIM_CULLED 3 - - -static GLuint reduce_prim[GL_POLYGON + 2] = { - PRIM_POINTS, - PRIM_LINES, - PRIM_LINES, - PRIM_LINES, - PRIM_TRIS, - PRIM_TRIS, - PRIM_TRIS, - PRIM_TRIS, - PRIM_TRIS, - PRIM_TRIS, - PRIM_CULLED -}; - -typedef void (*mergefunc) (struct vertex_buffer * cvaVB, - struct vertex_buffer * VB, - const struct gl_prim_state * state, - GLuint start, GLuint count); - -static void -fxCvaRenderNoop(struct vertex_buffer *cvaVB, - struct vertex_buffer *VB, - const struct gl_prim_state *state, GLuint start, GLuint count) -{ -} - -static INLINE void -fxRenderClippedTriangle2(struct vertex_buffer *VB, - GLuint v1, GLuint v2, GLuint v3) -{ - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; - GLubyte *clipmask = VB->ClipMask; - GLubyte mask = clipmask[v1] | clipmask[v2] | clipmask[v3]; - GLcontext *ctx = VB->ctx; - fxMesaContext fxMesa = FX_CONTEXT(ctx); - - if (!mask) { - FX_grDrawTriangle(fxMesa, (GrVertex *) gWin[v1].f, - (GrVertex *) gWin[v2].f, (GrVertex *) gWin[v3].f); - } - else if (!(clipmask[v1] & clipmask[v2] & clipmask[v3] & CLIP_ALL_BITS)) { - GLuint n; - GLuint vlist[VB_MAX_CLIPPED_VERTS]; - ASSIGN_3V(vlist, v1, v2, v3); - - n = (VB->ctx->poly_clip_tab[VB->ClipPtr->size]) (VB, 3, vlist, mask); - if (n >= 3) { - GLuint i, j0 = vlist[0]; - for (i = 2; i < n; i++) { - FX_grDrawTriangle(fxMesa, - (GrVertex *) gWin[j0].f, - (GrVertex *) gWin[vlist[i - 1]].f, - (GrVertex *) gWin[vlist[i]].f); - } - } - } -} - - -static mergefunc merge_and_render_tab[2][MAX_MERGABLE][PRIM_CULLED + 1]; - - -/* -#define CVA_VARS_RGBA \ - GLubyte (*color)[4] = VB->ColorPtr->data; \ - GLubyte (*cva_color)[4] = (cvaVB->ColorPtr = cvaVB->LitColor[0])->data; -*/ - -#define CVA_VARS_RGBA \ - GLubyte (*color)[4] = VB->ColorPtr->data; \ - GLubyte (*cva_color)[4] = cvaVB->ColorPtr->data; - - - -#undef DO_SETUP_RGBA -#if FX_USE_PARGB -#define DO_SETUP_RGBA \ -{ \ - GLubyte *col = color[i]; \ - PACK_4F_ARGB(GET_PARGB(v), col[3], col[0], col[1], col[2]); \ -} -#else -#define DO_SETUP_RGBA \ -{ \ - GLubyte *col = color[i]; \ - v[GR_VERTEX_R_OFFSET]=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[0]); \ - v[GR_VERTEX_G_OFFSET]=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[1]); \ - v[GR_VERTEX_B_OFFSET]=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[2]); \ - v[GR_VERTEX_A_OFFSET]=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[3]); \ -} -#endif /* FX_USE_PARGB */ - - -#define CVA_VARS_TMU0 \ - VARS_TMU0 \ - GLfloat (*cva_tex0)[4] = (cvaVB->TexCoordPtr[tmu0_source] = cvaVB->store.TexCoord[tmu0_source])->data; - -#define CVA_VARS_TMU1 \ - VARS_TMU1 \ - GLfloat (*cva_tex1)[4] = (cvaVB->TexCoordPtr[tmu1_source] = cvaVB->store.TexCoord[tmu1_source])->data; - - -#define INIT_RGBA (void) cva_color; -#define INIT_TMU0 (void) cva_tex0; (void) tmu0_stride; (void) tmu0_sz; -#define INIT_TMU1 (void) cva_tex1; (void) tmu1_stride; (void) tmu1_sz; - - -#define DRAW_POINT FX_grDrawPoint( fxMesa, (GrVertex *)v ) -#define DRAW_LINE FX_grDrawLine( fxMesa, (GrVertex *)v, (GrVertex *)prev_v ) -#define DRAW_TRI FX_grDrawTriangle( fxMesa, (GrVertex *)gWin[l[0]].f, (GrVertex *)gWin[l[1]].f, (GrVertex *)v ) -#define DRAW_TRI2 FX_grDrawTriangle( fxMesa, vl[0], vl[1], vl[2] ) -#define CLIP_LINE fxRenderClippedLine( cvaVB, e, prev ) -#define CLIP_OR_DRAW_TRI fxRenderClippedTriangle2( cvaVB, l[0], l[1], e ) -#define DIRECT 1 - -#define TAG(x) x -#define IDX 0 -#define VARS -#define INIT -#define INCR -#define MERGE_RAST -#define MERGE_VB -#include "fxcvatmp.h" - -#define TAG(x) x##RGBA -#define IDX SETUP_RGBA -#define VARS CVA_VARS_RGBA -#define INIT INIT_RGBA -#define INCR -#define MERGE_RAST DO_SETUP_RGBA -#define MERGE_VB COPY_4UBV(cva_color[e], color[i]) -#include "fxcvatmp.h" - -#define TAG(x) x##T0 -#define IDX SETUP_TMU0 -#define VARS CVA_VARS_TMU0 -#define INIT INIT_TMU0 -#define INCR , tmu0_data+=4 -#define MERGE_RAST DO_SETUP_TMU0 -#define MERGE_VB COPY_2FV(cva_tex0[e], tmu0_data) -#include "fxcvatmp.h" - -#define TAG(x) x##T1 -#define IDX SETUP_TMU1 -#define VARS CVA_VARS_TMU1 -#define INIT INIT_TMU1 -#define INCR , tmu1_data+=4 -#define MERGE_RAST DO_SETUP_TMU1 -#define MERGE_VB COPY_2FV(cva_tex1[e], tmu1_data) -#include "fxcvatmp.h" - -#define TAG(x) x##T0T1 -#define IDX SETUP_TMU0|SETUP_TMU1 -#define VARS CVA_VARS_TMU0 CVA_VARS_TMU1 -#define INIT INIT_TMU0 INIT_TMU1 -#define INCR , tmu0_data+=4 , tmu1_data+=4 -#define MERGE_RAST DO_SETUP_TMU0 DO_SETUP_TMU1 -#define MERGE_VB COPY_2FV(cva_tex0[e], tmu0_data); \ - COPY_2FV(cva_tex1[e], tmu1_data); -#include "fxcvatmp.h" - -#define TAG(x) x##RGBAT0 -#define IDX SETUP_RGBA|SETUP_TMU0 -#define VARS CVA_VARS_RGBA CVA_VARS_TMU0 -#define INIT INIT_RGBA INIT_TMU0 -#define INCR , tmu0_data+=4 -#define MERGE_RAST DO_SETUP_RGBA; DO_SETUP_TMU0 -#define MERGE_VB COPY_2FV(cva_tex0[e], tmu0_data); \ - COPY_4UBV(cva_color[e], color[i]); -#include "fxcvatmp.h" - -#define TAG(x) x##RGBAT1 -#define IDX SETUP_RGBA|SETUP_TMU1 -#define VARS CVA_VARS_RGBA CVA_VARS_TMU1 -#define INIT INIT_RGBA INIT_TMU1 -#define INCR , tmu1_data+=4 -#define MERGE_RAST DO_SETUP_RGBA; DO_SETUP_TMU1 -#define MERGE_VB COPY_2FV(cva_tex1[e], tmu1_data); \ - COPY_4UBV(cva_color[e], color[i]); -#include "fxcvatmp.h" - -#define TAG(x) x##RGBAT0T1 -#define IDX SETUP_RGBA|SETUP_TMU0|SETUP_TMU1 -#define VARS CVA_VARS_RGBA CVA_VARS_TMU0 CVA_VARS_TMU1 -#define INIT INIT_RGBA INIT_TMU0 INIT_TMU1 -#define INCR , tmu0_data+=4 , tmu1_data+=4 -#define MERGE_RAST DO_SETUP_RGBA; DO_SETUP_TMU0 DO_SETUP_TMU1 -#define MERGE_VB COPY_2FV(cva_tex0[e], tmu0_data); \ - COPY_2FV(cva_tex1[e], tmu1_data); \ - COPY_4UBV(cva_color[e], color[i]); -#include "fxcvatmp.h" - - - -#undef DRAW_POINT -#undef DRAW_LINE -#undef DRAW_TRI -#undef CLIP_LINE -#undef CLIP_OR_DRAW_TRI -#undef DIRECT - -#define DRAW_POINT ctx->Driver.PointsFunc( ctx, e, e ) -#define DRAW_LINE ctx->Driver.LineFunc( ctx, e, prev, e ) -#define DRAW_TRI ctx->TriangleFunc( ctx, l[0], l[1], e, e ) -#define CLIP_LINE gl_render_clipped_line( ctx, e, prev ) -#define CLIP_OR_DRAW_TRI \ -do { \ - if (clip[l[0]] | clip[l[1]] | clip[e]) { \ - if (!(clip[l[0]] & clip[l[1]] & clip[e] & CLIP_ALL_BITS)) { \ - COPY_3V(vlist, l); \ - gl_render_clipped_triangle( ctx, 3, vlist, e ); \ - } \ - } \ - else ctx->TriangleFunc( ctx, l[0], l[1], e, e ); \ -} while (0) - - -#define DIRECT 0 - -#define TAG(x) x##_indirect -#define IDX 0 -#define VARS -#define INIT -#define INCR -#define MERGE_RAST -#define MERGE_VB -#include "fxcvatmp.h" - -#define TAG(x) x##RGBA_indirect -#define IDX SETUP_RGBA -#define VARS CVA_VARS_RGBA -#define INIT INIT_RGBA -#define INCR -#define MERGE_RAST DO_SETUP_RGBA -#define MERGE_VB COPY_4UBV(cva_color[e], color[i]) -#include "fxcvatmp.h" - -#define TAG(x) x##T0_indirect -#define IDX SETUP_TMU0 -#define VARS CVA_VARS_TMU0 -#define INIT INIT_TMU0 -#define INCR , tmu0_data+=4 -#define MERGE_RAST DO_SETUP_TMU0 -#define MERGE_VB COPY_2FV(cva_tex0[e], tmu0_data) -#include "fxcvatmp.h" - -#define TAG(x) x##T1_indirect -#define IDX SETUP_TMU1 -#define VARS CVA_VARS_TMU1 -#define INIT INIT_TMU1 -#define INCR , tmu1_data+=4 -#define MERGE_RAST DO_SETUP_TMU1 -#define MERGE_VB COPY_2FV(cva_tex1[e], tmu1_data) -#include "fxcvatmp.h" - -#define TAG(x) x##T0T1_indirect -#define IDX SETUP_TMU0|SETUP_TMU1 -#define VARS CVA_VARS_TMU0 CVA_VARS_TMU1 -#define INIT INIT_TMU0 INIT_TMU1 -#define INCR , tmu0_data+=4 , tmu1_data+=4 -#define MERGE_RAST DO_SETUP_TMU0 DO_SETUP_TMU1 -#define MERGE_VB COPY_2FV(cva_tex0[e], tmu0_data); \ - COPY_2FV(cva_tex1[e], tmu1_data); -#include "fxcvatmp.h" - -#define TAG(x) x##RGBAT0_indirect -#define IDX SETUP_RGBA|SETUP_TMU0 -#define VARS CVA_VARS_RGBA CVA_VARS_TMU0 -#define INIT INIT_RGBA INIT_TMU0 -#define INCR , tmu0_data+=4 -#define MERGE_RAST DO_SETUP_RGBA; DO_SETUP_TMU0 -#define MERGE_VB COPY_2FV(cva_tex0[e], tmu0_data); \ - COPY_4UBV(cva_color[e], color[i]); -#include "fxcvatmp.h" - -#define TAG(x) x##RGBAT1_indirect -#define IDX SETUP_RGBA|SETUP_TMU1 -#define VARS CVA_VARS_RGBA CVA_VARS_TMU1 -#define INIT INIT_RGBA INIT_TMU1 -#define INCR , tmu1_data+=4 -#define MERGE_RAST DO_SETUP_RGBA; DO_SETUP_TMU1 -#define MERGE_VB COPY_2FV(cva_tex1[e], tmu1_data); \ - COPY_4UBV(cva_color[e], color[i]); -#include "fxcvatmp.h" - -#define TAG(x) x##RGBAT0T1_indirect -#define IDX SETUP_RGBA|SETUP_TMU0|SETUP_TMU1 -#define VARS CVA_VARS_RGBA CVA_VARS_TMU0 CVA_VARS_TMU1 -#define INIT INIT_RGBA INIT_TMU0 INIT_TMU1 -#define INCR , tmu0_data+=4 , tmu1_data+=4 -#define MERGE_RAST DO_SETUP_RGBA DO_SETUP_TMU0 DO_SETUP_TMU1 -#define MERGE_VB COPY_2FV(cva_tex0[e], tmu0_data); \ - COPY_2FV(cva_tex1[e], tmu1_data); \ - COPY_4UBV(cva_color[e], color[i]); -#include "fxcvatmp.h" - - - - -void -fxDDCvaInit() -{ - /* Call grDrawTriangle et al */ - init_cva(); - init_cvaT0(); - init_cvaT1(); - init_cvaT0T1(); - init_cvaRGBA(); - init_cvaRGBAT0(); - init_cvaRGBAT1(); - init_cvaRGBAT0T1(); - - /* Call ctx->TriangleFunc and friends */ - init_cva_indirect(); - init_cvaT0_indirect(); - init_cvaT1_indirect(); - init_cvaT0T1_indirect(); - init_cvaRGBA_indirect(); - init_cvaRGBAT0_indirect(); - init_cvaRGBAT1_indirect(); - init_cvaRGBAT0T1_indirect(); -} - - -void -fxDDCheckMergeAndRender(GLcontext * ctx, struct gl_pipeline_stage *d) -{ - GLuint inputs = ctx->RenderFlags & ~ctx->CVA.pre.outputs; - - if (!(ctx->TriangleCaps & DD_TRI_UNFILLED) && - (ctx->Array.Summary & VERT_OBJ_ANY)) { - d->inputs = (VERT_SETUP_PART | VERT_ELT | inputs); - d->outputs = 0; - d->type = PIPE_IMMEDIATE; - } - -/* gl_print_vert_flags("merge&render inputs", d->inputs); */ -} - - -/* static GLboolean edge_flag[GL_POLYGON+2] = { 0,0,0,0,1,0,0,1,0,1,0 }; */ - -void -fxDDMergeAndRender(struct vertex_buffer *VB) -{ - GLcontext *ctx = VB->ctx; - struct vertex_buffer *cvaVB = ctx->CVA.VB; - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLuint i, next, prim; - GLuint parity = VB->Parity; - GLuint count = VB->Count; - const struct gl_prim_state *state; - mergefunc func; - struct vertex_buffer *saved_vb = ctx->VB; - GLuint inputs = ctx->RenderFlags & ~ctx->CVA.pre.outputs; - GLuint flags = 0; - GLuint direct = (fxMesa->render_index == 0); - mergefunc(*tab)[PRIM_CULLED + 1] = merge_and_render_tab[direct]; - GLuint p = 0; - - if (fxMesa->new_state) - fxSetupFXUnits(ctx); - - - /* May actually contain elements not present in fxMesa->setupindex, - * eg RGBA when flat shading. These need to be copied into the cva - * VB so that funcs like fxTriangleFlat will be able to reach them. - * - * This leads to some duplication of effort in the merge funcs. - */ - if (inputs & VERT_RGBA) { - cvaVB->ColorPtr = cvaVB->Color[0] = cvaVB->LitColor[0]; - cvaVB->Color[1] = cvaVB->LitColor[1]; - flags |= SETUP_RGBA; - } - - if (inputs & VERT_TEX0_ANY) { - cvaVB->TexCoordPtr[0] = cvaVB->store.TexCoord[0]; - flags |= fxMesa->tex_dest[0]; - } - - if (inputs & VERT_TEX1_ANY) { - cvaVB->TexCoordPtr[1] = cvaVB->store.TexCoord[1]; - flags |= fxMesa->tex_dest[1]; - } -#if 0 - fxPrintSetupFlags("FX cva merge & render", flags); -#endif - - if (cvaVB->ClipOrMask) - gl_import_client_data(cvaVB, ctx->RenderFlags, - VEC_WRITABLE | VEC_GOOD_STRIDE); - - ctx->VB = cvaVB; - - do { - for (i = VB->CopyStart; i < count; parity = 0, i = next) { - prim = VB->Primitive[i]; - next = VB->NextPrimitive[i]; - - state = gl_prim_state_machine[prim][parity]; - func = tab[flags][reduce_prim[prim]]; - func(cvaVB, VB, state, i, next); - - if (ctx->TriangleCaps & DD_TRI_LIGHT_TWOSIDE) { - cvaVB->Specular = cvaVB->Spec[0]; - cvaVB->ColorPtr = cvaVB->Color[0]; - cvaVB->IndexPtr = cvaVB->Index[0]; - } - } - } while (ctx->Driver.MultipassFunc && ctx->Driver.MultipassFunc(VB, ++p)); - - - - if (ctx->PB->count > 0) - gl_flush_pb(ctx); - - ctx->VB = saved_vb; -} Index: xc/lib/GL/mesa/src/drv/tdfx/fxcva.h diff -u xc/lib/GL/mesa/src/drv/tdfx/fxcva.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/fxcva.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxcva.h:1.1 Sun Sep 24 09:51:14 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxcva.h Mon Jun 4 12:37:38 2001 @@ -1,64 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxcva.h,v 1.1 2000/09/24 13:51:14 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -#ifndef _FXCVA_H_ -#define _FXCVA_H_ - - - -extern GLboolean fxMergeAndRenderCVA(struct vertex_buffer *VB, - struct vertex_buffer *cvaVB); - -extern void fxRenderCVAElements(struct vertex_buffer *VB, - GLenum mode, GLuint * elts, GLuint n); - -extern GLboolean fxCheckCVA(GLcontext * ctx); - -extern void fxPrecalcCVA(struct vertex_buffer *VB); - -extern void fxDDCheckMergeAndRender(GLcontext * ctx, - struct gl_pipeline_stage *d); - - -#endif Index: xc/lib/GL/mesa/src/drv/tdfx/fxcvatmp.h diff -u xc/lib/GL/mesa/src/drv/tdfx/fxcvatmp.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/fxcvatmp.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxcvatmp.h:1.1 Sun Sep 24 09:51:14 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxcvatmp.h Mon Jun 4 12:37:38 2001 @@ -1,278 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxcvatmp.h,v 1.1 2000/09/24 13:51:14 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -static void TAG(cva_render_points) (struct vertex_buffer * cvaVB, - struct vertex_buffer * VB, - const struct gl_prim_state * state, - GLuint start, GLuint count) -{ - GLcontext *ctx = VB->ctx; - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - fxVertex *gWin = FX_DRIVER_DATA(cvaVB)->verts; - const GLuint *elt = VB->EltPtr->data; - GLuint i; - - VARS; - INIT; - (void) fxMesa; - - if (cvaVB->ClipOrMask) { - const GLubyte *clip = cvaVB->ClipMask; - for (i = start; i < count; i++ INCR) { - GLuint e = elt[i]; - if (!clip[e]) { - GLfloat *v = gWin[e].f; - (void) v; - if (!DIRECT) { - MERGE_VB; - } - MERGE_RAST; - DRAW_POINT; - } - } - } - else { - for (i = start; i < count; i++ INCR) { - GLuint e = elt[i]; - GLfloat *v = gWin[e].f; - (void) v; - if (!DIRECT) { - MERGE_VB; - } - MERGE_RAST; - DRAW_POINT; - } - } -} - -static void TAG(cva_render_lines) (struct vertex_buffer * cvaVB, - struct vertex_buffer * VB, - const struct gl_prim_state * state, - GLuint start, GLuint count) -{ - GLcontext *ctx = VB->ctx; - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - fxVertex *gWin = FX_DRIVER_DATA(cvaVB)->verts; - const GLuint *elt = VB->EltPtr->data; - GLuint i; - - VARS; - INIT; - (void) fxMesa; - - if (cvaVB->ClipOrMask) { - const GLubyte *clip = cvaVB->ClipMask; - GLuint prev = 0; - GLfloat *prev_v = 0; - - (void) ctx; - - for (i = start; i < count; i++ INCR) { - GLuint e = elt[i]; - GLfloat *v = gWin[e].f; - - MERGE_VB; - - if (!clip[e]) - MERGE_RAST; - - if (state->draw) { - if (clip[e] | clip[prev]) - CLIP_LINE; - else - DRAW_LINE; - } - - prev = e; - prev_v = v; - state = state->next; - } - if (state->finish_loop) { - GLuint e = elt[start]; - GLfloat *v = gWin[e].f; - (void) v; - - if (!DIRECT) { - MERGE_VB; - } - MERGE_RAST; - - if (clip[e] | clip[prev]) - CLIP_LINE; - else - DRAW_LINE; - } - } - else { - GLuint prev = 0; - GLfloat *prev_v = 0; - - for (i = start; i < count; i++ INCR) { - GLuint e = elt[i]; - GLfloat *v = gWin[e].f; - - if (!DIRECT) { - MERGE_VB; - } - MERGE_RAST; - if (state->draw) - DRAW_LINE; - prev = e; - prev_v = v; - state = state->next; - } - if (state->finish_loop) { - GLuint e = elt[start]; - GLfloat *v = gWin[e].f; - (void) v; - - if (!DIRECT) { - MERGE_VB; - } - MERGE_RAST; - DRAW_LINE; - } - } -} - - -static void TAG(cva_render_tris) (struct vertex_buffer * cvaVB, - struct vertex_buffer * VB, - const struct gl_prim_state * state, - GLuint start, GLuint count) -{ - GLcontext *ctx = VB->ctx; - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - fxVertex *gWin = FX_DRIVER_DATA(cvaVB)->verts; - const GLuint *elt = VB->EltPtr->data; - GLuint i; - VARS; - INIT; - (void) fxMesa; - - if (cvaVB->ClipOrMask) { - GLuint vlist[VB_MAX_CLIPPED_VERTS]; - GLuint l[3]; - const GLubyte *clip = cvaVB->ClipMask; - - (void) vlist; - - for (i = start; i < count; i++ INCR) { - GLuint e = l[2] = elt[i]; - GLfloat *v = gWin[e].f; - (void) v; - - MERGE_VB; /* needed for clip-interp */ - - if (!clip[e]) { - MERGE_RAST; - } - - if (state->draw) - CLIP_OR_DRAW_TRI; - - - l[0] = l[state->v0]; - l[1] = l[state->v1]; - state = state->next; - } - } - else if (DIRECT) { - GrVertex *vl[3]; - for (i = start; i < count; i++ INCR) { - GLuint e = elt[i]; - GLfloat *v = gWin[elt[i]].f; - - vl[2] = (GrVertex *) v; - - (void) v; - (void) e; - - MERGE_RAST; - - if (state->draw) - DRAW_TRI2; - - vl[0] = vl[state->v0]; - vl[1] = vl[state->v1]; - state = state->next; - } - } - else { - GLuint l[3]; - for (i = start; i < count; i++ INCR) { - GLuint e = l[2] = elt[i]; - GLfloat *v = gWin[e].f; - (void) v; - - MERGE_VB; /* needed for ctx->trianglefunc? */ - MERGE_RAST; - - if (state->draw) - DRAW_TRI; - - l[0] = l[state->v0]; - l[1] = l[state->v1]; - state = state->next; - } - } -} - - -static void TAG(init_cva) (void) -{ - merge_and_render_tab[DIRECT][IDX][PRIM_POINTS] = TAG(cva_render_points); - merge_and_render_tab[DIRECT][IDX][PRIM_LINES] = TAG(cva_render_lines); - merge_and_render_tab[DIRECT][IDX][PRIM_TRIS] = TAG(cva_render_tris); - merge_and_render_tab[DIRECT][IDX][PRIM_CULLED] = fxCvaRenderNoop; -} - - -#undef IDX -#undef MERGE_RAST -#undef MERGE_VB -#undef VARS -#undef INIT -#undef INCR -#undef TAG Index: xc/lib/GL/mesa/src/drv/tdfx/fxdd.c diff -u xc/lib/GL/mesa/src/drv/tdfx/fxdd.c:1.3 xc/lib/GL/mesa/src/drv/tdfx/fxdd.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxdd.c:1.3 Fri Dec 8 14:36:23 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxdd.c Mon Jun 4 12:37:38 2001 @@ -1,2020 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxdd.c,v 1.3 2000/12/08 19:36:23 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -#include -#include "image.h" -#include "types.h" -#include "fxdrv.h" -#include "fxsetup.h" -#include "fxpipeline.h" -#include "fxddtex.h" -#include "fxtexman.h" -#include "enums.h" -#include "extensions.h" -#include "pb.h" - - -/* These are used in calls to FX_grColorMaskv() */ -static const GLboolean false4[4] = { GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE }; -static const GLboolean true4[4] = { GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE }; - -#if defined(FX_PXCONV_TABULAR) -/* These lookup table are used to extract RGB values in [0,255] from - * 16-bit pixel values. - */ -GLubyte FX_PixelToRArray[0x10000]; -GLubyte FX_PixelToGArray[0x10000]; -GLubyte FX_PixelToBArray[0x10000]; - -/* - * Initialize the FX_PixelTo{RGB} arrays. - * Input: bgrOrder - if TRUE, pixels are in BGR order, else RGB order. - */ -void -fxInitPixelTables(fxMesaContext fxMesa, GLboolean bgrOrder) -{ - fxMesa->bgrOrder = bgrOrder; - /* - * We add a level of braces so that we can define the - * variable pixel here. - */ - { - GLuint pixel = 0; - for (pixel = 0; pixel <= 0xffff; pixel++) { - GLuint r, g, b; - if (bgrOrder) { - r = (pixel & 0x001F) << 3; - g = (pixel & 0x07E0) >> 3; - b = (pixel & 0xF800) >> 8; - } - else { - r = (pixel & 0xF800) >> 8; - g = (pixel & 0x07E0) >> 3; - b = (pixel & 0x001F) << 3; - } - r = r * 255 / 0xF8; /* fill in low-order bits */ - g = g * 255 / 0xFC; - b = b * 255 / 0xF8; - FX_PixelToRArray[pixel] = r; - FX_PixelToGArray[pixel] = g; - FX_PixelToBArray[pixel] = b; - } - } -} -#endif /* FX_PXCONV_TABULAR */ - -/**********************************************************************/ -/***** Miscellaneous functions *****/ -/**********************************************************************/ - - -/* Return buffer size information */ -static void -fxDDBufferSize(GLcontext * ctx, GLuint * width, GLuint * height) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDBufferSize(...) Start\n"); - } - - *width = fxMesa->width; - *height = fxMesa->height; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDBufferSize(...) End\n"); - } -} - - -/* Set current drawing color */ -static void -fxDDSetColor(GLcontext * ctx, GLubyte red, GLubyte green, - GLubyte blue, GLubyte alpha) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GLubyte col[4]; - ASSIGN_4V(col, red, green, blue, alpha); - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDSetColor(%d,%d,%d,%d)\n", red, green, - blue, alpha); - } - fxMesa->color = FXCOLOR4(col); -} - - -/* Implements glClearColor() */ -static void -fxDDClearColor(GLcontext * ctx, GLubyte red, GLubyte green, - GLubyte blue, GLubyte alpha) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GLubyte col[4]; - ASSIGN_4V(col, red, green, blue, 255); - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDClearColor(%d,%d,%d,%d)\n", red, green, - blue, alpha); - } - fxMesa->clearC = FXCOLOR4(col); - fxMesa->clearA = alpha; -} - - -/* Clear the color and/or depth buffers */ -static GLbitfield -fxDDClear(GLcontext * ctx, GLbitfield mask, GLboolean all, - GLint x, GLint y, GLint width, GLint height) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - const GLuint colorMask = *((GLuint *) & ctx->Color.ColorMask); - const FxU32 clearD = (FxU32) (ctx->Depth.Clear * fxMesa->depthClear); - const FxU32 clearS = (FxU32) (ctx->Stencil.Clear); - GLbitfield softwareMask = mask & (DD_ACCUM_BIT); - GLuint stencil_size = - fxMesa->haveHwStencil ? fxMesa->glVis->StencilBits : 0; - - /* we can't clear accum buffers */ - mask &= ~(DD_ACCUM_BIT); - - if ((mask & DD_STENCIL_BIT) && !fxMesa->haveHwStencil) { - /* software stencil buffer */ - mask &= ~(DD_STENCIL_BIT); - softwareMask |= DD_STENCIL_BIT; - } - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDClear(%d,%d,%d,%d)\n", (int) x, (int) y, - (int) width, (int) height); - } - - if (colorMask != 0xffffffff) { - /* do masked color buffer clears in software */ - softwareMask |= (mask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT)); - mask &= ~(DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT); - } - - if (fxMesa->haveHwStencil) { - /* - * If we want to clear stencil, it must be enabled - * in the HW, even if the stencil test is not enabled - * in the OGL state. - */ - if (mask & DD_STENCIL_BIT) { - FX_grStencilMask_NoLock(0xFF /* ctx->Stencil.WriteMask*/ ); - /* set stencil ref value = desired clear value */ - FX_grStencilFunc_NoLock(GR_CMP_ALWAYS, ctx->Stencil.Clear, 0xff); - FX_grStencilOp_NoLock(GR_STENCILOP_REPLACE, - GR_STENCILOP_REPLACE, GR_STENCILOP_REPLACE); - FX_grEnable_NoLock(GR_STENCIL_MODE_EXT); - } - else { - FX_grDisable_NoLock(GR_STENCIL_MODE_EXT); - } - } - - BEGIN_CLIP_LOOP(fxMesa) - - /* - * This could probably be done fancier but doing each possible case - * explicitly is less error prone. - */ - switch (mask & ~DD_STENCIL_BIT) { - case DD_BACK_LEFT_BIT | DD_DEPTH_BIT: - /* back buffer & depth */ - FX_grDepthMask_NoLock(FXTRUE); - FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); - if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->clearC, fxMesa->clearA, clearD, - clearS); - else - FX_grBufferClear_NoLock(fxMesa->clearC, fxMesa->clearA, clearD); - if (!ctx->Depth.Mask || !ctx->Depth.Test) { - FX_grDepthMask_NoLock(FXFALSE); - } - break; - case DD_FRONT_LEFT_BIT | DD_DEPTH_BIT: - /* XXX it appears that the depth buffer isn't cleared when - * glRenderBuffer(GR_BUFFER_FRONTBUFFER) is set. - * This is a work-around/ - */ - /* clear depth */ - FX_grDepthMask_NoLock(FXTRUE); - FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); - FX_grColorMaskv_NoLock(ctx, false4); - if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->clearC, fxMesa->clearA, clearD, - clearS); - else - FX_grBufferClear_NoLock(fxMesa->clearC, fxMesa->clearA, clearD); - /* clear front */ - FX_grColorMaskv_NoLock(ctx, true4); - FX_grRenderBuffer_NoLock(GR_BUFFER_FRONTBUFFER); - if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->clearC, fxMesa->clearA, clearD, - clearS); - else - FX_grBufferClear_NoLock(fxMesa->clearC, fxMesa->clearA, clearD); - if (!ctx->Depth.Mask || !ctx->Depth.Test) { - FX_grDepthMask_NoLock(FXFALSE); - } - break; - case DD_BACK_LEFT_BIT: - /* back buffer only */ - FX_grDepthMask_NoLock(FXFALSE); - FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); - if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->clearC, fxMesa->clearA, clearD, - clearS); - else - FX_grBufferClear_NoLock(fxMesa->clearC, fxMesa->clearA, clearD); - if (ctx->Depth.Mask && ctx->Depth.Test) { - FX_grDepthMask_NoLock(FXTRUE); - } - break; - case DD_FRONT_LEFT_BIT: - /* front buffer only */ - FX_grDepthMask_NoLock(FXFALSE); - FX_grRenderBuffer_NoLock(GR_BUFFER_FRONTBUFFER); - if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->clearC, fxMesa->clearA, clearD, - clearS); - else - FX_grBufferClear_NoLock(fxMesa->clearC, fxMesa->clearA, clearD); - if (ctx->Depth.Mask && ctx->Depth.Test) { - FX_grDepthMask_NoLock(FXTRUE); - } - break; - case DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT: - /* front and back */ - FX_grDepthMask_NoLock(FXFALSE); - FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); - if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->clearC, fxMesa->clearA, clearD, - clearS); - else - FX_grBufferClear_NoLock(fxMesa->clearC, fxMesa->clearA, clearD); - FX_grRenderBuffer_NoLock(GR_BUFFER_FRONTBUFFER); - if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->clearC, fxMesa->clearA, clearD, - clearS); - else - FX_grBufferClear_NoLock(fxMesa->clearC, fxMesa->clearA, clearD); - if (ctx->Depth.Mask && ctx->Depth.Test) { - FX_grDepthMask_NoLock(FXTRUE); - } - break; - case DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT | DD_DEPTH_BIT: - /* clear front */ - FX_grDepthMask_NoLock(FXFALSE); - FX_grRenderBuffer_NoLock(GR_BUFFER_FRONTBUFFER); - if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->clearC, fxMesa->clearA, clearD, - clearS); - else - FX_grBufferClear_NoLock(fxMesa->clearC, fxMesa->clearA, clearD); - /* clear back and depth */ - FX_grDepthMask_NoLock(FXTRUE); - FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); - if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->clearC, fxMesa->clearA, clearD, - clearS); - else - FX_grBufferClear_NoLock(fxMesa->clearC, fxMesa->clearA, clearD); - if (!ctx->Depth.Mask || !ctx->Depth.Mask) { - FX_grDepthMask_NoLock(FXFALSE); - } - break; - case DD_DEPTH_BIT: - /* just the depth buffer */ - FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); - FX_grColorMaskv_NoLock(ctx, false4); - FX_grDepthMask_NoLock(FXTRUE); - if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->clearC, fxMesa->clearA, clearD, - clearS); - else - FX_grBufferClear_NoLock(fxMesa->clearC, fxMesa->clearA, clearD); - FX_grColorMaskv_NoLock(ctx, true4); - if (ctx->Color.DrawDestMask & FRONT_LEFT_BIT) - FX_grRenderBuffer_NoLock(GR_BUFFER_FRONTBUFFER); - if (!ctx->Depth.Test || !ctx->Depth.Mask) - FX_grDepthMask_NoLock(FXFALSE); - break; - default: - /* clear no color buffers or depth buffer but might clear stencil */ - if ((stencil_size > 0) && (mask & DD_STENCIL_BIT)) { - FX_grDepthMask_NoLock(FXFALSE); - FX_grColorMaskv_NoLock(ctx, false4); - FX_grBufferClearExt_NoLock(fxMesa->clearC, - fxMesa->clearA, - clearD, - (FxU32) clearS); - if (ctx->Depth.Mask && ctx->Depth.Test) { - FX_grDepthMask_NoLock(FXTRUE); - } - FX_grColorMaskv_NoLock(ctx, true4); - } - break; - } - - END_CLIP_LOOP(fxMesa); - - if (fxMesa->haveHwStencil) { - if (ctx->Stencil.Enabled) { - /* restore stencil state to as it was before the clear */ - GrStencil_t sfail = fxConvertGLStencilOp(ctx->Stencil.FailFunc); - GrStencil_t zfail = fxConvertGLStencilOp(ctx->Stencil.ZFailFunc); - GrStencil_t zpass = fxConvertGLStencilOp(ctx->Stencil.ZPassFunc); - FX_grStencilOp_NoLock(sfail, zfail, zpass); - FX_grStencilMask_NoLock(ctx->Stencil.WriteMask); - FX_grStencilFunc_NoLock(ctx->Stencil.Function - GL_NEVER, - ctx->Stencil.Ref, ctx->Stencil.ValueMask); - FX_grEnable_NoLock(GR_STENCIL_MODE_EXT); - } - else { - FX_grDisable_NoLock(GR_STENCIL_MODE_EXT); - } - } - - return softwareMask; -} - - -/* Set the buffer used for drawing */ -/* XXX support for separate read/draw buffers hasn't been tested */ -static GLboolean -fxDDSetDrawBuffer(GLcontext * ctx, GLenum mode) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDSetBuffer(%x)\n", (int) mode); - } - - if (mode == GL_FRONT_LEFT) { - fxMesa->currentFB = GR_BUFFER_FRONTBUFFER; - FX_grRenderBuffer(fxMesa, fxMesa->currentFB); - return GL_TRUE; - } - else if (mode == GL_BACK_LEFT) { - fxMesa->currentFB = GR_BUFFER_BACKBUFFER; - FX_grRenderBuffer(fxMesa, fxMesa->currentFB); - return GL_TRUE; - } - else if (mode == GL_NONE) { - FX_grColorMaskv(ctx, false4); - return GL_TRUE; - } - else { - return GL_FALSE; - } -} - - -/* Set the buffer used for reading */ -/* XXX support for separate read/draw buffers hasn't been tested */ -static void -fxDDSetReadBuffer(GLcontext * ctx, GLframebuffer * buffer, GLenum mode) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - (void) buffer; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDSetBuffer(%x)\n", (int) mode); - } - - if (mode == GL_FRONT_LEFT) { - fxMesa->currentFB = GR_BUFFER_FRONTBUFFER; - FX_grRenderBuffer(fxMesa, fxMesa->currentFB); - } - else if (mode == GL_BACK_LEFT) { - fxMesa->currentFB = GR_BUFFER_BACKBUFFER; - FX_grRenderBuffer(fxMesa, fxMesa->currentFB); - } -} - - -/* - * These functions just set new-state flags. The exact state - * values will be evaluated later. - */ -static void -fxDDStencilFunc(GLcontext * ctx, GLenum func, GLint ref, GLuint mask) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - (void) func; - (void) ref; - (void) mask; - fxMesa->new_state |= FX_NEW_STENCIL; - ctx->Driver.RenderStart = fxSetupFXUnits; -} - -static void -fxDDStencilMask(GLcontext * ctx, GLuint mask) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - (void) mask; - fxMesa->new_state |= FX_NEW_STENCIL; - ctx->Driver.RenderStart = fxSetupFXUnits; -} - -static void -fxDDStencilOp(GLcontext * ctx, GLenum sfail, GLenum zfail, GLenum zpass) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - (void) sfail; - (void) zfail; - (void) zpass; - fxMesa->new_state |= FX_NEW_STENCIL; - ctx->Driver.RenderStart = fxSetupFXUnits; -} - -static void -fxDDDepthFunc(GLcontext * ctx, GLenum func) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - (void) func; - fxMesa->new_state |= FX_NEW_DEPTH; - ctx->Driver.RenderStart = fxSetupFXUnits; -} - -static void -fxDDDepthMask(GLcontext * ctx, GLboolean mask) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - (void) mask; - fxMesa->new_state |= FX_NEW_DEPTH; - ctx->Driver.RenderStart = fxSetupFXUnits; -} - - - -/* - * Return the current value of the occlusion test flag and - * reset the flag (hardware counters) to false. - */ -#if 0 -static GLboolean -get_occlusion_result(GLcontext *ctx) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLboolean result; - - BEGIN_BOARD_LOCK(fxMesa); - - if (ctx->Depth.OcclusionTest) { - if (ctx->OcclusionResult) { - result = GL_TRUE; /* result of software rendering */ - } - else { - FxI32 zfail, in; - zfail = FX_grGetInteger_NoLock(GR_STATS_PIXELS_DEPTHFUNC_FAIL); - in = FX_grGetInteger_NoLock(GR_STATS_PIXELS_IN); - if (in == zfail) - result = GL_FALSE; /* geom was completely occluded */ - else - result = GL_TRUE; /* all or part of geom was visible */ - } - } - else { - result = ctx->OcclusionResultSaved; - } - - /* reset results now */ - grReset(GR_STATS_PIXELS); - ctx->OcclusionResult = GL_FALSE; - ctx->OcclusionResultSaved = GL_FALSE; - - END_BOARD_LOCK(fxMesa); - - return result; -} -#else - -static GLboolean get_occlusion_result( GLcontext *ctx ) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLboolean result; - - LOCK_HARDWARE( fxMesa ); - - printf("start state: %d %d\n", ctx->Depth.OcclusionTest, ctx->OcclusionResult); - - if (ctx->Depth.OcclusionTest) { - if (ctx->OcclusionResult) { - result = GL_TRUE; /* result of software rendering */ - printf("res = true 1\n"); - } - else { - FxI32 zfail, in; - zfail = FX_grGetInteger_NoLock(GR_STATS_PIXELS_DEPTHFUNC_FAIL); - in = FX_grGetInteger_NoLock(GR_STATS_PIXELS_IN); - if (in == zfail) { - result = GL_FALSE; /* geom was completely occluded */ - printf("res = false 2\n"); - } - else { - result = GL_TRUE; /* all or part of geom was visible */ - printf("res = true 2\n"); - - } - } - } - else { - result = ctx->OcclusionResultSaved; - printf("res = saved\n"); - } - - /* reset results now */ - grReset(GR_STATS_PIXELS); - ctx->OcclusionResult = GL_FALSE; - ctx->OcclusionResultSaved = GL_FALSE; - - UNLOCK_HARDWARE( fxMesa ); - - printf("result = %d\n", result); - return result; -} - -#endif - -/* - * We're only implementing this function to handle the - * GL_OCCLUSTION_TEST_RESULT_HP case. It's special because it - * has a side-effect: resetting the occlustion result flag. - */ -static GLboolean -fxDDGetBooleanv(GLcontext *ctx, GLenum pname, GLboolean *result) -{ - if (pname == GL_OCCLUSION_TEST_RESULT_HP) { - *result = get_occlusion_result(ctx); - return GL_TRUE; - } - return GL_FALSE; -} - - -static GLboolean -fxDDGetIntegerv(GLcontext *ctx, GLenum pname, GLint *result) -{ - if (pname == GL_OCCLUSION_TEST_RESULT_HP) { - *result = (GLint) get_occlusion_result(ctx); - return GL_TRUE; - } - return GL_FALSE; -} - - -static GLboolean -fxDDGetFloatv(GLcontext *ctx, GLenum pname, GLfloat *result) -{ - if (pname == GL_OCCLUSION_TEST_RESULT_HP) { - *result = (GLfloat) get_occlusion_result(ctx); - return GL_TRUE; - } - return GL_FALSE; -} - - -static GLboolean -fxDDGetDoublev(GLcontext *ctx, GLenum pname, GLdouble *result) -{ - if (pname == GL_OCCLUSION_TEST_RESULT_HP) { - *result = (GLdouble) get_occlusion_result(ctx); - return GL_TRUE; - } - return GL_FALSE; -} - - -/* test if window coord (px,py) is visible */ -static GLboolean -inClipRects(fxMesaContext fxMesa, int px, int py) -{ - int i; - for (i = 0; i < fxMesa->numClipRects; i++) { - if ((px >= fxMesa->pClipRects[i].x1) && - (px < fxMesa->pClipRects[i].x2) && - (py >= fxMesa->pClipRects[i].y1) && - (py < fxMesa->pClipRects[i].y2)) return GL_TRUE; - } - return GL_FALSE; -} - - - -static GLboolean -bitmap_R5G6B5(GLcontext * ctx, GLint px, GLint py, - GLsizei width, GLsizei height, - const struct gl_pixelstore_attrib *unpack, - const GLubyte * bitmap) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GrLfbInfo_t info; - FxU16 color; - const struct gl_pixelstore_attrib *finalUnpack; - struct gl_pixelstore_attrib scissoredUnpack; - - /* check if there's any raster operations enabled which we can't handle */ - if (ctx->RasterMask & (ALPHATEST_BIT | - BLEND_BIT | - DEPTH_BIT | - FOG_BIT | - LOGIC_OP_BIT | - SCISSOR_BIT | - STENCIL_BIT | - MASKING_BIT | - ALPHABUF_BIT | MULTI_DRAW_BIT)) return GL_FALSE; - - if (ctx->Scissor.Enabled) { - /* This is a bit tricky, but by carefully adjusting the px, py, - * width, height, skipPixels and skipRows values we can do - * scissoring without special code in the rendering loop. - */ - - /* we'll construct a new pixelstore struct */ - finalUnpack = &scissoredUnpack; - scissoredUnpack = *unpack; - if (scissoredUnpack.RowLength == 0) - scissoredUnpack.RowLength = width; - - /* clip left */ - if (px < ctx->Scissor.X) { - scissoredUnpack.SkipPixels += (ctx->Scissor.X - px); - width -= (ctx->Scissor.X - px); - px = ctx->Scissor.X; - } - /* clip right */ - if (px + width >= ctx->Scissor.X + ctx->Scissor.Width) { - width -= (px + width - (ctx->Scissor.X + ctx->Scissor.Width)); - } - /* clip bottom */ - if (py < ctx->Scissor.Y) { - scissoredUnpack.SkipRows += (ctx->Scissor.Y - py); - height -= (ctx->Scissor.Y - py); - py = ctx->Scissor.Y; - } - /* clip top */ - if (py + height >= ctx->Scissor.Y + ctx->Scissor.Height) { - height -= (py + height - (ctx->Scissor.Y + ctx->Scissor.Height)); - } - - if (width <= 0 || height <= 0) - return GL_TRUE; /* totally scissored away */ - } - else { - finalUnpack = unpack; - } - - /* compute pixel value */ - { - GLint r = (GLint) (ctx->Current.RasterColor[0] * 255.0f); - GLint g = (GLint) (ctx->Current.RasterColor[1] * 255.0f); - GLint b = (GLint) (ctx->Current.RasterColor[2] * 255.0f); - /*GLint a = (GLint)(ctx->Current.RasterColor[3]*255.0f); */ - if (fxMesa->bgrOrder) { - color = (FxU16) - (((FxU16) 0xf8 & b) << (11 - 3)) | - (((FxU16) 0xfc & g) << (5 - 3 + 1)) | - (((FxU16) 0xf8 & r) >> 3); - } - else - color = (FxU16) - (((FxU16) 0xf8 & r) << (11 - 3)) | - (((FxU16) 0xfc & g) << (5 - 3 + 1)) | - (((FxU16) 0xf8 & b) >> 3); - } - - info.size = sizeof(info); - if (!FX_grLfbLock(fxMesa, - GR_LFB_WRITE_ONLY, - fxMesa->currentFB, - GR_LFBWRITEMODE_565, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { -#ifndef FX_SILENT - fprintf(stderr, "fx Driver: error locking the linear frame buffer\n"); -#endif - return GL_TRUE; - } - - { - const GLint winX = fxMesa->x_offset; - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - /* The dest stride depends on the hardware and whether we're drawing - * to the front or back buffer. This compile-time test seems to do - * the job for now. - */ - const GLint dstStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) - ? (fxMesa->screen_width) : (info.strideInBytes / 2); - GLint row; - /* compute dest address of bottom-left pixel in bitmap */ - GLushort *dst = (GLushort *) info.lfbPtr - + (winY - py) * dstStride + (winX + px); - - for (row = 0; row < height; row++) { - const GLubyte *src = - (const GLubyte *) _mesa_image_address(finalUnpack, - bitmap, width, height, - GL_COLOR_INDEX, - GL_BITMAP, 0, row, 0); - if (finalUnpack->LsbFirst) { - /* least significan bit first */ - GLubyte mask = 1U << (finalUnpack->SkipPixels & 0x7); - GLint col; - for (col = 0; col < width; col++) { - if (*src & mask) { - if (inClipRects(fxMesa, winX + px + col, winY - py - row)) - dst[col] = color; - } - if (mask == 128U) { - src++; - mask = 1U; - } - else { - mask = mask << 1; - } - } - if (mask != 1) - src++; - } - else { - /* most significan bit first */ - GLubyte mask = 128U >> (finalUnpack->SkipPixels & 0x7); - GLint col; - for (col = 0; col < width; col++) { - if (*src & mask) { - if (inClipRects(fxMesa, winX + px + col, winY - py - row)) - dst[col] = color; - } - if (mask == 1U) { - src++; - mask = 128U; - } - else { - mask = mask >> 1; - } - } - if (mask != 128) - src++; - } - dst -= dstStride; - } - } - - FX_grLfbUnlock(fxMesa, GR_LFB_WRITE_ONLY, fxMesa->currentFB); - return GL_TRUE; -} - - -static GLboolean -bitmap_R8G8B8A8(GLcontext * ctx, GLint px, GLint py, - GLsizei width, GLsizei height, - const struct gl_pixelstore_attrib *unpack, - const GLubyte * bitmap) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GrLfbInfo_t info; - GLuint color; - const struct gl_pixelstore_attrib *finalUnpack; - struct gl_pixelstore_attrib scissoredUnpack; - - /* check if there's any raster operations enabled which we can't handle */ - if (ctx->RasterMask & (ALPHATEST_BIT | - BLEND_BIT | - DEPTH_BIT | - FOG_BIT | - LOGIC_OP_BIT | - SCISSOR_BIT | - STENCIL_BIT | - MASKING_BIT | - ALPHABUF_BIT | MULTI_DRAW_BIT)) return GL_FALSE; - - if (ctx->Scissor.Enabled) { - /* This is a bit tricky, but by carefully adjusting the px, py, - * width, height, skipPixels and skipRows values we can do - * scissoring without special code in the rendering loop. - */ - - /* we'll construct a new pixelstore struct */ - finalUnpack = &scissoredUnpack; - scissoredUnpack = *unpack; - if (scissoredUnpack.RowLength == 0) - scissoredUnpack.RowLength = width; - - /* clip left */ - if (px < ctx->Scissor.X) { - scissoredUnpack.SkipPixels += (ctx->Scissor.X - px); - width -= (ctx->Scissor.X - px); - px = ctx->Scissor.X; - } - /* clip right */ - if (px + width >= ctx->Scissor.X + ctx->Scissor.Width) { - width -= (px + width - (ctx->Scissor.X + ctx->Scissor.Width)); - } - /* clip bottom */ - if (py < ctx->Scissor.Y) { - scissoredUnpack.SkipRows += (ctx->Scissor.Y - py); - height -= (ctx->Scissor.Y - py); - py = ctx->Scissor.Y; - } - /* clip top */ - if (py + height >= ctx->Scissor.Y + ctx->Scissor.Height) { - height -= (py + height - (ctx->Scissor.Y + ctx->Scissor.Height)); - } - - if (width <= 0 || height <= 0) - return GL_TRUE; /* totally scissored away */ - } - else { - finalUnpack = unpack; - } - - /* compute pixel value */ - { - GLint r = (GLint) (ctx->Current.RasterColor[0] * 255.0f); - GLint g = (GLint) (ctx->Current.RasterColor[1] * 255.0f); - GLint b = (GLint) (ctx->Current.RasterColor[2] * 255.0f); - GLint a = (GLint) (ctx->Current.RasterColor[3] * 255.0f); - color = PACK_BGRA32(r, g, b, a); - } - - info.size = sizeof(info); - if (!FX_grLfbLock(fxMesa, GR_LFB_WRITE_ONLY, - fxMesa->currentFB, GR_LFBWRITEMODE_8888, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { -#ifndef FX_SILENT - fprintf(stderr, "fx Driver: error locking the linear frame buffer\n"); -#endif - return GL_TRUE; - } - - { - const GLint winX = fxMesa->x_offset; - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - GLint dstStride; - GLuint *dst; - GLint row; - - if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) { - dstStride = fxMesa->screen_width; - dst = - (GLuint *) info.lfbPtr + (winY - py) * dstStride + (winX + - px); - } - else { - dstStride = info.strideInBytes / 4; - dst = - (GLuint *) info.lfbPtr + (winY - py) * dstStride + (winX + - px); - } - - /* compute dest address of bottom-left pixel in bitmap */ - for (row = 0; row < height; row++) { - const GLubyte *src = - (const GLubyte *) _mesa_image_address(finalUnpack, - bitmap, width, height, - GL_COLOR_INDEX, - GL_BITMAP, 0, row, 0); - if (finalUnpack->LsbFirst) { - /* least significan bit first */ - GLubyte mask = 1U << (finalUnpack->SkipPixels & 0x7); - GLint col; - for (col = 0; col < width; col++) { - if (*src & mask) { - if (inClipRects(fxMesa, winX + px + col, winY - py - row)) - dst[col] = color; - } - if (mask == 128U) { - src++; - mask = 1U; - } - else { - mask = mask << 1; - } - } - if (mask != 1) - src++; - } - else { - /* most significan bit first */ - GLubyte mask = 128U >> (finalUnpack->SkipPixels & 0x7); - GLint col; - for (col = 0; col < width; col++) { - if (*src & mask) { - if (inClipRects(fxMesa, winX + px + col, winY - py - row)) - dst[col] = color; - } - if (mask == 1U) { - src++; - mask = 128U; - } - else { - mask = mask >> 1; - } - } - if (mask != 128) - src++; - } - dst -= dstStride; - } - } - - FX_grLfbUnlock(fxMesa, GR_LFB_WRITE_ONLY, fxMesa->currentFB); - return GL_TRUE; -} - - -static GLboolean -readpixels_R5G6B5(GLcontext * ctx, GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const struct gl_pixelstore_attrib *packing, - GLvoid * dstImage) -{ - if (ctx->Pixel.ScaleOrBiasRGBA || ctx->Pixel.MapColorFlag) { - return GL_FALSE; /* can't do this */ - } - else { - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GrLfbInfo_t info; - GLboolean result = GL_FALSE; - - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_READ_ONLY, - fxMesa->currentFB, - GR_LFBWRITEMODE_ANY, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint winX = fxMesa->x_offset; - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint srcStride = - (fxMesa->glCtx->Color.DrawBuffer == - GL_FRONT) ? (fxMesa->screen_width) : (info.strideInBytes / - 2); - const GLushort *src = (const GLushort *) info.lfbPtr - + (winY - y) * srcStride + (winX + x); - GLubyte *dst = (GLubyte *) _mesa_image_address(packing, dstImage, - width, height, - format, type, 0, 0, - 0); - GLint dstStride = - _mesa_image_row_stride(packing, width, format, type); - - if (format == GL_RGB && type == GL_UNSIGNED_BYTE) { - /* convert 5R6G5B into 8R8G8B */ - GLint row, col; - const GLint halfWidth = width >> 1; - const GLint extraPixel = (width & 1); - for (row = 0; row < height; row++) { - GLubyte *d = dst; - for (col = 0; col < halfWidth; col++) { - const GLuint pixel = ((const GLuint *) src)[col]; - const GLint pixel0 = pixel & 0xffff; - const GLint pixel1 = pixel >> 16; - *d++ = FX_PixelToR(fxMesa, pixel0); - *d++ = FX_PixelToG(fxMesa, pixel0); - *d++ = FX_PixelToB(fxMesa, pixel0); - *d++ = FX_PixelToR(fxMesa, pixel1); - *d++ = FX_PixelToG(fxMesa, pixel1); - *d++ = FX_PixelToB(fxMesa, pixel1); - } - if (extraPixel) { - GLushort pixel = src[width - 1]; - *d++ = FX_PixelToR(fxMesa, pixel); - *d++ = FX_PixelToG(fxMesa, pixel); - *d++ = FX_PixelToB(fxMesa, pixel); - } - dst += dstStride; - src -= srcStride; - } - result = GL_TRUE; - } - else if (format == GL_RGBA && type == GL_UNSIGNED_BYTE) { - /* convert 5R6G5B into 8R8G8B8A */ - GLint row, col; - const GLint halfWidth = width >> 1; - const GLint extraPixel = (width & 1); - for (row = 0; row < height; row++) { - GLubyte *d = dst; - for (col = 0; col < halfWidth; col++) { - const GLuint pixel = ((const GLuint *) src)[col]; - const GLint pixel0 = pixel & 0xffff; - const GLint pixel1 = pixel >> 16; - *d++ = FX_PixelToR(fxMesa, pixel0); - *d++ = FX_PixelToG(fxMesa, pixel0); - *d++ = FX_PixelToB(fxMesa, pixel0); - *d++ = 255; - *d++ = FX_PixelToR(fxMesa, pixel1); - *d++ = FX_PixelToG(fxMesa, pixel1); - *d++ = FX_PixelToB(fxMesa, pixel1); - *d++ = 255; - } - if (extraPixel) { - const GLushort pixel = src[width - 1]; - *d++ = FX_PixelToR(fxMesa, pixel); - *d++ = FX_PixelToG(fxMesa, pixel); - *d++ = FX_PixelToB(fxMesa, pixel); - *d++ = 255; - } - dst += dstStride; - src -= srcStride; - } - result = GL_TRUE; - } - else if (format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5) { - /* directly memcpy 5R6G5B pixels into client's buffer */ - const GLint widthInBytes = width * 2; - GLint row; - for (row = 0; row < height; row++) { - MEMCPY(dst, src, widthInBytes); - dst += dstStride; - src -= srcStride; - } - result = GL_TRUE; - } - else { - result = GL_FALSE; - } - - grLfbUnlock(GR_LFB_READ_ONLY, fxMesa->currentFB); - } - END_BOARD_LOCK(fxMesa); - return result; - } -} - - - -static GLboolean -readpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const struct gl_pixelstore_attrib *packing, - GLvoid * dstImage) -{ - if (!(format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8) - && !(format == GL_BGRA && type == GL_UNSIGNED_BYTE) - && !(format == GL_RGBA && type == GL_UNSIGNED_BYTE)) { - return GL_FALSE; /* format/type not optimised */ - } - - if (ctx->Pixel.ScaleOrBiasRGBA || ctx->Pixel.MapColorFlag) { - return GL_FALSE; /* can't do this */ - } - - { - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GrLfbInfo_t info; - GLboolean result = GL_FALSE; - - const GLint winX = fxMesa->x_offset; - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint scrX = winX + x; - const GLint scrY = winY - y; - - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_READ_ONLY, - fxMesa->currentFB, - GR_LFBWRITEMODE_ANY, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) - ? (fxMesa->screen_width) : (info.strideInBytes / 4); - const GLuint *src = (const GLuint *) info.lfbPtr - + scrY * srcStride + scrX; - const GLint dstStride = - _mesa_image_row_stride(packing, width, format, type); - const GLubyte *dst = (GLubyte *) _mesa_image_address(packing, - dstImage, width, height, format, type, 0, 0, 0); - - if ((format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8) - || (format == GL_BGRA && type == GL_UNSIGNED_BYTE)) { - const GLint widthInBytes = width * 4; - GLint row; - for (row = 0; row < height; row++) { - MEMCPY(dst, src, widthInBytes); - dst += dstStride; - src -= srcStride; - } - result = GL_TRUE; - } else - if (format == GL_RGBA && type == GL_UNSIGNED_BYTE) { - const GLint widthInBytes = width * 4; - GLuint *dstp = (GLuint *)dst; - GLint row; - GLint i; - for (row = 0; row < height; row++) { - MEMCPY(dst, src, widthInBytes); - dst += dstStride; - src -= srcStride; - /* Data is in memory in BGRA format */ - /* We need to swap R & B values */ - for (i = 0; i < width; i++, dstp++) { - char *dstp0 = ((char *)(dstp)) + 0; - char *dstp2 = ((char *)(dstp)) + 2; - *dstp0 ^= *dstp2; - *dstp2 ^= *dstp0; - *dstp0 ^= *dstp2; - } - } - result = GL_TRUE; - } - - grLfbUnlock(GR_LFB_READ_ONLY, fxMesa->currentFB); - } - END_BOARD_LOCK(fxMesa); - return result; - } -} - - - -static GLboolean -drawpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const struct gl_pixelstore_attrib *unpack, - const GLvoid * pixels) -{ - if (!(format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8) - && !(format == GL_BGRA && type == GL_UNSIGNED_BYTE)) { - return GL_FALSE; /* format/type not optimised */ - } - - if (ctx->Pixel.ZoomX!=1.0F || ctx->Pixel.ZoomY!=1.0F) { - return GL_FALSE; /* can't scale pixels */ - } - - if (ctx->Pixel.ScaleOrBiasRGBA || ctx->Pixel.MapColorFlag) { - return GL_FALSE; /* can't do this */ - } - - if (ctx->RasterMask) { - return GL_FALSE; /* can't do any raster ops */ - } - - { - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GrLfbInfo_t info; - GLboolean result = GL_FALSE; - - const GLint winX = fxMesa->x_offset; - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint scrX = winX + x; - const GLint scrY = winY - y; - - /* look for clipmasks, giveup if region obscured */ - if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) { - int i; - for (i = 0; i < fxMesa->numClipRects; i++) { - const XF86DRIClipRectPtr rect = &fxMesa->pClipRects[i]; - - if (scrY < rect->y1 || scrY+height > rect->y2) { - if (scrX < rect->x1 || scrX+width > rect->x2) { - return GL_FALSE; /* dst is obscured */ - } - } - } - } - - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_WRITE_ONLY, - fxMesa->currentFB, - GR_LFBWRITEMODE_8888, GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint dstStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) - ? (fxMesa->screen_width * 4) : (info.strideInBytes); - const GLubyte *dst = (const GLubyte *) info.lfbPtr - + scrY * dstStride + scrX * 4; - const GLint srcStride = - _mesa_image_row_stride(unpack, width, format, type); - const GLubyte *src = (GLubyte *) _mesa_image_address(unpack, - pixels, width, height, format, type, 0, 0, 0); - - if ((format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8) - || (format == GL_BGRA && type == GL_UNSIGNED_BYTE)) { - const GLint widthInBytes = width * 4; - GLint row; - for (row = 0; row < height; row++) { - MEMCPY(dst, src, widthInBytes); - dst -= dstStride; - src += srcStride; - } - result = GL_TRUE; - } - - grLfbUnlock(GR_LFB_WRITE_ONLY, fxMesa->currentFB); - } - END_BOARD_LOCK(fxMesa); - return result; - } -} - - -static GLboolean -drawpixels_R8G8B8A8_v2(GLcontext * ctx, GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const struct gl_pixelstore_attrib *unpack, - const GLvoid * pixels) -{ - if (!(format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8) - && !(format == GL_BGRA && type == GL_UNSIGNED_BYTE)) { - return GL_FALSE; /* format/type not optimised */ - } - - if (ctx->Pixel.ZoomX!=1.0F || ctx->Pixel.ZoomY!=1.0F) { - return GL_FALSE; /* can't scale pixels */ - } - - if (ctx->Pixel.ScaleOrBiasRGBA || ctx->Pixel.MapColorFlag) { - return GL_FALSE; /* can't do this */ - } - - if (ctx->RasterMask & (~BLEND_BIT)) { - return GL_FALSE; /* can't do any raster ops, except blend */ - } - - { - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GrLfbInfo_t info; - GLboolean result = GL_FALSE; - - const GLint winX = fxMesa->x_offset; - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint scrX = winX + x; - const GLint scrY = winY - y; - - /* look for clipmasks, giveup if region obscured */ - if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) { - int i; - for (i = 0; i < fxMesa->numClipRects; i++) { - const XF86DRIClipRectPtr rect = &fxMesa->pClipRects[i]; - - if (scrY < rect->y1 || scrY+height > rect->y2) { - if (scrX < rect->x1 || scrX+width > rect->x2) { - return GL_FALSE; /* dst is obscured */ - } - } - } - } - - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_WRITE_ONLY, - fxMesa->currentFB, - GR_LFBWRITEMODE_8888, GR_ORIGIN_UPPER_LEFT, FXTRUE, &info)) { - const GLint dstStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) - ? (fxMesa->screen_width * 4) : (info.strideInBytes); - const GLubyte *dst = (const GLubyte *) info.lfbPtr - + scrY * dstStride + scrX * 4; - const GLint srcStride = - _mesa_image_row_stride(unpack, width, format, type); - const GLubyte *src = (GLubyte *) _mesa_image_address(unpack, - pixels, width, height, format, type, 0, 0, 0); - - void *grState = NULL; - GLint grSize; - - if (grGet(GR_GLIDE_STATE_SIZE, sizeof(grSize), (void *) &grSize)) { - if ((grState = malloc(grSize)) != 0) { - grGlideGetState(grState); - } - } - - if (ctx->RasterMask & BLEND_BIT) { - grDisableAllEffects(); - grAlphaBlendFunction(GR_BLEND_SRC_ALPHA, - GR_BLEND_ONE_MINUS_SRC_ALPHA, - GR_BLEND_ONE, - GR_BLEND_ZERO); - grAlphaCombine(GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL, - GR_COMBINE_FACTOR_OTHER_ALPHA, - GR_COMBINE_LOCAL_NONE, - GR_COMBINE_OTHER_ITERATED, - FXFALSE); - grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL, - GR_COMBINE_FACTOR_OTHER_ALPHA, - GR_COMBINE_LOCAL_ITERATED, - GR_COMBINE_OTHER_ITERATED, - FXFALSE); - } - - if ((format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8) - || (format == GL_BGRA && type == GL_UNSIGNED_BYTE)) { - const GLint widthInBytes = width * 4; - GLint row; - for (row = 0; row < height; row++) { - MEMCPY(dst, src, widthInBytes); - dst -= dstStride; - src += srcStride; - } - result = GL_TRUE; - } - - if (grState) { - grGlideSetState(grState); - free(grState); - } - - grLfbUnlock(GR_LFB_WRITE_ONLY, fxMesa->currentFB); - } - END_BOARD_LOCK(fxMesa); - return result; - } -} - - -static void -fxDDFinish(GLcontext *ctx) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - FX_grFinish(fxMesa); -} - - -static void -fxDDFlush(GLcontext *ctx) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - FX_grFlush(fxMesa); -} - - -static GLint -fxDDGetParameteri(const GLcontext * ctx, GLint param) -{ - switch (param) { - case DD_HAVE_HARDWARE_FOG: - return 1; - default: - fprintf(stderr, - "fx Driver: internal error in fxDDGetParameteri(): %x\n", - (int) param); - return 0; - } -} - - -static void -fxDDSetNearFar(GLcontext * ctx, GLfloat n, GLfloat f) -{ - FX_CONTEXT(ctx)->new_state |= FX_NEW_FOG; - ctx->Driver.RenderStart = fxSetupFXUnits; -} - - -/* KW: Put the word Mesa in the render string because quakeworld - * checks for this rather than doing a glGet(GL_MAX_TEXTURE_SIZE). - * Why? - */ -static const GLubyte * -fxDDGetString(GLcontext * ctx, GLenum name) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - - switch (name) { - case GL_RENDERER: - { - static char buffer[100]; - char hardware[100]; - strcpy(hardware, FX_grGetString(fxMesa, GR_HARDWARE)); - if (strcmp(hardware, "Voodoo3 (tm)") == 0) - strcpy(hardware, "Voodoo3"); - else if (strcmp(hardware, "Voodoo4 (tm)") == 0) - strcpy(hardware, "Voodoo4"); - else if (strcmp(hardware, "Voodoo5 (tm)") == 0) - strcpy(hardware, "Voodoo5"); - else if (strcmp(hardware, "Voodoo Banshee (tm)") == 0) - strcpy(hardware, "VoodooBanshee"); - else { - /* unexpected result: replace spaces with hyphens */ - int i; - for (i = 0; hardware[i]; i++) { - if (hardware[i] == ' ' || hardware[i] == '\t') - hardware[i] = '-'; - } - } - /* now make the GL_RENDERER string */ - sprintf(buffer, "Mesa DRI %s 20001101", hardware); - return buffer; - } - case GL_VENDOR: - return "VA Linux Systems, Inc."; - default: - return NULL; - } -} - - -#if 0 -/* Example extension function */ -static void -fxFooBarEXT(GLint i) -{ - printf("You called glFooBarEXT(%d)\n", i); -} -#endif - - - -/* - * Enable/Disable the extensions for this context. - */ -static void -fxDDInitExtensions(GLcontext * ctx) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - - gl_extensions_disable(ctx, "GL_EXT_blend_logic_op"); - gl_extensions_disable(ctx, "GL_EXT_blend_minmax"); - gl_extensions_disable(ctx, "GL_EXT_blend_subtract"); - gl_extensions_disable(ctx, "GL_EXT_blend_color"); - gl_extensions_disable(ctx, "GL_EXT_blend_func_separate"); - gl_extensions_disable(ctx, "GL_INGR_blend_func_separate"); - gl_extensions_enable(ctx, "GL_HP_occlusion_test"); - - if (!fxMesa->haveTwoTMUs) - gl_extensions_disable(ctx, "GL_EXT_texture_env_add"); - - if (!fxMesa->emulateTwoTMUs) - gl_extensions_disable(ctx, "GL_ARB_multitexture"); - - if (fxMesa->isNapalm) { - gl_extensions_enable(ctx, "GL_ARB_texture_compression"); - gl_extensions_enable(ctx, "GL_3DFX_texture_compression_FXT1"); - { - char *legacy_str = getenv("FX_GL_COMPRESS_LEGACY_TEXTURES"); - if (!legacy_str || ((legacy_str[0] == '0') - && (legacy_str[1] == '\0'))) { - gl_extensions_add(ctx, ALWAYS_ENABLED, "GL_S3_s3tc", 0); - } - } - gl_extensions_enable(ctx, "GL_EXT_texture_env_combine"); - } - - /* Example of hooking in an extension function. - * For DRI-based drivers, also see __driRegisterExtensions in the - * tdfx_xmesa.c file. - */ -#if 0 - { - void **dispatchTable = (void **) ctx->Exec; - const int _gloffset_FooBarEXT = 555; /* just an example number! */ - const int tabSize = _glapi_get_dispatch_table_size(); - assert(_gloffset_FooBarEXT < tabSize); - dispatchTable[_gloffset_FooBarEXT] = (void *) fxFooBarEXT; - /* XXX You would also need to hook into the display list dispatch - * table. Really, the implementation of extensions might as well - * be in the core of Mesa since core Mesa and the device driver - * is one big shared lib. - */ - } -#endif -} - - - -/* - * Initialize the state in an fxMesaContext struct. - */ -int -fxDDInitFxMesaContext(fxMesaContext fxMesa) -{ - /* Get Glide3 extension function pointers */ - { - void *handle = dlopen(NULL, RTLD_NOW | RTLD_GLOBAL); - if (!handle) { - txImgQuantizePtr = NULL; - txImgDequantizeFXT1Ptr = NULL; - txErrorSetCallbackPtr = NULL; - grStencilFuncPtr = NULL; - grStencilMaskPtr = NULL; - grStencilOpPtr = NULL; - grBufferClearExtPtr = NULL; - grColorMaskExtPtr = NULL; - grColorCombineExtPtr = NULL; - grTexColorCombineExtPtr = NULL; - grAlphaCombineExtPtr = NULL; - grTexAlphaCombineExtPtr = NULL; - grAlphaBlendFunctionExtPtr = NULL; - grConstantColorValueExtPtr = NULL; - return 0; - } - else { - /* - * These are not exported by Glide. - */ - txImgQuantizePtr = dlsym(handle, "txImgQuantize"); - txImgDequantizeFXT1Ptr = dlsym(handle, "_txImgDequantizeFXT1"); - txErrorSetCallbackPtr = dlsym(handle, "txErrorSetCallback"); - grStencilFuncPtr = dlsym(handle, "grStencilFunc"); - grStencilMaskPtr = dlsym(handle, "grStencilMask"); - grStencilOpPtr = dlsym(handle, "grStencilOp"); - grBufferClearExtPtr = dlsym(handle, "grBufferClearExt"); - grColorMaskExtPtr = dlsym(handle, "grColorMaskExt"); - grColorCombineExtPtr = dlsym(handle, "grColorCombineExt"); - grTexColorCombineExtPtr = dlsym(handle, "grTexColorCombineExt"); - grAlphaCombineExtPtr = dlsym(handle, "grAlphaCombineExt"); - grTexAlphaCombineExtPtr = dlsym(handle, "grTexAlphaCombineExt"); - grAlphaBlendFunctionExtPtr = dlsym(handle, "grAlphaBlendFunctionExt"); - grConstantColorValueExtPtr = dlsym(handle, "grConstantColorValueExt"); - } - dlclose(handle); - } - - FX_setupGrVertexLayout(fxMesa); - - if (getenv("FX_EMULATE_SINGLE_TMU")) - fxMesa->haveTwoTMUs = GL_FALSE; - - fxMesa->emulateTwoTMUs = fxMesa->haveTwoTMUs; - - if (!getenv("FX_DONT_FAKE_MULTITEX")) - fxMesa->emulateTwoTMUs = GL_TRUE; - - if (getenv("FX_GLIDE_SWAPINTERVAL")) - fxMesa->swapInterval = atoi(getenv("FX_GLIDE_SWAPINTERVAL")); - else - fxMesa->swapInterval = 1; - - if (getenv("MESA_FX_SWAP_PENDING")) - fxMesa->maxPendingSwapBuffers = atoi(getenv("MESA_FX_SWAP_PENDING")); - else - fxMesa->maxPendingSwapBuffers = 2; - - if (getenv("MESA_FX_INFO")) - fxMesa->verbose = GL_TRUE; - else - fxMesa->verbose = GL_FALSE; - -#if 0 - printf("haveTwoTMUs=%d emulateTwoTMUs=%d\n", - fxMesa->haveTwoTMUs, fxMesa->emulateTwoTMUs); -#endif - - fxMesa->depthClear = FX_grGetInteger(fxMesa, FX_ZDEPTH_MAX); - - fxMesa->color = 0xffffffff; - fxMesa->clearC = 0; - fxMesa->clearA = 0; - - fxMesa->stats.swapBuffer = 0; - fxMesa->stats.reqTexUpload = 0; - fxMesa->stats.texUpload = 0; - fxMesa->stats.memTexUpload = 0; - - fxMesa->tmuSrc = FX_TMU_NONE; - fxTMInit(fxMesa); - - /* FX units setup */ - fxMesa->unitsState.alphaTestEnabled = GL_FALSE; - fxMesa->unitsState.alphaTestFunc = GR_CMP_ALWAYS; - fxMesa->unitsState.alphaTestRefValue = 0; - - fxMesa->unitsState.blendEnabled = GL_FALSE; - fxMesa->unitsState.blendSrcFuncRGB = GR_BLEND_ONE; - fxMesa->unitsState.blendDstFuncRGB = GR_BLEND_ZERO; - fxMesa->unitsState.blendSrcFuncAlpha = GR_BLEND_ONE; - fxMesa->unitsState.blendDstFuncAlpha = GR_BLEND_ZERO; - - /* - fxMesa->unitsState.depthTestEnabled = GL_FALSE; - fxMesa->unitsState.depthMask = GL_TRUE; - fxMesa->unitsState.depthTestFunc = GR_CMP_LESS; - */ - - FX_grColorMaskv(fxMesa->glCtx, true4); - if (fxMesa->glVis->DBflag) { - fxMesa->currentFB = GR_BUFFER_BACKBUFFER; - FX_grRenderBuffer(fxMesa, GR_BUFFER_BACKBUFFER); - } - else { - fxMesa->currentFB = GR_BUFFER_FRONTBUFFER; - FX_grRenderBuffer(fxMesa, GR_BUFFER_FRONTBUFFER); - } - - fxMesa->state = NULL; - fxMesa->fogTable = NULL; - - fxMesa->state = malloc(FX_grGetInteger(fxMesa, FX_GLIDE_STATE_SIZE)); - fxMesa->fogTable = - malloc(FX_grGetInteger(fxMesa, FX_FOG_TABLE_ENTRIES) * sizeof(GrFog_t)); - - if (!fxMesa->state || !fxMesa->fogTable) { - if (fxMesa->state) - free(fxMesa->state); - if (fxMesa->fogTable) - free(fxMesa->fogTable); - return 0; - } - - if (fxMesa->glVis->DepthBits > 0) - FX_grDepthBufferMode(fxMesa, GR_DEPTHBUFFER_ZBUFFER); - - FX_grLfbWriteColorFormat(fxMesa, GR_COLORFORMAT_ABGR); - - fxMesa->textureAlign = FX_grGetInteger(fxMesa, FX_TEXTURE_ALIGN); - if (fxMesa->isNapalm) { - fxMesa->glCtx->Const.MaxTextureLevels = 12; - fxMesa->glCtx->Const.MaxTextureSize = 2048; - fxMesa->glCtx->Const.NumCompressedTextureFormats = 1; - } - else { - fxMesa->glCtx->Const.MaxTextureLevels = 9; - fxMesa->glCtx->Const.MaxTextureSize = 256; - fxMesa->glCtx->Const.NumCompressedTextureFormats = 0; - } - fxMesa->glCtx->Const.MaxTextureUnits = fxMesa->emulateTwoTMUs ? 2 : 1; - fxMesa->glCtx->NewState |= NEW_DRVSTATE1; - fxMesa->new_state = NEW_ALL; - - fxDDSetupInit(); - fxDDCvaInit(); - fxDDClipInit(); - fxDDTrifuncInit(); - fxDDFastPathInit(); - - fxSetupDDPointers(fxMesa->glCtx); - fxDDRenderInit(fxMesa->glCtx); - fxDDInitExtensions(fxMesa->glCtx); - - fxDDSetNearFar(fxMesa->glCtx, 1.0, 100.0); - - FX_grGlideGetState(fxMesa, (GrState *) fxMesa->state); - - /* XXX Fix me: callback not registered when main VB is created. - */ - if (fxMesa->glCtx->VB) - fxDDRegisterVB(fxMesa->glCtx->VB); - - /* XXX Fix me too: need to have the 'struct dd' prepared prior to - * creating the context... The below is broken if you try to insert - * new stages. - */ - if (fxMesa->glCtx->NrPipelineStages) - fxMesa->glCtx->NrPipelineStages = - fxDDRegisterPipelineStages(fxMesa->glCtx->PipelineStage, - fxMesa->glCtx->PipelineStage, - fxMesa->glCtx->NrPipelineStages); - - /* this little bit ensures that all Glide state gets initialized */ - fxMesa->new_state = NEW_ALL; - fxMesa->glCtx->Driver.RenderStart = fxSetupFXUnits; - -#if defined(FX_PXCONV_TABULAR) - fxInitPixelTables(fxMesa, GL_FALSE); /* Load tables of pixel colors */ -#endif /* FX_PXCONV_TABULAR */ - - /* Run the config file */ - gl_context_initialize(fxMesa->glCtx); - - return 1; -} - - - -/* Check if the hardware supports the current context - * - * Performs similar work to fxDDChooseRenderState() - should be merged. - */ -static GLboolean -fxIsInHardware(GLcontext * ctx) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - - if (!ctx->Hint.AllowDrawMem) - return GL_TRUE; /* you'll take it and like it */ - - if (ctx->Color.BlendEnabled - && ctx->Color.BlendEquation != GL_FUNC_ADD_EXT) { - return GL_FALSE; - } - - if (ctx->Color.ColorLogicOpEnabled && ctx->Color.LogicOp != GL_COPY) { - return GL_FALSE; - } - - if (ctx->Light.Enabled && - ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) { - return GL_FALSE; - } - - if (ctx->Visual->RedBits < 8 && - (ctx->Color.ColorMask[RCOMP] != ctx->Color.ColorMask[GCOMP] || - ctx->Color.ColorMask[GCOMP] != ctx->Color.ColorMask[BCOMP])) { - /* can't individually mask R, G, B in 16bpp/Voodoo3 mode */ - return GL_FALSE; - } - - -#if 000 - if ( - ((ctx->Color.BlendEnabled) - && (ctx->Color.BlendEquation != GL_FUNC_ADD_EXT)) - || ((ctx->Color.ColorLogicOpEnabled) - && (ctx->Color.LogicOp != GL_COPY)) - || (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) - || - (!((ctx->Color.ColorMask[RCOMP] == ctx->Color.ColorMask[GCOMP]) - && (ctx->Color.ColorMask[GCOMP] == ctx->Color.ColorMask[BCOMP]) - && (ctx->Color.ColorMask[ACOMP] == ctx->Color.ColorMask[ACOMP]))) - ) { - return GL_FALSE; - } -#endif - - - /* Unsupported texture/multitexture cases */ - - if (fxMesa->emulateTwoTMUs) { - if ((ctx->Enabled & (TEXTURE0_3D | TEXTURE1_3D)) || - /* Not very well written ... */ - ((ctx->Enabled & (TEXTURE0_1D | TEXTURE1_1D)) && - ((ctx->Enabled & (TEXTURE0_2D | TEXTURE1_2D)) != - (TEXTURE0_2D | TEXTURE1_2D)))) { - return GL_FALSE; - } - - if (ctx->Texture.ReallyEnabled & TEXTURE0_2D) { -#if 0 - if (ctx->Texture.Unit[0].EnvMode == GL_BLEND) { - return GL_FALSE; - } -#endif - if (!fxMesa->isNapalm && - ctx->Texture.Unit[0].EnvMode == GL_BLEND && - (ctx->Texture.ReallyEnabled & TEXTURE1_2D || - ctx->Texture.Unit[0].EnvColor[0] != 0 || - ctx->Texture.Unit[0].EnvColor[1] != 0 || - ctx->Texture.Unit[0].EnvColor[2] != 0 || - ctx->Texture.Unit[0].EnvColor[3] != 1)) { - return GL_FALSE; - } - if (ctx->Texture.Unit[0].Current->Image[0]->Border > 0) - return GL_FALSE; - } - - if (ctx->Texture.ReallyEnabled & TEXTURE1_2D) { - if (!fxMesa->isNapalm && ctx->Texture.Unit[1].EnvMode == GL_BLEND) - return GL_FALSE; - if (ctx->Texture.Unit[1].Current->Image[0]->Border > 0) - return GL_FALSE; - } - - if (MESA_VERBOSE & (VERBOSE_DRIVER | VERBOSE_TEXTURE)) - fprintf(stderr, "fxMesa: fxIsInHardware, envmode is %s/%s\n", - gl_lookup_enum_by_nr(ctx->Texture.Unit[0].EnvMode), - gl_lookup_enum_by_nr(ctx->Texture.Unit[1].EnvMode)); - - /* KW: This was wrong (I think) and I changed it... which doesn't mean - * it is now correct... - */ - if ((ctx->Enabled & (TEXTURE0_1D | TEXTURE0_2D | TEXTURE0_3D)) && - (ctx->Enabled & (TEXTURE1_1D | TEXTURE1_2D | TEXTURE1_3D))) { - /* Can't use multipass to blend a multitextured triangle - fall - * back to software. - */ - if (!fxMesa->haveTwoTMUs && ctx->Color.BlendEnabled) { - return GL_FALSE; - } - - if ((ctx->Texture.Unit[0].EnvMode != ctx->Texture.Unit[1].EnvMode) - && (ctx->Texture.Unit[0].EnvMode != GL_MODULATE) - && (ctx->Texture.Unit[0].EnvMode != GL_REPLACE)) { /* q2, seems ok... */ - if (MESA_VERBOSE & VERBOSE_DRIVER) - fprintf(stderr, - "fxMesa: unsupported multitex env mode\n"); - return GL_FALSE; - } - } - } - else { - if ((ctx->Enabled & (TEXTURE1_1D | TEXTURE1_2D | TEXTURE1_3D)) || - /* Not very well written ... */ - ((ctx->Enabled & TEXTURE0_1D) && (!(ctx->Enabled & TEXTURE0_2D))) - ) { - return GL_FALSE; - } - - - if (!fxMesa->isNapalm && (ctx->Texture.ReallyEnabled & TEXTURE0_2D) && - (ctx->Texture.Unit[0].EnvMode == GL_BLEND)) { - return GL_FALSE; - } - } - - if (ctx->Stencil.Enabled && !fxMesa->haveHwStencil) - return GL_FALSE; - - return GL_TRUE; -} - - - -#define INTERESTED (~(NEW_MODELVIEW|NEW_PROJECTION|NEW_PROJECTION|NEW_TEXTURE_MATRIX|NEW_USER_CLIP|NEW_CLIENT_STATE|NEW_TEXTURE_ENABLE)) - -static void -fxDDUpdateDDPointers(GLcontext * ctx) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLuint new_state = ctx->NewState; - - if (MESA_VERBOSE & (VERBOSE_DRIVER | VERBOSE_STATE)) - fprintf(stderr, "fxmesa: fxDDUpdateDDPointers(...)\n"); - - if (new_state & (NEW_RASTER_OPS | NEW_TEXTURING)) - fxMesa->is_in_hardware = fxIsInHardware(ctx); - - if (fxMesa->is_in_hardware) { - if (fxMesa->new_state) - fxSetupFXUnits(ctx); - - if (new_state & INTERESTED) { - fxDDChooseRenderState(ctx); - fxMesa->RenderVBTables = fxDDChooseRenderVBTables(ctx); - fxMesa->RenderVBClippedTab = fxMesa->RenderVBTables[0]; - fxMesa->RenderVBCulledTab = fxMesa->RenderVBTables[1]; - fxMesa->RenderVBRawTab = fxMesa->RenderVBTables[2]; - - ctx->Driver.RasterSetup = fxDDChooseSetupFunction(ctx); - } - - ctx->Driver.PointsFunc = fxMesa->PointsFunc; - ctx->Driver.LineFunc = fxMesa->LineFunc; - ctx->Driver.TriangleFunc = fxMesa->TriangleFunc; - ctx->Driver.QuadFunc = fxMesa->QuadFunc; - } - else { - fxMesa->render_index = FX_FALLBACK; - } -} - -static void -fxDDReducedPrimitiveChange(GLcontext * ctx, GLenum prim) -{ - if (ctx->Polygon.CullFlag) { - if (ctx->PB->primitive != GL_POLYGON) { /* Lines or Points */ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - FX_grCullMode(fxMesa, GR_CULL_DISABLE); - fxMesa->cullMode = GR_CULL_DISABLE; - } - } -} - - -void -fxSetupDDPointers(GLcontext * ctx) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxSetupDDPointers()\n"); - } - ctx->Driver.UpdateState = fxDDUpdateDDPointers; - ctx->Driver.ClearIndex = NULL; - ctx->Driver.ClearColor = fxDDClearColor; - ctx->Driver.Clear = fxDDClear; - ctx->Driver.Index = NULL; - ctx->Driver.Color = fxDDSetColor; - ctx->Driver.SetDrawBuffer = fxDDSetDrawBuffer; - ctx->Driver.SetReadBuffer = fxDDSetReadBuffer; - ctx->Driver.GetBufferSize = fxDDBufferSize; - ctx->Driver.Finish = fxDDFinish; - ctx->Driver.Flush = fxDDFlush; - ctx->Driver.GetString = fxDDGetString; - ctx->Driver.NearFar = fxDDSetNearFar; - ctx->Driver.GetParameteri = fxDDGetParameteri; - ctx->Driver.GetBooleanv = fxDDGetBooleanv; - ctx->Driver.GetFloatv = fxDDGetFloatv; - ctx->Driver.GetDoublev = fxDDGetDoublev; - ctx->Driver.GetIntegerv = fxDDGetIntegerv; - - if (ctx->Visual->RedBits == 8 && - ctx->Visual->GreenBits == 8 && - ctx->Visual->BlueBits == 8 && - ctx->Visual->AlphaBits == 8) { - ctx->Driver.Bitmap = bitmap_R8G8B8A8; - ctx->Driver.DrawPixels = drawpixels_R8G8B8A8; - ctx->Driver.ReadPixels = readpixels_R8G8B8A8; - } - else if (ctx->Visual->RedBits == 5 && - ctx->Visual->GreenBits == 6 && - ctx->Visual->BlueBits == 5 && - ctx->Visual->AlphaBits == 0) { - ctx->Driver.Bitmap = bitmap_R5G6B5; - ctx->Driver.DrawPixels = NULL; - ctx->Driver.ReadPixels = readpixels_R5G6B5; - } - else { - ctx->Driver.Bitmap = NULL; - ctx->Driver.DrawPixels = NULL; - ctx->Driver.ReadPixels = NULL; - } - - ctx->Driver.RenderStart = NULL; - ctx->Driver.RenderFinish = NULL; - - ctx->Driver.TexImage2D = fxDDTexImage2D; - ctx->Driver.TexSubImage2D = fxDDTexSubImage2D; - ctx->Driver.TestProxyTexImage = fxDDTestProxyTexImage; - ctx->Driver.GetTexImage = fxDDGetTexImage; - ctx->Driver.CompressedTexImage2D = fxDDCompressedTexImage2D; - ctx->Driver.CompressedTexSubImage2D = fxDDCompressedTexSubImage2D; - ctx->Driver.GetCompressedTexImage = fxDDGetCompressedTexImage; - ctx->Driver.SpecificCompressedTexFormat = fxDDSpecificCompressedTexFormat; - ctx->Driver.BaseCompressedTexFormat = fxDDBaseCompressedTexFormat; - ctx->Driver.IsCompressedFormat = fxDDIsCompressedFormat; - ctx->Driver.CompressedImageSize = fxDDCompressedImageSize; - ctx->Driver.TexEnv = fxDDTexEnv; - ctx->Driver.TexParameter = fxDDTexParam; - ctx->Driver.BindTexture = fxDDTexBind; - ctx->Driver.DeleteTexture = fxDDTexDel; - ctx->Driver.IsTextureResident = fxDDIsTextureResident; - ctx->Driver.UpdateTexturePalette = fxDDTexPalette; - - ctx->Driver.RectFunc = NULL; - - if (fxMesa->haveHwStencil) { - ctx->Driver.StencilFunc = fxDDStencilFunc; - ctx->Driver.StencilMask = fxDDStencilMask; - ctx->Driver.StencilOp = fxDDStencilOp; - } - - ctx->Driver.AlphaFunc = fxDDAlphaFunc; - ctx->Driver.BlendFunc = fxDDBlendFunc; - ctx->Driver.BlendFuncSeparate = fxDDBlendFuncSeparate; - ctx->Driver.DepthFunc = fxDDDepthFunc; - ctx->Driver.DepthMask = fxDDDepthMask; - ctx->Driver.ColorMask = fxDDColorMask; - ctx->Driver.Fogfv = fxDDFogfv; - ctx->Driver.Scissor = fxDDScissor; - ctx->Driver.FrontFace = fxDDFrontFace; - ctx->Driver.CullFace = fxDDCullFace; - ctx->Driver.ShadeModel = fxDDShadeModel; - ctx->Driver.Enable = fxDDEnable; - ctx->Driver.ReducedPrimitiveChange = fxDDReducedPrimitiveChange; - - ctx->Driver.RegisterVB = fxDDRegisterVB; - ctx->Driver.UnregisterVB = fxDDUnregisterVB; - - ctx->Driver.RegisterPipelineStages = fxDDRegisterPipelineStages; - - ctx->Driver.OptimizeImmediatePipeline = 0; /* nothing done yet */ - ctx->Driver.OptimizePrecalcPipeline = 0; - -/* if (getenv("MESA_USE_FAST") || getenv("FX_USE_FAST")) */ -/* ctx->Driver.OptimizePrecalcPipeline = fxDDOptimizePrecalcPipeline; */ - - if (!getenv("FX_NO_FAST")) - ctx->Driver.BuildPrecalcPipeline = fxDDBuildPrecalcPipeline; - - ctx->Driver.TriangleCaps = - DD_TRI_CULL | DD_TRI_OFFSET | DD_TRI_LIGHT_TWOSIDE; - - fxSetupDDSpanPointers(ctx); - - FX_CONTEXT(ctx)->render_index = 1; /* force an update */ - fxDDUpdateDDPointers(ctx); -} Index: xc/lib/GL/mesa/src/drv/tdfx/fxddspan.c diff -u xc/lib/GL/mesa/src/drv/tdfx/fxddspan.c:1.7 xc/lib/GL/mesa/src/drv/tdfx/fxddspan.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxddspan.c:1.7 Fri Dec 8 14:36:23 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxddspan.c Mon Jun 4 12:37:38 2001 @@ -1,2080 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxddspan.c,v 1.7 2000/12/08 19:36:23 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -/* fxdd.c - 3Dfx VooDoo Mesa span and pixel functions */ - - -#include "fxdrv.h" - -/* - * Examine the cliprects to generate an array of flags to indicate - * which pixels in a span are visible. Note: (x,y) is a screen - * coordinate. - */ -static void -generate_vismask(const fxMesaContext fxMesa, GLint x, GLint y, GLint n, - GLubyte vismask[]) -{ - GLboolean initialized = GL_FALSE; - GLint i, j; - - /* Ensure we clear the visual mask */ - MEMSET(vismask, 0, n); - - /* turn on flags for all visible pixels */ - for (i = 0; i < fxMesa->numClipRects; i++) { - const XF86DRIClipRectPtr rect = &fxMesa->pClipRects[i]; - - if (y >= rect->y1 && y < rect->y2) { - if (x >= rect->x1 && x + n <= rect->x2) { - /* common case, whole span inside cliprect */ - MEMSET(vismask, 1, n); - return; - } - if (x < rect->x2 && x + n >= rect->x1) { - /* some of the span is inside the rect */ - GLint start, end; - if (!initialized) { - MEMSET(vismask, 0, n); - initialized = GL_TRUE; - } - if (x < rect->x1) - start = rect->x1 - x; - else - start = 0; - if (x + n > rect->x2) - end = rect->x2 - x; - else - end = n; - assert(start >= 0); - assert(end <= n); - for (j = start; j < end; j++) - vismask[j] = 1; - } - } - } -} - -/* - * Examine cliprects and determine if the given screen pixel is visible. - */ -static GLboolean -visible_pixel(const fxMesaContext fxMesa, int scrX, int scrY) -{ - int i; - for (i = 0; i < fxMesa->numClipRects; i++) { - const XF86DRIClipRectPtr rect = &fxMesa->pClipRects[i]; - if (scrX >= rect->x1 && - scrX < rect->x2 && - scrY >= rect->y1 && scrY < rect->y2) return GL_TRUE; - } - return GL_FALSE; -} - -/* - * 16bpp span/pixel functions - */ -static void -write_R5G6B5_rgba_span(const GLcontext * ctx, GLuint n, GLint x, GLint y, - const GLubyte rgba[][4], const GLubyte mask[]) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GrLfbInfo_t info; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: write_R5G6B5_rgba_span\n"); - } - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_WRITE_ONLY, - fxMesa->currentFB, - GR_LFBWRITEMODE_565, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint winX = fxMesa->x_offset; - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint scrX = winX + x; - const GLint scrY = winY - y; - const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) - ? (fxMesa->screen_width) : (info.strideInBytes / 2); - GLushort *data16 = (GLushort *) info.lfbPtr + scrY * srcStride + scrX; - GLuint i; - - if (mask) { - for (i = 0; i < n; i++) { - if (visible_pixel(fxMesa, scrX + i, scrY) && mask[i]) { - GLushort pixel; - if (fxMesa->bgrOrder) { - pixel = PACK_BGR16(rgba[i][0], - rgba[i][1], - rgba[i][2]); - } else { - pixel = PACK_RGB16(rgba[i][0], - rgba[i][1], - rgba[i][2]); - } - data16[i] = pixel; - } - } - } else { - for (i = 0; i < n; i++) { - if (visible_pixel(fxMesa, scrX + i, scrY)) { - GLushort pixel; - - if (fxMesa->bgrOrder) { - pixel = PACK_BGR16(rgba[i][0], - rgba[i][1], - rgba[i][2]); - } else { - pixel = PACK_RGB16(rgba[i][0], - rgba[i][1], - rgba[i][2]); - } - data16[i] = pixel; - } - } - } - grLfbUnlock(GR_LFB_WRITE_ONLY, fxMesa->currentFB); - } - END_BOARD_LOCK(fxMesa); -} - - -static void -write_R5G6B5_rgb_span(const GLcontext * ctx, GLuint n, GLint x, GLint y, - const GLubyte rgb[][3], const GLubyte mask[]) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GrLfbInfo_t info; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: write_R5G6B5_rgb_span\n"); - } - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_WRITE_ONLY, - fxMesa->currentFB, - GR_LFBWRITEMODE_565, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint winX = fxMesa->x_offset; - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint scrX = winX + x; - const GLint scrY = winY - y; - const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) - ? (fxMesa->screen_width) : (info.strideInBytes / 2); - GLushort *data16 = (GLushort *) info.lfbPtr + scrY * srcStride + scrX; - GLuint i; - - if (mask) { - for (i = 0; i < n; i++) { - if (visible_pixel(fxMesa, scrX + i, scrY) && mask[i]) { - GLushort pixel; - if (fxMesa->bgrOrder) { - pixel = PACK_BGR16(rgb[i][0], - rgb[i][1], - rgb[i][2]); - } else { - pixel = PACK_RGB16(rgb[i][0], - rgb[i][1], - rgb[i][2]); - } - data16[i] = pixel; - } - } - } else { - for (i = 0; i < n; i++) { - if (visible_pixel(fxMesa, scrX + i, scrY)) { - GLushort pixel; - if (fxMesa->bgrOrder) { - pixel = PACK_BGR16(rgb[i][0], - rgb[i][1], - rgb[i][2]); - } else { - pixel = PACK_RGB16(rgb[i][0], - rgb[i][1], - rgb[i][2]); - } - data16[i] = pixel; - } - } - } - grLfbUnlock(GR_LFB_WRITE_ONLY, fxMesa->currentFB); - } - END_BOARD_LOCK(fxMesa); -} - -static void -write_R5G6B5_mono_span(const GLcontext * ctx, GLuint n, GLint x, GLint y, - const GLubyte mask[]) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GrLfbInfo_t info; - GLubyte *constantColor = (GLubyte *)(&fxMesa->color); - GLushort pixel; - - if (fxMesa->bgrOrder) { - pixel = PACK_BGR16(constantColor[0], - constantColor[1], - constantColor[2]); - } else { - pixel = PACK_RGB16(constantColor[0], - constantColor[1], - constantColor[2]); - } - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: write_r5g6b5_mono_span\n"); - } - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_WRITE_ONLY, - fxMesa->currentFB, - GR_LFBWRITEMODE_565, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint winX = fxMesa->x_offset; - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint scrX = winX + x; - const GLint scrY = winY - y; - const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) - ? (fxMesa->screen_width) : (info.strideInBytes / 2); - GLushort *data16 = (GLushort *) info.lfbPtr - + scrY * srcStride + scrX; - GLuint i; - - if (mask) { - for (i = 0; i < n; i++) { - if (visible_pixel(fxMesa, scrX + i, scrY) && mask[i]) { - data16[i] = pixel; - } - } - } else { - for (i = 0; i < n; i++) { - if (visible_pixel(fxMesa, scrX + i, scrY)) { - data16[i] = pixel; - } - } - } - grLfbUnlock(GR_LFB_WRITE_ONLY, fxMesa->currentFB); - } - END_BOARD_LOCK(fxMesa); -} - -/* - * Read a span of 16-bit RGB pixels. Note, we don't worry about cliprects - * since OpenGL says obscured pixels have undefined values. - */ -static void -read_R5G6B5_span(const GLcontext * ctx, GLuint n, GLint x, GLint y, - GLubyte rgba[][4]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GrLfbInfo_t info; - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_READ_ONLY, - fxMesa->currentFB, - GR_LFBWRITEMODE_ANY, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint winX = fxMesa->x_offset; - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) - ? (fxMesa->screen_width) : (info.strideInBytes / 2); - const GLushort *data16 = (const GLushort *) info.lfbPtr - + (winY - y) * srcStride + (winX + x); - GLuint i, j; - GLuint extraPixel = (n & 1); - n -= extraPixel; - for (i = j = 0; i < n; i += 2, j++) { - /* use data16[] to keep correct alignment */ - GLuint pixel0 = data16[i]; - GLuint pixel1 = data16[i+1]; - rgba[i][RCOMP] = FX_PixelToR(fxMesa, pixel0); - rgba[i][GCOMP] = FX_PixelToG(fxMesa, pixel0); - rgba[i][BCOMP] = FX_PixelToB(fxMesa, pixel0); - rgba[i][ACOMP] = 255; - rgba[i + 1][RCOMP] = FX_PixelToR(fxMesa, pixel1); - rgba[i + 1][GCOMP] = FX_PixelToG(fxMesa, pixel1); - rgba[i + 1][BCOMP] = FX_PixelToB(fxMesa, pixel1); - rgba[i + 1][ACOMP] = 255; - } - if (extraPixel) { - GLushort pixel = data16[n]; - rgba[n][RCOMP] = FX_PixelToR(fxMesa, pixel); - rgba[n][GCOMP] = FX_PixelToG(fxMesa, pixel); - rgba[n][BCOMP] = FX_PixelToB(fxMesa, pixel); - rgba[n][ACOMP] = 255; - } - grLfbUnlock(GR_LFB_READ_ONLY, fxMesa->currentFB); - } - END_BOARD_LOCK(fxMesa); -} - - -static void -write_R5G6B5_pixels(const GLcontext * ctx, - GLuint n, const GLint x[], const GLint y[], - CONST GLubyte rgba[][4], const GLubyte mask[]) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GrLfbInfo_t info; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: write_R5G6B5_pixels\n"); - } - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_WRITE_ONLY, - fxMesa->currentFB, - GR_LFBWRITEMODE_565, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint winX = fxMesa->x_offset; - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) - ? (fxMesa->screen_width) : (info.strideInBytes / 2); - GLuint i; - - for (i = 0; i < n; i++) { - GLint scrX = winX + x[i]; - GLint scrY = winY - y[i]; - if (visible_pixel(fxMesa, scrX, scrY) && mask[i]) { - GLushort *data16 = (GLushort *) info.lfbPtr - + scrY * srcStride + scrX; - GLushort pixel; - if (fxMesa->bgrOrder) { - pixel = PACK_BGR16(rgba[i][0], - rgba[i][1], - rgba[i][2]); - } else { - pixel = PACK_RGB16(rgba[i][0], - rgba[i][1], - rgba[i][2]); - } - data16[0] = pixel; - } - } - grLfbUnlock(GR_LFB_WRITE_ONLY, fxMesa->currentFB); - } - END_BOARD_LOCK(fxMesa); -} - -static void -write_R5G6B5_mono_pixels(const GLcontext * ctx, - GLuint n, const GLint x[], const GLint y[], - const GLubyte mask[]) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GrLfbInfo_t info; - GLubyte *constantColor = (GLubyte *)(&fxMesa->color); - GLushort pixel; - - if (fxMesa->bgrOrder) { - pixel = PACK_BGR16(constantColor[0], - constantColor[1], - constantColor[2]); - } else { - pixel = PACK_RGB16(constantColor[0], - constantColor[1], - constantColor[2]); - } - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: write_R5G6B5_mono_pixels\n"); - } - - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_WRITE_ONLY, - fxMesa->currentFB, - GR_LFBWRITEMODE_565, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint winX = fxMesa->x_offset; - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) - ? (fxMesa->screen_width) : (info.strideInBytes / 2); - GLuint i; - - for (i = 0; i < n; i++) { - GLint scrX = winX + x[i]; - GLint scrY = winY - y[i]; - if (visible_pixel(fxMesa, scrX, scrY) && mask[i]) { - GLushort *data16 = (GLushort *) info.lfbPtr - + scrY * srcStride + scrX; - data16[0] = pixel; - } - } - grLfbUnlock(GR_LFB_WRITE_ONLY, fxMesa->currentFB); - } - END_BOARD_LOCK(fxMesa); -} - -static void -read_R5G6B5_pixels(const GLcontext * ctx, - GLuint n, const GLint x[], const GLint y[], - GLubyte rgba[][4], const GLubyte mask[]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GrLfbInfo_t info; - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_READ_ONLY, - fxMesa->currentFB, - GR_LFBWRITEMODE_ANY, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint winX = fxMesa->x_offset; - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) - ? (fxMesa->screen_width) : (info.strideInBytes / 2); - GLuint i; - for (i = 0; i < n; i++) { - if (mask[i]) { - const GLushort *data16 = (const GLushort *) info.lfbPtr - + (winY - y[i]) * srcStride + (winX + x[i]); - GLushort pixel = *data16; - rgba[i][RCOMP] = FX_PixelToR(fxMesa, pixel); - rgba[i][GCOMP] = FX_PixelToG(fxMesa, pixel); - rgba[i][BCOMP] = FX_PixelToB(fxMesa, pixel); - rgba[i][ACOMP] = 255; - } - } - grLfbUnlock(GR_LFB_READ_ONLY, fxMesa->currentFB); - } - END_BOARD_LOCK(fxMesa); -} - - -/* - * 24bpp span/pixel functions - */ - -static void -write_R8G8B8_rgb_span(const GLcontext *ctx, GLuint n, GLint x, GLint y, - const GLubyte rgb[][3], const GLubyte mask[]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GrLfbWriteMode_t mode; - GrLfbInfo_t info; - - if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) - mode = GR_LFBWRITEMODE_888; - else - mode = GR_LFBWRITEMODE_888; - - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_WRITE_ONLY, - fxMesa->currentFB, - mode, GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint winX = fxMesa->x_offset; - const GLint scrX = winX + x; - const GLint scrY = winY - y; - - if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) { - /*GLint dstStride = fxMesa->screen_width * 3; */ - GLint dstStride = info.strideInBytes / 1; - GLubyte *dst = (GLubyte *) info.lfbPtr - + (winY - y) * dstStride + (winX + x) * 1; - GLuint *dst32 = (GLuint *) dst; - GLubyte visMask[MAX_WIDTH]; - GLuint i; - generate_vismask(fxMesa, scrX, scrY, n, visMask); - for (i = 0; i < n; i++) { - if (visMask[i] && (!mask || mask[i])) { - dst32[i] = - PACK_BGRA32(rgb[i][0], rgb[i][1], rgb[i][2], 255); - } - } - } - else { - /* back buffer */ - GLint dstStride = info.strideInBytes; - GLubyte *dst = (GLubyte *) info.lfbPtr - + (winY - y) * dstStride + (winX + x) * 4; - GLuint *dst32 = (GLuint *) dst; - if (mask) { - GLuint i; - for (i = 0; i < n; i++) { - if (mask[i]) { - dst32[i] = - PACK_RGBA32(rgb[i][0], rgb[i][1], rgb[i][2], 255); - } - } - } - else { - GLuint i; - for (i = 0; i < n; i++) { - dst32[i] = - PACK_RGBA32(rgb[i][0], rgb[i][1], rgb[i][2], 255); - } - } - } - grLfbUnlock(GR_LFB_WRITE_ONLY, fxMesa->currentFB); - } - END_BOARD_LOCK(fxMesa); -} - - - -static void -write_R8G8B8_rgba_span(const GLcontext * ctx, GLuint n, GLint x, GLint y, - const GLubyte rgba[][4], const GLubyte mask[]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GrLfbWriteMode_t mode; - GrLfbInfo_t info; - - if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) - mode = GR_LFBWRITEMODE_8888; - else - mode = GR_LFBWRITEMODE_888; - - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_WRITE_ONLY, - fxMesa->currentFB, - mode, GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint winX = fxMesa->x_offset; - const GLint scrX = winX + x; - const GLint scrY = winY - y; - - if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) { - /* XXX have to do cliprect clipping! */ - GLint dstStride = fxMesa->screen_width * 4; - GLubyte *dst = (GLubyte *) info.lfbPtr - + (winY - y) * dstStride + (winX + x) * 4; - GLuint *dst32 = (GLuint *) dst; - GLubyte visMask[MAX_WIDTH]; - GLuint i; - generate_vismask(fxMesa, scrX, scrY, n, visMask); - for (i = 0; i < n; i++) { - if (visMask[i] && (!mask || mask[i])) { - dst32[i] = - PACK_BGRA32(rgba[i][0], rgba[i][1], rgba[i][2], - rgba[i][3]); - } - } - } - else { - /* back buffer */ - GLint dstStride = info.strideInBytes; - GLubyte *dst = (GLubyte *) info.lfbPtr - + (winY - y) * dstStride + (winX + x) * 4; - if (mask) { - const GLuint *src32 = (const GLuint *) rgba; - GLuint *dst32 = (GLuint *) dst; - GLuint i; - for (i = 0; i < n; i++) { - if (mask[i]) { - dst32[i] = src32[i]; - } - } - } - else { - /* no mask, write all pixels */ - MEMCPY(dst, rgba, 4 * n); - } - } - grLfbUnlock(GR_LFB_WRITE_ONLY, fxMesa->currentFB); - } - END_BOARD_LOCK(fxMesa); -} - - -static void -write_R8G8B8_mono_span(const GLcontext * ctx, GLuint n, GLint x, GLint y, - const GLubyte mask[]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GLubyte rgba[MAX_WIDTH][4]; - GLuint *data = (GLuint *) rgba; - GLuint i; - - /* XXX this is a simple-minded implementation but good enough for now */ - for (i = 0; i < n; i++) { - data[i] = (GLuint) fxMesa->color; - } - write_R8G8B8_rgba_span(ctx, n, x, y, (const GLubyte(*)[4]) rgba, mask); -} - - -static void -read_R8G8B8_span(const GLcontext * ctx, GLuint n, GLint x, GLint y, - GLubyte rgba[][4]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GrLfbInfo_t info; - - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_READ_ONLY, fxMesa->currentFB, GR_LFBWRITEMODE_8888, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint winX = fxMesa->x_offset; - - if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) { - GLint srcStride = fxMesa->screen_width * 4; - const GLubyte *src = (const GLubyte *) info.lfbPtr - + (winY - y) * srcStride + (winX + x) * 4; - GLuint i; - for (i = 0; i < n; i++) { - rgba[i][0] = src[i * 4 + 2]; - rgba[i][1] = src[i * 4 + 1]; - rgba[i][2] = src[i * 4 + 0]; - rgba[i][3] = src[i * 4 + 3]; - } - } - else { - /* back buffer */ - GLint srcStride = info.strideInBytes / 2; - const GLubyte *src = (const GLubyte *) info.lfbPtr - + (winY - y) * srcStride + (winX + x) * 4; - GLuint i; - for (i = 0; i < n; i++) { - rgba[i][0] = src[i * 4 + 2]; - rgba[i][1] = src[i * 4 + 1]; - rgba[i][2] = src[i * 4 + 0]; - rgba[i][3] = src[i * 4 + 3]; - } - } - grLfbUnlock(GR_LFB_READ_ONLY, fxMesa->currentFB); - } - END_BOARD_LOCK(fxMesa); -} - - -static void -write_R8G8B8_pixels(const GLcontext * ctx, - GLuint n, const GLint x[], const GLint y[], - CONST GLubyte rgba[][4], const GLubyte mask[]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GrLfbWriteMode_t mode; - GrLfbInfo_t info; - - if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) - mode = GR_LFBWRITEMODE_8888; - else - mode = GR_LFBWRITEMODE_888 /*565 */ ; - - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_WRITE_ONLY, - fxMesa->currentFB, - mode, GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) { - GLuint i; - for (i = 0; i < n; i++) { - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint winX = fxMesa->x_offset; - const GLint scrX = winX + x[i]; - const GLint scrY = winY - y[i]; - if (mask[i] && visible_pixel(fxMesa, scrX, scrY)) { - GLint dstStride = fxMesa->screen_width * 4; - GLubyte *dst = - (GLubyte *) info.lfbPtr + scrY * dstStride + scrX * 4; - GLuint *dst32 = (GLuint *) dst; - *dst32 = PACK_BGRA32(rgba[i][0], rgba[i][1], - rgba[i][2], rgba[i][3]); - } - } - } - else { - /* back buffer */ - GLuint i; - for (i = 0; i < n; i++) { - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint winX = fxMesa->x_offset; - const GLint scrX = winX + x[i]; - const GLint scrY = winY - y[i]; - if (mask[i] && visible_pixel(fxMesa, scrX, scrY)) { - GLint dstStride = info.strideInBytes; - GLubyte *dst = - (GLubyte *) info.lfbPtr + scrY * dstStride + scrX * 4; - GLuint *dst32 = (GLuint *) dst; - *dst32 = PACK_BGRA32(rgba[i][0], rgba[i][1], - rgba[i][2], rgba[i][3]); - } - } - } - grLfbUnlock(GR_LFB_WRITE_ONLY, fxMesa->currentFB); - } - END_BOARD_LOCK(fxMesa); -} - - -static void -write_R8G8B8_mono_pixels(const GLcontext * ctx, - GLuint n, const GLint x[], const GLint y[], - const GLubyte mask[]) -{ - printf("write_r8g8b8_mono_pixels\n"); -} - - -static void -read_R8G8B8_pixels(const GLcontext * ctx, - GLuint n, const GLint x[], const GLint y[], - GLubyte rgba[][4], const GLubyte mask[]) -{ - printf("read_R8G8B8_pixels %d\n", n); -} - - - -/* - * 32bpp span/pixel functions - */ - -static void -write_R8G8B8A8_rgb_span(const GLcontext * ctx, GLuint n, GLint x, GLint y, - const GLubyte rgb[][3], const GLubyte mask[]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GrLfbInfo_t info; - - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_WRITE_ONLY, fxMesa->currentFB, GR_LFBWRITEMODE_8888, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint winX = fxMesa->x_offset; - const GLint scrX = winX + x; - const GLint scrY = winY - y; - GLubyte visMask[MAX_WIDTH]; - - generate_vismask(fxMesa, scrX, scrY, n, visMask); - - if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) { - GLint dstStride = fxMesa->screen_width * 4; - GLubyte *dst = (GLubyte *) info.lfbPtr - + (winY - y) * dstStride + (winX + x) * 4; - GLuint *dst32 = (GLuint *) dst; - GLuint i; - for (i = 0; i < n; i++) { - if (visMask[i] && (!mask || mask[i])) { - dst32[i] = - PACK_BGRA32(rgb[i][0], rgb[i][1], rgb[i][2], 255); - } - } - } - else { - /* back buffer */ - GLint dstStride = info.strideInBytes; - GLubyte *dst = (GLubyte *) info.lfbPtr - + (winY - y) * dstStride + (winX + x) * 4; - GLuint *dst32 = (GLuint *) dst; - if (mask) { - GLuint i; - for (i = 0; i < n; i++) { - if (visMask[i] && mask[i]) { - dst32[i] = - PACK_BGRA32(rgb[i][0], rgb[i][1], rgb[i][2], 255); - } - } - } - else { - GLuint i; - for (i = 0; i < n; i++) { - if (visMask[i]) { - dst32[i] = PACK_BGRA32(rgb[i][0], rgb[i][1], - rgb[i][2], 255); - } - } - } - } - grLfbUnlock(GR_LFB_WRITE_ONLY, fxMesa->currentFB); - } - END_BOARD_LOCK(fxMesa); -} - - -/* - *XXX test of grLfbWriteRegion in 32bpp mode. Doesn't seem to work! - */ -#if 0 -static void -write_R8G8B8A8_rgb_span2(const GLcontext * ctx, GLuint n, GLint x, GLint y, - const GLubyte rgb[][3], const GLubyte mask[]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GLint bottom = fxMesa->height + fxMesa->y_offset - 1; - GLint x2 = fxMesa->x_offset + x; - GLint y2 = bottom - y; - - FX_grLfbWriteRegion(fxMesa->currentFB, x2, y2, GR_LFB_SRC_FMT_888, - n, 1, 0, rgb); -} -#endif - - -static void -write_R8G8B8A8_rgba_span(const GLcontext * ctx, GLuint n, GLint x, GLint y, - const GLubyte rgba[][4], const GLubyte mask[]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GrLfbInfo_t info; - - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_WRITE_ONLY, fxMesa->currentFB, GR_LFBWRITEMODE_8888, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint winX = fxMesa->x_offset; - const GLint scrX = winX + x; - const GLint scrY = winY - y; - GLubyte visMask[MAX_WIDTH]; - - generate_vismask(fxMesa, scrX, scrY, n, visMask); - - if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) { - GLint dstStride = fxMesa->screen_width * 4; - GLubyte *dst = (GLubyte *) info.lfbPtr - + (winY - y) * dstStride + (winX + x) * 4; - GLuint *dst32 = (GLuint *) dst; - GLuint i; - for (i = 0; i < n; i++) { - if (visMask[i] && (!mask || mask[i])) { - dst32[i] = PACK_BGRA32(rgba[i][0], rgba[i][1], rgba[i][2], - rgba[i][3]); - } - } - } - else { - /* back buffer */ - GLint dstStride = info.strideInBytes; - GLubyte *dst = (GLubyte *) info.lfbPtr - + (winY - y) * dstStride + (winX + x) * 4; - GLuint *dst32 = (GLuint *) dst; - GLubyte visMask[MAX_WIDTH]; - generate_vismask(fxMesa, scrX, scrY, n, visMask); - if (mask) { - GLuint i; - for (i = 0; i < n; i++) { - if (visMask[i] && mask[i]) { - dst32[i] = PACK_BGRA32(rgba[i][0], rgba[i][1], - rgba[i][2], rgba[i][3]); - } - } - } - else { - /* no mask, write all pixels */ - GLuint i; - for (i = 0; i < n; i++) { - if (visMask[i]) { - dst32[i] = PACK_BGRA32(rgba[i][0], rgba[i][1], - rgba[i][2], rgba[i][3]); - } - } - } - } - grLfbUnlock(GR_LFB_WRITE_ONLY, fxMesa->currentFB); - } - else { - info.strideInBytes = -1; - } - END_BOARD_LOCK(fxMesa); -} - - -static void -write_R8G8B8A8_mono_span(const GLcontext * ctx, GLuint n, GLint x, GLint y, - const GLubyte mask[]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GLubyte rgba[MAX_WIDTH][4]; - GLuint *data = (GLuint *) rgba; - GLuint i; - - /* XXX this is a simple-minded implementation but good enough for now */ - for (i = 0; i < n; i++) { - data[i] = (GLuint) fxMesa->color; - } - write_R8G8B8A8_rgba_span(ctx, n, x, y, (const GLubyte(*)[4]) rgba, mask); -} - - -static void -read_R8G8B8A8_span(const GLcontext * ctx, GLuint n, GLint x, GLint y, - GLubyte rgba[][4]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GrLfbInfo_t info; - - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_READ_ONLY, fxMesa->currentFB, GR_LFBWRITEMODE_ANY, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint winX = fxMesa->x_offset; - - if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) { - GLint srcStride = fxMesa->screen_width; - const GLuint *src32 = (const GLuint *) info.lfbPtr - + (winY - y) * srcStride + (winX + x); - GLuint i; - MEMCPY(rgba, src32, n * 4); - for (i = 0; i < n; i++) { - rgba[i][0] ^= rgba[i][2]; - rgba[i][2] ^= rgba[i][0]; - rgba[i][0] ^= rgba[i][2]; - } - } - else { - /* back buffer */ - GLint srcStride = info.strideInBytes / sizeof(GLuint); - const GLuint *src32 = (const GLuint *) info.lfbPtr - + (winY - y) * srcStride + (winX + x); - GLuint i; - MEMCPY(rgba, src32, n * 4); - for (i = 0; i < n; i++) { - rgba[i][0] ^= rgba[i][2]; - rgba[i][2] ^= rgba[i][0]; - rgba[i][0] ^= rgba[i][2]; - } - } - grLfbUnlock(GR_LFB_READ_ONLY, fxMesa->currentFB); - } - else - info.strideInBytes = -1; - END_BOARD_LOCK(fxMesa); -} - - -static void -write_R8G8B8A8_pixels(const GLcontext * ctx, - GLuint n, const GLint x[], const GLint y[], - CONST GLubyte rgba[][4], const GLubyte mask[]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GrLfbInfo_t info; - - BEGIN_BOARD_LOCK(fxMesa); - info.size = sizeof(info); - if (grLfbLock(GR_LFB_WRITE_ONLY, fxMesa->currentFB, GR_LFBWRITEMODE_8888, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) { - GLuint i; - for (i = 0; i < n; i++) { - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint winX = fxMesa->x_offset; - const GLint scrX = winX + x[i]; - const GLint scrY = winY - y[i]; - if (mask[i] && visible_pixel(fxMesa, scrX, scrY)) { - GLint dstStride = fxMesa->screen_width * 4; - GLubyte *dst = - (GLubyte *) info.lfbPtr + scrY * dstStride + scrX * 4; - GLuint *dst32 = (GLuint *) dst; - *dst32 = PACK_BGRA32(rgba[i][0], rgba[i][1], - rgba[i][2], rgba[i][3]); - } - } - } - else { - /* back buffer */ - GLuint i; - for (i = 0; i < n; i++) { - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint winX = fxMesa->x_offset; - const GLint scrX = winX + x[i]; - const GLint scrY = winY - y[i]; - if (mask[i] && visible_pixel(fxMesa, scrX, scrY)) { - GLint dstStride = info.strideInBytes; - GLubyte *dst = - (GLubyte *) info.lfbPtr + scrY * dstStride + scrX * 4; - GLuint *dst32 = (GLuint *) dst; - *dst32 = PACK_BGRA32(rgba[i][0], rgba[i][1], - rgba[i][2], rgba[i][3]); - } - } - } - grLfbUnlock(GR_LFB_WRITE_ONLY, fxMesa->currentFB); - } - END_BOARD_LOCK(fxMesa); -} - - -static void -write_R8G8B8A8_mono_pixels(const GLcontext * ctx, - GLuint n, const GLint x[], const GLint y[], - const GLubyte mask[]) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLuint i; - GLuint color = fxMesa->color; - for (i = 0; i < n; i++) { - if (mask[i]) { - write_R8G8B8A8_rgba_span(ctx, 1, x[i], y[i], - (const GLubyte(*)[4]) &color, mask + i); - } - } -} - - - -static void -read_R8G8B8A8_pixels(const GLcontext * ctx, - GLuint n, const GLint x[], const GLint y[], - GLubyte rgba[][4], const GLubyte mask[]) -{ - GLuint i; - for (i = 0; i < n; i++) { - if (mask[i]) { - read_R8G8B8A8_span(ctx, 1, x[i], y[i], rgba + i); - } - } -} - - - -/* - * Depth buffer read/write functions. - */ -/* - * To read the frame buffer, we need to lock and unlock it. The - * four macros {READ,WRITE}_FB_SPAN_{LOCK,UNLOCK} - * do this for us. - * - * Note that the lock must be matched with an unlock. These - * macros include a spare curly brace, so they must - * be syntactically matched. - * - * Note, also, that you can't lock a buffer twice with different - * modes. That is to say, you can't lock a buffer in both read - * and write modes. The strideInBytes and LFB pointer will be - * the same with read and write locks, so you can use either. - * o The HW has different state for reads and writes, so - * locking it twice may give screwy results. - * o The DRM won't let you lock twice. It hangs. This is probably - * because of the BEGIN_BOARD_LOCK IN THE *_FB_SPAN_LOCK macros, - * and could be eliminated with nonlocking lock routines. But - * what's the point after all. - */ -#define READ_FB_SPAN_LOCK(fxMesa, info, target_buffer) \ - BEGIN_BOARD_LOCK(fxMesa); \ - (info).size=sizeof(info); \ - if (grLfbLock(GR_LFB_READ_ONLY, \ - target_buffer, \ - GR_LFBWRITEMODE_ANY, \ - GR_ORIGIN_LOWER_LEFT, \ - FXFALSE, \ - &(info))) { - -#define READ_FB_SPAN_UNLOCK(fxMesa, target_buffer) \ - grLfbUnlock(GR_LFB_READ_ONLY, target_buffer); \ - } else { \ - fprintf(stderr, "fxDriver: Can't get %s (%d) read lock\n", \ - (target_buffer == GR_BUFFER_BACKBUFFER) \ - ? "back buffer" \ - : ((target_buffer == GR_BUFFER_AUXBUFFER) \ - ? "depth buffer" \ - : "unknown buffer"), \ - target_buffer); \ - } \ - END_BOARD_LOCK(fxMesa); - - -#define WRITE_FB_SPAN_LOCK(fxMesa, info, target_buffer, write_mode) \ - BEGIN_BOARD_LOCK(fxMesa); \ - info.size=sizeof(info); \ - if (grLfbLock(GR_LFB_WRITE_ONLY, \ - target_buffer, \ - write_mode, \ - GR_ORIGIN_LOWER_LEFT, \ - FXFALSE, \ - &info)) { - -#define WRITE_FB_SPAN_UNLOCK(fxMesa, target_buffer) \ - grLfbUnlock(GR_LFB_WRITE_ONLY, target_buffer); \ - } else { \ - fprintf(stderr, "fxDriver: Can't get %s (%d) write lock\n", \ - (target_buffer == GR_BUFFER_BACKBUFFER) \ - ? "back buffer" \ - : ((target_buffer == GR_BUFFER_AUXBUFFER) \ - ? "depth buffer" \ - : "unknown buffer"), \ - target_buffer); \ - } \ - END_BOARD_LOCK(fxMesa); - -/* - * Because the Linear Frame Buffer is not necessarily aligned - * with the depth buffer, we have to do some fiddling - * around to get the right addresses. - * - * Perhaps a picture is in order. The Linear Frame Buffer - * looks like this: - * - * |<----------------------info.strideInBytes------------->| - * |<-----physicalStrideInBytes------->| - * +-----------------------------------+xxxxxxxxxxxxxxxxxxx+ - * | | | - * | Legal Memory | Forbidden Zone | - * | | | - * +-----------------------------------+xxxxxxxxxxxxxxxxxxx+ - * - * You can only reliably read and write legal locations. Reads - * and writes from the Forbidden Zone will return undefined values, - * and may cause segmentation faults. - * - * Now, the depth buffer may not end up in a location such each - * scan line is an LFB line. For example, the depth buffer may - * look like this: - * - * wrapped ordinary. - * +-----------------------------------+xxxxxxxxxxxxxxxxxxx+ - * |0000000000000000000000 | | back - * |1111111111111111111111 | | buffer - * |2222222222222222222222 | | - * |4096b align. padxx00000000000000000| Forbidden Zone | depth - * |0000 11111111111111111| | buffer - * |1111 22222222222222222| | - * |2222 | | - * +-----------------------------------+xxxxxxxxxxxxxxxxxxx+ - * where each number is the scan line number. We know it will - * be aligned on 128 byte boundaries, at least. Aligning this - * on a scanline boundary causes the back and depth buffers to - * thrash in the SST1 cache. (Note that the back buffer is always - * allocated at the beginning of LFB memory, and so it is always - * properly aligned with the LFB stride.) - * - * We call the beginning of the line (which is the rightmost - * part of the depth line in the picture above) the *ordinary* part - * of the scanline, and the end of the line (which is the - * leftmost part, one line below) the *wrapped* part of the scanline. - * a.) We need to know what x value to subtract from the screen - * x coordinate to index into the wrapped part. - * b.) We also need to figure out if we need to read from the ordinary - * part scan line, or from the wrapped part of the scan line. - * - * [ad a] - * The first wrapped x coordinate is that coordinate such that - * depthBufferOffset&(info.strideInBytes) + x*elmentSize {*} - * > physicalStrideInBytes - * where depthBufferOffset is the LFB distance in bytes - * from the back buffer to the depth buffer. The expression - * depthBufferOffset&(info.strideInBytes) - * is then the offset (in bytes) from the beginining of (any) - * depth buffer line to first element in the line. - * Simplifying inequation {*} above we see that x is the smallest - * value such that - * x*elementSize > physicalStrideInBytes {**} - * - depthBufferOffset&(info.strideInBytes) - * Now, we know that both the summands on the right are multiples of - * 128, and elementSize <= 4, so if equality holds in {**}, x would - * be a multiple of 32. Thus we can set x to - * xwrapped = (physicalStrideInBytes - * - depthBufferOffset&(info.strideInBytes))/elementSize - * + 1 - * - * [ad b] - * Question b is now simple. We read from the wrapped scan line if - * x is greater than xwrapped. - */ -#define TILE_WIDTH_IN_BYTES 128 -#define TILE_WIDTH_IN_ZOXELS(bpz) (TILE_WIDTH_IN_BYTES/(bpz)) -#define TILE_HEIGHT_IN_LINES 32 -typedef struct -{ - void *lfbPtr; - void *lfbWrapPtr; - FxU32 LFBStrideInElts; - GLint firstWrappedX; -} -LFBParameters; - -/* - * We need information about the back buffer. Note that - * this function *cannot be called* while the aux buffer - * is locked, or the caller will hang. - * - * Only Glide knows the LFB address of the back and depth - * offsets. The upper levels of Mesa know the depth offset, - * but that is not in LFB space, it is tiled memory space, - * and is not useable for us. - */ -static void -GetBackBufferInfo(fxMesaContext fxMesa, GrLfbInfo_t * backBufferInfo) -{ - READ_FB_SPAN_LOCK(fxMesa, *backBufferInfo, GR_BUFFER_BACKBUFFER); - READ_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_BACKBUFFER); -} - -static void -GetFbParams(fxMesaContext fxMesa, - GrLfbInfo_t * info, - GrLfbInfo_t * backBufferInfo, - LFBParameters * ReadParamsp, FxU32 elementSize) -{ - FxU32 physicalStrideInBytes, bufferOffset; - FxU32 strideInBytes = info->strideInBytes; - char *lfbPtr = (char *) (info->lfbPtr); - - /* - * These two come directly from the info structure. - */ - ReadParamsp->lfbPtr = (void *) lfbPtr; - ReadParamsp->LFBStrideInElts = strideInBytes / elementSize; - /* - * Now, calculate the value of firstWrappedX. - * - * The physical stride is the screen width in bytes rounded up to - * the next highest multiple of 128 bytes. Note that this fails - * when TILE_WIDTH_IN_BYTES is not a power of two. - * - * The buffer Offset is the distance between the beginning of - * the LFB space, which is the beginning of the back buffer, - * and the buffer we are gathering information about. - * We want to make this routine usable for operations on the - * back buffer, though we don't actually use it on the back - * buffer. Note, then, that if bufferOffset == 0, the firstWrappedX - * is in the forbidden zone, and is therefore never reached. - * - * Note that if - * physicalStrideInBytes - * < bufferOffset&(info->strideInBytes-1) - * the buffer begins in the forbidden zone. We assert for this. - */ - bufferOffset = (FxU32)(lfbPtr - (char *) backBufferInfo->lfbPtr); - physicalStrideInBytes - = (fxMesa->screen_width * elementSize + TILE_WIDTH_IN_BYTES - 1) - & ~(TILE_WIDTH_IN_BYTES - 1); - assert(physicalStrideInBytes > (bufferOffset & (strideInBytes - 1))); - ReadParamsp->firstWrappedX - = (physicalStrideInBytes - - (bufferOffset & (strideInBytes - 1))) / elementSize; - /* - * This is the address of the next physical line. - */ - ReadParamsp->lfbWrapPtr - = (void *) ((char *) backBufferInfo->lfbPtr - + (bufferOffset & ~(strideInBytes - 1)) - + (TILE_HEIGHT_IN_LINES) * strideInBytes); -} - -/* - * These macros fetch data from the frame buffer. The type is - * the type of data we want to fetch. It should match the type - * whose size was used with GetFbParams to fill in the structure - * in *ReadParamsp. We have a macro to read the ordinary - * part, a second macro to read the wrapped part, and one which - * will do either. When we are reading a span, we will know - * when the ordinary part ends, so there's no need to test for - * it. However, when reading and writing pixels, we don't - * necessarily know. I suppose it's a matter of taste whether - * it's better in the macro or in the call. - * - * Recall that x and y are screen coordinates. - */ -#define GET_FB_DATA(ReadParamsp, type, x, y) \ - (((x) < (ReadParamsp)->firstWrappedX) \ - ? (((type *)((ReadParamsp)->lfbPtr)) \ - [(y) * ((ReadParamsp)->LFBStrideInElts) \ - + (x)]) \ - : (((type *)((ReadParamsp)->lfbWrapPtr)) \ - [((y)) * ((ReadParamsp)->LFBStrideInElts) \ - + ((x) - (ReadParamsp)->firstWrappedX)])) -#define GET_ORDINARY_FB_DATA(ReadParamsp, type, x, y) \ - (((type *)((ReadParamsp)->lfbPtr)) \ - [(y) * ((ReadParamsp)->LFBStrideInElts) \ - + (x)]) -#define GET_WRAPPED_FB_DATA(ReadParamsp, type, x, y) \ - (((type *)((ReadParamsp)->lfbWrapPtr)) \ - [((y)) * ((ReadParamsp)->LFBStrideInElts) \ - + ((x) - (ReadParamsp)->firstWrappedX)]) -#define PUT_FB_DATA(ReadParamsp, type, x, y, value) \ - (GET_FB_DATA(ReadParamsp, type, x, y) = (type)(value)) -#define PUT_ORDINARY_FB_DATA(ReadParamsp, type, x, y, value) \ - (GET_ORDINARY_FB_DATA(ReadParamsp, type, x, y) = (type)(value)) -#define PUT_WRAPPED_FB_DATA(ReadParamsp, type, x, y, value) \ - (GET_WRAPPED_FB_DATA(ReadParamsp, type, x, y) = (type)(value)) - -static void -fxDDWriteDepthSpan(GLcontext * ctx, - GLuint n, GLint x, GLint y, const GLdepth depth[], - const GLubyte mask[]) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLint bottom = fxMesa->y_offset + fxMesa->height - 1; - GLuint depth_size = fxMesa->glVis->DepthBits; - GLuint stencil_size = fxMesa->glVis->StencilBits; - GrLfbInfo_t info; - GLubyte visMask[MAX_WIDTH]; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDWriteDepthSpan(...)\n"); - } - - assert((depth_size == 16) || (depth_size == 24) || (depth_size == 32)); - /* - * Convert x and y to screen coordinates. - */ - x += fxMesa->x_offset; - y = bottom - y; - if (mask) { - GLint i; - GLushort d16; - GrLfbInfo_t backBufferInfo; - - switch (depth_size) { - case 16: - GetBackBufferInfo(fxMesa, &backBufferInfo); - /* - * Note that the _LOCK macro adds a curly brace, - * and the UNLOCK macro removes it. - */ - WRITE_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER, - GR_LFBWRITEMODE_ANY); - generate_vismask(fxMesa, x, y, n, visMask); - { - LFBParameters ReadParams; - int wrappedPartStart; - GetFbParams(fxMesa, &info, &backBufferInfo, - &ReadParams, sizeof(GLushort)); - if (ReadParams.firstWrappedX <= x) { - wrappedPartStart = 0; - } - else if (n <= (ReadParams.firstWrappedX - x)) { - wrappedPartStart = n; - } - else { - wrappedPartStart = (ReadParams.firstWrappedX - x); - } - for (i = 0; i < wrappedPartStart; i++) { - if (mask[i] && visMask[i]) { - d16 = depth[i]; - PUT_ORDINARY_FB_DATA(&ReadParams, GLushort, x + i, y, d16); - } - } - for (; i < n; i++) { - if (mask[i] && visMask[i]) { - d16 = depth[i]; - PUT_WRAPPED_FB_DATA(&ReadParams, GLushort, x + i, y, d16); - } - } - } - WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); - break; - case 24: - case 32: - GetBackBufferInfo(fxMesa, &backBufferInfo); - /* - * Note that the _LOCK macro adds a curly brace, - * and the UNLOCK macro removes it. - */ - WRITE_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER, - GR_LFBWRITEMODE_ANY); - generate_vismask(fxMesa, x, y, n, visMask); - { - LFBParameters ReadParams; - int wrappedPartStart; - GetFbParams(fxMesa, &info, &backBufferInfo, - &ReadParams, sizeof(GLuint)); - if (ReadParams.firstWrappedX <= x) { - wrappedPartStart = 0; - } - else if (n <= (ReadParams.firstWrappedX - x)) { - wrappedPartStart = n; - } - else { - wrappedPartStart = (ReadParams.firstWrappedX - x); - } - for (i = 0; i < wrappedPartStart; i++) { - GLuint d32; - if (mask[i] && visMask[i]) { - if (stencil_size > 0) { - d32 = - GET_ORDINARY_FB_DATA(&ReadParams, GLuint, - x + i, y); - d32 = - (d32 & 0xFF000000) | (depth[i] & 0x00FFFFFF); - } - else { - d32 = depth[i]; - } - PUT_ORDINARY_FB_DATA(&ReadParams, GLuint, x + i, y, d32); - } - } - for (; i < n; i++) { - GLuint d32; - if (mask[i] && visMask[i]) { - if (stencil_size > 0) { - d32 = - GET_WRAPPED_FB_DATA(&ReadParams, GLuint, - x + i, y); - d32 = - (d32 & 0xFF000000) | (depth[i] & 0x00FFFFFF); - } - else { - d32 = depth[i]; - } - PUT_WRAPPED_FB_DATA(&ReadParams, GLuint, x + i, y, d32); - } - } - } - WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); - break; - } - } - else { - GLint i; - GLuint d32; - GLushort d16; - GrLfbInfo_t backBufferInfo; - - switch (depth_size) { - case 16: - GetBackBufferInfo(fxMesa, &backBufferInfo); - /* - * Note that the _LOCK macro adds a curly brace, - * and the UNLOCK macro removes it. - */ - WRITE_FB_SPAN_LOCK(fxMesa, info, - GR_BUFFER_AUXBUFFER, GR_LFBWRITEMODE_ANY); - generate_vismask(fxMesa, x, y, n, visMask); - { - LFBParameters ReadParams; - GLuint wrappedPartStart; - GetFbParams(fxMesa, &info, &backBufferInfo, - &ReadParams, sizeof(GLushort)); - if (ReadParams.firstWrappedX <= x) { - wrappedPartStart = 0; - } - else if (n <= (ReadParams.firstWrappedX - x)) { - wrappedPartStart = n; - } - else { - wrappedPartStart = (ReadParams.firstWrappedX - x); - } - for (i = 0; i < wrappedPartStart; i++) { - if (visMask[i]) { - d16 = depth[i]; - PUT_ORDINARY_FB_DATA(&ReadParams, - GLushort, - x + i, y, - d16); - } - } - for (; i < n; i++) { - if (visMask[i]) { - d16 = depth[i]; - PUT_WRAPPED_FB_DATA(&ReadParams, - GLushort, - x + i, y, - d16); - } - } - } - WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); - break; - case 24: - case 32: - GetBackBufferInfo(fxMesa, &backBufferInfo); - /* - * Note that the _LOCK macro adds a curly brace, - * and the UNLOCK macro removes it. - */ - WRITE_FB_SPAN_LOCK(fxMesa, info, - GR_BUFFER_AUXBUFFER, GR_LFBWRITEMODE_ANY); - generate_vismask(fxMesa, x, y, n, visMask); - { - LFBParameters ReadParams; - GLuint wrappedPartStart; - - GetFbParams(fxMesa, &info, &backBufferInfo, - &ReadParams, sizeof(GLuint)); - if (ReadParams.firstWrappedX <= x) { - wrappedPartStart = 0; - } - else if (n <= (ReadParams.firstWrappedX - x)) { - wrappedPartStart = n; - } - else { - wrappedPartStart = (ReadParams.firstWrappedX - x); - } - for (i = 0; i < wrappedPartStart; i++) { - if (visMask[i]) { - if (stencil_size > 0) { - d32 = GET_ORDINARY_FB_DATA(&ReadParams, GLuint, x + i, y); - d32 = - (d32 & 0xFF000000) | (depth[i] & 0x00FFFFFF); - } - else { - d32 = depth[i]; - } - PUT_ORDINARY_FB_DATA(&ReadParams, GLuint, x + i, y, d32); - } - } - for (; i < n; i++) { - if (visMask[i]) { - if (stencil_size > 0) { - d32 = GET_WRAPPED_FB_DATA(&ReadParams, GLuint, x + i, y); - d32 = - (d32 & 0xFF000000) | (depth[i] & 0x00FFFFFF); - } - else { - d32 = depth[i]; - } - PUT_WRAPPED_FB_DATA(&ReadParams, GLuint, x + i, y, d32); - } - } - } - WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); - break; - } - } -} - -static void -fxDDReadDepthSpan(GLcontext * ctx, - GLuint n, GLint x, GLint y, GLdepth depth[]) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLint bottom = fxMesa->height + fxMesa->y_offset - 1; - GLuint i; - GLuint depth_size = fxMesa->glVis->DepthBits; - GrLfbInfo_t info; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDReadDepthSpan(...)\n"); - } - - /* - * Convert to screen coordinates. - */ - x += fxMesa->x_offset; - y = bottom - y; - switch (depth_size) { - case 16: - { - LFBParameters ReadParams; - GrLfbInfo_t backBufferInfo; - int wrappedPartStart; - GetBackBufferInfo(fxMesa, &backBufferInfo); - /* - * Note that the _LOCK macro adds a curly brace, - * and the UNLOCK macro removes it. - */ - READ_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER); - GetFbParams(fxMesa, &info, &backBufferInfo, - &ReadParams, sizeof(GLushort)); - if (ReadParams.firstWrappedX <= x) { - wrappedPartStart = 0; - } - else if (n <= (ReadParams.firstWrappedX - x)) { - wrappedPartStart = n; - } - else { - wrappedPartStart = (ReadParams.firstWrappedX - x); - } - /* - * Read the line. - */ - for (i = 0; i < wrappedPartStart; i++) { - depth[i] = - GET_ORDINARY_FB_DATA(&ReadParams, GLushort, x + i, y); - } - for (; i < n; i++) { - depth[i] = GET_WRAPPED_FB_DATA(&ReadParams, GLushort, - x + i, y); - } - READ_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); - break; - } - case 24: - case 32: - { - LFBParameters ReadParams; - GrLfbInfo_t backBufferInfo; - int wrappedPartStart; - GLuint stencil_size = fxMesa->glVis->StencilBits; - GetBackBufferInfo(fxMesa, &backBufferInfo); - /* - * Note that the _LOCK macro adds a curly brace, - * and the UNLOCK macro removes it. - */ - READ_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER); - GetFbParams(fxMesa, &info, &backBufferInfo, - &ReadParams, sizeof(GLuint)); - if (ReadParams.firstWrappedX <= x) { - wrappedPartStart = 0; - } - else if (n <= (ReadParams.firstWrappedX - x)) { - wrappedPartStart = n; - } - else { - wrappedPartStart = (ReadParams.firstWrappedX - x); - } - /* - * Read the line. - */ - for (i = 0; i < wrappedPartStart; i++) { - const GLuint mask = - (stencil_size > 0) ? 0x00FFFFFF : 0xFFFFFFFF; - depth[i] = - GET_ORDINARY_FB_DATA(&ReadParams, GLuint, x + i, y); - depth[i] &= mask; - } - for (; i < n; i++) { - const GLuint mask = - (stencil_size > 0) ? 0x00FFFFFF : 0xFFFFFFFF; - depth[i] = GET_WRAPPED_FB_DATA(&ReadParams, GLuint, x + i, y); - depth[i] &= mask; - } - READ_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); - break; - } - } -} - - -static void -fxDDWriteDepthPixels(GLcontext * ctx, - GLuint n, const GLint x[], const GLint y[], - const GLdepth depth[], const GLubyte mask[]) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLint bottom = fxMesa->height + fxMesa->y_offset - 1; - GLuint i; - GLushort d16; - GLuint d32; - GLuint depth_size = fxMesa->glVis->DepthBits; - GLuint stencil_size = fxMesa->glVis->StencilBits; - GrLfbInfo_t info; - int xpos; - int ypos; - GrLfbInfo_t backBufferInfo; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDWriteDepthPixels(...)\n"); - } - - switch (depth_size) { - case 16: - GetBackBufferInfo(fxMesa, &backBufferInfo); - /* - * Note that the _LOCK macro adds a curly brace, - * and the UNLOCK macro removes it. - */ - WRITE_FB_SPAN_LOCK(fxMesa, info, - GR_BUFFER_AUXBUFFER, GR_LFBWRITEMODE_ANY); - { - LFBParameters ReadParams; - GetFbParams(fxMesa, &info, &backBufferInfo, - &ReadParams, sizeof(GLushort)); - for (i = 0; i < n; i++) { - if (mask[i] && visible_pixel(fxMesa, x[i], y[i])) { - xpos = x[i] + fxMesa->x_offset; - ypos = bottom - y[i]; - d16 = depth[i]; - PUT_FB_DATA(&ReadParams, GLushort, xpos, ypos, d16); - } - } - } - WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); - break; - case 24: - case 32: - GetBackBufferInfo(fxMesa, &backBufferInfo); - /* - * Note that the _LOCK macro adds a curly brace, - * and the UNLOCK macro removes it. - */ - WRITE_FB_SPAN_LOCK(fxMesa, info, - GR_BUFFER_AUXBUFFER, GR_LFBWRITEMODE_ANY); - { - LFBParameters ReadParams; - GetFbParams(fxMesa, &info, &backBufferInfo, - &ReadParams, sizeof(GLuint)); - for (i = 0; i < n; i++) { - if (mask[i]) { - if (visible_pixel(fxMesa, x[i], y[i])) { - xpos = x[i] + fxMesa->x_offset; - ypos = bottom - y[i]; - if (stencil_size > 0) { - d32 = - GET_FB_DATA(&ReadParams, GLuint, xpos, ypos); - d32 = (d32 & 0xFF000000) | (depth[i] & 0xFFFFFF); - } - else { - d32 = depth[i]; - } - PUT_FB_DATA(&ReadParams, GLuint, xpos, ypos, d32); - } - } - } - } - WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); - break; - } -} - - -static void -fxDDReadDepthPixels(GLcontext * ctx, GLuint n, - const GLint x[], const GLint y[], GLdepth depth[]) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLint bottom = fxMesa->height + fxMesa->y_offset - 1; - GLuint i; - GLuint depth_size = fxMesa->glVis->DepthBits; - GLushort d16; - int xpos; - int ypos; - GrLfbInfo_t info; - GLuint stencil_size; - GrLfbInfo_t backBufferInfo; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDReadDepthPixels(...)\n"); - } - - assert((depth_size == 16) || (depth_size == 24) || (depth_size == 32)); - switch (depth_size) { - case 16: - GetBackBufferInfo(fxMesa, &backBufferInfo); - /* - * Note that the _LOCK macro adds a curly brace, - * and the UNLOCK macro removes it. - */ - READ_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER); - { - LFBParameters ReadParams; - GetFbParams(fxMesa, &info, &backBufferInfo, - &ReadParams, sizeof(GLushort)); - for (i = 0; i < n; i++) { - /* - * Convert to screen coordinates. - */ - xpos = x[i] + fxMesa->x_offset; - ypos = bottom - y[i]; - d16 = GET_FB_DATA(&ReadParams, GLushort, xpos, ypos); - depth[i] = d16; - } - } - READ_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); - break; - case 24: - case 32: - GetBackBufferInfo(fxMesa, &backBufferInfo); - /* - * Note that the _LOCK macro adds a curly brace, - * and the UNLOCK macro removes it. - */ - READ_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER); - stencil_size = fxMesa->glVis->StencilBits; - { - LFBParameters ReadParams; - GetFbParams(fxMesa, &info, &backBufferInfo, - &ReadParams, sizeof(GLuint)); - for (i = 0; i < n; i++) { - GLuint d32; - - /* - * Convert to screen coordinates. - */ - xpos = x[i] + fxMesa->x_offset; - ypos = bottom - y[i]; - d32 = GET_FB_DATA(&ReadParams, GLuint, xpos, ypos); - if (stencil_size > 0) { - d32 &= 0x00FFFFFF; - } - depth[i] = d32; - } - } - READ_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); - break; - default: - assert(0); - } -} - -/* - * Stencil buffer read/write functions. - */ -#define EXTRACT_S_FROM_ZS(zs) (((zs) >> 24) & 0xFF) -#define EXTRACT_Z_FROM_ZS(zs) ((zs) & 0xffffff) -#define BUILD_ZS(z, s) (((s) << 24) | (z)) - -static void -write_stencil_span(GLcontext * ctx, GLuint n, GLint x, GLint y, - const GLstencil stencil[], const GLubyte mask[]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GrLfbInfo_t info; - GrLfbInfo_t backBufferInfo; - - GetBackBufferInfo(fxMesa, &backBufferInfo); - /* - * Note that the _LOCK macro adds a curly brace, - * and the UNLOCK macro removes it. - */ - WRITE_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER, GR_LFBWRITEMODE_ANY); - { - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint winX = fxMesa->x_offset; - const GLint scrX = winX + x; - const GLint scrY = winY - y; - LFBParameters ReadParams; - GLubyte visMask[MAX_WIDTH]; - GLuint i; - int wrappedPartStart; - - GetFbParams(fxMesa, &info, &backBufferInfo, &ReadParams, - sizeof(GLuint)); - if (ReadParams.firstWrappedX <= x) { - wrappedPartStart = 0; - } - else if (n <= (ReadParams.firstWrappedX - x)) { - wrappedPartStart = n; - } - else { - wrappedPartStart = (ReadParams.firstWrappedX - x); - } - generate_vismask(fxMesa, scrX, scrY, n, visMask); - for (i = 0; i < wrappedPartStart; i++) { - if (visMask[i] && (!mask || mask[i])) { - GLuint z = GET_ORDINARY_FB_DATA(&ReadParams, GLuint, - scrX + i, scrY) & 0x00FFFFFF; - z |= (stencil[i] & 0xFF) << 24; - PUT_ORDINARY_FB_DATA(&ReadParams, GLuint, scrX + i, scrY, z); - } - } - for (; i < n; i++) { - if (visMask[i] && (!mask || mask[i])) { - GLuint z = GET_WRAPPED_FB_DATA(&ReadParams, GLuint, - scrX + i, scrY) & 0x00FFFFFF; - z |= (stencil[i] & 0xFF) << 24; - PUT_WRAPPED_FB_DATA(&ReadParams, GLuint, scrX + i, scrY, z); - } - } - } - WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); -} - - -static void -read_stencil_span(GLcontext * ctx, GLuint n, GLint x, GLint y, - GLstencil stencil[]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GrLfbInfo_t info; - GrLfbInfo_t backBufferInfo; - - GetBackBufferInfo(fxMesa, &backBufferInfo); - /* - * Note that the _LOCK macro adds a curly brace, - * and the UNLOCK macro removes it. - */ - READ_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER); - { - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint winX = fxMesa->x_offset; - GLuint i; - LFBParameters ReadParams; - int wrappedPartStart; - - /* - * Convert to screen coordinates. - */ - x += winX; - y = winY - y; - GetFbParams(fxMesa, &info, &backBufferInfo, &ReadParams, - sizeof(GLuint)); - if (ReadParams.firstWrappedX <= x) { - wrappedPartStart = 0; - } - else if (n <= (ReadParams.firstWrappedX - x)) { - wrappedPartStart = n; - } - else { - wrappedPartStart = (ReadParams.firstWrappedX - x); - } - for (i = 0; i < wrappedPartStart; i++) { - stencil[i] = (GET_ORDINARY_FB_DATA(&ReadParams, GLuint, - x + i, y) >> 24) & 0xFF; - } - for (; i < n; i++) { - stencil[i] = (GET_WRAPPED_FB_DATA(&ReadParams, GLuint, - x + i, y) >> 24) & 0xFF; - } - } - READ_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); -} - - -static void -write_stencil_pixels(GLcontext * ctx, GLuint n, - const GLint x[], const GLint y[], - const GLstencil stencil[], const GLubyte mask[]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GrLfbInfo_t info; - GrLfbInfo_t backBufferInfo; - - GetBackBufferInfo(fxMesa, &backBufferInfo); - /* - * Note that the _LOCK macro adds a curly brace, - * and the UNLOCK macro removes it. - */ - WRITE_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER, GR_LFBWRITEMODE_ANY); - { - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint winX = fxMesa->x_offset; - LFBParameters ReadParams; - GLuint i; - - GetFbParams(fxMesa, &info, &backBufferInfo, &ReadParams, - sizeof(GLuint)); - for (i = 0; i < n; i++) { - const GLint scrX = winX + x[i]; - const GLint scrY = winY - y[i]; - if ((!mask || mask[i]) && visible_pixel(fxMesa, scrX, scrY)) { - GLuint z = - GET_FB_DATA(&ReadParams, GLuint, scrX, scrY) & 0x00FFFFFF; - z |= (stencil[i] & 0xFF) << 24; - PUT_FB_DATA(&ReadParams, GLuint, scrX, scrY, z); - } - } - } - WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); -} - - -static void -read_stencil_pixels(GLcontext * ctx, GLuint n, const GLint x[], - const GLint y[], GLstencil stencil[]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - GrLfbInfo_t info; - GrLfbInfo_t backBufferInfo; - - GetBackBufferInfo(fxMesa, &backBufferInfo); - /* - * Note that the _LOCK macro adds a curly brace, - * and the UNLOCK macro removes it. - */ - READ_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER); - { - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; - const GLint winX = fxMesa->x_offset; - GLuint i; - LFBParameters ReadParams; - - GetFbParams(fxMesa, &info, &backBufferInfo, &ReadParams, - sizeof(GLuint)); - for (i = 0; i < n; i++) { - const GLint scrX = winX + x[i]; - const GLint scrY = winY - y[i]; - stencil[i] = - (GET_FB_DATA(&ReadParams, GLuint, scrX, scrY) >> 24) & 0xFF; - } - } - READ_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); -} - -void -fxSetupDDSpanPointers(GLcontext * ctx) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - - if (ctx->Visual->RedBits == 5 && - ctx->Visual->GreenBits == 6 && - ctx->Visual->BlueBits == 5 && ctx->Visual->AlphaBits == 0) { - /* 16bpp mode */ - ctx->Driver.WriteRGBASpan = write_R5G6B5_rgba_span; - ctx->Driver.WriteRGBSpan = write_R5G6B5_rgb_span; - ctx->Driver.WriteMonoRGBASpan = write_R5G6B5_mono_span; - ctx->Driver.WriteRGBAPixels = write_R5G6B5_pixels; - ctx->Driver.WriteMonoRGBAPixels = write_R5G6B5_mono_pixels; - ctx->Driver.ReadRGBASpan = read_R5G6B5_span; - ctx->Driver.ReadRGBAPixels = read_R5G6B5_pixels; - } - else if (ctx->Visual->RedBits == 8 && - ctx->Visual->GreenBits == 8 && - ctx->Visual->BlueBits == 8 && ctx->Visual->AlphaBits == 0) { - /* 24bpp mode */ - ctx->Driver.WriteRGBASpan = write_R8G8B8_rgba_span; - ctx->Driver.WriteRGBSpan = write_R8G8B8_rgb_span; - ctx->Driver.WriteMonoRGBASpan = write_R8G8B8_mono_span; - ctx->Driver.WriteRGBAPixels = write_R8G8B8_pixels; - ctx->Driver.WriteMonoRGBAPixels = write_R8G8B8_mono_pixels; - ctx->Driver.ReadRGBASpan = read_R8G8B8_span; - ctx->Driver.ReadRGBAPixels = read_R8G8B8_pixels; - } - else if (ctx->Visual->RedBits == 8 && - ctx->Visual->GreenBits == 8 && - ctx->Visual->BlueBits == 8 && ctx->Visual->AlphaBits == 8) { - /* 32bpp mode */ - ctx->Driver.WriteRGBASpan = write_R8G8B8A8_rgba_span; - ctx->Driver.WriteRGBSpan = write_R8G8B8A8_rgb_span; - ctx->Driver.WriteMonoRGBASpan = write_R8G8B8A8_mono_span; - ctx->Driver.WriteRGBAPixels = write_R8G8B8A8_pixels; - ctx->Driver.WriteMonoRGBAPixels = write_R8G8B8A8_mono_pixels; - ctx->Driver.ReadRGBASpan = read_R8G8B8A8_span; - ctx->Driver.ReadRGBAPixels = read_R8G8B8A8_pixels; - } - else { - abort(); - } - - if (fxMesa->haveHwStencil) { - ctx->Driver.WriteStencilSpan = write_stencil_span; - ctx->Driver.ReadStencilSpan = read_stencil_span; - ctx->Driver.WriteStencilPixels = write_stencil_pixels; - ctx->Driver.ReadStencilPixels = read_stencil_pixels; - } - - ctx->Driver.WriteDepthSpan = fxDDWriteDepthSpan; - ctx->Driver.WriteDepthPixels = fxDDWriteDepthPixels; - ctx->Driver.ReadDepthSpan = fxDDReadDepthSpan; - ctx->Driver.ReadDepthPixels = fxDDReadDepthPixels; - - ctx->Driver.WriteCI8Span = NULL; - ctx->Driver.WriteCI32Span = NULL; - ctx->Driver.WriteMonoCISpan = NULL; - ctx->Driver.WriteCI32Pixels = NULL; - ctx->Driver.WriteMonoCIPixels = NULL; - ctx->Driver.ReadCI32Span = NULL; - ctx->Driver.ReadCI32Pixels = NULL; -} Index: xc/lib/GL/mesa/src/drv/tdfx/fxddtex.c diff -u xc/lib/GL/mesa/src/drv/tdfx/fxddtex.c:1.3 xc/lib/GL/mesa/src/drv/tdfx/fxddtex.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxddtex.c:1.3 Fri Dec 8 16:34:20 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxddtex.c Mon Jun 4 12:37:38 2001 @@ -1,1737 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxddtex.c,v 1.3 2000/12/08 21:34:20 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -#include "fxdrv.h" -#include "fxddtex.h" -#include "fxtexman.h" -#include "fxsetup.h" -#include "image.h" -#include "texutil.h" - - -void -fxPrintTextureData(tfxTexInfo * ti) -{ - fprintf(stderr, "Texture Data:\n"); - if (ti->tObj) { - fprintf(stderr, "\tName: %d\n", ti->tObj->Name); - fprintf(stderr, "\tBaseLevel: %d\n", ti->tObj->BaseLevel); - fprintf(stderr, "\tSize: %d x %d\n", - ti->tObj->Image[ti->tObj->BaseLevel]->Width, - ti->tObj->Image[ti->tObj->BaseLevel]->Height); - } - else - fprintf(stderr, "\tName: UNNAMED\n"); - fprintf(stderr, "\tLast used: %d\n", ti->lastTimeUsed); - fprintf(stderr, "\tTMU: %ld\n", (unsigned long)ti->whichTMU); - fprintf(stderr, "\t%s\n", (ti->isInTM) ? "In TMU" : "Not in TMU"); - if (ti->tm[0]) - fprintf(stderr, "\tMem0: %x-%x\n", (unsigned) ti->tm[0]->startAddr, - (unsigned) ti->tm[0]->endAddr); - if (ti->tm[1]) - fprintf(stderr, "\tMem1: %x-%x\n", (unsigned) ti->tm[1]->startAddr, - (unsigned) ti->tm[1]->endAddr); - fprintf(stderr, "\tMipmaps: %d-%d\n", ti->minLevel, ti->maxLevel); - fprintf(stderr, "\tFilters: min %d min %d\n", - (int) ti->minFilt, (int) ti->maxFilt); - fprintf(stderr, "\tClamps: s %d t %d\n", (int) ti->sClamp, - (int) ti->tClamp); - fprintf(stderr, "\tScales: s %f t %f\n", ti->sScale, ti->tScale); - fprintf(stderr, "\tInt Scales: s %d t %d\n", - ti->int_sScale / 0x800000, ti->int_tScale / 0x800000); - fprintf(stderr, "\t%s\n", - (ti->fixedPalette) ? "Fixed palette" : "Non fixed palette"); - fprintf(stderr, "\t%s\n", - (ti->validated) ? "Validated" : "Not validated"); -} - - -/************************************************************************/ -/*************************** Texture Mapping ****************************/ -/************************************************************************/ - -static void -fxTexInvalidate(GLcontext * ctx, struct gl_texture_object *tObj) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - tfxTexInfo *ti; - - ti = fxTMGetTexInfo(tObj); - if (ti->isInTM) - fxTMMoveOutTM(fxMesa, tObj); /* TO DO: SLOW but easy to write */ - - ti->validated = GL_FALSE; - fxMesa->new_state |= FX_NEW_TEXTURING; - ctx->Driver.RenderStart = fxSetupFXUnits; -} - -static tfxTexInfo * -fxAllocTexObjData(fxMesaContext fxMesa) -{ - tfxTexInfo *ti; - int i; - - if (!(ti = CALLOC(sizeof(tfxTexInfo)))) { - gl_problem(NULL, "fx Driver: out of memory !\n"); - return NULL; - } - - ti->validated = GL_FALSE; - ti->isInTM = GL_FALSE; - - ti->whichTMU = FX_TMU_NONE; - - ti->tm[FX_TMU0] = NULL; - ti->tm[FX_TMU1] = NULL; - - ti->minFilt = GR_TEXTUREFILTER_POINT_SAMPLED; - ti->maxFilt = GR_TEXTUREFILTER_BILINEAR; - - ti->sClamp = GR_TEXTURECLAMP_WRAP; - ti->tClamp = GR_TEXTURECLAMP_WRAP; - - ti->mmMode = GR_MIPMAP_NEAREST; - ti->LODblend = FXFALSE; - - for (i = 0; i < MAX_TEXTURE_LEVELS; i++) { - ti->mipmapLevel[i].data = NULL; - } - - return ti; -} - - -/* - * Called via glBindTexture. - */ -void -fxDDTexBind(GLcontext * ctx, GLenum target, struct gl_texture_object *tObj) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - tfxTexInfo *ti; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDTexBind(%d,%x)\n", tObj->Name, - tObj->DriverData); - } - - if (target != GL_TEXTURE_2D) - return; - - if (!tObj->DriverData) { - tObj->DriverData = fxAllocTexObjData(fxMesa); - } - - ti = fxTMGetTexInfo(tObj); - - fxMesa->texBindNumber++; - ti->lastTimeUsed = fxMesa->texBindNumber; - - fxMesa->new_state |= FX_NEW_TEXTURING; - ctx->Driver.RenderStart = fxSetupFXUnits; -} - -void -fxDDTexEnv(GLcontext * ctx, GLenum target, GLenum pname, - const GLfloat * param) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - if (param) - fprintf(stderr, "fxmesa: texenv(%x,%x)\n", pname, - (GLint) (*param)); - else - fprintf(stderr, "fxmesa: texenv(%x)\n", pname); - } - - /* apply any lod biasing right now */ - if (pname == GL_TEXTURE_LOD_BIAS_EXT) { - FX_grTexLodBiasValue(GR_TMU0, *param); - if (fxMesa->haveTwoTMUs) { - FX_grTexLodBiasValue(GR_TMU1, *param); - } - } - - /* invalidate currently bound texture(s) */ - { - int i; - for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { - struct gl_texture_object *tObj = ctx->Texture.Unit[i].CurrentD[2]; - if (!tObj->DriverData) { - tObj->DriverData = fxAllocTexObjData(fxMesa); - } - fxTexInvalidate(ctx, tObj); - } - } - - fxMesa->new_state |= FX_NEW_TEXTURING; - ctx->Driver.RenderStart = fxSetupFXUnits; -} - -void -fxDDTexParam(GLcontext * ctx, GLenum target, struct gl_texture_object *tObj, - GLenum pname, const GLfloat * params) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLenum param = (GLenum) (GLint) params[0]; - tfxTexInfo *ti; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDTexParam(%d,%x,%x,%x)\n", tObj->Name, - tObj->DriverData, pname, param); - } - - if (target != GL_TEXTURE_2D) - return; - - if (!tObj->DriverData) - tObj->DriverData = fxAllocTexObjData(fxMesa); - - ti = fxTMGetTexInfo(tObj); - - switch (pname) { - - case GL_TEXTURE_MIN_FILTER: - switch (param) { - case GL_NEAREST: - ti->mmMode = GR_MIPMAP_DISABLE; - ti->minFilt = GR_TEXTUREFILTER_POINT_SAMPLED; - ti->LODblend = FXFALSE; - break; - case GL_LINEAR: - ti->mmMode = GR_MIPMAP_DISABLE; - ti->minFilt = GR_TEXTUREFILTER_BILINEAR; - ti->LODblend = FXFALSE; - break; - case GL_NEAREST_MIPMAP_NEAREST: - ti->mmMode = GR_MIPMAP_NEAREST; - ti->minFilt = GR_TEXTUREFILTER_POINT_SAMPLED; - ti->LODblend = FXFALSE; - break; - case GL_LINEAR_MIPMAP_NEAREST: - ti->mmMode = GR_MIPMAP_NEAREST; - ti->minFilt = GR_TEXTUREFILTER_BILINEAR; - ti->LODblend = FXFALSE; - break; - case GL_NEAREST_MIPMAP_LINEAR: - if (fxMesa->haveTwoTMUs) { - ti->mmMode = GR_MIPMAP_NEAREST; - ti->LODblend = FXTRUE; - } - else { - ti->mmMode = GR_MIPMAP_NEAREST_DITHER; - ti->LODblend = FXFALSE; - } - ti->minFilt = GR_TEXTUREFILTER_POINT_SAMPLED; - break; - case GL_LINEAR_MIPMAP_LINEAR: - if (fxMesa->haveTwoTMUs) { - ti->mmMode = GR_MIPMAP_NEAREST; - ti->LODblend = FXTRUE; - } - else { - ti->mmMode = GR_MIPMAP_NEAREST_DITHER; - ti->LODblend = FXFALSE; - } - ti->minFilt = GR_TEXTUREFILTER_BILINEAR; - break; - default: - break; - } - fxTexInvalidate(ctx, tObj); - break; - - case GL_TEXTURE_MAG_FILTER: - switch (param) { - case GL_NEAREST: - ti->maxFilt = GR_TEXTUREFILTER_POINT_SAMPLED; - break; - case GL_LINEAR: - ti->maxFilt = GR_TEXTUREFILTER_BILINEAR; - break; - default: - break; - } - fxTexInvalidate(ctx, tObj); - break; - - case GL_TEXTURE_WRAP_S: - switch (param) { - case GL_CLAMP: - ti->sClamp = GR_TEXTURECLAMP_CLAMP; - break; - case GL_REPEAT: - ti->sClamp = GR_TEXTURECLAMP_WRAP; - break; - default: - break; - } - fxMesa->new_state |= FX_NEW_TEXTURING; - ctx->Driver.RenderStart = fxSetupFXUnits; - break; - - case GL_TEXTURE_WRAP_T: - switch (param) { - case GL_CLAMP: - ti->tClamp = GR_TEXTURECLAMP_CLAMP; - break; - case GL_REPEAT: - ti->tClamp = GR_TEXTURECLAMP_WRAP; - break; - default: - break; - } - fxMesa->new_state |= FX_NEW_TEXTURING; - ctx->Driver.RenderStart = fxSetupFXUnits; - break; - - case GL_TEXTURE_BORDER_COLOR: - /* TO DO */ - break; - - case GL_TEXTURE_MIN_LOD: - /* TO DO */ - break; - case GL_TEXTURE_MAX_LOD: - /* TO DO */ - break; - case GL_TEXTURE_BASE_LEVEL: - fxTexInvalidate(ctx, tObj); - break; - case GL_TEXTURE_MAX_LEVEL: - fxTexInvalidate(ctx, tObj); - break; - - default: - break; - } -} - - -/* - * Called via glDeleteTextures to delete a texture object. - * Here, we delete the Glide data associated with the texture. - */ -void -fxDDTexDel(GLcontext * ctx, struct gl_texture_object *tObj) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - fxTMFreeTexture(fxMesa, tObj); - ctx->NewState |= NEW_TEXTURING; -} - - -/* - * Return true if texture is resident, false otherwise. - */ -GLboolean -fxDDIsTextureResident(GLcontext *ctx, struct gl_texture_object *tObj) -{ - tfxTexInfo *ti = fxTMGetTexInfo(tObj); - /*printf("resident %d\n", (int) (ti && ti->isInTM));*/ - return (GLboolean) (ti && ti->isInTM); -} - - - -/* - * Convert a gl_color_table texture palette to Glide's format. - */ -static void -convertPalette(FxU32 data[256], const struct gl_color_table *table) -{ - const GLubyte *tableUB = (const GLubyte *) table->Table; - GLint width = table->Size; - FxU32 r, g, b, a; - GLint i; - - ASSERT(table->TableType == GL_UNSIGNED_BYTE); - - switch (table->Format) { - case GL_INTENSITY: - for (i = 0; i < width; i++) { - r = tableUB[i]; - g = tableUB[i]; - b = tableUB[i]; - a = tableUB[i]; - data[i] = (a << 24) | (r << 16) | (g << 8) | b; - } - break; - case GL_LUMINANCE: - for (i = 0; i < width; i++) { - r = tableUB[i]; - g = tableUB[i]; - b = tableUB[i]; - a = 255; - data[i] = (a << 24) | (r << 16) | (g << 8) | b; - } - break; - case GL_ALPHA: - for (i = 0; i < width; i++) { - r = g = b = 255; - a = tableUB[i]; - data[i] = (a << 24) | (r << 16) | (g << 8) | b; - } - break; - case GL_LUMINANCE_ALPHA: - for (i = 0; i < width; i++) { - r = g = b = tableUB[i * 2 + 0]; - a = tableUB[i * 2 + 1]; - data[i] = (a << 24) | (r << 16) | (g << 8) | b; - } - break; - case GL_RGB: - for (i = 0; i < width; i++) { - r = tableUB[i * 3 + 0]; - g = tableUB[i * 3 + 1]; - b = tableUB[i * 3 + 2]; - a = 255; - data[i] = (a << 24) | (r << 16) | (g << 8) | b; - } - break; - case GL_RGBA: - for (i = 0; i < width; i++) { - r = tableUB[i * 4 + 0]; - g = tableUB[i * 4 + 1]; - b = tableUB[i * 4 + 2]; - a = tableUB[i * 4 + 3]; - data[i] = (a << 24) | (r << 16) | (g << 8) | b; - } - break; - } -} - - - -void -fxDDTexPalette(GLcontext * ctx, struct gl_texture_object *tObj) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - - if (tObj) { - /* per-texture palette */ - tfxTexInfo *ti; - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDTexPalette(%d,%x)\n", - tObj->Name, tObj->DriverData); - } - if (!tObj->DriverData) - tObj->DriverData = fxAllocTexObjData(fxMesa); - ti = fxTMGetTexInfo(tObj); - convertPalette(ti->palette.data, &tObj->Palette); - fxTexInvalidate(ctx, tObj); - } - else { - /* global texture palette */ - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDTexPalette(global)\n"); - } - convertPalette(fxMesa->glbPalette.data, &ctx->Texture.Palette); - fxMesa->new_state |= FX_NEW_TEXTURING; - ctx->Driver.RenderStart = fxSetupFXUnits; - } -} - - -/* - * Enable/disable the shared texture palette feature. - */ -void -fxDDTexUseGlbPalette(GLcontext * ctx, GLboolean state) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDTexUseGlbPalette(%d)\n", state); - } - - if (state) { - FX_grTexDownloadTable(fxMesa, GR_TMU0, GR_TEXTABLE_PALETTE_6666_EXT, - &(fxMesa->glbPalette)); - if (fxMesa->haveTwoTMUs) - FX_grTexDownloadTable(fxMesa, GR_TMU1, GR_TEXTABLE_PALETTE_6666_EXT, - &(fxMesa->glbPalette)); - } - else { - if ((ctx->Texture.Unit[0].Current == ctx->Texture.Unit[0].CurrentD[2]) - && (ctx->Texture.Unit[0].Current != NULL)) { - struct gl_texture_object *tObj = ctx->Texture.Unit[0].Current; - - if (!tObj->DriverData) - tObj->DriverData = fxAllocTexObjData(fxMesa); - - fxTexInvalidate(ctx, tObj); - } - } -} - - -static int -logbase2(int n) -{ - GLint i = 1; - GLint log2 = 0; - - if (n < 0) { - return -1; - } - - while (n > i) { - i *= 2; - log2++; - } - if (i != n) { - return -1; - } - else { - return log2; - } -} - -/* Need different versions for different cpus. - */ -#define INT_TRICK(pow2) (0x800000 * (pow2)) - -/* - * Compute various texture image parameters. - * Input: w, h - source texture width and height - * Output: lodlevel - Glide lod level token - * aspectratio - Glide aspect ratio token - * sscale - S scale factor used during triangle setup - * tscale - T scale factor used during triangle setup - * i_sscale - integer S scale used during triangle setup - * i_tscale - integer T scale used during triangle setup - * wscale - OpenGL -> Glide image width scale factor - * hscale - OpenGL -> Glide image height scale factor - */ -void -fxTexGetInfo(const GLcontext *ctx, int w, int h, - GrLOD_t *lodlevel, GrAspectRatio_t *aspectratio, - float *sscale, float *tscale, - int *i_sscale, int *i_tscale, - int *wscale, int *hscale) -{ - int logw, logh, ar, lod, is, it, ws, hs; - float s, t; - - ASSERT(w >= 1); - ASSERT(h >= 1); - - logw = logbase2(w); - logh = logbase2(h); - ar = logw - logh; /* aspect ratio = difference in log dimensions */ - - /* Hardware only allows a maximum aspect ratio of 8x1, so handle - |ar| > 3 by scaling the image and using an 8x1 aspect ratio */ - if (ar >= 0) { - ASSERT(width >= height); - lod = logw; -#if 1 - s = 256.0; - is = INT_TRICK(8); -#else - s = ctx->Const.MaxTextureSize; - is = INT_TRICK(ctx->Const.MaxTextureLevels - 1); -#endif - ws = 1; - if (ar < 3) { -#if 1 - t = 256 >> ar; - it = INT_TRICK(8 - ar); -#else - t = ctx->Const.MaxTextureSize >> ar; - it = INT_TRICK(ctx->Const.MaxTextureLevels - 1 - ar); -#endif - hs = 1; - } - else { - t = 32.0; - it = INT_TRICK(5); - hs = 1 << (ar - 3); - } - } - else { - ASSERT(width < height); - lod = logh; -#if 1 - t = 256.0; - it = INT_TRICK(8); -#else - t = ctx->Const.MaxTextureSize; - it = INT_TRICK(ctx->Const.MaxTextureLevels - 1); -#endif - hs = 1; - if (-ar < 3) { -#if 1 - s = 256 >> -ar; - is = INT_TRICK(8 + ar); -#else - s = ctx->Const.MaxTextureSize >> - ar; - is = INT_TRICK(ctx->Const.MaxTextureLevels - 1 + ar); -#endif - ws = 1; - } - else { - s = 32.0; - is = INT_TRICK(5); - ws = 1 << (-ar - 3); - } - } - if (ar < -3) - ar = -3; - if (ar > 3) - ar = 3; - - if (lodlevel) - *lodlevel = (GrLOD_t) lod; - if (aspectratio) - *aspectratio = (GrAspectRatio_t) ar; - if (sscale) - *sscale = s; - if (tscale) - *tscale = t; - if (wscale) - *wscale = ws; - if (hscale) - *hscale = hs; - if (i_sscale) - *i_sscale = is; - if (i_tscale) - *i_tscale = it; -} - -/* - * Given an OpenGL internal texture format, return the corresponding - * Glide internal texture format and base texture format. - * If allow32bpp is true, we'll return 32-bit texel formats when - * appropriate. - */ -void -fxTexGetFormat(GLenum glformat, GrTextureFormat_t *glideFormat, - GLint *glFormat, MesaIntTexFormat *mesaFormat, - GLint *texelSize, GLboolean allow32bpp) -{ - switch (glformat) { - case 1: - case GL_LUMINANCE: - case GL_LUMINANCE4: - case GL_LUMINANCE8: - case GL_LUMINANCE12: - case GL_LUMINANCE16: - if (glideFormat) - *glideFormat = GR_TEXFMT_INTENSITY_8; - if (glFormat) - *glFormat = GL_LUMINANCE; - if (mesaFormat) - *mesaFormat = MESA_L8; - if (texelSize) - *texelSize = 1; - break; - case 2: - case GL_LUMINANCE_ALPHA: - case GL_LUMINANCE4_ALPHA4: - case GL_LUMINANCE6_ALPHA2: - case GL_LUMINANCE8_ALPHA8: - case GL_LUMINANCE12_ALPHA4: - case GL_LUMINANCE12_ALPHA12: - case GL_LUMINANCE16_ALPHA16: - if (glideFormat) - *glideFormat = GR_TEXFMT_ALPHA_INTENSITY_88; - if (glFormat) - *glFormat = GL_LUMINANCE_ALPHA; - if (mesaFormat) - *mesaFormat = MESA_A8_L8; - if (texelSize) - *texelSize = 2; - break; - case GL_INTENSITY: - case GL_INTENSITY4: - case GL_INTENSITY8: - case GL_INTENSITY12: - case GL_INTENSITY16: - if (glideFormat) - *glideFormat = GR_TEXFMT_ALPHA_8; - if (glFormat) - *glFormat = GL_INTENSITY; - if (mesaFormat) - *mesaFormat = MESA_I8; - if (texelSize) - *texelSize = 1; - break; - case GL_ALPHA: - case GL_ALPHA4: - case GL_ALPHA8: - case GL_ALPHA12: - case GL_ALPHA16: - if (glideFormat) - *glideFormat = GR_TEXFMT_ALPHA_8; - if (glFormat) - *glFormat = GL_ALPHA; - if (mesaFormat) - *mesaFormat = MESA_A8; - if (texelSize) - *texelSize = 1; - break; - case GL_R3_G3_B2: - case GL_RGB4: - case GL_RGB5: - if (glideFormat) - *glideFormat = GR_TEXFMT_RGB_565; - if (glFormat) - *glFormat = GL_RGB; - if (mesaFormat) - *mesaFormat = MESA_R5_G6_B5; - if (texelSize) - *texelSize = 2; - break; - case 3: - case GL_RGB: - case GL_RGB8: - case GL_RGB10: - case GL_RGB12: - case GL_RGB16: - if (allow32bpp) { - if (glideFormat) - *glideFormat = GR_TEXFMT_ARGB_8888; - if (glFormat) - *glFormat = GL_RGB; - if (mesaFormat) - *mesaFormat = MESA_FF_R8_G8_B8; - if (texelSize) - *texelSize = 4; - } - else { - if (glideFormat) - *glideFormat = GR_TEXFMT_RGB_565; - if (glFormat) - *glFormat = GL_RGB; - if (mesaFormat) - *mesaFormat = MESA_R5_G6_B5; - if (texelSize) - *texelSize = 2; - } - break; - case GL_RGBA2: - case GL_RGBA4: - if (glideFormat) - *glideFormat = GR_TEXFMT_ARGB_4444; - if (glFormat) - *glFormat = GL_RGBA; - if (mesaFormat) - *mesaFormat = MESA_A4_R4_G4_B4; - if (texelSize) - *texelSize = 2; - break; - case 4: - case GL_RGBA: - case GL_RGBA8: - case GL_RGB10_A2: - case GL_RGBA12: - case GL_RGBA16: - if (allow32bpp) { - if (glideFormat) - *glideFormat = GR_TEXFMT_ARGB_8888; - if (glFormat) - *glFormat = GL_RGBA; - if (mesaFormat) - *mesaFormat = MESA_A8_R8_G8_B8; - if (texelSize) - *texelSize = 4; - } - else { - if (glideFormat) - *glideFormat = GR_TEXFMT_ARGB_4444; - if (glFormat) - *glFormat = GL_RGBA; - if (mesaFormat) - *mesaFormat = MESA_A4_R4_G4_B4; - if (texelSize) - *texelSize = 2; - } - break; - case GL_RGB5_A1: - if (glideFormat) - *glideFormat = GR_TEXFMT_ARGB_1555; - if (glFormat) - *glFormat = GL_RGBA; - if (mesaFormat) - *mesaFormat = MESA_A1_R5_G5_B5; - if (texelSize) - *texelSize = 2; - break; - case GL_COLOR_INDEX: - case GL_COLOR_INDEX1_EXT: - case GL_COLOR_INDEX2_EXT: - case GL_COLOR_INDEX4_EXT: - case GL_COLOR_INDEX8_EXT: - case GL_COLOR_INDEX12_EXT: - case GL_COLOR_INDEX16_EXT: - if (glideFormat) - *glideFormat = GR_TEXFMT_P_8; - if (glFormat) - *glFormat = GL_RGBA; /* XXX why is this RGBA? */ - if (mesaFormat) - *mesaFormat = MESA_C8; - if (texelSize) - *texelSize = 1; - break; - case GL_COMPRESSED_RGB_FXT1_3DFX: - if (glideFormat) - *glideFormat = GR_TEXFMT_ARGB_CMP_FXT1; - if (glFormat) - *glFormat = GL_COMPRESSED_RGB_FXT1_3DFX; - if (mesaFormat) - *mesaFormat = MESA_A8_R8_G8_B8; - if (texelSize) - *texelSize = 4; - break; - case GL_COMPRESSED_RGBA_FXT1_3DFX: - if (glideFormat) - *glideFormat = GR_TEXFMT_ARGB_CMP_FXT1; - if (glFormat) - *glFormat = GL_COMPRESSED_RGBA_FXT1_3DFX; - if (mesaFormat) - *mesaFormat = MESA_A8_R8_G8_B8; - if (texelSize) - *texelSize = 4; - break; - default: - gl_problem(NULL, "bad texture format in fxTexGetFormat()\n"); - break; - } -} - - -/**********************************************************************/ -/**** NEW TEXTURE IMAGE FUNCTIONS ****/ -/**********************************************************************/ - -static FxBool TexusFatalError = FXFALSE; -static FxBool TexusError = FXFALSE; - -#define TX_DITHER_NONE 0x00000000 - -static void -fxTexusError(const char *string, FxBool fatal) -{ - gl_problem(NULL, string); - /* - * Just propagate the fatal value up. - */ - TexusError = FXTRUE; - TexusFatalError = fatal; -} - -GLboolean -fxDDTexImage2D(GLcontext * ctx, GLenum target, GLint level, - GLenum format, GLenum type, const GLvoid * pixels, - const struct gl_pixelstore_attrib * packing, - struct gl_texture_object * texObj, - struct gl_texture_image * texImage, - GLboolean * retainInternalCopy) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - const GLboolean allow32bpt = fxMesa->haveHwStencil; - GrTextureFormat_t gldformat; - tfxTexInfo *ti; - tfxMipMapLevel *mml; - GLint dstWidth, dstHeight, wScale, hScale, texelSize, dstStride; - MesaIntTexFormat intFormat; - GLboolean isCompressedFormat; - GLint texsize; - void *uncompressedImage; - - isCompressedFormat = texImage->IsCompressed; - if (target != GL_TEXTURE_2D || texImage->Border > 0) - return GL_FALSE; - - if (!texObj->DriverData) - texObj->DriverData = fxAllocTexObjData(fxMesa); - - ti = fxTMGetTexInfo(texObj); - mml = &ti->mipmapLevel[level]; - - /* Determine the appropriate GL internal texel format, Mesa internal - * texel format, and texelSize (bytes) given the user's internal - * texture format hint. - */ - fxTexGetFormat(texImage->IntFormat, &gldformat, NULL, &intFormat, - &texelSize, allow32bpt); - - /* Determine width and height scale factors for texture. - * Remember, Glide is limited to 8:1 aspect ratios. - */ - fxTexGetInfo(ctx, - texImage->Width, texImage->Height, - NULL, /* lod level */ - NULL, /* aspect ratio */ - NULL, NULL, /* sscale, tscale */ - NULL, NULL, /* i_sscale, i_tscale */ - &wScale, &hScale); - dstWidth = texImage->Width * wScale; - dstHeight = texImage->Height * hScale; - if (isCompressedFormat) { - texsize = fxDDCompressedImageSize(ctx, - texImage->IntFormat, - 2, - texImage->Width, - texImage->Height, - 1); - } else { - texsize = dstWidth * dstHeight * texelSize; - } - /* - * If the image is not compressed, this doesn't - * matter, but it might as well have a sensible - * value, and it might save a failure later on. - */ - texImage->CompressedSize = texsize; - /* housekeeping */ - _mesa_set_teximage_component_sizes(intFormat, texImage); - - /* - * allocate new storage for texture image, if needed. - * This conditional wants to set uncompressedImage to - * point to the uncompressed image, and mml->data to - * the texture data. If the image is uncompressed, - * these are identical. If the image is not compressed, - * these are different. - */ - if (!mml->data || mml->glideFormat != gldformat || - mml->width != dstWidth || mml->height != dstHeight || - texsize != mml->dataSize ) { - if (mml->data) { - FREE(mml->data); - } - uncompressedImage - = (void *)MALLOC(dstWidth * dstHeight * texelSize); - if (!uncompressedImage) { - return(GL_FALSE); - } - if (isCompressedFormat) { - mml->data = MALLOC(texsize); - if (!mml->data) { - FREE(uncompressedImage); - return GL_FALSE; - } - } else { - mml->data = uncompressedImage; - } - mml->texelSize = texelSize; - mml->glideFormat = gldformat; - mml->width = dstWidth; - mml->height = dstHeight; - mml->dataSize = texsize; - fxTexInvalidate(ctx, texObj); - } else { - /* - * Here we don't have to allocate anything, but we - * do have to point uncompressedImage to the uncompressed - * data. - */ - if (isCompressedFormat) { - uncompressedImage - = (void *)MALLOC(dstWidth * dstHeight * texelSize); - if (!uncompressedImage) { - return GL_FALSE; - } - } else { - uncompressedImage = mml->data; - } - } - - dstStride = dstWidth * texelSize; - - /* store the texture image into uncompressedImage */ - if (!_mesa_convert_teximage(intFormat, - dstWidth, dstHeight, - uncompressedImage, - dstStride, - texImage->Width, texImage->Height, - format, type, pixels, packing)) { - /*printf("convert failed\n");*/ - return GL_FALSE; /* not necessarily an error */ - } - /* - * Now compress it if necessary. - */ - if (isCompressedFormat) { - TxErrorCallbackFnc_t oldErrorCallback; - (*txErrorSetCallbackPtr)(fxTexusError, &oldErrorCallback); - (*txImgQuantizePtr)((char *)mml->data, - (char *)uncompressedImage, - texImage->Width, - texImage->Height, - gldformat, - TX_DITHER_NONE); - (*txErrorSetCallbackPtr)(oldErrorCallback, NULL); - if (uncompressedImage != mml->data) { - /* - * We do not need this any more, errors or no. - */ - FREE(uncompressedImage); - } - TexusError = FXFALSE; - if (TexusFatalError) { - FREE(mml->data); - mml->data = (unsigned short *)0; - TexusFatalError = FXFALSE; - return(GL_FALSE); - } - } - if (ti->validated && ti->isInTM) { - fxTMReloadMipMapLevel(ctx, texObj, level); - } - else { - fxTexInvalidate(ctx, texObj); - } - - *retainInternalCopy = GL_FALSE; - return GL_TRUE; -} - - -GLboolean -fxDDTexSubImage2D(GLcontext * ctx, GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLenum type, const GLvoid * pixels, - const struct gl_pixelstore_attrib * packing, - struct gl_texture_object * texObj, - struct gl_texture_image * texImage) -{ - tfxTexInfo *ti; - GLint wscale, hscale, dstStride = 0; - tfxMipMapLevel *mml; - GLboolean result; - void *uncompressedImage = (void *)0; - FxU32 uncompressedSize; - TxErrorCallbackFnc_t oldErrorCallback; - - if (target != GL_TEXTURE_2D) - return GL_FALSE; - - if (!texObj->DriverData) - return GL_FALSE; - - ti = fxTMGetTexInfo(texObj); - mml = &ti->mipmapLevel[level]; - - fxTexGetInfo(ctx, texImage->Width, texImage->Height, NULL, NULL, - NULL, NULL, NULL, NULL, &wscale, &hscale); - - /* - * Must have an existing texture image! - */ - assert(mml->data); - - switch (mml->glideFormat) { - case GR_TEXFMT_INTENSITY_8: - dstStride = mml->width; - result = _mesa_convert_texsubimage(MESA_I8, xoffset, yoffset, - mml->width, mml->height, mml->data, - dstStride, width, height, - texImage->Width, texImage->Height, - format, type, pixels, packing); - break; - case GR_TEXFMT_ALPHA_8: - dstStride = mml->width; - result = _mesa_convert_texsubimage(MESA_A8, xoffset, yoffset, - mml->width, mml->height, mml->data, - dstStride, width, height, - texImage->Width, texImage->Height, - format, type, pixels, packing); - break; - case GR_TEXFMT_P_8: - dstStride = mml->width; - result = _mesa_convert_texsubimage(MESA_C8, xoffset, yoffset, - mml->width, mml->height, mml->data, - dstStride, width, height, - texImage->Width, texImage->Height, - format, type, pixels, packing); - break; - case GR_TEXFMT_ALPHA_INTENSITY_88: - dstStride = mml->width * 2; - result = _mesa_convert_texsubimage(MESA_A8_L8, xoffset, yoffset, - mml->width, mml->height, mml->data, - dstStride, width, height, - texImage->Width, texImage->Height, - format, type, pixels, packing); - break; - case GR_TEXFMT_RGB_565: - dstStride = mml->width * 2; - result = _mesa_convert_texsubimage(MESA_R5_G6_B5, xoffset, yoffset, - mml->width, mml->height, mml->data, - dstStride, width, height, - texImage->Width, texImage->Height, - format, type, pixels, packing); - break; - case GR_TEXFMT_ARGB_4444: - dstStride = mml->width * 2; - result = _mesa_convert_texsubimage(MESA_A4_R4_G4_B4, xoffset, yoffset, - mml->width, mml->height, mml->data, - dstStride, width, height, - texImage->Width, texImage->Height, - format, type, pixels, packing); - break; - case GR_TEXFMT_ARGB_CMP_FXT1: - /* - * There are some special legality constraints for compressed - * textures. - */ - if ((xoffset != texImage->Border) - || (yoffset != texImage->Border)) { - gl_error( ctx, - GL_INVALID_OPERATION, - "glTexSubImage2D(offset)" ); - return GL_FALSE; - } - if ((width != texImage->Width) - || (height != texImage->Height)) { - gl_error( ctx, - GL_INVALID_VALUE, - "glTexSubImage2D(image size)" ); - return GL_FALSE; - } - /* - * The width and height have to be multiples of - * 8 and 4 respectively. - */ - width = (mml->width + 0x7) &~ 0x7; - height = (mml->height + 0x3) &~ 0x3; - /* - * A texel is 8888 for this format. - */ - uncompressedSize = mml->width * mml->height * 4; - uncompressedImage = (void *)MALLOC(uncompressedSize); - /* - * Convert the data. - */ - dstStride = mml->width * 4; - result = _mesa_convert_texsubimage(MESA_A8_R8_G8_B8, xoffset, yoffset, - mml->width, mml->height, uncompressedImage, - dstStride, width, height, - texImage->Width, texImage->Height, - format, type, pixels, packing); - if (!result) { - FREE(uncompressedImage); - return GL_FALSE; - } - /* - * Now that we have converted the data, then compress it. - */ - (*txErrorSetCallbackPtr)(fxTexusError, &oldErrorCallback); - (*txImgQuantizePtr)((char *)mml->data, - (char *)uncompressedImage, - mml->width, - mml->height, - mml->glideFormat, - TX_DITHER_NONE); - (*txErrorSetCallbackPtr)(oldErrorCallback, NULL); - result = TexusFatalError; - TexusFatalError = TexusError = FXFALSE; - /* - * We don't need this any more. - */ - FREE(uncompressedImage); - break; - case GR_TEXFMT_ARGB_8888: - { - MesaIntTexFormat intFormat; - if (texImage->Format == GL_RGB) { - /* An RGB image padded out to 4 bytes/texel */ - intFormat = MESA_FF_R8_G8_B8; - } - else { - intFormat = MESA_A8_R8_G8_B8; - } - dstStride = mml->width * 4; - result = _mesa_convert_texsubimage(intFormat, xoffset, yoffset, - mml->width, mml->height, mml->data, - dstStride, width, height, - texImage->Width, texImage->Height, - format, type, pixels, packing); - } - break; - case GR_TEXFMT_ARGB_1555: - dstStride = mml->width * 2; - result = _mesa_convert_texsubimage(MESA_A1_R5_G5_B5, xoffset, yoffset, - mml->width, mml->height, mml->data, - dstStride, width, height, - texImage->Width, texImage->Height, - format, type, pixels, packing); - break; - default: - gl_problem(NULL, "tdfx driver: fxTexBuildSubImageMap() bad format"); - result = GL_FALSE; - } - - if (!result) { - return GL_FALSE; - } - - if (ti->validated && ti->isInTM) - /* Don't use this, it's very broken. Download whole image for now.*/ -#if 0 - fxTMReloadSubMipMapLevel(ctx, texObj, level, yoffset, height); -#else - fxTMReloadMipMapLevel(ctx, texObj, level); -#endif - else - fxTexInvalidate(ctx, texObj); - - return GL_TRUE; -} - - -/**********************************************************************/ -/**** COMPRESSED TEXTURE IMAGE FUNCTIONS ****/ -/**********************************************************************/ - -GLboolean -fxDDCompressedTexImage2D( GLcontext *ctx, GLenum target, - GLint level, GLsizei imageSize, - const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage, - GLboolean *retainInternalCopy) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - const GLboolean allow32bpt = fxMesa->haveHwStencil; - GrTextureFormat_t gldformat; - tfxTexInfo *ti; - tfxMipMapLevel *mml; - GLint dstWidth, dstHeight, wScale, hScale, texelSize; - MesaIntTexFormat intFormat; - GLboolean isCompressedFormat; - GLsizei texsize; - - if (target != GL_TEXTURE_2D || texImage->Border > 0) - return GL_FALSE; - - if (!texObj->DriverData) - texObj->DriverData = fxAllocTexObjData(fxMesa); - - ti = fxTMGetTexInfo(texObj); - mml = &ti->mipmapLevel[level]; - - isCompressedFormat = fxDDIsCompressedGlideFormatMacro(texImage->IntFormat); - if (!isCompressedFormat) { - gl_error( ctx, GL_INVALID_ENUM, "glCompressedTexImage2D(format)" ); - return GL_FALSE; - } - /* Determine the apporpriate GL internal texel format, Mesa internal - * texel format, and texelSize (bytes) given the user's internal - * texture format hint. - */ - fxTexGetFormat(texImage->IntFormat, &gldformat, NULL, &intFormat, - &texelSize, allow32bpt); - - /* Determine width and height scale factors for texture. - * Remember, Glide is limited to 8:1 aspect ratios. - */ - fxTexGetInfo(ctx, - texImage->Width, texImage->Height, - NULL, /* lod level */ - NULL, /* aspect ratio */ - NULL, NULL, /* sscale, tscale */ - NULL, NULL, /* i_sscale, i_tscale */ - &wScale, &hScale); - dstWidth = texImage->Width * wScale; - dstHeight = texImage->Height * hScale; - /* housekeeping */ - _mesa_set_teximage_component_sizes(intFormat, texImage); - - texsize = fxDDCompressedImageSize(ctx, - texImage->IntFormat, - 2, - texImage->Width, - texImage->Height, - 1); - if (texsize != imageSize) { - gl_error(ctx, - GL_INVALID_VALUE, - "glCompressedTexImage2D(texsize)"); - return GL_FALSE; - } - /* allocate new storage for texture image, if needed */ - if (!mml->data || mml->glideFormat != gldformat || - mml->width != dstWidth || mml->height != dstHeight || - texsize != mml->dataSize) { - if (mml->data) { - FREE(mml->data); - } - mml->data = MALLOC(texsize); - if (!mml->data) { - return GL_FALSE; - } - mml->texelSize = texelSize; - mml->glideFormat = gldformat; - mml->width = dstWidth; - mml->height = dstHeight; - fxTexInvalidate(ctx, texObj); - } - - MEMCPY(mml->data, data, imageSize); - if (ti->validated && ti->isInTM) { - fxTMReloadMipMapLevel(ctx, texObj, level); - } - else { - fxTexInvalidate(ctx, texObj); - } - - *retainInternalCopy = GL_FALSE; - return GL_TRUE; -} - -GLboolean -fxDDCompressedTexSubImage2D( GLcontext *ctx, GLenum target, - GLint level, GLint xoffset, - GLint yoffset, GLsizei width, - GLint height, GLenum format, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage ) -{ - tfxTexInfo *ti; - tfxMipMapLevel *mml; - /* - * We punt if we are not replacing the entire image. This - * is allowed by the spec. - */ - if ((xoffset != 0) && (yoffset != 0) - && (width != texImage->Width) - && (height != texImage->Height)) { - return(GL_FALSE); - } - ti = fxTMGetTexInfo(texObj); - mml = &ti->mipmapLevel[level]; - if (imageSize != mml->dataSize) { - return(GL_FALSE); - } - MEMCPY(data, mml->data, imageSize); - return(GL_TRUE); -} - -#if 0 -static void -PrintTexture(int w, int h, int c, const GLubyte * data) -{ - int i, j; - for (i = 0; i < h; i++) { - for (j = 0; j < w; j++) { - if (c == 2) - printf("%02x %02x ", data[0], data[1]); - else if (c == 3) - printf("%02x %02x %02x ", data[0], data[1], data[2]); - data += c; - } - printf("\n"); - } -} -#endif - - -GLboolean -fxDDTestProxyTexImage(GLcontext *ctx, GLenum target, - GLint level, GLint internalFormat, - GLenum format, GLenum type, - GLint width, GLint height, - GLint depth, GLint border ) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; - struct TdfxSharedState *shared = (struct TdfxSharedState *) mesaShared->DriverData; - - switch (target) { - case GL_PROXY_TEXTURE_1D: - return GL_TRUE; /* software rendering */ - case GL_PROXY_TEXTURE_2D: - { - struct gl_texture_object *tObj; - tfxTexInfo *ti; - int memNeeded; - - tObj = ctx->Texture.Proxy2D; - if (!tObj->DriverData) - tObj->DriverData = fxAllocTexObjData(fxMesa); - ti = fxTMGetTexInfo(tObj); - - /* assign the parameters to test against */ - tObj->Image[level]->Width = width; - tObj->Image[level]->Height = height; - tObj->Image[level]->Border = border; - tObj->Image[level]->IntFormat = internalFormat; - if (level == 0) { - /* don't use mipmap levels > 0 */ - tObj->MinFilter = tObj->MagFilter = GL_NEAREST; - } - else { - /* test with all mipmap levels */ - tObj->MinFilter = GL_LINEAR_MIPMAP_LINEAR; - tObj->MagFilter = GL_NEAREST; - } - ti->validated = GL_FALSE; - fxTexValidate(ctx, tObj); - - /* - printf("small lodlog2 0x%x\n", ti->info.smallLodLog2); - printf("large lodlog2 0x%x\n", ti->info.largeLodLog2); - printf("aspect ratio 0x%x\n", ti->info.aspectRatioLog2); - printf("glide format 0x%x\n", ti->info.format); - printf("data %p\n", ti->info.data); - printf("lodblend %d\n", (int) ti->LODblend); - */ - - /* determine where texture will reside */ - if (ti->LODblend && !shared->umaTexMemory) { - /* XXX GR_MIPMAPLEVELMASK_BOTH might not be right, but works */ - memNeeded = FX_grTexTextureMemRequired_NoLock( - GR_MIPMAPLEVELMASK_BOTH, &(ti->info)); - } - else { - /* XXX GR_MIPMAPLEVELMASK_BOTH might not be right, but works */ - memNeeded = FX_grTexTextureMemRequired_NoLock( - GR_MIPMAPLEVELMASK_BOTH, &(ti->info)); - } - /* - printf("Proxy test %d > %d\n", memNeeded, shared->totalTexMem[0]); - */ - if (memNeeded > shared->totalTexMem[0]) - return GL_FALSE; - else - return GL_TRUE; - } - case GL_PROXY_TEXTURE_3D: - return GL_TRUE; /* software rendering */ - default: - return GL_TRUE; /* never happens, silence compiler */ - } -} - - -/* - * Return a texture image to Mesa. This is either to satisfy - * a glGetTexImage() call or to prepare for software texturing. - */ -GLvoid * -fxDDGetTexImage(GLcontext * ctx, GLenum target, GLint level, - const struct gl_texture_object *texObj, - GLenum * formatOut, GLenum * typeOut, - GLboolean * freeImageOut) -{ - tfxTexInfo *ti; - tfxMipMapLevel *mml; - - if (target != GL_TEXTURE_2D) - return NULL; - - if (!texObj->DriverData) - return NULL; - - ti = fxTMGetTexInfo(texObj); - mml = &ti->mipmapLevel[level]; - if (mml->data) { - MesaIntTexFormat mesaFormat; - GLenum glFormat; - struct gl_texture_image *texImage = texObj->Image[level]; - GLint srcStride; - void *uncompressedImage = NULL; - - GLubyte *data = - (GLubyte *) MALLOC(texImage->Width * texImage->Height * 4); - if (!data) - return NULL; - - uncompressedImage = (void *)mml->data; - switch (mml->glideFormat) { - case GR_TEXFMT_INTENSITY_8: - mesaFormat = MESA_I8; - glFormat = GL_INTENSITY; - srcStride = mml->width; - break; - case GR_TEXFMT_ALPHA_INTENSITY_88: - mesaFormat = MESA_A8_L8; - glFormat = GL_LUMINANCE_ALPHA; - srcStride = mml->width; - break; - case GR_TEXFMT_ALPHA_8: - if (texImage->Format == GL_INTENSITY) { - mesaFormat = MESA_I8; - glFormat = GL_INTENSITY; - } - else { - mesaFormat = MESA_A8; - glFormat = GL_ALPHA; - } - srcStride = mml->width; - break; - case GR_TEXFMT_RGB_565: - mesaFormat = MESA_R5_G6_B5; - glFormat = GL_RGB; - srcStride = mml->width * 2; - break; - case GR_TEXFMT_ARGB_8888: - mesaFormat = MESA_A8_R8_G8_B8; - glFormat = GL_RGBA; - srcStride = mml->width * 4; - break; - case GR_TEXFMT_ARGB_4444: - mesaFormat = MESA_A4_R4_G4_B4; - glFormat = GL_RGBA; - srcStride = mml->width * 2; - break; - case GR_TEXFMT_ARGB_1555: - mesaFormat = MESA_A1_R5_G5_B5; - glFormat = GL_RGBA; - srcStride = mml->width * 2; - break; - case GR_TEXFMT_P_8: - mesaFormat = MESA_C8; - glFormat = GL_COLOR_INDEX; - srcStride = mml->width; - break; - case GR_TEXFMT_ARGB_CMP_FXT1: - mesaFormat = MESA_A8_R8_G8_B8; - glFormat = GL_RGBA; - srcStride = mml->width * 4; - /* - * Allocate data for the uncompressed image, - * decompress the image. The data will be deallocated - * after it is converted to the mesa format. - */ - uncompressedImage = MALLOC(mml->width * mml->height * 4); - if (!uncompressedImage) { - gl_problem(NULL, "can't get memory in fxDDGetTexImage"); - return(NULL); - } - (*txImgDequantizeFXT1Ptr)((FxU32 *)uncompressedImage, - (FxU32 *)mml->data, - mml->width, - mml->height); - break; - default: - gl_problem(NULL, "Bad glideFormat in fxDDGetTexImage"); - return NULL; - } - _mesa_unconvert_teximage(mesaFormat, mml->width, mml->height, - uncompressedImage, srcStride, texImage->Width, - texImage->Height, glFormat, data); - if (uncompressedImage != mml->data) { - FREE(uncompressedImage); - } - *formatOut = glFormat; - *typeOut = GL_UNSIGNED_BYTE; - *freeImageOut = GL_TRUE; - return data; - } - else { - return NULL; - } -} - -/* - * This is called from _mesa_GetCompressedTexImage. We just - * copy out the compressed data. - */ -void -fxDDGetCompressedTexImage( GLcontext *ctx, GLenum target, - GLint lod, void *image, - const struct gl_texture_object *texObj, - struct gl_texture_image *texImage ) -{ - tfxTexInfo *ti; - tfxMipMapLevel *mml; - - if (target != GL_TEXTURE_2D) - return; - - if (!texObj->DriverData) - return; - - ti = fxTMGetTexInfo(texObj); - mml = &ti->mipmapLevel[lod]; - if (mml->data) { - MEMCPY(image, mml->data, mml->dataSize); - } -} - -/* - * Calculate a specific texture format given a generic - * texture format. - */ -GLint -fxDDSpecificCompressedTexFormat(GLcontext *ctx, - GLint internalFormat, - GLint numDimensions, - GLint *levelp, - GLsizei *widthp, - GLsizei *heightp, - GLsizei *depthp, - GLint *borderp, - GLenum *formatp, - GLenum *typep) -{ - if (numDimensions != 2) { - return internalFormat; - } - /* - * If we don't have pointers to the functions, then - * we drop back to uncompressed format. The logic - * in Mesa proper handles this for us. - * - * This is just to ease the transition to a Glide with - * the texus2 library. - */ - if (!txImgQuantizePtr || !txImgDequantizeFXT1Ptr) { - return(internalFormat); - } - switch (internalFormat) { - /* - * GL_S3_s3tc uses negative level values. - */ - case GL_RGB_S3TC: - case GL_RGB4_S3TC: - { - GLint level; - if (levelp) { - level = *levelp; - if (level < 0) { - level = -level; - *levelp = level; - } - } - } - return GL_COMPRESSED_RGB_FXT1_3DFX; - case GL_RGBA_S3TC: - case GL_RGBA4_S3TC: - { - GLint level; - if (levelp) { - level = *levelp; - if (level < 0) { - level = -level; - *levelp = level; - } - } - } - return GL_COMPRESSED_RGBA_FXT1_3DFX; - case GL_COMPRESSED_RGB_ARB: - return GL_COMPRESSED_RGB_FXT1_3DFX; - case GL_COMPRESSED_RGBA_ARB: - return GL_COMPRESSED_RGBA_FXT1_3DFX; - } - return internalFormat; -} - -/* - * Calculate a specific texture format given a generic - * texture format. - */ -GLint -fxDDBaseCompressedTexFormat(GLcontext *ctx, - GLint internalFormat) -{ - switch (internalFormat) { - case GL_COMPRESSED_RGB_FXT1_3DFX: - return(GL_RGB); - case GL_COMPRESSED_RGBA_FXT1_3DFX: - return(GL_RGBA); - } - return -1; -} - -/* - * Tell us if an image is compressed. The real work is done - * in a macro, but we need to have a function to create a - * function pointer. - */ -GLboolean -fxDDIsCompressedFormat(GLcontext *ctx, GLint internalFormat) -{ - return(fxDDIsCompressedFormatMacro(internalFormat)); -} - - -/* - * Calculate the image size of a compressed texture. - * - * The current compressed format, the FXT1 family, all - * map 8x32 texel blocks into 128 bits. - * - * We return 0 if we can't calculate the size. - * - * Glide would report this out to us, but we don't have - * exactly the right parameters. - */ -GLsizei -fxDDCompressedImageSize(GLcontext *ctx, - GLenum intFormat, - GLuint numDimensions, - GLuint width, - GLuint height, - GLuint depth) -{ - if (numDimensions != 2) { - return 0; - } - switch (intFormat) { - case GL_COMPRESSED_RGB_FXT1_3DFX: - case GL_COMPRESSED_RGBA_FXT1_3DFX: - /* - * Round height and width to multiples of 4 and 8, - * divide the resulting product by 32 to get the number - * of blocks, and multiply by 32 = 128/8 to get the. - * number of bytes required. That is to say, just - * return the product. Remember that we are returning - * bytes, not texels, so we have shrunk the texture - * by a factor of the texel size. - */ - width = (width + 0x7) &~ 0x7; - height = (height + 0x3) &~ 0x3; - return(width * height); - } - return(0); -} Index: xc/lib/GL/mesa/src/drv/tdfx/fxddtex.h diff -u xc/lib/GL/mesa/src/drv/tdfx/fxddtex.h:1.2 xc/lib/GL/mesa/src/drv/tdfx/fxddtex.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxddtex.h:1.2 Fri Dec 8 14:36:23 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxddtex.h Mon Jun 4 12:37:38 2001 @@ -1,123 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxddtex.h,v 1.2 2000/12/08 19:36:23 alanh Exp $ */ -#ifndef FXDDTEX_H -#define FXDDTEX_H - - -#include "texutil.h" - - -extern void fxPrintTextureData(tfxTexInfo * ti); - -extern void fxTexGetFormat(GLenum, GrTextureFormat_t *, GLint *, - MesaIntTexFormat *, GLint *, GLboolean); - -extern void fxTexGetInfo(const GLcontext *, int, int, GrLOD_t *, - GrAspectRatio_t *, - float *, float *, int *, int *, int *, int *); - -extern GLboolean fxDDTexImage2D(GLcontext * ctx, GLenum target, GLint level, - GLenum format, GLenum type, - const GLvoid * pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage, - GLboolean * retainInternalCopy); - -extern GLboolean fxDDTexSubImage2D(GLcontext * ctx, GLenum target, - GLint level, GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid * pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - -extern GLboolean fxDDTestProxyTexImage(GLcontext *ctx, GLenum target, - GLint level, GLint internalFormat, - GLenum format, GLenum type, - GLint width, GLint height, - GLint depth, GLint border ); - -extern GLvoid *fxDDGetTexImage(GLcontext * ctx, GLenum target, GLint level, - const struct gl_texture_object *texObj, - GLenum * formatOut, GLenum * typeOut, - GLboolean * freeImageOut); - -extern GLboolean fxDDCompressedTexImage2D( GLcontext *ctx, GLenum target, - GLint level, GLsizei imageSize, - const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage, - GLboolean *retainInternalCopy); -extern GLboolean fxDDCompressedTexSubImage2D( GLcontext *ctx, GLenum target, - GLint level, GLint xoffset, - GLint yoffset, GLsizei width, - GLint height, GLenum format, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage ); -extern void fxDDGetCompressedTexImage( GLcontext *ctx, GLenum target, - GLint lod, void *image, - const struct gl_texture_object *texObj, - struct gl_texture_image *texImage ); -extern GLint fxDDSpecificCompressedTexFormat(GLcontext *ctx, - GLint internalFormat, - GLint numDimensions, - GLint *levelp, - GLsizei *widthp, - GLsizei *heightp, - GLsizei *depthp, - GLint *borderp, - GLenum *formatp, - GLenum *typep); -extern GLint fxDDBaseCompressedTexFormat(GLcontext *ctx, - GLint internalFormat); - -#define fxDDIsCompressedFormatMacro(internalFormat) \ - (((internalFormat) == GL_COMPRESSED_RGB_FXT1_3DFX) || \ - ((internalFormat) == GL_COMPRESSED_RGBA_FXT1_3DFX)) -#define fxDDIsCompressedGlideFormatMacro(internalFormat) \ - ((internalFormat) == GR_TEXFMT_ARGB_CMP_FXT1) -extern GLboolean fxDDIsCompressedFormat(GLcontext *ctx, GLint internalFormat); - -extern void fxDDTexEnv(GLcontext *, GLenum, GLenum, const GLfloat *); - -extern void fxDDTexParam(GLcontext *, GLenum, struct gl_texture_object *, - GLenum, const GLfloat *); - -extern void fxDDTexBind(GLcontext *, GLenum, struct gl_texture_object *); - -extern void fxDDTexDel(GLcontext *, struct gl_texture_object *); - -extern GLboolean fxDDIsTextureResident(GLcontext *ctx, - struct gl_texture_object *t); - -extern void fxDDTexPalette(GLcontext *, struct gl_texture_object *); - -extern void fxDDTexUseGlbPalette(GLcontext *, GLboolean); - -/* - * Calculate the image size of a compressed texture. - * - * We return 0 if we can't calculate the size. - */ - -extern GLsizei fxDDCompressedImageSize(GLcontext *ctx, - GLenum internalFormat, - GLuint numDimensions, - GLuint width, - GLuint height, - GLuint depth); - -/* - * This is not in glext.h, since this is not an EXT or ARB - * extension. It probably shouldn't be here exactly, but - * there's not an obvious good place for it. - */ -#ifndef GL_S3_s3tc -#define GL_RGB_S3TC 0x83A0 -#define GL_RGB4_S3TC 0x83A1 -#define GL_RGBA_S3TC 0x83A2 -#define GL_RGBA4_S3TC 0x83A3 -#endif -#endif Index: xc/lib/GL/mesa/src/drv/tdfx/fxdrv.h diff -u xc/lib/GL/mesa/src/drv/tdfx/fxdrv.h:1.2 xc/lib/GL/mesa/src/drv/tdfx/fxdrv.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxdrv.h:1.2 Fri Dec 8 14:36:23 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxdrv.h Mon Jun 4 12:37:38 2001 @@ -1,800 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxdrv.h,v 1.2 2000/12/08 19:36:23 alanh Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Daryll Strauss - * Brian Paul - */ - - -#ifndef _FXDRV_H_ -#define _FXDRV_H_ - -#ifdef GLX_DIRECT_RENDERING - -#include -#include "dri_tmm.h" -#include "dri_mesaint.h" -#include "dri_mesa.h" -#include "dri_xmesaapi.h" -#ifdef XFree86Server -#include "GL/xf86glx.h" -#else -#include "glheader.h" -#endif -#if defined(__linux__) -#include -#endif -#include "clip.h" -#include "context.h" -#include "fxglidew.h" -#include "macros.h" -#include "matrix.h" -#include "mem.h" -#include "texture.h" -#include "types.h" -#include "vb.h" -#include "vbrender.h" -#include "xform.h" - -typedef struct { - drmHandle handle; - drmSize size; - drmAddress map; -} tdfxRegion, *tdfxRegionPtr; - -typedef struct { - tdfxRegion regs; - int deviceID; - int width; - int height; - int mem; - int cpp; - int stride; - int fifoOffset; - int fifoSize; - int fbOffset; - int backOffset; - int depthOffset; - int textureOffset; - int textureSize; - __DRIscreenPrivate *driScrnPriv; -} tdfxScreenPrivate; - -typedef struct { - volatile int fifoPtr; - volatile int fifoRead; - volatile int fifoOwner; - volatile int ctxOwner; - volatile int texOwner; -} TDFXSAREAPriv; - - -extern void fx_sanity_triangle(fxMesaContext fxMesa, - GrVertex *, GrVertex *, GrVertex *); -#if defined(MESA_DEBUG) && 0 -#define grDrawTriangle fx_sanity_triangle -#endif - - -/* Define some shorter names for these things. - */ -#define XCOORD GR_VERTEX_X_OFFSET -#define YCOORD GR_VERTEX_Y_OFFSET -#define ZCOORD GR_VERTEX_OOZ_OFFSET -#define OOWCOORD GR_VERTEX_OOW_OFFSET - -#define RCOORD GR_VERTEX_R_OFFSET -#define GCOORD GR_VERTEX_G_OFFSET -#define BCOORD GR_VERTEX_B_OFFSET -#define ACOORD GR_VERTEX_A_OFFSET - -#define S0COORD GR_VERTEX_SOW_TMU0_OFFSET -#define T0COORD GR_VERTEX_TOW_TMU0_OFFSET -#define S1COORD GR_VERTEX_SOW_TMU1_OFFSET -#define T1COORD GR_VERTEX_TOW_TMU1_OFFSET - - -#define CLIP_XCOORD 0 /* normal place */ -#define CLIP_YCOROD 1 /* normal place */ -#define CLIP_ZCOORD 2 /* GR_VERTEX_Z_OFFSET */ -#define CLIP_WCOORD 3 /* GR_VERTEX_R_OFFSET */ -#define CLIP_GCOORD 4 /* normal place */ -#define CLIP_BCOORD 5 /* normal place */ -#define CLIP_RCOORD 6 /* GR_VERTEX_OOZ_OFFSET */ -#define CLIP_ACOORD 7 /* normal place */ - - -/* Should have size == 16 * sizeof(float). - */ -typedef struct -{ - GLfloat f[15]; /* Same layout as GrVertex */ - GLubyte mask; /* Unsued */ - GLubyte usermask; /* Unused */ -} -fxVertex; - - -#ifdef __i386__ -#define FXCOLOR4( c ) (* (int *)c) -#else -#define FXCOLOR4( c ) ( \ - ( ((unsigned int)(c[3]))<<24 ) | \ - ( ((unsigned int)(c[2]))<<16 ) | \ - ( ((unsigned int)(c[1]))<<8 ) | \ - ( (unsigned int)(c[0])) ) -#endif - - -#define FX_VB_COLOR(fxm, color) \ - do { \ - if (sizeof(GLint) == 4*sizeof(GLubyte)) { \ - if (fxm->constColor != *(GLuint*)color) { \ - fxm->constColor = *(GLuint*)color; \ - FX_grConstantColorValue(fxm, FXCOLOR4(color)); \ - } \ - } else { \ - FX_grConstantColorValue(fxm, FXCOLOR4(color)); \ - } \ - } while (0) - -#define GOURAUD(x) { \ - GLubyte *col = VB->ColorPtr->data[(x)]; \ - gWin[(x)].v.r=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[0]); \ - gWin[(x)].v.g=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[1]); \ - gWin[(x)].v.b=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[2]); \ - gWin[(x)].v.a=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[3]); \ -} - -#if FX_USE_PARGB -#define GOURAUD2(v, c) { \ - GLubyte *col = c; \ - PACK_4F_ARGB(GET_PARGB(v), col[3], col[0], col[1], col[2]); \ -} -#else -#define GOURAUD2(v, c) { \ - GLubyte *col = c; \ - v->r=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[0]); \ - v->g=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[1]); \ - v->b=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[2]); \ - v->a=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[3]); \ -} -#endif /* FX_USE_PARGB */ - - -/* Mergable items first - */ -#define SETUP_RGBA 0x1 -#define SETUP_TMU0 0x2 -#define SETUP_TMU1 0x4 -#define SETUP_XY 0x8 -#define SETUP_Z 0x10 -#define SETUP_W 0x20 - -#define MAX_MERGABLE 0x8 - - -#define FX_NUM_TMU 2 - -#define FX_TMU0 GR_TMU0 -#define FX_TMU1 GR_TMU1 -#define FX_TMU_SPLIT 98 -#define FX_TMU_BOTH 99 -#define FX_TMU_NONE 100 - -/* Used for fxMesa->lastUnitsMode */ - -#define FX_UM_NONE 0x00000000 - -#define FX_UM_E0_REPLACE 0x00000001 -#define FX_UM_E0_MODULATE 0x00000002 -#define FX_UM_E0_DECAL 0x00000004 -#define FX_UM_E0_BLEND 0x00000008 -#define FX_UM_E0_ADD 0x00000010 - -#define FX_UM_E1_REPLACE 0x00000020 -#define FX_UM_E1_MODULATE 0x00000040 -#define FX_UM_E1_DECAL 0x00000080 -#define FX_UM_E1_BLEND 0x00000100 -#define FX_UM_E1_ADD 0x00000200 - -#define FX_UM_E_ENVMODE 0x000003ff - -#define FX_UM_E0_ALPHA 0x00001000 -#define FX_UM_E0_LUMINANCE 0x00002000 -#define FX_UM_E0_LUMINANCE_ALPHA 0x00004000 -#define FX_UM_E0_INTENSITY 0x00008000 -#define FX_UM_E0_RGB 0x00010000 -#define FX_UM_E0_RGBA 0x00020000 - -#define FX_UM_E1_ALPHA 0x00040000 -#define FX_UM_E1_LUMINANCE 0x00080000 -#define FX_UM_E1_LUMINANCE_ALPHA 0x00100000 -#define FX_UM_E1_INTENSITY 0x00200000 -#define FX_UM_E1_RGB 0x00400000 -#define FX_UM_E1_RGBA 0x00800000 - -#define FX_UM_E_IFMT 0x00fff000 - -#define FX_UM_COLOR_ITERATED 0x01000000 -#define FX_UM_COLOR_CONSTANT 0x02000000 -#define FX_UM_ALPHA_ITERATED 0x04000000 -#define FX_UM_ALPHA_CONSTANT 0x08000000 - - -#define PACK_BGRA32(R, G, B, A) \ - ( (((GLuint) (R)) << 16) | \ - (((GLuint) (G)) << 8) | \ - (((GLuint) (B)) ) | \ - (((GLuint) (A)) << 24) ) - -#define PACK_RGBA32(R, G, B, A) \ - ( (((GLuint) (R)) ) | \ - (((GLuint) (G)) << 8) | \ - (((GLuint) (B)) << 16) | \ - (((GLuint) (A)) << 24) ) - -/* - * The first two macros are to pack 8 bit color - * channel values into a 565 format. - */ -#define PACK_RGB16(R, G, B) \ - ((((GLuint) (R) & 0xF8) << 8) | \ - (((GLuint) (G) & 0xFC) << 3) | \ - (((GLuint) (B) & 0xFF) >> 3)) -#define PACK_BGR16(R, G, B) \ - ((((GLuint) (B) & 0xF8) << 8) | \ - (((GLuint) (G) & 0xFC) << 3) | \ - (((GLuint) (R) & 0xFF) >> 3)) -/* - * The second two macros pack 8 bit color channel values - * into 1555 values. - */ -#define PACK_RGBA16(R, G, B, A) \ - (((((GLuint) (A) & 0xFF) > 0) << 15)| \ - (((GLuint) (R) & 0xF8) << 7) | \ - (((GLuint) (G) & 0xF8) << 2) | \ - (((GLuint) (B) & 0xF8) >> 3)) -#define PACK_BGRA16(R, G, B, A) \ - (((((GLuint) (A) & 0xFF) > 0) << 15)| \ - (((GLuint) (B) & 0xF8) << 7) | \ - (((GLuint) (G) & 0xF8) << 2) | \ - (((GLuint) (R) & 0xF8) >> 3)) - -typedef void (*tfxRenderVBFunc) (GLcontext *); - -/* - Memory range from startAddr to endAddr-1 -*/ -typedef struct MemRange_t -{ - struct MemRange_t *next; - FxU32 startAddr, endAddr; -} -MemRange; - - -typedef struct -{ - GLsizei width, height; /* image size */ - GLint texelSize; /* How many bytes to a texel */ - GrTextureFormat_t glideFormat; /* Glide image format */ - unsigned short *data; /* Glide-formated texture image */ - FxU32 dataSize; /* Count of the data size */ -} -tfxMipMapLevel; - - -typedef struct tfxTexInfo_t -{ - struct tfxTexInfo *next; - struct gl_texture_object *tObj; - - GLuint lastTimeUsed; - FxU32 whichTMU; - GLboolean isInTM; - - GrAspectRatio_t aspectRatio; - tfxMipMapLevel mipmapLevel[MAX_TEXTURE_LEVELS]; - - MemRange *tm[FX_NUM_TMU]; - - GLint minLevel, maxLevel; - GLint baseLevelInternalFormat; - - GrTexInfo info; - - GrTextureFilterMode_t minFilt; - GrTextureFilterMode_t maxFilt; - FxBool LODblend; - - GrTextureClampMode_t sClamp; - GrTextureClampMode_t tClamp; - - GrMipMapMode_t mmMode; - - GLfloat sScale, tScale; - GLint int_sScale, int_tScale; /* x86 floating point trick for - * multiplication by powers of 2. - * Used in fxfasttmp.h - */ - GuTexPalette palette; - - GLboolean fixedPalette; - GLboolean validated; -} -tfxTexInfo; - - -typedef struct -{ - GLuint swapBuffer; - GLuint reqTexUpload; - GLuint texUpload; - GLuint memTexUpload; - GLuint texSwaps; -} -tfxStats; - - -typedef void (*tfxTriViewClipFunc) (struct vertex_buffer * VB, - GLuint v[], GLubyte mask); - -typedef void (*tfxTriClipFunc) (struct vertex_buffer * VB, - GLuint v[], GLuint mask); - - -typedef void (*tfxLineClipFunc) (struct vertex_buffer * VB, - GLuint v1, GLuint v2, GLubyte mask); - - -extern tfxTriViewClipFunc fxTriViewClipTab[0x8]; -extern tfxTriClipFunc fxTriClipStrideTab[0x8]; -extern tfxLineClipFunc fxLineClipTab[0x8]; - -typedef struct -{ - /* Alpha test */ - GLboolean alphaTestEnabled; - GrCmpFnc_t alphaTestFunc; - GrAlpha_t alphaTestRefValue; - - /* Blend function */ - GLboolean blendEnabled; - GrAlphaBlendFnc_t blendSrcFuncRGB; - GrAlphaBlendFnc_t blendDstFuncRGB; - GrAlphaBlendFnc_t blendSrcFuncAlpha; - GrAlphaBlendFnc_t blendDstFuncAlpha; -} -tfxUnitsState; - - - -/* Flags for render_index. - */ -#define FX_OFFSET 0x1 -#define FX_TWOSIDE 0x2 -#define FX_FRONT_BACK 0x4 -#define FX_FLAT 0x8 -#define FX_ANTIALIAS 0x10 -#define FX_FALLBACK 0x20 - - -/* Flags for fxMesa->new_state - */ -#define FX_NEW_TEXTURING 0x1 -#define FX_NEW_BLEND 0x2 -#define FX_NEW_ALPHA 0x4 -#define FX_NEW_DEPTH 0x8 -#define FX_NEW_FOG 0x10 -#define FX_NEW_SCISSOR 0x20 -#define FX_NEW_COLOR_MASK 0x40 -#define FX_NEW_CULL 0x80 -#define FX_NEW_STENCIL 0x100 - -/* FX struct stored in VB->driver_data. - */ -struct tfxMesaVertexBuffer -{ - GLuint size; /* Number of vertexes */ - GLvector1ui clipped_elements; /* Array [size] of GLuints */ - fxVertex *verts; /* Array of [size] fxVertex */ - fxVertex *last_vert; /* Points into verts array */ -#if defined(FX_GLIDE3) - GrVertex **triangle_b; /* Triangle buffer */ - GrVertex **strips_b; /* Strips buffer */ -#endif -}; - -#define FX_DRIVER_DATA(vb) ((struct tfxMesaVertexBuffer *)((vb)->driver_data)) -#define FX_CONTEXT(ctx) ((fxMesaContext)((ctx)->DriverCtx)) -#define FX_TEXTURE_DATA(t) fxTMGetTexInfo((t)->Current) - -#if !defined(FX_PXCONV_TABULAR) \ - && !defined(FX_PXCONV_APPROXIMATION) \ - && !defined(FX_PXCONV_EXACT) -#define FX_PXCONV_TABULAR -#endif -/* These lookup table are used to extract RGB values in [0,255] from - * 16-bit pixel values. - * - * In general, we want to convert 5 or 6 bit numbers to 8 - * bit numbers. - * o In the FX_PXCONV_TABULAR case, we do the numerically - * correct calculation at initialization time, and store - * the results in three large tables. - * o In the FX_PXCONV_APPROXIMATION method we approximate - * the numerically correct value by using the upper bits - * of the 5 or 6 bit value. That is, - * 8bitvalue = 5bitvalue << 3 | (5bitvalue >> 2) - * o In the FX_PXCONV_EXACT method, we calculate the - * exact value at runtime every time, using a floating - * point calculation. - */ -#define FX_PXCONV_INT_FIELD(v, w, s) (((v) >> (s)) & ((1 << (w)) - 1)) -#if defined(FX_PXCONV_TABULAR) -/* These lookup table are used to extract RGB values in [0,255] from - * 16-bit pixel values. - */ -extern GLubyte FX_PixelToRArray[0x10000]; -extern GLubyte FX_PixelToGArray[0x10000]; -extern GLubyte FX_PixelToBArray[0x10000]; -#define FX_PixelToB(fxMesa, v) (FX_PixelToBArray[(v)]) -#define FX_PixelToR(fxMesa, v) (FX_PixelToRArray[(v)]) -#define FX_PixelToG(fxMesa, v) (FX_PixelToGArray[(v)]) -#elif defined(FX_PXCONV_APPROXIMATION) -#define FX_PixelToR(fxMesa, v) \ - ((fxMesa)->bgrOrder \ - ? (FX_PXCONV_INT_FIELD(v, 5, 0) << 3) | FX_PXCONV_INT_FIELD(v, 3, 2) \ - : (FX_PXCONV_INT_FIELD(v, 5, 11) << 3) | FX_PXCONV_INT_FIELD(v, 3, 13)) -#define FX_PixelToG(fxMesa, v) \ - ((FX_PXCONV_INT_FIELD(v, 6, 5) << 2) | FX_PXCONV_INT_FIELD(v, 2, 7)) -#define FX_PixelToB(fxMesa, v) \ - ((fxMesa)->bgrOrder \ - ? (FX_PXCONV_INT_FIELD(v, 5, 11) << 3) | FX_PXCONV_INT_FIELD(v, 3, 13)\ - : (FX_PXCONV_INT_FIELD(v, 5, 0) << 3) | FX_PXCONV_INT_FIELD(v, 3, 2)) -#elif defined(FX_PXCONV_EXACT) -#define FX_PixelToR(fxMesa, v) \ - ((((fxMesa)->bgrOrder \ - ? FX_PXCONV_INT_FIELD(v, 5, 0) \ - : FX_PXCONV_INT_FIELD(v, 5, 11)) * 8 * 255) / 0xF8) -#define FX_PixelToG(fxMesa, v) \ - ((FX_PXCONV_INT_FIELD(v, 6, 5) * 4 * 255) / 0xFC) -#define FX_PixelToB(fxMesa, v) \ - ((((fxMesa)->bgrOrder \ - ? FX_PXCONV_INT_FIELD(v, 5, 11) \ - : FX_PXCONV_INT_FIELD(v, 5, 0)) * 8 * 255) / 0xF8) -#else -#error Need to define pixel a conversion method. -#endif - - -/* - * This is state which may be shared by several tdfx contexts. - * It hangs off of Mesa's gl_shared_state object (ctx->Shared->DriverData). - */ -struct TdfxSharedState -{ - GLboolean umaTexMemory; - GLuint totalTexMem[FX_NUM_TMU]; /* constant */ - GLuint freeTexMem[FX_NUM_TMU]; /* changes as we go */ - MemRange *tmPool; - MemRange *tmFree[FX_NUM_TMU]; -}; - - -/* - * This is the tdfx context struct. - */ -struct tfxMesaContext -{ - /* - * Set once and never changed: - */ - GLcontext *glCtx; /* the core Mesa context */ - GLvisual *glVis; /* describes the color buffer */ - - GLboolean initDone; /* has this context been initialized? */ - GLint board; /* the board used for this context */ - int screen_width; - int screen_height; - - FX_GrContext_t glideContext; /* returned by grSstWinOpen() */ - void *state; /* Glide state buffer */ - - GLint textureAlign; - GLboolean bgrOrder; - GLboolean verbose; - GLboolean haveTwoTMUs; /* True if we really have 2 tmu's */ - GLboolean emulateTwoTMUs; /* True if we present 2 tmu's to mesa. */ - GLboolean haveHwStencil; - GLboolean isNapalm; - GLint swapInterval; - GLint maxPendingSwapBuffers; - - /* stuff added for DRI */ - __DRIcontextPrivate *driContextPriv; - drmContext hHWContext; - int numClipRects; - XF86DRIClipRectPtr pClipRects; - tdfxScreenPrivate *tdfxScrnPriv; - - /* - * Changes during execution: - */ - int width, height; /* size of window */ - int x_offset; /* distance from window left to screen left */ - int y_offset; /* distance from window top to screen top */ - int y_delta; /* distance from window bottom to screen bottom */ - int needClip; /* need to loop over cliprects? */ - int clipMinX; /* if !needClip, bounds of the single clip rect */ - int clipMaxX; /* "" */ - int clipMinY; /* "" */ - int clipMaxY; /* "" */ - - - GrBuffer_t currentFB; /* front buffer or back buffer */ - - GLuint depthClear; /* glClear depth value */ - GrColor_t clearC; /* glClear color value */ - GrAlpha_t clearA; /* glClear alpha value */ - GLuint constColor; - GrColor_t color; - GrCullMode_t cullMode; - - tfxUnitsState unitsState; - tfxUnitsState restoreUnitsState; /* saved during multipass */ - - GuTexPalette glbPalette; /* global texture palette */ - - GLuint tmu_source[FX_NUM_TMU]; - GLuint tex_dest[MAX_TEXTURE_UNITS]; - GLuint setupindex; - GLuint partial_setup_index; - GLuint setupdone; - GLuint mergeindex; - GLuint mergeinputs; - GLuint render_index; - GLuint last_tri_caps; - GLuint stw_hint_state; /* for grHints */ - GLuint is_in_hardware; - GLuint new_state; - GLuint using_fast_path, passes, multipass; - GLuint texBindNumber; - GLint tmuSrc; - - tfxLineClipFunc clip_line; - tfxTriClipFunc clip_tri_stride; - tfxTriViewClipFunc view_clip_tri; - - GLenum fogTableMode; - GLfloat fogDensity; - GLfloat fogStart, fogEnd; - GrFog_t *fogTable; - - /* Acc. functions */ - - points_func PointsFunc; - line_func LineFunc; - triangle_func TriangleFunc; - quad_func QuadFunc; - - render_func **RenderVBTables; - render_func *RenderVBClippedTab; - render_func *RenderVBCulledTab; - render_func *RenderVBRawTab; - - tfxStats stats; -}; - - -typedef void (*tfxSetupFunc) (struct vertex_buffer *, GLuint, GLuint); - - -extern void fxPrintSetupFlags(const char *msg, GLuint flags); -extern void fxSetupDDPointers(GLcontext *); - -extern void fxDDSetupInit(void); -extern void fxDDCvaInit(void); -extern void fxDDTrifuncInit(void); -extern void fxDDFastPathInit(void); - -extern void fxDDRenderInitGlide3(GLcontext * ctx); - -extern void fxDDChooseRenderState(GLcontext * ctx); - -extern void fxRenderClippedLine(struct vertex_buffer *VB, - GLuint v1, GLuint v2); - -extern void fxRenderClippedTriangle(struct vertex_buffer *VB, - GLuint n, GLuint vlist[]); - - -extern tfxSetupFunc fxDDChooseSetupFunction(GLcontext *); - -extern points_func fxDDChoosePointsFunction(GLcontext *); -extern line_func fxDDChooseLineFunction(GLcontext *); -extern triangle_func fxDDChooseTriangleFunction(GLcontext *); -extern quad_func fxDDChooseQuadFunction(GLcontext *); -extern render_func **fxDDChooseRenderVBTables(GLcontext *); - -extern void fxDDRenderInit(GLcontext *); -extern void fxDDClipInit(void); - -extern void fxSetupDDSpanPointers(GLcontext *); - - -extern void fxDDRegisterVB(struct vertex_buffer *VB); -extern void fxDDUnregisterVB(struct vertex_buffer *VB); -extern void fxDDResizeVB(struct vertex_buffer *VB, GLuint size); - -extern void fxDDMergeAndRender(struct vertex_buffer *VB); - -extern void fxDDCheckPartialRasterSetup(GLcontext * ctx, - struct gl_pipeline_stage *d); - -extern void fxDDPartialRasterSetup(struct vertex_buffer *VB); - -extern void fxDDDoRasterSetup(struct vertex_buffer *VB); - -extern void fxDDRenderElementsDirect(struct vertex_buffer *VB); -extern void fxDDRenderVBIndirectDirect(struct vertex_buffer *VB); - -extern void fxDDFastPath(struct vertex_buffer *VB); - -extern void fxPrintRenderState(const char *msg, GLuint state); -extern void fxPrintHintState(const char *msg, GLuint state); - -extern void fxDDDoRenderVB(struct vertex_buffer *VB); - -extern int fxDDInitFxMesaContext(fxMesaContext fxMesa); - - -extern void fxSetScissorValues(GLcontext * ctx); -extern void fxTMMoveInTM_NoLock(fxMesaContext fxMesa, - struct gl_texture_object *tObj, FxU32 where); -extern void fxInitPixelTables(fxMesaContext fxMesa, GLboolean bgrOrder); - - - -extern GLboolean tdfxMapAllRegions(__DRIscreenPrivate * driScrnPriv); -extern void tdfxUnmapAllRegions(__DRIscreenPrivate * driScrnPriv); -extern GLboolean tdfxInitHW(__DRIdrawablePrivate * driDrawPrivate, - fxMesaContext cPriv); - -extern void XMesaUpdateState(fxMesaContext fxMesa); - - -/* This is the private interface between Glide and DRI */ -#if 0 -extern void grDRIOpen(char *pFB, tdfxScreenPrivate *sPriv, - volatile int *fifoPtr, volatile int *fifoRead); -#endif -extern void grDRIPosition(int x, int y, int w, int h, - int numClip, XF86DRIClipRectPtr pClip); -extern void grDRILostContext(void); -extern void grDRIImportFifo(int fifoPtr, int fifoRead); -extern void grDRIInvalidateAll(void); -extern void grDRIResetSAREA(void); -extern void grDRIBufferSwap(FxU32 swapInterval); -extern void grDRISwapClipRects(FxU32 swapInterval, - int numClip, - const XF86DRIClipRectPtr pClip); - - - -/* You can turn this on to find locking conflicts. -#define DEBUG_LOCKING -*/ - -#ifdef DEBUG_LOCKING -extern char *prevLockFile; -extern int prevLockLine; -#define DEBUG_LOCK() \ - do { \ - prevLockFile=(__FILE__); \ - prevLockLine=(__LINE__); \ - } while (0) -#define DEBUG_RESET() \ - do { \ - prevLockFile=0; \ - prevLockLine=0; \ - } while (0) -#define DEBUG_CHECK_LOCK() \ - do { \ - if (prevLockFile) { \ - fprintf(stderr, "LOCK SET!\n\tPrevious %s:%d\n\tCurrent: %s:%d\n", \ - prevLockFile, prevLockLine, __FILE__, __LINE__); \ - exit(1); \ - } \ - } while (0) -#else -#define DEBUG_LOCK() -#define DEBUG_RESET() -#define DEBUG_CHECK_LOCK() -#endif /* DEBUG_LOCKING */ - - -/* !!! We may want to separate locks from locks with validation. - This could be used to improve performance for those things - commands that do not do any drawing !!! */ - -#define DRM_LIGHT_LOCK_RETURN(fd,lock,context,__ret) \ - do { \ - DRM_CAS(lock,context,DRM_LOCK_HELD|context,__ret); \ - if (__ret) drmGetLock(fd,context,0); \ - } while(0) - -#define LOCK_HARDWARE(fxMesa) XMesaUpdateState(fxMesa) - -/* Unlock the hardware using the global current context */ -#define UNLOCK_HARDWARE(fxMesa) \ - do { \ - __DRIcontextPrivate *cPriv = fxMesa->driContextPriv; \ - __DRIdrawablePrivate *dPriv = cPriv->driDrawablePriv; \ - __DRIscreenPrivate *sPriv = dPriv->driScreenPriv; \ - DRM_UNLOCK(sPriv->fd, &sPriv->pSAREA->lock, \ - dPriv->driContextPriv->hHWContext); \ - DEBUG_RESET(); \ - } while (0) - -#define BEGIN_BOARD_LOCK(fxMesa) LOCK_HARDWARE(fxMesa) -#define END_BOARD_LOCK(fxMesa) UNLOCK_HARDWARE(fxMesa) - -/* - This pair of macros makes a loop over the drawing operations - so it is not self contained and doesn't have the nice single - statement semantics of most macros -*/ -#define BEGIN_CLIP_LOOP(fxMesa) \ - do { \ - __DRIcontextPrivate *cPriv = fxMesa->driContextPriv; \ - __DRIdrawablePrivate *dPriv = cPriv->driDrawablePriv; \ - int _nc; \ - LOCK_HARDWARE(fxMesa); \ - _nc = dPriv->numClipRects; \ - while (_nc--) { \ - if (fxMesa->needClip) { \ - fxMesa->clipMinX = dPriv->pClipRects[_nc].x1; \ - fxMesa->clipMaxX = dPriv->pClipRects[_nc].x2; \ - fxMesa->clipMinY = dPriv->pClipRects[_nc].y1; \ - fxMesa->clipMaxY = dPriv->pClipRects[_nc].y2; \ - fxSetScissorValues(fxMesa->glCtx); \ - } - -#define END_CLIP_LOOP(fxMesa) \ - } \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - - -#endif /* GLX_DIRECT_RENDERING */ - -#endif /* _FXDRV_H_ */ Index: xc/lib/GL/mesa/src/drv/tdfx/fxfastpath.c diff -u xc/lib/GL/mesa/src/drv/tdfx/fxfastpath.c:1.4 xc/lib/GL/mesa/src/drv/tdfx/fxfastpath.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxfastpath.c:1.4 Fri Dec 8 21:13:22 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxfastpath.c Mon Jun 4 12:37:38 2001 @@ -1,365 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxfastpath.c,v 1.4 2000/12/09 02:13:22 dawes Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -#include "types.h" -#include "cva.h" -#include "mmath.h" -#include "fxdrv.h" -#include "fxtexman.h" -#include "vertices.h" -#ifdef __i386__ -#include "X86/common_x86_asm.h" -#endif - - -#if 0 && defined(__i386__) -#define NEGATIVE(f) ((*(int *)&f) < 0) -#define DIFFERENT_SIGNS(a,b) (((*(int *)&a)^(*(int *)&b)) < 0) -#else -#define NEGATIVE(f) (f < 0) -#define DIFFERENT_SIGNS(a,b) ((a*b) < 0) -#endif - -#define LINTERP( T, A, B ) ( (A) + (T) * ( (B) - (A) ) ) - - -#define CLIP(sgn,v,PLANE) \ -if (mask & PLANE) { \ - GLuint *indata = inlist[in]; \ - GLuint *outdata = inlist[in ^= 1]; \ - GLuint nr = n; \ - GLfloat *J = verts[indata[nr-1]].f; \ - GLfloat dpJ = (sgn J[v]) + J[CLIP_WCOORD]; \ - \ - inlist[0] = vlist1; \ - for (i = n = 0 ; i < nr ; i++) { \ - GLuint elt_i = indata[i]; \ - GLfloat *I = verts[elt_i].f; \ - GLfloat dpI = (sgn I[v]) + I[CLIP_WCOORD]; \ - \ - if (DIFFERENT_SIGNS(dpI, dpJ)) { \ - GLfloat *O = verts[next_vert].f; \ - GLfloat t = dpI / (dpI - dpJ); \ - GLuint j; \ - \ - clipmask[next_vert] = 0; \ - outdata[n++] = next_vert++; \ - \ - for (j = 0 ; j < SIZE ; j += 2) { \ - O[j] = LINTERP(t, I[j], J[j]); \ - O[j+1] = LINTERP(t, I[j+1], J[j+1]); \ - } \ - } \ - \ - clipmask[elt_i] |= PLANE; /* don't set up */ \ - \ - if (!NEGATIVE(dpI)) { \ - outdata[n++] = elt_i; \ - clipmask[elt_i] &= ~PLANE; /* set up after all */ \ - } \ - \ - J = I; \ - dpJ = dpI; \ - } \ - \ - if (n < 3) return; \ -} - -#define LINE_CLIP(x,y,z,w,PLANE) \ -if (mask & PLANE) { \ - GLfloat dpI = DOT4V(I,x,y,z,w); \ - GLfloat dpJ = DOT4V(J,x,y,z,w); \ - \ - if (DIFFERENT_SIGNS(dpI, dpJ)) { \ - GLfloat *O = verts[next_vert].f; \ - GLfloat t = dpI / (dpI - dpJ); \ - GLuint j; \ - \ - for (j = 0 ; j < SIZE ; j += 2) { \ - O[j] = LINTERP(t, I[j], J[j]); \ - O[j+1] = LINTERP(t, I[j+1], J[j+1]); \ - } \ - \ - clipmask[next_vert] = 0; \ - \ - if (NEGATIVE(dpI)) { \ - clipmask[elts[0]] |= PLANE; \ - I = O; elts[0] = next_vert++; \ - } else { \ - clipmask[elts[1]] |= PLANE; \ - J = O; elts[1] = next_vert++; \ - } \ - } \ - else if (NEGATIVE(dpI)) \ - return; \ -} - - -#define CLIP_POINT( e ) \ - if (mask[e]) \ - *out++ = e - -#define CLIP_LINE( e1, e0 ) \ -do { \ - GLubyte ormask = mask[e0] | mask[e1]; \ - out[0] = e1; \ - out[1] = e0; \ - out+=2; \ - if (ormask) { \ - out-=2; \ - if (!(mask[e0] & mask[e1])) { \ - TAG(fx_line_clip)( &out, verts, mask, &next_vert, ormask); \ - } \ - } \ -} while (0) - -#define CLIP_TRIANGLE( e2, e1, e0 ) \ -do { \ - GLubyte ormask; \ - out[0] = e2; \ - out[1] = e1; \ - out[2] = e0; \ - out += 3; \ - ormask = mask[e2] | mask[e1] | mask[e0]; \ - if (ormask) { \ - out -= 3; \ - if ( !(mask[e2] & mask[e1] & mask[e0])) { \ - TAG(fx_tri_clip)( &out, verts, mask, &next_vert, ormask ); \ - } \ - } \ -} while (0) - - -/* Add window offset to window coords to get screen coords */ - -#define VARS_XYZ \ - GLfloat vsx = mat[MAT_SX]; \ - GLfloat vsy = mat[MAT_SY]; \ - GLfloat vsz = mat[MAT_SZ]; \ - GLfloat vtx = mat[MAT_TX]; \ - GLfloat vty = mat[MAT_TY]; \ - GLfloat vtz = mat[MAT_TZ]; - -#define DO_SETUP_XYZ \ - f[XCOORD] = f[0] * oow * vsx + vtx; \ - f[YCOORD] = f[1] * oow * vsy + vty; \ - f[ZCOORD] = f[2] * oow * vsz + vtz; - - - - -struct fx_fast_tab -{ - void (*build_vertices) (struct vertex_buffer * VB, GLuint do_clip); - - void (*clip[GL_POLYGON + 1]) (struct vertex_buffer * VB, - GLuint start, GLuint count, GLuint parity); - - void (*project_clipped_vertices) (GLfloat * first, - GLfloat * last, - const GLfloat * mat, - GLuint stride, const GLubyte * mask); - - void (*project_vertices) (GLfloat * first, - GLfloat * last, - const GLfloat * mat, GLuint stride); -}; - -/* Pack either rgba or texture into the remaining half of a 32 byte vertex. - */ -#define CLIP_R CLIP_RCOORD -#define CLIP_G CLIP_GCOORD -#define CLIP_B CLIP_BCOORD -#define CLIP_A CLIP_ACOORD -#define CLIP_S0 4 -#define CLIP_T0 5 -#define CLIP_S1 6 -#define CLIP_T1 7 - -#define SIZE 4 -#define TYPE (0) -#define TAG(x) x -#include "fxfasttmp.h" - -#define SIZE 8 -#define TYPE (SETUP_RGBA) -#define TAG(x) x##_RGBA -#include "fxfasttmp.h" - -#define SIZE 6 -#define TYPE (SETUP_TMU0) -#define TAG(x) x##_TMU0 -#include "fxfasttmp.h" - -#define SIZE 8 -#define TYPE (SETUP_TMU0|SETUP_TMU1) -#define TAG(x) x##_TMU0_TMU1 -#include "fxfasttmp.h" - -#undef CLIP_S1 -#undef CLIP_T1 -#define CLIP_S1 4 -#define CLIP_T1 5 - -#define SIZE 6 -#define TYPE (SETUP_TMU1) -#define TAG(x) x##_TMU1 -#include "fxfasttmp.h" - -/* These three need to use a full 64 byte clip-space vertex. - */ -#undef CLIP_S0 -#undef CLIP_T0 -#undef CLIP_S1 -#undef CLIP_T1 - -#define CLIP_S0 8 -#define CLIP_T0 9 -#define CLIP_S1 10 -#define CLIP_T1 11 - -#define SIZE 10 -#define TYPE (SETUP_RGBA|SETUP_TMU0) -#define TAG(x) x##_RGBA_TMU0 -#include "fxfasttmp.h" - -#define SIZE 12 -#define TYPE (SETUP_RGBA|SETUP_TMU0|SETUP_TMU1) -#define TAG(x) x##_RGBA_TMU0_TMU1 -#include "fxfasttmp.h" - -#undef CLIP_S1 -#undef CLIP_T1 -#define CLIP_S1 8 -#define CLIP_T1 9 - -#define SIZE 10 -#define TYPE (SETUP_RGBA|SETUP_TMU1) -#define TAG(x) x##_RGBA_TMU1 -#include "fxfasttmp.h" - -static struct fx_fast_tab fxFastTab[0x8]; - -void -fxDDFastPathInit() -{ - fx_init_fastpath(&fxFastTab[0]); - fx_init_fastpath_RGBA(&fxFastTab[SETUP_RGBA]); - fx_init_fastpath_TMU0(&fxFastTab[SETUP_TMU0]); - fx_init_fastpath_TMU1(&fxFastTab[SETUP_TMU1]); - fx_init_fastpath_RGBA_TMU0(&fxFastTab[SETUP_RGBA | SETUP_TMU0]); - fx_init_fastpath_RGBA_TMU1(&fxFastTab[SETUP_RGBA | SETUP_TMU1]); - fx_init_fastpath_TMU0_TMU1(&fxFastTab[SETUP_TMU0 | SETUP_TMU1]); - fx_init_fastpath_RGBA_TMU0_TMU1(&fxFastTab[SETUP_RGBA | SETUP_TMU0 | - SETUP_TMU1]); -} - - - -void -fxDDFastPath(struct vertex_buffer *VB) -{ - GLcontext *ctx = VB->ctx; - GLenum prim = ctx->CVA.elt_mode; - struct tfxMesaContext *fxMesa = FX_CONTEXT(ctx); - struct fx_fast_tab *tab = &fxFastTab[fxMesa->setupindex & 0x7]; - GLuint do_clip = 1; - struct tfxMesaVertexBuffer *fxVB = FX_DRIVER_DATA(VB); - GLfloat tx, ty; - - fxVertex *first; - GLfloat *mat = ctx->Viewport.WindowMap.m; - - gl_prepare_arrays_cva(VB); /* still need this */ - - if (VB->EltPtr->count * 12 > fxVB->size) { - fxDDResizeVB(VB, VB->EltPtr->count * 12); - do_clip = 1; - } - - tab->build_vertices(VB, do_clip); /* object->clip space */ - - first = FX_DRIVER_DATA(VB)->verts; - - /* Add window offset to window coords to get screen coords */ - tx = mat[MAT_TX]; - ty = mat[MAT_TY]; - mat[MAT_TX] = tx + fxMesa->x_offset; - mat[MAT_TY] = ty + fxMesa->y_delta; - - if (VB->ClipOrMask) { - if (!VB->ClipAndMask) { - GLubyte tmp = VB->ClipOrMask; - - tab->clip[prim] (VB, 0, VB->EltPtr->count, 0); /* clip */ - - tab->project_clipped_vertices(fxVB->verts->f, - fxVB->last_vert->f, - mat, 16 * 4, VB->ClipMask); - - ctx->CVA.elt_mode = gl_reduce_prim[prim]; - VB->EltPtr = &(FX_DRIVER_DATA(VB)->clipped_elements); - - VB->ClipOrMask = 0; - fxDDRenderElementsDirect(VB); /* render using new list */ - VB->ClipOrMask = tmp; - } - } - else { - tab->project_vertices(fxVB->verts->f, fxVB->last_vert->f, mat, - 16 * 4); - - fxDDRenderElementsDirect(VB); /* render using orig list */ - } - - /* Add window offset to window coords to get screen coords */ - mat[MAT_TX] = tx; - mat[MAT_TY] = ty; - - /* This indicates that there is no cached data to reuse. - */ - VB->pipeline->data_valid = 0; - VB->pipeline->pipeline_valid = 0; -} - Index: xc/lib/GL/mesa/src/drv/tdfx/fxfasttmp.h diff -u xc/lib/GL/mesa/src/drv/tdfx/fxfasttmp.h:1.4 xc/lib/GL/mesa/src/drv/tdfx/fxfasttmp.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxfasttmp.h:1.4 Tue Dec 12 18:24:28 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxfasttmp.h Mon Jun 4 12:37:38 2001 @@ -1,357 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxfasttmp.h,v 1.4 2000/12/12 23:24:28 dawes Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -/* Build clip space vertices from object space data. - */ -static void TAG(fx_setup_full) (struct vertex_buffer * VB, GLuint do_clip) -{ - GLcontext *ctx = VB->ctx; - GLfloat *f = (GLfloat *) FX_DRIVER_DATA(VB)->verts; - fxMesaContext fxMesa = FX_CONTEXT(VB->ctx); - GLuint count = VB->Count; - GLuint i; - - const GLfloat *const m = ctx->ModelProjectMatrix.m; - -#if (TYPE & SETUP_RGBA) - GLubyte *color = (GLubyte *) VB->ColorPtr->data; - GLuint color_stride = VB->ColorPtr->stride; -#endif - -#if (TYPE & SETUP_TMU0) - GLuint tmu0_source = fxMesa->tmu_source[0]; - struct gl_texture_unit *t0 = &ctx->Texture.Unit[tmu0_source]; - GLint s0scale = FX_TEXTURE_DATA(t0)->int_sScale; - GLint t0scale = FX_TEXTURE_DATA(t0)->int_tScale; - GLint *tmu0_int_data = (GLint *) VB->TexCoordPtr[tmu0_source]->data; - GLuint tmu0_stride = VB->TexCoordPtr[tmu0_source]->stride; -#endif - -#if (TYPE & SETUP_TMU1) - GLuint tmu1_source = fxMesa->tmu_source[1]; - struct gl_texture_unit *t1 = &ctx->Texture.Unit[tmu1_source]; - GLint s1scale = FX_TEXTURE_DATA(t1)->int_sScale; - GLint t1scale = FX_TEXTURE_DATA(t1)->int_tScale; - GLint *tmu1_int_data = (GLint *) VB->TexCoordPtr[tmu1_source]->data; - GLuint tmu1_stride = VB->TexCoordPtr[tmu1_source]->stride; -#endif - - (void) fxMesa; - (void) ctx; - (void) i; - (void) f; - - /* Use 3 seperate loops because it's easier for assembly. A - * best-case solution might be to do all three in a single assembly - * loop. - */ - gl_xform_points3_v16_general(FX_DRIVER_DATA(VB)->verts[0].f, - m, - VB->ObjPtr->start, VB->ObjPtr->stride, - count); - - if (do_clip) { - VB->ClipAndMask = ~0; - VB->ClipOrMask = 0; - gl_cliptest_points4_v16(FX_DRIVER_DATA(VB)->verts[0].f, - FX_DRIVER_DATA(VB)->verts[count].f, - &(VB->ClipOrMask), - &(VB->ClipAndMask), VB->ClipMask); - } - - -#if (TYPE) - for (i = 0; i < count; i++, f += 16) { -#if (TYPE & SETUP_RGBA) - GLubyte *col = color; - color += color_stride; - UBYTE_COLOR_TO_FLOAT_255_COLOR2(f[CLIP_R], col[0]); - UBYTE_COLOR_TO_FLOAT_255_COLOR2(f[CLIP_G], col[1]); - UBYTE_COLOR_TO_FLOAT_255_COLOR2(f[CLIP_B], col[2]); - UBYTE_COLOR_TO_FLOAT_255_COLOR2(f[CLIP_A], col[3]); -#endif -#if (TYPE & SETUP_TMU0) - *(int *) &f[CLIP_S0] = s0scale + tmu0_int_data[0]; - *(int *) &f[CLIP_T0] = t0scale + tmu0_int_data[1]; - STRIDE_T(tmu0_int_data, GLint, tmu0_stride); -#endif -#if (TYPE & SETUP_TMU1) - *(int *) &f[CLIP_S1] = s1scale + tmu1_int_data[0]; - *(int *) &f[CLIP_T1] = t1scale + tmu1_int_data[1]; - STRIDE_T(tmu1_int_data, GLint, tmu1_stride); -#endif - } -#endif - - FX_DRIVER_DATA(VB)->last_vert = &(FX_DRIVER_DATA(VB)->verts[count]); -} - - -/* Do viewport map, device scale and perspective projection. - * - * Rearrange fxVertices to look like grVertices. - */ -static void TAG(fx_project_vertices) (GLfloat * first, - GLfloat * last, - const GLfloat * mat, GLuint stride) -{ - GLfloat *f; - VARS_XYZ; - - for (f = first; f != last; STRIDE_F(f, stride)) { - GLfloat oow = 1.0f / f[CLIP_WCOORD]; /* urp! */ - -#if FX_USE_PARGB - if (TYPE & SETUP_RGBA) { - PACK_4F_ARGB(GET_PARGB(f), f[CLIP_A], f[CLIP_R], f[CLIP_G], f[CLIP_B]); - } -#else - if (TYPE & SETUP_RGBA) { - f[RCOORD] = f[CLIP_R]; - } -#endif - if (TYPE & SETUP_TMU1) { - f[S1COORD] = f[CLIP_S1] * oow; - f[T1COORD] = f[CLIP_T1] * oow; - } - - if (TYPE & SETUP_TMU0) { - f[T0COORD] = f[CLIP_T0] * oow; - f[S0COORD] = f[CLIP_S0] * oow; - } - - DO_SETUP_XYZ; - - f[OOWCOORD] = oow; - } -} - -static void TAG(fx_project_clipped_vertices) (GLfloat * first, - GLfloat * last, - const GLfloat * mat, - GLuint stride, - const GLubyte * mask) -{ - GLfloat *f; - VARS_XYZ; - - for (f = first; f != last; STRIDE_F(f, stride), mask++) { - if (!*mask) { - - GLfloat oow = 1.0f / f[CLIP_WCOORD]; -#if FX_USE_PARGB - if (TYPE & SETUP_RGBA) { - PACK_4F_ARGB(GET_PARGB(f), f[CLIP_A], f[CLIP_R], f[CLIP_G], f[CLIP_B]); - } -#else - if (TYPE & SETUP_RGBA) { - f[RCOORD] = f[CLIP_R]; - } -#endif - - if (TYPE & SETUP_TMU1) { - f[S1COORD] = f[CLIP_S1] * oow; - f[T1COORD] = f[CLIP_T1] * oow; - } - - if (TYPE & SETUP_TMU0) { - f[T0COORD] = f[CLIP_T0] * oow; - f[S0COORD] = f[CLIP_S0] * oow; - } - - DO_SETUP_XYZ; - - f[OOWCOORD] = oow; - } - } -} - - -static -#if (SIZE <= 8) - INLINE -#endif -void TAG(fx_tri_clip) (GLuint ** p_elts, - fxVertex * verts, - GLubyte * clipmask, GLuint * p_next_vert, GLubyte mask) -{ - GLuint *elts = *p_elts; - GLuint next_vert = *p_next_vert; - GLuint vlist1[VB_MAX_CLIPPED_VERTS]; - GLuint vlist2[VB_MAX_CLIPPED_VERTS]; - GLuint *inlist[2]; - GLuint *out; - GLuint in = 0; - GLuint n = 3; - GLuint i; - - inlist[0] = elts; - inlist[1] = vlist2; - - CLIP(-, 0, CLIP_RIGHT_BIT); - CLIP(+, 0, CLIP_LEFT_BIT); - CLIP(-, 1, CLIP_TOP_BIT); - CLIP(+, 1, CLIP_BOTTOM_BIT); - CLIP(-, 2, CLIP_FAR_BIT); - CLIP(+, 2, CLIP_NEAR_BIT); - - /* Convert the planar polygon to a list of triangles. - */ - out = inlist[in]; - - for (i = 2; i < n; i++) { - elts[0] = out[0]; - elts[1] = out[i - 1]; - elts[2] = out[i]; - elts += 3; - } - - *p_next_vert = next_vert; - *p_elts = elts; -} - - -static INLINE void TAG(fx_line_clip) (GLuint ** p_elts, - fxVertex * verts, - GLubyte * clipmask, - GLuint * p_next_vert, GLubyte mask) -{ - GLuint *elts = *p_elts; - GLfloat *I = verts[elts[0]].f; - GLfloat *J = verts[elts[1]].f; - GLuint next_vert = *p_next_vert; - - LINE_CLIP(1, 0, 0, -1, CLIP_LEFT_BIT); - LINE_CLIP(-1, 0, 0, 1, CLIP_RIGHT_BIT); - LINE_CLIP(0, 1, 0, -1, CLIP_TOP_BIT); - LINE_CLIP(0, -1, 0, 1, CLIP_BOTTOM_BIT); - LINE_CLIP(0, 0, 1, -1, CLIP_FAR_BIT); - LINE_CLIP(0, 0, -1, 1, CLIP_NEAR_BIT); - - *p_next_vert = next_vert; - *p_elts += 2; -} - - -/* Build a table of functions to clip each primitive type. - */ -#define LOCAL_VARS \ - GLuint *elt = VB->EltPtr->data; \ - fxVertex *verts = FX_DRIVER_DATA(VB)->verts; \ - GLuint next_vert = VB->Count; \ - GLuint *out = FX_DRIVER_DATA(VB)->clipped_elements.data; \ - GLubyte *mask = VB->ClipMask; \ - - -#define POSTFIX \ - FX_DRIVER_DATA(VB)->clipped_elements.count = \ - out - FX_DRIVER_DATA(VB)->clipped_elements.data; \ - FX_DRIVER_DATA(VB)->last_vert = &verts[next_vert]; - -#define INIT(x) - -#define RENDER_POINTS(start, count) \ -do { \ - GLuint i; \ - for (i = start ; i < count ; i++ ) \ - CLIP_POINT( elt[i] ); \ -} while (0) - -#define RENDER_LINE(i1, i0) \ - CLIP_LINE(elt[i1], elt[i0]) - -#define RENDER_TRI(i2, i1, i0, pv, parroty) \ -do { \ - GLuint e2 = elt[i2], e1 = elt[i1], e0 = elt[i0]; \ - if (parroty) e2 = elt[i1], e1 = elt[i2]; \ - CLIP_TRIANGLE( e2, e1, e0 ); \ -} while (0) - -#define RENDER_QUAD(i3, i2, i1, i0, pv) \ - CLIP_TRIANGLE(elt[i3], elt[i2], elt[i0]); \ - CLIP_TRIANGLE(elt[i2], elt[i1], elt[i0]) - -#define PRESERVE_TAG -#include "render_tmp.h" - - -static void TAG(fx_init_fastpath) (struct fx_fast_tab * tab) -{ - GLuint i; - - /* Use the render templates to do clipping. - */ - TAG(render_init) (); - for (i = 0; i < GL_POLYGON + 2; i++) - tab->clip[i] = TAG(render_tab)[i]; - - tab->build_vertices = TAG(fx_setup_full); - tab->project_vertices = TAG(fx_project_vertices); - tab->project_clipped_vertices = TAG(fx_project_clipped_vertices); - -#if 0 && defined(USE_3DNOW_ASM) - if (gl_x86_cpu_features & X86_FEATURE_3DNOW) { - extern void TAG(fx_3dnow_project_vertices) (GLfloat * first, - GLfloat * last, - const GLfloat * mat, - GLuint stride); - - extern void TAG(fx_3dnow_project_clipped_vertices) (GLfloat * first, - GLfloat * last, - const GLfloat * - mat, - GLuint stride, - const GLubyte * - mask); - - tab->project_vertices = TAG(fx_3dnow_project_vertices); - tab->project_clipped_vertices = - TAG(fx_3dnow_project_clipped_vertices); - } -#endif -} - -#undef TYPE -#undef TAG -#undef SIZE Index: xc/lib/GL/mesa/src/drv/tdfx/fxglidew.c diff -u xc/lib/GL/mesa/src/drv/tdfx/fxglidew.c:1.2 xc/lib/GL/mesa/src/drv/tdfx/fxglidew.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxglidew.c:1.2 Fri Dec 8 14:36:23 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxglidew.c Mon Jun 4 12:37:39 2001 @@ -1,407 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxglidew.c,v 1.2 2000/12/08 19:36:23 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -#include -#include -#include "glide.h" -#include "fxdrv.h" -#include "fxglidew.h" - - -grStencilFunc_t grStencilFuncPtr = NULL; -grStencilMask_t grStencilMaskPtr = NULL; -grStencilOp_t grStencilOpPtr = NULL; -grBufferClearExt_t grBufferClearExtPtr = NULL; -grColorMaskExt_t grColorMaskExtPtr = NULL; -txImgQuantize_t txImgQuantizePtr = NULL; -txImgDeQuantize_t txImgDequantizeFXT1Ptr = NULL; -txErrorSetCallback_t txErrorSetCallbackPtr = NULL; -grColorCombineExt_t grColorCombineExtPtr = NULL; -grTexColorCombineExt_t grTexColorCombineExtPtr = NULL; -grAlphaCombineExt_t grAlphaCombineExtPtr = NULL; -grTexAlphaCombineExt_t grTexAlphaCombineExtPtr = NULL; -grAlphaBlendFunctionExt_t grAlphaBlendFunctionExtPtr = NULL; -grConstantColorValueExt_t grConstantColorValueExtPtr = NULL; - - -FxI32 -FX_grGetInteger_NoLock(FxU32 pname) -{ - switch (pname) { - case FX_FOG_TABLE_ENTRIES: - case FX_GLIDE_STATE_SIZE: - case FX_LFB_PIXEL_PIPE: - case FX_PENDING_BUFFERSWAPS: - case FX_TEXTURE_ALIGN: - case GR_STATS_PIXELS_DEPTHFUNC_FAIL: - case GR_STATS_PIXELS_IN: - case GR_STATS_PIXELS_OUT: - { - FxI32 result; - FxU32 grname = pname; - grGet(grname, 4, &result); - return result; - } - case FX_ZDEPTH_MAX: - { - FxI32 zvals[2]; - grGet(GR_ZDEPTH_MIN_MAX, 8, zvals); - return zvals[0]; - } - default: - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "Wrong parameter in FX_grGetInteger!\n"); - } - } - - return 0; -} - - -FxI32 -FX_grGetInteger(fxMesaContext fxMesa, FxU32 pname) -{ - int result; - BEGIN_BOARD_LOCK(fxMesa); - result = FX_grGetInteger_NoLock(pname); - END_BOARD_LOCK(fxMesa); - return result; -} - - -const char * -FX_grGetString(fxMesaContext fxMesa, FxU32 pname) -{ - const char *s; - BEGIN_BOARD_LOCK(fxMesa); - s = grGetString(pname); - END_BOARD_LOCK(fxMesa); - return s; -} - - - -/* Wrapper for grColorMask() and grColorMaskExt(). - */ -void -FX_grColorMask(GLcontext *ctx, GLboolean r, GLboolean g, - GLboolean b, GLboolean a) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - BEGIN_BOARD_LOCK(fxMesa); - if (ctx->Visual->RedBits == 8) { - /* 32bpp mode */ - ASSERT(grColorMaskExtPtr); - (*grColorMaskExtPtr)(r, g, b, a); - } - else { - /* 16 bpp mode */ - /* we never have an alpha buffer */ - grColorMask(r || g || b, GL_FALSE); - } - END_BOARD_LOCK(fxMesa); -} - - -void -FX_grColorMask_NoLock(GLcontext *ctx, GLboolean r, GLboolean g, - GLboolean b, GLboolean a) -{ - if (ctx->Visual->RedBits == 8) { - /* 32bpp mode */ - ASSERT(grColorMaskExtPtr); - (*grColorMaskExtPtr)(r, g, b, a); - } - else { - /* 16 bpp mode */ - /* we never have an alpha buffer */ - grColorMask(r || g || b, GL_FALSE); - } -} - - -/* As above, but pass the mask as an array - */ -void -FX_grColorMaskv(GLcontext *ctx, const GLboolean rgba[4]) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - BEGIN_BOARD_LOCK(fxMesa); - if (ctx->Visual->RedBits == 8) { - /* 32bpp mode */ - ASSERT(grColorMaskExtPtr); - (*grColorMaskExtPtr)(rgba[RCOMP], rgba[GCOMP], - rgba[BCOMP], rgba[ACOMP]); - } - else { - /* 16 bpp mode */ - /* we never have an alpha buffer */ - grColorMask(rgba[RCOMP] || rgba[GCOMP] || rgba[BCOMP], GL_FALSE); - } - END_BOARD_LOCK(fxMesa); -} - -void -FX_grColorMaskv_NoLock(GLcontext *ctx, const GLboolean rgba[4]) -{ - if (ctx->Visual->RedBits == 8) { - /* 32bpp mode */ - ASSERT(grColorMaskExtPtr); - (*grColorMaskExtPtr)(rgba[RCOMP], rgba[GCOMP], - rgba[BCOMP], rgba[ACOMP]); - } - else { - /* 16 bpp mode */ - /* we never have an alpha buffer */ - grColorMask(rgba[RCOMP] || rgba[GCOMP] || rgba[BCOMP], GL_FALSE); - } -} - - - -FxBool -FX_grLfbLock(fxMesaContext fxMesa, GrLock_t type, GrBuffer_t buffer, - GrLfbWriteMode_t writeMode, GrOriginLocation_t origin, - FxBool pixelPipeline, GrLfbInfo_t * info) -{ - FxBool result; - - BEGIN_BOARD_LOCK(fxMesa); - result = grLfbLock(type, buffer, writeMode, origin, pixelPipeline, info); - END_BOARD_LOCK(fxMesa); - return result; -} - -FxU32 -FX_grTexTextureMemRequired(fxMesaContext fxMesa, FxU32 evenOdd, GrTexInfo * info) -{ - FxU32 result; - - BEGIN_BOARD_LOCK(fxMesa); - result = grTexTextureMemRequired(evenOdd, info); - END_BOARD_LOCK(fxMesa); - return result; -} - -FxU32 -FX_grTexMinAddress(fxMesaContext fxMesa, GrChipID_t tmu) -{ - FxU32 result; - - BEGIN_BOARD_LOCK(fxMesa); - result = grTexMinAddress(tmu); - END_BOARD_LOCK(fxMesa); - return result; -} - -extern FxU32 -FX_grTexMaxAddress(fxMesaContext fxMesa, GrChipID_t tmu) -{ - FxU32 result; - - BEGIN_BOARD_LOCK(fxMesa); - result = grTexMaxAddress(tmu); - END_BOARD_LOCK(fxMesa); - return result; -} - - -int -FX_getFogTableSize(fxMesaContext fxMesa) -{ - int result; - BEGIN_BOARD_LOCK(fxMesa); - grGet(GR_FOG_TABLE_ENTRIES, sizeof(int), (void *) &result); - END_BOARD_LOCK(fxMesa); - return result; -} - -int -FX_getGrStateSize(fxMesaContext fxMesa) -{ - int result; - BEGIN_BOARD_LOCK(fxMesa); - grGet(GR_GLIDE_STATE_SIZE, sizeof(int), (void *) &result); - END_BOARD_LOCK(fxMesa); - return result; -} - -void -FX_grAADrawLine(fxMesaContext fxMesa, GrVertex * a, GrVertex * b) -{ - /* ToDo */ - BEGIN_CLIP_LOOP(fxMesa); - grDrawLine(a, b); - END_CLIP_LOOP(fxMesa); -} - -void -FX_grAADrawPoint(fxMesaContext fxMesa, GrVertex * a) -{ - BEGIN_CLIP_LOOP(fxMesa); - grDrawPoint(a); - END_CLIP_LOOP(fxMesa); -} - -void -FX_grDrawPolygonVertexList(fxMesaContext fxMesa, int n, GrVertex * verts) -{ - BEGIN_CLIP_LOOP(fxMesa); - grDrawVertexArrayContiguous(GR_POLYGON, n, verts, sizeof(GrVertex)); - END_CLIP_LOOP(fxMesa); -} - -#if FX_USE_PARGB -void -FX_setupGrVertexLayout(fxMesaContext fxMesa) -{ - BEGIN_BOARD_LOCK(fxMesa); - grReset(GR_VERTEX_PARAMETER); - - grCoordinateSpace(GR_WINDOW_COORDS); - grVertexLayout(GR_PARAM_XY, GR_VERTEX_X_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_PARGB, GR_VERTEX_PARGB_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_Q, GR_VERTEX_OOW_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_Z, GR_VERTEX_OOZ_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_ST0, GR_VERTEX_SOW_TMU0_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_Q0, GR_VERTEX_OOW_TMU0_OFFSET << 2, GR_PARAM_DISABLE); - grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); - grVertexLayout(GR_PARAM_Q1, GR_VERTEX_OOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); - END_BOARD_LOCK(fxMesa); -} -#else /* FX_USE_PARGB */ -void -FX_setupGrVertexLayout(fxMesaContext fxMesa) -{ - BEGIN_BOARD_LOCK(fxMesa); - grReset(GR_VERTEX_PARAMETER); - - grCoordinateSpace(GR_WINDOW_COORDS); - grVertexLayout(GR_PARAM_XY, GR_VERTEX_X_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_RGB, GR_VERTEX_R_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_A, GR_VERTEX_A_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_Q, GR_VERTEX_OOW_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_Z, GR_VERTEX_OOZ_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_ST0, GR_VERTEX_SOW_TMU0_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_Q0, GR_VERTEX_OOW_TMU0_OFFSET << 2, GR_PARAM_DISABLE); - grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); - grVertexLayout(GR_PARAM_Q1, GR_VERTEX_OOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); - END_BOARD_LOCK(fxMesa); -} -#endif /* FX_USE_PARGB */ - -void -FX_grHints_NoLock(GrHint_t hintType, FxU32 hintMask) -{ - switch (hintType) { - case GR_HINT_STWHINT: - { - if (hintMask & GR_STWHINT_W_DIFF_TMU0) - grVertexLayout(GR_PARAM_Q0, GR_VERTEX_OOW_TMU0_OFFSET << 2, - GR_PARAM_ENABLE); - else - grVertexLayout(GR_PARAM_Q0, GR_VERTEX_OOW_TMU0_OFFSET << 2, - GR_PARAM_DISABLE); - - if (hintMask & GR_STWHINT_ST_DIFF_TMU1) - grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, - GR_PARAM_ENABLE); - else - grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, - GR_PARAM_DISABLE); - - if (hintMask & GR_STWHINT_W_DIFF_TMU1) - grVertexLayout(GR_PARAM_Q1, GR_VERTEX_OOW_TMU1_OFFSET << 2, - GR_PARAM_ENABLE); - else - grVertexLayout(GR_PARAM_Q1, GR_VERTEX_OOW_TMU1_OFFSET << 2, - GR_PARAM_DISABLE); - - } - } -} - -void -FX_grHints(fxMesaContext fxMesa, GrHint_t hintType, FxU32 hintMask) -{ - BEGIN_BOARD_LOCK(fxMesa); - FX_grHints_NoLock(hintType, hintMask); - END_BOARD_LOCK(fxMesa); -} - -/* It appears to me that this function is needed either way. */ -FX_GrContext_t -FX_grSstWinOpen(fxMesaContext fxMesa, - FxU32 hWnd, - GrScreenResolution_t screen_resolution, - GrScreenRefresh_t refresh_rate, - GrColorFormat_t color_format, - GrOriginLocation_t origin_location, - int nColBuffers, int nAuxBuffers) -{ - FX_GrContext_t i; - BEGIN_BOARD_LOCK(fxMesa); - i = grSstWinOpen(hWnd, - screen_resolution, - refresh_rate, - color_format, origin_location, nColBuffers, nAuxBuffers); - - /* - fprintf(stderr, - "grSstWinOpen( win %d res %d ref %d fmt %d\n" - " org %d ncol %d naux %d )\n" - " ==> %d\n", - hWnd, - screen_resolution, - refresh_rate, - color_format, - origin_location, - nColBuffers, - nAuxBuffers, - i); - */ - END_BOARD_LOCK(fxMesa); - return i; -} - Index: xc/lib/GL/mesa/src/drv/tdfx/fxglidew.h diff -u xc/lib/GL/mesa/src/drv/tdfx/fxglidew.h:1.3 xc/lib/GL/mesa/src/drv/tdfx/fxglidew.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxglidew.h:1.3 Fri Dec 8 14:36:23 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxglidew.h Mon Jun 4 12:37:39 2001 @@ -1,813 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxglidew.h,v 1.3 2000/12/08 19:36:23 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -#ifndef __FX_GLIDE_WARPER__ -#define __FX_GLIDE_WARPER__ - -#include -#include - -typedef struct tfxMesaContext *fxMesaContext; - - -/* - * These are glide extension definitions. These are not - * defined in glide.h. They should really be defined in - * g3ext.h, but they are not. - */ -#if 0 -FX_ENTRY void FX_CALL -grStencilFunc(GrCmpFnc_t fnc, GrStencil_t ref, GrStencil_t mask); - -FX_ENTRY void FX_CALL grStencilMask(GrStencil_t write_mask); - -FX_ENTRY void FX_CALL -grStencilOp(GrStencilOp_t stencil_fail, - GrStencilOp_t depth_fail, GrStencilOp_t depth_pass); - -FX_ENTRY void FX_CALL -grBufferClearExt(GrColor_t color, - GrAlpha_t alpha, FxU32 depth, GrStencil_t stencil); - -FX_ENTRY void FX_CALL -grColorMaskExt(FxBool r, FxBool g, FxBool b, FxBool a); -#endif - - -typedef void (*grStencilFunc_t) (GrCmpFnc_t fnc, GrStencil_t ref, - GrStencil_t mask); -typedef void (*grStencilMask_t) (GrStencil_t write_mask); -typedef void (*grStencilOp_t) (GrStencilOp_t stencil_fail, - GrStencilOp_t depth_fail, - GrStencilOp_t depth_pass); -typedef void (*grBufferClearExt_t) (GrColor_t color, GrAlpha_t alpha, - FxU32 depth, GrStencil_t stencil); -typedef void (*grColorMaskExt_t) (FxBool r, FxBool g, FxBool b, FxBool a); - -/* - * "COMBINE" extension for Napalm - */ -typedef void (*grColorCombineExt_t)(GrCCUColor_t a, GrCombineMode_t a_mode, - GrCCUColor_t b, GrCombineMode_t b_mode, - GrCCUColor_t c, FxBool c_invert, - GrCCUColor_t d, FxBool d_invert, - FxU32 shift, FxBool invert); -typedef void (*grTexColorCombineExt_t)(FxU32 tmu, - GrTCCUColor_t a, GrCombineMode_t a_mode, - GrCCUColor_t b, GrCombineMode_t b_mode, - GrCCUColor_t c, FxBool c_invert, - GrCCUColor_t d, FxBool d_invert, - FxU32 shift, FxBool invert); -typedef void (*grAlphaCombineExt_t)(GrCCUColor_t a, GrCombineMode_t a_mode, - GrCCUColor_t b, GrCombineMode_t b_mode, - GrCCUColor_t c, FxBool c_invert, - GrCCUColor_t d, FxBool d_invert, - FxU32 shift, FxBool invert); -typedef void (*grTexAlphaCombineExt_t)(FxU32 tmu, - GrTACUColor_t a, GrCombineMode_t a_mode, - GrTACUColor_t b, GrCombineMode_t b_mode, - GrTACUColor_t c, FxBool c_invert, - GrTACUColor_t d, FxBool d_invert, - FxU32 shift, FxBool invert); -typedef void (*grAlphaBlendFunctionExt_t)(GrAlphaBlendFnc_t rgb_sf, - GrAlphaBlendFnc_t rgb_df, - GrAlphaBlendOp_t rgb_op, - GrAlphaBlendFnc_t alpha_sf, - GrAlphaBlendFnc_t alpha_df, - GrAlphaBlendOp_t alpha_op); -typedef void (*grConstantColorValueExt_t)(FxU32 tmu, GrColor_t value); - - - -/* - * These are functions to compress and decompress images. - * The types of the first and second parameters are not exactly - * right. The texus library declares them to be "char *", not - * "void *". However, "void *" is more correct, and more convenient. - */ -typedef void (*txImgQuantize_t) (void *dst, void *src, - int w, int h, - FxU32 format, FxU32 dither); -typedef void (*txImgDeQuantize_t)(void *dst, void *src, - int w, int h); -/* - * These next three declarations should probably be taken from - * texus.h. However, there are duplicate declarations in g3ext.h - * and texus.h which make it hard to include them both. - */ -typedef void (*TxErrorCallbackFnc_t)( const char *string, FxBool fatal ); -typedef void (*txErrorSetCallback_t)(TxErrorCallbackFnc_t fnc, - TxErrorCallbackFnc_t *old_fnc); - -extern grStencilFunc_t grStencilFuncPtr; -extern grStencilMask_t grStencilMaskPtr; -extern grStencilOp_t grStencilOpPtr; -extern grBufferClearExt_t grBufferClearExtPtr; -extern grColorMaskExt_t grColorMaskExtPtr; -extern txImgQuantize_t txImgQuantizePtr; -extern txImgDeQuantize_t txImgDequantizeFXT1Ptr; -extern txErrorSetCallback_t txErrorSetCallbackPtr; -extern grColorCombineExt_t grColorCombineExtPtr; -extern grTexColorCombineExt_t grTexColorCombineExtPtr; -extern grAlphaCombineExt_t grAlphaCombineExtPtr; -extern grTexAlphaCombineExt_t grTexAlphaCombineExtPtr; -extern grAlphaBlendFunctionExt_t grAlphaBlendFunctionExtPtr; -extern grConstantColorValueExt_t grConstantColorValueExtPtr; - - -/* - * General context: - */ -typedef GrContext_t FX_GrContext_t; - -#define FX_FOG_TABLE_ENTRIES GR_FOG_TABLE_ENTRIES -#define FX_GLIDE_STATE_SIZE GR_GLIDE_STATE_SIZE -#define FX_LFB_PIXEL_PIPE GR_LFB_PIXEL_PIPE -#define FX_PENDING_BUFFERSWAPS GR_PENDING_BUFFERSWAPS -#define FX_TEXTURE_ALIGN GR_TEXTURE_ALIGN - -#define FX_ZDEPTH_MAX 0x100 - - -#define GR_ASPECT_1x1 GR_ASPECT_LOG2_1x1 -#define GR_ASPECT_2x1 GR_ASPECT_LOG2_2x1 -#define GR_ASPECT_4x1 GR_ASPECT_LOG2_4x1 -#define GR_ASPECT_8x1 GR_ASPECT_LOG2_8x1 -#define GR_ASPECT_1x2 GR_ASPECT_LOG2_1x2 -#define GR_ASPECT_1x4 GR_ASPECT_LOG2_1x4 -#define GR_ASPECT_1x8 GR_ASPECT_LOG2_1x8 - -#define GR_LOD_256 GR_LOD_LOG2_256 -#define GR_LOD_128 GR_LOD_LOG2_128 -#define GR_LOD_64 GR_LOD_LOG2_64 -#define GR_LOD_32 GR_LOD_LOG2_32 -#define GR_LOD_16 GR_LOD_LOG2_16 -#define GR_LOD_8 GR_LOD_LOG2_8 -#define GR_LOD_4 GR_LOD_LOG2_4 -#define GR_LOD_2 GR_LOD_LOG2_2 -#define GR_LOD_1 GR_LOD_LOG2_1 - -#define GR_FOG_WITH_TABLE GR_FOG_WITH_TABLE_ON_Q - - -typedef FxU32 GrHint_t; -#define GR_HINTTYPE_MIN 0 -#define GR_HINT_STWHINT 0 - -typedef FxU32 GrSTWHint_t; -#define GR_STWHINT_W_DIFF_FBI FXBIT(0) -#define GR_STWHINT_W_DIFF_TMU0 FXBIT(1) -#define GR_STWHINT_ST_DIFF_TMU0 FXBIT(2) -#define GR_STWHINT_W_DIFF_TMU1 FXBIT(3) -#define GR_STWHINT_ST_DIFF_TMU1 FXBIT(4) -#define GR_STWHINT_W_DIFF_TMU2 FXBIT(5) -#define GR_STWHINT_ST_DIFF_TMU2 FXBIT(6) - -#define GR_CONTROL_ACTIVATE 1 -#define GR_CONTROL_DEACTIVATE 0 - -#define GrState void - -/* -** move the vertex layout defintion to application -*/ -typedef struct -{ - GLfloat sow; /* s texture ordinate (s over w) */ - GLfloat tow; /* t texture ordinate (t over w) */ - GLfloat oow; /* 1/w (used mipmapping - really 0xfff/w) */ -} -GrTmuVertex; - - -#if FX_USE_PARGB - -/* standard vertex, packed argb, double texture, 12 dwords */ -typedef struct -{ - GLfloat x, y; /* X and Y in screen space */ - GLfloat ooz; /* 65535/Z (used for Z-buffering) */ - GLfloat oow; /* 1/W (used for W-buffering, texturing) */ - FxU32 argb; /* R, G, B, A [0..255.0] */ - GrTmuVertex tmuvtx[GLIDE_NUM_TMU]; - GLfloat z; /* Z is ignored */ -} -GrVertex_12; - -/* optimised vertex, packed argb, single texture, 8 dwords = 1 cacheline */ -typedef struct -{ - GLfloat x, y; /* X and Y in screen space */ - GLfloat ooz; /* 65535/Z (used for Z-buffering) */ - GLfloat oow; /* 1/W (used for W-buffering, texturing) */ - FxU32 argb; /* R, G, B, A [0..255.0] */ - GrTmuVertex tmuvtx; /* only 1 TMU used to keep vertex size down */ -} -GrVertex_8; - -/* vertex structure, padded to 16 dwords */ -typedef union -{ - GrVertex_8 v_8; - GrVertex_12 v_12; - GLfloat f[16]; - GLuint u[16]; -} -GrVertex_t; - -/* keep the compiler happy for now */ -typedef GrVertex_12 GrVertex; - -/* following offsets work for both vertex layouts */ -#define GR_VERTEX_X_OFFSET 0 -#define GR_VERTEX_Y_OFFSET 1 -#define GR_VERTEX_OOZ_OFFSET 2 -#define GR_VERTEX_OOW_OFFSET 3 -#define GR_VERTEX_PARGB_OFFSET 4 -#define GR_VERTEX_SOW_TMU0_OFFSET 5 -#define GR_VERTEX_TOW_TMU0_OFFSET 6 -#define GR_VERTEX_OOW_TMU0_OFFSET 7 -#define GR_VERTEX_SOW_TMU1_OFFSET 8 -#define GR_VERTEX_TOW_TMU1_OFFSET 9 -#define GR_VERTEX_OOW_TMU1_OFFSET 10 -#define GR_VERTEX_Z_OFFSET 11 - -#if GLIDE_ENDIAN == GLIDE_ENDIAN_BIG -#define GET_PA(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4+3] -#define GET_PR(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4+2] -#define GET_PG(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4+1] -#define GET_PB(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4+0] -#else -#define GET_PA(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4+0] -#define GET_PR(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4+1] -#define GET_PG(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4+2] -#define GET_PB(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4+3] -#endif - -#define GET_PARGB(v) ((FxU32*)(v))[GR_VERTEX_PARGB_OFFSET] -#define PACK_4F_ARGB(dest, a, r, g, b) { \ - const GLuint cr = (int)r; \ - const GLuint cg = (int)g; \ - const GLuint ca = (int)a; \ - const GLuint cb = (int)b; \ - dest = ca << 24 | cr << 16 | cg << 8 | cb; \ - } - -#else /* FX_USE_PARGB */ - -typedef struct -{ - float x, y, z; /* X, Y, and Z of scrn space -- Z is ignored */ - float r, g, b; /* R, G, B, ([0..255.0]) */ - float ooz; /* 65535/Z (used for Z-buffering) */ - float a; /* Alpha [0..255.0] */ - float oow; /* 1/W (used for W-buffering, texturing) */ - GrTmuVertex tmuvtx[GLIDE_NUM_TMU]; -} -GrVertex; - -#define GR_VERTEX_X_OFFSET 0 -#define GR_VERTEX_Y_OFFSET 1 -#define GR_VERTEX_Z_OFFSET 2 -#define GR_VERTEX_R_OFFSET 3 -#define GR_VERTEX_G_OFFSET 4 -#define GR_VERTEX_B_OFFSET 5 -#define GR_VERTEX_OOZ_OFFSET 6 -#define GR_VERTEX_A_OFFSET 7 -#define GR_VERTEX_OOW_OFFSET 8 -#define GR_VERTEX_SOW_TMU0_OFFSET 9 -#define GR_VERTEX_TOW_TMU0_OFFSET 10 -#define GR_VERTEX_OOW_TMU0_OFFSET 11 -#define GR_VERTEX_SOW_TMU1_OFFSET 12 -#define GR_VERTEX_TOW_TMU1_OFFSET 13 -#define GR_VERTEX_OOW_TMU1_OFFSET 14 -#endif /* FX_USE_PARGB */ - - - -extern FxI32 FX_grGetInteger_NoLock(FxU32 pname); - -extern FxI32 FX_grGetInteger(fxMesaContext fxMesa, FxU32 pname); - -extern const char *FX_grGetString(fxMesaContext fxMesa, FxU32 pname); - - -#define FX_grTexDownloadTable(fxMesa, TMU, type, data) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grTexDownloadTable(type,data); \ - END_BOARD_LOCK(fxMesa); \ - } while (0); - -#define FX_grTexDownloadTable_NoLock(TMU, type, data) \ - grTexDownloadTable(type, data) - - -#define FX_grFlush(fxMesa) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grFlush(); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grFinish(fxMesa) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grFinish(); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - - -#define FX_grLfbWriteRegion(fxMesa,dst_buffer,dst_x,dst_y,src_format,src_width,src_height,src_stride,src_data) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grLfbWriteRegion(dst_buffer,dst_x,dst_y,src_format,src_width,src_height,FXFALSE,src_stride,src_data); \ - END_BOARD_LOCK(fxMesa); \ - } while(0) - - -#define FX_grLfbReadRegion(fxMesa,src_buffer,src_x,src_y,src_width,src_height,dst_stride,dst_data) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grLfbReadRegion(src_buffer,src_x,src_y,src_width,src_height,dst_stride,dst_data); \ - END_BOARD_LOCK(fxMesa); \ - } while (0); - - -#define FX_grDrawTriangle_NoLock(a,b,c) grDrawTriangle(a,b,c) -#define FX_grDrawTriangle(fxMesa, a,b,c) \ - do { \ - BEGIN_CLIP_LOOP(fxMesa); \ - FX_grDrawTriangle_NoLock(a,b,c); \ - END_CLIP_LOOP(fxMesa); \ - } while (0) - -/* - * For Lod/LodLog2 conversion. - */ -#define FX_largeLodLog2(info) (info).largeLodLog2 - -#define FX_smallLodLog2(info) (info).smallLodLog2 - -#define FX_aspectRatioLog2(info) (info).aspectRatioLog2 - -#define FX_lodToValue(val) ((int)(GR_LOD_256-val)) - -#define FX_largeLodValue(info) ((int)(GR_LOD_256-(info).largeLodLog2)) -#define FX_largeLodValue_NoLock FX_largeLodValue - -#define FX_smallLodValue(info) ((int)(GR_LOD_256-(info).smallLodLog2)) -#define FX_smallLodValue_NoLock FX_smallLodValue - -#define FX_valueToLod(val) ((GrLOD_t)(GR_LOD_256-val)) - - - -extern void FX_grHints_NoLock(GrHint_t hintType, FxU32 hintMask); -extern void FX_grHints(fxMesaContext fxMesa, GrHint_t hintType, FxU32 hintMask); - - -extern void FX_grAADrawLine(fxMesaContext fxMesa, GrVertex * a, GrVertex * b); - -extern void FX_grAADrawPoint(fxMesaContext fxMesa, GrVertex * a); - - -extern void FX_setupGrVertexLayout(fxMesaContext fxMesa); - - -extern FX_GrContext_t FX_grSstWinOpen(fxMesaContext fxMesa, - FxU32 hWnd, - GrScreenResolution_t screen_resolution, - GrScreenRefresh_t refresh_rate, - GrColorFormat_t color_format, - GrOriginLocation_t origin_location, - int nColBuffers, int nAuxBuffers); - - -#define FX_grDrawLine_NoLock(v1, v2) grDrawLine(v1, v2) -#define FX_grDrawLine(fxMesa, v1, v2) \ - do { \ - BEGIN_CLIP_LOOP(fxMesa); \ - FX_grDrawLine_NoLock(v1, v2); \ - END_CLIP_LOOP(fxMesa); \ - } while (0) - -#define FX_grDrawPoint_NoLock(p) grDrawPoint(p) -#define FX_grDrawPoint(fxMesa, p) \ - do { \ - BEGIN_CLIP_LOOP(fxMesa); \ - FX_grDrawPoint_NoLock(p); \ - END_CLIP_LOOP(fxMesa); \ - } while (0) - -extern void FX_grDrawPolygonVertexList(fxMesaContext fxMesa, - int n, GrVertex * v); - -#define FX_grDitherMode(fxMesa, m) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grDitherMode(m); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grRenderBuffer(fxMesa, b) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grRenderBuffer(b); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grRenderBuffer_NoLock(b) grRenderBuffer(b) - -#define FX_grBufferClear(fxMesa, c, a, d) \ - do { \ - BEGIN_CLIP_LOOP(fxMesa); \ - grBufferClear(c, a, d); \ - END_CLIP_LOOP(fxMesa); \ - } while (0) - -#define FX_grBufferClearExt_NoLock(c, a, d, s) (*grBufferClearExtPtr)(c, a, d, s) - -#define FX_grBufferClearExt(fxMesa, c, a, d, s) \ - do { \ - BEGIN_CLIP_LOOP(fxMesa); \ - (*grBufferClearExtPtr)(c, a, d, s); \ - END_CLIP_LOOP(fxMesa); \ - } while (0) - -#define FX_grBufferClear_NoLock(c, a, d) grBufferClear(c, a, d) - - -#define FX_grEnable(fxMesa, m) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grEnable(m); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grEnable_NoLock(m) grEnable(m) - -#define FX_grDisable(fxMesa, m) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grDisable(m); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grDisable_NoLock(m) grDisable(m) - - -#define FX_grStencilFunc(fxMesa, fnc, ref, mask) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - (*grStencilFuncPtr)((fnc), (ref), (mask)); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grStencilFunc_NoLock(f, r, m) (*grStencilFuncPtr)(f, r, m) - -#define FX_grStencilMask(fxMesa, write_mask) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - (*grStencilMaskPtr)(write_mask); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grStencilMask_NoLock(m) (*grStencilMaskPtr)(m) - -#define FX_grStencilOp(fxMesa, stencil_fail, depth_fail, depth_pass) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - (*grStencilOpPtr)((stencil_fail), (depth_fail), (depth_pass)); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grStencilOp_NoLock(sf, df, dp) (*grStencilOpPtr)(sf, df, dp) - -#define FX_grDepthMask(fxMesa, m) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grDepthMask(m); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grDepthMask_NoLock(m) grDepthMask(m) - - -extern void FX_grColorMask(GLcontext *ctx, GLboolean r, GLboolean g, - GLboolean b, GLboolean a); - -extern void FX_grColorMask_NoLock(GLcontext *ctx, GLboolean r, GLboolean g, - GLboolean b, GLboolean a); - -extern void FX_grColorMaskv(GLcontext *ctx, const GLboolean rgba[4]); - -extern void FX_grColorMaskv_NoLock(GLcontext *ctx, const GLboolean rgba[4]); - - -extern FxBool FX_grLfbLock(fxMesaContext fxMesa, - GrLock_t type, GrBuffer_t buffer, - GrLfbWriteMode_t writeMode, - GrOriginLocation_t origin, FxBool pixelPipeline, - GrLfbInfo_t * info); - -#define FX_grLfbUnlock(fxMesa, t, b) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grLfbUnlock(t, b); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grConstantColorValue(fxMesa, v) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grConstantColorValue(v); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grConstantColorValue_NoLock grConstantColorValue - -#define FX_grAADrawTriangle(fxMesa, a, b, c, ab, bc, ca) \ - do { \ - BEGIN_CLIP_LOOP(fxMesa); \ - grAADrawTriangle(a, b, c, ab, bc, ca); \ - END_CLIP_LOOP(fxMesa); \ - } while (0) - -#define FX_grAlphaBlendFunction(rs, rd, as, ad) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grAlphaBlendFunction(rs, rd, as, ad); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grAlphaCombine(func, fact, loc, oth, inv) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grAlphaCombine(func, fact, loc, oth, inv); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grAlphaCombine_NoLock grAlphaCombine - -#define FX_grAlphaTestFunction(fxMesa, f) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grAlphaTestFunction(f); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grAlphaTestReferenceValue(fxMesa, v) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grAlphaTestReferenceValue(v); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grClipWindow(fxMesa, minx, miny, maxx, maxy) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grClipWindow(minx, miny, maxx, maxy); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grClipWindow_NoLock grClipWindow - -#define FX_grColorCombine(fxMesa, func, fact, loc, oth, inv) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grColorCombine(func, fact, loc, oth, inv); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grColorCombine_NoLock grColorCombine - -#define FX_grCullMode(fxMesa, m) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grCullMode(m); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grDepthBiasLevel(fxMesa, lev) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grDepthBiasLevel(lev); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grDepthBufferFunction(fxMesa, func) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grDepthBufferFunction(func); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grFogColorValue(fxMesa, c) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grFogColorValue(c); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grFogMode(fxMesa, m) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grFogMode(m); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grFogTable(fxMesa, t)\ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grFogTable(t); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grTexClampMode(fxMesa, t, sc, tc) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grTexClampMode(t, sc, tc); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grTexClampMode_NoLock grTexClampMode - -#define FX_grTexCombine(fxMesa, t, rfunc, rfact, afunc, afact, rinv, ainv) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grTexCombine(t, rfunc, rfact, afunc, afact, rinv, ainv); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grTexCombine_NoLock grTexCombine - -#define FX_grTexDownloadMipMapLevel(fxMesa, t, sa, tlod, llod, ar, f, eo, d) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grTexDownloadMipMapLevel(t, sa, tlod, llod, ar, f, eo, d); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grTexDownloadMipMapLevel_NoLock grTexDownloadMipMapLevel - -#define FX_grTexDownloadMipMapLevelPartial(fxMesa, t, sa, tlod, llod, ar, f, eo, d, s, e); \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grTexDownloadMipMapLevelPartial(t, sa, tlod, llod, ar, f, eo, d, s, e); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grTexFilterMode(fxMesa, t, minf, magf) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grTexFilterMode(t, minf, magf); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grTexFilterMode_NoLock grTexFilterMode - -extern FxU32 FX_grTexMinAddress(fxMesaContext fxMesa, GrChipID_t tmu); -extern FxU32 FX_grTexMaxAddress(fxMesaContext fxMesa, GrChipID_t tmu); - -#define FX_grTexMipMapMode(t, m, lod) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grTexMipMapMode(t, m, lod); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grTexMipMapMode_NoLock grTexMipMapMode - -#define FX_grTexSource(t, sa, eo, i) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grTexSource(t, sa, eo, i); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grTexSource_NoLock grTexSource - -extern FxU32 FX_grTexTextureMemRequired(fxMesaContext fxMesa, - FxU32 evenOdd, GrTexInfo * info); - -#define FX_grTexTextureMemRequired_NoLock grTexTextureMemRequired - -#define FX_grGlideGetState(fxMesa, s) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grGlideGetState(s); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) -#define FX_grGlideGetState_NoLock(s) grGlideGetState(s); - -#define FX_grDRIBufferSwap(fxMesa, i) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grDRIBufferSwap(i); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grSstSelect(fxMesa, b) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grSstSelect(b); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grSstSelect_NoLock grSstSelect - -#define FX_grGlideSetState(fxMesa, s) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grGlideSetState(s); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) -#define FX_grGlideSetState_NoLock(s) grGlideSetState(s); - -#define FX_grDepthBufferMode(fxMesa, m) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grDepthBufferMode(m); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grLfbWriteColorFormat(fxMesa, f) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grLfbWriteColorFormat(f); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grDrawVertexArray(fxMesa, m, c, p) \ - do { \ - BEGIN_CLIP_LOOP(fxMesa); \ - grDrawVertexArray(m, c, p); \ - END_CLIP_LOOP(fxMesa); \ - } while (0) - -#define FX_grGlideShutdown(fxMesa) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grGlideShutdown(); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grTexLodBiasValue_NoLock(t, v) grTexLodBiasValue(t, v) - -#define FX_grTexLodBiasValue(t, v) \ - do { \ - BEGIN_BOARD_LOCK(fxMesa); \ - grTexLodBiasValue(t, v); \ - END_BOARD_LOCK(fxMesa); \ - } while (0) - -#define FX_grGlideInit_NoLock grGlideInit -#define FX_grSstWinOpen_NoLock grSstWinOpen - -extern int FX_getFogTableSize(fxMesaContext fxMesa); - -extern int FX_getGrStateSize(fxMesaContext fxMesa); - -#endif /* __FX_GLIDE_WARPER__ */ Index: xc/lib/GL/mesa/src/drv/tdfx/fxpipeline.c diff -u xc/lib/GL/mesa/src/drv/tdfx/fxpipeline.c:1.1 xc/lib/GL/mesa/src/drv/tdfx/fxpipeline.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxpipeline.c:1.1 Sun Sep 24 09:51:16 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxpipeline.c Mon Jun 4 12:37:39 2001 @@ -1,293 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxpipeline.c,v 1.1 2000/09/24 13:51:16 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -#include "fxdrv.h" -#include "fxcva.h" -#include "fxpipeline.h" -#include "vbindirect.h" - - -/* We don't handle texcoord-4 in the safe clip routines - maybe we should. - */ -static void -fxDDRenderElements(struct vertex_buffer *VB) -{ - GLcontext *ctx = VB->ctx; - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - - if (fxMesa->render_index != 0 || - ((ctx->Texture.ReallyEnabled & 0xf) && VB->TexCoordPtr[0]->size > 2) - || ((ctx->Texture.ReallyEnabled & 0xf0) - && VB->TexCoordPtr[1]->size > 2) || (VB->ClipPtr->size != 4)) /* Brokes clipping otherwise */ - gl_render_elts(VB); - else - fxDDRenderElementsDirect(VB); -} - -static void -fxDDCheckRenderVBIndirect(GLcontext * ctx, struct gl_pipeline_stage *d) -{ - d->type = 0; - - if ((ctx->IndirectTriangles & DD_SW_SETUP) == 0 && - ctx->Driver.MultipassFunc == 0) { - d->type = PIPE_IMMEDIATE; - d->inputs = VERT_SETUP_FULL | VERT_ELT | VERT_PRECALC_DATA; - } -} - -static void -fxDDRenderVBIndirect(struct vertex_buffer *VB) -{ - GLcontext *ctx = VB->ctx; - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - struct vertex_buffer *cvaVB = ctx->CVA.VB; - - if (fxMesa->render_index != 0 || ((ctx->Texture.ReallyEnabled & 0xf) - && cvaVB->TexCoordPtr[0]->size > 2) - || ((ctx->Texture.ReallyEnabled & 0xf0) - && cvaVB->TexCoordPtr[1]->size > 2) || (VB->ClipPtr->size != 4)) /* Brokes clipping otherwise */ - gl_render_vb_indirect(VB); - else - fxDDRenderVBIndirectDirect(VB); -} - - -static void -fxDDRenderVB(struct vertex_buffer *VB) -{ - GLcontext *ctx = VB->ctx; - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - - if ((fxMesa->render_index != 0) || - ((ctx->Texture.ReallyEnabled & 0xf) && VB->TexCoordPtr[0]->size > 2) - || ((ctx->Texture.ReallyEnabled & 0xf0) - && VB->TexCoordPtr[1]->size > 2)) - gl_render_vb(VB); - else - fxDDDoRenderVB(VB); -} - - - - -/* This sort of driver-based reconfiguration of the pipeline could be - * used to support accelerated transformation and lighting on capable - * hardware. - * - */ -GLuint -fxDDRegisterPipelineStages(struct gl_pipeline_stage *out, - const struct gl_pipeline_stage *in, GLuint nr) -{ - GLuint i, o; - - for (i = o = 0; i < nr; i++) { - switch (in[i].ops) { - case PIPE_OP_RAST_SETUP_1 | PIPE_OP_RENDER: - out[o] = in[i]; - out[o].state_change = NEW_CLIENT_STATE; - out[o].check = fxDDCheckMergeAndRender; - out[o].run = fxDDMergeAndRender; - o++; - break; - case PIPE_OP_RAST_SETUP_0: - out[o] = in[i]; - out[o].cva_state_change = - NEW_LIGHTING | NEW_TEXTURING | NEW_RASTER_OPS; - out[o].state_change = ~0; - out[o].check = fxDDCheckPartialRasterSetup; - out[o].run = fxDDPartialRasterSetup; - o++; - break; - case PIPE_OP_RAST_SETUP_0 | PIPE_OP_RAST_SETUP_1: - out[o] = in[i]; - out[o].run = fxDDDoRasterSetup; - o++; - break; - case PIPE_OP_RENDER: - out[o] = in[i]; - if (in[i].run == gl_render_elts) { - out[o].run = fxDDRenderElements; - } - else if (in[i].run == gl_render_vb_indirect) { - out[o].check = fxDDCheckRenderVBIndirect; - out[o].run = fxDDRenderVBIndirect; - } - else if (in[i].run == gl_render_vb) { - out[o].run = fxDDRenderVB; - } - - o++; - break; - default: - out[o++] = in[i]; - break; - } - } - - return o; -} - -#define ILLEGAL_ENABLES (TEXTURE0_3D| \ - TEXTURE1_3D| \ - ENABLE_TEXMAT0 | \ - ENABLE_TEXMAT1 | \ - ENABLE_TEXGEN0 | \ - ENABLE_TEXGEN1 | \ - ENABLE_USERCLIP | \ - ENABLE_LIGHT | \ - ENABLE_FOG) - - - -/* Because this is slotted in by the OptimizePipeline function, most - * of the information here is just for gl_print_pipeline(). Only the - * run member is required. - */ -static struct gl_pipeline_stage fx_fast_stage = { - "FX combined vertex transform, setup and rasterization stage", - PIPE_OP_VERT_XFORM | PIPE_OP_RAST_SETUP_0 | PIPE_OP_RAST_SETUP_1 | - PIPE_OP_RENDER, - PIPE_PRECALC, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, /* never called */ - fxDDFastPath -}; - - - - -/* Better than optimizing the pipeline, we can do the whole build very - * quickly with the aid of a new flags member. - */ -GLboolean -fxDDBuildPrecalcPipeline(GLcontext * ctx) -{ - struct gl_pipeline *pipe = &ctx->CVA.pre; - fxMesaContext fxMesa = FX_CONTEXT(ctx); - - - if (fxMesa->is_in_hardware && - fxMesa->render_index == 0 && - (ctx->Enabled & ILLEGAL_ENABLES) == 0 && - (ctx->Array.Flags & (VERT_OBJ_234 | - VERT_TEX0_4 | - VERT_TEX1_4 | - VERT_ELT)) == (VERT_OBJ_23 | VERT_ELT)) { - if (MESA_VERBOSE & (VERBOSE_STATE | VERBOSE_DRIVER)) - if (!fxMesa->using_fast_path) - fprintf(stderr, "fxMesa: using fast path\n"); - - pipe->stages[0] = &fx_fast_stage; - pipe->stages[1] = 0; - pipe->new_inputs = ctx->RenderFlags & VERT_DATA; - pipe->ops = pipe->stages[0]->ops; - fxMesa->using_fast_path = 1; - return 1; - } - - if (fxMesa->using_fast_path) { - if (MESA_VERBOSE & (VERBOSE_STATE | VERBOSE_DRIVER)) - fprintf(stderr, - "fxMesa: fall back to full pipeline %x %x %x %x %x\n", - fxMesa->is_in_hardware, fxMesa->render_index, - (ctx->Enabled & ILLEGAL_ENABLES), - (ctx->Array.Summary & (VERT_OBJ_23)), - (ctx->Array.Summary & (VERT_OBJ_4 | VERT_TEX0_4 | - VERT_TEX1_4))); - - fxMesa->using_fast_path = 0; - ctx->CVA.VB->ClipOrMask = 0; - ctx->CVA.VB->ClipAndMask = CLIP_ALL_BITS; - ctx->Array.NewArrayState |= ctx->Array.Summary; - return 0; - } - - return 0; -} - - - - - - -/* Perform global optimizations to the pipeline. The fx driver - * implements a single such fast path, which corresponds to the standard - * quake3 cva pipeline. - * - * This is now handled by the 'build' function above. - */ -void -fxDDOptimizePrecalcPipeline(GLcontext * ctx, struct gl_pipeline *pipe) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - - if (fxMesa->is_in_hardware && - fxMesa->render_index == 0 && - (ctx->Enabled & ILLEGAL_ENABLES) == 0 && - (ctx->Array.Summary & VERT_ELT)) { - pipe->stages[0] = &fx_fast_stage; - pipe->stages[1] = 0; - } -} - - - -/* unused? -void -fxDDOptimizeEltPipeline( GLcontext *ctx, struct gl_pipeline *pipe ) -{ - (void) ctx; - (void) pipe; -} -*/ - Index: xc/lib/GL/mesa/src/drv/tdfx/fxpipeline.h diff -u xc/lib/GL/mesa/src/drv/tdfx/fxpipeline.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/fxpipeline.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxpipeline.h:1.1 Sun Sep 24 09:51:16 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxpipeline.h Mon Jun 4 12:37:39 2001 @@ -1,16 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxpipeline.h,v 1.1 2000/09/24 13:51:16 alanh Exp $ */ -#ifndef FXPIPELINE_H -#define FXPIPELINE_H - - -extern GLuint fxDDRegisterPipelineStages(struct gl_pipeline_stage *out, - const struct gl_pipeline_stage *in, - GLuint nr); - -extern GLboolean fxDDBuildPrecalcPipeline(GLcontext * ctx); - -extern void fxDDOptimizePrecalcPipeline(GLcontext * ctx, - struct gl_pipeline *pipe); - - -#endif Index: xc/lib/GL/mesa/src/drv/tdfx/fxrender.c diff -u xc/lib/GL/mesa/src/drv/tdfx/fxrender.c:1.2 xc/lib/GL/mesa/src/drv/tdfx/fxrender.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxrender.c:1.2 Mon Nov 13 18:31:32 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxrender.c Mon Jun 4 12:37:39 2001 @@ -1,780 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxrender.c,v 1.2 2000/11/13 23:31:32 dawes Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -/* fxrender.c - 3Dfx VooDoo RenderVB driver function support */ - -#include "fxdrv.h" -#include "vbcull.h" -#include "fxsetup.h" - - - -/* - * Render a line segment from VB[v1] to VB[v2] when either one or both - * endpoints must be clipped. - */ -#if !defined(__MWERKS__) -INLINE -#endif - void -fxRenderClippedLine(struct vertex_buffer *VB, GLuint v1, GLuint v2) -{ - fxMesaContext fxMesa = FX_CONTEXT(VB->ctx); - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; - GLubyte mask = VB->ClipMask[v1] | VB->ClipMask[v2]; - - if (!mask || (VB->ctx->line_clip_tab[VB->ClipPtr->size]) (VB, &v1, &v2, - mask)) - FX_grDrawLine(fxMesa, (GrVertex *) gWin[v1].f, (GrVertex *) gWin[v2].f); -} - - - - -/* This is legal for Quads as well as triangles, hence the 'n' parameter. - */ -INLINE void -fxRenderClippedTriangle(struct vertex_buffer *VB, GLuint n, GLuint vlist[]) -{ - fxMesaContext fxMesa = FX_CONTEXT(VB->ctx); - GLubyte mask = 0; - GLuint i; - - for (i = 0; i < n; i++) - mask |= VB->ClipMask[vlist[i]]; - - if (mask & CLIP_USER_BIT) { - GLubyte *userclipmask = VB->UserClipMask; - if (userclipmask[vlist[0]] & userclipmask[vlist[1]] & - userclipmask[vlist[2]]) - return; - } - - n = (VB->ctx->poly_clip_tab[VB->ClipPtr->size]) (VB, n, vlist, mask); - if (n >= 3) { - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; - GrVertex *i0 = (GrVertex *) gWin[vlist[0]].f; - GrVertex *i1 = (GrVertex *) gWin[vlist[1]].f; - GrVertex *i2 = (GrVertex *) gWin[vlist[2]].f; - GLuint i; - - for (i = 2; i < n; i++, i1 = i2, i2 = (GrVertex *) gWin[vlist[i]].f) { - FX_grDrawTriangle(fxMesa, i0, i1, i2); - } - } -} - - - - - -static INLINE void -fxSafeClippedLine(struct vertex_buffer *VB, GLuint v1, GLuint v2) -{ - GLubyte mask = VB->ClipMask[v1] | VB->ClipMask[v2]; - fxMesaContext fxMesa = FX_CONTEXT(VB->ctx); - - if (!mask) { - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; - FX_grDrawLine(fxMesa, (GrVertex *) gWin[v1].f, (GrVertex *) gWin[v2].f); - } - else { - fxMesaContext fxMesa = (fxMesaContext) VB->ctx->DriverCtx; - fxLineClipTab[fxMesa->setupindex & 0x7] (VB, v1, v2, mask); - } -} - - -static INLINE void -fxSafeClippedTriangle(struct vertex_buffer *VB, - fxVertex * gWin, - tfxTriClipFunc cliptri, GLuint v2, GLuint v1, GLuint v) -{ - GLubyte *clipmask = VB->ClipMask; - GLubyte mask = clipmask[v2] | clipmask[v1] | clipmask[v]; - fxMesaContext fxMesa = FX_CONTEXT(VB->ctx); - - if (!mask) { - FX_grDrawTriangle(fxMesa, (GrVertex *) gWin[v2].f, - (GrVertex *) gWin[v1].f, (GrVertex *) gWin[v].f); - return; - } - - if (!(clipmask[v2] & clipmask[v1] & clipmask[v] & CLIP_ALL_BITS)) { - GLuint vl[3]; - GLuint imask = mask; - - if (imask & CLIP_USER_BIT) { - GLubyte *userclipmask = VB->UserClipMask; - if (userclipmask[v2] & userclipmask[v1] & userclipmask[v]) - return; - imask |= - (userclipmask[v2] | userclipmask[v1] | userclipmask[v]) << 8; - } - - ASSIGN_3V(vl, v2, v1, v); - cliptri(VB, vl, imask); - } -} - - -static INLINE void -fxSafeClippedTriangle2(struct vertex_buffer *VB, - fxVertex * gWin, - tfxTriViewClipFunc cliptri, - GLuint v2, GLuint v1, GLuint v) -{ - fxMesaContext fxMesa = FX_CONTEXT(VB->ctx); - GLubyte *clipmask = VB->ClipMask; - GLubyte mask = clipmask[v2] | clipmask[v1] | clipmask[v]; - - if (!mask) { - FX_grDrawTriangle(fxMesa, - (GrVertex *) gWin[v2].f, (GrVertex *) gWin[v1].f, - (GrVertex *) gWin[v].f); - } - else if (!(clipmask[v2] & clipmask[v1] & clipmask[v])) { - GLuint vl[3]; - ASSIGN_3V(vl, v2, v1, v); - cliptri(VB, vl, mask); - } -} - - -static INLINE void -fxSafeClippedTriangle3(struct vertex_buffer *VB, - fxVertex * gWin, - tfxTriClipFunc cliptri, GLuint v2, GLuint v1, GLuint v) -{ - GLubyte *clipmask = VB->ClipMask; - GLubyte mask = clipmask[v2] | clipmask[v1] | clipmask[v]; - GLuint imask = mask; - - if (imask & CLIP_USER_BIT) { - GLubyte *userclipmask = VB->UserClipMask; - if (userclipmask[v2] & userclipmask[v1] & userclipmask[v]) - return; - imask |= (userclipmask[v2] | userclipmask[v1] | userclipmask[v]) << 8; - } - - { - GLuint vl[3]; - ASSIGN_3V(vl, v2, v1, v); - cliptri(VB, vl, imask); - } -} - - - - - -/************************************************************************/ -/************************ RenderVB functions ****************************/ -/************************************************************************/ - - -/* Render front-facing, non-clipped primitives. - */ - -#define RENDER_POINTS( start, count ) \ - (void) gWin; \ - (void) VB; \ - (VB->ctx->Driver.PointsFunc)( VB->ctx, start, count ) - -#define RENDER_LINE( i1, i ) \ - do { \ - RVB_COLOR(i); \ - FX_grDrawLine(fxMesa, (GrVertex *)gWin[i1].f, \ - (GrVertex *)gWin[i].f); \ - } while (0) - -#define RENDER_TRI( i2, i1, i, pv, parity ) \ - do { \ - RVB_COLOR(pv); \ - if (parity) { \ - FX_grDrawTriangle(fxMesa, (GrVertex *)gWin[i1].f, \ - (GrVertex *)gWin[i2].f, \ - (GrVertex *)gWin[i].f); \ - } else { \ - FX_grDrawTriangle(fxMesa, (GrVertex *)gWin[i2].f, \ - (GrVertex *)gWin[i1].f, \ - (GrVertex *)gWin[i].f); \ - } \ - } while (0) - -#define RENDER_QUAD( i3, i2, i1, i, pv ) \ - do { \ - RVB_COLOR(pv); \ - FX_grDrawTriangle(fxMesa, (GrVertex *)gWin[i3].f, \ - (GrVertex *)gWin[i2].f, \ - (GrVertex *)gWin[i].f); \ - FX_grDrawTriangle(fxMesa, (GrVertex *)gWin[i2].f, \ - (GrVertex *)gWin[i1].f, \ - (GrVertex *)gWin[i].f); \ - } while (0) - - - -#define LOCAL_VARS \ - fxMesaContext fxMesa=(fxMesaContext)VB->ctx->DriverCtx; \ - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; \ - (void) fxMesa; - -#define INIT(x) - -#define TAG(x) x##_fx_flat_raw -#undef RVB_COLOR -#define RVB_COLOR(pv) FX_VB_COLOR(fxMesa, VB->ColorPtr->data[pv]) -#define PRESERVE_VB_DEFS - -#include "render_tmp.h" - -#define TAG(x) x##_fx_smooth_raw -#undef RVB_COLOR -#define RVB_COLOR(x) - -#include "render_tmp.h" - - - -/* Render with clipped and/or culled primitives with cullmask information. - */ -#define RENDER_POINTS( start, count ) \ - (void) gWin; \ - (void) cullmask; \ - (VB->ctx->Driver.PointsFunc)( VB->ctx, start, count ) - - -#define RENDER_LINE( i1, i ) \ - do { \ - const GLubyte flags = cullmask[i]; \ - \ - if (!(flags & PRIM_NOT_CULLED)) \ - continue; \ - \ - RVB_COLOR(i); \ - if (flags & PRIM_ANY_CLIP) \ - fxRenderClippedLine( VB, i1, i ); \ - else \ - FX_grDrawLine( fxMesa, (GrVertex *)gWin[i1].f, (GrVertex *)gWin[i].f ); \ - } while (0) - - -#define RENDER_TRI( i2, i1, i, pv, parity) \ - do { \ - const GLubyte flags = cullmask[i]; \ - GLuint e2,e1; \ - \ - if (!(flags & PRIM_NOT_CULLED)) \ - continue; \ - \ - e2=i2, e1=i1; \ - if (parity) { e2=i1; e1=i2; } \ - \ - RVB_COLOR(pv); \ - if (flags & PRIM_ANY_CLIP) { \ - fxSafeClippedTriangle3(VB,gWin,cliptri,e2,e1,i); \ - } else { \ - FX_grDrawTriangle(fxMesa, (GrVertex *)gWin[e2].f, \ - (GrVertex *)gWin[e1].f, \ - (GrVertex *)gWin[i].f); \ - } \ - } while (0) - - -#define RENDER_QUAD(i3, i2, i1, i, pv) \ - do { \ - const GLubyte flags = cullmask[i]; \ - \ - if (!(flags & PRIM_NOT_CULLED)) \ - continue; \ - \ - RVB_COLOR(pv); \ - if (flags&PRIM_ANY_CLIP) { \ - fxSafeClippedTriangle3(VB,gWin,cliptri,i3,i2,i); \ - fxSafeClippedTriangle3(VB,gWin,cliptri,i2,i1,i); \ - } else { \ - FX_grDrawTriangle(fxMesa, (GrVertex *)gWin[i3].f, \ - (GrVertex *)gWin[i2].f, \ - (GrVertex *)gWin[i].f); \ - FX_grDrawTriangle(fxMesa, (GrVertex *)gWin[i2].f, \ - (GrVertex *)gWin[i1].f, \ - (GrVertex *)gWin[i].f); \ - } \ - } while (0) - - - - - -#define LOCAL_VARS \ - fxMesaContext fxMesa=(fxMesaContext)VB->ctx->DriverCtx; \ - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; \ - const GLubyte *cullmask = VB->CullMask; \ - tfxTriClipFunc cliptri = fxMesa->clip_tri_stride; - - - - -#define INIT(x) (void) cliptri; (void) fxMesa; - -#define TAG(x) x##_fx_smooth_culled -#undef RVB_COLOR -#define RVB_COLOR(x) -#define PRESERVE_VB_DEFS -#include "render_tmp.h" - -#define TAG(x) x##_fx_flat_culled -#undef RVB_COLOR -#define RVB_COLOR(pv) FX_VB_COLOR(fxMesa, VB->ColorPtr->data[pv]) - -#include "render_tmp.h" - - - - -/* Direct, with the possibility of clipping. - */ -#define RENDER_POINTS( start, count ) \ - do { \ - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; \ - GLubyte *clipmask = VB->ClipMask; \ - GLuint i; \ - for (i = start ; i < count ; i++) \ - if (clipmask[i] == 0) { \ - RVB_COLOR(i); \ - FX_grDrawPoint( fxMesa, (GrVertex *)gWin[i].f );\ - } \ - } while (0) - -#define RENDER_LINE( i1, i ) \ - do { \ - RVB_COLOR(i); \ - fxSafeClippedLine( VB, i1, i ); \ - } while (0) - -#define RENDER_TRI( i2, i1, i, pv, parity) \ - do { \ - GLuint e2=i2, e1=i1; \ - if (parity) { GLuint t=e2; e2=e1; e1=t; } \ - RVB_COLOR(pv); \ - fxSafeClippedTriangle(VB,gWin,cliptri,e2,e1,i); \ - } while (0) - -#define RENDER_QUAD( i3, i2, i1, i, pv) \ - do { \ - RVB_COLOR(pv); \ - fxSafeClippedTriangle(VB,gWin,cliptri,i3,i2,i); \ - fxSafeClippedTriangle(VB,gWin,cliptri,i2,i1,i); \ - } while (0) - -#define LOCAL_VARS \ - fxMesaContext fxMesa=(fxMesaContext)VB->ctx->DriverCtx; \ - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; \ - tfxTriClipFunc cliptri = fxMesa->clip_tri_stride; - -#define INIT(x) (void) cliptri; (void) gWin; - -#define TAG(x) x##_fx_smooth_clipped -#undef RVB_COLOR -#define RVB_COLOR(x) -#define PRESERVE_VB_DEFS -#include "render_tmp.h" - - -#define TAG(x) x##_fx_flat_clipped -#undef RVB_COLOR -#define RVB_COLOR(pv) FX_VB_COLOR(fxMesa, VB->ColorPtr->data[pv]) -#include "render_tmp.h" - - - - - - -/* Indirect, with the possibility of clipping. - */ -#define RENDER_POINTS( start, count ) \ - do { \ - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; \ - GLuint e; \ - GLubyte *clipmask = VB->ClipMask; \ - for(e=start;eEltPtr->data; \ - fxMesaContext fxMesa = (fxMesaContext)VB->ctx->DriverCtx; \ - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; \ - tfxTriClipFunc cliptri = fxMesa->clip_tri_stride; - -#define INIT(x) (void) cliptri; (void) gWin; - -#define TAG(x) x##_fx_smooth_indirect_clipped -#undef RVB_COLOR -#define RVB_COLOR(x) -#include "render_tmp.h" - - -/* Indirect, clipped, but no user clip. - */ -#define RENDER_POINTS( start, count ) \ - do { \ - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; \ - GLuint e; \ - GLubyte *clipmask = VB->ClipMask; \ - for(e=start;eEltPtr->data; \ - fxMesaContext fxMesa = (fxMesaContext)VB->ctx->DriverCtx; \ - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; \ - tfxTriViewClipFunc cliptri = fxMesa->view_clip_tri; - -#define INIT(x) (void) cliptri; (void) gWin; - -#define TAG(x) x##_fx_smooth_indirect_view_clipped -#undef RVB_COLOR -#define RVB_COLOR(x) -#include "render_tmp.h" - - - - - - - -/* Indirect, and no clipping required. - */ -#define RENDER_POINTS( start, count ) \ - do { \ - GLuint e; \ - for(e=start;everts; \ - const GLuint *elt = VB->EltPtr->data; \ - fxMesaContext fxMesa = FX_CONTEXT(VB->ctx); - -#define INIT(x) BEGIN_CLIP_LOOP(fxMesa); -#define POSTFIX END_CLIP_LOOP(fxMesa); - -#define TAG(x) x##_fx_smooth_indirect -#undef RVB_COLOR -#define RVB_COLOR(x) -#include "render_tmp.h" - - - - - -/* Direct in this context means that triangles, lines, points can be - * rendered simply by calling grDrawTriangle, etc., without any - * additional setup (such as calling grConstantColor). We also use a - * 'safe' set of clipping routines which don't require write-access to - * the arrays in the vertex buffer, and don't care about array - * stride. - * - * Thus there is no call to gl_import_arrays() in this function. - * - * This safe clipping should be generalized to call driver->trianglefunc - * under the appropriate conditions. - * - * We don't handle texcoord-4 in the safe clip routines - maybe we should. - * - */ -void -fxDDRenderElementsDirect(struct vertex_buffer *VB) -{ - GLcontext *ctx = VB->ctx; - struct vertex_buffer *saved_vb = ctx->VB; - GLenum prim = ctx->CVA.elt_mode; - GLuint nr = VB->EltPtr->count; - render_func func = render_tab_fx_smooth_indirect[prim]; - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLuint p = 0; - - if (!nr) - return; - - if (fxMesa->new_state) - fxSetupFXUnits(ctx); - - if (!nr) - return; - - if (VB->ClipOrMask) { - func = render_tab_fx_smooth_indirect_view_clipped[prim]; - if (VB->ClipOrMask & CLIP_USER_BIT) - func = render_tab_fx_smooth_indirect_clipped[prim]; - } - - ctx->VB = VB; /* kludge */ - - do { - func(VB, 0, nr, 0); - } while (ctx->Driver.MultipassFunc && ctx->Driver.MultipassFunc(VB, ++p)); - - - ctx->VB = saved_vb; -} - - -void -fxDDRenderVBIndirectDirect(struct vertex_buffer *VB) -{ - GLcontext *ctx = VB->ctx; - struct vertex_buffer *cvaVB = ctx->CVA.VB; - struct vertex_buffer *saved_vb = ctx->VB; - GLuint i, next, count = VB->Count; - render_func *tab = render_tab_fx_smooth_indirect; - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLuint p = 0; - - if (cvaVB->ClipOrMask) - tab = render_tab_fx_smooth_indirect_clipped; - - if (!VB->CullDone) - gl_fast_copy_vb(VB); - - if (fxMesa->new_state) - fxSetupFXUnits(ctx); - - ctx->VB = cvaVB; - cvaVB->EltPtr = VB->EltPtr; - - do { - GLuint parity = VB->Parity; - - for (i = VB->CopyStart; i < count; parity = 0, i = next) { - GLuint prim = VB->Primitive[i]; - next = VB->NextPrimitive[i]; - tab[prim] (cvaVB, i, next, parity); - } - /* loop never taken */ - } while (ctx->Driver.MultipassFunc && - ctx->Driver.MultipassFunc(cvaVB, ++p)); - - cvaVB->EltPtr = 0; - ctx->VB = saved_vb; -} - - -static render_func *fxDDRenderVBSmooth_tables[3] = { - render_tab_fx_smooth_clipped, - render_tab_fx_smooth_culled, - render_tab_fx_smooth_raw -}; - -static render_func *fxDDRenderVBFlat_tables[3] = { - render_tab_fx_flat_clipped, - render_tab_fx_flat_culled, - render_tab_fx_flat_raw -}; - - -static render_func *null_tables[3] = { - 0, - 0, - 0 -}; - -#if defined(FX_GLIDE3) -#include "fxstripdet.c" -#endif - -void -fxDDRenderInit(GLcontext * ctx) -{ - render_init_fx_smooth_indirect_view_clipped(); - render_init_fx_smooth_indirect_clipped(); - render_init_fx_smooth_indirect(); - render_init_fx_smooth_raw(); - render_init_fx_smooth_culled(); - render_init_fx_smooth_clipped(); - render_init_fx_flat_raw(); - render_init_fx_flat_culled(); - render_init_fx_flat_clipped(); -#if defined(FX_GLIDE3) - fxDDRenderInitGlide3(ctx); -#endif -} - - -/* Now used to set an internal var in fxMesa - we hook out at the - * level of gl_render_vb() instead. - */ -render_func ** -fxDDChooseRenderVBTables(GLcontext * ctx) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - - if (ctx->IndirectTriangles & DD_SW_SETUP) - return null_tables; - - switch (fxMesa->render_index) { -/* case FX_FLAT: */ -/* return fxDDRenderVBFlat_tables; */ - case 0: - return fxDDRenderVBSmooth_tables; - default: - return null_tables; - } -} - - -void -fxDDDoRenderVB(struct vertex_buffer *VB) -{ - GLcontext *ctx = VB->ctx; - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLuint i, next, prim; - GLuint parity = VB->Parity; - render_func *tab; - GLuint count = VB->Count; - GLint p = 0; - - if (fxMesa->new_state) - fxSetupFXUnits(ctx); - - if (VB->Indirect) { - return; - } - else if (VB->CullMode & CLIP_MASK_ACTIVE) { - tab = fxMesa->RenderVBClippedTab; - } - else { - tab = fxMesa->RenderVBRawTab; - } - - if (!VB->CullDone) - gl_fast_copy_vb(VB); - - do { - for (i = VB->CopyStart; i < count; parity = 0, i = next) { - prim = VB->Primitive[i]; - next = VB->NextPrimitive[i]; - tab[prim] (VB, i, next, parity); - } - - } while (ctx->Driver.MultipassFunc && ctx->Driver.MultipassFunc(VB, ++p)); -} Index: xc/lib/GL/mesa/src/drv/tdfx/fxsanity.c diff -u xc/lib/GL/mesa/src/drv/tdfx/fxsanity.c:1.2 xc/lib/GL/mesa/src/drv/tdfx/fxsanity.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxsanity.c:1.2 Fri Dec 8 14:36:23 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxsanity.c Mon Jun 4 12:37:39 2001 @@ -1,128 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxsanity.c,v 1.2 2000/12/08 19:36:23 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -#include "fxdrv.h" - -/* I have found this quite useful in tracking down transformation & - * clipping bugs. If you get a random graphics card freeze, running - * your triangles through this will probably catch the problem. - */ - -#define WID 640 -#define HI 480 - -#undef grDrawTriangle - -void -fx_sanity_triangle(fxMesaContext fxMesa, - GrVertex * v1, GrVertex * v2, GrVertex * v3) -{ - GLuint rv = 1, print = 0; - - GLfloat area = ((v1->x - v3->x) * (v2->y - v3->y) - - (v1->y - v3->y) * (v2->x - v3->x)); - - if (v1->x < 0 || v1->y < 0 || v1->x > WID || v1->y > HI || - v2->x < 0 || v2->y < 0 || v2->x > WID || v2->y > HI || - v3->x < 0 || v3->y < 0 || v3->x > WID || v3->y > HI) { - fprintf(stderr, "not clipped/set up!!!!!\n"); - rv = 0; - print = 1; - } - - if (area > (WID * HI)) { - fprintf(stderr, "too big\n"); - rv = 0; - } - if (v1->oow == 0 || v2->oow == 0 || v3->oow == 0) { - fprintf(stderr, "zero oow\n"); - rv = 0; - } - if (0 && area == 0) { - fprintf(stderr, "zero area %p %p %p\n", v1, v2, v3); - rv = 0; - } - - if (print) { -#if FX_USE_PARGB - fprintf(stderr, - "v1: %f %f %f %f col %d %d %d %d t0 %f %f %f t1 %f %f %f\n", - v3->x, v3->y, v3->ooz, v3->oow, GET_PR(v1), GET_PG(v1), GET_PB(v1), GET_PA(v1), - v1->tmuvtx[0].sow, v1->tmuvtx[0].tow, v1->tmuvtx[0].oow, - v1->tmuvtx[1].sow, v1->tmuvtx[1].tow, v1->tmuvtx[1].oow); - fprintf(stderr, - "v2: %f %f %f %f col %d %d %d %d t0 %f %f %f t1 %f %f %f\n", - v3->x, v3->y, v3->ooz, v3->oow, GET_PR(v1), GET_PG(v1), GET_PB(v1), GET_PA(v1), - v2->tmuvtx[0].sow, v2->tmuvtx[0].tow, v2->tmuvtx[0].oow, - v2->tmuvtx[1].sow, v2->tmuvtx[1].tow, v2->tmuvtx[1].oow); - fprintf(stderr, - "v3: %f %f %f %f col %d %d %d %d t0 %f %f %f t1 %f %f %f\n", - v3->x, v3->y, v3->ooz, v3->oow, GET_PR(v1), GET_PG(v1), GET_PB(v1), GET_PA(v1), - v3->tmuvtx[0].sow, v3->tmuvtx[0].tow, v3->tmuvtx[0].oow, - v3->tmuvtx[1].sow, v3->tmuvtx[1].tow, v3->tmuvtx[1].oow); -#else - fprintf(stderr, - "v1: %f %f %f %f col %.0f %.0f %.0f %.0f t0 %f %f %f t1 %f %f %f\n", - v1->x, v1->y, v1->ooz, v1->oow, v1->r, v1->g, v1->b, v1->a, - v1->tmuvtx[0].sow, v1->tmuvtx[0].tow, v1->tmuvtx[0].oow, - v1->tmuvtx[1].sow, v1->tmuvtx[1].tow, v1->tmuvtx[1].oow); - fprintf(stderr, - "v2: %f %f %f %f col %.0f %.0f %.0f %.0f t0 %f %f %f t1 %f %f %f\n", - v2->x, v2->y, v2->ooz, v2->oow, v2->r, v2->g, v2->b, v2->a, - v2->tmuvtx[0].sow, v2->tmuvtx[0].tow, v2->tmuvtx[0].oow, - v2->tmuvtx[1].sow, v2->tmuvtx[1].tow, v2->tmuvtx[1].oow); - fprintf(stderr, - "v3: %f %f %f %f col %.0f %.0f %.0f %.0f t0 %f %f %f t1 %f %f %f\n", - v3->x, v3->y, v3->ooz, v3->oow, v3->r, v3->g, v3->b, v3->a, - v3->tmuvtx[0].sow, v3->tmuvtx[0].tow, v3->tmuvtx[0].oow, - v3->tmuvtx[1].sow, v3->tmuvtx[1].tow, v3->tmuvtx[1].oow); -#endif - } - - if (1) - FX_grDrawTriangle(fxMesa, v1, v2, v3); - else - fprintf(stderr, "\n\n\n"); -} - Index: xc/lib/GL/mesa/src/drv/tdfx/fxsdettmp.h diff -u xc/lib/GL/mesa/src/drv/tdfx/fxsdettmp.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/fxsdettmp.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxsdettmp.h:1.1 Sun Sep 24 09:51:19 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxsdettmp.h Mon Jun 4 12:37:39 2001 @@ -1,154 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxsdettmp.h,v 1.1 2000/09/24 13:51:19 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -/* - * Notes: the folowing code works only if count is > start. - * Corrently we are looking for the pattern: - * v0,v1,v2 v2,v1,v3, v2,v3,v4.... - * - * For this: - * #define STRIP0 ((u1 == v1) && (u2 == v0)) - * #define STRIP1 ((u0 == v0) && (u2 == v1)) - * - */ - - -static void TAG(render_vb_triangles_smooth_indirect_sd) - (struct vertex_buffer * VB, GLuint start, GLuint count, GLuint parity) -{ - GLint u0, u1, u2; - GLint v0, v1, v2; - GLuint *elt = VB->EltPtr->data; - - int i; - LOCAL_VARS INIT(GL_TRIANGLES); - - elt = &elt[start - 1]; - u0 = *(++elt); - u1 = *(++elt); - u2 = *(++elt); - i = start + 3; - while (i < count) { - v0 = *(++elt); - v1 = *(++elt); - v2 = *(++elt); - - if (CLIPPED(u0, u1, u2)) { - if (!CULLED(u0, u1, u2)) - SENDCLIPTRI(u0, u1, u2); - } - else { - if (STRIP0(u, v)) { - int is_strips = 1; - int parity = 0; - STRIPSLOCAL_VAR FLUSHTRI(); - STARTSTRIPS(u0, u1, u2); - while (is_strips && i < count) { - SENDSTRIPS(v2); - - u0 = v0; - u1 = v1; - u2 = v2; - i += 3; - v0 = *(++elt); - v1 = *(++elt); - v2 = *(++elt); - - if (parity) { - is_strips = STRIP0(u, v); - parity = 0; - } - else { - is_strips = STRIP1(u, v); - parity = 1; - } - } - FLUSHSTRIPS(); - - if (i >= count) - return; - } - else { - SENDTRI(u0, u1, u2); - } - } - u0 = v0; - u1 = v1; - u2 = v2; - i += 3; - } - if (CLIPPED(u0, u1, u2)) { - if (!CULLED(u0, u1, u2)) - SENDCLIPTRI(u0, u1, u2); - } - else { - SENDTRI(u0, u1, u2); - } - FLUSHTRI(); - -} - -#ifndef PRESERVE_VB_DEFS -#undef SENDTRI -#undef STRIP0 -#undef STRIP1 -#undef LOCAL_VARS -#undef STRIPSLOCAL_VAR -#undef INIT -#undef SENDTRI -#undef FLUSHTRI -#undef STARTSTRIPS -#undef SENDSTRIPS -#undef FLUSHSTRIPS -#undef CLIPPED -#undef CULLED -#undef SENDCLIPTRI -#endif - -#ifndef PRESERVE_TAG -#undef TAG -#endif - -#undef PRESERVE_VB_DEFS -#undef PRESERVE_TAG Index: xc/lib/GL/mesa/src/drv/tdfx/fxsetup.c diff -u xc/lib/GL/mesa/src/drv/tdfx/fxsetup.c:1.2 xc/lib/GL/mesa/src/drv/tdfx/fxsetup.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxsetup.c:1.2 Fri Dec 8 14:36:23 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxsetup.c Mon Jun 4 12:37:39 2001 @@ -1,2886 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxsetup.c,v 1.2 2000/12/08 19:36:23 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -/* fxsetup.c - 3Dfx VooDoo rendering mode setup functions */ - -#include "fxdrv.h" -#include "fxddtex.h" -#include "fxtexman.h" -#include "fxsetup.h" -#include "enums.h" - - -static GLboolean fxMultipassTexture(struct vertex_buffer *, GLuint); - - - -void -fxTexValidate(GLcontext * ctx, struct gl_texture_object *tObj) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - tfxTexInfo *ti = fxTMGetTexInfo(tObj); - GLint minl, maxl; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxTexValidate(...) Start\n"); - } - - if (ti->validated) { - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, - "fxmesa: fxTexValidate(...) End (validated=GL_TRUE)\n"); - } - return; - } - - ti->tObj = tObj; - minl = ti->minLevel = tObj->BaseLevel; - maxl = ti->maxLevel = MIN2(tObj->MaxLevel, tObj->Image[0]->MaxLog2); - - fxTexGetInfo(ctx, tObj->Image[minl]->Width, tObj->Image[minl]->Height, - &(FX_largeLodLog2(ti->info)), - &(FX_aspectRatioLog2(ti->info)), &(ti->sScale), - &(ti->tScale), &(ti->int_sScale), &(ti->int_tScale), NULL, - NULL); - - if ((tObj->MinFilter != GL_NEAREST) && (tObj->MinFilter != GL_LINEAR)) - fxTexGetInfo(ctx, tObj->Image[maxl]->Width, tObj->Image[maxl]->Height, - &(FX_smallLodLog2(ti->info)), NULL, - NULL, NULL, NULL, NULL, NULL, NULL); - else - FX_smallLodLog2(ti->info) = FX_largeLodLog2(ti->info); - - fxTexGetFormat(tObj->Image[minl]->IntFormat, &(ti->info.format), - &(ti->baseLevelInternalFormat), NULL, NULL, - fxMesa->haveHwStencil); - - switch (tObj->WrapS) { - case GL_CLAMP_TO_EDGE: - case GL_CLAMP: - ti->sClamp = 1; - break; - case GL_REPEAT: - ti->sClamp = 0; - break; - default: - ; /* silence compiler warning */ - } - switch (tObj->WrapT) { - case GL_CLAMP_TO_EDGE: - case GL_CLAMP: - ti->tClamp = 1; - break; - case GL_REPEAT: - ti->tClamp = 0; - break; - default: - ; /* silence compiler warning */ - } - - ti->validated = GL_TRUE; - - ti->info.data = NULL; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxTexValidate(...) End\n"); - } -} - -static void -fxPrintUnitsMode(const char *msg, GLuint mode) -{ - fprintf(stderr, - "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", - msg, - mode, - (mode & FX_UM_E0_REPLACE) ? "E0_REPLACE, " : "", - (mode & FX_UM_E0_MODULATE) ? "E0_MODULATE, " : "", - (mode & FX_UM_E0_DECAL) ? "E0_DECAL, " : "", - (mode & FX_UM_E0_BLEND) ? "E0_BLEND, " : "", - (mode & FX_UM_E1_REPLACE) ? "E1_REPLACE, " : "", - (mode & FX_UM_E1_MODULATE) ? "E1_MODULATE, " : "", - (mode & FX_UM_E1_DECAL) ? "E1_DECAL, " : "", - (mode & FX_UM_E1_BLEND) ? "E1_BLEND, " : "", - (mode & FX_UM_E0_ALPHA) ? "E0_ALPHA, " : "", - (mode & FX_UM_E0_LUMINANCE) ? "E0_LUMINANCE, " : "", - (mode & FX_UM_E0_LUMINANCE_ALPHA) ? "E0_LUMINANCE_ALPHA, " : "", - (mode & FX_UM_E0_INTENSITY) ? "E0_INTENSITY, " : "", - (mode & FX_UM_E0_RGB) ? "E0_RGB, " : "", - (mode & FX_UM_E0_RGBA) ? "E0_RGBA, " : "", - (mode & FX_UM_E1_ALPHA) ? "E1_ALPHA, " : "", - (mode & FX_UM_E1_LUMINANCE) ? "E1_LUMINANCE, " : "", - (mode & FX_UM_E1_LUMINANCE_ALPHA) ? "E1_LUMINANCE_ALPHA, " : "", - (mode & FX_UM_E1_INTENSITY) ? "E1_INTENSITY, " : "", - (mode & FX_UM_E1_RGB) ? "E1_RGB, " : "", - (mode & FX_UM_E1_RGBA) ? "E1_RGBA, " : "", - (mode & FX_UM_COLOR_ITERATED) ? "COLOR_ITERATED, " : "", - (mode & FX_UM_COLOR_CONSTANT) ? "COLOR_CONSTANT, " : "", - (mode & FX_UM_ALPHA_ITERATED) ? "ALPHA_ITERATED, " : "", - (mode & FX_UM_ALPHA_CONSTANT) ? "ALPHA_CONSTANT, " : ""); -} - -static GLuint -fxGetTexSetConfiguration(GLcontext * ctx, - struct gl_texture_object *tObj0, - struct gl_texture_object *tObj1) -{ - GLuint unitsmode = 0; - GLuint envmode = 0; - GLuint ifmt = 0; - - if ((ctx->Light.ShadeModel == GL_SMOOTH) || 1 || - (ctx->Point.SmoothFlag) || - (ctx->Line.SmoothFlag) || - (ctx->Polygon.SmoothFlag)) - unitsmode |= FX_UM_ALPHA_ITERATED; - else - unitsmode |= FX_UM_ALPHA_CONSTANT; - - if (ctx->Light.ShadeModel == GL_SMOOTH || 1) - unitsmode |= FX_UM_COLOR_ITERATED; - else - unitsmode |= FX_UM_COLOR_CONSTANT; - - - - /* - OpenGL Feeds Texture 0 into Texture 1 - Glide Feeds Texture 1 into Texture 0 - */ - if (tObj0) { - tfxTexInfo *ti0 = fxTMGetTexInfo(tObj0); - - switch (ti0->baseLevelInternalFormat) { - case GL_ALPHA: - ifmt |= FX_UM_E0_ALPHA; - break; - case GL_LUMINANCE: - ifmt |= FX_UM_E0_LUMINANCE; - break; - case GL_LUMINANCE_ALPHA: - ifmt |= FX_UM_E0_LUMINANCE_ALPHA; - break; - case GL_INTENSITY: - ifmt |= FX_UM_E0_INTENSITY; - break; - case GL_RGB: - ifmt |= FX_UM_E0_RGB; - break; - case GL_RGBA: - ifmt |= FX_UM_E0_RGBA; - break; - } - - switch (ctx->Texture.Unit[0].EnvMode) { - case GL_DECAL: - envmode |= FX_UM_E0_DECAL; - break; - case GL_MODULATE: - envmode |= FX_UM_E0_MODULATE; - break; - case GL_REPLACE: - envmode |= FX_UM_E0_REPLACE; - break; - case GL_BLEND: - envmode |= FX_UM_E0_BLEND; - break; - case GL_ADD: - envmode |= FX_UM_E0_ADD; - break; - default: - /* do nothing */ - break; - } - } - - if (tObj1) { - tfxTexInfo *ti1 = fxTMGetTexInfo(tObj1); - - switch (ti1->baseLevelInternalFormat) { - case GL_ALPHA: - ifmt |= FX_UM_E1_ALPHA; - break; - case GL_LUMINANCE: - ifmt |= FX_UM_E1_LUMINANCE; - break; - case GL_LUMINANCE_ALPHA: - ifmt |= FX_UM_E1_LUMINANCE_ALPHA; - break; - case GL_INTENSITY: - ifmt |= FX_UM_E1_INTENSITY; - break; - case GL_RGB: - ifmt |= FX_UM_E1_RGB; - break; - case GL_RGBA: - ifmt |= FX_UM_E1_RGBA; - break; - default: - /* do nothing */ - break; - } - - switch (ctx->Texture.Unit[1].EnvMode) { - case GL_DECAL: - envmode |= FX_UM_E1_DECAL; - break; - case GL_MODULATE: - envmode |= FX_UM_E1_MODULATE; - break; - case GL_REPLACE: - envmode |= FX_UM_E1_REPLACE; - break; - case GL_BLEND: - envmode |= FX_UM_E1_BLEND; - break; - case GL_ADD: - envmode |= FX_UM_E1_ADD; - break; - default: - /* do nothing */ - break; - } - } - - unitsmode |= (ifmt | envmode); - - if (MESA_VERBOSE & (VERBOSE_DRIVER | VERBOSE_TEXTURE)) - fxPrintUnitsMode("unitsmode", unitsmode); - - return unitsmode; -} - -/************************************************************************/ -/************************* Rendering Mode SetUp *************************/ -/************************************************************************/ - -/************************* Single Texture Set ***************************/ - -static void -fxSetupSingleTMU_NoLock(fxMesaContext fxMesa, struct gl_texture_object *tObj) -{ - struct TdfxSharedState *shared = (struct TdfxSharedState *) fxMesa->glCtx->Shared->DriverData; - tfxTexInfo *ti = fxTMGetTexInfo(tObj); - const GLcontext *ctx = fxMesa->glCtx; - - /* Make sure we're not loaded incorrectly */ - if (ti->isInTM && !shared->umaTexMemory) { - /* if doing filtering between mipmap levels, alternate mipmap levels - * must be in alternate TMUs. - */ - if (ti->LODblend) { - if (ti->whichTMU != FX_TMU_SPLIT) - fxTMMoveOutTM(fxMesa, tObj); - } - else { - if (ti->whichTMU == FX_TMU_SPLIT) - fxTMMoveOutTM(fxMesa, tObj); - } - } - - /* Make sure we're loaded correctly */ - if (!ti->isInTM) { - /* Have to download the texture */ - if (shared->umaTexMemory) { - fxTMMoveInTM_NoLock(fxMesa, tObj, FX_TMU0); - } - else { - /* Voodoo3 (split texture memory) */ - if (ti->LODblend) { - fxTMMoveInTM_NoLock(fxMesa, tObj, FX_TMU_SPLIT); - } - else { - if (fxMesa->haveTwoTMUs) { - GLint memReq = FX_grTexTextureMemRequired_NoLock( - GR_MIPMAPLEVELMASK_BOTH, &(ti->info)); - if (shared->freeTexMem[FX_TMU0] > memReq) { - fxTMMoveInTM_NoLock(fxMesa, tObj, FX_TMU0); - } - else { - fxTMMoveInTM_NoLock(fxMesa, tObj, FX_TMU1); - } - } - else - fxTMMoveInTM_NoLock(fxMesa, tObj, FX_TMU0); - } - } - } - - if (ti->LODblend && ti->whichTMU == FX_TMU_SPLIT) { - /* mipmap levels split between texture banks */ - if (ti->info.format == GR_TEXFMT_P_8 && !ctx->Texture.SharedPalette) { - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: uploading texture palette\n"); - } - FX_grTexDownloadTable_NoLock(GR_TMU0, GR_TEXTABLE_PALETTE_6666_EXT, - &(ti->palette)); - FX_grTexDownloadTable_NoLock(GR_TMU1, GR_TEXTABLE_PALETTE_6666_EXT, - &(ti->palette)); - } - - FX_grTexClampMode_NoLock(GR_TMU0, ti->sClamp, ti->tClamp); - FX_grTexClampMode_NoLock(GR_TMU1, ti->sClamp, ti->tClamp); - FX_grTexFilterMode_NoLock(GR_TMU0, ti->minFilt, ti->maxFilt); - FX_grTexFilterMode_NoLock(GR_TMU1, ti->minFilt, ti->maxFilt); - FX_grTexMipMapMode_NoLock(GR_TMU0, ti->mmMode, ti->LODblend); - FX_grTexMipMapMode_NoLock(GR_TMU1, ti->mmMode, ti->LODblend); - - FX_grTexSource_NoLock(GR_TMU0, ti->tm[FX_TMU0]->startAddr, - GR_MIPMAPLEVELMASK_ODD, &(ti->info)); - FX_grTexSource_NoLock(GR_TMU1, ti->tm[FX_TMU1]->startAddr, - GR_MIPMAPLEVELMASK_EVEN, &(ti->info)); - } - else { - FxU32 tmu; - - if (ti->whichTMU == FX_TMU_BOTH) - tmu = FX_TMU0; - else - tmu = ti->whichTMU; - - if (shared->umaTexMemory) { - assert(ti->whichTMU == FX_TMU0); - assert(tmu == FX_TMU0); - } - - if (ti->info.format == GR_TEXFMT_P_8 && !ctx->Texture.SharedPalette) { - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: uploading texture palette\n"); - } - FX_grTexDownloadTable_NoLock(tmu, GR_TEXTABLE_PALETTE_6666_EXT, - &(ti->palette)); - } - - /* KW: The alternative is to do the download to the other tmu. If - * we get to this point, I think it means we are thrashing the - * texture memory, so perhaps it's not a good idea. - */ - if (ti->LODblend && (MESA_VERBOSE & VERBOSE_DRIVER)) - fprintf(stderr, - "fxmesa: not blending texture - only on one tmu\n"); - - FX_grTexClampMode_NoLock(tmu, ti->sClamp, ti->tClamp); - FX_grTexFilterMode_NoLock(tmu, ti->minFilt, ti->maxFilt); - FX_grTexMipMapMode_NoLock(tmu, ti->mmMode, FXFALSE); - - if (ti->tm[tmu]) { - FX_grTexSource_NoLock(tmu, ti->tm[tmu]->startAddr, - GR_MIPMAPLEVELMASK_BOTH, &(ti->info)); - } - } -} - -static void -fxSelectSingleTMUSrc_NoLock(fxMesaContext fxMesa, GLint tmu, FxBool LODblend) -{ - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxSelectSingleTMUSrc(%d,%d)\n", tmu, - LODblend); - } - - if (LODblend) { - FX_grTexCombine_NoLock(GR_TMU0, - GR_COMBINE_FUNCTION_BLEND, - GR_COMBINE_FACTOR_ONE_MINUS_LOD_FRACTION, - GR_COMBINE_FUNCTION_BLEND, - GR_COMBINE_FACTOR_ONE_MINUS_LOD_FRACTION, - FXFALSE, FXFALSE); - - if (fxMesa->haveTwoTMUs) { - const struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; - const struct TdfxSharedState *shared = (struct TdfxSharedState *) mesaShared->DriverData; - int tmu; - - if (shared->umaTexMemory) - tmu = GR_TMU0; - else - tmu = GR_TMU1; - - FX_grTexCombine_NoLock(tmu, - GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, FXFALSE, FXFALSE); - } - fxMesa->tmuSrc = FX_TMU_SPLIT; - } - else { - if (tmu != FX_TMU1) { - FX_grTexCombine_NoLock(GR_TMU0, - GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, FXFALSE, FXFALSE); - if (fxMesa->haveTwoTMUs) { - FX_grTexCombine_NoLock(GR_TMU1, - GR_COMBINE_FUNCTION_ZERO, - GR_COMBINE_FACTOR_NONE, - GR_COMBINE_FUNCTION_ZERO, - GR_COMBINE_FACTOR_NONE, FXFALSE, - FXFALSE); - } - fxMesa->tmuSrc = FX_TMU0; - } - else { - FX_grTexCombine_NoLock(GR_TMU1, - GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, FXFALSE, FXFALSE); - - /* GR_COMBINE_FUNCTION_SCALE_OTHER doesn't work ?!? */ - - FX_grTexCombine_NoLock(GR_TMU0, - GR_COMBINE_FUNCTION_BLEND, - GR_COMBINE_FACTOR_ONE, - GR_COMBINE_FUNCTION_BLEND, - GR_COMBINE_FACTOR_ONE, FXFALSE, FXFALSE); - - fxMesa->tmuSrc = FX_TMU1; - } - } -} - - -/* - * Setup the texture env mode for a texture unit on Banshee/Voodoo3 - */ -static void -SetupTexEnvVoodoo3(GLcontext *ctx, FxU32 unit, GLboolean iteratedRGBA, - GLenum envMode, GLenum baseFormat) -{ - GrCombineLocal_t localc, locala; - if (iteratedRGBA) - localc = locala = GR_COMBINE_LOCAL_ITERATED; - else - localc = locala = GR_COMBINE_LOCAL_CONSTANT; - - switch (envMode) { - case GL_DECAL: - FX_grAlphaCombine_NoLock(GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - locala, GR_COMBINE_OTHER_NONE, FXFALSE); - - FX_grColorCombine_NoLock(GR_COMBINE_FUNCTION_BLEND, - GR_COMBINE_FACTOR_TEXTURE_ALPHA, - localc, GR_COMBINE_OTHER_TEXTURE, FXFALSE); - break; - case GL_MODULATE: - FX_grAlphaCombine_NoLock(GR_COMBINE_FUNCTION_SCALE_OTHER, - GR_COMBINE_FACTOR_LOCAL, - locala, GR_COMBINE_OTHER_TEXTURE, FXFALSE); - - if (baseFormat == GL_ALPHA) - FX_grColorCombine_NoLock(GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - localc, GR_COMBINE_OTHER_NONE, FXFALSE); - else - FX_grColorCombine_NoLock(GR_COMBINE_FUNCTION_SCALE_OTHER, - GR_COMBINE_FACTOR_LOCAL, - localc, GR_COMBINE_OTHER_TEXTURE, - FXFALSE); - break; - case GL_BLEND: -#if 0 - FX_grAlphaCombine_NoLock(GR_COMBINE_FUNCTION_SCALE_OTHER, - GR_COMBINE_FACTOR_LOCAL, - locala, GR_COMBINE_OTHER_TEXTURE, FXFALSE); - if (baseFormat == GL_ALPHA) - FX_grColorCombine_NoLock(GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - localc, GR_COMBINE_OTHER_NONE, FXFALSE); - else - FX_grColorCombine_NoLock - (GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL, - GR_COMBINE_FACTOR_LOCAL, localc, GR_COMBINE_OTHER_TEXTURE, - FXTRUE); - ctx->Driver.MultipassFunc = fxMultipassBlend; -#else - if (MESA_VERBOSE & VERBOSE_DRIVER) - fprintf(stderr, "fx Driver: GL_BLEND not yet supported\n"); -#endif - break; - case GL_REPLACE: - if ((baseFormat == GL_RGB) || (baseFormat == GL_LUMINANCE)) - FX_grAlphaCombine_NoLock(GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - locala, GR_COMBINE_OTHER_NONE, FXFALSE); - else - FX_grAlphaCombine_NoLock(GR_COMBINE_FUNCTION_SCALE_OTHER, - GR_COMBINE_FACTOR_ONE, - locala, GR_COMBINE_OTHER_TEXTURE, - FXFALSE); - - if (baseFormat == GL_ALPHA) - FX_grColorCombine_NoLock(GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - localc, GR_COMBINE_OTHER_NONE, FXFALSE); - else - FX_grColorCombine_NoLock(GR_COMBINE_FUNCTION_SCALE_OTHER, - GR_COMBINE_FACTOR_ONE, - localc, GR_COMBINE_OTHER_TEXTURE, - FXFALSE); - break; - case GL_ADD: - if (baseFormat == GL_ALPHA || - baseFormat == GL_LUMINANCE_ALPHA || - baseFormat == GL_RGBA) { - /* product of texel and fragment alpha */ - FX_grAlphaCombine_NoLock(GR_COMBINE_FUNCTION_SCALE_OTHER, - GR_COMBINE_FACTOR_LOCAL, - locala, GR_COMBINE_OTHER_TEXTURE, FXFALSE); - } - else if (baseFormat == GL_LUMINANCE || baseFormat == GL_RGB) { - /* fragment alpha is unchanged */ - FX_grAlphaCombine_NoLock(GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - locala, GR_COMBINE_OTHER_NONE, FXFALSE); - } - else { - ASSERT(baseFormat == GL_INTENSITY); - /* sum of texel and fragment alpha */ - FX_grAlphaCombine_NoLock(GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL, - GR_COMBINE_FACTOR_ONE, - locala, GR_COMBINE_OTHER_TEXTURE, - FXFALSE); - } - if (baseFormat == GL_ALPHA) { - /* rgb unchanged */ - FX_grColorCombine_NoLock(GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - localc, GR_COMBINE_OTHER_NONE, FXFALSE); - } - else { - /* sum of texel and fragment rgb */ - FX_grColorCombine_NoLock(GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL, - GR_COMBINE_FACTOR_ONE, - localc, GR_COMBINE_OTHER_TEXTURE, - FXFALSE); - } - break; - default: - gl_problem(ctx, "Bad baseFormat in SetupTexEnvVoodoo3"); - } -} - - -/* - * These macros are used below when handling COMBINE_EXT. - */ -#define TEXENV_OPERAND_INVERTED(operand) \ - (((operand) == GL_ONE_MINUS_SRC_ALPHA) \ - || ((operand) == GL_ONE_MINUS_SRC_COLOR)) -#define TEXENV_OPERAND_ALPHA(operand) \ - (((operand) == GL_SRC_ALPHA) || ((operand) == GL_ONE_MINUS_SRC_ALPHA)) -#define TEXENV_SETUP_ARG_A(param, source, operand, iteratedAlpha) \ - switch (source) { \ - case GL_TEXTURE: \ - param = GR_CMBX_LOCAL_TEXTURE_ALPHA; \ - break; \ - case GL_CONSTANT_EXT: \ - param = GR_CMBX_TMU_CALPHA; \ - break; \ - case GL_PRIMARY_COLOR_EXT: \ - param = GR_CMBX_ITALPHA; \ - break; \ - case GL_PREVIOUS_EXT: \ - param = iteratedAlpha; \ - break; \ - default: \ - /* \ - * This is here just to keep from getting \ - * compiler warnings. \ - */ \ - param = GR_CMBX_ZERO; \ - break; \ - } - -#define TEXENV_SETUP_ARG_RGB(param, source, operand, iteratedColor, iteratedAlpha) \ - if (!TEXENV_OPERAND_ALPHA(operand)) { \ - switch (source) { \ - case GL_TEXTURE: \ - param = GR_CMBX_LOCAL_TEXTURE_RGB; \ - break; \ - case GL_CONSTANT_EXT: \ - param = GR_CMBX_TMU_CCOLOR; \ - break; \ - case GL_PRIMARY_COLOR_EXT: \ - param = GR_CMBX_ITRGB; \ - break; \ - case GL_PREVIOUS_EXT: \ - param = iteratedColor; \ - break; \ - default: \ - /* \ - * This is here just to keep from getting \ - * compiler warnings. \ - */ \ - param = GR_CMBX_ZERO; \ - break; \ - } \ - } else { \ - switch (source) { \ - case GL_TEXTURE: \ - param = GR_CMBX_LOCAL_TEXTURE_ALPHA; \ - break; \ - case GL_CONSTANT_EXT: \ - param = GR_CMBX_TMU_CALPHA; \ - break; \ - case GL_PRIMARY_COLOR_EXT: \ - param = GR_CMBX_ITALPHA; \ - break; \ - case GL_PREVIOUS_EXT: \ - param = iteratedAlpha; \ - break; \ - default: \ - /* \ - * This is here just to keep from getting \ - * compiler warnings. \ - */ \ - param = GR_CMBX_ZERO; \ - break; \ - } \ - } - -#define TEXENV_SETUP_MODE_RGB(param, operand) \ - switch (operand) { \ - case GL_SRC_COLOR: \ - case GL_SRC_ALPHA: \ - param = GR_FUNC_MODE_X; \ - break; \ - case GL_ONE_MINUS_SRC_ALPHA: \ - case GL_ONE_MINUS_SRC_COLOR: \ - param = GR_FUNC_MODE_ONE_MINUS_X; \ - break; \ - default: \ - param = GR_FUNC_MODE_ZERO; \ - break; \ - } - -#define TEXENV_SETUP_MODE_A(param, operand) \ - switch (operand) { \ - case GL_SRC_ALPHA: \ - param = GR_FUNC_MODE_X; \ - break; \ - case GL_ONE_MINUS_SRC_ALPHA: \ - param = GR_FUNC_MODE_ONE_MINUS_X; \ - break; \ - default: \ - param = GR_FUNC_MODE_ZERO; \ - break; \ - } - -/* - * Setup the texture env mode for a texture unit on Napalm. - * If useIteratedRGBA is true, we'll feed the interpolated fragment - * color into the combiner, else we'll feed in the upstream texture - * unit's resultant color. - */ -static void -SetupTexEnvNapalm(GLcontext *ctx, FxU32 unit, GLboolean useIteratedRGBA, - struct gl_texture_unit *texUnit, GLenum baseFormat) -{ - GrTCCUColor_t incomingRGB, incomingAlpha; - GLenum envMode = texUnit->EnvMode; - - if (useIteratedRGBA) { - incomingRGB = GR_CMBX_ITRGB; - incomingAlpha = GR_CMBX_ITALPHA; - } - else { - incomingRGB = GR_CMBX_OTHER_TEXTURE_RGB; - incomingAlpha = GR_CMBX_OTHER_TEXTURE_ALPHA; - } - - switch (envMode) { - case GL_REPLACE: - /* Setup RGB combiner */ - if (baseFormat == GL_ALPHA) { - /* Rv = Rf */ - (*grTexColorCombineExtPtr)(unit, - incomingRGB, GR_FUNC_MODE_X, - GR_CMBX_ZERO, GR_FUNC_MODE_ZERO, - GR_CMBX_ZERO, FXTRUE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); - } - else { - /* Rv = Rt */ - (*grTexColorCombineExtPtr)(unit, - GR_CMBX_LOCAL_TEXTURE_RGB, GR_FUNC_MODE_X, - GR_CMBX_ZERO, GR_FUNC_MODE_X, - GR_CMBX_ZERO, FXTRUE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); - } - /* Setup Alpha combiner */ - if (baseFormat == GL_LUMINANCE || baseFormat == GL_RGB) { - /* Av = Af */ - (*grTexAlphaCombineExtPtr)(unit, - GR_CMBX_ITALPHA, GR_FUNC_MODE_ZERO, - GR_CMBX_ITALPHA, GR_FUNC_MODE_ZERO, - GR_CMBX_ZERO, FXFALSE, - incomingAlpha, FXFALSE, - 0, FXFALSE); - } - else { - /* Av = At */ - (*grTexAlphaCombineExtPtr)(unit, - GR_CMBX_ITALPHA, GR_FUNC_MODE_ZERO, - GR_CMBX_ITALPHA, GR_FUNC_MODE_ZERO, - GR_CMBX_ZERO, FXFALSE, - GR_CMBX_LOCAL_TEXTURE_ALPHA, FXFALSE, - 0, FXFALSE); - } - break; - case GL_MODULATE: - /* Setup RGB combiner */ - if (baseFormat == GL_ALPHA) { - /* Rv = Rf */ - (*grTexColorCombineExtPtr)(unit, - incomingRGB, GR_FUNC_MODE_X, - GR_CMBX_ZERO, GR_FUNC_MODE_ZERO, - GR_CMBX_ZERO, FXTRUE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); - } - else { - /* Result = Frag * Tex */ - (*grTexColorCombineExtPtr)(unit, - incomingRGB, GR_FUNC_MODE_X, - GR_CMBX_ZERO, GR_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_RGB, FXFALSE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); - } - /* Setup Alpha combiner */ - if (baseFormat == GL_LUMINANCE || baseFormat == GL_RGB) { - /* Av = Af */ - (*grTexAlphaCombineExtPtr)(unit, - incomingAlpha, GR_FUNC_MODE_X, - GR_CMBX_ITALPHA, GR_FUNC_MODE_ZERO, - GR_CMBX_ZERO, FXTRUE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); - } - else { - /* Av = Af * At */ - (*grTexAlphaCombineExtPtr)(unit, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GR_FUNC_MODE_X, - GR_CMBX_ITALPHA, GR_FUNC_MODE_ZERO, - incomingAlpha, FXFALSE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); - } - break; - case GL_DECAL: - /* Setup RGB combiner */ - if (baseFormat == GL_RGB) { - /* Rv = Rt */ - (*grTexColorCombineExtPtr)(unit, - GR_CMBX_LOCAL_TEXTURE_RGB, GR_FUNC_MODE_X, - GR_CMBX_ZERO, GR_FUNC_MODE_X, - GR_CMBX_ZERO, FXTRUE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); - } - else { - /* Rv = Rf * (1 - At) + Rt * At */ - (*grTexColorCombineExtPtr)(unit, - GR_CMBX_LOCAL_TEXTURE_RGB, GR_FUNC_MODE_X, - incomingRGB, GR_FUNC_MODE_NEGATIVE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, FXFALSE, - GR_CMBX_B, FXFALSE, - 0, FXFALSE); - } - /* Setup Alpha combiner */ - /* Av = Af */ - (*grTexAlphaCombineExtPtr)(unit, - incomingAlpha, GR_FUNC_MODE_X, - GR_CMBX_ITALPHA, GR_FUNC_MODE_ZERO, - GR_CMBX_ZERO, FXTRUE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); - break; - case GL_BLEND: - /* Setup RGB combiner */ - if (baseFormat == GL_ALPHA) { - /* Rv = Rf */ - (*grTexColorCombineExtPtr)(unit, - incomingRGB, GR_FUNC_MODE_X, - GR_CMBX_ZERO, GR_FUNC_MODE_ZERO, - GR_CMBX_ZERO, FXTRUE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); - } - else { - /* Rv = Rf * (1 - Rt) + Rc * Rt */ - (*grTexColorCombineExtPtr)(unit, - GR_CMBX_TMU_CCOLOR, GR_FUNC_MODE_X, - incomingRGB, GR_FUNC_MODE_NEGATIVE_X, - GR_CMBX_LOCAL_TEXTURE_RGB, FXFALSE, - GR_CMBX_B, FXFALSE, - 0, FXFALSE); - } - /* Setup Alpha combiner */ - if (baseFormat == GL_LUMINANCE || baseFormat == GL_RGB) { - /* Av = Af */ - (*grTexAlphaCombineExtPtr)(unit, - incomingAlpha, GR_FUNC_MODE_X, - GR_CMBX_ZERO, GR_FUNC_MODE_ZERO, - GR_CMBX_ZERO, FXTRUE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); - } - else if (baseFormat == GL_INTENSITY) { - /* Av = Af * (1 - It) + Ac * It */ - (*grTexAlphaCombineExtPtr)(unit, - GR_CMBX_TMU_CALPHA, GR_FUNC_MODE_X, - incomingAlpha, GR_FUNC_MODE_NEGATIVE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, FXFALSE, - GR_CMBX_B, FXFALSE, - 0, FXFALSE); - } - else { - /* Av = Af * At */ - (*grTexAlphaCombineExtPtr)(unit, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GR_FUNC_MODE_X, - GR_CMBX_ITALPHA, GR_FUNC_MODE_ZERO, - incomingAlpha, FXFALSE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); - } - /* Also have to set up the tex env constant color */ - { - GrColor_t constColor; - GLubyte *abgr = (GLubyte *) &constColor; - abgr[0] = ctx->Texture.Unit[0].EnvColor[0] * 255.0F; - abgr[1] = ctx->Texture.Unit[0].EnvColor[1] * 255.0F; - abgr[2] = ctx->Texture.Unit[0].EnvColor[2] * 255.0F; - abgr[3] = ctx->Texture.Unit[0].EnvColor[3] * 255.0F; - (*grConstantColorValueExtPtr)(unit, constColor); - } - break; - case GL_ADD: - /* Setup RGB combiner */ - if (baseFormat == GL_ALPHA) { - /* Rv = Rf */ - (*grTexColorCombineExtPtr)(unit, - incomingRGB, GR_FUNC_MODE_X, - GR_CMBX_ZERO, GR_FUNC_MODE_ZERO, - GR_CMBX_ZERO, FXTRUE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); - } - else { - /* Rv = Rf + Tt */ - (*grTexColorCombineExtPtr)(unit, - incomingRGB, GR_FUNC_MODE_X, - GR_CMBX_LOCAL_TEXTURE_RGB, GR_FUNC_MODE_X, - GR_CMBX_ZERO, FXTRUE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); - } - /* Setup Alpha combiner */ - if (baseFormat == GL_LUMINANCE || baseFormat == GL_RGB) { - /* Av = Af */ - (*grTexAlphaCombineExtPtr)(unit, - incomingAlpha, GR_FUNC_MODE_X, - GR_CMBX_ITALPHA, GR_FUNC_MODE_ZERO, - GR_CMBX_ZERO, FXTRUE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); - } - else if (baseFormat == GL_INTENSITY) { - /* Av = Af + It */ - (*grTexAlphaCombineExtPtr)(unit, - incomingAlpha, GR_FUNC_MODE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GR_FUNC_MODE_X, - GR_CMBX_ZERO, FXTRUE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); - } - else { - /* Av = Af * At */ - (*grTexAlphaCombineExtPtr)(unit, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GR_FUNC_MODE_X, - GR_CMBX_ITALPHA, GR_FUNC_MODE_ZERO, - incomingAlpha, FXFALSE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); - } - break; - case GL_COMBINE_EXT: - { - FxU32 A_RGB, B_RGB, C_RGB, D_RGB; - FxU32 Amode_RGB, Bmode_RGB; - FxBool Cinv_RGB, Dinv_RGB, Ginv_RGB; - FxU32 Shift_RGB; - FxU32 A_A, B_A, C_A, D_A; - FxU32 Amode_A, Bmode_A; - FxBool Cinv_A, Dinv_A, Ginv_A; - FxU32 Shift_A; - /* - * - * In the formulas below, we write: - * o "1(x)" for the identity function applied to x, - * so 1(x) = x. - * o "0(x)" for the constant function 0, so - * 0(x) = 0 for all values of x. - * - * Calculate the color combination. - */ - Shift_RGB = texUnit->CombineScaleShiftRGB; - Shift_A = texUnit->CombineScaleShiftA; - switch (texUnit->CombineModeRGB) { - case GL_REPLACE: - /* - * The formula is: Arg0 - * We implement this by the formula: - * (Arg0 + 0(0))*(1-0) + 0 - */ - TEXENV_SETUP_ARG_RGB(A_RGB, - texUnit->CombineSourceRGB[0], - texUnit->CombineOperandRGB[0], - incomingRGB, incomingAlpha); - TEXENV_SETUP_MODE_RGB(Amode_RGB, - texUnit->CombineOperandRGB[0]); - B_RGB = C_RGB = D_RGB = GR_CMBX_ZERO; - Bmode_RGB = GR_FUNC_MODE_ZERO; - Cinv_RGB = FXTRUE; - Dinv_RGB = Ginv_RGB = FXFALSE; - break; - case GL_MODULATE: - /* - * The formula is: Arg0 * Arg1 - * - * We implement this by the formula - * (Arg0 + 0(0)) * Arg1 + 0(0) - */ - TEXENV_SETUP_ARG_RGB(A_RGB, - texUnit->CombineSourceRGB[0], - texUnit->CombineOperandRGB[0], - incomingRGB, incomingAlpha); - TEXENV_SETUP_MODE_RGB(Amode_RGB, - texUnit->CombineOperandRGB[0]); - B_RGB = GR_CMBX_ZERO; - Bmode_RGB = GR_CMBX_ZERO; - TEXENV_SETUP_ARG_RGB(C_RGB, - texUnit->CombineSourceRGB[1], - texUnit->CombineOperandRGB[1], - incomingRGB, incomingAlpha); - Cinv_RGB = TEXENV_OPERAND_INVERTED - (texUnit->CombineOperandRGB[1]); - D_RGB = GR_CMBX_ZERO; - Dinv_RGB = Ginv_RGB = FXFALSE; - break; - case GL_ADD: - /* - * The formula is Arg0 + Arg1 - */ - TEXENV_SETUP_ARG_RGB(A_RGB, - texUnit->CombineSourceRGB[0], - texUnit->CombineOperandRGB[0], - incomingRGB, incomingAlpha); - TEXENV_SETUP_MODE_RGB(Amode_RGB, - texUnit->CombineOperandRGB[0]); - TEXENV_SETUP_ARG_RGB(B_RGB, - texUnit->CombineSourceRGB[1], - texUnit->CombineOperandRGB[1], - incomingRGB, incomingAlpha); - TEXENV_SETUP_MODE_RGB(Bmode_RGB, - texUnit->CombineOperandRGB[1]); - C_RGB = D_RGB = GR_CMBX_ZERO; - Cinv_RGB = FXTRUE; - Dinv_RGB = Ginv_RGB = FXFALSE; - break; - case GL_ADD_SIGNED_EXT: - /* - * The formula is: Arg0 + Arg1 - 0.5. - * We compute this by calculating: - * (Arg0 - 1/2) + Arg1 if op0 is SRC_{COLOR,ALPHA} - * Arg0 + (Arg1 - 1/2) if op1 is SRC_{COLOR,ALPHA} - * If both op0 and op1 are ONE_MINUS_SRC_{COLOR,ALPHA} - * we cannot implement the formula properly. - */ - TEXENV_SETUP_ARG_RGB(A_RGB, - texUnit->CombineSourceRGB[0], - texUnit->CombineOperandRGB[0], - incomingRGB, incomingAlpha); - TEXENV_SETUP_ARG_RGB(B_RGB, - texUnit->CombineSourceRGB[1], - texUnit->CombineOperandRGB[1], - incomingRGB, incomingAlpha); - if (!TEXENV_OPERAND_INVERTED(texUnit->CombineOperandRGB[0])) { - /* - * A is not inverted. So, choose it. - */ - Amode_RGB = GR_FUNC_MODE_X_MINUS_HALF; - if (!TEXENV_OPERAND_INVERTED - (texUnit->CombineOperandRGB[1])) { - Bmode_RGB = GR_FUNC_MODE_X; - } else { - Bmode_RGB = GR_FUNC_MODE_ONE_MINUS_X; - } - } else { - /* - * A is inverted, so try to subtract 1/2 - * from B. - */ - Amode_RGB = GR_FUNC_MODE_ONE_MINUS_X; - if (!TEXENV_OPERAND_INVERTED - (texUnit->CombineOperandRGB[1])) { - Bmode_RGB = GR_FUNC_MODE_X_MINUS_HALF; - } else { - /* - * Both are inverted. This is the case - * we cannot handle properly. We just - * choose to not add the - 1/2. - */ - Bmode_RGB = GR_FUNC_MODE_ONE_MINUS_X; - } - } - C_RGB = D_RGB = GR_CMBX_ZERO; - Cinv_RGB = FXTRUE; - Dinv_RGB = Ginv_RGB = FXFALSE; - break; - case GL_INTERPOLATE_EXT: - /* - * The formula is: Arg0 * Arg2 + Arg1 * (1 - Arg2). - * We compute this by the formula: - * (Arg0 - Arg1) * Arg2 + Arg1 - * == Arg0 * Arg2 - Arg1 * Arg2 + Arg1 - * == Arg0 * Arg2 + Arg1 * (1 - Arg2) - * However, if both Arg1 is ONE_MINUS_X, the HW does - * not support it properly. - */ - TEXENV_SETUP_ARG_RGB(A_RGB, - texUnit->CombineSourceRGB[0], - texUnit->CombineOperandRGB[0], - incomingRGB, incomingAlpha); - TEXENV_SETUP_MODE_RGB(Amode_RGB, - texUnit->CombineOperandRGB[0]); - TEXENV_SETUP_ARG_RGB(B_RGB, - texUnit->CombineSourceRGB[1], - texUnit->CombineOperandRGB[1], - incomingRGB, incomingAlpha); - if (!TEXENV_OPERAND_INVERTED(texUnit->CombineOperandRGB[1])) { - Bmode_RGB = GR_FUNC_MODE_NEGATIVE_X; - } else { - /* - * This case is wrong. - */ - Bmode_RGB = GR_FUNC_MODE_NEGATIVE_X; - } - /* - * The Source/Operand for the C value must - * specify some kind of alpha value. - */ - TEXENV_SETUP_ARG_A(C_RGB, - texUnit->CombineSourceRGB[2], - texUnit->CombineOperandRGB[2], - incomingAlpha); - Cinv_RGB = FXFALSE; - D_RGB = GR_CMBX_B; - Dinv_RGB = Ginv_RGB = FXFALSE; - break; - default: - /* - * This is here mostly to keep from getting - * a compiler warning about these not being set. - * However, this should set all the texture values - * to zero. - */ - A_RGB = B_RGB = C_RGB = D_RGB = GR_CMBX_ZERO; - Amode_RGB = Bmode_RGB = GR_FUNC_MODE_X; - Cinv_RGB = Dinv_RGB = Ginv_RGB = FXFALSE; - break; - } - /* - * Calculate the alpha combination. - */ - switch (texUnit->CombineModeA) { - case GL_REPLACE: - /* - * The formula is: Arg0 - * We implement this by the formula: - * (Arg0 + 0(0))*(1-0) + 0 - */ - TEXENV_SETUP_ARG_A(A_A, - texUnit->CombineSourceA[0], - texUnit->CombineOperandA[0], - incomingAlpha); - TEXENV_SETUP_MODE_A(Amode_A, - texUnit->CombineOperandA[0]); - B_A = C_A = D_A = GR_CMBX_ZERO; - Bmode_A = GR_FUNC_MODE_ZERO; - Cinv_A = FXTRUE; - Dinv_A = Ginv_A = FXFALSE; - break; - case GL_MODULATE: - /* - * The formula is: Arg0 * Arg1 - * - * We implement this by the formula - * (Arg0 + 0(0)) * Arg1 + 0(0) - */ - TEXENV_SETUP_ARG_A(A_A, - texUnit->CombineSourceA[0], - texUnit->CombineOperandA[0], - incomingAlpha); - TEXENV_SETUP_MODE_A(Amode_A, - texUnit->CombineOperandA[0]); - B_A = GR_CMBX_ZERO; - Bmode_A = GR_CMBX_ZERO; - TEXENV_SETUP_ARG_A(C_A, - texUnit->CombineSourceA[1], - texUnit->CombineOperandA[1], - incomingAlpha); - Cinv_A = TEXENV_OPERAND_INVERTED - (texUnit->CombineOperandA[1]); - D_A = GR_CMBX_ZERO; - Dinv_A = Ginv_A = FXFALSE; - break; - case GL_ADD: - /* - * The formula is Arg0 + Arg1 - */ - TEXENV_SETUP_ARG_A(A_A, - texUnit->CombineSourceA[0], - texUnit->CombineOperandA[0], - incomingAlpha); - TEXENV_SETUP_MODE_A(Amode_A, - texUnit->CombineOperandA[0]); - TEXENV_SETUP_ARG_A(B_A, - texUnit->CombineSourceA[1], - texUnit->CombineOperandA[1], - incomingAlpha); - TEXENV_SETUP_MODE_A(Bmode_A, - texUnit->CombineOperandA[0]); - C_A = D_A = GR_CMBX_ZERO; - Cinv_A = FXTRUE; - Dinv_A = Ginv_A = FXFALSE; - break; - case GL_ADD_SIGNED_EXT: - /* - * The formula is: Arg0 + Arg1 - 0.5. - * We compute this by calculating: - * (Arg0 - 1/2) + Arg1 if op0 is SRC_{COLOR,ALPHA} - * Arg0 + (Arg1 - 1/2) if op1 is SRC_{COLOR,ALPHA} - * If both op0 and op1 are ONE_MINUS_SRC_{COLOR,ALPHA} - * we cannot implement the formula properly. - */ - TEXENV_SETUP_ARG_A(A_A, - texUnit->CombineSourceA[0], - texUnit->CombineOperandA[0], - incomingAlpha); - TEXENV_SETUP_ARG_A(B_A, - texUnit->CombineSourceA[1], - texUnit->CombineOperandA[1], - incomingAlpha); - if (!TEXENV_OPERAND_INVERTED(texUnit->CombineOperandA[0])) { - /* - * A is not inverted. So, choose it. - */ - Amode_A = GR_FUNC_MODE_X_MINUS_HALF; - if (!TEXENV_OPERAND_INVERTED - (texUnit->CombineOperandA[1])) { - Bmode_A = GR_FUNC_MODE_X; - } else { - Bmode_A = GR_FUNC_MODE_ONE_MINUS_X; - } - } else { - /* - * A is inverted, so try to subtract 1/2 - * from B. - */ - Amode_A = GR_FUNC_MODE_ONE_MINUS_X; - if (!TEXENV_OPERAND_INVERTED - (texUnit->CombineOperandA[1])) { - Bmode_A = GR_FUNC_MODE_X_MINUS_HALF; - } else { - /* - * Both are inverted. This is the case - * we cannot handle properly. We just - * choose to not add the - 1/2. - */ - Bmode_A = GR_FUNC_MODE_ONE_MINUS_X; - } - } - C_A = D_A = GR_CMBX_ZERO; - Cinv_A = FXTRUE; - Dinv_A = Ginv_A = FXFALSE; - break; - case GL_INTERPOLATE_EXT: - /* - * The formula is: Arg0 * Arg2 + Arg1 * (1 - Arg2). - * We compute this by the formula: - * (Arg0 - Arg1) * Arg2 + Arg1 - * == Arg0 * Arg2 - Arg1 * Arg2 + Arg1 - * == Arg0 * Arg2 + Arg1 * (1 - Arg2) - * However, if both Arg1 is ONE_MINUS_X, the HW does - * not support it properly. - */ - TEXENV_SETUP_ARG_A(A_A, - texUnit->CombineSourceA[0], - texUnit->CombineOperandA[0], - incomingAlpha); - TEXENV_SETUP_MODE_A(Amode_A, - texUnit->CombineOperandA[0]); - TEXENV_SETUP_ARG_A(B_A, - texUnit->CombineSourceA[1], - texUnit->CombineOperandA[1], - incomingAlpha); - if (!TEXENV_OPERAND_INVERTED(texUnit->CombineOperandA[1])) { - Bmode_A = GR_FUNC_MODE_NEGATIVE_X; - } else { - /* - * This case is wrong. - */ - Bmode_A = GR_FUNC_MODE_NEGATIVE_X; - } - /* - * The Source/Operand for the C value must - * specify some kind of alpha value. - */ - TEXENV_SETUP_ARG_A(C_A, - texUnit->CombineSourceA[2], - texUnit->CombineOperandA[2], - incomingAlpha); - Cinv_A = FXFALSE; - D_A = GR_CMBX_ZERO; - Dinv_A = Ginv_A = FXFALSE; - break; - default: - /* - * This is here mostly to keep from getting - * a compiler warning about these not being set. - * However, this should set all the alpha values - * to one. - */ - A_A = B_A = C_A = D_A = GR_CMBX_ZERO; - Amode_A = Bmode_A = GR_FUNC_MODE_X; - Cinv_A = Dinv_A = FXFALSE; - Ginv_A = FXTRUE; - break; - } - /* - * Call the functions. - */ - (*grTexColorCombineExtPtr)(unit, - A_RGB, Amode_RGB, - B_RGB, Bmode_RGB, - C_RGB, Cinv_RGB, - D_RGB, Dinv_RGB, - Shift_RGB, Ginv_RGB); - (*grTexAlphaCombineExtPtr)(unit, - A_A, Amode_A, - B_A, Bmode_A, - C_A, Cinv_A, - D_A, Dinv_A, - Shift_A, Ginv_A); - } - break; - default: - gl_problem(ctx, "Bad baseFormat in SetupTexEnvNapalm"); - } - - /* setup Color and Alpha combine always the same */ - (*grColorCombineExtPtr)(GR_CMBX_TEXTURE_RGB, GR_FUNC_MODE_X, - GR_CMBX_ZERO, GR_FUNC_MODE_X, - GR_CMBX_ZERO, FXTRUE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); - (*grAlphaCombineExtPtr)(GR_CMBX_TEXTURE_ALPHA, GR_FUNC_MODE_X, - GR_CMBX_ZERO, GR_FUNC_MODE_X, - GR_CMBX_ZERO, FXTRUE, - GR_CMBX_ZERO, FXFALSE, - 0, FXFALSE); -} - - -static void -fxSetupTextureSingleTMU_NoLock(GLcontext * ctx, GLuint textureset) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLuint unitsmode; - GLint ifmt; - tfxTexInfo *ti; - struct gl_texture_object *tObj = - ctx->Texture.Unit[textureset].CurrentD[2]; - int tmu; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxSetupTextureSingleTMU(...) Start\n"); - } - - ti = fxTMGetTexInfo(tObj); - fxTexValidate(ctx, tObj); - - fxSetupSingleTMU_NoLock(fxMesa, tObj); - - if (ti->whichTMU == FX_TMU_BOTH) - tmu = FX_TMU0; - else - tmu = ti->whichTMU; - - if (fxMesa->tmuSrc != tmu) - fxSelectSingleTMUSrc_NoLock(fxMesa, tmu, ti->LODblend); - - fxMesa->stw_hint_state = 0; - FX_grHints_NoLock(GR_HINT_STWHINT, 0); - - ifmt = ti->baseLevelInternalFormat; - - if (/*0*/fxMesa->isNapalm) { - SetupTexEnvNapalm(ctx, tmu, GL_TRUE, - &(ctx->Texture.Unit[textureset]), - ti->baseLevelInternalFormat); - } - else { - GLboolean iteratedRGBA = GL_FALSE; - if (textureset == 0 || !fxMesa->haveTwoTMUs) - unitsmode = fxGetTexSetConfiguration(ctx, tObj, NULL); - else - unitsmode = fxGetTexSetConfiguration(ctx, NULL, tObj); - if ((unitsmode & FX_UM_ALPHA_ITERATED) || - (unitsmode & FX_UM_COLOR_ITERATED)) { - iteratedRGBA = GL_TRUE; - } - SetupTexEnvVoodoo3(ctx, tmu, iteratedRGBA, - ctx->Texture.Unit[textureset].EnvMode, - ti->baseLevelInternalFormat); - } - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxSetupTextureSingleTMU(...) End\n"); - } -} - - -static void -fxSetupTextureSingleTMU(GLcontext * ctx, GLuint textureset) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - BEGIN_BOARD_LOCK(fxMesa); - fxSetupTextureSingleTMU_NoLock(ctx, textureset); - END_BOARD_LOCK(fxMesa); -} - -/************************* Double Texture Set ***************************/ - -static void -fxSetupDoubleTMU_NoLock(fxMesaContext fxMesa, - struct gl_texture_object *tObj0, - struct gl_texture_object *tObj1) -{ -#define T0_NOT_IN_TMU 0x01 -#define T1_NOT_IN_TMU 0x02 -#define T0_IN_TMU0 0x04 -#define T1_IN_TMU0 0x08 -#define T0_IN_TMU1 0x10 -#define T1_IN_TMU1 0x20 - - const struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; - const struct TdfxSharedState *shared = (struct TdfxSharedState *) mesaShared->DriverData; - const GLcontext *ctx = fxMesa->glCtx; - tfxTexInfo *ti0 = fxTMGetTexInfo(tObj0); - tfxTexInfo *ti1 = fxTMGetTexInfo(tObj1); - GLuint tstate = 0; - int tmu0 = 0, tmu1 = 1; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxSetupDoubleTMU(...)\n"); - } - - /* We shouldn't need to do this. There is something wrong with - mutlitexturing when the TMUs are swapped. So, we're forcing - them to always be loaded correctly. !!! */ - if (ti0->whichTMU == FX_TMU1) - fxTMMoveOutTM_NoLock(fxMesa, tObj0); - if (ti1->whichTMU == FX_TMU0) - fxTMMoveOutTM_NoLock(fxMesa, tObj1); - - if (ti0->isInTM) { - switch (ti0->whichTMU) { - case FX_TMU0: - tstate |= T0_IN_TMU0; - break; - case FX_TMU1: - tstate |= T0_IN_TMU1; - break; - case FX_TMU_BOTH: - tstate |= T0_IN_TMU0 | T0_IN_TMU1; - break; - case FX_TMU_SPLIT: - tstate |= T0_NOT_IN_TMU; - break; - } - } - else - tstate |= T0_NOT_IN_TMU; - - if (ti1->isInTM) { - switch (ti1->whichTMU) { - case FX_TMU0: - tstate |= T1_IN_TMU0; - break; - case FX_TMU1: - tstate |= T1_IN_TMU1; - break; - case FX_TMU_BOTH: - tstate |= T1_IN_TMU0 | T1_IN_TMU1; - break; - case FX_TMU_SPLIT: - tstate |= T1_NOT_IN_TMU; - break; - } - } - else - tstate |= T1_NOT_IN_TMU; - - ti0->lastTimeUsed = fxMesa->texBindNumber; - ti1->lastTimeUsed = fxMesa->texBindNumber; - - /* Move texture maps into TMUs */ - - if (!(((tstate & T0_IN_TMU0) && (tstate & T1_IN_TMU1)) || - ((tstate & T0_IN_TMU1) && (tstate & T1_IN_TMU0)))) { - if (tObj0 == tObj1) { - if (shared->umaTexMemory) - fxTMMoveInTM_NoLock(fxMesa, tObj1, FX_TMU0); - else - fxTMMoveInTM_NoLock(fxMesa, tObj1, FX_TMU_BOTH); - } - else { - /* Find the minimal way to correct the situation */ - if ((tstate & T0_IN_TMU0) || (tstate & T1_IN_TMU1)) { - /* We have one in the standard order, setup the other */ - if (tstate & T0_IN_TMU0) { /* T0 is in TMU0, put T1 in TMU1 */ - if (shared->umaTexMemory) - fxTMMoveInTM_NoLock(fxMesa, tObj1, FX_TMU0); - else - fxTMMoveInTM_NoLock(fxMesa, tObj1, FX_TMU1); - } - else { - fxTMMoveInTM_NoLock(fxMesa, tObj0, FX_TMU0); - } - /* tmu0 and tmu1 are setup */ - } - else if ((tstate & T0_IN_TMU1) || (tstate & T1_IN_TMU0)) { - /* we have one in the reverse order, setup the other */ - if (tstate & T1_IN_TMU0) { /* T1 is in TMU0, put T0 in TMU1 */ - if (shared->umaTexMemory) - fxTMMoveInTM_NoLock(fxMesa, tObj0, FX_TMU0); - else - fxTMMoveInTM_NoLock(fxMesa, tObj0, FX_TMU1); - } - else { - fxTMMoveInTM_NoLock(fxMesa, tObj1, FX_TMU0); - } - tmu0 = 1; - tmu1 = 0; - } - else { /* Nothing is loaded */ - fxTMMoveInTM_NoLock(fxMesa, tObj0, FX_TMU0); - if (shared->umaTexMemory) - fxTMMoveInTM_NoLock(fxMesa, tObj1, FX_TMU0); - else - fxTMMoveInTM_NoLock(fxMesa, tObj1, FX_TMU1); - /* tmu0 and tmu1 are setup */ - } - } - } - - if (!ctx->Texture.SharedPalette) { - if (ti0->info.format == GR_TEXFMT_P_8) { - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: uploading texture palette TMU0\n"); - } - FX_grTexDownloadTable_NoLock(tmu0, GR_TEXTABLE_PALETTE_6666_EXT, - &(ti0->palette)); - } - - if (ti1->info.format == GR_TEXFMT_P_8) { - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: uploading texture palette TMU1\n"); - } - FX_grTexDownloadTable_NoLock(tmu1, GR_TEXTABLE_PALETTE_6666_EXT, - &(ti1->palette)); - } - } - - FX_grTexSource_NoLock(tmu0, ti0->tm[tmu0]->startAddr, - GR_MIPMAPLEVELMASK_BOTH, &(ti0->info)); - FX_grTexClampMode_NoLock(tmu0, ti0->sClamp, ti0->tClamp); - FX_grTexFilterMode_NoLock(tmu0, ti0->minFilt, ti0->maxFilt); - FX_grTexMipMapMode_NoLock(tmu0, ti0->mmMode, FXFALSE); - - if (shared->umaTexMemory) - FX_grTexSource_NoLock(tmu1, ti1->tm[tmu0]->startAddr, - GR_MIPMAPLEVELMASK_BOTH, &(ti1->info)); - else - FX_grTexSource_NoLock(tmu1, ti1->tm[tmu1]->startAddr, - GR_MIPMAPLEVELMASK_BOTH, &(ti1->info)); - - FX_grTexClampMode_NoLock(tmu1, ti1->sClamp, ti1->tClamp); - FX_grTexFilterMode_NoLock(tmu1, ti1->minFilt, ti1->maxFilt); - FX_grTexMipMapMode_NoLock(tmu1, ti1->mmMode, FXFALSE); - -#undef T0_NOT_IN_TMU -#undef T1_NOT_IN_TMU -#undef T0_IN_TMU0 -#undef T1_IN_TMU0 -#undef T0_IN_TMU1 -#undef T1_IN_TMU1 -} - -static void -fxSetupTextureDoubleTMU_NoLock(GLcontext * ctx) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GrCombineLocal_t localc, locala; - tfxTexInfo *ti0, *ti1; - struct gl_texture_object *tObj0 = ctx->Texture.Unit[0].CurrentD[2]; - struct gl_texture_object *tObj1 = ctx->Texture.Unit[1].CurrentD[2]; - GLuint envmode, ifmt, unitsmode; - int tmu0 = 0, tmu1 = 1; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxSetupTextureDoubleTMU(...) Start\n"); - } - - ti0 = fxTMGetTexInfo(tObj0); - fxTexValidate(ctx, tObj0); - - ti1 = fxTMGetTexInfo(tObj1); - fxTexValidate(ctx, tObj1); - - fxSetupDoubleTMU_NoLock(fxMesa, tObj0, tObj1); - - unitsmode = fxGetTexSetConfiguration(ctx, tObj0, tObj1); - - fxMesa->stw_hint_state |= GR_STWHINT_ST_DIFF_TMU1; - FX_grHints_NoLock(GR_HINT_STWHINT, fxMesa->stw_hint_state); - - envmode = unitsmode & FX_UM_E_ENVMODE; - ifmt = unitsmode & FX_UM_E_IFMT; - - if (unitsmode & FX_UM_ALPHA_ITERATED) - locala = GR_COMBINE_LOCAL_ITERATED; - else - locala = GR_COMBINE_LOCAL_CONSTANT; - - if (unitsmode & FX_UM_COLOR_ITERATED) - localc = GR_COMBINE_LOCAL_ITERATED; - else - localc = GR_COMBINE_LOCAL_CONSTANT; - - - if (MESA_VERBOSE & (VERBOSE_DRIVER | VERBOSE_TEXTURE)) - fprintf(stderr, "fxMesa: fxSetupTextureDoubleTMU, envmode is %s/%s\n", - gl_lookup_enum_by_nr(ctx->Texture.Unit[0].EnvMode), - gl_lookup_enum_by_nr(ctx->Texture.Unit[1].EnvMode)); - - - if ((ti0->whichTMU == FX_TMU1) || (ti1->whichTMU == FX_TMU0)) { - tmu0 = 1; - tmu1 = 0; - } - fxMesa->tmuSrc = FX_TMU_BOTH; - - if (fxMesa->isNapalm) { - /* Remember, Glide has its texture units numbered in backward - * order compared to OpenGL. - */ - SetupTexEnvNapalm(ctx, FX_TMU1, GL_TRUE, &(ctx->Texture.Unit[0]), - ti0->baseLevelInternalFormat); - SetupTexEnvNapalm(ctx, FX_TMU0, GL_FALSE, &(ctx->Texture.Unit[1]), - ti1->baseLevelInternalFormat); - } - else { - switch (envmode) { - case (FX_UM_E0_MODULATE | FX_UM_E1_MODULATE): - { - GLboolean isalpha[FX_NUM_TMU]; - - if (ti0->baseLevelInternalFormat == GL_ALPHA) - isalpha[tmu0] = GL_TRUE; - else - isalpha[tmu0] = GL_FALSE; - - if (ti1->baseLevelInternalFormat == GL_ALPHA) - isalpha[tmu1] = GL_TRUE; - else - isalpha[tmu1] = GL_FALSE; - - if (isalpha[FX_TMU1]) - FX_grTexCombine_NoLock(GR_TMU1, - GR_COMBINE_FUNCTION_ZERO, - GR_COMBINE_FACTOR_NONE, - GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, FXTRUE, - FXFALSE); - else - FX_grTexCombine_NoLock(GR_TMU1, GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, FXFALSE, - FXFALSE); - - if (isalpha[FX_TMU0]) - FX_grTexCombine_NoLock(GR_TMU0, - GR_COMBINE_FUNCTION_BLEND_OTHER, - GR_COMBINE_FACTOR_ONE, - GR_COMBINE_FUNCTION_BLEND_OTHER, - GR_COMBINE_FACTOR_LOCAL, FXFALSE, - FXFALSE); - else - FX_grTexCombine_NoLock(GR_TMU0, - GR_COMBINE_FUNCTION_BLEND_OTHER, - GR_COMBINE_FACTOR_LOCAL, - GR_COMBINE_FUNCTION_BLEND_OTHER, - GR_COMBINE_FACTOR_LOCAL, FXFALSE, - FXFALSE); - - FX_grColorCombine_NoLock(GR_COMBINE_FUNCTION_SCALE_OTHER, - GR_COMBINE_FACTOR_LOCAL, - localc, GR_COMBINE_OTHER_TEXTURE, - FXFALSE); - - FX_grAlphaCombine_NoLock(GR_COMBINE_FUNCTION_SCALE_OTHER, - GR_COMBINE_FACTOR_LOCAL, - locala, GR_COMBINE_OTHER_TEXTURE, - FXFALSE); - break; - } - case (FX_UM_E0_REPLACE | FX_UM_E1_BLEND): /* Only for GLQuake */ - if (tmu1 == FX_TMU1) { - FX_grTexCombine_NoLock(GR_TMU1, - GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, FXTRUE, FXFALSE); - - FX_grTexCombine_NoLock(GR_TMU0, - GR_COMBINE_FUNCTION_BLEND_OTHER, - GR_COMBINE_FACTOR_LOCAL, - GR_COMBINE_FUNCTION_BLEND_OTHER, - GR_COMBINE_FACTOR_LOCAL, FXFALSE, FXFALSE); - } - else { - FX_grTexCombine_NoLock(GR_TMU1, - GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, FXFALSE, FXFALSE); - - FX_grTexCombine_NoLock(GR_TMU0, - GR_COMBINE_FUNCTION_BLEND_OTHER, - GR_COMBINE_FACTOR_ONE_MINUS_LOCAL, - GR_COMBINE_FUNCTION_BLEND_OTHER, - GR_COMBINE_FACTOR_ONE_MINUS_LOCAL, - FXFALSE, FXFALSE); - } - - FX_grAlphaCombine_NoLock(GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - locala, GR_COMBINE_OTHER_NONE, FXFALSE); - - FX_grColorCombine_NoLock(GR_COMBINE_FUNCTION_SCALE_OTHER, - GR_COMBINE_FACTOR_ONE, - localc, GR_COMBINE_OTHER_TEXTURE, FXFALSE); - break; - case (FX_UM_E0_REPLACE | FX_UM_E1_MODULATE): /* Quake 2 and 3 */ - if (tmu1 == FX_TMU1) { - FX_grTexCombine_NoLock(GR_TMU1, - GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - GR_COMBINE_FUNCTION_ZERO, - GR_COMBINE_FACTOR_NONE, FXFALSE, FXTRUE); - - FX_grTexCombine_NoLock(GR_TMU0, - GR_COMBINE_FUNCTION_BLEND_OTHER, - GR_COMBINE_FACTOR_LOCAL, - GR_COMBINE_FUNCTION_BLEND_OTHER, - GR_COMBINE_FACTOR_LOCAL, FXFALSE, FXFALSE); - - } - else { - FX_grTexCombine_NoLock(GR_TMU1, - GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, FXFALSE, FXFALSE); - - FX_grTexCombine_NoLock(GR_TMU0, - GR_COMBINE_FUNCTION_BLEND_OTHER, - GR_COMBINE_FACTOR_LOCAL, - GR_COMBINE_FUNCTION_BLEND_OTHER, - GR_COMBINE_FACTOR_ONE, FXFALSE, FXFALSE); - } - - if (ti0->baseLevelInternalFormat == GL_RGB) - FX_grAlphaCombine_NoLock(GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - locala, GR_COMBINE_OTHER_NONE, FXFALSE); - else - FX_grAlphaCombine_NoLock(GR_COMBINE_FUNCTION_SCALE_OTHER, - GR_COMBINE_FACTOR_ONE, - locala, GR_COMBINE_OTHER_NONE, FXFALSE); - - - FX_grColorCombine_NoLock(GR_COMBINE_FUNCTION_SCALE_OTHER, - GR_COMBINE_FACTOR_ONE, - localc, GR_COMBINE_OTHER_TEXTURE, FXFALSE); - break; - - - case (FX_UM_E0_MODULATE | FX_UM_E1_ADD): /* Quake 3 Sky */ - { - GLboolean isalpha[FX_NUM_TMU]; - - if (ti0->baseLevelInternalFormat == GL_ALPHA) - isalpha[tmu0] = GL_TRUE; - else - isalpha[tmu0] = GL_FALSE; - - if (ti1->baseLevelInternalFormat == GL_ALPHA) - isalpha[tmu1] = GL_TRUE; - else - isalpha[tmu1] = GL_FALSE; - - if (isalpha[FX_TMU1]) - FX_grTexCombine_NoLock(GR_TMU1, - GR_COMBINE_FUNCTION_ZERO, - GR_COMBINE_FACTOR_NONE, - GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, FXTRUE, - FXFALSE); - else - FX_grTexCombine_NoLock(GR_TMU1, GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, FXFALSE, - FXFALSE); - - if (isalpha[FX_TMU0]) - FX_grTexCombine_NoLock(GR_TMU0, - GR_COMBINE_FUNCTION_SCALE_OTHER, - GR_COMBINE_FACTOR_ONE, - GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL, - GR_COMBINE_FACTOR_ONE, FXFALSE, - FXFALSE); - else - FX_grTexCombine_NoLock(GR_TMU0, - GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL, - GR_COMBINE_FACTOR_ONE, - GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL, - GR_COMBINE_FACTOR_ONE, FXFALSE, - FXFALSE); - - FX_grColorCombine_NoLock(GR_COMBINE_FUNCTION_SCALE_OTHER, - GR_COMBINE_FACTOR_LOCAL, - localc, GR_COMBINE_OTHER_TEXTURE, - FXFALSE); - - FX_grAlphaCombine_NoLock(GR_COMBINE_FUNCTION_SCALE_OTHER, - GR_COMBINE_FACTOR_LOCAL, - locala, GR_COMBINE_OTHER_TEXTURE, - FXFALSE); - break; - } - default: - fprintf(stderr, "Unexpected dual texture mode encountered\n"); - break; - } - } - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxSetupTextureDoubleTMU(...) End\n"); - } -} - -/************************* No Texture ***************************/ - -static void -fxSetupTextureNone_NoLock(GLcontext * ctx) -{ - /*fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx;*/ - GrCombineLocal_t localc, locala; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxSetupTextureNone(...)\n"); - } - - if ((ctx->Light.ShadeModel == GL_SMOOTH) || 1 || - (ctx->Point.SmoothFlag) || - (ctx->Line.SmoothFlag) || - (ctx->Polygon.SmoothFlag)) locala = GR_COMBINE_LOCAL_ITERATED; - else - locala = GR_COMBINE_LOCAL_CONSTANT; - - if (ctx->Light.ShadeModel == GL_SMOOTH || 1) - localc = GR_COMBINE_LOCAL_ITERATED; - else - localc = GR_COMBINE_LOCAL_CONSTANT; - - FX_grAlphaCombine_NoLock(GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - locala, GR_COMBINE_OTHER_NONE, FXFALSE); - - FX_grColorCombine_NoLock(GR_COMBINE_FUNCTION_LOCAL, - GR_COMBINE_FACTOR_NONE, - localc, GR_COMBINE_OTHER_NONE, FXFALSE); -} - -/************************************************************************/ -/************************** Texture Mode SetUp **************************/ -/************************************************************************/ - -static void -fxSetupTexture_NoLock(GLcontext * ctx) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLuint tex2Denabled; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxSetupTexture(...)\n"); - } - - /* Disable multipass texturing. - */ - ctx->Driver.MultipassFunc = 0; - - /* Texture Combine, Color Combine and Alpha Combine. - */ - tex2Denabled = (ctx->Texture.ReallyEnabled & TEXTURE0_2D); - - if (fxMesa->emulateTwoTMUs) - tex2Denabled |= (ctx->Texture.ReallyEnabled & TEXTURE1_2D); - - switch (tex2Denabled) { - case TEXTURE0_2D: - fxSetupTextureSingleTMU_NoLock(ctx, 0); - break; - case TEXTURE1_2D: - fxSetupTextureSingleTMU_NoLock(ctx, 1); - break; - case (TEXTURE0_2D | TEXTURE1_2D): - if (fxMesa->haveTwoTMUs) - fxSetupTextureDoubleTMU_NoLock(ctx); - else { - if (MESA_VERBOSE & VERBOSE_DRIVER) - fprintf(stderr, "fxmesa: enabling fake multitexture\n"); - - fxSetupTextureSingleTMU_NoLock(ctx, 0); - ctx->Driver.MultipassFunc = fxMultipassTexture; - } - break; - default: - fxSetupTextureNone_NoLock(ctx); - break; - } -} - -static void -fxSetupTexture(GLcontext * ctx) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - BEGIN_BOARD_LOCK(fxMesa); - fxSetupTexture_NoLock(ctx); - END_BOARD_LOCK(fxMesa); -} - -/************************************************************************/ -/**************************** Blend SetUp *******************************/ -/************************************************************************/ - -void -fxDDBlendFunc(GLcontext * ctx, GLenum sfactor, GLenum dfactor) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - tfxUnitsState *us = &fxMesa->unitsState; - GrAlphaBlendFnc_t sfact, dfact, asfact, adfact; - - /* From the Glide documentation: - For alpha source and destination blend function factor - parameters, Voodoo Graphics supports only - GR_BLEND_ZERO and GR_BLEND_ONE. - */ - - switch (sfactor) { - case GL_ZERO: - asfact = sfact = GR_BLEND_ZERO; - break; - case GL_ONE: - asfact = sfact = GR_BLEND_ONE; - break; - case GL_DST_COLOR: - sfact = GR_BLEND_DST_COLOR; - asfact = GR_BLEND_ONE; - break; - case GL_ONE_MINUS_DST_COLOR: - sfact = GR_BLEND_ONE_MINUS_DST_COLOR; - asfact = GR_BLEND_ONE; - break; - case GL_SRC_ALPHA: - sfact = GR_BLEND_SRC_ALPHA; - asfact = GR_BLEND_ONE; - break; - case GL_ONE_MINUS_SRC_ALPHA: - sfact = GR_BLEND_ONE_MINUS_SRC_ALPHA; - asfact = GR_BLEND_ONE; - break; - case GL_DST_ALPHA: - sfact = GR_BLEND_DST_ALPHA; - asfact = GR_BLEND_ONE; - break; - case GL_ONE_MINUS_DST_ALPHA: - sfact = GR_BLEND_ONE_MINUS_DST_ALPHA; - asfact = GR_BLEND_ONE; - break; - case GL_SRC_ALPHA_SATURATE: - sfact = GR_BLEND_ALPHA_SATURATE; - asfact = GR_BLEND_ONE; - break; - case GL_SRC_COLOR: - case GL_ONE_MINUS_SRC_COLOR: - /* USELESS */ - asfact = sfact = GR_BLEND_ONE; - break; - default: - asfact = sfact = GR_BLEND_ONE; - break; - } - - if ((sfact != us->blendSrcFuncRGB) || (asfact != us->blendSrcFuncAlpha)) { - us->blendSrcFuncRGB = sfact; - us->blendSrcFuncAlpha = asfact; - fxMesa->new_state |= FX_NEW_BLEND; - ctx->Driver.RenderStart = fxSetupFXUnits; - } - - switch (dfactor) { - case GL_ZERO: - adfact = dfact = GR_BLEND_ZERO; - break; - case GL_ONE: - adfact = dfact = GR_BLEND_ONE; - break; - case GL_SRC_COLOR: - dfact = GR_BLEND_SRC_COLOR; - adfact = GR_BLEND_ZERO; - break; - case GL_ONE_MINUS_SRC_COLOR: - dfact = GR_BLEND_ONE_MINUS_SRC_COLOR; - adfact = GR_BLEND_ZERO; - break; - case GL_SRC_ALPHA: - dfact = GR_BLEND_SRC_ALPHA; - adfact = GR_BLEND_ZERO; - break; - case GL_ONE_MINUS_SRC_ALPHA: - dfact = GR_BLEND_ONE_MINUS_SRC_ALPHA; - adfact = GR_BLEND_ZERO; - break; - case GL_DST_ALPHA: - /* dfact=GR_BLEND_DST_ALPHA; */ - /* We can't do DST_ALPHA */ - dfact = GR_BLEND_ONE; - adfact = GR_BLEND_ZERO; - break; - case GL_ONE_MINUS_DST_ALPHA: - /* dfact=GR_BLEND_ONE_MINUS_DST_ALPHA; */ - /* We can't do DST_ALPHA */ - dfact = GR_BLEND_ZERO; - adfact = GR_BLEND_ZERO; - break; - case GL_SRC_ALPHA_SATURATE: - case GL_DST_COLOR: - case GL_ONE_MINUS_DST_COLOR: - /* USELESS */ - adfact = dfact = GR_BLEND_ZERO; - break; - default: - adfact = dfact = GR_BLEND_ZERO; - break; - } - - if ((dfact != us->blendDstFuncRGB) || (adfact != us->blendDstFuncAlpha)) { - us->blendDstFuncRGB = dfact; - us->blendDstFuncAlpha = adfact; - fxMesa->new_state |= FX_NEW_BLEND; - ctx->Driver.RenderStart = fxSetupFXUnits; - } -} - - -/* XXX not done yet, but it looks do-able in the hardware */ -void -fxDDBlendFuncSeparate(GLcontext *ctx, - GLenum sfactorRGB, GLenum sfactorA, - GLenum dfactorRGB, GLenum dfactorA) -{ -#if 000 - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - tfxUnitsState *us = &fxMesa->unitsState; - GrAlphaBlendFnc_t sfact, dfact, asfact, adfact; - - /* From the Glide documentation: - For alpha source and destination blend function factor - parameters, Voodoo Graphics supports only - GR_BLEND_ZERO and GR_BLEND_ONE. - */ - - switch (sfactor) { - case GL_ZERO: - asfact = sfact = GR_BLEND_ZERO; - break; - case GL_ONE: - asfact = sfact = GR_BLEND_ONE; - break; - case GL_DST_COLOR: - sfact = GR_BLEND_DST_COLOR; - asfact = GR_BLEND_ONE; - break; - case GL_ONE_MINUS_DST_COLOR: - sfact = GR_BLEND_ONE_MINUS_DST_COLOR; - asfact = GR_BLEND_ONE; - break; - case GL_SRC_ALPHA: - sfact = GR_BLEND_SRC_ALPHA; - asfact = GR_BLEND_ONE; - break; - case GL_ONE_MINUS_SRC_ALPHA: - sfact = GR_BLEND_ONE_MINUS_SRC_ALPHA; - asfact = GR_BLEND_ONE; - break; - case GL_DST_ALPHA: - sfact = GR_BLEND_DST_ALPHA; - asfact = GR_BLEND_ONE; - break; - case GL_ONE_MINUS_DST_ALPHA: - sfact = GR_BLEND_ONE_MINUS_DST_ALPHA; - asfact = GR_BLEND_ONE; - break; - case GL_SRC_ALPHA_SATURATE: - sfact = GR_BLEND_ALPHA_SATURATE; - asfact = GR_BLEND_ONE; - break; - case GL_SRC_COLOR: - case GL_ONE_MINUS_SRC_COLOR: - /* USELESS */ - asfact = sfact = GR_BLEND_ONE; - break; - default: - asfact = sfact = GR_BLEND_ONE; - break; - } - - if ((sfact != us->blendSrcFuncRGB) || (asfact != us->blendSrcFuncAlpha)) { - us->blendSrcFuncRGB = sfact; - us->blendSrcFuncAlpha = asfact; - fxMesa->new_state |= FX_NEW_BLEND; - ctx->Driver.RenderStart = fxSetupFXUnits; - } - - switch (dfactor) { - case GL_ZERO: - adfact = dfact = GR_BLEND_ZERO; - break; - case GL_ONE: - adfact = dfact = GR_BLEND_ONE; - break; - case GL_SRC_COLOR: - dfact = GR_BLEND_SRC_COLOR; - adfact = GR_BLEND_ZERO; - break; - case GL_ONE_MINUS_SRC_COLOR: - dfact = GR_BLEND_ONE_MINUS_SRC_COLOR; - adfact = GR_BLEND_ZERO; - break; - case GL_SRC_ALPHA: - dfact = GR_BLEND_SRC_ALPHA; - adfact = GR_BLEND_ZERO; - break; - case GL_ONE_MINUS_SRC_ALPHA: - dfact = GR_BLEND_ONE_MINUS_SRC_ALPHA; - adfact = GR_BLEND_ZERO; - break; - case GL_DST_ALPHA: - /* dfact=GR_BLEND_DST_ALPHA; */ - /* We can't do DST_ALPHA */ - dfact = GR_BLEND_ONE; - adfact = GR_BLEND_ZERO; - break; - case GL_ONE_MINUS_DST_ALPHA: - /* dfact=GR_BLEND_ONE_MINUS_DST_ALPHA; */ - /* We can't do DST_ALPHA */ - dfact = GR_BLEND_ZERO; - adfact = GR_BLEND_ZERO; - break; - case GL_SRC_ALPHA_SATURATE: - case GL_DST_COLOR: - case GL_ONE_MINUS_DST_COLOR: - /* USELESS */ - adfact = dfact = GR_BLEND_ZERO; - break; - default: - adfact = dfact = GR_BLEND_ZERO; - break; - } - - if ((dfact != us->blendDstFuncRGB) || (adfact != us->blendDstFuncAlpha)) { - us->blendDstFuncRGB = dfact; - us->blendDstFuncAlpha = adfact; - fxMesa->new_state |= FX_NEW_BLEND; - ctx->Driver.RenderStart = fxSetupFXUnits; - } -#endif -} - - -static void -fxSetupBlend(GLcontext * ctx) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - tfxUnitsState *us = &fxMesa->unitsState; - - if (us->blendEnabled) - FX_grAlphaBlendFunction(us->blendSrcFuncRGB, us->blendDstFuncRGB, - us->blendSrcFuncAlpha, us->blendDstFuncAlpha); - else - FX_grAlphaBlendFunction(GR_BLEND_ONE, GR_BLEND_ZERO, - GR_BLEND_ONE, GR_BLEND_ZERO); -} - - -/************************************************************************/ -/************************** Alpha Test SetUp ****************************/ -/************************************************************************/ - -void -fxDDAlphaFunc(GLcontext * ctx, GLenum func, GLclampf ref) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - tfxUnitsState *us = &fxMesa->unitsState; - GrCmpFnc_t newfunc; - - switch (func) { - case GL_NEVER: - newfunc = GR_CMP_NEVER; - break; - case GL_LESS: - newfunc = GR_CMP_LESS; - break; - case GL_EQUAL: - newfunc = GR_CMP_EQUAL; - break; - case GL_LEQUAL: - newfunc = GR_CMP_LEQUAL; - break; - case GL_GREATER: - newfunc = GR_CMP_GREATER; - break; - case GL_NOTEQUAL: - newfunc = GR_CMP_NOTEQUAL; - break; - case GL_GEQUAL: - newfunc = GR_CMP_GEQUAL; - break; - case GL_ALWAYS: - newfunc = GR_CMP_ALWAYS; - break; - default: - gl_problem(ctx, "fx Driver: internal error in fxDDAlphaFunc()\n"); - return; - } - - if (newfunc != us->alphaTestFunc) { - us->alphaTestFunc = newfunc; - fxMesa->new_state |= FX_NEW_ALPHA; - ctx->Driver.RenderStart = fxSetupFXUnits; - } - - if (ctx->Color.AlphaRef != us->alphaTestRefValue) { - us->alphaTestRefValue = ctx->Color.AlphaRef; - fxMesa->new_state |= FX_NEW_ALPHA; - ctx->Driver.RenderStart = fxSetupFXUnits; - } -} - -static void -fxSetupAlphaTest(GLcontext * ctx) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - tfxUnitsState *us = &fxMesa->unitsState; - - if (us->alphaTestEnabled) { - FX_grAlphaTestFunction(fxMesa, us->alphaTestFunc); - FX_grAlphaTestReferenceValue(fxMesa, us->alphaTestRefValue); - } - else - FX_grAlphaTestFunction(fxMesa, GR_CMP_ALWAYS); -} - - -/* - * Evaluate all depth-test state and make the Glide calls. - */ -static void -fxSetupDepthTest(GLcontext * ctx) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - if (ctx->Depth.Test) { - GrCmpFnc_t dfunc; - switch (ctx->Depth.Func) { - case GL_NEVER: - dfunc = GR_CMP_NEVER; - break; - case GL_LESS: - dfunc = GR_CMP_LESS; - break; - case GL_GEQUAL: - dfunc = GR_CMP_GEQUAL; - break; - case GL_LEQUAL: - dfunc = GR_CMP_LEQUAL; - break; - case GL_GREATER: - dfunc = GR_CMP_GREATER; - break; - case GL_NOTEQUAL: - dfunc = GR_CMP_NOTEQUAL; - break; - case GL_EQUAL: - dfunc = GR_CMP_EQUAL; - break; - case GL_ALWAYS: - dfunc = GR_CMP_ALWAYS; - break; - default: - gl_problem(ctx, "bad depth mode in fxSetupDepthTest"); - dfunc = GR_CMP_ALWAYS; - } - FX_grDepthBufferFunction(fxMesa, dfunc); - FX_grDepthMask(fxMesa, ctx->Depth.Mask); - } - else { - /* depth test always passes, don't update Z buffer */ - FX_grDepthBufferFunction(fxMesa, GR_CMP_ALWAYS); - FX_grDepthMask(fxMesa, FXFALSE); - } -} - - -/* - * Evaluate all stencil state and make the Glide calls. - */ -GrStencil_t -fxConvertGLStencilOp(GLenum op) -{ - switch (op) { - case GL_KEEP: - return GR_STENCILOP_KEEP; - case GL_ZERO: - return GR_STENCILOP_ZERO; - case GL_REPLACE: - return GR_STENCILOP_REPLACE; - case GL_INCR: - return GR_STENCILOP_INCR_CLAMP; - case GL_DECR: - return GR_STENCILOP_DECR_CLAMP; - case GL_INVERT: - return GR_STENCILOP_INVERT; - default: - gl_problem(NULL, "bad stencil op in fxConvertGLStencilOp"); - } - return GR_STENCILOP_KEEP; /* never get, silence compiler warning */ -} - -/* - * This function is called just before any rendering is done. - * It will validate the stencil parameters. - */ -static void -fxSetupStencilTest(GLcontext * ctx) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - if (fxMesa->haveHwStencil) { - if (ctx->Stencil.Enabled) { - GrStencil_t sfail = fxConvertGLStencilOp(ctx->Stencil.FailFunc); - GrStencil_t zfail = fxConvertGLStencilOp(ctx->Stencil.ZFailFunc); - GrStencil_t zpass = fxConvertGLStencilOp(ctx->Stencil.ZPassFunc); - FX_grStencilOp(fxMesa, sfail, zfail, zpass); - FX_grStencilFunc(fxMesa, ctx->Stencil.Function - GL_NEVER, - ctx->Stencil.Ref, ctx->Stencil.ValueMask); - FX_grStencilMask(fxMesa, ctx->Stencil.WriteMask); - FX_grEnable(fxMesa, GR_STENCIL_MODE_EXT); - } - else { - FX_grDisable(fxMesa, GR_STENCIL_MODE_EXT); - } - } -} - - -/* - * Set the state so that stencil is either enabled or disabled. - * This is called from Mesa only. Glide is invoked at - * setup time, not now. - */ -static void -fxDDEnableStencil(GLcontext * ctx, GLboolean state) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - (void) state; - fxMesa->new_state |= FX_NEW_STENCIL; - ctx->Driver.RenderStart = fxSetupFXUnits; -} - - -/************************************************************************/ -/**************************** Color Mask SetUp **************************/ -/************************************************************************/ - -GLboolean -fxDDColorMask(GLcontext *ctx, - GLboolean r, GLboolean g, GLboolean b, GLboolean a) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - fxMesa->new_state |= FX_NEW_COLOR_MASK; - ctx->Driver.RenderStart = fxSetupFXUnits; - (void) r; - (void) g; - (void) b; - (void) a; - return GL_FALSE; -} - -static void -fxSetupColorMask(GLcontext *ctx) -{ - if (ctx->Color.DrawBuffer == GL_NONE) { - FX_grColorMask(ctx, GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); - } - else { - fxMesaContext fxMesa = FX_CONTEXT(ctx); - /* XXX need to call grRenderBuffer to work around strange mask bug */ - FX_grRenderBuffer(fxMesa, fxMesa->currentFB); - FX_grColorMaskv(ctx, ctx->Color.ColorMask); - } -} - - -/************************************************************************/ -/**************************** Fog Mode SetUp ****************************/ -/************************************************************************/ - -/* - * This is called during state update in order to update the Glide fog state. - */ -static void -fxSetupFog(GLcontext * ctx) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - if (ctx->Fog.Enabled && ctx->FogMode == FOG_FRAGMENT) { - - /* update fog color */ - GLubyte col[4]; - col[0] = (unsigned int) (255 * ctx->Fog.Color[0]); - col[1] = (unsigned int) (255 * ctx->Fog.Color[1]); - col[2] = (unsigned int) (255 * ctx->Fog.Color[2]); - col[3] = (unsigned int) (255 * ctx->Fog.Color[3]); - FX_grFogColorValue(fxMesa, FXCOLOR4(col)); - - if (fxMesa->fogTableMode != ctx->Fog.Mode || - fxMesa->fogDensity != ctx->Fog.Density || - fxMesa->fogStart != ctx->Fog.Start || - fxMesa->fogEnd != ctx->Fog.End) { - /* reload the fog table */ - switch (ctx->Fog.Mode) { - case GL_LINEAR: - guFogGenerateLinear(fxMesa->fogTable, ctx->Fog.Start, - ctx->Fog.End); - break; - case GL_EXP: - guFogGenerateExp(fxMesa->fogTable, ctx->Fog.Density); - break; - case GL_EXP2: - guFogGenerateExp2(fxMesa->fogTable, ctx->Fog.Density); - break; - default: - ; - } - fxMesa->fogTableMode = ctx->Fog.Mode; - fxMesa->fogDensity = ctx->Fog.Density; - fxMesa->fogStart = ctx->Fog.Start; - fxMesa->fogEnd = ctx->Fog.End; - } - - FX_grFogTable(fxMesa, fxMesa->fogTable); - FX_grFogMode(fxMesa, GR_FOG_WITH_TABLE); - } - else { - FX_grFogMode(fxMesa, GR_FOG_DISABLE); - } -} - -void -fxDDFogfv(GLcontext * ctx, GLenum pname, const GLfloat * params) -{ - FX_CONTEXT(ctx)->new_state |= FX_NEW_FOG; - ctx->Driver.RenderStart = fxSetupFXUnits; /* XXX why is this here? */ -} - -/************************************************************************/ -/************************** Scissor Test SetUp **************************/ -/************************************************************************/ - -/* This routine is used in managing the lock state, and therefore can't lock */ -void -fxSetScissorValues(GLcontext * ctx) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - int xmin, xmax, ymin, ymax; - - if (ctx->Scissor.Enabled) { - xmin = ctx->Scissor.X; - xmax = ctx->Scissor.X + ctx->Scissor.Width; - ymin = ctx->Scissor.Y; - ymax = ctx->Scissor.Y + ctx->Scissor.Height; - } - else { - xmin = 0; - ymin = 0; - xmax = fxMesa->width; - ymax = fxMesa->height; - } - /* translate to screen coords */ - xmin += fxMesa->x_offset; - xmax += fxMesa->x_offset; - ymin += fxMesa->y_delta; - ymax += fxMesa->y_delta; - - /* intersect scissor region with first clip rect */ - if (xmin < fxMesa->clipMinX) - xmin = fxMesa->clipMinX; - else if (xmin > fxMesa->clipMaxX) - xmin = fxMesa->clipMaxX; - - if (xmax > fxMesa->clipMaxX) - xmax = fxMesa->clipMaxX; - - if (ymin < fxMesa->screen_height - fxMesa->clipMaxY) - ymin = fxMesa->screen_height - fxMesa->clipMaxY; - else if (ymin > fxMesa->screen_height - fxMesa->clipMinY) - ymin = fxMesa->screen_height - fxMesa->clipMinY; - - if (ymax > fxMesa->screen_height - fxMesa->clipMinY) - ymax = fxMesa->screen_height - fxMesa->clipMinY; - - /* prevent wrap-around problems */ - if (xmax < xmin) - xmax = xmin; - if (ymax < ymin) - ymax = ymin; - - FX_grClipWindow_NoLock(xmin, ymin, xmax, ymax); -} - -static void -fxSetupScissor(GLcontext * ctx) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - if (!fxMesa->needClip) { - BEGIN_BOARD_LOCK(fxMesa); - fxSetScissorValues(ctx); - END_BOARD_LOCK(fxMesa); - } -} - -void -fxDDScissor(GLcontext * ctx, GLint x, GLint y, GLsizei w, GLsizei h) -{ - FX_CONTEXT(ctx)->new_state |= FX_NEW_SCISSOR; - ctx->Driver.RenderStart = fxSetupFXUnits; -} - -/************************************************************************/ -/*************************** Cull mode setup ****************************/ -/************************************************************************/ - - -void -fxDDCullFace(GLcontext * ctx, GLenum mode) -{ - (void) mode; - FX_CONTEXT(ctx)->new_state |= FX_NEW_CULL; - ctx->Driver.RenderStart = fxSetupFXUnits; -} - -void -fxDDFrontFace(GLcontext * ctx, GLenum mode) -{ - (void) mode; - FX_CONTEXT(ctx)->new_state |= FX_NEW_CULL; - ctx->Driver.RenderStart = fxSetupFXUnits; -} - - -static void -fxSetupCull(GLcontext * ctx) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - if (ctx->Polygon.CullFlag) { - switch (ctx->Polygon.CullFaceMode) { - case GL_BACK: - if (ctx->Polygon.FrontFace == GL_CCW) - FX_CONTEXT(ctx)->cullMode = GR_CULL_NEGATIVE; - else - FX_CONTEXT(ctx)->cullMode = GR_CULL_POSITIVE; - break; - case GL_FRONT: - if (ctx->Polygon.FrontFace == GL_CCW) - FX_CONTEXT(ctx)->cullMode = GR_CULL_POSITIVE; - else - FX_CONTEXT(ctx)->cullMode = GR_CULL_NEGATIVE; - break; - case GL_FRONT_AND_BACK: - FX_CONTEXT(ctx)->cullMode = GR_CULL_DISABLE; - break; - default: - break; - } - } - else { - FX_CONTEXT(ctx)->cullMode = GR_CULL_DISABLE; - } - FX_grCullMode(fxMesa, FX_CONTEXT(ctx)->cullMode); -} - - -/************************************************************************/ -/****************************** DD Enable ******************************/ -/************************************************************************/ - -void -fxDDEnable(GLcontext * ctx, GLenum cap, GLboolean state) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - tfxUnitsState *us = &fxMesa->unitsState; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDEnable(...)\n"); - } - - switch (cap) { - case GL_ALPHA_TEST: - if (state != us->alphaTestEnabled) { - us->alphaTestEnabled = state; - fxMesa->new_state |= FX_NEW_ALPHA; - ctx->Driver.RenderStart = fxSetupFXUnits; - } - break; - case GL_BLEND: - if (state != us->blendEnabled) { - us->blendEnabled = state; - fxMesa->new_state |= FX_NEW_BLEND; - ctx->Driver.RenderStart = fxSetupFXUnits; - } - break; - case GL_DEPTH_TEST: - fxMesa->new_state |= FX_NEW_DEPTH; - ctx->Driver.RenderStart = fxSetupFXUnits; - break; - case GL_DITHER: - if (state) - FX_grDitherMode(fxMesa, GR_DITHER_4x4); - else - FX_grDitherMode(fxMesa, GR_DITHER_DISABLE); - break; - case GL_SCISSOR_TEST: - fxMesa->new_state |= FX_NEW_SCISSOR; - ctx->Driver.RenderStart = fxSetupFXUnits; - break; - case GL_SHARED_TEXTURE_PALETTE_EXT: - fxDDTexUseGlbPalette(ctx, state); - break; - case GL_FOG: - fxMesa->new_state |= FX_NEW_FOG; - ctx->Driver.RenderStart = fxSetupFXUnits; - break; - case GL_CULL_FACE: - fxMesa->new_state |= FX_NEW_CULL; - ctx->Driver.RenderStart = fxSetupFXUnits; - break; - case GL_LINE_SMOOTH: - case GL_LINE_STIPPLE: - case GL_POINT_SMOOTH: - case GL_POLYGON_SMOOTH: - case GL_TEXTURE_2D: - fxMesa->new_state |= FX_NEW_TEXTURING; - ctx->Driver.RenderStart = fxSetupFXUnits; - break; - case GL_STENCIL_TEST: - fxMesa->new_state |= FX_NEW_STENCIL; - ctx->Driver.RenderStart = fxSetupFXUnits; - break; - default: - ; /* no-op */ - } -} - - -#if 0 -/* - Multipass to do GL_BLEND texture functions - Cf*(1-Ct) has already been written to the buffer during the first pass - Cc*Ct gets written during the second pass (in this function) - Everything gets reset in the third call (in this function) -*/ -static GLboolean -fxMultipassBlend(struct vertex_buffer *VB, GLuint pass) -{ - GLcontext *ctx = VB->ctx; - fxMesaContext fxMesa = FX_CONTEXT(ctx); - - switch (pass) { - case 1: - /* Add Cc*Ct */ - fxMesa->restoreUnitsState = fxMesa->unitsState; - if (ctx->Depth.Mask) { - /* We don't want to check or change the depth buffers */ - switch (ctx->Depth.Func) { - case GL_NEVER: - case GL_ALWAYS: - break; - default: - fxDDDepthFunc(ctx, GL_EQUAL); - break; - } - fxDDDepthMask(ctx, FALSE); - } - /* - * Disable stencil as well. - */ - if (ctx->Stencil.Enabled) { - fxDDEnableStencil(ctx, GL_FALSE); - } - /* Enable Cc*Ct mode */ - /* XXX Set the Constant Color ? */ - fxDDEnable(ctx, GL_BLEND, GL_TRUE); - fxDDBlendFunc(ctx, XXX, XXX); - fxSetupTextureSingleTMU(ctx, XXX); - fxSetupBlend(ctx); - fxSetupDepthTest(ctx); - break; - - case 2: - /* Reset everything back to normal */ - fxMesa->unitsState = fxMesa->restoreUnitsState; - fxMesa->setupdone &= XXX; - fxSetupTextureSingleTMU(ctx, XXX); - fxSetupBlend(ctx); - fxSetupDepthTest(ctx); - fxSetupStencilText(ctx); - break; - } - - return pass == 1; -} -#endif - -/************************************************************************/ -/******************** Fake Multitexture Support *************************/ -/************************************************************************/ - -/* Its considered cheeky to try to fake ARB multitexture by doing - * multipass rendering, because it is not possible to emulate the full - * spec in this way. The fact is that the voodoo 2 supports only a - * subset of the possible multitexturing modes, and it is possible to - * support almost the same subset using multipass blending on the - * voodoo 1. In all other cases for both voodoo 1 and 2, we fall back - * to software rendering, satisfying the spec if not the user. - */ -static GLboolean -fxMultipassTexture(struct vertex_buffer *VB, GLuint pass) -{ - GLcontext *ctx = VB->ctx; - fxVertex *v = FX_DRIVER_DATA(VB)->verts; - fxVertex *last = FX_DRIVER_DATA(VB)->last_vert; - fxMesaContext fxMesa = FX_CONTEXT(ctx); - - switch (pass) { - case 1: - if (MESA_VERBOSE & - (VERBOSE_DRIVER | VERBOSE_PIPELINE | VERBOSE_TEXTURE)) - fprintf(stderr, "fxmesa: Second texture pass\n"); - - for (; v != last; v++) { - v->f[S0COORD] = v->f[S1COORD]; - v->f[T0COORD] = v->f[T1COORD]; - } - - fxMesa->restoreUnitsState = fxMesa->unitsState; - fxMesa->tmu_source[0] = 1; - - if (ctx->Depth.Mask) { - switch (ctx->Depth.Func) { - case GL_NEVER: - case GL_ALWAYS: - break; - default: - /*fxDDDepthFunc( ctx, GL_EQUAL ); */ - FX_grDepthBufferFunction(fxMesa, GR_CMP_EQUAL); - break; - } - - /*fxDDDepthMask( ctx, GL_FALSE ); */ - FX_grDepthMask(fxMesa, FXFALSE); - } - fxDDEnableStencil(ctx, GL_FALSE); - if (ctx->Texture.Unit[1].EnvMode == GL_MODULATE) { - fxDDEnable(ctx, GL_BLEND, GL_TRUE); - fxDDBlendFunc(ctx, GL_DST_COLOR, GL_ZERO); - } - - fxSetupTextureSingleTMU(ctx, 1); - fxSetupBlend(ctx); - fxSetupDepthTest(ctx); - break; - - case 2: - /* Restore original state. - */ - fxMesa->tmu_source[0] = 0; - fxMesa->unitsState = fxMesa->restoreUnitsState; - fxMesa->setupdone &= ~SETUP_TMU0; - fxSetupTextureSingleTMU(ctx, 0); - fxSetupBlend(ctx); - fxSetupDepthTest(ctx); - fxSetupStencilTest(ctx); - break; - } - - return pass == 1; -} - - -/************************************************************************/ -/************************** Changes to units state **********************/ -/************************************************************************/ - - -/* All units setup is handled under texture setup. - */ -void -fxDDShadeModel(GLcontext * ctx, GLenum mode) -{ - FX_CONTEXT(ctx)->new_state |= FX_NEW_TEXTURING; - ctx->Driver.RenderStart = fxSetupFXUnits; -} - - - -/************************************************************************/ -/****************************** Units SetUp *****************************/ -/************************************************************************/ -static void -gl_print_fx_state_flags(const char *msg, GLuint flags) -{ - fprintf(stderr, - "%s: (0x%x) %s%s%s%s%s%s%s\n", - msg, - flags, - (flags & FX_NEW_TEXTURING) ? "texture, " : "", - (flags & FX_NEW_BLEND) ? "blend, " : "", - (flags & FX_NEW_ALPHA) ? "alpha, " : "", - (flags & FX_NEW_FOG) ? "fog, " : "", - (flags & FX_NEW_SCISSOR) ? "scissor, " : "", - (flags & FX_NEW_COLOR_MASK) ? "colormask, " : "", - (flags & FX_NEW_CULL) ? "cull, " : ""); -} - -void -fxSetupFXUnits(GLcontext * ctx) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLuint newstate = fxMesa->new_state; - - if (MESA_VERBOSE & VERBOSE_DRIVER) - gl_print_fx_state_flags("fxmesa: fxSetupFXUnits", newstate); - - if (newstate) { - if (newstate & FX_NEW_TEXTURING) - fxSetupTexture(ctx); - - if (newstate & FX_NEW_BLEND) - fxSetupBlend(ctx); - - if (newstate & FX_NEW_ALPHA) - fxSetupAlphaTest(ctx); - - if (newstate & FX_NEW_DEPTH) - fxSetupDepthTest(ctx); - - if (newstate & FX_NEW_STENCIL) - fxSetupStencilTest(ctx); - - if (newstate & FX_NEW_FOG) - fxSetupFog(ctx); - - if (newstate & FX_NEW_SCISSOR) - fxSetupScissor(ctx); - - if (newstate & FX_NEW_COLOR_MASK) - fxSetupColorMask(ctx); - - if (newstate & FX_NEW_CULL) - fxSetupCull(ctx); - fxMesa->new_state = 0; -/* ctx->Driver.RenderStart = 0; */ - } -} Index: xc/lib/GL/mesa/src/drv/tdfx/fxsetup.h diff -u xc/lib/GL/mesa/src/drv/tdfx/fxsetup.h:1.2 xc/lib/GL/mesa/src/drv/tdfx/fxsetup.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxsetup.h:1.2 Fri Dec 8 14:36:23 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxsetup.h Mon Jun 4 12:37:39 2001 @@ -1,36 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxsetup.h,v 1.2 2000/12/08 19:36:23 alanh Exp $ */ -#ifndef FXSETUP_H -#define FXSETUP_H - -extern void fxTexValidate(GLcontext * ctx, struct gl_texture_object *tObj); - -extern void fxDDEnable(GLcontext *, GLenum, GLboolean); - -extern void fxDDAlphaFunc(GLcontext *, GLenum, GLclampf); - -extern void fxDDBlendFunc(GLcontext *, GLenum, GLenum); - -extern void fxDDBlendFuncSeparate(GLcontext *ctx, - GLenum sfactorRGB, GLenum sfactorA, - GLenum dfactorRGB, GLenum dfactorA); - -extern GrStencil_t fxConvertGLStencilOp(GLenum op); - -extern void fxDDScissor(GLcontext *ctx, - GLint x, GLint y, GLsizei w, GLsizei h); - -extern void fxDDFogfv(GLcontext *ctx, GLenum pname, const GLfloat * params); - -extern GLboolean fxDDColorMask(GLcontext *ctx, - GLboolean r, GLboolean g, - GLboolean b, GLboolean a); - -extern void fxDDShadeModel(GLcontext * ctx, GLenum mode); - -extern void fxDDCullFace(GLcontext * ctx, GLenum mode); - -extern void fxDDFrontFace(GLcontext * ctx, GLenum mode); - -extern void fxSetupFXUnits(GLcontext *); - -#endif Index: xc/lib/GL/mesa/src/drv/tdfx/fxstripdet.c diff -u xc/lib/GL/mesa/src/drv/tdfx/fxstripdet.c:1.1 xc/lib/GL/mesa/src/drv/tdfx/fxstripdet.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxstripdet.c:1.1 Sun Sep 24 09:51:19 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxstripdet.c Mon Jun 4 12:37:39 2001 @@ -1,161 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxstripdet.c,v 1.1 2000/09/24 13:51:19 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -#include "fxdrv.h" -#include "vbcull.h" - - -#define STRIP0(u,v) ((u1 == v1) && (u2 == v0)) -#define STRIP1(u,v) ((u0 == v0) && (u2 == v1)) - -#define LOCAL_VARS fxVertex* gWin = FX_DRIVER_DATA(VB)->verts; \ - GrVertex** sb = FX_DRIVER_DATA(VB)->strips_b;\ - fxMesaContext fxMesa = FX_CONTEXT(VB->ctx); - - -#define STRIPSLOCAL_VAR int sc = 0; - -#define INIT(a) - -#define SENDTRI(u0,u1,u2) FX_grDrawTriangle(fxMesa, (GrVertex*)&(gWin[u0].f),(GrVertex*)&(gWin[u1].f),(GrVertex*)&(gWin[u2].f)) -#define FLUSHTRI() /* No-Op */ -#define STARTSTRIPS(u0,u1,u2) { sb[sc++] = (GrVertex*)&(gWin[u0].f); sb[sc++] = (GrVertex*)&(gWin[u1].f); sb[sc++] = (GrVertex*)&(gWin[u2].f); } -#define SENDSTRIPS(v2) { sb[sc++] = (GrVertex*)&(gWin[v2].f); } -#define FLUSHSTRIPS() FX_grDrawVertexArray(fxMesa, GR_TRIANGLE_STRIP,sc,sb) - -#define CLIPPED(a,b,c) 0 -#define CULLED(a,b,c) 0 -#define SENDCLIPTRI(a,b,c) /* NoOp */ - -#define TAG(x) x##_fx - -#include "fxsdettmp.h" - - -/* Clipped but no userclip */ -#define STRIP0(u,v) ((u1 == v1) && (u2 == v0)) && !clipmask[v2] -#define STRIP1(u,v) ((u0 == v0) && (u2 == v1)) && !clipmask[v2] - -#define LOCAL_VARS fxVertex* gWin = FX_DRIVER_DATA(VB)->verts; \ - GrVertex** sb = FX_DRIVER_DATA(VB)->strips_b; \ - const GLubyte *const clipmask = VB->ClipMask; \ - const fxMesaContext fxMesa=(fxMesaContext)VB->ctx->DriverCtx; \ - const tfxTriClipFunc cliptri = fxMesa->clip_tri_stride; - -#define STRIPSLOCAL_VAR int sc = 0; - -#define INIT(a) - -#define SENDTRI(u0,u1,u2) FX_grDrawTriangle(fxMesa, (GrVertex*)&(gWin[u0].f),(GrVertex*)&(gWin[u1].f),(GrVertex*)&(gWin[u2].f)) -#define FLUSHTRI() /* No-Op */ -#define STARTSTRIPS(u0,u1,u2) { sb[sc++] = (GrVertex*)&(gWin[u0].f); sb[sc++] = (GrVertex*)&(gWin[u1].f); sb[sc++] = (GrVertex*)&(gWin[u2].f); } -#define SENDSTRIPS(v2) { sb[sc++] = (GrVertex*)&(gWin[v2].f); } -#define FLUSHSTRIPS() FX_grDrawVertexArray(fxMesa, GR_TRIANGLE_STRIP,sc,sb) - -#define CLIPPED(u0,u1,u2) (clipmask[u0] | clipmask[u1] | clipmask[u2]) -#define CULLED(u0,u1,u2) (clipmask[u0] & clipmask[u1] & clipmask[u2]) -#define SENDCLIPTRI(u0,u1,u2) { \ - GLuint vl[3]; \ - ASSIGN_3V(vl, u0, u1, u2 ); \ - cliptri(VB,vl,clipmask[u0] | clipmask[u1] | clipmask[u2]); \ - } - -#define TAG(x) x##_fx_view_clipped - -#include "fxsdettmp.h" - -/* Clipped and might be userclip */ -#define STRIP0(u,v) ((u1 == v1) && (u2 == v0)) && !clipmask[v2] -#define STRIP1(u,v) ((u0 == v0) && (u2 == v1)) && !clipmask[v2] - -#define LOCAL_VARS fxVertex* gWin = FX_DRIVER_DATA(VB)->verts; \ - GrVertex** sb = FX_DRIVER_DATA(VB)->strips_b; \ - const GLubyte *const clipmask = VB->ClipMask; \ - const GLubyte *userclipmask = VB->UserClipMask; \ - const fxMesaContext fxMesa=(fxMesaContext)VB->ctx->DriverCtx; \ - const tfxTriClipFunc cliptri = fxMesa->clip_tri_stride; - -#define STRIPSLOCAL_VAR int sc = 0; - -#define INIT(a) - -#define SENDTRI(u0,u1,u2) FX_grDrawTriangle(fxMesa, (GrVertex*)&(gWin[u0].f),(GrVertex*)&(gWin[u1].f),(GrVertex*)&(gWin[u2].f)) -#define FLUSHTRI() /* No-Op */ -#define STARTSTRIPS(u0,u1,u2) { sb[sc++] = (GrVertex*)&(gWin[u0].f); sb[sc++] = (GrVertex*)&(gWin[u1].f); sb[sc++] = (GrVertex*)&(gWin[u2].f); } -#define SENDSTRIPS(v2) { sb[sc++] = (GrVertex*)&(gWin[v2].f); } -#define FLUSHSTRIPS() FX_grDrawVertexArray(fxMesa, GR_TRIANGLE_STRIP,sc,sb) - -#define CLIPPED(u0,u1,u2) (clipmask[u0] | clipmask[u1] | clipmask[u2]) -#define CULLED(u0,u1,u2) (clipmask[u0] & clipmask[u1] & clipmask[u2] & CLIP_ALL_BITS) -#define SENDCLIPTRI(u0,u1,u2) { \ - GLuint vl[3]; \ - GLuint imask = (clipmask[u0] | clipmask[u1] | clipmask[u2]); \ - \ - if (imask & CLIP_USER_BIT) { \ - if (!(userclipmask[u2] & userclipmask[u1] & userclipmask[u0])) \ - { ASSIGN_3V(vl, u2, u1, u0 ); \ - imask |= (userclipmask[u2] | userclipmask[u1] | userclipmask[u0]) << 8; \ - cliptri( VB, vl, imask );} \ - } \ - else { ASSIGN_3V(vl, u2, u1, u0 ); \ - cliptri( VB, vl, imask ); } \ - } - -#define TAG(x) x##_fx_clipped - -#include "fxsdettmp.h" - - -void -fxDDRenderInitGlide3(GLcontext * ctx) -{ -#if 0 - render_tab_fx_smooth_indirect[GL_TRIANGLES] = - render_vb_triangles_smooth_indirect_sd_fx; - render_tab_fx_smooth_indirect_view_clipped[GL_TRIANGLES] = - render_vb_triangles_smooth_indirect_sd_fx_view_clipped; - render_tab_fx_smooth_indirect_clipped[GL_TRIANGLES] = - render_vb_triangles_smooth_indirect_sd_fx_clipped; -#endif -} Index: xc/lib/GL/mesa/src/drv/tdfx/fxtexman.c diff -u xc/lib/GL/mesa/src/drv/tdfx/fxtexman.c:1.3 xc/lib/GL/mesa/src/drv/tdfx/fxtexman.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxtexman.c:1.3 Fri Dec 8 16:34:20 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxtexman.c Mon Jun 4 12:37:39 2001 @@ -1,959 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxtexman.c,v 1.3 2000/12/08 21:34:20 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -/* fxtexman.c - 3Dfx VooDoo texture memory functions */ - - -#include "fxdrv.h" -#include "fxtexman.h" -#include "fxddtex.h" - - -#define BAD_ADDRESS ((FxU32) -1) - - -#ifdef TEXSANITY -static void -fubar(void) -{ -} - -/* - * Sanity Check - */ -static void -sanity(fxMesaContext fxMesa) -{ - MemRange *tmp, *prev, *pos; - - prev = 0; - tmp = fxMesa->tmFree[0]; - while (tmp) { - if (!tmp->startAddr && !tmp->endAddr) { - fprintf(stderr, "Textures fubar\n"); - fubar(); - } - if (tmp->startAddr >= tmp->endAddr) { - fprintf(stderr, "Node fubar\n"); - fubar(); - } - if (prev && (prev->startAddr >= tmp->startAddr || - prev->endAddr > tmp->startAddr)) { - fprintf(stderr, "Sorting fubar\n"); - fubar(); - } - prev = tmp; - tmp = tmp->next; - } - prev = 0; - tmp = fxMesa->tmFree[1]; - while (tmp) { - if (!tmp->startAddr && !tmp->endAddr) { - fprintf(stderr, "Textures fubar\n"); - fubar(); - } - if (tmp->startAddr >= tmp->endAddr) { - fprintf(stderr, "Node fubar\n"); - fubar(); - } - if (prev && (prev->startAddr >= tmp->startAddr || - prev->endAddr > tmp->startAddr)) { - fprintf(stderr, "Sorting fubar\n"); - fubar(); - } - prev = tmp; - tmp = tmp->next; - } -} -#endif - - -/* - * Allocate and initialize a new MemRange struct. - * Try to allocate it from the pool of free MemRange nodes rather than malloc. - */ -static MemRange * -NewRangeNode(fxMesaContext fxMesa, FxU32 start, FxU32 end) -{ - struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; - struct TdfxSharedState *shared = (struct TdfxSharedState *) mesaShared->DriverData; - MemRange *result; - - _glthread_LOCK_MUTEX(mesaShared->Mutex); - if (shared && shared->tmPool) { - result = shared->tmPool; - shared->tmPool = shared->tmPool->next; - } - else { - result = MALLOC(sizeof(MemRange)); - - } - _glthread_UNLOCK_MUTEX(mesaShared->Mutex); - - if (!result) { - /*fprintf(stderr, "fxDriver: out of memory!\n");*/ - return NULL; - } - - result->startAddr = start; - result->endAddr = end; - result->next = NULL; - - return result; -} - - -/* - * Delete a MemRange struct. - * We keep a linked list of free/available MemRange structs to - * avoid extra malloc/free calls. - */ -#if 0 -static void -DeleteRangeNode_NoLock(struct TdfxSharedState *shared, MemRange *range) -{ - /* insert at head of list */ - range->next = shared->tmPool; - shared->tmPool = range; -} -#endif - -#define DELETE_RANGE_NODE(shared, range) \ - (range)->next = (shared)->tmPool; \ - (shared)->tmPool = (range) - - -/* - * When we've run out of texture memory we have to throw out an - * existing texture to make room for the new one. This function - * determins the texture to throw out. - */ -static struct gl_texture_object * -FindOldestObject(fxMesaContext fxMesa, FxU32 tmu) -{ - const GLuint bindnumber = fxMesa->texBindNumber; - struct gl_texture_object *oldestObj, *obj, *lowestPriorityObj; - GLfloat lowestPriority; - GLuint oldestAge; - - oldestObj = NULL; - oldestAge = 0; - - lowestPriority = 1.0F; - lowestPriorityObj = NULL; - - for (obj = fxMesa->glCtx->Shared->TexObjectList; obj; obj = obj->Next) { - tfxTexInfo *info = fxTMGetTexInfo(obj); - - if (info && info->isInTM && - ((info->whichTMU == tmu) || (info->whichTMU == FX_TMU_BOTH) || - (info->whichTMU == FX_TMU_SPLIT))) { - GLuint age, lasttime; - - lasttime = info->lastTimeUsed; - - if (lasttime > bindnumber) - age = bindnumber + (UINT_MAX - lasttime + 1); /* TO DO: check wrap around */ - else - age = bindnumber - lasttime; - - if (age >= oldestAge) { - oldestAge = age; - oldestObj = obj; - } - - /* examine priority */ - if (obj->Priority < lowestPriority) { - lowestPriority = obj->Priority; - lowestPriorityObj = obj; - } - } - } - - if (lowestPriority < 1.0) { - ASSERT(lowestPriorityObj); - /* - printf("discard %d pri=%f\n", lowestPriorityObj->Name, lowestPriority); - */ - return lowestPriorityObj; - } - else { - /* - printf("discard %d age=%d\n", oldestObj->Name, oldestAge); - */ - return oldestObj; - } -} - - -/* - * Find the address (offset?) at which we can store a new texture. - * is the texture unit. - * is the texture size in bytes. - */ -static FxU32 -FindStartAddr(fxMesaContext fxMesa, FxU32 tmu, FxU32 size) -{ - struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; - struct TdfxSharedState *shared = (struct TdfxSharedState *) mesaShared->DriverData; - MemRange *prev, *block; - FxU32 result; - struct gl_texture_object *obj; - - if (shared->umaTexMemory) { - assert(tmu == FX_TMU0); - } - - _glthread_LOCK_MUTEX(mesaShared->Mutex); - while (1) { - prev = NULL; - block = shared->tmFree[tmu]; - while (block) { - if (block->endAddr - block->startAddr >= size) { - /* The texture will fit here */ - result = block->startAddr; - block->startAddr += size; - if (block->startAddr == block->endAddr) { - /* Remove this node since it's empty */ - if (prev) { - prev->next = block->next; - } - else { - shared->tmFree[tmu] = block->next; - } - DELETE_RANGE_NODE(shared, block); - } - shared->freeTexMem[tmu] -= size; - _glthread_UNLOCK_MUTEX(mesaShared->Mutex); - return result; - } - prev = block; - block = block->next; - } - /* No free space. Discard oldest */ - obj = FindOldestObject(fxMesa, tmu); - if (!obj) { - /*gl_problem(NULL, "fx Driver: No space for texture\n");*/ - _glthread_UNLOCK_MUTEX(mesaShared->Mutex); - return BAD_ADDRESS; - } - fxTMMoveOutTM_NoLock(fxMesa, obj); - fxMesa->stats.texSwaps++; - } - - /* never get here, but play it safe */ - _glthread_UNLOCK_MUTEX(mesaShared->Mutex); - return BAD_ADDRESS; -} - - -/* - * Remove the given MemRange node from hardware texture memory. - */ -static void -RemoveRange_NoLock(fxMesaContext fxMesa, FxU32 tmu, MemRange *range) -{ - struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; - struct TdfxSharedState *shared = (struct TdfxSharedState *) mesaShared->DriverData; - MemRange *block, *prev; - - if (shared->umaTexMemory) { - assert(tmu == FX_TMU0); - } - - if (!range) - return; - - if (range->startAddr == range->endAddr) { - DELETE_RANGE_NODE(shared, range); - return; - } - shared->freeTexMem[tmu] += range->endAddr - range->startAddr; - - /* find position in linked list to insert this MemRange node */ - prev = NULL; - block = shared->tmFree[tmu]; - while (block) { - if (range->startAddr > block->startAddr) { - prev = block; - block = block->next; - } - else { - break; - } - } - - /* Insert the free block, combine with adjacent blocks when possible */ - range->next = block; - if (block) { - if (range->endAddr == block->startAddr) { - /* Combine */ - block->startAddr = range->startAddr; - DELETE_RANGE_NODE(shared, range); - range = block; - } - } - if (prev) { - if (prev->endAddr == range->startAddr) { - /* Combine */ - prev->endAddr = range->endAddr; - prev->next = range->next; - DELETE_RANGE_NODE(shared, range); - } - else { - prev->next = range; - } - } - else { - shared->tmFree[tmu] = range; - } -} - - -static void -RemoveRange(fxMesaContext fxMesa, FxU32 tmu, MemRange *range) -{ - struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; - _glthread_LOCK_MUTEX(mesaShared->Mutex); - RemoveRange_NoLock(fxMesa, tmu, range); - _glthread_UNLOCK_MUTEX(mesaShared->Mutex); -} - - -/* - * Allocate space for a texture image. - * is the texture unit - * is the number of bytes to allocate - */ -static MemRange * -AllocTexMem(fxMesaContext fxMesa, FxU32 tmu, FxU32 texmemsize) -{ - FxU32 startAddr = FindStartAddr(fxMesa, tmu, texmemsize); - if (startAddr == BAD_ADDRESS) { - return NULL; - } - else { - MemRange *range; - range = NewRangeNode(fxMesa, startAddr, startAddr + texmemsize); - return range; - } -} - - -/* - * Download (copy) the given texture data into the Voodoo's texture memory. - * The texture memory must have already been allocated. - * Called by fxTMMoveInTM_NoLock() and fxTMRestoreTextures(). - */ -static void -DownloadTexture(fxMesaContext fxMesa, struct gl_texture_object *tObj) -{ - tfxTexInfo *ti = fxTMGetTexInfo(tObj); - int i, l; - FxU32 targetTMU; - - assert(tObj); - assert(ti); - - targetTMU = ti->whichTMU; - - switch (targetTMU) { - case FX_TMU0: - case FX_TMU1: - if (ti->tm[targetTMU]) { - for (i = FX_largeLodValue(ti->info), l = ti->minLevel; - i <= FX_smallLodValue(ti->info); i++, l++) - FX_grTexDownloadMipMapLevel_NoLock(targetTMU, - ti->tm[targetTMU]->startAddr, - FX_valueToLod(i), - FX_largeLodLog2(ti->info), - FX_aspectRatioLog2(ti->info), - ti->info.format, - GR_MIPMAPLEVELMASK_BOTH, - ti->mipmapLevel[l].data); - } - break; - case FX_TMU_SPLIT: - if (ti->tm[FX_TMU0] && ti->tm[FX_TMU1]) { - for (i = FX_largeLodValue(ti->info), l = ti->minLevel; - i <= FX_smallLodValue(ti->info); i++, l++) { - FX_grTexDownloadMipMapLevel_NoLock(GR_TMU0, - ti->tm[FX_TMU0]->startAddr, - FX_valueToLod(i), - FX_largeLodLog2(ti->info), - FX_aspectRatioLog2(ti->info), - ti->info.format, - GR_MIPMAPLEVELMASK_ODD, - ti->mipmapLevel[l].data); - - FX_grTexDownloadMipMapLevel_NoLock(GR_TMU1, - ti->tm[FX_TMU1]->startAddr, - FX_valueToLod(i), - FX_largeLodLog2(ti->info), - FX_aspectRatioLog2(ti->info), - ti->info.format, - GR_MIPMAPLEVELMASK_EVEN, - ti->mipmapLevel[l].data); - } - } - break; - case FX_TMU_BOTH: - if (ti->tm[FX_TMU0] && ti->tm[FX_TMU1]) { - for (i = FX_largeLodValue(ti->info), l = ti->minLevel; - i <= FX_smallLodValue(ti->info); i++, l++) { - FX_grTexDownloadMipMapLevel_NoLock(GR_TMU0, - ti->tm[FX_TMU0]->startAddr, - FX_valueToLod(i), - FX_largeLodLog2(ti->info), - FX_aspectRatioLog2(ti->info), - ti->info.format, - GR_MIPMAPLEVELMASK_BOTH, - ti->mipmapLevel[l].data); - - FX_grTexDownloadMipMapLevel_NoLock(GR_TMU1, - ti->tm[FX_TMU1]->startAddr, - FX_valueToLod(i), - FX_largeLodLog2(ti->info), - FX_aspectRatioLog2(ti->info), - ti->info.format, - GR_MIPMAPLEVELMASK_BOTH, - ti->mipmapLevel[l].data); - } - } - break; - default: - fprintf(stderr, - "fx Driver: internal error in DownloadTexture -> bad tmu (%d)\n", - (int) targetTMU); - return; /* used to abort here */ - } -} - - - -/* - * Allocate space for the given texture in texture memory then - * download (copy) it into that space. - */ -void -fxTMMoveInTM_NoLock(fxMesaContext fxMesa, struct gl_texture_object *tObj, - FxU32 targetTMU) -{ - tfxTexInfo *ti = fxTMGetTexInfo(tObj); - FxU32 texmemsize; - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxTMMoveInTM(%d)\n", tObj->Name); - } - - fxMesa->stats.reqTexUpload++; - - if (!ti->validated) { - gl_problem(NULL, - "fx Driver: internal error in fxTMMoveInTM() -> not validated\n"); - return; /* used to abort here */ - } - - if (ti->isInTM) { - if (ti->whichTMU == targetTMU) - return; - if (targetTMU == FX_TMU_SPLIT || ti->whichTMU == FX_TMU_SPLIT) { - fxTMMoveOutTM_NoLock(fxMesa, tObj); - } - else { - if (ti->whichTMU == FX_TMU_BOTH) - return; - targetTMU = FX_TMU_BOTH; - } - } - - if (MESA_VERBOSE & (VERBOSE_DRIVER | VERBOSE_TEXTURE)) { - fprintf(stderr, - "fxmesa: downloading %x (%d) in texture memory in %d\n", - tObj, tObj->Name, (int) targetTMU); - } - - ti->whichTMU = targetTMU; - - switch (targetTMU) { - case FX_TMU0: - case FX_TMU1: - texmemsize = FX_grTexTextureMemRequired_NoLock(GR_MIPMAPLEVELMASK_BOTH, - &(ti->info)); - ti->tm[targetTMU] = AllocTexMem(fxMesa, targetTMU, texmemsize); - DownloadTexture(fxMesa, tObj); - break; - case FX_TMU_SPLIT: - texmemsize = FX_grTexTextureMemRequired_NoLock(GR_MIPMAPLEVELMASK_ODD, - &(ti->info)); - ti->tm[FX_TMU0] = AllocTexMem(fxMesa, FX_TMU0, texmemsize); - if (ti->tm[FX_TMU0]) - fxMesa->stats.memTexUpload += texmemsize; - - texmemsize = FX_grTexTextureMemRequired_NoLock(GR_MIPMAPLEVELMASK_EVEN, - &(ti->info)); - ti->tm[FX_TMU1] = AllocTexMem(fxMesa, FX_TMU1, texmemsize); - DownloadTexture(fxMesa, tObj); - break; - case FX_TMU_BOTH: - texmemsize = FX_grTexTextureMemRequired_NoLock(GR_MIPMAPLEVELMASK_BOTH, - &(ti->info)); - ti->tm[FX_TMU0] = AllocTexMem(fxMesa, FX_TMU0, texmemsize); - if (ti->tm[FX_TMU0]) - fxMesa->stats.memTexUpload += texmemsize; - - texmemsize = FX_grTexTextureMemRequired_NoLock(GR_MIPMAPLEVELMASK_BOTH, - &(ti->info)); - ti->tm[FX_TMU1] = AllocTexMem(fxMesa, FX_TMU1, texmemsize); - DownloadTexture(fxMesa, tObj); - break; - default: - fprintf(stderr, - "fx Driver: internal error in fxTMMoveInTM() -> bad tmu (%d)\n", - (int) targetTMU); - return; /* used to abort here */ - } - - fxMesa->stats.texUpload++; - - ti->isInTM = GL_TRUE; -} - - -void -fxTMMoveInTM(fxMesaContext fxMesa, struct gl_texture_object *tObj, - FxU32 targetTMU) -{ - BEGIN_BOARD_LOCK(fxMesa); - fxTMMoveInTM_NoLock(fxMesa, tObj, targetTMU); - END_BOARD_LOCK(fxMesa); -} - - -void -fxTMReloadMipMapLevel(GLcontext *ctx, struct gl_texture_object *tObj, - GLint level) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - tfxTexInfo *ti = fxTMGetTexInfo(tObj); - GrLOD_t lodlevel; - FxU32 tmu; - - if (!ti->validated) { - gl_problem(ctx, "internal error in fxTMReloadMipMapLevel() -> not validated\n"); - return; - } - - tmu = ti->whichTMU; - fxTMMoveInTM(fxMesa, tObj, tmu); - - fxTexGetInfo(ctx, ti->mipmapLevel[0].width, ti->mipmapLevel[0].height, - &lodlevel, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - -#ifdef FX_GLIDE3 - lodlevel -= level; -#else - lodlevel += level; -#endif - switch (tmu) { - case FX_TMU0: - case FX_TMU1: - FX_grTexDownloadMipMapLevel(fxMesa, tmu, - ti->tm[tmu]->startAddr, - FX_valueToLod(FX_lodToValue(lodlevel)), - FX_largeLodLog2(ti->info), - FX_aspectRatioLog2(ti->info), - ti->info.format, - GR_MIPMAPLEVELMASK_BOTH, - ti->mipmapLevel[level].data); - break; - case FX_TMU_SPLIT: - FX_grTexDownloadMipMapLevel(fxMesa, GR_TMU0, - ti->tm[GR_TMU0]->startAddr, - FX_valueToLod(FX_lodToValue(lodlevel)), - FX_largeLodLog2(ti->info), - FX_aspectRatioLog2(ti->info), - ti->info.format, - GR_MIPMAPLEVELMASK_ODD, - ti->mipmapLevel[level].data); - - FX_grTexDownloadMipMapLevel(fxMesa, GR_TMU1, - ti->tm[GR_TMU1]->startAddr, - FX_valueToLod(FX_lodToValue(lodlevel)), - FX_largeLodLog2(ti->info), - FX_aspectRatioLog2(ti->info), - ti->info.format, - GR_MIPMAPLEVELMASK_EVEN, - ti->mipmapLevel[level].data); - break; - case FX_TMU_BOTH: - FX_grTexDownloadMipMapLevel(fxMesa, GR_TMU0, - ti->tm[GR_TMU0]->startAddr, - FX_valueToLod(FX_lodToValue(lodlevel)), - FX_largeLodLog2(ti->info), - FX_aspectRatioLog2(ti->info), - ti->info.format, - GR_MIPMAPLEVELMASK_BOTH, - ti->mipmapLevel[level].data); - - FX_grTexDownloadMipMapLevel(fxMesa, GR_TMU1, - ti->tm[GR_TMU1]->startAddr, - FX_valueToLod(FX_lodToValue(lodlevel)), - FX_largeLodLog2(ti->info), - FX_aspectRatioLog2(ti->info), - ti->info.format, - GR_MIPMAPLEVELMASK_BOTH, - ti->mipmapLevel[level].data); - break; - - default: - fprintf(stderr, - "fx Driver: internal error in fxTMReloadMipMapLevel() -> wrong tmu (%d)\n", - (int) tmu); - break; - } -} - -#if 0 -/* - * This doesn't work. It can't work for compressed textures. - */ -void -fxTMReloadSubMipMapLevel(GLcontext *ctx, - struct gl_texture_object *tObj, - GLint level, GLint yoffset, GLint height) -{ - fxMesaContext fxMesa = FX_CONTEXT(ctx); - tfxTexInfo *ti = fxTMGetTexInfo(tObj); - GrLOD_t lodlevel; - unsigned short *data; - GLint tmu; - - if (!ti->validated) { - gl_problem(ctx, "fx Driver: internal error in fxTMReloadSubMipMapLevel() -> not validated\n"); - return; - } - - tmu = (int) ti->whichTMU; - fxTMMoveInTM(fxMesa, tObj, tmu); - - fxTexGetInfo(ctx, ti->mipmapLevel[0].width, ti->mipmapLevel[0].height, - &lodlevel, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - - data = ti->mipmapLevel[level].data + - yoffset * ti->mipmapLevel[level].width * - ti->mipmapLevel[level].texelSize; - - switch (tmu) { - case FX_TMU0: - case FX_TMU1: - FX_grTexDownloadMipMapLevelPartial(fxMesa, tmu, - ti->tm[tmu]->startAddr, - FX_valueToLod(FX_lodToValue - (lodlevel) + level), - FX_largeLodLog2(ti->info), - FX_aspectRatioLog2(ti->info), - ti->info.format, - GR_MIPMAPLEVELMASK_BOTH, data, - yoffset, yoffset + height - 1); - break; - case FX_TMU_SPLIT: - FX_grTexDownloadMipMapLevelPartial(fxMesa, GR_TMU0, - ti->tm[FX_TMU0]->startAddr, - FX_valueToLod(FX_lodToValue - (lodlevel) + level), - FX_largeLodLog2(ti->info), - FX_aspectRatioLog2(ti->info), - ti->info.format, - GR_MIPMAPLEVELMASK_ODD, data, - yoffset, yoffset + height - 1); - - FX_grTexDownloadMipMapLevelPartial(fxMesa, GR_TMU1, - ti->tm[FX_TMU1]->startAddr, - FX_valueToLod(FX_lodToValue - (lodlevel) + level), - FX_largeLodLog2(ti->info), - FX_aspectRatioLog2(ti->info), - ti->info.format, - GR_MIPMAPLEVELMASK_EVEN, data, - yoffset, yoffset + height - 1); - break; - case FX_TMU_BOTH: - FX_grTexDownloadMipMapLevelPartial(fxMesa, GR_TMU0, - ti->tm[FX_TMU0]->startAddr, - FX_valueToLod(FX_lodToValue - (lodlevel) + level), - FX_largeLodLog2(ti->info), - FX_aspectRatioLog2(ti->info), - ti->info.format, - GR_MIPMAPLEVELMASK_BOTH, data, - yoffset, yoffset + height - 1); - - FX_grTexDownloadMipMapLevelPartial(fxMesa, GR_TMU1, - ti->tm[FX_TMU1]->startAddr, - FX_valueToLod(FX_lodToValue - (lodlevel) + level), - FX_largeLodLog2(ti->info), - FX_aspectRatioLog2(ti->info), - ti->info.format, - GR_MIPMAPLEVELMASK_BOTH, data, - yoffset, yoffset + height - 1); - break; - default: - fprintf(stderr, - "fx Driver: internal error in fxTMReloadSubMipMapLevel() -> wrong tmu (%d)\n", - tmu); - return; - } -} -#endif - - -/* - * Move the given texture out of hardware texture memory. - * This deallocates the texture's memory space. - */ -void -fxTMMoveOutTM_NoLock(fxMesaContext fxMesa, struct gl_texture_object *tObj) -{ - struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; - struct TdfxSharedState *shared = (struct TdfxSharedState *) mesaShared->DriverData; - tfxTexInfo *ti = fxTMGetTexInfo(tObj); - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxTMMoveOutTM(%x (%d))\n", - tObj, tObj->Name); - } - - if (!ti->isInTM) - return; - - switch (ti->whichTMU) { - case FX_TMU0: - case FX_TMU1: - RemoveRange_NoLock(fxMesa, ti->whichTMU, ti->tm[ti->whichTMU]); - break; - case FX_TMU_SPLIT: - case FX_TMU_BOTH: - assert(!shared->umaTexMemory); - RemoveRange_NoLock(fxMesa, FX_TMU0, ti->tm[FX_TMU0]); - RemoveRange_NoLock(fxMesa, FX_TMU1, ti->tm[FX_TMU1]); - break; - default: - fprintf(stderr, "fx Driver: internal error in fxTMMoveOutTM()\n"); - return; - } - - ti->isInTM = GL_FALSE; - ti->whichTMU = FX_TMU_NONE; -} - -void -fxTMMoveOutTM(fxMesaContext fxMesa, struct gl_texture_object *tObj) -{ - struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; - struct TdfxSharedState *shared = (struct TdfxSharedState *) mesaShared->DriverData; - tfxTexInfo *ti = fxTMGetTexInfo(tObj); - - if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxTMMoveOutTM(%x (%d))\n", - tObj, tObj->Name); - } - - if (!ti->isInTM) - return; - - switch (ti->whichTMU) { - case FX_TMU0: - case FX_TMU1: - RemoveRange(fxMesa, ti->whichTMU, ti->tm[ti->whichTMU]); - break; - case FX_TMU_SPLIT: - case FX_TMU_BOTH: - assert(!shared->umaTexMemory); - RemoveRange(fxMesa, FX_TMU0, ti->tm[FX_TMU0]); - RemoveRange(fxMesa, FX_TMU1, ti->tm[FX_TMU1]); - break; - default: - fprintf(stderr, "fx Driver: internal error in fxTMMoveOutTM()\n"); - return; - } - - ti->isInTM = GL_FALSE; - ti->whichTMU = FX_TMU_NONE; -} - - -/* - * Called via glDeleteTexture to delete a texture object. - */ -void -fxTMFreeTexture(fxMesaContext fxMesa, struct gl_texture_object *tObj) -{ - tfxTexInfo *ti = fxTMGetTexInfo(tObj); - if (ti) { - int i; - fxTMMoveOutTM(fxMesa, tObj); - for (i = 0; i < MAX_TEXTURE_LEVELS; i++) { - if (ti->mipmapLevel[i].data) { - FREE(ti->mipmapLevel[i].data); - ti->mipmapLevel[i].data = NULL; - } - } - FREE(ti); - tObj->DriverData = NULL; - } -} - - -/* - * Initialize texture memory. - * We take care of one or both TMU's here. - */ -void -fxTMInit(fxMesaContext fxMesa) -{ - if (!fxMesa->glCtx->Shared->DriverData) { - const char *extensions; - struct TdfxSharedState *shared = CALLOC_STRUCT(TdfxSharedState); - if (!shared) - return; - - extensions = FX_grGetString(fxMesa, GR_EXTENSION); - if (strstr(extensions, "TEXUMA")) { - FxU32 start, end; - shared->umaTexMemory = GL_TRUE; - FX_grEnable(fxMesa, GR_TEXTURE_UMA_EXT); - start = FX_grTexMinAddress(fxMesa, 0); - end = FX_grTexMaxAddress(fxMesa, 0); - shared->totalTexMem[0] = end - start; - shared->totalTexMem[1] = 0; - shared->freeTexMem[0] = end - start; - shared->tmFree[0] = NewRangeNode(fxMesa, start, end); - /*printf("UMA tex memory: %d\n", (int) (end - start));*/ - } - else { - const int numTMUs = fxMesa->haveTwoTMUs ? 2 : 1; - int tmu; - shared->umaTexMemory = GL_FALSE; - for (tmu = 0; tmu < numTMUs; tmu++) { - FxU32 start = FX_grTexMinAddress(fxMesa, tmu); - FxU32 end = FX_grTexMaxAddress(fxMesa, tmu); - shared->totalTexMem[tmu] = end - start; - shared->freeTexMem[tmu] = end - start; - shared->tmFree[tmu] = NewRangeNode(fxMesa, start, end); - /*printf("Split tex memory: %d\n", (int) (end - start));*/ - } - } - - shared->tmPool = NULL; - fxMesa->glCtx->Shared->DriverData = shared; - /*printf("Texture memory init UMA: %d\n", shared->umaTexMemory);*/ - } -} - - -/* - * Clean-up texture memory before destroying context. - */ -void -fxTMClose(fxMesaContext fxMesa) -{ - if (fxMesa->glCtx->Shared->RefCount == 1) { - /* refcount will soon go to zero, free our 3dfx stuff */ - struct TdfxSharedState *shared = (struct TdfxSharedState *) fxMesa->glCtx->Shared->DriverData; - - const int numTMUs = fxMesa->haveTwoTMUs ? 2 : 1; - int tmu; - MemRange *tmp, *next; - - /* Deallocate the pool of free MemRange nodes */ - tmp = shared->tmPool; - while (tmp) { - next = tmp->next; - FREE(tmp); - tmp = next; - } - - /* Delete the texture memory block MemRange nodes */ - for (tmu = 0; tmu < numTMUs; tmu++) { - tmp = shared->tmFree[tmu]; - while (tmp) { - next = tmp->next; - FREE(tmp); - tmp = next; - } - } - - FREE(shared); - fxMesa->glCtx->Shared->DriverData = NULL; - } -} - - -/* - * After a context switch this function will be called to restore - * texture memory for the new context. - */ -void -fxTMRestoreTextures_NoLock(fxMesaContext ctx) -{ - struct gl_texture_object *tObj; - - for (tObj = ctx->glCtx->Shared->TexObjectList; tObj; tObj = tObj->Next) { - tfxTexInfo *ti = fxTMGetTexInfo(tObj); - if (ti && ti->isInTM) { - int i; - for (i = 0; i < MAX_TEXTURE_UNITS; i++) { - if (ctx->glCtx->Texture.Unit[i].Current == tObj) { - DownloadTexture(ctx, tObj); - break; - } - } - if (i == MAX_TEXTURE_UNITS) { - fxTMMoveOutTM_NoLock(ctx, tObj); - } - } - } -} Index: xc/lib/GL/mesa/src/drv/tdfx/fxtexman.h diff -u xc/lib/GL/mesa/src/drv/tdfx/fxtexman.h:1.2 xc/lib/GL/mesa/src/drv/tdfx/fxtexman.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxtexman.h:1.2 Fri Dec 8 14:36:23 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxtexman.h Mon Jun 4 12:37:39 2001 @@ -1,29 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxtexman.h,v 1.2 2000/12/08 19:36:23 alanh Exp $ */ -#ifndef FXTEXMAN_H -#define FXTEXMAN_H - - -#define fxTMGetTexInfo(o) ((tfxTexInfo*)((o)->DriverData)) - -extern void fxTMReloadMipMapLevel(GLcontext *, struct gl_texture_object *, - GLint); -extern void fxTMReloadSubMipMapLevel(GLcontext *, - struct gl_texture_object *, GLint, GLint, - GLint); - -extern void fxTMInit(fxMesaContext ctx); - -extern void fxTMClose(fxMesaContext ctx); - -extern void fxTMRestoreTextures_NoLock(fxMesaContext ctx); - -extern void fxTMMoveInTM(fxMesaContext, struct gl_texture_object *, FxU32); - -extern void fxTMMoveOutTM(fxMesaContext, struct gl_texture_object *); - -extern void fxTMMoveOutTM_NoLock(fxMesaContext, struct gl_texture_object *); - -extern void fxTMFreeTexture(fxMesaContext, struct gl_texture_object *); - - -#endif Index: xc/lib/GL/mesa/src/drv/tdfx/fxtrifuncs.c diff -u xc/lib/GL/mesa/src/drv/tdfx/fxtrifuncs.c:1.1 xc/lib/GL/mesa/src/drv/tdfx/fxtrifuncs.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxtrifuncs.c:1.1 Sun Sep 24 09:51:20 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxtrifuncs.c Mon Jun 4 12:37:39 2001 @@ -1,365 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxtrifuncs.c,v 1.1 2000/09/24 13:51:20 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -/* fxtris.c - 3Dfx VooDoo triangle functions */ - - -#include "fxdrv.h" -#include "../mmath.h" - - - -/* Is this enough? Do we need more triangle funcs? - */ -static triangle_func tri_tab[0x40]; /* only 0x20 actually used */ -static quad_func quad_tab[0x40]; /* only 0x20 actually used */ -static line_func line_tab[0x40]; /* less than 0x20 used */ -static points_func points_tab[0x40]; /* less than 0x20 used */ - -#define IND (0) -#define TAG(x) x -#include "fxtritmp.h" - -#define IND (FX_OFFSET) -#define TAG(x) x##_offset -#include "fxtritmp.h" - -#define IND (FX_TWOSIDE) -#define TAG(x) x##_twoside -#include "fxtritmp.h" - -#define IND (FX_TWOSIDE|FX_OFFSET) -#define TAG(x) x##_twoside_offset -#include "fxtritmp.h" - -#define IND (FX_FRONT_BACK) -#define TAG(x) x##_front_back -#include "fxtritmp.h" - -#define IND (FX_FRONT_BACK|FX_OFFSET) -#define TAG(x) x##_front_back_offset -#include "fxtritmp.h" - -#define IND (FX_FRONT_BACK|FX_TWOSIDE) -#define TAG(x) x##_front_back_twoside -#include "fxtritmp.h" - -#define IND (FX_FRONT_BACK|FX_TWOSIDE|FX_OFFSET) -#define TAG(x) x##_front_back_twoside_offset -#include "fxtritmp.h" - -#define IND (FX_FLAT) -#define TAG(x) x##_flat -#include "fxtritmp.h" - -#define IND (FX_FLAT|FX_OFFSET) -#define TAG(x) x##_flat_offset -#include "fxtritmp.h" - -#define IND (FX_FLAT|FX_TWOSIDE) -#define TAG(x) x##_flat_twoside -#include "fxtritmp.h" - -#define IND (FX_FLAT|FX_TWOSIDE|FX_OFFSET) -#define TAG(x) x##_flat_twoside_offset -#include "fxtritmp.h" - -#define IND (FX_FLAT|FX_FRONT_BACK) -#define TAG(x) x##_flat_front_back -#include "fxtritmp.h" - -#define IND (FX_FLAT|FX_FRONT_BACK|FX_OFFSET) -#define TAG(x) x##_flat_front_back_offset -#include "fxtritmp.h" - -#define IND (FX_FLAT|FX_FRONT_BACK|FX_TWOSIDE) -#define TAG(x) x##_flat_front_back_twoside -#include "fxtritmp.h" - -#define IND (FX_FLAT|FX_FRONT_BACK|FX_TWOSIDE|FX_OFFSET) -#define TAG(x) x##_flat_front_back_twoside_offset -#include "fxtritmp.h" - -/* We don't actually do antialiasing correctly. Geometry has to be - sorted for glide's antialiasing to operate */ -#if 0 -#define IND (FX_ANTIALIAS) -#define TAG(x) x##_aa -#include "fxtritmp.h" - -#define IND (FX_ANTIALIAS|FX_OFFSET) -#define TAG(x) x##_aa_offset -#include "fxtritmp.h" - -#define IND (FX_ANTIALIAS|FX_TWOSIDE) -#define TAG(x) x##_aa_twoside -#include "fxtritmp.h" - -#define IND (FX_ANTIALIAS|FX_TWOSIDE|FX_OFFSET) -#define TAG(x) x##_aa_twoside_offset -#include "fxtritmp.h" - -#define IND (FX_ANTIALIAS|FX_FRONT_BACK) -#define TAG(x) x##_aa_front_back -#include "fxtritmp.h" - -#define IND (FX_ANTIALIAS|FX_FRONT_BACK|FX_OFFSET) -#define TAG(x) x##_aa_front_back_offset -#include "fxtritmp.h" - -#define IND (FX_ANTIALIAS|FX_FRONT_BACK|FX_TWOSIDE) -#define TAG(x) x##_aa_front_back_twoside -#include "fxtritmp.h" - -#define IND (FX_ANTIALIAS|FX_FRONT_BACK|FX_TWOSIDE|FX_OFFSET) -#define TAG(x) x##_aa_front_back_twoside_offset -#include "fxtritmp.h" - -#define IND (FX_ANTIALIAS|FX_FLAT) -#define TAG(x) x##_aa_flat -#include "fxtritmp.h" - -#define IND (FX_ANTIALIAS|FX_FLAT|FX_OFFSET) -#define TAG(x) x##_aa_flat_offset -#include "fxtritmp.h" - -#define IND (FX_ANTIALIAS|FX_FLAT|FX_TWOSIDE) -#define TAG(x) x##_aa_flat_twoside -#include "fxtritmp.h" - -#define IND (FX_ANTIALIAS|FX_FLAT|FX_TWOSIDE|FX_OFFSET) -#define TAG(x) x##_aa_flat_twoside_offset -#include "fxtritmp.h" - -#define IND (FX_ANTIALIAS|FX_FLAT|FX_FRONT_BACK) -#define TAG(x) x##_aa_flat_front_back -#include "fxtritmp.h" - -#define IND (FX_ANTIALIAS|FX_FLAT|FX_FRONT_BACK|FX_OFFSET) -#define TAG(x) x##_aa_flat_front_back_offset -#include "fxtritmp.h" - -#define IND (FX_ANTIALIAS|FX_FLAT|FX_FRONT_BACK|FX_TWOSIDE) -#define TAG(x) x##_aa_flat_front_back_twoside -#include "fxtritmp.h" - -#define IND (FX_ANTIALIAS|FX_FLAT|FX_FRONT_BACK|FX_TWOSIDE|FX_OFFSET) -#define TAG(x) x##_aa_flat_front_back_twoside_offset -#include "fxtritmp.h" -#endif - -void -fxDDTrifuncInit() -{ - init(); - init_offset(); - init_twoside(); - init_twoside_offset(); - init_front_back(); - init_front_back_offset(); - init_front_back_twoside(); - init_front_back_twoside_offset(); - init_flat(); - init_flat_offset(); - init_flat_twoside(); - init_flat_twoside_offset(); - init_flat_front_back(); - init_flat_front_back_offset(); - init_flat_front_back_twoside(); - init_flat_front_back_twoside_offset(); -#if 0 - init_aa(); - init_aa_offset(); - init_aa_twoside(); - init_aa_twoside_offset(); - init_aa_front_back(); - init_aa_front_back_offset(); - init_aa_front_back_twoside(); - init_aa_front_back_twoside_offset(); - init_aa_flat(); - init_aa_flat_offset(); - init_aa_flat_twoside(); - init_aa_flat_twoside_offset(); - init_aa_flat_front_back(); - init_aa_flat_front_back_offset(); - init_aa_flat_front_back_twoside(); - init_aa_flat_front_back_twoside_offset(); -#endif -} - -void -fxPrintRenderState(const char *msg, GLuint state) -{ - fprintf(stderr, "%s: (%x) %s%s%s%s%s%s\n", - msg, state, - (state & FX_ANTIALIAS) ? "antialias, " : "", - (state & FX_FLAT) ? "flat, " : "", - (state & FX_TWOSIDE) ? "twoside, " : "", - (state & FX_OFFSET) ? "offset, " : "", - (state & FX_FRONT_BACK) ? "front-back, " : "", - (state & FX_FALLBACK) ? "fallback" : ""); -} - - -void -fxPrintHintState(const char *msg, GLuint state) -{ - fprintf(stderr, "%s: (%x) %s %s%s %s%s\n", - msg, state, - (state & GR_STWHINT_W_DIFF_FBI) ? "w-fbi, " : "", - (state & GR_STWHINT_W_DIFF_TMU0) ? "w-tmu0, " : "", - (state & GR_STWHINT_ST_DIFF_TMU0) ? "st-tmu0, " : "", - (state & GR_STWHINT_W_DIFF_TMU1) ? "w-tmu1, " : "", - (state & GR_STWHINT_ST_DIFF_TMU1) ? "st-tmu1, " : ""); - -} - - -void -fxDDChooseRenderState(GLcontext * ctx) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLuint ind = 0; - GLuint flags = ctx->TriangleCaps; - - ctx->IndirectTriangles &= ~DD_SW_RASTERIZE; - - if (flags) { - if (fxMesa->render_index & FX_OFFSET) - FX_grDepthBiasLevel(fxMesa, 0); - - if (flags & (DD_SELECT | DD_FEEDBACK)) { - fxMesa->PointsFunc = 0; - fxMesa->LineFunc = 0; - fxMesa->TriangleFunc = 0; - fxMesa->QuadFunc = 0; - fxMesa->render_index = FX_FALLBACK; - ctx->IndirectTriangles |= DD_SW_RASTERIZE; -#if 0 - fprintf(stderr, "Fallback select|feeback\n"); -#endif - return; - } - - if (flags & DD_FLATSHADE) - ind |= FX_FLAT; - if (flags & DD_TRI_LIGHT_TWOSIDE) - ind |= FX_TWOSIDE; -#if 000 - /* XXX this is rather broken, don't use it. */ - if (flags & DD_MULTIDRAW) - ind |= FX_FRONT_BACK; -#else - if (flags & DD_MULTIDRAW) - ctx->IndirectTriangles |= DD_SW_RASTERIZE; -#endif - - if (flags & (DD_POINT_ATTEN | DD_POINT_SMOOTH)) { - ind |= FX_FALLBACK; -#if 0 - if (flags & DD_POINT_ATTEN) - fprintf(stderr, "Fallback point atten\n"); - if (flags & DD_POINT_SMOOTH) - fprintf(stderr, "Fallback point smooth\n"); -#endif - } - - fxMesa->render_index = ind; - fxMesa->PointsFunc = points_tab[ind]; - if (ind & FX_FALLBACK) - ctx->IndirectTriangles |= DD_POINT_SW_RASTERIZE; - ind &= ~(FX_ANTIALIAS | FX_FALLBACK); - - if (flags & (DD_LINE_STIPPLE | DD_LINE_SMOOTH)) { - ind |= FX_FALLBACK; -#if 0 - if (flags & DD_LINE_STIPPLE) - fprintf(stderr, "Fallback line stipple\n"); - if (flags & DD_LINE_SMOOTH) - fprintf(stderr, "Fallback line smooth\n"); -#endif - } - - fxMesa->render_index |= ind; - fxMesa->LineFunc = line_tab[ind]; - if (ind & FX_FALLBACK) - ctx->IndirectTriangles |= DD_LINE_SW_RASTERIZE; - ind &= ~(FX_ANTIALIAS | FX_FALLBACK); - - if (flags & DD_TRI_OFFSET) - ind |= FX_OFFSET; - if (flags & (DD_TRI_UNFILLED | DD_TRI_STIPPLE | DD_TRI_SMOOTH)) { - ind |= FX_FALLBACK; -#if 0 - if (flags & DD_TRI_UNFILLED) - fprintf(stderr, "Fallback tri unfilled\n"); - if (flags & DD_TRI_STIPPLE) - fprintf(stderr, "Fallback tri stippled\n"); - if (flags & DD_TRI_SMOOTH) - fprintf(stderr, "Fallback tri smooth\n"); -#endif - } - - fxMesa->render_index |= ind; - fxMesa->TriangleFunc = tri_tab[ind]; - fxMesa->QuadFunc = quad_tab[ind]; - - if (ind & FX_FALLBACK) - ctx->IndirectTriangles |= - DD_TRI_SW_RASTERIZE | DD_QUAD_SW_RASTERIZE; - } - else if (fxMesa->render_index) { - if (fxMesa->render_index & FX_OFFSET) - FX_grDepthBiasLevel(fxMesa, 0); - - fxMesa->render_index = 0; - fxMesa->PointsFunc = points_tab[0]; - fxMesa->LineFunc = line_tab[0]; - fxMesa->TriangleFunc = tri_tab[0]; - fxMesa->QuadFunc = quad_tab[0]; - } - - if (MESA_VERBOSE & (VERBOSE_STATE | VERBOSE_DRIVER)) - fxPrintRenderState("fxmesa: Render state", fxMesa->render_index); -} Index: xc/lib/GL/mesa/src/drv/tdfx/fxtritmp.h diff -u xc/lib/GL/mesa/src/drv/tdfx/fxtritmp.h:1.3 xc/lib/GL/mesa/src/drv/tdfx/fxtritmp.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxtritmp.h:1.3 Fri Dec 8 14:36:23 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxtritmp.h Mon Jun 4 12:37:39 2001 @@ -1,441 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxtritmp.h,v 1.3 2000/12/08 19:36:23 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -static void TAG(fx_tri) (GLcontext * ctx, GLuint e1, GLuint e2, GLuint e3, - GLuint pv) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - struct vertex_buffer *VB = ctx->VB; - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; - GrVertex *v1 = (GrVertex *) gWin[e1].f; - GrVertex *v2 = (GrVertex *) gWin[e2].f; - GrVertex *v3 = (GrVertex *) gWin[e3].f; - - (void) fxMesa; - - if (IND & (FX_TWOSIDE | FX_OFFSET)) { - GLfloat ex = v1->x - v3->x; - GLfloat ey = v1->y - v3->y; - GLfloat fx = v2->x - v3->x; - GLfloat fy = v2->y - v3->y; - GLfloat c = ex * fy - ey * fx; - - if (IND & FX_TWOSIDE) { - GLuint facing = (c < 0.0) ^ ctx->Polygon.FrontBit; - GLubyte(*color)[4] = VB->Color[facing]->data; - if (IND & FX_FLAT) { - GOURAUD2(v1, color[pv]); - GOURAUD2(v2, color[pv]); - GOURAUD2(v3, color[pv]); - } - else { - GOURAUD2(v1, color[e1]); - GOURAUD2(v2, color[e2]); - GOURAUD2(v3, color[e3]); - } - } - - /* Should apply a factor to ac to compensate for different x/y - * scaling introduced in the Viewport matrix. - * - * The driver should supply scaling factors for 'factor' and 'units'. - */ - if (IND & FX_OFFSET) { - GLfloat offset = ctx->Polygon.OffsetUnits; - - if (c * c > 1e-16) { - GLfloat factor = ctx->Polygon.OffsetFactor; - GLfloat ez = v1->ooz - v3->ooz; - GLfloat fz = v2->ooz - v3->ooz; - GLfloat a = ey * fz - ez * fy; - GLfloat b = ez * fx - ex * fz; - GLfloat ic = 1.0 / c; - GLfloat ac = a * ic; - GLfloat bc = b * ic; - if (ac < 0.0F) - ac = -ac; - if (bc < 0.0F) - bc = -bc; - offset += MAX2(ac, bc) * factor; - } - /* Probably a lot quicker just to nudge the z values and put - * them back afterwards. - */ - FX_grDepthBiasLevel(fxMesa, (int) offset); - } - } - else if (IND & FX_FLAT) { - GLubyte(*color)[4] = VB->Color[0]->data; - GOURAUD2(v1, color[pv]); - GOURAUD2(v2, color[pv]); - GOURAUD2(v3, color[pv]); - } - - if (IND & FX_FRONT_BACK) { - FX_grColorMaskv(ctx, ctx->Color.ColorMask); - FX_grDepthMask(fxMesa, FXFALSE); - FX_grRenderBuffer(fxMesa, GR_BUFFER_BACKBUFFER); - } - - if (IND & FX_ANTIALIAS) - FX_grAADrawTriangle(fxMesa, v1, v2, v3, FXTRUE, FXTRUE, FXTRUE); - else - FX_grDrawTriangle(fxMesa, v1, v2, v3); - - /* Might be quicker to do two passes, one for each buffer? - */ - if (IND & FX_FRONT_BACK) { - FX_grColorMaskv(ctx, ctx->Color.ColorMask); - - if (ctx->Depth.Mask) - FX_grDepthMask(fxMesa, FXTRUE); - - FX_grRenderBuffer(fxMesa, GR_BUFFER_FRONTBUFFER); - - if (IND & FX_ANTIALIAS) - FX_grAADrawTriangle(fxMesa, v1, v2, v3, FXTRUE, FXTRUE, FXTRUE); - else - FX_grDrawTriangle(fxMesa, v1, v2, v3); - } -} - - -/* Not worth the space? - */ -static void TAG(fx_quad) (GLcontext * ctx, GLuint e1, GLuint e2, GLuint e3, - GLuint e4, GLuint pv) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - struct vertex_buffer *VB = ctx->VB; - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; - GrVertex *v1 = (GrVertex *) gWin[e1].f; - GrVertex *v2 = (GrVertex *) gWin[e2].f; - GrVertex *v3 = (GrVertex *) gWin[e3].f; - GrVertex *v4 = (GrVertex *) gWin[e4].f; - - (void) fxMesa; - - if (IND & (FX_TWOSIDE | FX_OFFSET)) { - GLfloat ex = v3->x - v1->x; - GLfloat ey = v3->y - v1->y; - GLfloat fx = v4->x - v2->x; - GLfloat fy = v4->y - v2->y; - GLfloat c = ex * fy - ey * fx; - - if (IND & FX_TWOSIDE) { - GLuint facing = (c < 0.0) ^ ctx->Polygon.FrontBit; - GLubyte(*color)[4] = VB->Color[facing]->data; - if (IND & FX_FLAT) { - GOURAUD2(v1, color[pv]); - GOURAUD2(v2, color[pv]); - GOURAUD2(v3, color[pv]); - GOURAUD2(v4, color[pv]); - } - else { - GOURAUD2(v1, color[e1]); - GOURAUD2(v2, color[e2]); - GOURAUD2(v3, color[e3]); - GOURAUD2(v4, color[e4]); - } - } - - /* Should apply a factor to ac to compensate for different x/y - * scaling introduced in the Viewport matrix. - * - * The driver should supply scaling factors for 'factor' and 'units'. - */ - if (IND & FX_OFFSET) { - GLfloat offset = ctx->Polygon.OffsetUnits; - - if (c * c > 1e-16) { - GLfloat factor = ctx->Polygon.OffsetFactor; - GLfloat ez = v3->ooz - v1->ooz; - GLfloat fz = v4->ooz - v2->ooz; - GLfloat a = ey * fz - ez * fy; - GLfloat b = ez * fx - ex * fz; - GLfloat ic = 1.0 / c; - GLfloat ac = a * ic; - GLfloat bc = b * ic; - if (ac < 0.0F) - ac = -ac; - if (bc < 0.0F) - bc = -bc; - offset += MAX2(ac, bc) * factor; - } - /* Probably a lot quicker just to nudge the z values and put - * them back afterwards. - */ - FX_grDepthBiasLevel(fxMesa, (int) offset); - } - } - else if (IND & FX_FLAT) { - GLubyte(*color)[4] = VB->Color[0]->data; - GOURAUD2(v1, color[pv]); - GOURAUD2(v2, color[pv]); - GOURAUD2(v3, color[pv]); - GOURAUD2(v4, color[pv]); - } - - if (IND & FX_FRONT_BACK) { - FX_grColorMaskv(ctx, ctx->Color.ColorMask); - FX_grDepthMask(fxMesa, FXFALSE); - FX_grRenderBuffer(fxMesa, GR_BUFFER_BACKBUFFER); - } - - if (IND & FX_ANTIALIAS) { - FX_grAADrawTriangle(fxMesa, v1, v2, v4, FXTRUE, FXTRUE, FXTRUE); - FX_grAADrawTriangle(fxMesa, v2, v3, v4, FXTRUE, FXTRUE, FXTRUE); - } - else { - FX_grDrawTriangle(fxMesa, v1, v2, v4); - FX_grDrawTriangle(fxMesa, v2, v3, v4); - } - - /* Might be quicker to do two passes, one for each buffer? - */ - if (IND & FX_FRONT_BACK) { - FX_grColorMaskv(ctx, ctx->Color.ColorMask); - - if (ctx->Depth.Mask) - FX_grDepthMask(fxMesa, FXTRUE); - - FX_grRenderBuffer(fxMesa, GR_BUFFER_FRONTBUFFER); - - if (IND & FX_ANTIALIAS) { - FX_grAADrawTriangle(fxMesa, v1, v2, v4, FXTRUE, FXTRUE, FXTRUE); - FX_grAADrawTriangle(fxMesa, v2, v3, v4, FXTRUE, FXTRUE, FXTRUE); - } - else { - FX_grDrawTriangle(fxMesa, v1, v2, v4); - FX_grDrawTriangle(fxMesa, v2, v3, v4); - } - } -} - -#define DRAW_LINE(fxMesa, tmp0, tmp1, width) \ - if (width <= 1.0) { \ - FX_grDrawLine(fxMesa, tmp0, tmp1); \ - } \ - else { \ - GrVertex verts[4]; \ - float dx, dy, ix, iy; \ - \ - dx = tmp0->x - tmp1->x; \ - dy = tmp0->y - tmp1->y; \ - \ - if (dx * dx > dy * dy) { \ - iy = width * .5; \ - ix = 0; \ - } \ - else { \ - iy = 0; \ - ix = width * .5; \ - } \ - \ - verts[0] = *tmp0; \ - verts[1] = *tmp0; \ - verts[2] = *tmp1; \ - verts[3] = *tmp1; \ - \ - verts[0].x = tmp0->x - ix; \ - verts[0].y = tmp0->y - iy; \ - \ - verts[1].x = tmp0->x + ix; \ - verts[1].y = tmp0->y + iy; \ - \ - verts[2].x = tmp1->x + ix; \ - verts[2].y = tmp1->y + iy; \ - \ - verts[3].x = tmp1->x - ix; \ - verts[3].y = tmp1->y - iy; \ - \ - FX_grDrawPolygonVertexList(fxMesa, 4, verts); \ - } - - -#if (IND & FX_OFFSET) == 0 -static void TAG(fx_line) (GLcontext * ctx, GLuint e1, GLuint e2, GLuint pv) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - struct vertex_buffer *VB = ctx->VB; - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; - GLubyte(*const color)[4] = VB->ColorPtr->data; - GrVertex *v1 = (GrVertex *) gWin[e1].f; - GrVertex *v2 = (GrVertex *) gWin[e2].f; - GLfloat w = ctx->Line.Width * .5; - - if (IND & FX_FLAT) { - GOURAUD2(v1, color[pv]); - GOURAUD2(v2, color[pv]); - } - else if (IND & FX_TWOSIDE) { - /* XXX use signed area of the polygon to determine front/back color choice */ - GOURAUD2(v1, color[e1]); - GOURAUD2(v2, color[e2]); - } - - if (IND & FX_FRONT_BACK) { - FX_grColorMaskv(ctx, ctx->Color.ColorMask); - FX_grDepthMask(fxMesa, FXFALSE); - FX_grRenderBuffer(fxMesa, GR_BUFFER_BACKBUFFER); - } - - if (IND & FX_ANTIALIAS) - FX_grAADrawLine(fxMesa, v1, v2); - else - DRAW_LINE(fxMesa, v1, v2, w); - - if (IND & FX_FRONT_BACK) { - FX_grColorMaskv(ctx, ctx->Color.ColorMask); - - if (ctx->Depth.Mask) - FX_grDepthMask(fxMesa, FXTRUE); - - FX_grRenderBuffer(fxMesa, GR_BUFFER_FRONTBUFFER); - - if (IND & FX_ANTIALIAS) - FX_grAADrawLine(fxMesa, v1, v2); - else - DRAW_LINE(fxMesa, v1, v2, w); - } -} -#endif - - -#if (IND & FX_OFFSET) == 0 - -/* - * Draw large points (size > 1) with a polygon. - */ -#define DRAW_POINT(i, radius, color) \ - do { \ - GrVertex verts[4], *tmp; \ - tmp = (GrVertex *) gWin[i].f; \ - GOURAUD2(tmp, color); \ - verts[0] = *tmp; \ - verts[1] = *tmp; \ - verts[2] = *tmp; \ - verts[3] = *tmp; \ - verts[0].x = verts[3].x = tmp->x + radius; \ - verts[0].y = verts[1].y = tmp->y + radius; \ - verts[2].x = verts[1].x = tmp->x - radius; \ - verts[2].y = verts[3].y = tmp->y - radius; \ - FX_grDrawPolygonVertexList(fxMesa, 4, verts); \ - } while (0) - - -static void TAG(fx_points) (GLcontext * ctx, GLuint first, GLuint last) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - const struct vertex_buffer *VB = ctx->VB; - const fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; - GLubyte (*color)[4] = VB->ColorPtr->data; - GLuint i; - const GLfloat radius = ctx->Point.Size * .5; - - (void) color; - (void) fxMesa; - - if (IND & FX_FRONT_BACK) { - FX_grColorMaskv(ctx, ctx->Color.ColorMask); - FX_grDepthMask(fxMesa, FXFALSE); - FX_grRenderBuffer(fxMesa, GR_BUFFER_BACKBUFFER); - } - - if (!VB->ClipOrMask) { - for (i = first; i <= last; i++) { - DRAW_POINT(i, radius, color[i]); - } - } - else { - for (i = first; i <= last; i++) { - if (VB->ClipMask[i] == 0) { - DRAW_POINT(i, radius, color[i]); - } - } - } - - if (IND & FX_FRONT_BACK) { - FX_grColorMaskv(ctx, ctx->Color.ColorMask); - if (ctx->Depth.Mask) - FX_grDepthMask(fxMesa, FXTRUE); - FX_grRenderBuffer(fxMesa, GR_BUFFER_FRONTBUFFER); - - if (!VB->ClipOrMask) { - for (i = first; i <= last; i++) { - DRAW_POINT(i, radius, color[i]); - } - } - else { - for (i = first; i <= last; i++) { - if (VB->ClipMask[i] == 0) { - DRAW_POINT(i, radius, color[i]); - } - } - } - } -} - -#endif - - - -static void TAG(init) (void) -{ - tri_tab[IND] = TAG(fx_tri); - quad_tab[IND] = TAG(fx_quad); - -#if ((IND & FX_OFFSET) == 0) - line_tab[IND] = TAG(fx_line); - points_tab[IND] = TAG(fx_points); -#else - line_tab[IND] = line_tab[IND & ~FX_OFFSET]; - points_tab[IND] = points_tab[IND & ~FX_OFFSET]; -#endif -} - -#undef IND -#undef TAG -#undef FLAT_COLOR -#undef DRAW_POINT Index: xc/lib/GL/mesa/src/drv/tdfx/fxvs_tmp.h diff -u xc/lib/GL/mesa/src/drv/tdfx/fxvs_tmp.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/fxvs_tmp.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxvs_tmp.h:1.1 Sun Sep 24 09:51:20 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxvs_tmp.h Mon Jun 4 12:37:39 2001 @@ -1,215 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxvs_tmp.h,v 1.1 2000/09/24 13:51:20 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -#if (IND & (SETUP_XY|SETUP_W|SETUP_Z)) -#define V1 VARS_XY -#define I1 , INCR_XY -#else -#define V1 -#define I1 -#endif - -#if (IND & SETUP_XY) -#define S1 DO_SETUP_XY -#else -#define S1 -#endif - -#if (IND & SETUP_W) -#define S2 S1 DO_SETUP_W -#define V2 V1 VARS_W -#else -#define S2 S1 -#define V2 V1 -#endif - -#if (IND & SETUP_Z) -#define S3 S2 DO_SETUP_Z -#else -#define S3 S2 -#endif - -#if (IND & SETUP_RGBA) -#define V4 V2 VARS_RGBA -#define S4 S3 DO_SETUP_RGBA -#define I4 I1 , INCR_RGBA -#else -#define V4 V2 -#define S4 S3 -#define I4 I1 -#endif - -#if (IND & SETUP_TMU0) -#define V5 V4 VARS_TMU0 -#define S5 S4 DO_SETUP_TMU0 -#define I5 I4 , INCR_TMU0 -#define F5 FIXUP_TMU0 -#else -#define V5 V4 -#define S5 S4 -#define I5 I4 -#define F5 -#endif - -#if (IND & SETUP_TMU1) -#define V6 V5 VARS_TMU1 -#define S6 S5 DO_SETUP_TMU1 -#define I6 I5 , INCR_TMU1 -#define F6 F5 FIXUP_TMU1 -#else -#define V6 V5 -#define S6 S5 -#define I6 I5 -#define F6 F5 -#endif - -#if (IND & SETUP_TMU0) && (IND & SETUP_TMU1) -#define F7 FIXUP_TMU01 -#else -#define F7 F6 -#endif - -#define VARS V6 -#define DO_SETUP S6 -#define INCR I6 -#define FIXUP F7 - -static void -NAME(struct vertex_buffer *VB, GLuint start, GLuint end) -{ - GLcontext *ctx = VB->ctx; - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - - if (fxMesa->new_state) - fxSetupFXUnits(ctx); - - { - const float snapper = (3L << 18); - fxVertex *gWin = FX_DRIVER_DATA(VB)->verts; - GLfloat *v = gWin[start].f; - GLfloat *vend = gWin[end].f; - VARS; - - (void) gWin; - (void) fxMesa; - (void) snapper; - - if (VB->ClipOrMask) { - GLubyte *clipmask = &VB->ClipMask[start]; - for (; v != vend; v += 16, clipmask++ INCR) { - if (*clipmask == 0) { - DO_SETUP; - } - } - } - else { - for (; v != vend; v += 16 INCR) { - DO_SETUP; - } - } - - if (ctx->FogMode == FOG_FRAGMENT - && ctx->ProjectionMatrix.m[15] != 0.0F) { - /* need to compute W values for fogging purposes */ - const GLfloat m10 = ctx->ProjectionMatrix.m[10]; - const GLfloat m14 = ctx->ProjectionMatrix.m[14]; - const GLfloat v10 = ctx->Viewport.WindowMap.m[10]; - const GLfloat v14 = ctx->Viewport.WindowMap.m[14]; - GLfloat *v = gWin[start].f; - GLfloat *win = VB->Win.data[start]; - if (VB->ClipOrMask) { - GLubyte *clipmask = &VB->ClipMask[start]; - for (; v != vend; v += 16, clipmask++, win += 4) { - if (*clipmask == 0) { - GLfloat zNDC = (win[2] - v14) / v10; - GLfloat zEye = (zNDC - m14) / m10; - v[OOWCOORD] = -1.0F / zEye; - } - } - } - else { - for (; v != vend; v += 16, win += 4) { - GLfloat zNDC = (win[2] - v14) / v10; - GLfloat zEye = (zNDC - m14) / m10; - v[OOWCOORD] = -1.0F / zEye; - } - } - } - - /* rare - I hope */ - FIXUP; - } -} - - -#undef V1 -#undef V2 -#undef V3 -#undef V4 -#undef V5 -#undef V6 -#undef VARS - -#undef S1 -#undef S2 -#undef S3 -#undef S4 -#undef S5 -#undef S6 -#undef DO_SETUP - -#undef I1 -#undef I4 -#undef I5 -#undef I6 -#undef INCR - -#undef F5 -#undef F6 -#undef F7 -#undef FIXUP - - -#undef IND -#undef NAME Index: xc/lib/GL/mesa/src/drv/tdfx/fxvsetup.c diff -u xc/lib/GL/mesa/src/drv/tdfx/fxvsetup.c:1.2 xc/lib/GL/mesa/src/drv/tdfx/fxvsetup.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxvsetup.c:1.2 Fri Dec 8 14:36:23 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxvsetup.c Mon Jun 4 12:37:39 2001 @@ -1,578 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxvsetup.c,v 1.2 2000/12/08 19:36:23 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -/* fxvsetup.c - 3Dfx VooDoo vertices setup functions */ - - -#include "fxdrv.h" -#include "fxtexman.h" -#include "fxsetup.h" -#include "mmath.h" -#include "pipeline.h" -#include "fxvsetup.h" - - -void -fxPrintSetupFlags(const char *msg, GLuint flags) -{ - fprintf(stderr, "%s: %d %s%s%s%s%s%s\n", - msg, - flags, - (flags & SETUP_XY) ? " xy," : "", - (flags & SETUP_Z) ? " z," : "", - (flags & SETUP_W) ? " w," : "", - (flags & SETUP_RGBA) ? " rgba," : "", - (flags & SETUP_TMU0) ? " tmu0," : "", - (flags & SETUP_TMU1) ? " tmu1," : ""); -} - -static void -project_texcoords(struct vertex_buffer *VB, - GLuint tmu_nr, GLuint tc_nr, GLuint start, GLuint count) -{ - fxVertex *v = FX_DRIVER_DATA(VB)->verts + start; - GrTmuVertex *tmu = &(((GrVertex *) v->f)->tmuvtx[tmu_nr]); - GLvector4f *vec = VB->TexCoordPtr[tc_nr]; - - GLuint i; - GLuint stride = vec->stride; - GLfloat *data = VEC_ELT(vec, GLfloat, start); - - for (i = start; i < count; i++, STRIDE_F(data, stride), v++) { - tmu->oow = v->f[OOWCOORD] * data[3]; - tmu = (GrTmuVertex *) ((char *) tmu + sizeof(fxVertex)); - } -} - - -static void -copy_w(struct vertex_buffer *VB, GLuint tmu_nr, GLuint start, GLuint count) -{ - fxVertex *v = FX_DRIVER_DATA(VB)->verts + start; - GrTmuVertex *tmu = &(((GrVertex *) v->f)->tmuvtx[tmu_nr]); - GLuint i; - - for (i = start; i < count; i++, v++) { - tmu->oow = v->f[OOWCOORD]; - tmu = (GrTmuVertex *) ((char *) tmu + sizeof(fxVertex)); - } -} - - -static tfxSetupFunc setupfuncs[0x40]; - - - - -#define IND SETUP_XY -#define NAME fxsetupXY -#include "fxvs_tmp.h" - -#define IND (SETUP_XY|SETUP_Z) -#define NAME fxsetupXYZ -#include "fxvs_tmp.h" - -#define IND (SETUP_XY|SETUP_W) -#define NAME fxsetupXYW -#include "fxvs_tmp.h" - -#define IND (SETUP_XY|SETUP_Z|SETUP_W) -#define NAME fxsetupXYZW -#include "fxvs_tmp.h" - -#define IND (SETUP_RGBA|SETUP_XY) -#define NAME fxsetupXYRGBA -#include "fxvs_tmp.h" - -#define IND (SETUP_RGBA|SETUP_XY|SETUP_Z) -#define NAME fxsetupXYZRGBA -#include "fxvs_tmp.h" - -#define IND (SETUP_RGBA|SETUP_XY|SETUP_W) -#define NAME fxsetupXYWRGBA -#include "fxvs_tmp.h" - -#define IND (SETUP_RGBA|SETUP_XY|SETUP_Z|SETUP_W) -#define NAME fxsetupXYZWRGBA -#include "fxvs_tmp.h" - -#define IND (SETUP_TMU0|SETUP_XY|SETUP_W) -#define NAME fxsetupXYWT0 -#include "fxvs_tmp.h" - -#define IND (SETUP_TMU0|SETUP_XY|SETUP_Z|SETUP_W) -#define NAME fxsetupXYZWT0 -#include "fxvs_tmp.h" - -#define IND (SETUP_TMU1|SETUP_TMU0|SETUP_XY|SETUP_W) -#define NAME fxsetupXYWT0T1 -#include "fxvs_tmp.h" - -#define IND (SETUP_TMU1|SETUP_TMU0|SETUP_XY|SETUP_Z|SETUP_W) -#define NAME fxsetupXYZWT0T1 -#include "fxvs_tmp.h" - -#define IND (SETUP_TMU0|SETUP_RGBA|SETUP_XY|SETUP_W) -#define NAME fxsetupXYWRGBAT0 -#include "fxvs_tmp.h" - -#define IND (SETUP_TMU0|SETUP_RGBA|SETUP_XY|SETUP_Z|SETUP_W) -#define NAME fxsetupXYZWRGBAT0 -#include "fxvs_tmp.h" - -#define IND (SETUP_TMU1|SETUP_TMU0|SETUP_RGBA|SETUP_XY|SETUP_W) -#define NAME fxsetupXYWRGBAT0T1 -#include "fxvs_tmp.h" - -#define IND (SETUP_TMU1|SETUP_TMU0|SETUP_RGBA|SETUP_XY|SETUP_Z|SETUP_W) -#define NAME fxsetupXYZWRGBAT0T1 -#include "fxvs_tmp.h" - -#define IND (SETUP_RGBA) -#define NAME fxsetupRGBA -#include "fxvs_tmp.h" - -#define IND (SETUP_TMU0) -#define NAME fxsetupT0 -#include "fxvs_tmp.h" - -#define IND (SETUP_TMU1) -#define NAME fxsetupT1 -#include "fxvs_tmp.h" - -#define IND (SETUP_TMU1|SETUP_TMU0) -#define NAME fxsetupT0T1 -#include "fxvs_tmp.h" - -#define IND (SETUP_TMU0|SETUP_RGBA) -#define NAME fxsetupRGBAT0 -#include "fxvs_tmp.h" - -#define IND (SETUP_TMU1|SETUP_RGBA) -#define NAME fxsetupRGBAT1 -#include "fxvs_tmp.h" - -#define IND (SETUP_TMU1|SETUP_TMU0|SETUP_RGBA) -#define NAME fxsetupRGBAT0T1 -#include "fxvs_tmp.h" - -#define IND (SETUP_W|SETUP_RGBA) -#define NAME fxsetupWRGBA -#include "fxvs_tmp.h" - -#define IND (SETUP_W|SETUP_TMU0) -#define NAME fxsetupWT0 -#include "fxvs_tmp.h" - -#define IND (SETUP_W|SETUP_TMU1) -#define NAME fxsetupWT1 -#include "fxvs_tmp.h" - -#define IND (SETUP_W|SETUP_TMU1|SETUP_TMU0) -#define NAME fxsetupWT0T1 -#include "fxvs_tmp.h" - -#define IND (SETUP_W|SETUP_TMU0|SETUP_RGBA) -#define NAME fxsetupWRGBAT0 -#include "fxvs_tmp.h" - -#define IND (SETUP_W|SETUP_TMU1|SETUP_RGBA) -#define NAME fxsetupWRGBAT1 -#include "fxvs_tmp.h" - -#define IND (SETUP_W|SETUP_TMU1|SETUP_TMU0|SETUP_RGBA) -#define NAME fxsetupWRGBAT0T1 -#include "fxvs_tmp.h" - - - -void -fxDDSetupInit(void) -{ - setupfuncs[SETUP_XY] = fxsetupXY; - setupfuncs[SETUP_XY | SETUP_Z] = fxsetupXYZ; - setupfuncs[SETUP_XY | SETUP_W] = fxsetupXYW; - setupfuncs[SETUP_XY | SETUP_Z | SETUP_W] = fxsetupXYZW; - - setupfuncs[SETUP_RGBA | SETUP_XY] = fxsetupXYRGBA; - setupfuncs[SETUP_RGBA | SETUP_XY | SETUP_Z] = fxsetupXYZRGBA; - setupfuncs[SETUP_RGBA | SETUP_XY | SETUP_W] = fxsetupXYWRGBA; - setupfuncs[SETUP_RGBA | SETUP_XY | SETUP_Z | SETUP_W] = fxsetupXYZWRGBA; - - /* If we have texture and xy then we must have w. - * If we have texture1 and w then we must have texture 0. - */ - setupfuncs[SETUP_TMU0 | SETUP_XY | SETUP_W] = fxsetupXYWT0; - setupfuncs[SETUP_TMU0 | SETUP_XY | SETUP_Z | SETUP_W] = fxsetupXYZWT0; - - setupfuncs[SETUP_TMU1 | SETUP_TMU0 | SETUP_XY | SETUP_W] = fxsetupXYWT0T1; - setupfuncs[SETUP_TMU1 | SETUP_TMU0 | SETUP_XY | SETUP_Z | SETUP_W] = - fxsetupXYZWT0T1; - - setupfuncs[SETUP_TMU0 | SETUP_RGBA | SETUP_XY | SETUP_W] = - fxsetupXYWRGBAT0; - setupfuncs[SETUP_TMU0 | SETUP_RGBA | SETUP_XY | SETUP_Z | SETUP_W] = - fxsetupXYZWRGBAT0; - - setupfuncs[SETUP_TMU1 | SETUP_TMU0 | SETUP_RGBA | SETUP_XY | SETUP_W] = - fxsetupXYWRGBAT0T1; - setupfuncs[SETUP_TMU1 | SETUP_TMU0 | SETUP_RGBA | SETUP_XY | SETUP_Z | - SETUP_W] = fxsetupXYZWRGBAT0T1; - - /* If we don't have xy then we can't have z... w is still a possibility. - */ - setupfuncs[SETUP_RGBA] = fxsetupRGBA; - setupfuncs[SETUP_TMU0] = fxsetupT0; - setupfuncs[SETUP_TMU1] = fxsetupT1; - setupfuncs[SETUP_TMU1 | SETUP_TMU0] = fxsetupT0T1; - setupfuncs[SETUP_TMU0 | SETUP_RGBA] = fxsetupRGBAT0; - setupfuncs[SETUP_TMU1 | SETUP_RGBA] = fxsetupRGBAT1; - setupfuncs[SETUP_TMU1 | SETUP_TMU0 | SETUP_RGBA] = fxsetupRGBAT0T1; - - setupfuncs[SETUP_W | SETUP_RGBA] = fxsetupWRGBA; - setupfuncs[SETUP_W | SETUP_TMU0] = fxsetupWT0; - setupfuncs[SETUP_W | SETUP_TMU1] = fxsetupWT1; - setupfuncs[SETUP_W | SETUP_TMU1 | SETUP_TMU0] = fxsetupWT0T1; - setupfuncs[SETUP_W | SETUP_TMU0 | SETUP_RGBA] = fxsetupWRGBAT0; - setupfuncs[SETUP_W | SETUP_TMU1 | SETUP_RGBA] = fxsetupWRGBAT1; - setupfuncs[SETUP_W | SETUP_TMU1 | SETUP_TMU0 | SETUP_RGBA] = - fxsetupWRGBAT0T1; - -} - - - -tfxSetupFunc -fxDDChooseSetupFunction(GLcontext * ctx) -{ - GLuint setupindex = SETUP_XY | SETUP_Z; - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - - fxMesa->setupindex = 0; - - if (ctx->RenderMode != GL_RENDER) - return 0; - - fxMesa->tmu_source[0] = 0; - fxMesa->tmu_source[1] = 1; - - fxMesa->tex_dest[0] = SETUP_TMU0; - fxMesa->tex_dest[1] = SETUP_TMU1; - - if (ctx->Light.ShadeModel == GL_SMOOTH && !ctx->Light.Model.TwoSide) - setupindex |= SETUP_RGBA; - - if (ctx->Fog.Enabled && ctx->FogMode == FOG_FRAGMENT) - setupindex |= SETUP_RGBA | SETUP_W; - - if ((ctx->Texture.ReallyEnabled & (TEXTURE0_2D | TEXTURE0_3D)) == - TEXTURE0_2D) { - /* This doesn't work for non-RGBA textures - if (ctx->Texture.Unit[0].EnvMode == GL_REPLACE) - setupindex &= ~SETUP_RGBA; - */ - setupindex |= SETUP_TMU0 | SETUP_W; - } - - if ((ctx->Texture.ReallyEnabled & (TEXTURE1_2D | TEXTURE1_3D)) == - TEXTURE1_2D) { - setupindex |= SETUP_TMU1 | SETUP_W; - if (setupindex & SETUP_TMU0) { /* both TMUs in use */ - struct gl_texture_object *tObj = ctx->Texture.Unit[0].CurrentD[2]; - tfxTexInfo *ti = fxTMGetTexInfo(tObj); - - if (ti->whichTMU != FX_TMU0) { /* TMU0 and TMU1 are swapped */ - fxMesa->tmu_source[0] = 1; - fxMesa->tex_dest[1] = SETUP_TMU0; - fxMesa->tmu_source[1] = 0; - fxMesa->tex_dest[0] = SETUP_TMU1; - } - } - } - - if (ctx->Color.BlendEnabled) - setupindex |= SETUP_RGBA; - - if (MESA_VERBOSE & (VERBOSE_DRIVER | VERBOSE_PIPELINE | VERBOSE_STATE)) - fxPrintSetupFlags("fxmesa: vertex setup function", setupindex); - - fxMesa->setupindex = setupindex; - fxMesa->view_clip_tri = fxTriViewClipTab[setupindex & 0x7]; - fxMesa->clip_tri_stride = fxTriClipStrideTab[setupindex & 0x7]; - return setupfuncs[setupindex]; -} - -void -fxDDDoRasterSetup(struct vertex_buffer *VB) -{ - GLcontext *ctx = VB->ctx; - FX_DRIVER_DATA(VB)->last_vert = FX_DRIVER_DATA(VB)->verts + VB->Count; - -#if 0 /* leaving this out fixes the Heretic2 stray polygon bug */ - if ((ctx->IndirectTriangles & DD_SW_RASTERIZE) == DD_SW_RASTERIZE) { - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - fxMesa->setupdone = 0; - return; - } -#endif - - if (VB->Type == VB_CVA_PRECALC) - fxDDPartialRasterSetup(VB); - else if (ctx->Driver.RasterSetup) /* NULL if in feedback/selection mode */ - ctx->Driver.RasterSetup(VB, VB->CopyStart, VB->Count); - -} - - -/* - * Need to check that merge&render will work before allowing this to - * happen here. Therefore - need to know that this will be fired when - * we get a forbidden input in the elt pipeline - and therefore need to check - * whether we have one *now*. Similarly need to know if state changes cause - * size4 texcoords to be introduced. - */ -void -fxDDCheckPartialRasterSetup(GLcontext * ctx, struct gl_pipeline_stage *d) -{ - fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; - GLuint tmp = fxMesa->setupdone; - - d->type = 0; - d->pre_forbidden_inputs = 0; - fxMesa->setupdone = 0; /* cleared if we return */ - - /* Indirect triangles must be rendered via the immediate pipeline. - * If all rasterization is software, no need to set up. - */ - if ((ctx->Array.Summary & VERT_OBJ_ANY) == 0) - return; - - if ((ctx->IndirectTriangles & DD_SW_SETUP) || - (ctx->IndirectTriangles & DD_SW_RASTERIZE) == DD_SW_RASTERIZE) - return; - - if ((ctx->Texture.ReallyEnabled & 0xf) && - !(ctx->Array.Flags & VERT_TEX0_ANY)) { - if (ctx->TextureMatrix[0].type == MATRIX_GENERAL || - ctx->TextureMatrix[0].type == MATRIX_PERSPECTIVE || - (ctx->Texture.Unit[0].TexGenEnabled & Q_BIT)) - return; - - d->pre_forbidden_inputs |= VERT_TEX0_4; - } - - if ((ctx->Texture.ReallyEnabled & 0xf0) && - !(ctx->Array.Flags & VERT_TEX1_ANY)) { - if (ctx->TextureMatrix[1].type == MATRIX_GENERAL || - ctx->TextureMatrix[1].type == MATRIX_PERSPECTIVE || - (ctx->Texture.Unit[1].TexGenEnabled & Q_BIT)) - return; - - d->pre_forbidden_inputs |= VERT_TEX1_4; - } - - - fxMesa->setupdone = tmp; - d->inputs = 0; - d->outputs = VERT_SETUP_PART; - d->type = PIPE_PRECALC; -} - - -/* Will be different every time - no point in trying to precalc the - * function to call. - */ -void -fxDDPartialRasterSetup(struct vertex_buffer *VB) -{ - GLuint new = VB->pipeline->new_outputs; - fxMesaContext fxMesa = (fxMesaContext) VB->ctx->DriverCtx; - GLuint ind = 0; - - FX_DRIVER_DATA(VB)->last_vert = FX_DRIVER_DATA(VB)->verts + VB->Count; - - if (new & VERT_WIN) { - new = VB->pipeline->outputs; - ind |= SETUP_XY | SETUP_W | SETUP_Z; - } - - if (new & VERT_TEX0_ANY) - ind |= SETUP_W | fxMesa->tex_dest[0]; - - if (new & VERT_TEX1_ANY) - ind |= SETUP_W | fxMesa->tex_dest[1]; - - if (new & VERT_RGBA) - ind |= SETUP_W | SETUP_RGBA; - - if ((new & VERT_WIN) == 0) - ind &= ~(fxMesa->setupdone & SETUP_W); - - fxMesa->setupdone &= ~ind; - ind &= fxMesa->setupindex; - fxMesa->setupdone |= ind; - - if (MESA_VERBOSE & (VERBOSE_DRIVER | VERBOSE_PIPELINE)) { - gl_print_vert_flags("new outputs", VB->pipeline->new_outputs); - fxPrintSetupFlags("fxmesa: partial setup function", ind); - } - - if (ind) - setupfuncs[ind] (VB, VB->Start, VB->Count); -} - - -/* - * This is called by the fastpath code if we need to resize a vertex buffer. - * (Almost certainly never called.) - */ -void -fxDDResizeVB(struct vertex_buffer *VB, GLuint size) -{ - struct tfxMesaVertexBuffer *fvb = FX_DRIVER_DATA(VB); - - while (fvb->size < size) - fvb->size *= 2; - - ALIGN_FREE(VB->ClipMask); - VB->ClipMask = (GLubyte *) ALIGN_MALLOC(sizeof(GLubyte) * fvb->size, 4); - - ALIGN_FREE(fvb->verts); - fvb->verts = (fxVertex *) ALIGN_MALLOC(sizeof(fxVertex) * fvb->size, 32); - - gl_vector1ui_free(&fvb->clipped_elements); - gl_vector1ui_alloc(&fvb->clipped_elements, VEC_WRITABLE, fvb->size, 32); - - if (!fvb->verts || !VB->ClipMask || !fvb->clipped_elements.start) { - gl_problem(NULL, "tdfx driver out of memory in fxDDResizeVB"); - return; - } -} - - -/* - * This is called by Mesa when it creates a new vertex buffer. - * Here, we allocate a tfxMesaVertexBuffer and hook it to VB->driver_data. - */ -void -fxDDRegisterVB(struct vertex_buffer *VB) -{ - struct tfxMesaVertexBuffer *fvb; - - fvb = (struct tfxMesaVertexBuffer *) calloc(1, sizeof(*fvb)); - - /* This looks like it allocates a lot of memory, but it basically - * just sets an upper limit on how much can be used - nothing like - * this amount will ever be turned into 'real' memory. - */ - if (VB->Type == VB_CVA_PRECALC) { - fvb->size = VB->Size * 5; - fvb->verts = (fxVertex *) ALIGN_MALLOC(sizeof(fxVertex)*fvb->size, 32); - if (!fvb->verts) - goto memerror; - -#if defined(FX_GLIDE3) - fvb->triangle_b = MALLOC(sizeof(GrVertex *) * 4 * fvb->size + 31); - if (!fvb->triangle_b) - goto memerror; - fvb->strips_b = MALLOC(sizeof(GrVertex *) * 4 * fvb->size + 31); - if (!fvb->strips_b) - goto memerror; -#endif - gl_vector1ui_alloc(&fvb->clipped_elements, VEC_WRITABLE, fvb->size,32); - if (!fvb->clipped_elements.start) - goto memerror; - - ALIGN_FREE(VB->ClipMask); - VB->ClipMask = (GLubyte *) ALIGN_MALLOC(sizeof(GLubyte)*fvb->size, 4); - if (!VB->ClipMask) - goto memerror; - } - else { - fvb->size = VB->Size + 12; - fvb->verts = (fxVertex *) ALIGN_MALLOC(sizeof(fxVertex)*fvb->size, 32); - if (!fvb->verts) - goto memerror; - -#if defined(FX_GLIDE3) - fvb->triangle_b = MALLOC(sizeof(GrVertex *) * 4 * fvb->size + 31); - if (!fvb->triangle_b) - goto memerror; - fvb->strips_b = MALLOC(sizeof(GrVertex *) * 4 * fvb->size + 31); - if (!fvb->strips_b) - goto memerror; -#endif - } - - VB->driver_data = fvb; - return; - - memerror: - fprintf(stderr, "fx Driver: out of memory !\n"); -} - - -/* - * This is called by Mesa when it's about to deallocate a vertex buffer. - * Here we free the tfxMesaVertexBuffer we attached to VB->driver_data. - */ -void -fxDDUnregisterVB(struct vertex_buffer *VB) -{ - struct tfxMesaVertexBuffer *fvb = FX_DRIVER_DATA(VB); - - if (fvb) { - if (fvb->verts) - ALIGN_FREE(fvb->verts); - gl_vector1ui_free(&fvb->clipped_elements); -#if defined(FX_GLIDE3) - if (fvb->strips_b) - FREE(fvb->strips_b); - if (fvb->triangle_b) - FREE(fvb->triangle_b); -#endif - FREE(fvb); - VB->driver_data = NULL; - } -} Index: xc/lib/GL/mesa/src/drv/tdfx/fxvsetup.h diff -u xc/lib/GL/mesa/src/drv/tdfx/fxvsetup.h:1.2 xc/lib/GL/mesa/src/drv/tdfx/fxvsetup.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/fxvsetup.h:1.2 Fri Dec 8 14:36:23 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/fxvsetup.h Mon Jun 4 12:37:40 2001 @@ -1,177 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/fxvsetup.h,v 1.2 2000/12/08 19:36:23 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * - * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the - * terms stated above. - * - * Thank you for your contribution, David! - * - * Please make note of the above copyright/license statement. If you - * contributed code or bug fixes to this code under the previous (GNU - * Library) license and object to the new license, your code will be - * removed at your request. Please see the Mesa docs/COPYRIGHT file - * for more information. - * - * Additional Mesa/3Dfx driver developers: - * Daryll Strauss - * Keith Whitwell - * - * See fxapi.h for more revision/author details. - */ - - -#ifndef _FXVSETUP_H_ -#define _FXVSETUP_H_ - - -#define VARS_W - -#define VARS_Z - -#define VARS_TMU0 \ - GLuint tmu0_source = fxMesa->tmu_source[0]; \ - GLfloat *tmu0_data = VEC_ELT(VB->TexCoordPtr[tmu0_source], \ - GLfloat, start); \ - GLuint tmu0_stride = VB->TexCoordPtr[tmu0_source]->stride; \ - GLuint tmu0_sz = VB->TexCoordPtr[tmu0_source]->size; \ - struct gl_texture_unit *t0 = &ctx->Texture.Unit[tmu0_source]; \ - GLfloat sscale0 = FX_TEXTURE_DATA(t0)->sScale; \ - GLfloat tscale0 = FX_TEXTURE_DATA(t0)->tScale; - -#define VARS_TMU1 \ - GLuint tmu1_source = fxMesa->tmu_source[1]; \ - GLfloat *tmu1_data = VEC_ELT(VB->TexCoordPtr[tmu1_source], \ - GLfloat, start); \ - GLuint tmu1_stride = VB->TexCoordPtr[tmu1_source]->stride; \ - GLuint tmu1_sz = VB->TexCoordPtr[tmu1_source]->size; \ - struct gl_texture_unit *t1 = &ctx->Texture.Unit[tmu1_source]; \ - GLfloat sscale1 = FX_TEXTURE_DATA(t1)->sScale; \ - GLfloat tscale1 = FX_TEXTURE_DATA(t1)->tScale; - -#define VARS_RGBA \ - GLubyte *color = VEC_ELT(VB->ColorPtr, GLubyte, start); \ - GLuint col_stride = VB->ColorPtr->stride; - -#define VARS_XY GLfloat *win = VB->Win.data[start]; - -#define INCR_XY win += 4 - - -/* Add window offset to window coords to get screen coords */ -# define DO_SETUP_XY \ - v[XCOORD]=win[0]+fxMesa->x_offset; \ - v[YCOORD]=win[1]+fxMesa->y_delta; - - -#define DO_SETUP_W { \ - v[OOWCOORD]=win[3]; \ -} - -#define DO_SETUP_Z v[ZCOORD]=win[2]; - -#define DO_SETUP_TMU0 \ -{ \ - v[S0COORD]=sscale0*tmu0_data[0]*v[OOWCOORD]; \ - v[T0COORD]=tscale0*tmu0_data[1]*v[OOWCOORD]; \ -} - -#define INCR_TMU0 STRIDE_F(tmu0_data, tmu0_stride) - -#define DO_SETUP_TMU1 \ -{ \ - v[S1COORD]=sscale1*tmu1_data[0]*v[OOWCOORD]; \ - v[T1COORD]=tscale1*tmu1_data[1]*v[OOWCOORD]; \ -} - -#define INCR_TMU1 STRIDE_F(tmu1_data, tmu1_stride) - -#if FX_USE_PARGB -#define DO_SETUP_RGBA \ -{ \ - PACK_4F_ARGB(GET_PARGB(v), color[3], color[0], color[1], color[2]); \ -} -#else -#define DO_SETUP_RGBA \ -{ \ - UBYTE_COLOR_TO_FLOAT_255_COLOR2(v[RCOORD], color[0]); \ - UBYTE_COLOR_TO_FLOAT_255_COLOR2(v[GCOORD], color[1]); \ - UBYTE_COLOR_TO_FLOAT_255_COLOR2(v[BCOORD], color[2]); \ - UBYTE_COLOR_TO_FLOAT_255_COLOR2(v[ACOORD], color[3]); \ -} -#endif - -#define INCR_RGBA color += col_stride - - -#define _FIXUP_PRE \ - GLuint hs = fxMesa->stw_hint_state & ~(GR_STWHINT_W_DIFF_TMU0 | \ - GR_STWHINT_W_DIFF_TMU1); - -#define _FIXUP_TMU0 \ - if (tmu0_sz == 4) { \ - project_texcoords( VB, 0, tmu0_source, start, end ); \ - hs |= GR_STWHINT_W_DIFF_TMU0; \ - } - - -#define _FIXUP_TMU1 \ - if (tmu1_sz == 4) { \ - project_texcoords( VB, 1, tmu1_source, start, end ); \ - hs |= GR_STWHINT_W_DIFF_TMU1; \ - } - - -#define _FIXUP_TMU01 \ - if (tmu0_sz == 4) { \ - project_texcoords( VB, 0, tmu0_source, start, end ); \ - if (tmu1_sz == 4) \ - project_texcoords( VB, 1, tmu1_source, start, end ); \ - else \ - copy_w( VB, 1, start, end ); \ - hs |= (GR_STWHINT_W_DIFF_TMU0|GR_STWHINT_W_DIFF_TMU1); \ - } else if (tmu1_sz == 4) { \ - project_texcoords( VB, 1, tmu1_source, start, end ); \ - hs |= GR_STWHINT_W_DIFF_TMU1; \ - } - -#define _FIXUP_POST \ - if (hs != fxMesa->stw_hint_state) { \ - fxMesa->stw_hint_state = hs; \ - FX_grHints(fxMesa, GR_HINT_STWHINT, hs); \ - } - - -#define FIXUP_TMU0 { _FIXUP_PRE _FIXUP_TMU0 _FIXUP_POST } -#define FIXUP_TMU1 { _FIXUP_PRE _FIXUP_TMU1 _FIXUP_POST } -#define FIXUP_TMU01 { _FIXUP_PRE _FIXUP_TMU01 _FIXUP_POST } - - -/* v - pointer to destination GrVertex - * VB - source of data - * i - index into vb for data - */ - - -#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c:1.1.2.1 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c Tue May 22 17:25:41 2001 @@ -0,0 +1,478 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c,v 1.1.2.1 2001/05/22 21:25:41 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * + */ + +#include "dri_glide.h" +#include "tdfx_context.h" +#include "tdfx_dd.h" +#include "tdfx_state.h" +#include "tdfx_vb.h" +#include "tdfx_render.h" +#include "tdfx_pipeline.h" +#include "tdfx_span.h" +#include "tdfx_tex.h" +#include "tdfx_texman.h" +#include "extensions.h" + +#ifndef TDFX_DEBUG +int TDFX_DEBUG = (0 +/* | DEBUG_ALWAYS_SYNC */ +/* | DEBUG_VERBOSE_API */ +/* | DEBUG_VERBOSE_MSG */ +/* | DEBUG_VERBOSE_LRU */ +/* | DEBUG_VERBOSE_DRI */ +/* | DEBUG_VERBOSE_IOCTL */ +/* | DEBUG_VERBOSE_2D */ +/* | DEBUG_VERBOSE_TEXTURE */ + ); +#endif + + +#if 0 +/* Example extension function */ +static void +fxFooBarEXT(GLint i) +{ + printf("You called glFooBarEXT(%d)\n", i); +} +#endif + + +/* + * Enable/Disable the extensions for this context. + */ +static void tdfxDDInitExtensions( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + gl_extensions_disable( ctx, "GL_EXT_blend_logic_op" ); + gl_extensions_disable( ctx, "GL_EXT_blend_minmax" ); + gl_extensions_disable( ctx, "GL_EXT_blend_subtract" ); + gl_extensions_disable( ctx, "GL_EXT_blend_color" ); + gl_extensions_disable( ctx, "GL_EXT_blend_func_separate" ); + gl_extensions_disable( ctx, "GL_EXT_point_parameters" ); + gl_extensions_disable( ctx, "GL_EXT_shared_texture_palette" ); + gl_extensions_disable( ctx, "GL_INGR_blend_func_separate" ); + gl_extensions_enable( ctx, "GL_HP_occlusion_test" ); + + if ( fxMesa->numTMUs == 1 ) { + gl_extensions_disable( ctx, "GL_EXT_texture_env_add" ); + gl_extensions_disable( ctx, "GL_ARB_multitexture" ); + } + + if ( TDFX_IS_NAPALM( fxMesa ) ) { + gl_extensions_enable( ctx, "GL_EXT_texture_env_combine" ); + } + + if (fxMesa->haveHwStencil) { + gl_extensions_enable( ctx, "GL_EXT_stencil_wrap" ); + } + + /* Example of hooking in an extension function. + * For DRI-based drivers, also see __driRegisterExtensions in the + * tdfx_xmesa.c file. + */ +#if 0 + { + void **dispatchTable = (void **) ctx->Exec; + const int _gloffset_FooBarEXT = 555; /* just an example number! */ + const int tabSize = _glapi_get_dispatch_table_size(); + assert(_gloffset_FooBarEXT < tabSize); + dispatchTable[_gloffset_FooBarEXT] = (void *) tdfxFooBarEXT; + /* XXX You would also need to hook into the display list dispatch + * table. Really, the implementation of extensions might as well + * be in the core of Mesa since core Mesa and the device driver + * is one big shared lib. + */ + } +#endif +} + + + +GLboolean tdfxCreateContext( Display *dpy, GLvisual *mesaVis, + __DRIcontextPrivate *driContextPriv ) +{ + tdfxContextPtr fxMesa; + GLcontext *ctx = driContextPriv->mesaContext; + __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + tdfxScreenPrivate *fxScreen = (tdfxScreenPrivate *) sPriv->private; + TDFXSAREAPriv *saPriv = (TDFXSAREAPriv *) ((char *) sPriv->pSAREA + + fxScreen->sarea_priv_offset); + + + fxMesa = (tdfxContextPtr) Xmalloc( sizeof(tdfxContextRec) ); + if ( !fxMesa ) { + return GL_FALSE; + } + BZERO(fxMesa, sizeof(tdfxContextRec)); + + /* Mirror some important DRI state + */ + fxMesa->hHWContext = driContextPriv->hHWContext; + fxMesa->driHwLock = &sPriv->pSAREA->lock; + fxMesa->driFd = sPriv->fd; + + fxMesa->driScreen = sPriv; + fxMesa->driContext = driContextPriv; + fxMesa->fxScreen = fxScreen; + fxMesa->sarea = saPriv; + + + + fxMesa->haveHwStencil = ( TDFX_IS_NAPALM( fxMesa ) && + mesaVis->StencilBits && + mesaVis->DepthBits == 24 ); + + fxMesa->screen_width = fxScreen->width; + fxMesa->screen_height = fxScreen->height; + + fxMesa->new_state = ~0; + fxMesa->dirty = ~0; + + fxMesa->vertexFormat = 0; + + fxMesa->glCtx = driContextPriv->mesaContext; + fxMesa->glVis = mesaVis; + + grDRIOpen( sPriv->pFB, fxScreen->regs.map, fxScreen->deviceID, + fxScreen->width, fxScreen->height, fxScreen->mem, fxScreen->cpp, + fxScreen->stride, fxScreen->fifoOffset, fxScreen->fifoSize, + fxScreen->fbOffset, fxScreen->backOffset, fxScreen->depthOffset, + fxScreen->textureOffset, fxScreen->textureSize, &saPriv->fifoPtr, + &saPriv->fifoRead ); + + if ( getenv( "FX_GLIDE_SWAPINTERVAL" ) ) { + fxMesa->Glide.SwapInterval = atoi( getenv( "FX_GLIDE_SWAPINTERVAL" ) ); + } else { + fxMesa->Glide.SwapInterval = 1; + } + if ( getenv( "FX_MAX_PENDING_SWAPS" ) ) { + fxMesa->Glide.MaxPendingSwaps = atoi( getenv( "FX_MAX_PENDING_SWAPS" ) ); + } else { + fxMesa->Glide.MaxPendingSwaps = 2; + } + + fxMesa->Glide.Initialized = GL_FALSE; + fxMesa->Glide.Board = 0; + + if ( getenv( "FX_EMULATE_SINGLE_TMU" ) || TDFX_IS_BANSHEE( fxMesa ) ) { + fxMesa->numTMUs = 1; + } else { + fxMesa->numTMUs = 2; + } + + fxMesa->stats.swapBuffer = 0; + fxMesa->stats.reqTexUpload = 0; + fxMesa->stats.texUpload = 0; + fxMesa->stats.memTexUpload = 0; + + fxMesa->tmuSrc = TDFX_TMU_NONE; + + if ( TDFX_IS_NAPALM( fxMesa ) ) { + ctx->Const.MaxTextureLevels = 12; + ctx->Const.MaxTextureSize = 2048; + ctx->Const.NumCompressedTextureFormats = 1; + } else { + ctx->Const.MaxTextureLevels = 9; + ctx->Const.MaxTextureSize = 256; + ctx->Const.NumCompressedTextureFormats = 0; + } + ctx->Const.MaxTextureUnits = TDFX_IS_BANSHEE( fxMesa ) ? 1 : 2; + ctx->NewState |= NEW_DRVSTATE1; + + + ctx->DriverCtx = (void *) fxMesa; + + tdfxDDInitExtensions( ctx ); + + tdfxDDInitDriverFuncs( ctx ); + tdfxDDInitStateFuncs( ctx ); + tdfxDDInitRenderFuncs( ctx ); + tdfxDDInitSpanFuncs( ctx ); + tdfxDDInitTextureFuncs( ctx ); + + ctx->Driver.TriangleCaps = (DD_TRI_CULL | + DD_TRI_LIGHT_TWOSIDE | + DD_TRI_STIPPLE | + DD_TRI_OFFSET); + + if ( ctx->VB ) + tdfxDDRegisterVB( ctx->VB ); + + if ( ctx->NrPipelineStages ) + ctx->NrPipelineStages = + tdfxDDRegisterPipelineStages( ctx->PipelineStage, + ctx->PipelineStage, + ctx->NrPipelineStages ); + + /* Run the config file */ + gl_context_initialize( ctx ); + +#if 0 + /* HACK: Allocate buffer for vertex data. + */ + if ( fxMesa->buffer ) { + ALIGN_FREE( fxMesa->buffer ); + } + fxMesa->buffer = ALIGN_MALLOC( 2048, 32 ); + fxMesa->buffer_total = 2048; + fxMesa->buffer_used = 0; +#endif + + tdfxInitState( fxMesa ); + + driContextPriv->driverPrivate = (void *) fxMesa; + + return GL_TRUE; +} + + +static GLboolean tdfxInitVertexFormats( tdfxContextPtr fxMesa ) +{ + FxI32 result; + int i; + + LOCK_HARDWARE( fxMesa ); + + grGet( GR_GLIDE_VERTEXLAYOUT_SIZE, sizeof(FxI32), &result ); + for ( i = 0 ; i < TDFX_NUM_LAYOUTS ; i++ ) { + fxMesa->layout[i] = MALLOC( result ); + if ( !fxMesa->layout[i] ) { + UNLOCK_HARDWARE( fxMesa ); + return GL_FALSE; + } + } + + /* Single textured vertex format - 32 bytes. + */ + grReset( GR_VERTEX_PARAMETER ); + + grCoordinateSpace( GR_WINDOW_COORDS ); + grVertexLayout( GR_PARAM_XY, TDFX_XY_OFFSET, GR_PARAM_ENABLE ); + grVertexLayout( GR_PARAM_Z, TDFX_Z_OFFSET, GR_PARAM_ENABLE ); + grVertexLayout( GR_PARAM_Q, TDFX_Q_OFFSET, GR_PARAM_ENABLE ); + grVertexLayout( GR_PARAM_PARGB, TDFX_ARGB_OFFSET, GR_PARAM_ENABLE ); + grVertexLayout( GR_PARAM_ST0, TDFX_ST0_OFFSET, GR_PARAM_ENABLE ); +#if 0 + grVertexLayout( GR_PARAM_FOG_EXT, TDFX_FOG_OFFSET, GR_PARAM_ENABLE ); +#endif + + grGlideGetVertexLayout( fxMesa->layout[TDFX_LAYOUT_SINGLE] ); + + /* Multitextured vertex format - 40 bytes. + */ + grReset( GR_VERTEX_PARAMETER ); + + grCoordinateSpace( GR_WINDOW_COORDS ); + grVertexLayout( GR_PARAM_XY, TDFX_XY_OFFSET, GR_PARAM_ENABLE ); + grVertexLayout( GR_PARAM_Z, TDFX_Z_OFFSET, GR_PARAM_ENABLE ); + grVertexLayout( GR_PARAM_Q, TDFX_Q_OFFSET, GR_PARAM_ENABLE ); + grVertexLayout( GR_PARAM_PARGB, TDFX_ARGB_OFFSET, GR_PARAM_ENABLE ); + grVertexLayout( GR_PARAM_ST0, TDFX_ST0_OFFSET, GR_PARAM_ENABLE ); + grVertexLayout( GR_PARAM_ST1, TDFX_ST1_OFFSET, GR_PARAM_ENABLE ); +#if 0 + grVertexLayout( GR_PARAM_FOG_EXT, TDFX_FOG_OFFSET, GR_PARAM_ENABLE ); +#endif + + grGlideGetVertexLayout( fxMesa->layout[TDFX_LAYOUT_MULTI] ); + + /* Projected texture vertex format - 48 bytes. + */ + grReset( GR_VERTEX_PARAMETER ); + + grCoordinateSpace( GR_WINDOW_COORDS ); + grVertexLayout( GR_PARAM_XY, TDFX_XY_OFFSET, GR_PARAM_ENABLE ); + grVertexLayout( GR_PARAM_Z, TDFX_Z_OFFSET, GR_PARAM_ENABLE ); + grVertexLayout( GR_PARAM_Q, TDFX_Q_OFFSET, GR_PARAM_ENABLE ); + grVertexLayout( GR_PARAM_PARGB, TDFX_ARGB_OFFSET, GR_PARAM_ENABLE ); + grVertexLayout( GR_PARAM_ST0, TDFX_ST0_OFFSET, GR_PARAM_ENABLE ); + grVertexLayout( GR_PARAM_ST1, TDFX_ST1_OFFSET, GR_PARAM_ENABLE ); + grVertexLayout( GR_PARAM_Q0, TDFX_Q0_OFFSET, GR_PARAM_ENABLE ); + grVertexLayout( GR_PARAM_Q1, TDFX_Q1_OFFSET, GR_PARAM_ENABLE ); +#if 0 + grVertexLayout( GR_PARAM_FOG_EXT, TDFX_FOG_OFFSET, GR_PARAM_ENABLE ); +#endif + + grGlideGetVertexLayout( fxMesa->layout[TDFX_LAYOUT_PROJECT] ); + + UNLOCK_HARDWARE( fxMesa ); + + return GL_TRUE; +} + + +/* + * Initialize the state in an tdfxContextPtr struct. + */ +GLboolean tdfxInitContext( __DRIdrawablePrivate *driDrawPriv, + tdfxContextPtr fxMesa ) +{ + /* KW: Would be nice to make one of these a member of the other. + */ + FxI32 result[2]; + + if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) { + fprintf( stderr, "%s( %p )\n", __FUNCTION__, fxMesa ); + } + +#if DEBUG_LOCKING + fprintf(stderr, "Debug locking enabled\n"); +#endif + + if ( fxMesa->Glide.Initialized ) + return GL_TRUE; + + fxMesa->width = driDrawPriv->w; + fxMesa->height = driDrawPriv->h; + + /* We have to use a light lock here, because we can't do any glide + * operations yet. No use of FX_* functions in this function. + */ + DRM_LIGHT_LOCK( fxMesa->driFd, fxMesa->driHwLock, fxMesa->hHWContext ); + + grGlideInit(); + grSstSelect( fxMesa->Glide.Board ); + + fxMesa->Glide.Context = grSstWinOpen( (FxU32) -1, + GR_RESOLUTION_NONE, + GR_REFRESH_NONE, + fxMesa->Glide.ColorFormat, + fxMesa->Glide.Origin, + 2, 1 ); + + grDRIResetSAREA(); + + DRM_UNLOCK( fxMesa->driFd, fxMesa->driHwLock, fxMesa->hHWContext ); + + if ( !fxMesa->Glide.Context ) + return GL_FALSE; + + + /* Perform the Glide-dependant part of the context initialization. + */ + FX_grColorMaskv( fxMesa->glCtx, true4 ); + + tdfxTMInit( fxMesa ); + + LOCK_HARDWARE( fxMesa ); + + if ( fxMesa->glVis->DepthBits > 0 ) { + grDepthBufferMode(GR_DEPTHBUFFER_ZBUFFER); + } else { + grDepthBufferMode(GR_DEPTHBUFFER_DISABLE); + } + + grLfbWriteColorFormat( GR_COLORFORMAT_ABGR ); + + grGet( GR_TEXTURE_ALIGN, sizeof(FxI32), result ); + fxMesa->Glide.TextureAlign = result[0]; + + fxMesa->Glide.State = NULL; + grGet( GR_GLIDE_STATE_SIZE, sizeof(FxI32), result ); + fxMesa->Glide.State = MALLOC( result[0] ); + + fxMesa->Fog.Table = NULL; + grGet( GR_FOG_TABLE_ENTRIES, sizeof(FxI32), result ); + fxMesa->Fog.Table = MALLOC( result[0] * sizeof(GrFog_t) ); + + UNLOCK_HARDWARE( fxMesa ); + + if ( !fxMesa->Glide.State || !fxMesa->Fog.Table ) { + if ( fxMesa->Glide.State ) + FREE( fxMesa->Glide.State ); + if ( fxMesa->Fog.Table ) + FREE( fxMesa->Fog.Table ); + return GL_FALSE; + } + + if ( !tdfxInitVertexFormats( fxMesa ) ) { + return GL_FALSE; + } + + LOCK_HARDWARE( fxMesa ); + + grGlideGetState( fxMesa->Glide.State ); + + if ( getenv( "FX_GLIDE_INFO" ) ) { + printf( "GR_RENDERER = %s\n", (char *) grGetString( GR_RENDERER ) ); + printf( "GR_VERSION = %s\n", (char *) grGetString( GR_VERSION ) ); + printf( "GR_VENDOR = %s\n", (char *) grGetString( GR_VENDOR ) ); + printf( "GR_HARDWARE = %s\n", (char *) grGetString( GR_HARDWARE ) ); + printf( "GR_EXTENSION = %s\n", (char *) grGetString( GR_EXTENSION ) ); + } + + UNLOCK_HARDWARE( fxMesa ); + + fxMesa->numClipRects = 0; + fxMesa->pClipRects = NULL; + fxMesa->scissoredClipRects = GL_FALSE; + + fxMesa->Glide.Initialized = GL_TRUE; + + return GL_TRUE; +} + + +void tdfxDestroyContext( tdfxContextPtr fxMesa ) +{ + if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) { + fprintf( stderr, "%s( %p )\n", __FUNCTION__, fxMesa ); + } + + if ( fxMesa ) { + GLcontext *ctx = fxMesa->glCtx; + struct gl_texture_object *tObj; + + if ( ctx->Shared->RefCount == 1 && fxMesa->driDrawable ) { + /* This share group is about to go away, free our private + * texture object data. + */ + LOCK_HARDWARE( fxMesa ); + for ( tObj = ctx->Shared->TexObjectList ; tObj ; tObj = tObj->Next ) { + tdfxTMFreeTextureLocked( fxMesa, tObj ); + } + UNLOCK_HARDWARE( fxMesa ); + } + + tdfxTMClose( fxMesa ); /* free texture memory */ + XFree( fxMesa ); + } + +#if 0 + glx_fini_prof(); +#endif +} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h:1.1 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h Wed Mar 21 11:14:27 2001 @@ -0,0 +1,767 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h,v 1.1 2001/03/21 16:14:27 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * + */ + +#ifndef __TDFX_CONTEXT_H__ +#define __TDFX_CONTEXT_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include +#include "dri_tmm.h" +#include "dri_mesaint.h" +#include "dri_mesa.h" +#include "dri_xmesaapi.h" +#ifdef XFree86Server +#include "GL/xf86glx.h" +#else +#include "glheader.h" +#endif +#if defined(__linux__) +#include +#endif +#include "clip.h" +#include "context.h" + +#include "macros.h" +#include "matrix.h" +#include "mem.h" +#include "texture.h" +#include "types.h" +#include "vb.h" +#include "vbrender.h" +#include "xform.h" + +#include "tdfx_wrapper.h" +#include "tdfx_screen.h" +#include "tdfx_lock.h" +#include "tdfx_g3ext.h" + + + +/* Mergable items first + */ +#define SETUP_RGBA 0x1 +#define SETUP_TMU0 0x2 +#define SETUP_TMU1 0x4 +#define SETUP_XY 0x8 +#define SETUP_Z 0x10 +#define SETUP_W 0x20 + +#define MAX_MERGABLE 0x8 + + +#define TDFX_TMU0 GR_TMU0 +#define TDFX_TMU1 GR_TMU1 +#define TDFX_TMU_SPLIT 98 +#define TDFX_TMU_BOTH 99 +#define TDFX_TMU_NONE 100 + + + +/* Flags for fxMesa->new_state + */ +#define TDFX_NEW_COLOR 0x0001 +#define TDFX_NEW_ALPHA 0x0002 +#define TDFX_NEW_DEPTH 0x0004 +#define TDFX_NEW_FOG 0x0008 +#define TDFX_NEW_STENCIL 0x0010 +#define TDFX_NEW_CLIP 0x0020 +#define TDFX_NEW_VIEWPORT 0x0040 +#define TDFX_NEW_CULL 0x0080 +#define TDFX_NEW_GLIDE 0x0100 +#define TDFX_NEW_TEXTURE 0x0200 +#define TDFX_NEW_CONTEXT 0x0400 +#define TDFX_NEW_LINE 0x0800 +#define TDFX_NEW_RENDER 0x1000 +#define TDFX_NEW_STIPPLE 0x2000 +#define TDFX_NEW_TEXTURE_BIND 0x4000 /* experimental */ + + +/* Flags for fxMesa->dirty + */ +#define TDFX_UPLOAD_COLOR_COMBINE 0x00000001 +#define TDFX_UPLOAD_ALPHA_COMBINE 0x00000002 +#define TDFX_UPLOAD_RENDER_BUFFER 0x00000004 +#define TDFX_UPLOAD_ALPHA_TEST 0x00000008 +#define TDFX_UPLOAD_ALPHA_REF 0x00000010 +#define TDFX_UPLOAD_BLEND_FUNC 0x00000020 +#define TDFX_UPLOAD_DEPTH_MODE 0x00000040 +#define TDFX_UPLOAD_DEPTH_BIAS 0x00000080 +#define TDFX_UPLOAD_DEPTH_FUNC 0x00000100 +#define TDFX_UPLOAD_DEPTH_MASK 0x00000200 +#define TDFX_UPLOAD_FOG_MODE 0x00000400 +#define TDFX_UPLOAD_FOG_COLOR 0x00000800 +#define TDFX_UPLOAD_FOG_TABLE 0x00001000 + +#define TDFX_UPLOAD_CLIP 0x00002000 +#define TDFX_UPLOAD_CULL 0x00004000 +#define TDFX_UPLOAD_VERTEX_LAYOUT 0x00008000 +#define TDFX_UPLOAD_COLOR_MASK 0x00010000 +#define TDFX_UPLOAD_CONSTANT_COLOR 0x00020000 +#define TDFX_UPLOAD_DITHER 0x00040000 +#define TDFX_UPLOAD_STENCIL 0x00080000 + +#define TDFX_UPLOAD_TEXTURE_SOURCE 0x00100000 +#define TDFX_UPLOAD_TEXTURE_PARAMS 0x00200000 +#define TDFX_UPLOAD_TEXTURE_PALETTE 0x00400000 +#define TDFX_UPLOAD_TEXTURE_ENV 0x00800000 +#define TDFX_UPLOAD_TEXTURE_IMAGES 0x01000000 + +#define TDFX_UPLOAD_LINE 0x02000000 + +#define TDFX_UPLOAD_STIPPLE 0x04000000 + +/* Flags for software fallback cases + */ +#define TDFX_FALLBACK_TEXTURE 0x0001 +#define TDFX_FALLBACK_BUFFER 0x0002 +#define TDFX_FALLBACK_SPECULAR 0x0004 +#define TDFX_FALLBACK_STENCIL 0x0008 +#define TDFX_FALLBACK_RENDER_MODE 0x0010 +#define TDFX_FALLBACK_MULTIDRAW 0x0020 +#define TDFX_FALLBACK_LOGICOP 0x0040 +#define TDFX_FALLBACK_WIDE_AA_LINE 0x0080 +#define TDFX_FALLBACK_TEXTURE_ENV 0x0100 +#define TDFX_FALLBACK_TEXTURE_BORDER 0x0200 +#define TDFX_FALLBACK_COLORMASK 0x0400 +#define TDFX_FALLBACK_BLEND 0x0800 + +/* Different Glide vertex layouts + */ +#define TDFX_LAYOUT_SINGLE 0 +#define TDFX_LAYOUT_MULTI 1 +#define TDFX_LAYOUT_PROJECT 2 +#define TDFX_NUM_LAYOUTS 3 + +#define TDFX_XY_OFFSET 0 +#define TDFX_Z_OFFSET 8 +#define TDFX_Q_OFFSET 12 +#define TDFX_ARGB_OFFSET 16 +#define TDFX_PAD_OFFSET 20 +#define TDFX_FOG_OFFSET 20 /* experimental */ +#define TDFX_ST0_OFFSET 24 +#define TDFX_ST1_OFFSET 32 +#define TDFX_Q0_OFFSET 40 +#define TDFX_Q1_OFFSET 44 + + +/* Flags for buffer clears + */ +#define TDFX_FRONT 0x1 +#define TDFX_BACK 0x2 +#define TDFX_DEPTH 0x4 +#define TDFX_STENCIL 0x8 + +/* + * Subpixel offsets to adjust Mesa's (true) window coordinates to + * Glide coordinates. We need these to ensure precise rasterization. + * Otherwise, we'll fail a bunch of conformance tests. + */ +#define TRI_X_OFFSET ( 0.0F) +#define TRI_Y_OFFSET ( 0.0F) +#define LINE_X_OFFSET ( 0.0F) +#define LINE_Y_OFFSET ( 0.125F) +#define PNT_X_OFFSET ( 0.375F) +#define PNT_Y_OFFSET ( 0.375F) + + +#define TDFX_DEPTH_BIAS_SCALE 128 + +/* Including xf86PciInfo.h causes a bunch of errors + */ +#ifndef PCI_CHIP_BANSHEE +#define PCI_CHIP_BANSHEE 0x0003 +#define PCI_CHIP_VOODOO3 0x0005 +#define PCI_CHIP_VOODOO4 0x0009 +#define PCI_CHIP_VOODOO5 0x0009 +#endif + +#define TDFX_IS_BANSHEE( fxMesa ) \ + ( fxMesa->fxScreen->deviceID == PCI_CHIP_BANSHEE ) +#define TDFX_IS_VOODOO3( fxMesa ) \ + ( fxMesa->fxScreen->deviceID == PCI_CHIP_VOODOO3 ) +#define TDFX_IS_VOODOO4( fxMesa ) \ + ( fxMesa->fxScreen->deviceID == PCI_CHIP_VOODOO4 ) +#define TDFX_IS_VOODOO5( fxMesa ) \ + ( fxMesa->fxScreen->deviceID == PCI_CHIP_VOODOO5 ) +#define TDFX_IS_NAPALM( fxMesa ) \ + ( (fxMesa->fxScreen->deviceID == PCI_CHIP_VOODOO4) || \ + (fxMesa->fxScreen->deviceID == PCI_CHIP_VOODOO5) ) + + +#define PACK_BGRA32(R, G, B, A) \ + ( (((GLuint) (R)) << 16) | \ + (((GLuint) (G)) << 8) | \ + (((GLuint) (B)) ) | \ + (((GLuint) (A)) << 24) ) + +#define PACK_RGBA32(R, G, B, A) \ + ( (((GLuint) (R)) ) | \ + (((GLuint) (G)) << 8) | \ + (((GLuint) (B)) << 16) | \ + (((GLuint) (A)) << 24) ) + +/* + * The first two macros are to pack 8 bit color + * channel values into a 565 format. + */ +#define PACK_RGB16(R, G, B) \ + ((((GLuint) (R) & 0xF8) << 8) | \ + (((GLuint) (G) & 0xFC) << 3) | \ + (((GLuint) (B) & 0xFF) >> 3)) +#define PACK_BGR16(R, G, B) \ + ((((GLuint) (B) & 0xF8) << 8) | \ + (((GLuint) (G) & 0xFC) << 3) | \ + (((GLuint) (R) & 0xFF) >> 3)) +/* + * The second two macros pack 8 bit color channel values + * into 1555 values. + */ +#define PACK_RGBA16(R, G, B, A) \ + (((((GLuint) (A) & 0xFF) > 0) << 15)| \ + (((GLuint) (R) & 0xF8) << 7) | \ + (((GLuint) (G) & 0xF8) << 2) | \ + (((GLuint) (B) & 0xF8) >> 3)) +#define PACK_BGRA16(R, G, B, A) \ + (((((GLuint) (A) & 0xFF) > 0) << 15)| \ + (((GLuint) (B) & 0xF8) << 7) | \ + (((GLuint) (G) & 0xF8) << 2) | \ + (((GLuint) (R) & 0xF8) >> 3)) + +typedef void (*tdfxRenderEltsFunc)( struct vertex_buffer * ); + +/* Used in calls to grColorMaskv()... + */ +extern const GLboolean false4[4]; +extern const GLboolean true4[4]; + + +typedef void (*tdfx_interp_func)( GLfloat t, + GLfloat *result, + const GLfloat *in, + const GLfloat *out ); + +typedef struct { + volatile int fifoPtr; + volatile int fifoRead; + volatile int fifoOwner; + volatile int ctxOwner; + volatile int texOwner; +} TDFXSAREAPriv; + +typedef struct { + GLuint swapBuffer; + GLuint reqTexUpload; + GLuint texUpload; + GLuint memTexUpload; + GLuint texSwaps; +} tdfxStats; + +/* + * Memory range from startAddr to endAddr-1 + */ +typedef struct mem_range { + struct mem_range *next; + FxU32 startAddr, endAddr; +} tdfxMemRange; + +typedef struct { + GLvoid *data; + GLsizei width, height; + FxU32 size; +} tdfxTexRawData; + +typedef struct { + tdfxTexRawData original; /* Mesa-formatted texture image */ + tdfxTexRawData rescaled; /* Only needed if aspect ratio > 8:1 */ + + GLvoid *data; /* Final version of texture image */ + FxU32 size; /* image size in bytes */ + + GrTextureFormat_t glideFormat; /* Glide image format */ + GLint wScale, hScale; /* Broken hardware... */ +} tdfxTexImage, *tdfxTexImagePtr; + + +#define TDFX_NUM_TMU 2 + + +typedef struct { + GLboolean isInTM; + GLboolean reloadImages; /* if true, resend images to Glide */ + GLuint lastTimeUsed; + FxU32 whichTMU; + + GrTexInfo info; + tdfxTexImage image[MAX_TEXTURE_LEVELS]; + tdfxMemRange *range[TDFX_NUM_TMU]; + + GLint minLevel, maxLevel; + GrMipMapMode_t mmMode; + GrAspectRatio_t aspectRatio; + FxBool LODblend; + GrTextureFilterMode_t minFilt; + GrTextureFilterMode_t magFilt; + GrTextureClampMode_t sClamp; + GrTextureClampMode_t tClamp; + + GLfloat sScale, tScale; /* texcoord scale factor */ + + GuTexPalette palette; +} tdfxTexObj, *tdfxTexObjPtr; + +#define TDFX_TEXTURE_DATA(tObj) ((tdfxTexObjPtr)((tObj)->DriverData)) + + +/* This is state which may be shared by several tdfx contexts. + * It hangs off of Mesa's gl_shared_state object (ctx->Shared->DriverData). + */ +typedef struct tdfx_shared_state { + GLboolean umaTexMemory; + GLuint totalTexMem[TDFX_NUM_TMU]; /* constant */ + GLuint freeTexMem[TDFX_NUM_TMU]; /* changes as we go */ + tdfxMemRange *rangePool; + tdfxMemRange *freeRanges[TDFX_NUM_TMU]; +} tdfxSharedState, *tdfxSharedStatePtr; + + + + +/* ================================================================ + * + * We want to keep a mirror of the Glide function call parameters so we + * can avoid updating our state too often. + * + * Each of these broad groups will typically have a new state flag + * associated with it, and will be updated together. The individual + * Glide function calls each have a dirty flag and will only be called + * when absolutely necessary. + */ + +/* for grTexSource() */ +struct tdfx_texsource { + FxU32 StartAddress; + FxU32 EvenOdd; + GrTexInfo *Info; +}; + +/* Texture object params */ +struct tdfx_texparams { + GrTextureClampMode_t sClamp; + GrTextureClampMode_t tClamp; + GrTextureFilterMode_t minFilt; + GrTextureFilterMode_t magFilt; + GrMipMapMode_t mmMode; + FxBool LODblend; + GLfloat LodBias; +}; + +/* for grTexDownloadTable() texture palettes */ +struct tdfx_texpalette { + GrTexTable_t Type; + void *Data; +}; + +/* for Voodoo3/Banshee's grColorCombine() and grAlphaCombine() */ +struct tdfx_combine { + GrCombineFunction_t Function; /* Combine function */ + GrCombineFactor_t Factor; /* Combine scale factor */ + GrCombineLocal_t Local; /* Local combine source */ + GrCombineOther_t Other; /* Other combine source */ + FxBool Invert; /* Combine result inversion flag */ +}; + +/* for Voodoo3's grTexCombine() */ +struct tdfx_texcombine { + GrCombineFunction_t FunctionRGB; + GrCombineFactor_t FactorRGB; + GrCombineFunction_t FunctionAlpha; + GrCombineFactor_t FactorAlpha; + FxBool InvertRGB; + FxBool InvertAlpha; +}; + + +/* for Voodoo5's grColorCombineExt() */ +struct tdfx_combine_color_ext { + GrCCUColor_t SourceA; + GrCombineMode_t ModeA; + GrCCUColor_t SourceB; + GrCombineMode_t ModeB; + GrCCUColor_t SourceC; + FxBool InvertC; + GrCCUColor_t SourceD; + FxBool InvertD; + FxU32 Shift; + FxBool Invert; +}; + +/* for Voodoo5's grAlphaCombineExt() */ +struct tdfx_combine_alpha_ext { + GrACUColor_t SourceA; + GrCombineMode_t ModeA; + GrACUColor_t SourceB; + GrCombineMode_t ModeB; + GrACUColor_t SourceC; + FxBool InvertC; + GrACUColor_t SourceD; + FxBool InvertD; + FxU32 Shift; + FxBool Invert; +}; + +/* for Voodoo5's grTexColorCombineExt() */ +struct tdfx_color_texenv { + GrTCCUColor_t SourceA; + GrCombineMode_t ModeA; + GrTCCUColor_t SourceB; + GrCombineMode_t ModeB; + GrTCCUColor_t SourceC; + FxBool InvertC; + GrTCCUColor_t SourceD; + FxBool InvertD; + FxU32 Shift; + FxBool Invert; +}; + +/* for Voodoo5's grTexAlphaCombineExt() */ +struct tdfx_alpha_texenv { + GrTACUColor_t SourceA; + GrCombineMode_t ModeA; + GrTACUColor_t SourceB; + GrCombineMode_t ModeB; + GrTACUColor_t SourceC; + FxBool InvertC; + GrTCCUColor_t SourceD; + FxBool InvertD; + FxU32 Shift; + FxBool Invert; +}; + +/* Voodoo5's texture combine environment */ +struct tdfx_texcombine_ext { + struct tdfx_alpha_texenv Alpha; + struct tdfx_color_texenv Color; + GrColor_t EnvColor; +}; + +/* Used to track changes between Glide's state and Mesa's */ +struct tdfx_texstate { + GLuint Enabled; /* bitmask of all units */ + GLenum EnvMode[TDFX_NUM_TMU]; /* index is Glide index, not OpenGL */ + GLenum TexFormat[TDFX_NUM_TMU]; /* index is Glide index, not OpenGL */ +}; + +struct tdfx_color { + GrColor_t ClearColor; /* Buffer clear color value */ + GrAlpha_t ClearAlpha; /* Buffer clear alpha value */ + FxBool ColorMask[4]; /* Per-channel write enable flags */ + + GrColor_t MonoColor; /* Constant color value */ + + /* Alpha testing */ + GrCmpFnc_t AlphaFunc; /* Alpha test function */ + GrAlpha_t AlphaRef; /* Alpha ref value in range [0,255] */ + + /* Blending */ + GrAlphaBlendFnc_t BlendSrcRGB; /* Blend source RGB factor */ + GrAlphaBlendFnc_t BlendDstRGB; /* Blend destination RGB factor */ + GrAlphaBlendFnc_t BlendSrcA; /* Blend source alpha factor */ + GrAlphaBlendFnc_t BlendDstA; /* Blend destination alpha factor */ + + GrDitherMode_t Dither; /* Dither enable */ +}; + +struct tdfx_depth { + GrDepthBufferMode_t Mode; /* Fixed-point Z or floating-point W */ + FxI32 Bias; /* Polygon offset factor */ + GrCmpFnc_t Func; /* Depth test function */ + FxU32 Clear; /* Buffer clear value */ + FxBool Mask; /* Write enable flag */ +}; + +#ifndef GR_STIPPLE_PATTERN +#error You MUST upgrade your Glide3 libraries and headers. +#error Get the latest from http://dri.sourceforge.net/res.phtml +#endif + +struct tdfx_stipple { + GrStippleMode_t Mode; /* Stipple enable/disable */ + FxU32 Pattern; /* 8x4 Stipple Pattern */ +}; + +struct tdfx_fog { + GrFogMode_t Mode; /* Glide fog mode */ + GrColor_t Color; /* Fog color value */ + GLenum TableMode; /* GL fog mode currently in table */ + GrFog_t *Table; /* Fog value table */ + FxFloat Density; /* Density >= 0 */ + FxFloat Near; /* Start distance in eye coords */ + FxFloat Far; /* End distance in eye coords */ +}; + +struct tdfx_stencil { + GrCmpFnc_t Function; /* Stencil function */ + GrStencil_t RefValue; /* Stencil reference value */ + GrStencil_t ValueMask; /* Value mask */ + GrStencil_t WriteMask; /* Write mask */ + GrStencil_t FailFunc; /* Stencil fail function */ + GrStencil_t ZFailFunc; /* Stencil pass, depth fail function */ + GrStencil_t ZPassFunc; /* Stencil pass, depth pass function */ + GrStencil_t Clear; /* Buffer clear value */ +}; + +struct tdfx_scissor { + FxU32 minX, minY; /* Lower left corner */ + FxU32 maxX, maxY; /* Upper right corner */ +}; + +struct tdfx_viewport { + GrCoordinateSpaceMode_t Mode; /* Coordinate space */ + FxI32 X, Y; /* Position */ + FxI32 Width, Height; /* Size */ + FxFloat Near, Far; /* Depth buffer range */ +}; + +struct tdfx_glide { + void *State; /* Mirror of internal Glide state */ + GrContext_t Context; /* Glide context identifier */ + FxI32 Board; /* Current graphics subsystem */ + GrColorFormat_t ColorFormat; /* Framebuffer format */ + GrOriginLocation_t Origin; /* Location of screen space origin */ + + FxBool Initialized; /* Glide initialization done? */ + + FxI32 SwapInterval; /* SwapBuffers interval */ + FxI32 MaxPendingSwaps; /* Maximum outstanding SwapBuffers */ + FxI32 TextureAlign; + + /* Extensions */ + FxBool HaveCombineExt; /* COMBINE */ + FxBool HaveCommandTransportExt; /* COMMAND_TRANSPORT */ + FxBool HaveFogCoordExt; /* FOGCOORD */ + FxBool HavePixelExt; /* PIXEXT */ + FxBool HaveTextureBufferExt; /* TEXTUREBUFFER */ + FxBool HaveTexFmtExt; /* TEXFMT */ + FxBool HaveTexUMAExt; /* TEXUMA */ + FxBool HaveTexus2; /* Texus 2 - FXT1 */ +}; + + +struct tdfx_context { + /* Set once and never changed: + */ + GLcontext *glCtx; /* The core Mesa context */ + GLvisual *glVis; /* Describes the color buffer */ + + GLuint new_state; + GLuint dirty; + + /* Mirror of hardware state, Glide parameters + */ + struct tdfx_texsource TexSource[TDFX_NUM_TMU]; + struct tdfx_texparams TexParams[TDFX_NUM_TMU]; + struct tdfx_texpalette TexPalette; + + /* Voodoo3 texture/color combine state */ + struct tdfx_combine ColorCombine; + struct tdfx_combine AlphaCombine; + struct tdfx_texcombine TexCombine[TDFX_NUM_TMU]; + + /* Voodoo5 texture/color combine state */ + struct tdfx_combine_color_ext ColorCombineExt; + struct tdfx_combine_alpha_ext AlphaCombineExt; + struct tdfx_texcombine_ext TexCombineExt[TDFX_NUM_TMU]; + + /* Tracks tex state difference between Glide and Mesa */ + struct tdfx_texstate TexState; + + GrBuffer_t DrawBuffer; /* Current draw buffer */ + GrBuffer_t ReadBuffer; /* Current read buffer */ + + struct tdfx_color Color; + struct tdfx_depth Depth; + struct tdfx_fog Fog; + struct tdfx_stencil Stencil; + struct tdfx_scissor Scissor; + struct tdfx_viewport Viewport; + struct tdfx_stipple Stipple; + + GrCullMode_t CullMode; + + struct tdfx_glide Glide; + + /* Variable-size Glide vertex formats + */ + GLuint vertsize; /* bytes per vertex */ + GLuint vertexFormat; /* the current format */ + void *layout[TDFX_NUM_LAYOUTS]; + + GLuint tmu_source[TDFX_NUM_TMU]; + GLuint tex_dest[MAX_TEXTURE_UNITS]; + GLuint numTMUs; + + GLuint SetupIndex; + GLuint SetupDone; + GLuint RenderIndex; + + GLuint IndirectTriangles; + GLuint Fallback; + + GLfloat sScale0, tScale0; + GLfloat sScale1, tScale1; + + GLuint using_fast_path, passes, multipass; + GLuint texBindNumber; + GLint tmuSrc; + + int screen_width; + int screen_height; + + GLboolean haveHwStencil; + + GLint maxPendingSwapBuffers; + + /* stuff added for DRI */ + __DRIscreenPrivate *driScreen; + __DRIcontextPrivate *driContext; + __DRIdrawablePrivate *driDrawable; + drmContext hHWContext; + drmLock *driHwLock; + int driFd; + tdfxScreenPrivate *fxScreen; + TDFXSAREAPriv *sarea; + + + /* + * Changes during execution: + */ + int width, height; /* size of window */ + int x_offset; /* distance from window left to screen left */ + int y_offset; /* distance from window top to screen top */ + int y_delta; /* distance from window bottom to screen bottom */ + + int numClipRects; + XF86DRIClipRectPtr pClipRects; + GLboolean scissoredClipRects; /* if true, pClipRects is private storage */ + + + GuTexPalette glbPalette; /* global texture palette */ + + tdfx_interp_func interp; + + points_func PointsFunc; + line_func LineFunc; + triangle_func TriangleFunc; + quad_func QuadFunc; + render_func *RenderVBRawTab; + tdfxRenderEltsFunc RenderElementsRaw; + + + tdfxStats stats; + + /* HACK: Let's get some buffering of vertices happening... + */ + GLuint *buffer; + GLuint buffer_total; + GLuint buffer_used; +}; + +#define TDFX_CONTEXT(ctx) ((tdfxContextPtr)((ctx)->DriverCtx)) + + +extern GLboolean tdfxCreateContext( Display *dpy, GLvisual *mesaVis, + __DRIcontextPrivate *driContextPriv ); +extern void tdfxDestroyContext( tdfxContextPtr fxMesa ); + +extern GLboolean tdfxInitContext( __DRIdrawablePrivate *driDrawPriv, + tdfxContextPtr fxMesa ); + + +/* Color packing utilities + */ +#define TDFXPACKCOLOR332( r, g, b ) \ + (((b) & 0xe0) | (((g) & 0xe0) >> 3) | (((r) & 0xc0) >> 6)) + +#define TDFXPACKCOLOR1555( r, g, b, a ) \ + ((((r) & 0xf8) << 7) | (((g) & 0xf8) << 2) | (((b) & 0xf8) >> 3) | \ + ((a) ? 0x8000 : 0)) + +#define TDFXPACKCOLOR565( r, g, b ) \ + ((((r) & 0xf8) << 8) | (((g) & 0xfc) << 3) | (((b) & 0xf8) >> 3)) + +#define TDFXPACKCOLOR888( r, g, b ) \ + (((b) << 16) | ((g) << 8) | (r)) + +#define TDFXPACKCOLOR8888( r, g, b, a ) \ + (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)) + +#define TDFXPACKCOLOR4444( r, g, b, a ) \ + ((((a) & 0xf0) << 8) | (((b) & 0xf0) << 4) | ((g) & 0xf0) | ((r) >> 4)) + +static __inline__ GrColor_t tdfxPackColor( GLuint cpp, + GLubyte r, GLubyte g, + GLubyte b, GLubyte a ) +{ + switch ( cpp ) { + case 2: + return TDFXPACKCOLOR565( r, g, b ); + case 4: + return TDFXPACKCOLOR8888( r, g, b, a ); + default: + return 0; + } +} + +#define DO_DEBUG 0 +#if DO_DEBUG +extern int TDFX_DEBUG; +#else +#define TDFX_DEBUG 0 +#endif + +#define DEBUG_ALWAYS_SYNC 0x01 +#define DEBUG_VERBOSE_API 0x02 +#define DEBUG_VERBOSE_MSG 0x04 +#define DEBUG_VERBOSE_LRU 0x08 +#define DEBUG_VERBOSE_DRI 0x10 +#define DEBUG_VERBOSE_IOCTL 0x20 +#define DEBUG_VERBOSE_2D 0x40 +#define DEBUG_VERBOSE_TEXTURE 0x80 + +#endif /* GLX_DIRECT_RENDERING */ + +#endif /* __TDFX_CONTEXT_H__ */ Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c:1.4 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c Wed May 2 11:06:04 2001 @@ -0,0 +1,299 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c,v 1.4 2001/05/02 15:06:04 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * + */ + +#include "tdfx_context.h" +#include "tdfx_dd.h" +#include "tdfx_vb.h" +#include "tdfx_pipeline.h" +#include "tdfx_pixels.h" + +#include "enums.h" +#include "pb.h" +#if defined(USE_X86_ASM) || defined(USE_3DNOW_ASM) || defined(USE_KATMAI_ASM) +#include "X86/common_x86_asm.h" +#endif + +#define TDFX_DATE "20010501" + + +/* These are used in calls to FX_grColorMaskv() */ +const GLboolean false4[4] = { GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE }; +const GLboolean true4[4] = { GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE }; + + + +/* KW: Put the word Mesa in the render string because quakeworld + * checks for this rather than doing a glGet(GL_MAX_TEXTURE_SIZE). + * Why? + */ +static const GLubyte *tdfxDDGetString( GLcontext *ctx, GLenum name ) +{ + tdfxContextPtr fxMesa = (tdfxContextPtr) ctx->DriverCtx; + + switch ( name ) { + case GL_VENDOR: + return (GLubyte *)"VA Linux Systems, Inc."; + + case GL_RENDERER: { + static char buffer[128]; + char hardware[128]; + + strcpy( hardware, FX_grGetString( fxMesa, GR_HARDWARE ) ); + + if ( strcmp( hardware, "Voodoo3 (tm)" ) == 0 ) { + strcpy( hardware, "Voodoo3" ); + } + else if ( strcmp( hardware, "Voodoo Banshee (tm)" ) == 0 ) { + strcpy( hardware, "VoodooBanshee" ); + } + else if ( strcmp( hardware, "Voodoo4 (tm)" ) == 0 ) { + strcpy( hardware, "Voodoo4" ); + } + else if ( strcmp( hardware, "Voodoo5 (tm)" ) == 0 ) { + strcpy( hardware, "Voodoo5" ); + } + else { + /* Unexpected result: replace spaces with hyphens */ + int i; + for ( i = 0 ; hardware[i] ; i++ ) { + if ( hardware[i] == ' ' || hardware[i] == '\t' ) + hardware[i] = '-'; + } + } + /* Now make the GL_RENDERER string */ + sprintf( buffer, "Mesa DRI %s " TDFX_DATE, hardware ); + + /* Append any CPU-specific information. + */ +#ifdef USE_X86_ASM + if ( gl_x86_cpu_features ) { + strncat( buffer, " x86", 4 ); + } +#endif +#ifdef USE_MMX_ASM + if ( cpu_has_mmx ) { + strncat( buffer, "/MMX", 4 ); + } +#endif +#ifdef USE_3DNOW_ASM + if ( cpu_has_3dnow ) { + strncat( buffer, "/3DNow!", 7 ); + } +#endif +#ifdef USE_KATMAI_ASM + if ( cpu_has_xmm ) { + strncat( buffer, "/SSE", 4 ); + } +#endif + return (GLubyte *)buffer; + } + + default: + return NULL; + } +} + + +/* Return buffer size information. + */ +static void tdfxDDGetBufferSize( GLcontext *ctx, + GLuint *width, GLuint *height ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + *width = fxMesa->width; + *height = fxMesa->height; +} + + +static GLint tdfxDDGetParameteri( const GLcontext *ctx, GLint param ) +{ + switch ( param ) { + case DD_HAVE_HARDWARE_FOG: + return 1; + default: + return 0; + } +} + +/* + * Return the current value of the occlusion test flag and + * reset the flag (hardware counters) to false. + */ +static GLboolean get_occlusion_result( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GLboolean result; + + LOCK_HARDWARE( fxMesa ); + + if (ctx->Depth.OcclusionTest) { + if (ctx->OcclusionResult) { + result = GL_TRUE; /* result of software rendering */ + } + else { + FxI32 zfail, in; + zfail = FX_grGetInteger_NoLock(GR_STATS_PIXELS_DEPTHFUNC_FAIL); + in = FX_grGetInteger_NoLock(GR_STATS_PIXELS_IN); + if (in == zfail) + result = GL_FALSE; /* geom was completely occluded */ + else + result = GL_TRUE; /* all or part of geom was visible */ + } + } + else { + result = ctx->OcclusionResultSaved; + } + + /* reset results now */ + grReset(GR_STATS_PIXELS); + ctx->OcclusionResult = GL_FALSE; + ctx->OcclusionResultSaved = GL_FALSE; + + UNLOCK_HARDWARE( fxMesa ); + + return result; +} + + +/* + * We're only implementing this function to handle the + * GL_OCCLUSTION_TEST_RESULT_HP case. It's special because it + * has a side-effect: resetting the occlustion result flag. + */ +static GLboolean tdfxDDGetBooleanv( GLcontext *ctx, GLenum pname, + GLboolean *result ) +{ + if ( pname == GL_OCCLUSION_TEST_RESULT_HP ) { + *result = get_occlusion_result( ctx ); + return GL_TRUE; + } + return GL_FALSE; +} + +static GLboolean tdfxDDGetDoublev( GLcontext *ctx, GLenum pname, + GLdouble *result ) +{ + if ( pname == GL_OCCLUSION_TEST_RESULT_HP ) { + *result = (GLdouble) get_occlusion_result( ctx ); + return GL_TRUE; + } + return GL_FALSE; +} + +static GLboolean tdfxDDGetFloatv( GLcontext *ctx, GLenum pname, + GLfloat *result ) +{ + if ( pname == GL_OCCLUSION_TEST_RESULT_HP ) { + *result = (GLfloat) get_occlusion_result( ctx ); + return GL_TRUE; + } + return GL_FALSE; +} + +static GLboolean tdfxDDGetIntegerv( GLcontext *ctx, GLenum pname, + GLint *result ) +{ + if ( pname == GL_OCCLUSION_TEST_RESULT_HP ) { + *result = (GLint) get_occlusion_result( ctx ); + return GL_TRUE; + } + return GL_FALSE; +} + + + +#define VISUAL_EQUALS_RGBA(vis, r, g, b, a) \ + ((vis->RedBits == r) && \ + (vis->GreenBits == g) && \ + (vis->BlueBits == b) && \ + (vis->AlphaBits == a)) + +void tdfxDDInitDriverFuncs( GLcontext *ctx ) +{ + if ( MESA_VERBOSE & VERBOSE_DRIVER ) { + fprintf( stderr, "tdfx: %s()\n", __FUNCTION__ ); + } + + ctx->Driver.GetString = tdfxDDGetString; + ctx->Driver.GetBufferSize = tdfxDDGetBufferSize; + ctx->Driver.Error = NULL; + ctx->Driver.GetParameteri = tdfxDDGetParameteri; + + if ( VISUAL_EQUALS_RGBA(ctx->Visual, 8, 8, 8, 8) ) + { + ctx->Driver.DrawPixels = tdfx_drawpixels_R8G8B8A8; + ctx->Driver.ReadPixels = tdfx_readpixels_R8G8B8A8; + ctx->Driver.CopyPixels = NULL; + ctx->Driver.Bitmap = NULL; + } + else if ( VISUAL_EQUALS_RGBA(ctx->Visual, 5, 6, 5, 0) ) + { + ctx->Driver.DrawPixels = NULL; + ctx->Driver.ReadPixels = tdfx_readpixels_R5G6B5; + ctx->Driver.CopyPixels = NULL; + ctx->Driver.Bitmap = NULL; + } + else + { + ctx->Driver.DrawPixels = NULL; + ctx->Driver.ReadPixels = NULL; + ctx->Driver.CopyPixels = NULL; + ctx->Driver.Bitmap = NULL; + } + + ctx->Driver.RegisterVB = tdfxDDRegisterVB; + ctx->Driver.UnregisterVB = tdfxDDUnregisterVB; + ctx->Driver.ResetVB = NULL; + ctx->Driver.ResetCvaVB = NULL; + + if ( !getenv( "TDFX_NO_FAST" ) ) { + ctx->Driver.BuildPrecalcPipeline = tdfxDDBuildPrecalcPipeline; + } else { + ctx->Driver.BuildPrecalcPipeline = NULL; + } + ctx->Driver.BuildEltPipeline = NULL; + + ctx->Driver.OptimizeImmediatePipeline = NULL; + ctx->Driver.OptimizePrecalcPipeline = NULL; + + ctx->Driver.GetBooleanv = tdfxDDGetBooleanv; + ctx->Driver.GetDoublev = tdfxDDGetDoublev; + ctx->Driver.GetFloatv = tdfxDDGetFloatv; + ctx->Driver.GetIntegerv = tdfxDDGetIntegerv; + ctx->Driver.GetPointerv = NULL; +} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.h:1.1 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.h Wed Mar 21 11:14:27 2001 @@ -0,0 +1,47 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.h,v 1.1 2001/03/21 16:14:27 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * + */ + +#ifndef __TDFX_DD_H__ +#define __TDFX_DD_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "context.h" + +extern void tdfxDDInitDriverFuncs( GLcontext *ctx ); + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_fastpath.c diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_fastpath.c:1.1 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_fastpath.c Wed Mar 21 11:14:28 2001 @@ -0,0 +1,594 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_fastpath.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Keith Whitwell + * + */ + +#include "types.h" +#include "enums.h" +#include "cva.h" +#include "vertices.h" +#include "mmath.h" + +#include "tdfx_context.h" +#include "tdfx_state.h" +#include "tdfx_vb.h" +#include "tdfx_tris.h" +#include "tdfx_pipeline.h" + + +struct tdfx_fast_tab { + void (*build_vertices)( struct vertex_buffer *VB, GLuint do_cliptest ); + void (*interp)( GLfloat t, GLfloat *O, const GLfloat *I, const GLfloat *J ); + void (*project_vertices)( struct vertex_buffer *VB ); + void (*project_clipped_vertices)( struct vertex_buffer *VB ); +}; + + +#define POINT(x) tdfx_draw_point( fxMesa, &vert[x], psize ) +#define LINE(x,y) tdfx_draw_line( fxMesa, &vert[x], &vert[y], lwidth ) +#define TRI(x,y,z) grDrawTriangle( &vert[x], &vert[y], &vert[z] ); + + +#define INDIRECT_TRI(x,y,z) \ +do { \ + out[next_elt + 0] = &vert[x]; \ + out[next_elt + 1] = &vert[y]; \ + out[next_elt + 2] = &vert[z]; \ + next_elt += 3; \ +} while (0) + + + +/* Direct, and no clipping required. The clip funcs have not been + * written yet, so this is only useful for the fast path. + */ +#define RENDER_POINTS( start, count ) \ +do { \ + GLuint e; \ + for ( e = start ; e < count ; e++ ) \ + POINT( elt[e] ); \ +} while (0) + +#define RENDER_LINE( i1, i ) \ +do { \ + GLuint e1 = elt[i1], e = elt[i]; \ + LINE( e1, e ); \ +} while (0) + +#define RENDER_TRI( i2, i1, i, pv, parity ) \ +do { \ + GLuint e2 = elt[i2], e1 = elt[i1], e = elt[i]; \ + if ( parity ) { \ + GLuint tmp = e2; e2 = e1; e1 = tmp; \ + } \ + TRI( e2, e1, e ); \ +} while (0) + +#define RENDER_QUAD( i3, i2, i1, i, pv ) \ +do { \ + GLuint e3 = elt[i3], e2 = elt[i2], e1 = elt[i1], e = elt[i]; \ + TRI( e3, e2, e ); \ + TRI( e2, e1, e ); \ +} while (0) + +#define LOCAL_VARS \ + tdfxVertexPtr vert = TDFX_DRIVER_DATA(VB)->verts; \ + const GLuint *elt = VB->EltPtr->data; \ + GLcontext *ctx = VB->ctx; \ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); \ + const GLfloat lwidth = ctx->Line.Width; \ + const GLfloat psize = ctx->Point.Size; \ + (void) lwidth; (void) psize; (void) vert; (void) fxMesa; + +#define TAG(x) tdfx_##x##_smooth_direct +#include "render_tmp.h" + + + +/* Indirect, and no clipping required. The clip funcs have not been + * written yet, so this is only useful for the fast path. + */ +#define RENDER_POINTS( start, count ) \ +do { \ + GLuint e; \ + for ( e = start ; e < count ; e++ ) \ + POINT( elt[e] ); \ +} while (0) + +#define RENDER_LINE( i1, i ) \ +do { \ + GLuint e1 = elt[i1], e = elt[i]; \ + LINE( e1, e ); \ +} while (0) + +#define RENDER_TRI( i2, i1, i, pv, parity ) \ +do { \ + GLuint e2 = elt[i2], e1 = elt[i1], e = elt[i]; \ + if ( parity ) { \ + GLuint tmp = e2; e2 = e1; e1 = tmp; \ + } \ + INDIRECT_TRI( e2, e1, e ); \ +} while (0) + +#define RENDER_QUAD( i3, i2, i1, i, pv ) \ +do { \ + GLuint e3 = elt[i3], e2 = elt[i2], e1 = elt[i1], e = elt[i]; \ + TRI( e3, e2, e ); \ + TRI( e2, e1, e ); \ +} while (0) + +#define LOCAL_VARS \ + tdfxVertexBufferPtr fxVB = TDFX_DRIVER_DATA(VB); \ + tdfxVertexPtr vert = fxVB->verts; \ + GLuint next_elt = fxVB->last_elt; \ + tdfxVertexPtr *out = fxVB->elts; \ + const GLuint *elt = VB->EltPtr->data; \ + GLcontext *ctx = VB->ctx; \ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); \ + const GLfloat lwidth = ctx->Line.Width; \ + const GLfloat psize = ctx->Point.Size; \ + (void) lwidth; (void) psize; (void) vert; (void) out; (void) fxMesa; + +#define POSTFIX \ + fxVB->last_elt = next_elt; + +#define TAG(x) tdfx_##x##_smooth_indirect +#include "render_tmp.h" + + + +#define NEGATIVE(f) (f < 0) +#define DIFFERENT_SIGNS(a,b) ((a*b) < 0) +#define LINTERP(T, A, B) ((A) + (T) * ((B) - (A))) + +#define INTERP_RGBA( t, out, a, b ) \ +do { \ + int i; \ + for ( i = 0 ; i < 4 ; i++ ) { \ + GLfloat fa = UBYTE_COLOR_TO_FLOAT_COLOR( a[i] ); \ + GLfloat fb = UBYTE_COLOR_TO_FLOAT_COLOR( b[i] ); \ + GLfloat fo = LINTERP( t, fa, fb ); \ + FLOAT_COLOR_TO_UBYTE_COLOR( out[i], fo ); \ + } \ +} while (0) + +#define CLIP( SGN, V, PLANE ) \ +do { \ + if ( mask & PLANE ) { \ + GLuint *indata = inlist[in]; \ + GLuint *outdata = inlist[in ^= 1]; \ + GLuint nr = n; \ + GLfloat *J = verts[indata[nr-1]].f; \ + GLfloat dpJ = (SGN J[V]) + J[3]; \ + \ + inlist[0] = vlist1; \ + for ( i = n = 0 ; i < nr ; i++ ) { \ + GLuint elt_i = indata[i]; \ + GLfloat *I = verts[elt_i].f; \ + GLfloat dpI = (SGN I[V]) + I[3]; \ + \ + if ( DIFFERENT_SIGNS( dpI, dpJ ) ) { \ + GLfloat *O = verts[next_vert].f; \ + GLfloat t, *in, *out; \ + \ + if ( NEGATIVE( dpI ) ) { \ + t = dpI / (dpI - dpJ); \ + in = I; \ + out = J; \ + } else { \ + t = dpJ / (dpJ - dpI); \ + in = J; \ + out = I; \ + } \ + \ + interp( t, O, in, out ); \ + \ + clipmask[next_vert] = 0; \ + outdata[n++] = next_vert++; \ + } \ + \ + clipmask[elt_i] |= PLANE; /* don't set up */ \ + \ + if ( !NEGATIVE( dpI ) ) { \ + outdata[n++] = elt_i; \ + clipmask[elt_i] &= ~PLANE; /* set up after all */ \ + } \ + \ + J = I; \ + dpJ = dpI; \ + } \ + \ + if ( n < 3 ) return; \ + } \ +} while (0) + +#define LINE_CLIP( x, y, z, w, PLANE ) \ +do { \ + if ( mask & PLANE ) { \ + GLfloat dpI = DOT4V( I, x, y, z, w ); \ + GLfloat dpJ = DOT4V( J, x, y, z, w ); \ + \ + if ( DIFFERENT_SIGNS( dpI, dpJ ) ) { \ + GLfloat *O = verts[next_vert].f; \ + GLfloat t = dpI / (dpI - dpJ); \ + \ + interp( t, O, I, J ); \ + \ + clipmask[next_vert] = 0; \ + \ + if ( NEGATIVE( dpI ) ) { \ + clipmask[elts[0]] |= PLANE; \ + I = O; \ + elts[0] = next_vert++; \ + } else { \ + clipmask[elts[1]] |= PLANE; \ + J = O; \ + elts[1] = next_vert++; \ + } \ + } else if ( NEGATIVE( dpI ) ) { \ + return; \ + } \ + } \ +} while (0) + + +static __inline void tdfx_tri_clip( GLuint **p_elts, + tdfxVertex *verts, + GLubyte *clipmask, + GLuint *p_next_vert, + GLubyte mask, + tdfx_interp_func interp ) +{ + GLuint *elts = *p_elts; + GLuint next_vert = *p_next_vert; + GLuint in = 0; + GLuint n = 3; + GLuint vlist1[VB_MAX_CLIPPED_VERTS]; + GLuint vlist2[VB_MAX_CLIPPED_VERTS]; + GLuint *inlist[2]; + GLuint *out; + GLuint i; + + inlist[0] = elts; + inlist[1] = vlist2; + + CLIP( -, 0, CLIP_RIGHT_BIT ); + CLIP( +, 0, CLIP_LEFT_BIT ); + CLIP( -, 1, CLIP_TOP_BIT ); + CLIP( +, 1, CLIP_BOTTOM_BIT ); + CLIP( -, 2, CLIP_FAR_BIT ); + CLIP( +, 2, CLIP_NEAR_BIT ); + + /* Convert the planar polygon to a list of triangles */ + out = inlist[in]; + + for ( i = 2 ; i < n ; i++ ) { + elts[0] = out[0]; + elts[1] = out[i-1]; + elts[2] = out[i]; + elts += 3; + } + + *p_next_vert = next_vert; + *p_elts = elts; +} + + +static __inline void tdfx_line_clip( GLuint **p_elts, + tdfxVertex *verts, + GLubyte *clipmask, + GLuint *p_next_vert, + GLubyte mask, + tdfx_interp_func interp ) +{ + GLuint *elts = *p_elts; + GLfloat *I = verts[elts[0]].f; + GLfloat *J = verts[elts[1]].f; + GLuint next_vert = *p_next_vert; + + LINE_CLIP( 1, 0, 0, -1, CLIP_LEFT_BIT ); + LINE_CLIP( -1, 0, 0, 1, CLIP_RIGHT_BIT ); + LINE_CLIP( 0, 1, 0, -1, CLIP_TOP_BIT ); + LINE_CLIP( 0, -1, 0, 1, CLIP_BOTTOM_BIT ); + LINE_CLIP( 0, 0, 1, -1, CLIP_FAR_BIT ); + LINE_CLIP( 0, 0, -1, 1, CLIP_NEAR_BIT ); + + *p_next_vert = next_vert; + *p_elts += 2; +} + + +#define CLIP_POINT( e ) \ +do { \ + if ( mask[e] ) *out++ = e; \ +} while (0) + +#define CLIP_LINE( e1, e0 ) \ +do { \ + GLubyte ormask = mask[e0] | mask[e1]; \ + out[0] = e1; \ + out[1] = e0; \ + out += 2; \ + if ( ormask ) { \ + out-=2; \ + if ( !(mask[e0] & mask[e1]) ) { \ + tdfx_line_clip( &out, verts, mask, \ + &next_vert, ormask, interp ); \ + } \ + } \ +} while (0) + +#define CLIP_TRIANGLE( e2, e1, e0 ) \ +do { \ + GLubyte ormask; \ + out[0] = e2; \ + out[1] = e1; \ + out[2] = e0; \ + out += 3; \ + ormask = mask[e2] | mask[e1] | mask[e0]; \ + if ( ormask ) { \ + out -= 3; \ + if ( !(mask[e2] & mask[e1] & mask[e0]) ) { \ + tdfx_tri_clip( &out, verts, mask, \ + &next_vert, ormask, interp ); \ + } \ + } \ +} while (0) + + + +/* Build a table of functions to clip each primitive type. These + * produce a list of elements in the appropriate 'reduced' primitive, + * ie (points, lines, triangles) containing all the clipped and + * unclipped primitives from the original list. + */ +#define LOCAL_VARS \ + tdfxContextPtr fxMesa = TDFX_CONTEXT(VB->ctx); \ + tdfxVertexBufferPtr fxVB = TDFX_DRIVER_DATA(VB); \ + GLuint *elt = VB->EltPtr->data; \ + tdfxVertexPtr verts = fxVB->verts; \ + GLuint next_vert = fxVB->last_vert; \ + GLuint *out = fxVB->clipped_elements.data; \ + GLubyte *mask = VB->ClipMask; \ + tdfx_interp_func interp = fxMesa->interp; \ + (void) interp; (void) verts; + +#define POSTFIX \ + fxVB->clipped_elements.count = out - fxVB->clipped_elements.data; \ + fxVB->last_vert = next_vert; + + +#define INIT( x ) + +#define RENDER_POINTS( start, count ) \ +do { \ + GLuint i; \ + for ( i = start ; i < count ; i++ ) \ + CLIP_POINT( elt[i] ); \ +} while (0) + +#define RENDER_LINE( i1, i0 ) \ +do { \ + CLIP_LINE( elt[i1], elt[i0] ); \ +} while (0) + +#define RENDER_TRI( i2, i1, i0, pv, parity ) \ +do { \ + GLuint e2 = elt[i2], e1 = elt[i1], e0 = elt[i0]; \ + if ( parity ) e2 = elt[i1], e1 = elt[i2]; \ + CLIP_TRIANGLE( e2, e1, e0 ); \ +} while (0) + +#define RENDER_QUAD( i3, i2, i1, i0, pv ) \ +do { \ + CLIP_TRIANGLE( elt[i3], elt[i2], elt[i0] ); \ + CLIP_TRIANGLE( elt[i2], elt[i1], elt[i0] ); \ +} while (0) + +#define TAG(x) tdfx_##x##_clip_elt +#include "render_tmp.h" + + + + +/* Pack rgba and/or texture into the remaining half of a 32 byte vertex. + */ +#define CLIP_UBYTE_COLOR 4 +#define CLIP_UBYTE_B 0 +#define CLIP_UBYTE_G 1 +#define CLIP_UBYTE_R 2 +#define CLIP_UBYTE_A 3 +#define CLIP_S0 6 +#define CLIP_T0 7 +#define CLIP_S1 8 +#define CLIP_T1 9 + +#define TYPE (0) +#define TAG(x) x +#include "tdfx_fasttmp.h" + +#define TYPE (TDFX_RGBA_BIT) +#define TAG(x) x##_RGBA +#include "tdfx_fasttmp.h" + +#define TYPE (TDFX_TEX0_BIT) +#define TAG(x) x##_TEX0 +#include "tdfx_fasttmp.h" + +#define TYPE (TDFX_RGBA_BIT | TDFX_TEX0_BIT) +#define TAG(x) x##_RGBA_TEX0 +#include "tdfx_fasttmp.h" + +#define TYPE (TDFX_RGBA_BIT | TDFX_TEX0_BIT | TDFX_TEX1_BIT) +#define TAG(x) x##_RGBA_TEX0_TEX1 +#include "tdfx_fasttmp.h" + +/* This one *could* get away with sneaking TEX1 into the color and + * specular slots, thus fitting inside a cache line. Would be even + * better to switch to a smaller vertex. + */ +#define TYPE (TDFX_TEX0_BIT | TDFX_TEX1_BIT) +#define TAG(x) x##_TEX0_TEX1 +#include "tdfx_fasttmp.h" + + + +/* Render elements directly from original list of vertices. + */ +static void tdfx_render_elements_direct( struct vertex_buffer *VB ) +{ + GLcontext *ctx = VB->ctx; + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GLenum prim = ctx->CVA.elt_mode; + GLuint nr = VB->EltPtr->count; + render_func func = tdfx_render_tab_smooth_direct[prim]; + GLuint p = 0; + + if ( fxMesa->new_state ) + tdfxDDUpdateHwState( ctx ); + + BEGIN_CLIP_LOOP( fxMesa ); + do { + func( VB, 0, nr, 0 ); + } while ( ctx->Driver.MultipassFunc && + ctx->Driver.MultipassFunc( VB, ++p ) ); + END_CLIP_LOOP( fxMesa ); +} + +/* Render elements indirectly from original list of vertices. + */ +#if 0 +static void tdfx_render_elements_indirect( struct vertex_buffer *VB ) +{ + GLcontext *ctx = VB->ctx; + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + tdfxVertexBufferPtr fxVB = TDFX_DRIVER_DATA(VB); + GLenum prim = ctx->CVA.elt_mode; + GLuint nr = VB->EltPtr->count; + render_func func = tdfx_render_tab_smooth_indirect[prim]; + GLuint p = 0; + + if ( fxMesa->new_state ) + tdfxDDUpdateHwState( ctx ); + + do { + func( VB, 0, nr, 0 ); + } while ( ctx->Driver.MultipassFunc && + ctx->Driver.MultipassFunc( VB, ++p ) ); + + BEGIN_CLIP_LOOP( fxMesa ); + grDrawVertexArray( GR_TRIANGLES, fxVB->last_elt, fxVB->elts ); + END_CLIP_LOOP( fxMesa ); + + fxVB->last_elt = 0; +} +#endif + +/* Very sparsely popluated array - fix the indices. + */ +static struct tdfx_fast_tab fxFastTab[0x80]; + +void tdfxDDFastPathInit( void ) +{ + tdfx_render_init_clip_elt(); + tdfx_render_init_smooth_direct(); + tdfx_render_init_smooth_indirect(); + + tdfx_init_fastpath( &fxFastTab[0] ); + tdfx_init_fastpath_RGBA( &fxFastTab[TDFX_RGBA_BIT] ); + tdfx_init_fastpath_TEX0( &fxFastTab[TDFX_TEX0_BIT] ); + tdfx_init_fastpath_RGBA_TEX0( &fxFastTab[TDFX_RGBA_BIT|TDFX_TEX0_BIT] ); + tdfx_init_fastpath_TEX0_TEX1( &fxFastTab[TDFX_TEX0_BIT|TDFX_TEX1_BIT] ); + tdfx_init_fastpath_RGBA_TEX0_TEX1( &fxFastTab[TDFX_RGBA_BIT|TDFX_TEX0_BIT| + TDFX_TEX1_BIT] ); +} + + +#define VALID_SETUP (TDFX_RGBA_BIT | TDFX_TEX0_BIT | TDFX_TEX1_BIT) + + +void tdfxDDFastPath( struct vertex_buffer *VB ) +{ + GLcontext *ctx = VB->ctx; + GLenum prim = ctx->CVA.elt_mode; + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + tdfxVertexBufferPtr fxVB = TDFX_DRIVER_DATA(VB); + struct tdfx_fast_tab *tab = &fxFastTab[fxMesa->SetupIndex & VALID_SETUP]; + + if ( fxMesa->new_state ) { + tdfxDDUpdateHwState( ctx ); + } + else if ( fxMesa->dirty & TDFX_UPLOAD_VERTEX_LAYOUT ) { + /* After extensive debugging I discovered that the vertex layout + * may need to be updated at this point. Not sure how this works + * in the other drivers. -BP + */ + LOCK_HARDWARE( fxMesa ); + grGlideSetVertexLayout( fxMesa->layout[fxMesa->vertexFormat] ); + fxMesa->dirty &= ~TDFX_UPLOAD_VERTEX_LAYOUT; + UNLOCK_HARDWARE( fxMesa ); + } + + gl_prepare_arrays_cva( VB ); /* still need this */ + + /* Reserve enough space for the pathological case */ + if ( VB->EltPtr->count * 12 > fxVB->size ) + tdfxDDResizeVB( VB, VB->EltPtr->count * 12 ); + + tab->build_vertices( VB, 1 ); /* object->clip space */ + + if ( VB->ClipOrMask ) { + if ( !VB->ClipAndMask ) { + render_func *clip = tdfx_render_tab_clip_elt; + + fxMesa->interp = tab->interp; + + clip[prim]( VB, 0, VB->EltPtr->count, 0 ); /* build new elts */ + + ctx->CVA.elt_mode = gl_reduce_prim[prim]; + VB->EltPtr = &(fxVB->clipped_elements); + + tab->project_clipped_vertices( VB ); /* clip->device space */ + tdfx_render_elements_direct( VB ); /* render using new list */ + } + } else { + tab->project_vertices( VB ); /* clip->device space */ + tdfx_render_elements_direct( VB ); /* render using orig list */ + } + + /* This indicates that there is no cached data to reuse */ + VB->pipeline->data_valid = 0; + VB->pipeline->new_state = 0; +} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_fasttmp.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_fasttmp.h:1.1 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_fasttmp.h Wed Mar 21 11:14:28 2001 @@ -0,0 +1,293 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_fasttmp.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Keith Whitwell + * + */ + +/* The first part of setup is applied to all vertices, clipped or + * unclipped. This data will be used for clipping, and then all + * vertices with a zero clipmask will be projected to device space. + * + * This could be split into several loops, but - it seems that the + * large stride of the fxVertices makes cache issues the big + * performance factor, and that multiple loops mean multiple cache + * misses.... + */ + +static void TAG(tdfx_setup_full)( struct vertex_buffer *VB, + GLuint do_cliptest ) +{ + tdfxVertexBufferPtr fxVB = TDFX_DRIVER_DATA(VB); + GLcontext *ctx = VB->ctx; + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + const GLfloat * const m = ctx->ModelProjectMatrix.m; + GLuint start = VB->CopyStart; + GLuint count = VB->Count; + + if (0) fprintf(stderr, "%s\n", __FUNCTION__); + + gl_xform_points3_v16_general( TDFX_DRIVER_DATA(VB)->verts[start].f, + m, + VB->ObjPtr->start, + VB->ObjPtr->stride, + count - start ); + + if ( do_cliptest ) { + VB->ClipAndMask = ~0; + VB->ClipOrMask = 0; + gl_cliptest_points4_v16( fxVB->verts[start].f, + fxVB->verts[count].f, + &(VB->ClipOrMask), + &(VB->ClipAndMask), + VB->ClipMask + start ); + } + + /* These branches are all resolved at compile time. Hopefully all + * the pointers are valid addresses even when not enabled. + */ + if ( TYPE ) { + GLubyte *color = VB->ColorPtr->start; + GLfloat *tex0_data = VB->TexCoordPtr[fxMesa->tmu_source[0]]->start; + GLfloat *tex1_data = VB->TexCoordPtr[fxMesa->tmu_source[1]]->start; + + const GLuint color_stride = VB->ColorPtr->stride; + const GLuint tex0_stride = VB->TexCoordPtr[fxMesa->tmu_source[0]]->stride; + const GLuint tex1_stride = VB->TexCoordPtr[fxMesa->tmu_source[1]]->stride; + + GLfloat *f = fxVB->verts[start].f; + GLfloat *end = f + (16 * (count - start)); + + while ( f != end ) { + if ( TYPE & TDFX_RGBA_BIT ) { +#if defined(USE_X86_ASM) + __asm__ ( + "movl (%%edx),%%eax \n" + "bswap %%eax \n" + "rorl $8,%%eax \n" + "movl %%eax,16(%%edi) \n" + : + : "d" (color), "D" (f) + : "%eax" ); +#else + GLubyte *col = color; + GLubyte *b = (GLubyte *)&f[CLIP_UBYTE_COLOR]; + b[CLIP_UBYTE_B] = col[2]; + b[CLIP_UBYTE_G] = col[1]; + b[CLIP_UBYTE_R] = col[0]; + b[CLIP_UBYTE_A] = col[3]; +#endif + } + if (TYPE & TDFX_TEX0_BIT) { +#if defined (USE_X86_ASM) + __asm__ ( + "movl (%%ecx), %%eax \n" + "movl %%eax, 24(%%edi) \n" + "movl 4(%%ecx), %%eax \n" + "movl %%eax, 28(%%edi)" + : + : "c" (tex0_data), "D" (f) + : "%eax"); +#else + *(unsigned int *)(f+CLIP_S0) = *(unsigned int *)tex0_data; + *(unsigned int *)(f+CLIP_T0) = *(unsigned int *)(tex0_data+1); +#endif + } + if (TYPE & TDFX_TEX1_BIT) { + /* Hits a second cache line. + */ +#if defined (USE_X86_ASM) + __asm__ ( + "movl (%%esi), %%eax \n" + "movl %%eax, 32(%%edi) \n" + "movl 4(%%esi), %%eax \n" + "movl %%eax, 36(%%edi)" + : + : "S" (tex1_data), "D" (f) + : "%eax"); +#else + *(unsigned int *)(f+CLIP_S1) = *(unsigned int *)tex1_data; + *(unsigned int *)(f+CLIP_T1) = *(unsigned int *)(tex1_data+1); +#endif + } + if ( TYPE & TDFX_RGBA_BIT ) color += color_stride; + if ( TYPE & TDFX_TEX0_BIT ) STRIDE_F( tex0_data, tex0_stride ); + if ( TYPE & TDFX_TEX1_BIT ) STRIDE_F( tex1_data, tex1_stride ); + f += 16; + } + } + + fxVB->clipped_elements.count = start; + fxVB->last_vert = count; +} + + +/* Changed to just put the interp func instead of the whole clip + * routine into the header. Less code and better chance of doing some + * of this stuff in assembly. + */ +static void TAG(tdfx_interp_vert)( GLfloat t, + GLfloat *O, + const GLfloat *I, + const GLfloat *J ) +{ + O[0] = LINTERP( t, I[0], J[0] ); + O[1] = LINTERP( t, I[1], J[1] ); + O[2] = LINTERP( t, I[2], J[2] ); + O[3] = LINTERP( t, I[3], J[3] ); + + if ( TYPE & TDFX_RGBA_BIT ) { + INTERP_RGBA( t, + ((GLubyte *)&(O[4])), + ((GLubyte *)&(I[4])), + ((GLubyte *)&(J[4])) ); + } + + if ( TYPE & TDFX_TEX0_BIT ) { + O[6] = LINTERP( t, I[6], J[6] ); + O[7] = LINTERP( t, I[7], J[7] ); + } + + if ( TYPE & TDFX_TEX1_BIT ) { + O[8] = LINTERP( t, I[8], J[8] ); + O[9] = LINTERP( t, I[9], J[9] ); + } +} + + + +static void TAG(tdfx_project_vertices)( struct vertex_buffer *VB ) +{ + GLcontext *ctx = VB->ctx; + GLmatrix *mat = &ctx->Viewport.WindowMap; + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + tdfxVertexBufferPtr fxVB = TDFX_DRIVER_DATA(VB); + GLfloat *first = fxVB->verts[VB->CopyStart].f; + GLfloat *last = fxVB->verts[fxVB->last_vert].f; + GLfloat m[16]; + GLfloat *f; + + m[MAT_SX] = mat->m[MAT_SX]; + m[MAT_TX] = mat->m[MAT_TX] + fxMesa->x_offset + TRI_X_OFFSET; + m[MAT_SY] = mat->m[MAT_SY]; + m[MAT_TY] = mat->m[MAT_TY] + fxMesa->y_delta + TRI_Y_OFFSET; + m[MAT_SZ] = mat->m[MAT_SZ]; + m[MAT_TZ] = mat->m[MAT_TZ]; + + gl_project_v16( first, last, m, 16 * 4 ); + + /* V3 at least requires texcoords to be multiplied by 1/w: + */ + if ( TYPE & (TDFX_TEX0_BIT|TDFX_TEX1_BIT) ) { + + const GLfloat sScale0 = fxMesa->sScale0; + const GLfloat tScale0 = fxMesa->tScale0; + const GLfloat sScale1 = fxMesa->sScale1; + const GLfloat tScale1 = fxMesa->tScale1; + + + for ( f = first ; f != last ; f += 16) { + const GLfloat oow = f[3]; + + if (TYPE & TDFX_TEX0_BIT) { + f[CLIP_S0] *= sScale0 * oow; + f[CLIP_T0] *= tScale0 * oow; + } + + if (TYPE & TDFX_TEX1_BIT) { + f[CLIP_S1] *= sScale1 * oow; + f[CLIP_T1] *= tScale1 * oow; + } + } + } +} + +static void TAG(tdfx_project_clipped_vertices)( struct vertex_buffer *VB ) +{ + GLfloat *f; + + GLcontext *ctx = VB->ctx; + GLmatrix *mat = &ctx->Viewport.WindowMap; + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + tdfxVertexBufferPtr fxVB = TDFX_DRIVER_DATA(VB); + GLfloat *first = fxVB->verts[VB->CopyStart].f; + GLfloat *last = fxVB->verts[fxVB->last_vert].f; + const GLubyte *mask = VB->ClipMask + VB->CopyStart; + GLfloat m[16]; + + m[MAT_SX] = mat->m[MAT_SX]; + m[MAT_TX] = mat->m[MAT_TX] + fxMesa->x_offset + TRI_X_OFFSET; + m[MAT_SY] = mat->m[MAT_SY]; + m[MAT_TY] = mat->m[MAT_TY] + fxMesa->y_delta + TRI_Y_OFFSET; + m[MAT_SZ] = mat->m[MAT_SZ]; + m[MAT_TZ] = mat->m[MAT_TZ]; + + gl_project_clipped_v16( first, last, m, 16 * 4, mask ); + + /* V3 at least requires texcoords to be multiplied by 1/w: + */ + if ( TYPE & (TDFX_TEX0_BIT|TDFX_TEX1_BIT) ) { + + const GLfloat sScale0 = fxMesa->sScale0; + const GLfloat tScale0 = fxMesa->tScale0; + const GLfloat sScale1 = fxMesa->sScale1; + const GLfloat tScale1 = fxMesa->tScale1; + + for ( f = first ; f != last ; f += 16, mask++) { + if (!*mask) { + const GLfloat oow = f[3]; + if (TYPE & TDFX_TEX0_BIT) { + f[CLIP_S0] *= sScale0 * oow; + f[CLIP_T0] *= tScale0 * oow; + } + + if (TYPE & TDFX_TEX1_BIT) { + f[CLIP_S1] *= sScale1 * oow; + f[CLIP_T1] *= tScale1 * oow; + } + } + } + } +} + +static void TAG(tdfx_init_fastpath)( struct tdfx_fast_tab *tab ) +{ + tab->build_vertices = TAG(tdfx_setup_full); + tab->interp = TAG(tdfx_interp_vert); + tab->project_vertices = TAG(tdfx_project_vertices); + tab->project_clipped_vertices = TAG(tdfx_project_clipped_vertices); +} + +#undef TYPE +#undef TAG +#undef SIZE Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.c diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.c:1.1 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.c Wed Mar 21 11:14:28 2001 @@ -0,0 +1,122 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * + */ + +#include +#include +#include + +#include "tdfx_context.h" +#include "tdfx_g3ext.h" + + +/* STENCIL extension + */ +GrProc grStencilFuncProc = NULL; +GrProc grStencilMaskProc = NULL; +GrProc grStencilOpProc = NULL; +GrProc grBufferClearExtProc = NULL; +GrProc grColorMaskExtProc = NULL; + +/* COMBINE extension + */ +GrProc grColorCombineExtProc = NULL; +GrProc grTexColorCombineExtProc = NULL; +GrProc grAlphaCombineExtProc = NULL; +GrProc grTexAlphaCombineExtProc = NULL; +GrProc grAlphaBlendFunctionExtProc = NULL; +GrProc grConstantColorValueExtProc = NULL; + +/* Texus 2 + */ +GrProc txImgQuantizeProc = NULL; +GrProc txImgDequantizeFXT1Proc = NULL; +GrProc txErrorSetCallbackProc = NULL; + + +/* Initialize the Glide extensions not exported in the Glide headers. + * This is just plain evil stuff... + */ +void tdfxDDGlideExtensionsInit( void ) +{ + void *handle; + + /* Get Glide3 extension function pointers */ + handle = dlopen( NULL, RTLD_NOW | RTLD_GLOBAL ); + + if ( handle ) { + /* PIXEXT extension */ + grStencilFuncProc = dlsym( handle, "grStencilFunc" ); + grStencilMaskProc = dlsym( handle, "grStencilMask" ); + grStencilOpProc = dlsym( handle, "grStencilOp" ); + grBufferClearExtProc = dlsym( handle, "grBufferClearExt" ); + grColorMaskExtProc = dlsym( handle, "grColorMaskExt" ); + + /* COMBINE extension */ + grColorCombineExtProc = dlsym( handle, "grColorCombineExt" ); + grTexColorCombineExtProc = dlsym( handle, "grTexColorCombineExt" ); + grAlphaCombineExtProc = dlsym( handle, "grAlphaCombineExt" ); + grTexAlphaCombineExtProc = dlsym( handle, "grTexAlphaCombineExt" ); + grAlphaBlendFunctionExtProc = dlsym( handle, "grAlphaBlendFunctionExt" ); + grConstantColorValueExtProc = dlsym( handle, "grConstantColorValueExt" ); + + /* Texus 2 */ + txImgQuantizeProc = dlsym( handle, "txImgQuantize" ); + txImgDequantizeFXT1Proc = dlsym( handle, "_txImgDequantizeFXT1" ); + txErrorSetCallbackProc = dlsym( handle, "txErrorSetCallback" ); + } else { + /* PIXEXT extension */ + grStencilFuncProc = NULL; + grStencilMaskProc = NULL; + grStencilOpProc = NULL; + grBufferClearExtProc = NULL; + grColorMaskExtProc = NULL; + + /* COMBINE extension */ + grColorCombineExtProc = NULL; + grTexColorCombineExtProc = NULL; + grAlphaCombineExtProc = NULL; + grTexAlphaCombineExtProc = NULL; + grAlphaBlendFunctionExtProc = NULL; + grConstantColorValueExtProc = NULL; + + /* Texus 2 */ + txImgQuantizeProc = NULL; + txImgDequantizeFXT1Proc = NULL; + txErrorSetCallbackProc = NULL; + } + + dlclose( handle ); +} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.h:1.1 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.h Wed Mar 21 11:14:28 2001 @@ -0,0 +1,145 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * + */ + +#ifndef __TDFX_G3EXT_H__ +#define __TDFX_G3EXT_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include +#include + +/* + * These are glide extension definitions. These are not + * defined in glide.h. They should really be defined in + * g3ext.h, but they are not. + */ +typedef void (*grStencilFunc_t)( GrCmpFnc_t fnc, GrStencil_t ref, + GrStencil_t mask ); +typedef void (*grStencilMask_t)( GrStencil_t write_mask ); +typedef void (*grStencilOp_t)( GrStencilOp_t stencil_fail, + GrStencilOp_t depth_fail, + GrStencilOp_t depth_pass ); +typedef void (*grBufferClearExt_t)( GrColor_t color, GrAlpha_t alpha, + FxU32 depth, GrStencil_t stencil ); +typedef void (*grColorMaskExt_t)( FxBool r, FxBool g, FxBool b, FxBool a ); + +/* + * "COMBINE" extension for Napalm + */ +typedef void (*grColorCombineExt_t)( GrCCUColor_t a, GrCombineMode_t a_mode, + GrCCUColor_t b, GrCombineMode_t b_mode, + GrCCUColor_t c, FxBool c_invert, + GrCCUColor_t d, FxBool d_invert, + FxU32 shift, FxBool invert ); +typedef void (*grTexColorCombineExt_t)( FxU32 tmu, + GrTCCUColor_t a, + GrCombineMode_t a_mode, + GrTCCUColor_t b, + GrCombineMode_t b_mode, + GrTCCUColor_t c, FxBool c_invert, + GrTCCUColor_t d, FxBool d_invert, + FxU32 shift, FxBool invert ); +typedef void (*grAlphaCombineExt_t)( GrACUColor_t a, GrCombineMode_t a_mode, + GrACUColor_t b, GrCombineMode_t b_mode, + GrACUColor_t c, FxBool c_invert, + GrACUColor_t d, FxBool d_invert, + FxU32 shift, FxBool invert ); +typedef void (*grTexAlphaCombineExt_t)( FxU32 tmu, + GrTACUColor_t a, + GrCombineMode_t a_mode, + GrTACUColor_t b, + GrCombineMode_t b_mode, + GrTACUColor_t c, FxBool c_invert, + GrTACUColor_t d, FxBool d_invert, + FxU32 shift, FxBool invert ); +typedef void (*grAlphaBlendFunctionExt_t)( GrAlphaBlendFnc_t rgb_sf, + GrAlphaBlendFnc_t rgb_df, + GrAlphaBlendOp_t rgb_op, + GrAlphaBlendFnc_t alpha_sf, + GrAlphaBlendFnc_t alpha_df, + GrAlphaBlendOp_t alpha_op); +typedef void (*grConstantColorValueExt_t)( FxU32 tmu, GrColor_t value ); + + + +/* + * These are functions to compress and decompress images. + * The types of the first and second parameters are not exactly + * right. The texus library declares them to be "char *", not + * "void *". However, "void *" is more correct, and more convenient. + */ +typedef void (*txImgQuantize_t)( void *dst, void *src, + int w, int h, + FxU32 format, FxU32 dither ); +typedef void (*txImgDeQuantize_t)( void *dst, void *src, int w, int h ); + +/* + * These next three declarations should probably be taken from + * texus.h. However, there are duplicate declarations in g3ext.h + * and texus.h which make it hard to include them both. + */ +typedef void (*TxErrorCallbackFnc_t)( const char *string, FxBool fatal ); +typedef void (*txErrorSetCallback_t)( TxErrorCallbackFnc_t fnc, + TxErrorCallbackFnc_t *old_fnc ); + +/* PIXEXT extension + */ +GrProc grStencilFuncProc; +GrProc grStencilMaskProc; +GrProc grStencilOpProc; +GrProc grBufferClearExtProc; +GrProc grColorMaskExtProc; + +/* COMBINE extension + */ +GrProc grColorCombineExtProc; +GrProc grTexColorCombineExtProc; +GrProc grAlphaCombineExtProc; +GrProc grTexAlphaCombineExtProc; +GrProc grAlphaBlendFunctionExtProc; +GrProc grConstantColorValueExtProc; + +/* Texus extensions??? + */ +GrProc txImgQuantizeProc; +GrProc txImgDequantizeFXT1Proc; +GrProc txErrorSetCallbackProc; + +extern void tdfxDDGlideExtensionsInit( void ); + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.c:1.5 xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.c:1.5 Tue Sep 26 11:56:50 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.c Mon Jun 4 12:37:40 2001 @@ -1,96 +0,0 @@ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.c,v 1.5 2000/09/26 15:56:50 tsi Exp $ */ - -/* - * Authors: - * Daryll Strauss - * - */ - -#ifdef GLX_DIRECT_RENDERING - -#include -#include "xf86dri.h" -#include "tdfx_dri.h" -#include "fxdrv.h" - - -#ifdef DEBUG_LOCKING -char *prevLockFile = 0; -int prevLockLine = 0; -#endif - -static void -performMagic(__DRIscreenPrivate * driScrnPriv) -{ - tdfxScreenPrivate *gPriv = (tdfxScreenPrivate *) driScrnPriv->private; - TDFXDRIPtr gDRIPriv = (TDFXDRIPtr) driScrnPriv->pDevPriv; - - gPriv->regs.handle = gDRIPriv->regs; - gPriv->regs.size = gDRIPriv->regsSize; - gPriv->deviceID = gDRIPriv->deviceID; - gPriv->width = gDRIPriv->width; - gPriv->height = gDRIPriv->height; - gPriv->mem = gDRIPriv->mem; - gPriv->cpp = gDRIPriv->cpp; - gPriv->stride = gDRIPriv->stride; - gPriv->fifoOffset = gDRIPriv->fifoOffset; - gPriv->fifoSize = gDRIPriv->fifoSize; - gPriv->fbOffset = gDRIPriv->fbOffset; - gPriv->backOffset = gDRIPriv->backOffset; - gPriv->depthOffset = gDRIPriv->depthOffset; - gPriv->textureOffset = gDRIPriv->textureOffset; - gPriv->textureSize = gDRIPriv->textureSize; -} - -GLboolean -tdfxMapAllRegions(__DRIscreenPrivate * driScrnPriv) -{ - tdfxScreenPrivate *gPriv = (tdfxScreenPrivate *) driScrnPriv->private; - - /* First, pick apart pDevPriv & friends */ - performMagic(driScrnPriv); - - if (drmMap(driScrnPriv->fd, gPriv->regs.handle, gPriv->regs.size, - &gPriv->regs.map)) { - return GL_FALSE; - } - - return GL_TRUE; -} - -void -tdfxUnmapAllRegions(__DRIscreenPrivate * driScrnPriv) -{ - tdfxScreenPrivate *gPriv = (tdfxScreenPrivate *) driScrnPriv->private; - - drmUnmap(gPriv->regs.map, gPriv->regs.size); -} - - -#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_inithw.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_inithw.c:1.7 xc/lib/GL/mesa/src/drv/tdfx/tdfx_inithw.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_inithw.c:1.7 Fri Dec 8 14:36:23 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_inithw.c Mon Jun 4 12:37:40 2001 @@ -1,92 +0,0 @@ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_inithw.c,v 1.7 2000/12/08 19:36:23 alanh Exp $ */ - -/* - * Authors: - * Daryll Strauss - * - */ - -#ifdef GLX_DIRECT_RENDERING - -#include -#include "fxdrv.h" - - -GLboolean -tdfxInitHW(__DRIdrawablePrivate * driDrawPriv, fxMesaContext fxMesa) -{ - /* KW: Would be nice to make one of these a member of the other. - */ - __DRIscreenPrivate *driScrnPriv = driDrawPriv->driScreenPriv; - tdfxScreenPrivate *sPriv = (tdfxScreenPrivate *) driScrnPriv->private; - -#ifdef DEBUG_LOCKING - fprintf(stderr, "Debug locking enabled\n"); -#endif - - if (fxMesa->initDone) - return GL_TRUE; - - fxMesa->width = driDrawPriv->w; - fxMesa->height = driDrawPriv->h; - - /* We have to use a light lock here, because we can't do any glide - operations yet. No use of FX_* functions in this function. */ - DRM_LIGHT_LOCK(driScrnPriv->fd, &driScrnPriv->pSAREA->lock, - driDrawPriv->driContextPriv->hHWContext); - FX_grGlideInit_NoLock(); - - fxMesa->board = 0; - FX_grSstSelect_NoLock(fxMesa->board); - - if (sPriv->deviceID == 0x3) - fxMesa->haveTwoTMUs = GL_FALSE; - else - fxMesa->haveTwoTMUs = GL_TRUE; - - fxMesa->glideContext = - FX_grSstWinOpen_NoLock((FxU32) - 1, GR_RESOLUTION_NONE, - GR_REFRESH_NONE, GR_COLORFORMAT_ABGR, - GR_ORIGIN_LOWER_LEFT, 2, 1); - - grDRIResetSAREA(); - DRM_UNLOCK(driScrnPriv->fd, &driScrnPriv->pSAREA->lock, - driDrawPriv->driContextPriv->hHWContext); - - fxMesa->needClip = 1; - - if (!fxMesa->glideContext || !fxDDInitFxMesaContext(fxMesa)) - return GL_FALSE; - - fxMesa->initDone = GL_TRUE; - - return GL_TRUE; -} - -#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.c diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.c:1.1 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.c Wed Mar 21 11:14:28 2001 @@ -0,0 +1,96 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * + */ + +#include "dri_glide.h" + +#include "tdfx_context.h" +#include "tdfx_lock.h" +#include "tdfx_state.h" +#include "tdfx_texman.h" +#include "tdfx_tris.h" + + +void tdfxGetLock( tdfxContextPtr fxMesa ) +{ + __DRIcontextPrivate *cPriv = fxMesa->driContext; + __DRIdrawablePrivate *dPriv = cPriv->driDrawablePriv; + __DRIscreenPrivate *sPriv = dPriv->driScreenPriv; + TDFXSAREAPriv *saPriv = (TDFXSAREAPriv *) (((char *) sPriv->pSAREA) + + fxMesa->fxScreen->sarea_priv_offset); + int stamp = dPriv->lastStamp; + int one_rect = (fxMesa->numClipRects <= 1); + + drmGetLock( fxMesa->driFd, fxMesa->hHWContext, 0 ); + + /* This macro will update dPriv's cliprects if needed */ + XMESA_VALIDATE_DRAWABLE_INFO( cPriv->display, sPriv, dPriv ); + + if ( saPriv->fifoOwner != fxMesa->hHWContext ) { + grDRIImportFifo( saPriv->fifoPtr, saPriv->fifoRead ); + } + + if ( saPriv->ctxOwner != fxMesa->hHWContext ) { + /* This sequence looks a little odd. Glide mirrors the state, and + * when you get the state you are forcing the mirror to be up to + * date, and then getting a copy from the mirror. You can then force + * that state onto the hardware when you set the state. + */ + void *state; + state = malloc( FX_grGetInteger_NoLock( FX_GLIDE_STATE_SIZE ) ); + FX_grGlideGetState_NoLock( state ); + FX_grGlideSetState_NoLock( state ); + free( state ); + } + +#if 0 + if ( saPriv->texOwner != fxMesa->hHWContext ) { + tdfxTMRestoreTextures_NoLock( fxMesa ); + } +#endif + + if ( *dPriv->pStamp != stamp || saPriv->ctxOwner != fxMesa->hHWContext ) { + tdfxUpdateClipping(fxMesa->glCtx); + tdfxUploadClipping(fxMesa); + } + + /* Detect if we have swapped between 1 and >1 cliprects, and change + * triangle funcs if necessary. + */ + if (one_rect != (fxMesa->numClipRects <= 1)) + tdfxDDToggleTriCliprects( fxMesa->glCtx ); + + DEBUG_LOCK(); +} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.h:1.1 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.h Wed Mar 21 11:14:28 2001 @@ -0,0 +1,149 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * + */ + +#ifndef __TDFX_LOCK_H__ +#define __TDFX_LOCK_H__ + +#ifdef GLX_DIRECT_RENDERING + +/* You can turn this on to find locking conflicts. + */ +#define DEBUG_LOCKING 0 + +#if DEBUG_LOCKING +extern char *prevLockFile; +extern int prevLockLine; + +#define DEBUG_LOCK() \ + do { \ + prevLockFile = (__FILE__); \ + prevLockLine = (__LINE__); \ + } while (0) + +#define DEBUG_RESET() \ + do { \ + prevLockFile = 0; \ + prevLockLine = 0; \ + } while (0) + +#define DEBUG_CHECK_LOCK() \ + do { \ + if ( prevLockFile ) { \ + fprintf( stderr, \ + "LOCK SET!\n\tPrevious %s:%d\n\tCurrent: %s:%d\n", \ + prevLockFile, prevLockLine, __FILE__, __LINE__ ); \ + exit( 1 ); \ + } \ + } while (0) + +#else + +#define DEBUG_LOCK() +#define DEBUG_RESET() +#define DEBUG_CHECK_LOCK() + +#endif /* DEBUG_LOCKING */ + + +extern void tdfxGetLock( tdfxContextPtr fxMesa ); + + +/* !!! We may want to separate locks from locks with validation. + This could be used to improve performance for those things + commands that do not do any drawing !!! */ + +#define DRM_LIGHT_LOCK_RETURN(fd,lock,context,__ret) \ + do { \ + DRM_CAS(lock,context,DRM_LOCK_HELD|context,__ret); \ + if (__ret) drmGetLock(fd,context,0); \ + } while(0) + +#define LOCK_HARDWARE( fxMesa ) \ + do { \ + char __ret = 0; \ + \ + DEBUG_CHECK_LOCK(); \ + DRM_CAS( fxMesa->driHwLock, fxMesa->hHWContext, \ + DRM_LOCK_HELD | fxMesa->hHWContext, __ret ); \ + if ( __ret ) { \ + tdfxGetLock( fxMesa ); \ + } \ + DEBUG_LOCK(); \ + } while (0) + +/* Unlock the hardware using the global current context */ +#define UNLOCK_HARDWARE( fxMesa ) \ + do { \ + DRM_UNLOCK( fxMesa->driFd, fxMesa->driHwLock, fxMesa->hHWContext ); \ + DEBUG_RESET(); \ + } while (0) + +/* + * This pair of macros makes a loop over the drawing operations + * so it is not self contained and doesn't have the nice single + * statement semantics of most macros. + */ +#define BEGIN_CLIP_LOOP(fxMesa) \ + do { \ + LOCK_HARDWARE( fxMesa ); \ + BEGIN_CLIP_LOOP_LOCKED( fxMesa ) + +#define BEGIN_CLIP_LOOP_LOCKED(fxMesa) \ + do { \ + int _nc = fxMesa->numClipRects; \ + while (_nc--) { \ + if (fxMesa->numClipRects > 1) { \ + int _height = fxMesa->screen_height; \ + grClipWindow(fxMesa->pClipRects[_nc].x1, \ + _height - fxMesa->pClipRects[_nc].y2, \ + fxMesa->pClipRects[_nc].x2, \ + _height - fxMesa->pClipRects[_nc].y1); \ + } + + +#define END_CLIP_LOOP_LOCKED( fxMesa ) \ + } \ + } while (0) + +#define END_CLIP_LOOP( fxMesa ) \ + END_CLIP_LOOP_LOCKED( fxMesa ); \ + UNLOCK_HARDWARE( fxMesa ); \ + } while (0) + + +#endif /* GLX_DIRECT_RENDERING */ + +#endif /* __TDFX_LOCK_H__ */ Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_pipeline.c diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_pipeline.c:1.1 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_pipeline.c Wed Mar 21 11:14:28 2001 @@ -0,0 +1,177 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_pipeline.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Keith Whitwell + * + */ + +#include "tdfx_context.h" +#include "tdfx_pipeline.h" +#include "tdfx_vb.h" +#include "tdfx_tris.h" + +#include "vbindirect.h" + +static struct gl_pipeline_stage tdfx_fast_stage = { + "TDFX Fast Path", + (PIPE_OP_VERT_XFORM | + PIPE_OP_RAST_SETUP_0 | + PIPE_OP_RAST_SETUP_1 | + PIPE_OP_RENDER), + PIPE_PRECALC, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + tdfxDDFastPath +}; + +#define ILLEGAL_ENABLES (TEXTURE0_3D | \ + TEXTURE1_3D | \ + ENABLE_TEXMAT0 | \ + ENABLE_TEXMAT1 | \ + ENABLE_TEXGEN0 | \ + ENABLE_TEXGEN1 | \ + ENABLE_USERCLIP | \ + ENABLE_LIGHT | \ + ENABLE_FOG) + +/* Build the PRECALC pipeline with our stage, if possible. Otherwise, + * return GL_FALSE. + */ +GLboolean tdfxDDBuildPrecalcPipeline( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + struct gl_pipeline *pipe = &ctx->CVA.pre; + + if ( (fxMesa->RenderIndex & ~TDFX_CLIPRECT_BIT) == 0 && + (ctx->Enabled & ILLEGAL_ENABLES) == 0 && +#ifdef VAO + (ctx->Array.Current->Flags & (VERT_OBJ_234 | +#else + (ctx->Array.Flags & (VERT_OBJ_234 | +#endif + VERT_TEX0_4 | + VERT_TEX1_4 | + VERT_ELT)) == (VERT_OBJ_23 | VERT_ELT) ) + { + pipe->stages[0] = &tdfx_fast_stage; + pipe->stages[1] = 0; + pipe->new_inputs = ctx->RenderFlags & VERT_DATA; + pipe->ops = pipe->stages[0]->ops; + + fxMesa->using_fast_path = GL_TRUE; + return GL_TRUE; + } + + if ( fxMesa->using_fast_path ) { + fxMesa->using_fast_path = GL_FALSE; + + ctx->CVA.VB->ClipOrMask = 0; + ctx->CVA.VB->ClipAndMask = CLIP_ALL_BITS; +#ifdef VAO + ctx->Array.NewArrayState |= ctx->Array.Current->Summary; +#else + ctx->Array.NewArrayState |= ctx->Array.Summary; +#endif + } + + return GL_FALSE; +} + + +static void tdfxDDCheckRasterSetup( GLcontext *ctx, + struct gl_pipeline_stage *d ) +{ + d->type = PIPE_IMMEDIATE | PIPE_PRECALC; + d->inputs = ctx->RenderFlags; + + d->outputs = VERT_SETUP_FULL; + + if ( ctx->IndirectTriangles & DD_SW_SETUP ) + d->type = PIPE_IMMEDIATE; +} + + +static void tdfxDDRenderElements(struct vertex_buffer *VB) +{ + if (VB->ClipOrMask) { + gl_render_elts( VB ); + } else { + GLcontext *ctx = VB->ctx; + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + fxMesa->RenderElementsRaw( VB ); + } +} + + +/* Register the pipeline with our stages included */ +GLuint tdfxDDRegisterPipelineStages( struct gl_pipeline_stage *out, + const struct gl_pipeline_stage *in, + GLuint nr ) +{ + int i, o; + + for ( i = o = 0 ; i < nr ; i++ ) { + switch ( in[i].ops ) { + + case PIPE_OP_RAST_SETUP_0: + out[o] = in[i]; + out[o].cva_state_change = (NEW_LIGHTING | + NEW_TEXTURING | + NEW_RASTER_OPS); + out[o].state_change = ~0; + out[o].check = tdfxDDCheckPartialRasterSetup; + out[o].run = tdfxDDPartialRasterSetup; + o++; + break; + + case PIPE_OP_RAST_SETUP_0 | PIPE_OP_RAST_SETUP_1: + out[o] = in[i]; + out[o].check = tdfxDDCheckRasterSetup; + out[o].run = tdfxDDDoRasterSetup; + o++; + break; + + case PIPE_OP_RENDER: + out[o] = in[i]; + if (in[i].type == PIPE_PRECALC) + out[o].run = tdfxDDRenderElements; + o++; + break; + + default: + out[o++] = in[i]; + break; + } + } + + return o; +} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_pipeline.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_pipeline.h:1.1 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_pipeline.h Wed Mar 21 11:14:28 2001 @@ -0,0 +1,54 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_pipeline.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Keith Whitwell + * + */ + +#ifndef __TDFX_PIPELINE_H__ +#define __TDFX_PIPELINE_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "context.h" + +extern GLboolean tdfxDDBuildPrecalcPipeline( GLcontext *ctx ); +extern GLuint tdfxDDRegisterPipelineStages( struct gl_pipeline_stage *out, + const struct gl_pipeline_stage *in, + GLuint nr ); + +extern void tdfxDDFastPathInit( void ); +extern void tdfxDDFastPath( struct vertex_buffer *VB ); + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.c diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.c:1.2 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.c Mon Apr 2 16:07:48 2001 @@ -0,0 +1,638 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.c,v 1.2 2001/04/02 20:07:48 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * Nathan Hand + * + */ + +#include "tdfx_context.h" +#include "tdfx_dd.h" +#include "tdfx_vb.h" +#include "tdfx_pipeline.h" +#include "tdfx_pixels.h" +#include "tdfx_render.h" + +#include "image.h" + +#if 0 +/* test if window coord (px,py) is visible */ +static GLboolean +inClipRects(tdfxContextPtr fxMesa, int px, int py) +{ + int i; + for (i = 0; i < fxMesa->numClipRects; i++) { + if ((px >= fxMesa->pClipRects[i].x1) && + (px < fxMesa->pClipRects[i].x2) && + (py >= fxMesa->pClipRects[i].y1) && + (py < fxMesa->pClipRects[i].y2)) return GL_TRUE; + } + return GL_FALSE; +} +#endif + +/* test if rectangle of pixels (px,py) (px+width,py+height) is visible */ +static GLboolean +inClipRects_Region(tdfxContextPtr fxMesa, int x, int y, int width, int height) +{ + int i; + int x1, y1, x2, y2; + int xmin, xmax, ymin, ymax, pixelsleft; + + y1 = y - height + 1; y2 = y; + x1 = x; x2 = x + width - 1; + pixelsleft = width * height; + + for (i = 0; i < fxMesa->numClipRects; i++) + { + /* algorithm requires x1 < x2 and y1 < y2 */ + if ((fxMesa->pClipRects[i].x1 < fxMesa->pClipRects[i].x2)) { + xmin = fxMesa->pClipRects[i].x1; + xmax = fxMesa->pClipRects[i].x2-1; + } else { + xmin = fxMesa->pClipRects[i].x2; + xmax = fxMesa->pClipRects[i].x1-1; + } + if ((fxMesa->pClipRects[i].y1 < fxMesa->pClipRects[i].y2)) { + ymin = fxMesa->pClipRects[i].y1; + ymax = fxMesa->pClipRects[i].y2-1; + } else { + ymin = fxMesa->pClipRects[i].y2; + ymax = fxMesa->pClipRects[i].y1-1; + } + + /* reject trivial cases */ + if (xmax < x1) continue; + if (ymax < y1) continue; + if (xmin > x2) continue; + if (ymin > y2) continue; + + /* find the intersection */ + if (xmin < x1) xmin = x1; + if (ymin < y1) ymin = y1; + if (xmax > x2) xmax = x2; + if (ymax > y2) ymax = y2; + + pixelsleft -= (xmax-xmin+1) * (ymax-ymin+1); + } + + return pixelsleft == 0; +} + +#if 0 +GLboolean +tdfx_bitmap_R5G6B5(GLcontext * ctx, GLint px, GLint py, + GLsizei width, GLsizei height, + const struct gl_pixelstore_attrib *unpack, + const GLubyte * bitmap) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GrLfbInfo_t info; + TdfxU16 color; + const struct gl_pixelstore_attrib *finalUnpack; + struct gl_pixelstore_attrib scissoredUnpack; + + /* check if there's any raster operations enabled which we can't handle */ + if (ctx->RasterMask & (ALPHATEST_BIT | + BLEND_BIT | + DEPTH_BIT | + FOG_BIT | + LOGIC_OP_BIT | + SCISSOR_BIT | + STENCIL_BIT | + MASKING_BIT | + ALPHABUF_BIT | MULTI_DRAW_BIT)) return GL_FALSE; + + if (ctx->Scissor.Enabled) { + /* This is a bit tricky, but by carefully adjusting the px, py, + * width, height, skipPixels and skipRows values we can do + * scissoring without special code in the rendering loop. + */ + + /* we'll construct a new pixelstore struct */ + finalUnpack = &scissoredUnpack; + scissoredUnpack = *unpack; + if (scissoredUnpack.RowLength == 0) + scissoredUnpack.RowLength = width; + + /* clip left */ + if (px < ctx->Scissor.X) { + scissoredUnpack.SkipPixels += (ctx->Scissor.X - px); + width -= (ctx->Scissor.X - px); + px = ctx->Scissor.X; + } + /* clip right */ + if (px + width >= ctx->Scissor.X + ctx->Scissor.Width) { + width -= (px + width - (ctx->Scissor.X + ctx->Scissor.Width)); + } + /* clip bottom */ + if (py < ctx->Scissor.Y) { + scissoredUnpack.SkipRows += (ctx->Scissor.Y - py); + height -= (ctx->Scissor.Y - py); + py = ctx->Scissor.Y; + } + /* clip top */ + if (py + height >= ctx->Scissor.Y + ctx->Scissor.Height) { + height -= (py + height - (ctx->Scissor.Y + ctx->Scissor.Height)); + } + + if (width <= 0 || height <= 0) + return GL_TRUE; /* totally scissored away */ + } + else { + finalUnpack = unpack; + } + + /* compute pixel value */ + { + GLint r = (GLint) (ctx->Current.RasterColor[0] * 255.0f); + GLint g = (GLint) (ctx->Current.RasterColor[1] * 255.0f); + GLint b = (GLint) (ctx->Current.RasterColor[2] * 255.0f); + /*GLint a = (GLint)(ctx->Current.RasterColor[3]*255.0f); */ + if (fxMesa->bgrOrder) { + color = (TdfxU16) + (((TdfxU16) 0xf8 & b) << (11 - 3)) | + (((TdfxU16) 0xfc & g) << (5 - 3 + 1)) | + (((TdfxU16) 0xf8 & r) >> 3); + } + else + color = (TdfxU16) + (((TdfxU16) 0xf8 & r) << (11 - 3)) | + (((TdfxU16) 0xfc & g) << (5 - 3 + 1)) | + (((TdfxU16) 0xf8 & b) >> 3); + } + + info.size = sizeof(info); + if (!TDFX_grLfbLock(fxMesa, + GR_LFB_WRITE_ONLY, + fxMesa->currentFB, + GR_LFBWRITEMODE_565, + GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { +#ifndef TDFX_SILENT + fprintf(stderr, "tdfx Driver: error locking the linear frame buffer\n"); +#endif + return GL_TRUE; + } + + { + const GLint winX = fxMesa->x_offset; + const GLint winY = fxMesa->y_offset + fxMesa->height - 1; + /* The dest stride depends on the hardware and whether we're drawing + * to the front or back buffer. This compile-time test seems to do + * the job for now. + */ + const GLint dstStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) + ? (fxMesa->screen_width) : (info.strideInBytes / 2); + GLint row; + /* compute dest address of bottom-left pixel in bitmap */ + GLushort *dst = (GLushort *) info.lfbPtr + + (winY - py) * dstStride + (winX + px); + + for (row = 0; row < height; row++) { + const GLubyte *src = + (const GLubyte *) _mesa_image_address(finalUnpack, + bitmap, width, height, + GL_COLOR_INDEX, + GL_BITMAP, 0, row, 0); + if (finalUnpack->LsbFirst) { + /* least significan bit first */ + GLubyte mask = 1U << (finalUnpack->SkipPixels & 0x7); + GLint col; + for (col = 0; col < width; col++) { + if (*src & mask) { + if (inClipRects(fxMesa, winX + px + col, winY - py - row)) + dst[col] = color; + } + if (mask == 128U) { + src++; + mask = 1U; + } + else { + mask = mask << 1; + } + } + if (mask != 1) + src++; + } + else { + /* most significan bit first */ + GLubyte mask = 128U >> (finalUnpack->SkipPixels & 0x7); + GLint col; + for (col = 0; col < width; col++) { + if (*src & mask) { + if (inClipRects(fxMesa, winX + px + col, winY - py - row)) + dst[col] = color; + } + if (mask == 1U) { + src++; + mask = 128U; + } + else { + mask = mask >> 1; + } + } + if (mask != 128) + src++; + } + dst -= dstStride; + } + } + + TDFX_grLfbUnlock(fxMesa, GR_LFB_WRITE_ONLY, fxMesa->currentFB); + return GL_TRUE; +} +#endif + +#if 0 +GLboolean +tdfx_bitmap_R8G8B8A8(GLcontext * ctx, GLint px, GLint py, + GLsizei width, GLsizei height, + const struct gl_pixelstore_attrib *unpack, + const GLubyte * bitmap) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GrLfbInfo_t info; + GLuint color; + const struct gl_pixelstore_attrib *finalUnpack; + struct gl_pixelstore_attrib scissoredUnpack; + + /* check if there's any raster operations enabled which we can't handle */ + if (ctx->RasterMask & (ALPHATEST_BIT | + BLEND_BIT | + DEPTH_BIT | + FOG_BIT | + LOGIC_OP_BIT | + SCISSOR_BIT | + STENCIL_BIT | + MASKING_BIT | + ALPHABUF_BIT | MULTI_DRAW_BIT)) return GL_FALSE; + + if (ctx->Scissor.Enabled) { + /* This is a bit tricky, but by carefully adjusting the px, py, + * width, height, skipPixels and skipRows values we can do + * scissoring without special code in the rendering loop. + */ + + /* we'll construct a new pixelstore struct */ + finalUnpack = &scissoredUnpack; + scissoredUnpack = *unpack; + if (scissoredUnpack.RowLength == 0) + scissoredUnpack.RowLength = width; + + /* clip left */ + if (px < ctx->Scissor.X) { + scissoredUnpack.SkipPixels += (ctx->Scissor.X - px); + width -= (ctx->Scissor.X - px); + px = ctx->Scissor.X; + } + /* clip right */ + if (px + width >= ctx->Scissor.X + ctx->Scissor.Width) { + width -= (px + width - (ctx->Scissor.X + ctx->Scissor.Width)); + } + /* clip bottom */ + if (py < ctx->Scissor.Y) { + scissoredUnpack.SkipRows += (ctx->Scissor.Y - py); + height -= (ctx->Scissor.Y - py); + py = ctx->Scissor.Y; + } + /* clip top */ + if (py + height >= ctx->Scissor.Y + ctx->Scissor.Height) { + height -= (py + height - (ctx->Scissor.Y + ctx->Scissor.Height)); + } + + if (width <= 0 || height <= 0) + return GL_TRUE; /* totally scissored away */ + } + else { + finalUnpack = unpack; + } + + /* compute pixel value */ + { + GLint r = (GLint) (ctx->Current.RasterColor[0] * 255.0f); + GLint g = (GLint) (ctx->Current.RasterColor[1] * 255.0f); + GLint b = (GLint) (ctx->Current.RasterColor[2] * 255.0f); + GLint a = (GLint) (ctx->Current.RasterColor[3] * 255.0f); + color = PACK_BGRA32(r, g, b, a); + } + + info.size = sizeof(info); + if (!TDFX_grLfbLock(fxMesa, GR_LFB_WRITE_ONLY, + fxMesa->currentFB, GR_LFBWRITEMODE_8888, + GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { +#ifndef TDFX_SILENT + fprintf(stderr, "tdfx Driver: error locking the linear frame buffer\n"); +#endif + return GL_TRUE; + } + + { + const GLint winX = fxMesa->x_offset; + const GLint winY = fxMesa->y_offset + fxMesa->height - 1; + GLint dstStride; + GLuint *dst; + GLint row; + + if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) { + dstStride = fxMesa->screen_width; + dst = + (GLuint *) info.lfbPtr + (winY - py) * dstStride + (winX + + px); + } + else { + dstStride = info.strideInBytes / 4; + dst = + (GLuint *) info.lfbPtr + (winY - py) * dstStride + (winX + + px); + } + + /* compute dest address of bottom-left pixel in bitmap */ + for (row = 0; row < height; row++) { + const GLubyte *src = + (const GLubyte *) _mesa_image_address(finalUnpack, + bitmap, width, height, + GL_COLOR_INDEX, + GL_BITMAP, 0, row, 0); + if (finalUnpack->LsbFirst) { + /* least significan bit first */ + GLubyte mask = 1U << (finalUnpack->SkipPixels & 0x7); + GLint col; + for (col = 0; col < width; col++) { + if (*src & mask) { + if (inClipRects(fxMesa, winX + px + col, winY - py - row)) + dst[col] = color; + } + if (mask == 128U) { + src++; + mask = 1U; + } + else { + mask = mask << 1; + } + } + if (mask != 1) + src++; + } + else { + /* most significan bit first */ + GLubyte mask = 128U >> (finalUnpack->SkipPixels & 0x7); + GLint col; + for (col = 0; col < width; col++) { + if (*src & mask) { + if (inClipRects(fxMesa, winX + px + col, winY - py - row)) + dst[col] = color; + } + if (mask == 1U) { + src++; + mask = 128U; + } + else { + mask = mask >> 1; + } + } + if (mask != 128) + src++; + } + dst -= dstStride; + } + } + + TDFX_grLfbUnlock(fxMesa, GR_LFB_WRITE_ONLY, fxMesa->currentFB); + return GL_TRUE; +} +#endif + +GLboolean +tdfx_readpixels_R5G6B5(GLcontext * ctx, GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *packing, + GLvoid * dstImage) +{ + if (!(format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5)) { + return GL_FALSE; /* format/type not recognised */ + } + + if (ctx->Pixel.ScaleOrBiasRGBA || ctx->Pixel.MapColorFlag) { + return GL_FALSE; /* can't do this */ + } + + { + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GrLfbInfo_t info; + GLboolean result = GL_FALSE; + + const GLint winX = fxMesa->x_offset; + const GLint winY = fxMesa->y_offset + fxMesa->height - 1; + const GLint scrX = winX + x; + const GLint scrY = winY - y; + + LOCK_HARDWARE( fxMesa ); + info.size = sizeof(info); + if (grLfbLock(GR_LFB_READ_ONLY, + fxMesa->ReadBuffer, + GR_LFBWRITEMODE_ANY, + GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { + const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer == + GL_FRONT) ? (fxMesa->screen_width) : (info.strideInBytes / 2); + const GLushort *src = (const GLushort *) info.lfbPtr + + scrY * srcStride + scrX; + const GLubyte *dst = (GLubyte *) _mesa_image_address(packing, + dstImage, width, height, format, type, 0, 0, 0); + const GLint dstStride = _mesa_image_row_stride(packing, + width, format, type); + + if (format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5) { + /* directly memcpy 5R6G5B pixels into client's buffer */ + const GLint widthInBytes = width * 2; + GLint row; + for (row = 0; row < height; row++) { + MEMCPY(dst, src, widthInBytes); + dst += dstStride; + src -= srcStride; + } + result = GL_TRUE; + } + + grLfbUnlock(GR_LFB_READ_ONLY, fxMesa->ReadBuffer); + } + UNLOCK_HARDWARE( fxMesa ); + return result; + } +} + +GLboolean +tdfx_readpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *packing, + GLvoid * dstImage) +{ + if (!(format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8) && + !(format == GL_BGRA && type == GL_UNSIGNED_BYTE)) { + return GL_FALSE; /* format/type not optimised */ + } + + if (ctx->Pixel.ScaleOrBiasRGBA || ctx->Pixel.MapColorFlag) { + return GL_FALSE; /* can't do this */ + } + + { + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GrLfbInfo_t info; + GLboolean result = GL_FALSE; + + const GLint winX = fxMesa->x_offset; + const GLint winY = fxMesa->y_offset + fxMesa->height - 1; + const GLint scrX = winX + x; + const GLint scrY = winY - y; + + LOCK_HARDWARE(fxMesa); + info.size = sizeof(info); + if (grLfbLock(GR_LFB_READ_ONLY, + fxMesa->ReadBuffer, + GR_LFBWRITEMODE_ANY, + GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) + { + const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) + ? (fxMesa->screen_width) : (info.strideInBytes / 4); + const GLuint *src = (const GLuint *) info.lfbPtr + + scrY * srcStride + scrX; + const GLint dstStride = + _mesa_image_row_stride(packing, width, format, type); + const GLubyte *dst = (GLubyte *) _mesa_image_address(packing, + dstImage, width, height, format, type, 0, 0, 0); + const GLint widthInBytes = width * 4; + + if ((format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8) || + (format == GL_BGRA && type == GL_UNSIGNED_BYTE)) { + GLint row; + for (row = 0; row < height; row++) { + MEMCPY(dst, src, widthInBytes); + dst += dstStride; + src -= srcStride; + } + result = GL_TRUE; + } + + grLfbUnlock(GR_LFB_READ_ONLY, fxMesa->ReadBuffer); + } + UNLOCK_HARDWARE(fxMesa); + return result; + } +} + +GLboolean +tdfx_drawpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + const GLvoid * pixels) +{ + if (!(format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8) && + !(format == GL_BGRA && type == GL_UNSIGNED_BYTE)) { + return GL_FALSE; /* format/type not optimised */ + } + + if (ctx->Pixel.ZoomX!=1.0F || ctx->Pixel.ZoomY!=1.0F) { + return GL_FALSE; /* can't scale pixels */ + } + + if (ctx->Pixel.ScaleOrBiasRGBA || ctx->Pixel.MapColorFlag) { + return GL_FALSE; /* can't do this */ + } + + if (ctx->RasterMask & (~BLEND_BIT)) { + return GL_FALSE; /* can't do any raster ops, except blend */ + } + + { + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GrLfbInfo_t info; + GLboolean result = GL_FALSE; + + const GLint winX = fxMesa->x_offset; + const GLint winY = fxMesa->y_offset + fxMesa->height - 1; + const GLint scrX = winX + x; + const GLint scrY = winY - y; + + /* lock early to make sure cliprects are right */ + LOCK_HARDWARE(fxMesa); + + /* make sure hardware has latest blend funcs */ + if (ctx->RasterMask & BLEND_BIT) { + fxMesa->dirty |= TDFX_UPLOAD_BLEND_FUNC; + tdfxEmitHwStateLocked( fxMesa ); + } + + /* look for clipmasks, giveup if region obscured */ + if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) { + if (!inClipRects_Region(fxMesa, scrX, scrY, width, height)) { + UNLOCK_HARDWARE(fxMesa); + return GL_FALSE; + } + } + + info.size = sizeof(info); + if (grLfbLock(GR_LFB_WRITE_ONLY, + fxMesa->DrawBuffer, + GR_LFBWRITEMODE_8888, + GR_ORIGIN_UPPER_LEFT, FXTRUE, &info)) + { + const GLint dstStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) + ? (fxMesa->screen_width * 4) : (info.strideInBytes); + const GLubyte *dst = (const GLubyte *) info.lfbPtr + + scrY * dstStride + scrX * 4; + const GLint srcStride = + _mesa_image_row_stride(unpack, width, format, type); + const GLubyte *src = (GLubyte *) _mesa_image_address(unpack, + pixels, width, height, format, type, 0, 0, 0); + const GLint widthInBytes = width * 4; + + if ((format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8) || + (format == GL_BGRA && type == GL_UNSIGNED_BYTE)) { + GLint row; + for (row = 0; row < height; row++) { + MEMCPY(dst, src, widthInBytes); + dst -= dstStride; + src += srcStride; + } + result = GL_TRUE; + } + + grLfbUnlock(GR_LFB_WRITE_ONLY, fxMesa->DrawBuffer); + } + UNLOCK_HARDWARE(fxMesa); + return result; + } +} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.h:1.1 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.h Wed Mar 21 11:14:28 2001 @@ -0,0 +1,80 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * Nathan Hand + * + */ + +#ifndef __TDFX_PIXELS_H__ +#define __TDFX_PIXELS_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "context.h" + +extern GLboolean +tdfx_bitmap_R5G6B5( GLcontext *ctx, GLint px, GLint py, + GLsizei width, GLsizei height, + const struct gl_pixelstore_attrib *unpack, + const GLubyte *bitmap ); + +extern GLboolean +tdfx_bitmap_R8G8B8A8( GLcontext *ctx, GLint px, GLint py, + GLsizei width, GLsizei height, + const struct gl_pixelstore_attrib *unpack, + const GLubyte *bitmap ); + +extern GLboolean +tdfx_readpixels_R5G6B5( GLcontext *ctx, GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *packing, + GLvoid *dstImage ); + +extern GLboolean +tdfx_readpixels_R8G8B8A8( GLcontext *ctx, GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *packing, + GLvoid *dstImage ); + +extern GLboolean +tdfx_drawpixels_R8G8B8A8( GLcontext *ctx, GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + const GLvoid *pixels ); + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.c diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.c:1.1 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.c Wed Mar 21 11:14:28 2001 @@ -0,0 +1,861 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * + */ + +#include "dri_glide.h" +#include "tdfx_context.h" +#include "tdfx_render.h" +#include "tdfx_state.h" +#include "tdfx_texman.h" + +/* Clear the color and/or depth buffers. + */ +static GLbitfield tdfxDDClear( GLcontext *ctx, + GLbitfield mask, GLboolean all, + GLint x, GLint y, GLint width, GLint height ) +{ + tdfxContextPtr fxMesa = (tdfxContextPtr) ctx->DriverCtx; + GLbitfield softwareMask = mask & (DD_ACCUM_BIT); + const GLuint stencil_size = + fxMesa->haveHwStencil ? fxMesa->glVis->StencilBits : 0; + +#if 0 + GLuint flags; + + FLUSH_BATCH( fxMesa ); + + if ( mask & DD_FRONT_LEFT_BIT ) { + flags |= TDFX_FRONT; + mask &= ~DD_FRONT_LEFT_BIT; + } + + if ( mask & DD_BACK_LEFT_BIT ) { + flags |= TDFX_BACK; + mask &= ~DD_BACK_LEFT_BIT; + } + + if ( (mask & DD_DEPTH_BIT) && ctx->Depth.Mask ) { + flags |= TDFX_DEPTH; + mask &= ~DD_DEPTH_BIT; + } + + if ( (mask & DD_STENCIL_BIT) && fxMesa->haveHwStencil ) { + clear.flags |= TDFX_STENCIL; + mask &= ~DD_STENCIL_BIT; + } + + if ( !flags ) + return mask; + + LOCK_HARDWARE( fxMesa ); + + + if ( flags & TDFX_FRONT ) { + + } + + if ( flags & TDFX_BACK ) { + + } + + if ( flags & TDFX_DEPTH ) { + + } + + if ( flags & TDFX_STENCIL ) { + grStencilMask( fxMesa->Stencil.WriteMask ); + /* set stencil ref value = desired clear value */ + grStencilFunc( GR_CMP_ALWAYS, fxMesa->Stencil.Clear, 0xff ); + grStencilOp( GR_STENCILOP_REPLACE, + GR_STENCILOP_REPLACE, + GR_STENCILOP_REPLACE ); + grEnable( GR_STENCIL_MODE_EXT ); + + if ( ctx->Stencil.Enabled ) { + grStencilOp( fxMesa->Stencil.FailFunc, + fxMesa->Stencil.ZFailFunc, + fxMesa->Stencil.ZPassFunc ); + grStencilMask( fxMesa->Stencil.WriteMask ); + grStencilFunc( fxMesa->Stencil.Function, + fxMesa->Stencil.RefValue, + fxMesa->Stencil.ValueMask ); + grEnable_NoLock( GR_STENCIL_MODE_EXT ); + } else { + grDisable( GR_STENCIL_MODE_EXT ); + } + + } + UNLOCK_HARDWARE( fxMesa ); + +#else + + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s( %d, %d, %d, %d )\n", + __FUNCTION__, (int) x, (int) y, (int) width, (int) height ); + } + + /* Need this check to respond to glScissor and clipping updates */ + if ((fxMesa->new_state & (TDFX_NEW_CLIP | TDFX_NEW_DEPTH)) || + (fxMesa->dirty & TDFX_UPLOAD_COLOR_MASK)) { + tdfxDDUpdateHwState(ctx); + } + + /* we can't clear accum buffers */ + mask &= ~(DD_ACCUM_BIT); + + if (mask & DD_STENCIL_BIT) { + if (!fxMesa->haveHwStencil || ctx->Stencil.WriteMask != 0xff) { + /* Napalm seems to have trouble with stencil write masks != 0xff */ + /* do stencil clear in software */ + mask &= ~(DD_STENCIL_BIT); + softwareMask |= DD_STENCIL_BIT; + } + } + + if (fxMesa->glVis->RedBits != 8) { + /* can only do color masking if running in 24/32bpp on Napalm */ + if (ctx->Color.ColorMask[RCOMP] != ctx->Color.ColorMask[GCOMP] || + ctx->Color.ColorMask[GCOMP] != ctx->Color.ColorMask[BCOMP]) { + softwareMask |= (mask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT)); + mask &= ~(DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT); + } + } + + if (fxMesa->haveHwStencil) { + /* + * If we want to clear stencil, it must be enabled + * in the HW, even if the stencil test is not enabled + * in the OGL state. + */ + LOCK_HARDWARE(fxMesa); + if (mask & DD_STENCIL_BIT) { + FX_grStencilMask_NoLock(/*ctx->Stencil.WriteMask*/ 0xff); + /* set stencil ref value = desired clear value */ + FX_grStencilFunc_NoLock(GR_CMP_ALWAYS, ctx->Stencil.Clear, 0xff); + FX_grStencilOp_NoLock(GR_STENCILOP_REPLACE, + GR_STENCILOP_REPLACE, GR_STENCILOP_REPLACE); + FX_grEnable_NoLock(GR_STENCIL_MODE_EXT); + } + else { + FX_grDisable_NoLock(GR_STENCIL_MODE_EXT); + } + UNLOCK_HARDWARE(fxMesa); + } + + /* + * FIXME: This is just plain ugly... + */ + BEGIN_CLIP_LOOP(fxMesa); + { + /* + * This could probably be done fancier but doing each possible case + * explicitly is less error prone. + */ + switch (mask & ~DD_STENCIL_BIT) { + case DD_BACK_LEFT_BIT | DD_DEPTH_BIT: + /* back buffer & depth */ + FX_grColorMaskv_NoLock(ctx, true4); /* work around Voodoo3 bug */ + FX_grDepthMask_NoLock(FXTRUE); + FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); + if (stencil_size > 0) { + FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); + } + else + FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); + if (!ctx->Depth.Mask || !ctx->Depth.Test) { + FX_grDepthMask_NoLock(FXFALSE); + } + break; + case DD_FRONT_LEFT_BIT | DD_DEPTH_BIT: + /* XXX it appears that the depth buffer isn't cleared when + * glRenderBuffer(GR_BUFFER_FRONTBUFFER) is set. + * This is a work-around/ + */ + /* clear depth */ + FX_grDepthMask_NoLock(FXTRUE); + FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); + FX_grColorMaskv_NoLock(ctx, false4); + if (stencil_size > 0) + FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); + else + FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); + /* clear front */ + FX_grColorMaskv_NoLock(ctx, true4); + FX_grRenderBuffer_NoLock(GR_BUFFER_FRONTBUFFER); + if (stencil_size > 0) + FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); + else + FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); + if (!ctx->Depth.Mask || !ctx->Depth.Test) { + FX_grDepthMask_NoLock(FXFALSE); + } + break; + case DD_BACK_LEFT_BIT: + /* back buffer only */ + FX_grDepthMask_NoLock(FXFALSE); + FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); + if (stencil_size > 0) + FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); + else + FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); + if (ctx->Depth.Mask && ctx->Depth.Test) { + FX_grDepthMask_NoLock(FXTRUE); + } + break; + case DD_FRONT_LEFT_BIT: + /* front buffer only */ + FX_grDepthMask_NoLock(FXFALSE); + FX_grRenderBuffer_NoLock(GR_BUFFER_FRONTBUFFER); + if (stencil_size > 0) + FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); + else + FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); + if (ctx->Depth.Mask && ctx->Depth.Test) { + FX_grDepthMask_NoLock(FXTRUE); + } + break; + case DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT: + /* front and back */ + FX_grDepthMask_NoLock(FXFALSE); + FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); + if (stencil_size > 0) + FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); + else + FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); + FX_grRenderBuffer_NoLock(GR_BUFFER_FRONTBUFFER); + if (stencil_size > 0) + FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); + else + FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); + if (ctx->Depth.Mask && ctx->Depth.Test) { + FX_grDepthMask_NoLock(FXTRUE); + } + break; + case DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT | DD_DEPTH_BIT: + /* clear front */ + FX_grDepthMask_NoLock(FXFALSE); + FX_grRenderBuffer_NoLock(GR_BUFFER_FRONTBUFFER); + if (stencil_size > 0) + FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); + else + FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); + /* clear back and depth */ + FX_grDepthMask_NoLock(FXTRUE); + FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); + if (stencil_size > 0) + FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); + else + FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); + if (!ctx->Depth.Mask || !ctx->Depth.Mask) { + FX_grDepthMask_NoLock(FXFALSE); + } + break; + case DD_DEPTH_BIT: + /* just the depth buffer */ + FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); + FX_grColorMaskv_NoLock(ctx, false4); + FX_grDepthMask_NoLock(FXTRUE); + if (stencil_size > 0) + FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); + else + FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); + FX_grColorMaskv_NoLock(ctx, true4); + if (ctx->Color.DrawDestMask & FRONT_LEFT_BIT) + FX_grRenderBuffer_NoLock(GR_BUFFER_FRONTBUFFER); + if (!ctx->Depth.Test || !ctx->Depth.Mask) + FX_grDepthMask_NoLock(FXFALSE); + break; + default: + /* clear no color buffers or depth buffer but might clear stencil */ + if (stencil_size > 0 && (mask & DD_STENCIL_BIT)) { + /* XXX need this RenderBuffer call to work around Glide bug */ + FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); + FX_grDepthMask_NoLock(FXFALSE); + FX_grColorMaskv_NoLock(ctx, false4); + FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); + if (ctx->Depth.Mask && ctx->Depth.Test) { + FX_grDepthMask_NoLock(FXTRUE); + } + FX_grColorMaskv_NoLock(ctx, true4); + if (ctx->Color.DrawDestMask & FRONT_LEFT_BIT) + FX_grRenderBuffer_NoLock(GR_BUFFER_FRONTBUFFER); + } + } + } + END_CLIP_LOOP(fxMesa); + + if (fxMesa->haveHwStencil && (mask & DD_STENCIL_BIT)) { + /* We changed the stencil state above. Signal that we need to + * upload it again. + */ + fxMesa->dirty |= TDFX_UPLOAD_STENCIL; + } + +#endif + return softwareMask; +} + + + +static void tdfxDDFinish( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + FLUSH_BATCH( fxMesa ); + + LOCK_HARDWARE( fxMesa ); + grFinish(); + UNLOCK_HARDWARE( fxMesa ); +} + +static void tdfxDDFlush( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + FLUSH_BATCH( fxMesa ); + + LOCK_HARDWARE( fxMesa ); + grFlush(); + UNLOCK_HARDWARE( fxMesa ); +} + + + +static const char *texSource(int k) +{ + switch (k) { + case GR_CMBX_ZERO: + return "GR_CMBX_ZERO"; + case GR_CMBX_TEXTURE_ALPHA: + return "GR_CMBX_TEXTURE_ALPHA"; + case GR_CMBX_ALOCAL: + return "GR_CMBX_ALOCAL"; + case GR_CMBX_AOTHER: + return "GR_CMBX_AOTHER"; + case GR_CMBX_B: + return "GR_CMBX_B"; + case GR_CMBX_CONSTANT_ALPHA: + return "GR_CMBX_CONSTANT_ALPHA"; + case GR_CMBX_CONSTANT_COLOR: + return "GR_CMBX_CONSTANT_COLOR"; + case GR_CMBX_DETAIL_FACTOR: + return "GR_CMBX_DETAIL_FACTOR"; + case GR_CMBX_ITALPHA: + return "GR_CMBX_ITALPHA"; + case GR_CMBX_ITRGB: + return "GR_CMBX_ITRGB"; + case GR_CMBX_LOCAL_TEXTURE_ALPHA: + return "GR_CMBX_LOCAL_TEXTURE_ALPHA"; + case GR_CMBX_LOCAL_TEXTURE_RGB: + return "GR_CMBX_LOCAL_TEXTURE_RGB"; + case GR_CMBX_LOD_FRAC: + return "GR_CMBX_LOD_FRAC"; + case GR_CMBX_OTHER_TEXTURE_ALPHA: + return "GR_CMBX_OTHER_TEXTURE_ALPHA"; + case GR_CMBX_OTHER_TEXTURE_RGB: + return "GR_CMBX_OTHER_TEXTURE_RGB"; + case GR_CMBX_TEXTURE_RGB: + return "GR_CMBX_TEXTURE_RGB"; + case GR_CMBX_TMU_CALPHA: + return "GR_CMBX_TMU_CALPHA"; + case GR_CMBX_TMU_CCOLOR: + return "GR_CMBX_TMU_CCOLOR"; + default: + return ""; + } +} + +static const char *texMode(int k) +{ + switch (k) { + case GR_FUNC_MODE_ZERO: + return "GR_FUNC_MODE_ZERO"; + case GR_FUNC_MODE_X: + return "GR_FUNC_MODE_X"; + case GR_FUNC_MODE_ONE_MINUS_X: + return "GR_FUNC_MODE_ONE_MINUS_X"; + case GR_FUNC_MODE_NEGATIVE_X: + return "GR_FUNC_MODE_NEGATIVE_X"; + case GR_FUNC_MODE_X_MINUS_HALF: + return "GR_FUNC_MODE_X_MINUS_HALF"; + default: + return ""; + } +} + +static const char *texInvert(int k) +{ + return k ? "FXTRUE" : "FXFALSE"; +} + +static void uploadTextureEnv( tdfxContextPtr fxMesa ) +{ + if (TDFX_IS_NAPALM(fxMesa)) { + int unit; + for (unit = 0; unit < TDFX_NUM_TMU; unit++) { +#if 0 + printf("upload env %d\n", unit); + printf(" cSourceA = %s\t", texSource(fxMesa->TexCombineExt[unit].Color.SourceA)); + printf(" cModeA = %s\n", texMode(fxMesa->TexCombineExt[unit].Color.ModeA)); + printf(" cSourceB = %s\t", texSource(fxMesa->TexCombineExt[unit].Color.SourceB)); + printf(" cModeB = %s\n", texMode(fxMesa->TexCombineExt[unit].Color.ModeB)); + printf(" cSourceC = %s\t", texSource(fxMesa->TexCombineExt[unit].Color.SourceC)); + printf(" cInvertC = %s\n", texInvert(fxMesa->TexCombineExt[unit].Color.InvertC)); + printf(" cSourceD = %s\t", texSource(fxMesa->TexCombineExt[unit].Color.SourceD)); + printf(" cInvertD = %s\n", texInvert(fxMesa->TexCombineExt[unit].Color.InvertD)); + printf(" cShift = %d\t", fxMesa->TexCombineExt[unit].Color.Shift); + printf(" cInvert = %d\n", fxMesa->TexCombineExt[unit].Color.Invert); + printf(" aSourceA = %s\t", texSource(fxMesa->TexCombineExt[unit].Alpha.SourceA)); + printf(" aModeA = %s\n", texMode(fxMesa->TexCombineExt[unit].Alpha.ModeA)); + printf(" aSourceB = %s\t", texSource(fxMesa->TexCombineExt[unit].Alpha.SourceB)); + printf(" aModeB = %s\n", texMode(fxMesa->TexCombineExt[unit].Alpha.ModeB)); + printf(" aSourceC = %s\t", texSource(fxMesa->TexCombineExt[unit].Alpha.SourceC)); + printf(" aInvertC = %s\n", texInvert(fxMesa->TexCombineExt[unit].Alpha.InvertC)); + printf(" aSourceD = %s\t", texSource(fxMesa->TexCombineExt[unit].Alpha.SourceD)); + printf(" aInvertD = %s\n", texInvert(fxMesa->TexCombineExt[unit].Alpha.InvertD)); + printf(" aShift = %d\t", fxMesa->TexCombineExt[unit].Alpha.Shift); + printf(" aInvert = %d\n", fxMesa->TexCombineExt[unit].Alpha.Invert); + printf(" Color = 0x%08x\n", fxMesa->TexCombineExt[unit].EnvColor); +#endif + (*grTexColorCombineExtProc)(TDFX_TMU0 + unit, + fxMesa->TexCombineExt[unit].Color.SourceA, + fxMesa->TexCombineExt[unit].Color.ModeA, + fxMesa->TexCombineExt[unit].Color.SourceB, + fxMesa->TexCombineExt[unit].Color.ModeB, + fxMesa->TexCombineExt[unit].Color.SourceC, + fxMesa->TexCombineExt[unit].Color.InvertC, + fxMesa->TexCombineExt[unit].Color.SourceD, + fxMesa->TexCombineExt[unit].Color.InvertD, + fxMesa->TexCombineExt[unit].Color.Shift, + fxMesa->TexCombineExt[unit].Color.Invert); + (*grTexAlphaCombineExtProc)(TDFX_TMU0 + unit, + fxMesa->TexCombineExt[unit].Alpha.SourceA, + fxMesa->TexCombineExt[unit].Alpha.ModeA, + fxMesa->TexCombineExt[unit].Alpha.SourceB, + fxMesa->TexCombineExt[unit].Alpha.ModeB, + fxMesa->TexCombineExt[unit].Alpha.SourceC, + fxMesa->TexCombineExt[unit].Alpha.InvertC, + fxMesa->TexCombineExt[unit].Alpha.SourceD, + fxMesa->TexCombineExt[unit].Alpha.InvertD, + fxMesa->TexCombineExt[unit].Alpha.Shift, + fxMesa->TexCombineExt[unit].Alpha.Invert); + (*grConstantColorValueExtProc)(TDFX_TMU0 + unit, + fxMesa->TexCombineExt[unit].EnvColor); + } + } + else { + /* Voodoo3 */ + int unit; + for (unit = 0; unit < TDFX_NUM_TMU; unit++) { + struct tdfx_texcombine *comb = &fxMesa->TexCombine[unit]; + FX_grTexCombine_NoLock(TDFX_TMU0 + unit, + comb->FunctionRGB, + comb->FactorRGB, + comb->FunctionAlpha, + comb->FactorAlpha, + comb->InvertRGB, + comb->InvertAlpha); + } + } +} + + +static void uploadTextureParams( tdfxContextPtr fxMesa ) +{ + int unit; + for (unit = 0; unit < TDFX_NUM_TMU; unit++) { + const struct tdfx_texparams *p = &fxMesa->TexParams[unit]; + /* + printf("upload params %d\n", unit); + printf(" clamp %x %x\n", env->sClamp, env->tClamp); + printf(" filter %x %x\n", env->minFilt, env->magFilt); + printf(" mipmap %x %x\n", env->mmMode, env->LODblend); + printf(" lod bias %f\n", env->LodBias); + */ + FX_grTexClampMode_NoLock(GR_TMU0 + unit, p->sClamp, p->tClamp); + FX_grTexFilterMode_NoLock(GR_TMU0 + unit, p->minFilt, p->magFilt); + FX_grTexMipMapMode_NoLock(GR_TMU0 + unit, p->mmMode, p->LODblend); + FX_grTexLodBiasValue_NoLock(GR_TMU0 + unit, p->LodBias); + } +} + + +static void uploadTextureSource( tdfxContextPtr fxMesa ) +{ + int unit; + for (unit = 0; unit < TDFX_NUM_TMU; unit++) { + const struct tdfx_texsource *src = &fxMesa->TexSource[unit]; + /* + printf("upload source %d @ %d %p\n", unit, src->StartAddress, src->Info); + */ + if (src->Info) { + /* + printf(" smallLodLog2=%d largeLodLog2=%d ar=%d format=%d data=%p\n", + src->Info->smallLodLog2, src->Info->largeLodLog2, + src->Info->aspectRatioLog2, src->Info->format, + src->Info->data); + */ + FX_grTexSource_NoLock(GR_TMU0 + unit, + src->StartAddress, + src->EvenOdd, + src->Info); + } + } +} + + +static void uploadTextureImages( tdfxContextPtr fxMesa ) +{ + GLcontext *ctx = fxMesa->glCtx; + int unit; + for ( unit = 0 ; unit < TDFX_NUM_TMU ; unit++ ) { + if ( ctx->Texture.Unit[unit].ReallyEnabled == TEXTURE0_2D ) { + struct gl_texture_object *tObj = ctx->Texture.Unit[unit].CurrentD[2]; + tdfxTexObjPtr t = TDFX_TEXTURE_DATA(tObj); + if ( t && t->reloadImages ) { + tdfxTMDownloadTextureLocked( fxMesa, tObj ); + t->reloadImages = GL_FALSE; + } + } + } +} + + + +/* + * If scissoring is enabled, compute intersection of scissor region + * with all X clip rects, resulting in new cliprect list. + * If number of cliprects is zero or one, call grClipWindow to setup + * the clip region. Otherwise we'll call grClipWindow inside the + * BEGIN_CLIP_LOOP macro. + */ +void tdfxUploadClipping( tdfxContextPtr fxMesa ) +{ + __DRIdrawablePrivate *dPriv = fxMesa->driDrawable; + + assert(dPriv); + + if (fxMesa->numClipRects == 0) { + /* all drawing clipped away */ + grClipWindow(0, 0, 0, 0); + } + else if (fxMesa->numClipRects == 1) { + grClipWindow(fxMesa->pClipRects[0].x1, + fxMesa->screen_height - fxMesa->pClipRects[0].y2, + fxMesa->pClipRects[0].x2, + fxMesa->screen_height - fxMesa->pClipRects[0].y1); + } + /* else, we'll do a cliprect loop around all drawing */ + + grDRIPosition( dPriv->x, dPriv->y, dPriv->w, dPriv->h, + fxMesa->numClipRects, fxMesa->pClipRects ); +} + + +void tdfxEmitHwStateLocked( tdfxContextPtr fxMesa ) +{ + if ( !fxMesa->dirty ) + return; + + if ( fxMesa->dirty & TDFX_UPLOAD_COLOR_COMBINE ) { + if (TDFX_IS_NAPALM(fxMesa)) { + (*grColorCombineExtProc)(fxMesa->ColorCombineExt.SourceA, + fxMesa->ColorCombineExt.ModeA, + fxMesa->ColorCombineExt.SourceB, + fxMesa->ColorCombineExt.ModeB, + fxMesa->ColorCombineExt.SourceC, + fxMesa->ColorCombineExt.InvertC, + fxMesa->ColorCombineExt.SourceD, + fxMesa->ColorCombineExt.InvertD, + fxMesa->ColorCombineExt.Shift, + fxMesa->ColorCombineExt.Invert); + } + else { + /* Voodoo 3 */ + grColorCombine( fxMesa->ColorCombine.Function, + fxMesa->ColorCombine.Factor, + fxMesa->ColorCombine.Local, + fxMesa->ColorCombine.Other, + fxMesa->ColorCombine.Invert ); + } + fxMesa->dirty &= ~TDFX_UPLOAD_COLOR_COMBINE; + } + if ( fxMesa->dirty & TDFX_UPLOAD_ALPHA_COMBINE ) { + if (TDFX_IS_NAPALM(fxMesa)) { + (*grAlphaCombineExtProc)(fxMesa->AlphaCombineExt.SourceA, + fxMesa->AlphaCombineExt.ModeA, + fxMesa->AlphaCombineExt.SourceB, + fxMesa->AlphaCombineExt.ModeB, + fxMesa->AlphaCombineExt.SourceC, + fxMesa->AlphaCombineExt.InvertC, + fxMesa->AlphaCombineExt.SourceD, + fxMesa->AlphaCombineExt.InvertD, + fxMesa->AlphaCombineExt.Shift, + fxMesa->AlphaCombineExt.Invert); + } + else { + /* Voodoo 3 */ + grAlphaCombine( fxMesa->AlphaCombine.Function, + fxMesa->AlphaCombine.Factor, + fxMesa->AlphaCombine.Local, + fxMesa->AlphaCombine.Other, + fxMesa->AlphaCombine.Invert ); + } + fxMesa->dirty &= ~TDFX_UPLOAD_ALPHA_COMBINE; + } + + if ( fxMesa->dirty & TDFX_UPLOAD_RENDER_BUFFER ) { + grRenderBuffer( fxMesa->DrawBuffer ); + fxMesa->dirty &= ~TDFX_UPLOAD_RENDER_BUFFER; + } + + if ( fxMesa->dirty & TDFX_UPLOAD_STIPPLE) { + grStipplePattern( fxMesa->Stipple.Pattern ); + grStippleMode( fxMesa->Stipple.Mode ); + fxMesa->dirty &= ~TDFX_UPLOAD_STIPPLE; + } + + if ( fxMesa->dirty & TDFX_UPLOAD_ALPHA_TEST ) { + grAlphaTestFunction( fxMesa->Color.AlphaFunc ); + fxMesa->dirty &= ~TDFX_UPLOAD_ALPHA_TEST; + } + if ( fxMesa->dirty & TDFX_UPLOAD_ALPHA_REF ) { + grAlphaTestReferenceValue( fxMesa->Color.AlphaRef ); + fxMesa->dirty &= ~TDFX_UPLOAD_ALPHA_REF; + } + if ( fxMesa->dirty & TDFX_UPLOAD_BLEND_FUNC ) { + if (grAlphaBlendFunctionExtProc) { + (*grAlphaBlendFunctionExtProc)( fxMesa->Color.BlendSrcRGB, + fxMesa->Color.BlendDstRGB, + GR_BLEND_OP_ADD, + fxMesa->Color.BlendSrcA, + fxMesa->Color.BlendDstA, + GR_BLEND_OP_ADD ); + } + else { + grAlphaBlendFunction( fxMesa->Color.BlendSrcRGB, + fxMesa->Color.BlendDstRGB, + fxMesa->Color.BlendSrcA, + fxMesa->Color.BlendDstA ); + } + fxMesa->dirty &= ~TDFX_UPLOAD_BLEND_FUNC; + } + + if ( fxMesa->dirty & TDFX_UPLOAD_DEPTH_MODE ) { + grDepthBufferMode( fxMesa->Depth.Mode ); + fxMesa->dirty &= ~TDFX_UPLOAD_DEPTH_MODE; + } + if ( fxMesa->dirty & TDFX_UPLOAD_DEPTH_BIAS ) { + grDepthBiasLevel( fxMesa->Depth.Bias ); + fxMesa->dirty &= ~TDFX_UPLOAD_DEPTH_BIAS; + } + if ( fxMesa->dirty & TDFX_UPLOAD_DEPTH_FUNC ) { + grDepthBufferFunction( fxMesa->Depth.Func ); + fxMesa->dirty &= ~TDFX_UPLOAD_DEPTH_FUNC; + } + if ( fxMesa->dirty & TDFX_UPLOAD_DEPTH_MASK ) { + grDepthMask( fxMesa->Depth.Mask ); + fxMesa->dirty &= ~TDFX_UPLOAD_DEPTH_MASK; + } + + if ( fxMesa->dirty & TDFX_UPLOAD_DITHER) { + grDitherMode( fxMesa->Color.Dither ); + } + + if ( fxMesa->dirty & TDFX_UPLOAD_FOG_MODE ) { + grFogMode( fxMesa->Fog.Mode ); + fxMesa->dirty &= ~TDFX_UPLOAD_FOG_MODE; + } + if ( fxMesa->dirty & TDFX_UPLOAD_FOG_COLOR ) { + grFogColorValue( fxMesa->Fog.Color ); + fxMesa->dirty &= ~TDFX_UPLOAD_FOG_COLOR; + } + if ( fxMesa->dirty & TDFX_UPLOAD_FOG_TABLE ) { + grFogTable( fxMesa->Fog.Table ); + fxMesa->dirty &= ~TDFX_UPLOAD_FOG_TABLE; + } + + if ( fxMesa->dirty & TDFX_UPLOAD_CULL ) { + grCullMode( fxMesa->CullMode ); + fxMesa->dirty &= ~TDFX_UPLOAD_CULL; + } + + if ( fxMesa->dirty & TDFX_UPLOAD_CLIP ) { + tdfxUploadClipping( fxMesa ); + fxMesa->dirty &= ~TDFX_UPLOAD_CLIP; + } + + if ( fxMesa->dirty & TDFX_UPLOAD_COLOR_MASK ) { + if ( grColorMaskExtProc && fxMesa->glCtx->Visual->RedBits == 8) { + grColorMaskExtProc( fxMesa->Color.ColorMask[RCOMP], + fxMesa->Color.ColorMask[GCOMP], + fxMesa->Color.ColorMask[BCOMP], + fxMesa->Color.ColorMask[ACOMP] ); + } else { + grColorMask( fxMesa->Color.ColorMask[RCOMP] || + fxMesa->Color.ColorMask[GCOMP] || + fxMesa->Color.ColorMask[BCOMP], + fxMesa->Color.ColorMask[ACOMP] ); + } + fxMesa->dirty &= ~TDFX_UPLOAD_COLOR_MASK; + } + + if ( fxMesa->dirty & TDFX_UPLOAD_CONSTANT_COLOR ) { + grConstantColorValue( fxMesa->Color.MonoColor ); + fxMesa->dirty &= ~TDFX_UPLOAD_CONSTANT_COLOR; + } + + if ( fxMesa->dirty & TDFX_UPLOAD_LINE ) { + if (fxMesa->glCtx->Line.SmoothFlag && fxMesa->glCtx->Line.Width == 1.0) + grEnable(GR_AA_ORDERED); + else + grDisable(GR_AA_ORDERED); + fxMesa->dirty &= ~TDFX_UPLOAD_LINE; + } + + if ( fxMesa->dirty & TDFX_UPLOAD_STENCIL ) { + if (fxMesa->glCtx->Stencil.Enabled) { + grEnable(GR_STENCIL_MODE_EXT); + FX_grStencilOp_NoLock(fxMesa->Stencil.FailFunc, + fxMesa->Stencil.ZFailFunc, + fxMesa->Stencil.ZPassFunc); + FX_grStencilFunc_NoLock(fxMesa->Stencil.Function, + fxMesa->Stencil.RefValue, + fxMesa->Stencil.ValueMask); + FX_grStencilMask_NoLock(fxMesa->Stencil.WriteMask); + } + else { + grDisable(GR_STENCIL_MODE_EXT); + } + fxMesa->dirty &= ~TDFX_UPLOAD_STENCIL; + } + + if ( fxMesa->dirty & TDFX_UPLOAD_VERTEX_LAYOUT ) { + grGlideSetVertexLayout( fxMesa->layout[fxMesa->vertexFormat] ); + fxMesa->dirty &= ~TDFX_UPLOAD_VERTEX_LAYOUT; + } + + if ( fxMesa->dirty & TDFX_UPLOAD_TEXTURE_ENV ) { + uploadTextureEnv(fxMesa); + fxMesa->dirty &= ~TDFX_UPLOAD_TEXTURE_ENV; + } + + if ( fxMesa->dirty & TDFX_UPLOAD_TEXTURE_PARAMS ) { + uploadTextureParams(fxMesa); + fxMesa->dirty &= ~TDFX_UPLOAD_TEXTURE_PARAMS; + } + + if ( fxMesa->dirty & TDFX_UPLOAD_TEXTURE_PALETTE ) { + if (fxMesa->TexPalette.Data) { + grTexDownloadTable(fxMesa->TexPalette.Type, fxMesa->TexPalette.Data); + } + fxMesa->dirty &= ~TDFX_UPLOAD_TEXTURE_PALETTE; + } + + if ( fxMesa->dirty & TDFX_UPLOAD_TEXTURE_SOURCE ) { + uploadTextureSource(fxMesa); + fxMesa->dirty &= ~TDFX_UPLOAD_TEXTURE_SOURCE; + } + + if ( fxMesa->dirty & TDFX_UPLOAD_TEXTURE_IMAGES ) { + uploadTextureImages(fxMesa); + fxMesa->dirty &= ~TDFX_UPLOAD_TEXTURE_IMAGES; + } + + fxMesa->dirty = 0; +} + + + +void tdfxDDInitRenderFuncs( GLcontext *ctx ) +{ + ctx->Driver.Clear = tdfxDDClear; + ctx->Driver.Finish = tdfxDDFinish; + ctx->Driver.Flush = tdfxDDFlush; +} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.h:1.1 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.h Wed Mar 21 11:14:28 2001 @@ -0,0 +1,54 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * + */ + +#ifndef __TDFX_RENDER_H__ +#define __TDFX_RENDER_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "tdfx_context.h" + +extern void tdfxDDInitRenderFuncs( GLcontext *ctx ); + +extern void tdfxEmitHwStateLocked( tdfxContextPtr fxMesa ); + +extern void tdfxUploadClipping( tdfxContextPtr fxMesa ); + +#define FLUSH_BATCH( fxMesa ) + + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c:1.1 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c Wed Mar 21 11:14:28 2001 @@ -0,0 +1,106 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * + */ + +#include + +#include "tdfx_dri.h" +#include "tdfx_context.h" +#include "tdfx_vb.h" +#include "tdfx_tris.h" +#include "tdfx_pipeline.h" + + +#ifdef DEBUG_LOCKING +char *prevLockFile = 0; +int prevLockLine = 0; +#endif + + +GLboolean tdfxCreateScreen( __DRIscreenPrivate *sPriv ) +{ + tdfxScreenPrivate *fxScreen; + TDFXDRIPtr fxDRIPriv = (TDFXDRIPtr) sPriv->pDevPriv; + + /* Allocate the private area */ + fxScreen = (tdfxScreenPrivate *) Xmalloc( sizeof(tdfxScreenPrivate) ); + if ( !fxScreen ) + return GL_FALSE; + + fxScreen->driScrnPriv = sPriv; + sPriv->private = (void *) fxScreen; + + fxScreen->regs.handle = fxDRIPriv->regs; + fxScreen->regs.size = fxDRIPriv->regsSize; + fxScreen->deviceID = fxDRIPriv->deviceID; + fxScreen->width = fxDRIPriv->width; + fxScreen->height = fxDRIPriv->height; + fxScreen->mem = fxDRIPriv->mem; + fxScreen->cpp = fxDRIPriv->cpp; + fxScreen->stride = fxDRIPriv->stride; + fxScreen->fifoOffset = fxDRIPriv->fifoOffset; + fxScreen->fifoSize = fxDRIPriv->fifoSize; + fxScreen->fbOffset = fxDRIPriv->fbOffset; + fxScreen->backOffset = fxDRIPriv->backOffset; + fxScreen->depthOffset = fxDRIPriv->depthOffset; + fxScreen->textureOffset = fxDRIPriv->textureOffset; + fxScreen->textureSize = fxDRIPriv->textureSize; + fxScreen->sarea_priv_offset = fxDRIPriv->sarea_priv_offset; + + if ( drmMap( sPriv->fd, fxScreen->regs.handle, + fxScreen->regs.size, &fxScreen->regs.map ) ) { + return GL_FALSE; + } + + tdfxDDSetupInit(); + tdfxDDTriangleFuncsInit(); + tdfxDDFastPathInit(); + + tdfxDDGlideExtensionsInit(); + + return GL_TRUE; +} + +void tdfxDestroyScreen( __DRIscreenPrivate *sPriv ) +{ + tdfxScreenPrivate *fxScreen = (tdfxScreenPrivate *) sPriv->private; + + if ( fxScreen ) { + drmUnmap( fxScreen->regs.map, fxScreen->regs.size ); + + Xfree( fxScreen ); + sPriv->private = NULL; + } +} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.h:1.1 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.h Wed Mar 21 11:14:28 2001 @@ -0,0 +1,78 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * + */ + +#ifndef __TDFX_SCREEN_H__ +#define __TDFX_SCREEN_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "dri_mesaint.h" + +typedef struct { + drmHandle handle; + drmSize size; + drmAddress map; +} tdfxRegion, *tdfxRegionPtr; + +typedef struct { + tdfxRegion regs; + + int deviceID; + int width; + int height; + int mem; + int cpp; + int stride; + + int fifoOffset; + int fifoSize; + + int fbOffset; + int backOffset; + int depthOffset; + int textureOffset; + int textureSize; + + __DRIscreenPrivate *driScrnPriv; + unsigned int sarea_priv_offset; +} tdfxScreenPrivate; + + +extern GLboolean tdfxCreateScreen( __DRIscreenPrivate *driScrnPriv ); +extern void tdfxDestroyScreen( __DRIscreenPrivate *driScrnPriv ); + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.c diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.c:1.1 --- /dev/null Mon Jun 4 12:37:40 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.c Wed Mar 21 11:14:28 2001 @@ -0,0 +1,1335 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * Keith Whitwell + * + */ + +#include "tdfx_context.h" +#include "tdfx_span.h" +#include "tdfx_render.h" + + +#define DBG 0 + + +#define LOCAL_VARS \ + __DRIdrawablePrivate *dPriv = fxMesa->driDrawable; \ + tdfxScreenPrivate *fxPriv = fxMesa->fxScreen; \ + GLuint pitch = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) \ + ? (fxMesa->screen_width * BYTESPERPIXEL) : \ + (info.strideInBytes); \ + GLuint height = fxMesa->height; \ + char *buf = (char *)((char *)info.lfbPtr + \ + dPriv->x * fxPriv->cpp + \ + dPriv->y * pitch); \ + GLuint p; \ + (void) buf; (void) p; + + +#define INIT_MONO_PIXEL( p ) p = fxMesa->Color.MonoColor; + +#define CLIPPIXEL( _x, _y ) ( _x >= minx && _x < maxx && \ + _y >= miny && _y < maxy ) + +#define CLIPSPAN( _x, _y, _n, _x1, _n1, _i ) \ + if ( _y < miny || _y >= maxy ) { \ + _n1 = 0, _x1 = x; \ + } else { \ + _n1 = _n; \ + _x1 = _x; \ + if ( _x1 < minx ) _i += (minx-_x1), n1 -= (minx-_x1), _x1 = minx; \ + if ( _x1 + _n1 >= maxx ) n1 -= (_x1 + n1 - maxx); \ + } + +#define Y_FLIP(_y) (height - _y - 1) + + +#define HW_WRITE_LOCK() \ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); \ + GrLfbInfo_t info; \ + FLUSH_BATCH( fxMesa ); \ + UNLOCK_HARDWARE( fxMesa ); \ + LOCK_HARDWARE( fxMesa ); \ + info.size = sizeof(GrLfbInfo_t); \ + if ( grLfbLock( GR_LFB_WRITE_ONLY, fxMesa->DrawBuffer, LFB_MODE, \ + GR_ORIGIN_UPPER_LEFT, FXFALSE, &info ) ) \ + { + +#define HW_WRITE_UNLOCK() \ + grLfbUnlock( GR_LFB_WRITE_ONLY, fxMesa->DrawBuffer ); \ + } + + +#define HW_READ_LOCK() \ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); \ + GrLfbInfo_t info; \ + FLUSH_BATCH( fxMesa ); \ + UNLOCK_HARDWARE( fxMesa ); \ + LOCK_HARDWARE( fxMesa ); \ + info.size = sizeof(GrLfbInfo_t); \ + if ( grLfbLock( GR_LFB_READ_ONLY, fxMesa->ReadBuffer, LFB_MODE, \ + GR_ORIGIN_UPPER_LEFT, FXFALSE, &info ) ) \ + { + +#define HW_READ_UNLOCK() \ + grLfbUnlock( GR_LFB_READ_ONLY, fxMesa->ReadBuffer ); \ + } + + +#define HW_WRITE_CLIPLOOP() \ + do { \ + int _nc = fxMesa->numClipRects; \ + while (_nc--) { \ + int minx = fxMesa->pClipRects[_nc].x1 - fxMesa->x_offset; \ + int miny = fxMesa->pClipRects[_nc].y1 - fxMesa->y_offset; \ + int maxx = fxMesa->pClipRects[_nc].x2 - fxMesa->x_offset; \ + int maxy = fxMesa->pClipRects[_nc].y2 - fxMesa->y_offset; + +#define HW_READ_CLIPLOOP() \ + do { \ + const __DRIdrawablePrivate *dPriv = fxMesa->driDrawable; \ + XF86DRIClipRectPtr rect = dPriv->pClipRects; \ + int _nc = dPriv->numClipRects; \ + while (_nc--) { \ + const int minx = rect->x1 - fxMesa->x_offset; \ + const int miny = rect->y1 - fxMesa->y_offset; \ + const int maxx = rect->x2 - fxMesa->x_offset; \ + const int maxy = rect->y2 - fxMesa->y_offset; \ + rect++; + +#define HW_ENDCLIPLOOP() \ + } \ + } while (0) + + + +#define LFB_MODE GR_LFBWRITEMODE_565 + + +/* 16 bit, RGB565 color spanline and pixel functions */ \ + +#define WRITE_RGBA( _x, _y, r, g, b, a ) \ + *(GLushort *)(buf + _x*2 + _y*pitch) = ((((int)r & 0xf8) << 8) | \ + (((int)g & 0xfc) << 3) | \ + (((int)b & 0xf8) >> 3)) + +#define WRITE_PIXEL( _x, _y, p ) \ + *(GLushort *)(buf + _x*2 + _y*pitch) = p + +#define READ_RGBA( rgba, _x, _y ) \ + do { \ + GLushort p = *(GLushort *)(buf + _x*2 + _y*pitch); \ + rgba[0] = (((p >> 11) & 0x1f) * 255) / 31; \ + rgba[1] = (((p >> 5) & 0x3f) * 255) / 63; \ + rgba[2] = (((p >> 0) & 0x1f) * 255) / 31; \ + rgba[3] = 0xff; \ + } while (0) + +#define TAG(x) tdfx##x##_RGB565 +#define BYTESPERPIXEL 2 +#include "spantmp.h" +#undef BYTESPERPIXEL + + +/* 16 bit, BGR565 color spanline and pixel functions */ \ +#if 0 + +#define WRITE_RGBA( _x, _y, r, g, b, a ) \ + *(GLushort *)(buf + _x*2 + _y*pitch) = ((((int)b & 0xf8) << 8) | \ + (((int)g & 0xfc) << 3) | \ + (((int)r & 0xf8) >> 3)) + +#define WRITE_PIXEL( _x, _y, p ) \ + *(GLushort *)(buf + _x*2 + _y*pitch) = p + +#define READ_RGBA( rgba, _x, _y ) \ + do { \ + GLushort p = *(GLushort *)(buf + _x*2 + _y*pitch); \ + rgba[0] = (p << 3) & 0xf8; \ + rgba[1] = (p >> 3) & 0xfc; \ + rgba[2] = (p >> 8) & 0xf8; \ + rgba[3] = 0xff; \ + } while (0) + +#define TAG(x) tdfx##x##_BGR565 +#define BYTESPERPIXEL 2 +#include "spantmp.h" +#undef BYTESPERPIXEL +#endif + + +#undef LFB_MODE +#define LFB_MODE GR_LFBWRITEMODE_888 + + +/* 24 bit, RGB888 color spanline and pixel functions */ +#define WRITE_RGBA( _x, _y, r, g, b, a ) \ + *(GLuint *)(buf + _x*3 + _y*pitch) = ((b << 0) | \ + (g << 8) | \ + (r << 16)) + +#define WRITE_PIXEL( _x, _y, p ) \ + *(GLuint *)(buf + _x*3 + _y*pitch) = p + +#define READ_RGBA( rgba, _x, _y ) \ +do { \ + GLuint p = *(GLuint *)(buf + _x*3 + _y*pitch); \ + rgba[0] = (p >> 16) & 0xff; \ + rgba[1] = (p >> 8) & 0xff; \ + rgba[2] = (p >> 0) & 0xff; \ + rgba[3] = 0xff; \ +} while (0) + +#define TAG(x) tdfx##x##_RGB888 +#define BYTESPERPIXEL 4 +#include "spantmp.h" +#undef BYTESPERPIXEL + + +#undef LFB_MODE +#define LFB_MODE GR_LFBWRITEMODE_8888 + + +/* 32 bit, ARGB8888 color spanline and pixel functions */ +#define WRITE_RGBA( _x, _y, r, g, b, a ) \ + *(GLuint *)(buf + _x*4 + _y*pitch) = ((b << 0) | \ + (g << 8) | \ + (r << 16) | \ + (a << 24) ) + +#define WRITE_PIXEL( _x, _y, p ) \ + *(GLuint *)(buf + _x*4 + _y*pitch) = p + +#define READ_RGBA( rgba, _x, _y ) \ +do { \ + GLuint p = *(GLuint *)(buf + _x*4 + _y*pitch); \ + rgba[0] = (p >> 16) & 0xff; \ + rgba[1] = (p >> 8) & 0xff; \ + rgba[2] = (p >> 0) & 0xff; \ + rgba[3] = (p >> 24) & 0xff; \ +} while (0) + +#define TAG(x) tdfx##x##_ARGB8888 +#define BYTESPERPIXEL 4 +#include "spantmp.h" +#undef BYTESPERPIXEL + + + +/* ================================================================ + * Old span functions below... + */ + + +/* + * Examine the cliprects to generate an array of flags to indicate + * which pixels in a span are visible. Note: (x,y) is a screen + * coordinate. + */ +static void +generate_vismask(const tdfxContextPtr fxMesa, GLint x, GLint y, GLint n, + GLubyte vismask[]) +{ + GLboolean initialized = GL_FALSE; + GLint i, j; + + /* Ensure we clear the visual mask */ + MEMSET(vismask, 0, n); + + /* turn on flags for all visible pixels */ + for (i = 0; i < fxMesa->numClipRects; i++) { + const XF86DRIClipRectPtr rect = &fxMesa->pClipRects[i]; + + if (y >= rect->y1 && y < rect->y2) { + if (x >= rect->x1 && x + n <= rect->x2) { + /* common case, whole span inside cliprect */ + MEMSET(vismask, 1, n); + return; + } + if (x < rect->x2 && x + n >= rect->x1) { + /* some of the span is inside the rect */ + GLint start, end; + if (!initialized) { + MEMSET(vismask, 0, n); + initialized = GL_TRUE; + } + if (x < rect->x1) + start = rect->x1 - x; + else + start = 0; + if (x + n > rect->x2) + end = rect->x2 - x; + else + end = n; + assert(start >= 0); + assert(end <= n); + for (j = start; j < end; j++) + vismask[j] = 1; + } + } + } +} + +/* + * Examine cliprects and determine if the given screen pixel is visible. + */ +static GLboolean +visible_pixel(const tdfxContextPtr fxMesa, int scrX, int scrY) +{ + int i; + for (i = 0; i < fxMesa->numClipRects; i++) { + const XF86DRIClipRectPtr rect = &fxMesa->pClipRects[i]; + if (scrX >= rect->x1 && + scrX < rect->x2 && + scrY >= rect->y1 && scrY < rect->y2) return GL_TRUE; + } + return GL_FALSE; +} + + + +/* + * Depth buffer read/write functions. + */ +/* + * To read the frame buffer, we need to lock and unlock it. The + * four macros {READ,WRITE}_FB_SPAN_{LOCK,UNLOCK} + * do this for us. + * + * Note that the lock must be matched with an unlock. These + * macros include a spare curly brace, so they must + * be syntactically matched. + * + * Note, also, that you can't lock a buffer twice with different + * modes. That is to say, you can't lock a buffer in both read + * and write modes. The strideInBytes and LFB pointer will be + * the same with read and write locks, so you can use either. + * o The HW has different state for reads and writes, so + * locking it twice may give screwy results. + * o The DRM won't let you lock twice. It hangs. This is probably + * because of the LOCK_HARDWARE IN THE *_FB_SPAN_LOCK macros, + * and could be eliminated with nonlocking lock routines. But + * what's the point after all. + */ +#define READ_FB_SPAN_LOCK(fxMesa, info, target_buffer) \ + UNLOCK_HARDWARE(fxMesa); \ + LOCK_HARDWARE(fxMesa); \ + (info).size=sizeof(info); \ + if (grLfbLock(GR_LFB_READ_ONLY, \ + target_buffer, \ + GR_LFBWRITEMODE_ANY, \ + GR_ORIGIN_UPPER_LEFT, \ + FXFALSE, \ + &(info))) { + +#define READ_FB_SPAN_UNLOCK(fxMesa, target_buffer) \ + grLfbUnlock(GR_LFB_READ_ONLY, target_buffer); \ + } else { \ + fprintf(stderr, "tdfxDriver: Can't get %s (%d) read lock\n", \ + (target_buffer == GR_BUFFER_BACKBUFFER) \ + ? "back buffer" \ + : ((target_buffer == GR_BUFFER_AUXBUFFER) \ + ? "depth buffer" \ + : "unknown buffer"), \ + target_buffer); \ + } + +#define WRITE_FB_SPAN_LOCK(fxMesa, info, target_buffer, write_mode) \ + UNLOCK_HARDWARE(fxMesa); \ + LOCK_HARDWARE(fxMesa); \ + info.size=sizeof(info); \ + if (grLfbLock(GR_LFB_WRITE_ONLY, \ + target_buffer, \ + write_mode, \ + GR_ORIGIN_UPPER_LEFT, \ + FXFALSE, \ + &info)) { + +#define WRITE_FB_SPAN_UNLOCK(fxMesa, target_buffer) \ + grLfbUnlock(GR_LFB_WRITE_ONLY, target_buffer); \ + } else { \ + fprintf(stderr, "tdfxDriver: Can't get %s (%d) write lock\n", \ + (target_buffer == GR_BUFFER_BACKBUFFER) \ + ? "back buffer" \ + : ((target_buffer == GR_BUFFER_AUXBUFFER) \ + ? "depth buffer" \ + : "unknown buffer"), \ + target_buffer); \ + } + +/* + * Because the Linear Frame Buffer is not necessarily aligned + * with the depth buffer, we have to do some fiddling + * around to get the right addresses. + * + * Perhaps a picture is in order. The Linear Frame Buffer + * looks like this: + * + * |<----------------------info.strideInBytes------------->| + * |<-----physicalStrideInBytes------->| + * +-----------------------------------+xxxxxxxxxxxxxxxxxxx+ + * | | | + * | Legal Memory | Forbidden Zone | + * | | | + * +-----------------------------------+xxxxxxxxxxxxxxxxxxx+ + * + * You can only reliably read and write legal locations. Reads + * and writes from the Forbidden Zone will return undefined values, + * and may cause segmentation faults. + * + * Now, the depth buffer may not end up in a location such each + * scan line is an LFB line. For example, the depth buffer may + * look like this: + * + * wrapped ordinary. + * +-----------------------------------+xxxxxxxxxxxxxxxxxxx+ + * |0000000000000000000000 | | back + * |1111111111111111111111 | | buffer + * |2222222222222222222222 | | + * |4096b align. padxx00000000000000000| Forbidden Zone | depth + * |0000 11111111111111111| | buffer + * |1111 22222222222222222| | + * |2222 | | + * +-----------------------------------+xxxxxxxxxxxxxxxxxxx+ + * where each number is the scan line number. We know it will + * be aligned on 128 byte boundaries, at least. Aligning this + * on a scanline boundary causes the back and depth buffers to + * thrash in the SST1 cache. (Note that the back buffer is always + * allocated at the beginning of LFB memory, and so it is always + * properly aligned with the LFB stride.) + * + * We call the beginning of the line (which is the rightmost + * part of the depth line in the picture above) the *ordinary* part + * of the scanline, and the end of the line (which is the + * leftmost part, one line below) the *wrapped* part of the scanline. + * a.) We need to know what x value to subtract from the screen + * x coordinate to index into the wrapped part. + * b.) We also need to figure out if we need to read from the ordinary + * part scan line, or from the wrapped part of the scan line. + * + * [ad a] + * The first wrapped x coordinate is that coordinate such that + * depthBufferOffset&(info.strideInBytes) + x*elmentSize {*} + * > physicalStrideInBytes + * where depthBufferOffset is the LFB distance in bytes + * from the back buffer to the depth buffer. The expression + * depthBufferOffset&(info.strideInBytes) + * is then the offset (in bytes) from the beginining of (any) + * depth buffer line to first element in the line. + * Simplifying inequation {*} above we see that x is the smallest + * value such that + * x*elementSize > physicalStrideInBytes {**} + * - depthBufferOffset&(info.strideInBytes) + * Now, we know that both the summands on the right are multiples of + * 128, and elementSize <= 4, so if equality holds in {**}, x would + * be a multiple of 32. Thus we can set x to + * xwrapped = (physicalStrideInBytes + * - depthBufferOffset&(info.strideInBytes))/elementSize + * + 1 + * + * [ad b] + * Question b is now simple. We read from the wrapped scan line if + * x is greater than xwrapped. + */ +#define TILE_WIDTH_IN_BYTES 128 +#define TILE_WIDTH_IN_ZOXELS(bpz) (TILE_WIDTH_IN_BYTES/(bpz)) +#define TILE_HEIGHT_IN_LINES 32 +typedef struct +{ + void *lfbPtr; + void *lfbWrapPtr; + FxU32 LFBStrideInElts; + GLint firstWrappedX; +} +LFBParameters; + +/* + * We need information about the back buffer. Note that + * this function *cannot be called* while the aux buffer + * is locked, or the caller will hang. + * + * Only Glide knows the LFB address of the back and depth + * offsets. The upper levels of Mesa know the depth offset, + * but that is not in LFB space, it is tiled memory space, + * and is not useable for us. + */ +static void +GetBackBufferInfo(tdfxContextPtr fxMesa, GrLfbInfo_t * backBufferInfo) +{ + READ_FB_SPAN_LOCK(fxMesa, *backBufferInfo, GR_BUFFER_BACKBUFFER); + READ_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_BACKBUFFER); +} + +static void +GetFbParams(tdfxContextPtr fxMesa, + GrLfbInfo_t * info, + GrLfbInfo_t * backBufferInfo, + LFBParameters * ReadParamsp, FxU32 elementSize) +{ + FxU32 physicalStrideInBytes, bufferOffset; + FxU32 strideInBytes = info->strideInBytes; + char *lfbPtr = (char *) (info->lfbPtr); /* For arithmetic, use char * */ + + /* + * These two come directly from the info structure. + */ + ReadParamsp->lfbPtr = (void *) lfbPtr; + ReadParamsp->LFBStrideInElts = strideInBytes / elementSize; + /* + * Now, calculate the value of firstWrappedX. + * + * The physical stride is the screen width in bytes rounded up to + * the next highest multiple of 128 bytes. Note that this fails + * when TILE_WIDTH_IN_BYTES is not a power of two. + * + * The buffer Offset is the distance between the beginning of + * the LFB space, which is the beginning of the back buffer, + * and the buffer we are gathering information about. + * We want to make this routine usable for operations on the + * back buffer, though we don't actually use it on the back + * buffer. Note, then, that if bufferOffset == 0, the firstWrappedX + * is in the forbidden zone, and is therefore never reached. + * + * Note that if + * physicalStrideInBytes + * < bufferOffset&(info->strideInBytes-1) + * the buffer begins in the forbidden zone. We assert for this. + */ + bufferOffset = (FxU32)(lfbPtr - (char *) backBufferInfo->lfbPtr); + physicalStrideInBytes + = (fxMesa->screen_width * elementSize + TILE_WIDTH_IN_BYTES - 1) + & ~(TILE_WIDTH_IN_BYTES - 1); + assert(physicalStrideInBytes > (bufferOffset & (strideInBytes - 1))); + ReadParamsp->firstWrappedX + = (physicalStrideInBytes + - (bufferOffset & (strideInBytes - 1))) / elementSize; + /* + * This is the address of the next physical line. + */ + ReadParamsp->lfbWrapPtr + = (void *) ((char *) backBufferInfo->lfbPtr + + (bufferOffset & ~(strideInBytes - 1)) + + (TILE_HEIGHT_IN_LINES) * strideInBytes); +} + +/* + * These macros fetch data from the frame buffer. The type is + * the type of data we want to fetch. It should match the type + * whose size was used with GetFbParams to fill in the structure + * in *ReadParamsp. We have a macro to read the ordinary + * part, a second macro to read the wrapped part, and one which + * will do either. When we are reading a span, we will know + * when the ordinary part ends, so there's no need to test for + * it. However, when reading and writing pixels, we don't + * necessarily know. I suppose it's a matter of taste whether + * it's better in the macro or in the call. + * + * Recall that x and y are screen coordinates. + */ +#define GET_FB_DATA(ReadParamsp, type, x, y) \ + (((x) < (ReadParamsp)->firstWrappedX) \ + ? (((type *)((ReadParamsp)->lfbPtr)) \ + [(y) * ((ReadParamsp)->LFBStrideInElts) \ + + (x)]) \ + : (((type *)((ReadParamsp)->lfbWrapPtr)) \ + [((y)) * ((ReadParamsp)->LFBStrideInElts) \ + + ((x) - (ReadParamsp)->firstWrappedX)])) +#define GET_ORDINARY_FB_DATA(ReadParamsp, type, x, y) \ + (((type *)((ReadParamsp)->lfbPtr)) \ + [(y) * ((ReadParamsp)->LFBStrideInElts) \ + + (x)]) +#define GET_WRAPPED_FB_DATA(ReadParamsp, type, x, y) \ + (((type *)((ReadParamsp)->lfbWrapPtr)) \ + [((y)) * ((ReadParamsp)->LFBStrideInElts) \ + + ((x) - (ReadParamsp)->firstWrappedX)]) +#define PUT_FB_DATA(ReadParamsp, type, x, y, value) \ + (GET_FB_DATA(ReadParamsp, type, x, y) = (type)(value)) +#define PUT_ORDINARY_FB_DATA(ReadParamsp, type, x, y, value) \ + (GET_ORDINARY_FB_DATA(ReadParamsp, type, x, y) = (type)(value)) +#define PUT_WRAPPED_FB_DATA(ReadParamsp, type, x, y, value) \ + (GET_WRAPPED_FB_DATA(ReadParamsp, type, x, y) = (type)(value)) + +static void +tdfxDDWriteDepthSpan(GLcontext * ctx, + GLuint n, GLint x, GLint y, const GLdepth depth[], + const GLubyte mask[]) +{ + tdfxContextPtr fxMesa = (tdfxContextPtr) ctx->DriverCtx; + GLint bottom = fxMesa->y_offset + fxMesa->height - 1; + GLuint depth_size = fxMesa->glVis->DepthBits; + GLuint stencil_size = fxMesa->glVis->StencilBits; + GrLfbInfo_t info; + GLubyte visMask[MAX_WIDTH]; + + if (MESA_VERBOSE & VERBOSE_DRIVER) { + fprintf(stderr, "tdfxmesa: tdfxDDWriteDepthSpan(...)\n"); + } + + assert((depth_size == 16) || (depth_size == 24) || (depth_size == 32)); + /* + * Convert x and y to screen coordinates. + */ + x += fxMesa->x_offset; + y = bottom - y; + if (mask) { + GLint i; + GLushort d16; + GrLfbInfo_t backBufferInfo; + + switch (depth_size) { + case 16: + GetBackBufferInfo(fxMesa, &backBufferInfo); + /* + * Note that the _LOCK macro adds a curly brace, + * and the UNLOCK macro removes it. + */ + WRITE_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER, + GR_LFBWRITEMODE_ANY); + generate_vismask(fxMesa, x, y, n, visMask); + { + LFBParameters ReadParams; + int wrappedPartStart; + GetFbParams(fxMesa, &info, &backBufferInfo, + &ReadParams, sizeof(GLushort)); + if (ReadParams.firstWrappedX <= x) { + wrappedPartStart = 0; + } + else if (n <= (ReadParams.firstWrappedX - x)) { + wrappedPartStart = n; + } + else { + wrappedPartStart = (ReadParams.firstWrappedX - x); + } + for (i = 0; i < wrappedPartStart; i++) { + if (mask[i] && visMask[i]) { + d16 = depth[i]; + PUT_ORDINARY_FB_DATA(&ReadParams, GLushort, x + i, y, d16); + } + } + for (; i < n; i++) { + if (mask[i] && visMask[i]) { + d16 = depth[i]; + PUT_WRAPPED_FB_DATA(&ReadParams, GLushort, x + i, y, d16); + } + } + } + WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); + break; + case 24: + case 32: + GetBackBufferInfo(fxMesa, &backBufferInfo); + /* + * Note that the _LOCK macro adds a curly brace, + * and the UNLOCK macro removes it. + */ + WRITE_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER, + GR_LFBWRITEMODE_ANY); + generate_vismask(fxMesa, x, y, n, visMask); + { + LFBParameters ReadParams; + int wrappedPartStart; + GetFbParams(fxMesa, &info, &backBufferInfo, + &ReadParams, sizeof(GLuint)); + if (ReadParams.firstWrappedX <= x) { + wrappedPartStart = 0; + } + else if (n <= (ReadParams.firstWrappedX - x)) { + wrappedPartStart = n; + } + else { + wrappedPartStart = (ReadParams.firstWrappedX - x); + } + for (i = 0; i < wrappedPartStart; i++) { + GLuint d32; + if (mask[i] && visMask[i]) { + if (stencil_size > 0) { + d32 = + GET_ORDINARY_FB_DATA(&ReadParams, GLuint, + x + i, y); + d32 = + (d32 & 0xFF000000) | (depth[i] & 0x00FFFFFF); + } + else { + d32 = depth[i]; + } + PUT_ORDINARY_FB_DATA(&ReadParams, GLuint, x + i, y, d32); + } + } + for (; i < n; i++) { + GLuint d32; + if (mask[i] && visMask[i]) { + if (stencil_size > 0) { + d32 = + GET_WRAPPED_FB_DATA(&ReadParams, GLuint, + x + i, y); + d32 = + (d32 & 0xFF000000) | (depth[i] & 0x00FFFFFF); + } + else { + d32 = depth[i]; + } + PUT_WRAPPED_FB_DATA(&ReadParams, GLuint, x + i, y, d32); + } + } + } + WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); + break; + } + } + else { + GLint i; + GLuint d32; + GLushort d16; + GrLfbInfo_t backBufferInfo; + + switch (depth_size) { + case 16: + GetBackBufferInfo(fxMesa, &backBufferInfo); + /* + * Note that the _LOCK macro adds a curly brace, + * and the UNLOCK macro removes it. + */ + WRITE_FB_SPAN_LOCK(fxMesa, info, + GR_BUFFER_AUXBUFFER, GR_LFBWRITEMODE_ANY); + generate_vismask(fxMesa, x, y, n, visMask); + { + LFBParameters ReadParams; + GLuint wrappedPartStart; + GetFbParams(fxMesa, &info, &backBufferInfo, + &ReadParams, sizeof(GLushort)); + if (ReadParams.firstWrappedX <= x) { + wrappedPartStart = 0; + } + else if (n <= (ReadParams.firstWrappedX - x)) { + wrappedPartStart = n; + } + else { + wrappedPartStart = (ReadParams.firstWrappedX - x); + } + for (i = 0; i < wrappedPartStart; i++) { + if (visMask[i]) { + d16 = depth[i]; + PUT_ORDINARY_FB_DATA(&ReadParams, + GLushort, + x + i, y, + d16); + } + } + for (; i < n; i++) { + if (visMask[i]) { + d16 = depth[i]; + PUT_WRAPPED_FB_DATA(&ReadParams, + GLushort, + x + i, y, + d16); + } + } + } + WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); + break; + case 24: + case 32: + GetBackBufferInfo(fxMesa, &backBufferInfo); + /* + * Note that the _LOCK macro adds a curly brace, + * and the UNLOCK macro removes it. + */ + WRITE_FB_SPAN_LOCK(fxMesa, info, + GR_BUFFER_AUXBUFFER, GR_LFBWRITEMODE_ANY); + generate_vismask(fxMesa, x, y, n, visMask); + { + LFBParameters ReadParams; + GLuint wrappedPartStart; + + GetFbParams(fxMesa, &info, &backBufferInfo, + &ReadParams, sizeof(GLuint)); + if (ReadParams.firstWrappedX <= x) { + wrappedPartStart = 0; + } + else if (n <= (ReadParams.firstWrappedX - x)) { + wrappedPartStart = n; + } + else { + wrappedPartStart = (ReadParams.firstWrappedX - x); + } + for (i = 0; i < wrappedPartStart; i++) { + if (visMask[i]) { + if (stencil_size > 0) { + d32 = GET_ORDINARY_FB_DATA(&ReadParams, GLuint, x + i, y); + d32 = + (d32 & 0xFF000000) | (depth[i] & 0x00FFFFFF); + } + else { + d32 = depth[i]; + } + PUT_ORDINARY_FB_DATA(&ReadParams, GLuint, x + i, y, d32); + } + } + for (; i < n; i++) { + if (visMask[i]) { + if (stencil_size > 0) { + d32 = GET_WRAPPED_FB_DATA(&ReadParams, GLuint, x + i, y); + d32 = + (d32 & 0xFF000000) | (depth[i] & 0x00FFFFFF); + } + else { + d32 = depth[i]; + } + PUT_WRAPPED_FB_DATA(&ReadParams, GLuint, x + i, y, d32); + } + } + } + WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); + break; + } + } +} + +static void +tdfxDDReadDepthSpan(GLcontext * ctx, + GLuint n, GLint x, GLint y, GLdepth depth[]) +{ + tdfxContextPtr fxMesa = (tdfxContextPtr) ctx->DriverCtx; + GLint bottom = fxMesa->height + fxMesa->y_offset - 1; + GLuint i; + GLuint depth_size = fxMesa->glVis->DepthBits; + GrLfbInfo_t info; + + if (MESA_VERBOSE & VERBOSE_DRIVER) { + fprintf(stderr, "tdfxmesa: tdfxDDReadDepthSpan(...)\n"); + } + + /* + * Convert to screen coordinates. + */ + x += fxMesa->x_offset; + y = bottom - y; + switch (depth_size) { + case 16: + { + LFBParameters ReadParams; + GrLfbInfo_t backBufferInfo; + int wrappedPartStart; + GetBackBufferInfo(fxMesa, &backBufferInfo); + /* + * Note that the _LOCK macro adds a curly brace, + * and the UNLOCK macro removes it. + */ + READ_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER); + GetFbParams(fxMesa, &info, &backBufferInfo, + &ReadParams, sizeof(GLushort)); + if (ReadParams.firstWrappedX <= x) { + wrappedPartStart = 0; + } + else if (n <= (ReadParams.firstWrappedX - x)) { + wrappedPartStart = n; + } + else { + wrappedPartStart = (ReadParams.firstWrappedX - x); + } + /* + * Read the line. + */ + for (i = 0; i < wrappedPartStart; i++) { + depth[i] = + GET_ORDINARY_FB_DATA(&ReadParams, GLushort, x + i, y); + } + for (; i < n; i++) { + depth[i] = GET_WRAPPED_FB_DATA(&ReadParams, GLushort, + x + i, y); + } + READ_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); + break; + } + case 24: + case 32: + { + LFBParameters ReadParams; + GrLfbInfo_t backBufferInfo; + int wrappedPartStart; + GLuint stencil_size = fxMesa->glVis->StencilBits; + GetBackBufferInfo(fxMesa, &backBufferInfo); + /* + * Note that the _LOCK macro adds a curly brace, + * and the UNLOCK macro removes it. + */ + READ_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER); + GetFbParams(fxMesa, &info, &backBufferInfo, + &ReadParams, sizeof(GLuint)); + if (ReadParams.firstWrappedX <= x) { + wrappedPartStart = 0; + } + else if (n <= (ReadParams.firstWrappedX - x)) { + wrappedPartStart = n; + } + else { + wrappedPartStart = (ReadParams.firstWrappedX - x); + } + /* + * Read the line. + */ + for (i = 0; i < wrappedPartStart; i++) { + const GLuint mask = + (stencil_size > 0) ? 0x00FFFFFF : 0xFFFFFFFF; + depth[i] = + GET_ORDINARY_FB_DATA(&ReadParams, GLuint, x + i, y); + depth[i] &= mask; + } + for (; i < n; i++) { + const GLuint mask = + (stencil_size > 0) ? 0x00FFFFFF : 0xFFFFFFFF; + depth[i] = GET_WRAPPED_FB_DATA(&ReadParams, GLuint, x + i, y); + depth[i] &= mask; + } + READ_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); + break; + } + } +} + + +static void +tdfxDDWriteDepthPixels(GLcontext * ctx, + GLuint n, const GLint x[], const GLint y[], + const GLdepth depth[], const GLubyte mask[]) +{ + tdfxContextPtr fxMesa = (tdfxContextPtr) ctx->DriverCtx; + GLint bottom = fxMesa->height + fxMesa->y_offset - 1; + GLuint i; + GLushort d16; + GLuint d32; + GLuint depth_size = fxMesa->glVis->DepthBits; + GLuint stencil_size = fxMesa->glVis->StencilBits; + GrLfbInfo_t info; + int xpos; + int ypos; + GrLfbInfo_t backBufferInfo; + + if (MESA_VERBOSE & VERBOSE_DRIVER) { + fprintf(stderr, "tdfxmesa: tdfxDDWriteDepthPixels(...)\n"); + } + + switch (depth_size) { + case 16: + GetBackBufferInfo(fxMesa, &backBufferInfo); + /* + * Note that the _LOCK macro adds a curly brace, + * and the UNLOCK macro removes it. + */ + WRITE_FB_SPAN_LOCK(fxMesa, info, + GR_BUFFER_AUXBUFFER, GR_LFBWRITEMODE_ANY); + { + LFBParameters ReadParams; + GetFbParams(fxMesa, &info, &backBufferInfo, + &ReadParams, sizeof(GLushort)); + for (i = 0; i < n; i++) { + if (mask[i] && visible_pixel(fxMesa, x[i], y[i])) { + xpos = x[i] + fxMesa->x_offset; + ypos = bottom - y[i]; + d16 = depth[i]; + PUT_FB_DATA(&ReadParams, GLushort, xpos, ypos, d16); + } + } + } + WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); + break; + case 24: + case 32: + GetBackBufferInfo(fxMesa, &backBufferInfo); + /* + * Note that the _LOCK macro adds a curly brace, + * and the UNLOCK macro removes it. + */ + WRITE_FB_SPAN_LOCK(fxMesa, info, + GR_BUFFER_AUXBUFFER, GR_LFBWRITEMODE_ANY); + { + LFBParameters ReadParams; + GetFbParams(fxMesa, &info, &backBufferInfo, + &ReadParams, sizeof(GLuint)); + for (i = 0; i < n; i++) { + if (mask[i]) { + if (visible_pixel(fxMesa, x[i], y[i])) { + xpos = x[i] + fxMesa->x_offset; + ypos = bottom - y[i]; + if (stencil_size > 0) { + d32 = + GET_FB_DATA(&ReadParams, GLuint, xpos, ypos); + d32 = (d32 & 0xFF000000) | (depth[i] & 0xFFFFFF); + } + else { + d32 = depth[i]; + } + PUT_FB_DATA(&ReadParams, GLuint, xpos, ypos, d32); + } + } + } + } + WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); + break; + } +} + + +static void +tdfxDDReadDepthPixels(GLcontext * ctx, GLuint n, + const GLint x[], const GLint y[], GLdepth depth[]) +{ + tdfxContextPtr fxMesa = (tdfxContextPtr) ctx->DriverCtx; + GLint bottom = fxMesa->height + fxMesa->y_offset - 1; + GLuint i; + GLuint depth_size = fxMesa->glVis->DepthBits; + GLushort d16; + int xpos; + int ypos; + GrLfbInfo_t info; + GLuint stencil_size; + GrLfbInfo_t backBufferInfo; + + if (MESA_VERBOSE & VERBOSE_DRIVER) { + fprintf(stderr, "tdfxmesa: tdfxDDReadDepthPixels(...)\n"); + } + + assert((depth_size == 16) || (depth_size == 24) || (depth_size == 32)); + switch (depth_size) { + case 16: + GetBackBufferInfo(fxMesa, &backBufferInfo); + /* + * Note that the _LOCK macro adds a curly brace, + * and the UNLOCK macro removes it. + */ + READ_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER); + { + LFBParameters ReadParams; + GetFbParams(fxMesa, &info, &backBufferInfo, + &ReadParams, sizeof(GLushort)); + for (i = 0; i < n; i++) { + /* + * Convert to screen coordinates. + */ + xpos = x[i] + fxMesa->x_offset; + ypos = bottom - y[i]; + d16 = GET_FB_DATA(&ReadParams, GLushort, xpos, ypos); + depth[i] = d16; + } + } + READ_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); + break; + case 24: + case 32: + GetBackBufferInfo(fxMesa, &backBufferInfo); + /* + * Note that the _LOCK macro adds a curly brace, + * and the UNLOCK macro removes it. + */ + READ_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER); + stencil_size = fxMesa->glVis->StencilBits; + { + LFBParameters ReadParams; + GetFbParams(fxMesa, &info, &backBufferInfo, + &ReadParams, sizeof(GLuint)); + for (i = 0; i < n; i++) { + GLuint d32; + + /* + * Convert to screen coordinates. + */ + xpos = x[i] + fxMesa->x_offset; + ypos = bottom - y[i]; + d32 = GET_FB_DATA(&ReadParams, GLuint, xpos, ypos); + if (stencil_size > 0) { + d32 &= 0x00FFFFFF; + } + depth[i] = d32; + } + } + READ_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); + break; + default: + assert(0); + } +} + +/* + * Stencil buffer read/write functions. + */ +#define EXTRACT_S_FROM_ZS(zs) (((zs) >> 24) & 0xFF) +#define EXTRACT_Z_FROM_ZS(zs) ((zs) & 0xffffff) +#define BUILD_ZS(z, s) (((s) << 24) | (z)) + +static void +write_stencil_span(GLcontext * ctx, GLuint n, GLint x, GLint y, + const GLstencil stencil[], const GLubyte mask[]) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GrLfbInfo_t info; + GrLfbInfo_t backBufferInfo; + + GetBackBufferInfo(fxMesa, &backBufferInfo); + /* + * Note that the _LOCK macro adds a curly brace, + * and the UNLOCK macro removes it. + */ + WRITE_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER, GR_LFBWRITEMODE_ANY); + { + const GLint winY = fxMesa->y_offset + fxMesa->height - 1; + const GLint winX = fxMesa->x_offset; + const GLint scrX = winX + x; + const GLint scrY = winY - y; + LFBParameters ReadParams; + GLubyte visMask[MAX_WIDTH]; + GLuint i; + int wrappedPartStart; + + GetFbParams(fxMesa, &info, &backBufferInfo, &ReadParams, + sizeof(GLuint)); + if (ReadParams.firstWrappedX <= x) { + wrappedPartStart = 0; + } + else if (n <= (ReadParams.firstWrappedX - x)) { + wrappedPartStart = n; + } + else { + wrappedPartStart = (ReadParams.firstWrappedX - x); + } + generate_vismask(fxMesa, scrX, scrY, n, visMask); + for (i = 0; i < wrappedPartStart; i++) { + if (visMask[i] && (!mask || mask[i])) { + GLuint z = GET_ORDINARY_FB_DATA(&ReadParams, GLuint, + scrX + i, scrY) & 0x00FFFFFF; + z |= (stencil[i] & 0xFF) << 24; + PUT_ORDINARY_FB_DATA(&ReadParams, GLuint, scrX + i, scrY, z); + } + } + for (; i < n; i++) { + if (visMask[i] && (!mask || mask[i])) { + GLuint z = GET_WRAPPED_FB_DATA(&ReadParams, GLuint, + scrX + i, scrY) & 0x00FFFFFF; + z |= (stencil[i] & 0xFF) << 24; + PUT_WRAPPED_FB_DATA(&ReadParams, GLuint, scrX + i, scrY, z); + } + } + } + WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); +} + + +static void +read_stencil_span(GLcontext * ctx, GLuint n, GLint x, GLint y, + GLstencil stencil[]) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GrLfbInfo_t info; + GrLfbInfo_t backBufferInfo; + + GetBackBufferInfo(fxMesa, &backBufferInfo); + /* + * Note that the _LOCK macro adds a curly brace, + * and the UNLOCK macro removes it. + */ + READ_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER); + { + const GLint winY = fxMesa->y_offset + fxMesa->height - 1; + const GLint winX = fxMesa->x_offset; + GLuint i; + LFBParameters ReadParams; + int wrappedPartStart; + + /* + * Convert to screen coordinates. + */ + x += winX; + y = winY - y; + GetFbParams(fxMesa, &info, &backBufferInfo, &ReadParams, + sizeof(GLuint)); + if (ReadParams.firstWrappedX <= x) { + wrappedPartStart = 0; + } + else if (n <= (ReadParams.firstWrappedX - x)) { + wrappedPartStart = n; + } + else { + wrappedPartStart = (ReadParams.firstWrappedX - x); + } + for (i = 0; i < wrappedPartStart; i++) { + stencil[i] = (GET_ORDINARY_FB_DATA(&ReadParams, GLuint, + x + i, y) >> 24) & 0xFF; + } + for (; i < n; i++) { + stencil[i] = (GET_WRAPPED_FB_DATA(&ReadParams, GLuint, + x + i, y) >> 24) & 0xFF; + } + } + READ_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); +} + + +static void +write_stencil_pixels(GLcontext * ctx, GLuint n, + const GLint x[], const GLint y[], + const GLstencil stencil[], const GLubyte mask[]) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GrLfbInfo_t info; + GrLfbInfo_t backBufferInfo; + + GetBackBufferInfo(fxMesa, &backBufferInfo); + /* + * Note that the _LOCK macro adds a curly brace, + * and the UNLOCK macro removes it. + */ + WRITE_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER, GR_LFBWRITEMODE_ANY); + { + const GLint winY = fxMesa->y_offset + fxMesa->height - 1; + const GLint winX = fxMesa->x_offset; + LFBParameters ReadParams; + GLuint i; + + GetFbParams(fxMesa, &info, &backBufferInfo, &ReadParams, + sizeof(GLuint)); + for (i = 0; i < n; i++) { + const GLint scrX = winX + x[i]; + const GLint scrY = winY - y[i]; + if ((!mask || mask[i]) && visible_pixel(fxMesa, scrX, scrY)) { + GLuint z = + GET_FB_DATA(&ReadParams, GLuint, scrX, scrY) & 0x00FFFFFF; + z |= (stencil[i] & 0xFF) << 24; + PUT_FB_DATA(&ReadParams, GLuint, scrX, scrY, z); + } + } + } + WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); +} + + +static void +read_stencil_pixels(GLcontext * ctx, GLuint n, const GLint x[], + const GLint y[], GLstencil stencil[]) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GrLfbInfo_t info; + GrLfbInfo_t backBufferInfo; + + GetBackBufferInfo(fxMesa, &backBufferInfo); + /* + * Note that the _LOCK macro adds a curly brace, + * and the UNLOCK macro removes it. + */ + READ_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER); + { + const GLint winY = fxMesa->y_offset + fxMesa->height - 1; + const GLint winX = fxMesa->x_offset; + GLuint i; + LFBParameters ReadParams; + + GetFbParams(fxMesa, &info, &backBufferInfo, &ReadParams, + sizeof(GLuint)); + for (i = 0; i < n; i++) { + const GLint scrX = winX + x[i]; + const GLint scrY = winY - y[i]; + stencil[i] = + (GET_FB_DATA(&ReadParams, GLuint, scrX, scrY) >> 24) & 0xFF; + } + } + READ_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); +} + +#define VISUAL_EQUALS_RGBA(vis, r, g, b, a) \ + ((vis->RedBits == r) && \ + (vis->GreenBits == g) && \ + (vis->BlueBits == b) && \ + (vis->AlphaBits == a)) + +void tdfxDDInitSpanFuncs( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + if ( VISUAL_EQUALS_RGBA(ctx->Visual, 5, 6, 5, 0) ) + { + /* 16bpp mode */ + ctx->Driver.WriteRGBASpan = tdfxWriteRGBASpan_RGB565; + ctx->Driver.WriteRGBSpan = tdfxWriteRGBSpan_RGB565; + ctx->Driver.WriteMonoRGBASpan = tdfxWriteMonoRGBASpan_RGB565; + ctx->Driver.WriteRGBAPixels = tdfxWriteRGBAPixels_RGB565; + ctx->Driver.WriteMonoRGBAPixels = tdfxWriteMonoRGBAPixels_RGB565; + ctx->Driver.ReadRGBASpan = tdfxReadRGBASpan_RGB565; + ctx->Driver.ReadRGBAPixels = tdfxReadRGBAPixels_RGB565; + } + else if ( VISUAL_EQUALS_RGBA(ctx->Visual, 8, 8, 8, 0) ) + { + /* 24bpp mode */ + ctx->Driver.WriteRGBASpan = tdfxWriteRGBASpan_RGB888; + ctx->Driver.WriteRGBSpan = tdfxWriteRGBSpan_RGB888; + ctx->Driver.WriteMonoRGBASpan = tdfxWriteMonoRGBASpan_RGB888; + ctx->Driver.WriteRGBAPixels = tdfxWriteRGBAPixels_RGB888; + ctx->Driver.WriteMonoRGBAPixels = tdfxWriteMonoRGBAPixels_RGB888; + ctx->Driver.ReadRGBASpan = tdfxReadRGBASpan_RGB888; + ctx->Driver.ReadRGBAPixels = tdfxReadRGBAPixels_RGB888; + } + else if ( VISUAL_EQUALS_RGBA(ctx->Visual, 8, 8, 8, 8) ) + { + /* 32bpp mode */ + ctx->Driver.WriteRGBASpan = tdfxWriteRGBASpan_ARGB8888; + ctx->Driver.WriteRGBSpan = tdfxWriteRGBSpan_ARGB8888; + ctx->Driver.WriteMonoRGBASpan = tdfxWriteMonoRGBASpan_ARGB8888; + ctx->Driver.WriteRGBAPixels = tdfxWriteRGBAPixels_ARGB8888; + ctx->Driver.WriteMonoRGBAPixels = tdfxWriteMonoRGBAPixels_ARGB8888; + ctx->Driver.ReadRGBAPixels = tdfxReadRGBAPixels_ARGB8888; + ctx->Driver.ReadRGBASpan = tdfxReadRGBASpan_ARGB8888; + } + else + { + abort(); + } + + if ( fxMesa->haveHwStencil ) { + ctx->Driver.WriteStencilSpan = write_stencil_span; + ctx->Driver.ReadStencilSpan = read_stencil_span; + ctx->Driver.WriteStencilPixels = write_stencil_pixels; + ctx->Driver.ReadStencilPixels = read_stencil_pixels; + } + + ctx->Driver.WriteDepthSpan = tdfxDDWriteDepthSpan; + ctx->Driver.WriteDepthPixels = tdfxDDWriteDepthPixels; + ctx->Driver.ReadDepthSpan = tdfxDDReadDepthSpan; + ctx->Driver.ReadDepthPixels = tdfxDDReadDepthPixels; + + ctx->Driver.WriteCI8Span = NULL; + ctx->Driver.WriteCI32Span = NULL; + ctx->Driver.WriteMonoCISpan = NULL; + ctx->Driver.WriteCI32Pixels = NULL; + ctx->Driver.WriteMonoCIPixels = NULL; + ctx->Driver.ReadCI32Span = NULL; + ctx->Driver.ReadCI32Pixels = NULL; +} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.h:1.1 --- /dev/null Mon Jun 4 12:37:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.h Wed Mar 21 11:14:28 2001 @@ -0,0 +1,48 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * + */ + +#ifndef __TDFX_SPAN_H__ +#define __TDFX_SPAN_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "context.h" + +extern void tdfxDDInitSpanFuncs( GLcontext *ctx ); + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c:1.2 --- /dev/null Mon Jun 4 12:37:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c Wed May 2 11:06:04 2001 @@ -0,0 +1,1549 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c,v 1.2 2001/05/02 15:06:04 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * + */ + +#include "types.h" +#include "pb.h" + +#include "dri_glide.h" + +#include "tdfx_context.h" +#include "tdfx_state.h" +#include "tdfx_vb.h" +#include "tdfx_tex.h" +#include "tdfx_texman.h" +#include "tdfx_tris.h" +#include "tdfx_render.h" + + + +/* ============================================================= + * Alpha blending + */ + +static void tdfxUpdateAlphaMode( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GrCmpFnc_t func; + GrAlphaBlendFnc_t srcRGB, dstRGB, srcA, dstA; + GrAlpha_t ref = ctx->Color.AlphaRef; + const int hasAlpha = ctx->Visual->AlphaBits > 0; + + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s()\n", __FUNCTION__ ); + } + + if ( ctx->Color.AlphaEnabled ) { + switch ( ctx->Color.AlphaFunc ) { + case GL_NEVER: + func = GR_CMP_NEVER; + break; + case GL_LESS: + func = GR_CMP_LESS; + break; + case GL_LEQUAL: + func = GR_CMP_LEQUAL; + break; + case GL_EQUAL: + func = GR_CMP_EQUAL; + break; + case GL_GEQUAL: + func = GR_CMP_GEQUAL; + break; + case GL_GREATER: + func = GR_CMP_GREATER; + break; + case GL_NOTEQUAL: + func = GR_CMP_NOTEQUAL; + break; + case GL_ALWAYS: + default: + func = GR_CMP_ALWAYS; + break; + } + } else { + func = GR_CMP_ALWAYS; + } + + if ( ctx->Color.BlendEnabled + && (fxMesa->Fallback & TDFX_FALLBACK_BLEND) == 0 ) { + switch ( ctx->Color.BlendSrcRGB ) { + case GL_ZERO: + srcRGB = GR_BLEND_ZERO; + break; + case GL_ONE: + srcRGB = GR_BLEND_ONE; + break; + case GL_DST_COLOR: + srcRGB = GR_BLEND_DST_COLOR; + break; + case GL_ONE_MINUS_DST_COLOR: + srcRGB = GR_BLEND_ONE_MINUS_DST_COLOR; + break; + case GL_SRC_ALPHA: + srcRGB = GR_BLEND_SRC_ALPHA; + break; + case GL_ONE_MINUS_SRC_ALPHA: + srcRGB = GR_BLEND_ONE_MINUS_SRC_ALPHA; + break; + case GL_DST_ALPHA: + srcRGB = hasAlpha ? GR_BLEND_DST_ALPHA : GR_BLEND_ONE; + break; + case GL_ONE_MINUS_DST_ALPHA: + srcRGB = hasAlpha ? GR_BLEND_ONE_MINUS_DST_ALPHA : GR_BLEND_ZERO; + break; + case GL_SRC_ALPHA_SATURATE: + srcRGB = hasAlpha ? GR_BLEND_ALPHA_SATURATE : GR_BLEND_ZERO; + break; + default: + srcRGB = GR_BLEND_ONE; + } + + switch ( ctx->Color.BlendSrcA ) { + case GL_ZERO: + srcA = GR_BLEND_ZERO; + break; + case GL_ONE: + srcA = GR_BLEND_ONE; + break; + case GL_DST_COLOR: /* Napalm only */ + srcA = hasAlpha ? GR_BLEND_DST_ALPHA : GR_BLEND_ONE; + break; + case GL_ONE_MINUS_DST_COLOR: /* Napalm only */ + srcA = hasAlpha ? GR_BLEND_ONE_MINUS_DST_ALPHA : GR_BLEND_ZERO; + break; + case GL_SRC_ALPHA: /* Napalm only */ + srcA = GR_BLEND_SRC_ALPHA; + break; + case GL_ONE_MINUS_SRC_ALPHA: /* Napalm only */ + srcA = GR_BLEND_ONE_MINUS_SRC_ALPHA; + break; + case GL_DST_ALPHA: /* Napalm only */ + srcA = hasAlpha ? GR_BLEND_DST_ALPHA : GR_BLEND_ONE; + break; + case GL_ONE_MINUS_DST_ALPHA: /* Napalm only */ + srcA = hasAlpha ? GR_BLEND_ONE_MINUS_DST_ALPHA : GR_BLEND_ZERO; + break; + case GL_SRC_ALPHA_SATURATE: + srcA = GR_BLEND_ONE; + break; + default: + srcA = GR_BLEND_ONE; + } + + switch ( ctx->Color.BlendDstRGB ) { + case GL_ZERO: + dstRGB = GR_BLEND_ZERO; + break; + case GL_ONE: + dstRGB = GR_BLEND_ONE; + break; + case GL_SRC_COLOR: + dstRGB = GR_BLEND_SRC_COLOR; + break; + case GL_ONE_MINUS_SRC_COLOR: + dstRGB = GR_BLEND_ONE_MINUS_SRC_COLOR; + break; + case GL_SRC_ALPHA: + dstRGB = GR_BLEND_SRC_ALPHA; + break; + case GL_ONE_MINUS_SRC_ALPHA: + dstRGB = GR_BLEND_ONE_MINUS_SRC_ALPHA; + break; + case GL_DST_ALPHA: + dstRGB = hasAlpha ? GR_BLEND_DST_ALPHA : GR_BLEND_ONE; + break; + case GL_ONE_MINUS_DST_ALPHA: + dstRGB = hasAlpha ? GR_BLEND_ONE_MINUS_DST_ALPHA : GR_BLEND_ZERO; + break; + default: + dstRGB = GR_BLEND_ZERO; + } + + switch ( ctx->Color.BlendDstA ) { + case GL_ZERO: + dstA = GR_BLEND_ZERO; + break; + case GL_ONE: + dstA = GR_BLEND_ONE; + break; + case GL_SRC_COLOR: /* Napalm only */ + dstA = GR_BLEND_SRC_ALPHA; + break; + case GL_ONE_MINUS_SRC_COLOR: /* Napalm only */ + dstA = GR_BLEND_ONE_MINUS_SRC_ALPHA; + break; + case GL_SRC_ALPHA: /* Napalm only */ + dstA = GR_BLEND_SRC_ALPHA; + break; + case GL_ONE_MINUS_SRC_ALPHA: /* Napalm only */ + dstA = GR_BLEND_ONE_MINUS_SRC_ALPHA; + break; + case GL_DST_ALPHA: /* Napalm only */ + dstA = hasAlpha ? GR_BLEND_DST_ALPHA : GR_BLEND_ONE; + break; + case GL_ONE_MINUS_DST_ALPHA: /* Napalm only */ + dstA = hasAlpha ? GR_BLEND_ONE_MINUS_DST_ALPHA : GR_BLEND_ZERO; + break; + default: + dstA = GR_BLEND_ZERO; + } + } else { + /* blend disabled */ + srcRGB = GR_BLEND_ONE; + dstRGB = GR_BLEND_ZERO; + srcA = GR_BLEND_ONE; + dstA = GR_BLEND_ZERO; + } + + if ( fxMesa->Color.AlphaFunc != func ) { + fxMesa->Color.AlphaFunc = func; + fxMesa->dirty |= TDFX_UPLOAD_ALPHA_TEST; + } + if ( fxMesa->Color.AlphaRef != ref ) { + fxMesa->Color.AlphaRef = ref; + fxMesa->dirty |= TDFX_UPLOAD_ALPHA_REF; + } + + if ( fxMesa->Color.BlendSrcRGB != srcRGB || + fxMesa->Color.BlendDstRGB != dstRGB || + fxMesa->Color.BlendSrcA != srcA || + fxMesa->Color.BlendDstA != dstA ) + { + fxMesa->Color.BlendSrcRGB = srcRGB; + fxMesa->Color.BlendDstRGB = dstRGB; + fxMesa->Color.BlendSrcA = srcA; + fxMesa->Color.BlendDstA = dstA; + fxMesa->dirty |= TDFX_UPLOAD_BLEND_FUNC; + } +} + +static void tdfxDDAlphaFunc( GLcontext *ctx, GLenum func, GLclampf ref ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_ALPHA; +} + +static void tdfxDDBlendEquation( GLcontext *ctx, GLenum mode ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_ALPHA; + + if (ctx->Color.ColorLogicOpEnabled && ctx->Color.LogicOp != GL_COPY) + fxMesa->Fallback |= TDFX_FALLBACK_LOGICOP; + else + fxMesa->Fallback &= ~TDFX_FALLBACK_LOGICOP; +} + +static void tdfxDDBlendFunc( GLcontext *ctx, GLenum sfactor, GLenum dfactor ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_ALPHA; + + /* + * XXX - Voodoo5 seems to suffer from precision problems in some + * blend modes. To pass all the conformance tests we'd have to + * fall back to software for many modes. Revisit someday. + */ +} + +static void tdfxDDBlendFuncSeparate( GLcontext *ctx, + GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorA, GLenum dfactorA ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_ALPHA; +} + +/* ============================================================= + * Stipple + */ + +static void tdfxUpdateStipple( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + GrStippleMode_t mode = GR_STIPPLE_DISABLE; + + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s()\n", __FUNCTION__ ); + } + + FLUSH_BATCH( fxMesa ); + + if (ctx->Polygon.StippleFlag) { + mode = GR_STIPPLE_PATTERN; + } + + if ( fxMesa->Stipple.Mode != mode ) { + fxMesa->Stipple.Mode = mode; + fxMesa->dirty |= TDFX_UPLOAD_STIPPLE; + } +} + + +/* ============================================================= + * Depth testing + */ + +static void tdfxUpdateZMode( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + GrCmpFnc_t func; + FxI32 bias; + FxBool mask; + + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s()\n", __FUNCTION__ ); + } + + bias = (FxI32) (ctx->Polygon.OffsetUnits * TDFX_DEPTH_BIAS_SCALE); + + if ( ctx->Depth.Test ) { + switch ( ctx->Depth.Func ) { + case GL_NEVER: + func = GR_CMP_NEVER; + break; + case GL_LESS: + func = GR_CMP_LESS; + break; + case GL_LEQUAL: + func = GR_CMP_LEQUAL; + break; + case GL_EQUAL: + func = GR_CMP_EQUAL; + break; + case GL_GEQUAL: + func = GR_CMP_GEQUAL; + break; + case GL_GREATER: + func = GR_CMP_GREATER; + break; + case GL_NOTEQUAL: + func = GR_CMP_NOTEQUAL; + break; + case GL_ALWAYS: + default: + func = GR_CMP_ALWAYS; + break; + } + + if ( ctx->Depth.Mask ) { + mask = FXTRUE; + } + else { + mask = FXFALSE; + } + } + else { + /* depth testing disabled */ + func = GR_CMP_ALWAYS; /* fragments always pass */ + mask = FXFALSE; /* zbuffer is not touched */ + } + + fxMesa->Depth.Clear = (FxU32) (((1 << fxMesa->glVis->DepthBits) - 1) + * ctx->Depth.Clear); + + if ( fxMesa->Depth.Bias != bias ) { + fxMesa->Depth.Bias = bias; + fxMesa->dirty |= TDFX_UPLOAD_DEPTH_BIAS; + } + if ( fxMesa->Depth.Func != func ) { + fxMesa->Depth.Func = func; + fxMesa->dirty |= TDFX_UPLOAD_DEPTH_FUNC | TDFX_UPLOAD_DEPTH_MASK; + } + if ( fxMesa->Depth.Mask != mask ) { + fxMesa->Depth.Mask = mask; + fxMesa->dirty |= TDFX_UPLOAD_DEPTH_MASK; + } +} + +static void tdfxDDDepthFunc( GLcontext *ctx, GLenum func ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_DEPTH; +} + +static void tdfxDDDepthMask( GLcontext *ctx, GLboolean flag ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_DEPTH; +} + +static void tdfxDDClearDepth( GLcontext *ctx, GLclampd d ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_DEPTH; +} + + + +/* ============================================================= + * Stencil + */ + + +/* Evaluate all stencil state and make the Glide calls. + */ +static GrStencil_t convertGLStencilOp( GLenum op ) +{ + switch ( op ) { + case GL_KEEP: + return GR_STENCILOP_KEEP; + case GL_ZERO: + return GR_STENCILOP_ZERO; + case GL_REPLACE: + return GR_STENCILOP_REPLACE; + case GL_INCR: + return GR_STENCILOP_INCR_CLAMP; + case GL_DECR: + return GR_STENCILOP_DECR_CLAMP; + case GL_INVERT: + return GR_STENCILOP_INVERT; + case GL_INCR_WRAP_EXT: + return GR_STENCILOP_INCR_WRAP; + case GL_DECR_WRAP_EXT: + return GR_STENCILOP_DECR_WRAP; + default: + gl_problem( NULL, "bad stencil op in convertGLStencilOp" ); + } + return GR_STENCILOP_KEEP; /* never get, silence compiler warning */ +} + + +static void tdfxUpdateStencil( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s()\n", __FUNCTION__ ); + } + + if (fxMesa->haveHwStencil) { + if (ctx->Stencil.Enabled) { + fxMesa->Stencil.Function = ctx->Stencil.Function - GL_NEVER; + fxMesa->Stencil.RefValue = ctx->Stencil.Ref; + fxMesa->Stencil.ValueMask = ctx->Stencil.ValueMask; + fxMesa->Stencil.WriteMask = ctx->Stencil.WriteMask; + fxMesa->Stencil.FailFunc = convertGLStencilOp(ctx->Stencil.FailFunc); + fxMesa->Stencil.ZFailFunc =convertGLStencilOp(ctx->Stencil.ZFailFunc); + fxMesa->Stencil.ZPassFunc =convertGLStencilOp(ctx->Stencil.ZPassFunc); + fxMesa->Stencil.Clear = ctx->Stencil.Clear & 0xff; + } + fxMesa->dirty |= TDFX_UPLOAD_STENCIL; + } +} + + +static void tdfxDDStencilFunc( GLcontext *ctx, GLenum func, + GLint ref, GLuint mask ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_STENCIL; +} + +static void tdfxDDStencilMask( GLcontext *ctx, GLuint mask ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_STENCIL; +} + +static void tdfxDDStencilOp( GLcontext *ctx, GLenum sfail, + GLenum zfail, GLenum zpass ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_STENCIL; +} + + +/* ============================================================= + * Fog - orthographic fog still not working + */ + +static void tdfxUpdateFogAttrib( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GrFogMode_t mode; + GrColor_t color; + + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s()\n", __FUNCTION__ ); + } + + if ( ctx->Fog.Enabled ) { + mode = GR_FOG_WITH_TABLE_ON_Q; + } else { + mode = GR_FOG_DISABLE; + } + + color = TDFXPACKCOLOR888((GLubyte)(ctx->Fog.Color[0]*255.0F), + (GLubyte)(ctx->Fog.Color[1]*255.0F), + (GLubyte)(ctx->Fog.Color[2]*255.0F)); + + if ( fxMesa->Fog.Mode != mode ) { + fxMesa->Fog.Mode = mode; + fxMesa->dirty |= TDFX_UPLOAD_FOG_MODE; + } + if ( fxMesa->Fog.Color != color ) { + fxMesa->Fog.Color = color; + fxMesa->dirty |= TDFX_UPLOAD_FOG_COLOR; + } + if ( fxMesa->Fog.TableMode != ctx->Fog.Mode || + fxMesa->Fog.Density != ctx->Fog.Density || + fxMesa->Fog.Near != ctx->Fog.Start || + fxMesa->Fog.Far != ctx->Fog.End ) + { + switch( ctx->Fog.Mode ) { + case GL_EXP: + guFogGenerateExp( fxMesa->Fog.Table, ctx->Fog.Density ); + break; + case GL_EXP2: + guFogGenerateExp2( fxMesa->Fog.Table, ctx->Fog.Density ); + break; + case GL_LINEAR: + guFogGenerateLinear( fxMesa->Fog.Table, + ctx->Fog.Start, ctx->Fog.End ); + break; + } + + fxMesa->Fog.TableMode = ctx->Fog.Mode; + fxMesa->Fog.Density = ctx->Fog.Density; + fxMesa->Fog.Near = ctx->Fog.Start; + fxMesa->Fog.Far = ctx->Fog.End; + fxMesa->dirty |= TDFX_UPLOAD_FOG_TABLE; + } +} + +static void tdfxDDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_FOG; +} + + +/* ============================================================= + * Clipping + */ + +static int intersect_rect( XF86DRIClipRectPtr out, + const XF86DRIClipRectPtr a, + const XF86DRIClipRectPtr b) +{ + *out = *a; + if (b->x1 > out->x1) out->x1 = b->x1; + if (b->y1 > out->y1) out->y1 = b->y1; + if (b->x2 < out->x2) out->x2 = b->x2; + if (b->y2 < out->y2) out->y2 = b->y2; + if (out->x1 >= out->x2) return 0; + if (out->y1 >= out->y2) return 0; + return 1; +} + + +/* + * Examine XF86 cliprect list and scissor state to recompute our + * cliprect list. + */ +void tdfxUpdateClipping( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + __DRIdrawablePrivate *dPriv = fxMesa->driDrawable; + + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s()\n", __FUNCTION__ ); + } + + assert(ctx); + assert(fxMesa); + assert(dPriv); + + if ( dPriv->x != fxMesa->x_offset || dPriv->y != fxMesa->y_offset || + dPriv->w != fxMesa->width || dPriv->h != fxMesa->height ) { + fxMesa->x_offset = dPriv->x; + fxMesa->y_offset = dPriv->y; + fxMesa->width = dPriv->w; + fxMesa->height = dPriv->h; + fxMesa->y_delta = + fxMesa->screen_height - fxMesa->y_offset - fxMesa->height; + } + + if (fxMesa->scissoredClipRects && fxMesa->pClipRects) { + free(fxMesa->pClipRects); + } + + if (ctx->Scissor.Enabled) { + /* intersect OpenGL scissor box with all cliprects to make a new + * list of cliprects. + */ + XF86DRIClipRectRec scissor; + int x1 = ctx->Scissor.X + fxMesa->x_offset; + int y1 = fxMesa->screen_height - fxMesa->y_delta + - ctx->Scissor.Y - ctx->Scissor.Height; + int x2 = x1 + ctx->Scissor.Width; + int y2 = y1 + ctx->Scissor.Height; + scissor.x1 = MAX2(x1, 0); + scissor.y1 = MAX2(y1, 0); + scissor.x2 = MAX2(x2, 0); + scissor.y2 = MAX2(y2, 0); + + assert(scissor.x2 >= scissor.x1); + assert(scissor.y2 >= scissor.y1); + + fxMesa->pClipRects = malloc(dPriv->numClipRects + * sizeof(XF86DRIClipRectRec)); + if (fxMesa->pClipRects) { + int i; + fxMesa->numClipRects = 0; + for (i = 0; i < dPriv->numClipRects; i++) { + if (intersect_rect(&fxMesa->pClipRects[fxMesa->numClipRects], + &scissor, &dPriv->pClipRects[i])) { + fxMesa->numClipRects++; + } + } + fxMesa->scissoredClipRects = GL_TRUE; + } + else { + /* out of memory, forgo scissor */ + fxMesa->numClipRects = dPriv->numClipRects; + fxMesa->pClipRects = dPriv->pClipRects; + fxMesa->scissoredClipRects = GL_FALSE; + } + } + else { + fxMesa->numClipRects = dPriv->numClipRects; + fxMesa->pClipRects = dPriv->pClipRects; + fxMesa->scissoredClipRects = GL_FALSE; + } + + fxMesa->dirty |= TDFX_UPLOAD_CLIP; +} + + + +/* ============================================================= + * Culling + */ + +static void tdfxUpdateCull( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GrCullMode_t mode = GR_CULL_DISABLE; + + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s()\n", __FUNCTION__ ); + } + + if ( ctx->Polygon.CullFlag && + (ctx->PB->primitive == GL_POLYGON || + ctx->PB->primitive == GL_BITMAP) ) { + switch ( ctx->Polygon.CullFaceMode ) { + case GL_FRONT: + if ( ctx->Polygon.FrontFace == GL_CCW ) { + mode = GR_CULL_POSITIVE; + } else { + mode = GR_CULL_NEGATIVE; + } + break; + + case GL_BACK: + if ( ctx->Polygon.FrontFace == GL_CCW ) { + mode = GR_CULL_NEGATIVE; + } else { + mode = GR_CULL_POSITIVE; + } + break; + + case GL_FRONT_AND_BACK: + default: + mode = GR_CULL_DISABLE; + break; + } + } + + if ( fxMesa->CullMode != mode ) { + fxMesa->CullMode = mode; + fxMesa->dirty |= TDFX_UPLOAD_CULL; + } +} + +static void tdfxDDCullFace( GLcontext *ctx, GLenum mode ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_CULL; +} + +static void tdfxDDFrontFace( GLcontext *ctx, GLenum mode ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_CULL; +} + + +/* ============================================================= + * Line drawing. + */ + +static void tdfxUpdateLine( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s()\n", __FUNCTION__ ); + } + + FLUSH_BATCH( fxMesa ); + fxMesa->dirty |= TDFX_UPLOAD_LINE; +} + + +static void tdfxDDLineWidth( GLcontext *ctx, GLfloat width ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_LINE; +} + + + +/* ============================================================= + * Color Attributes + */ + +static void tdfxDDLogicOp( GLcontext *ctx, GLenum opcode ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + if (ctx->Color.ColorLogicOpEnabled) + { + FLUSH_BATCH( fxMesa ); + + if (opcode == GL_COPY) + fxMesa->Fallback &= ~TDFX_FALLBACK_LOGICOP; + else + fxMesa->Fallback |= TDFX_FALLBACK_LOGICOP; + } + else + fxMesa->Fallback &= ~TDFX_FALLBACK_LOGICOP; +} + + +static GLboolean tdfxDDColorMask( GLcontext *ctx, + GLboolean r, GLboolean g, + GLboolean b, GLboolean a ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + FLUSH_BATCH( fxMesa ); + + if ( fxMesa->Color.ColorMask[RCOMP] != r || + fxMesa->Color.ColorMask[GCOMP] != g || + fxMesa->Color.ColorMask[BCOMP] != b || + fxMesa->Color.ColorMask[ACOMP] != a ) { + fxMesa->Color.ColorMask[RCOMP] = r; + fxMesa->Color.ColorMask[GCOMP] = g; + fxMesa->Color.ColorMask[BCOMP] = b; + fxMesa->Color.ColorMask[ACOMP] = a; + fxMesa->dirty |= TDFX_UPLOAD_COLOR_MASK; + + if (ctx->Visual->RedBits < 8) { + /* Can't do RGB colormasking in 16bpp mode. */ + /* We can completely ignore the alpha mask. */ + if (r != g || g != b) { + fxMesa->Fallback |= TDFX_FALLBACK_COLORMASK; + } + else { + fxMesa->Fallback &= ~TDFX_FALLBACK_COLORMASK; + } + } + } + + return GL_FALSE; /* This forces the software paths to do colormasking. */ + /* This function will return void when we use Mesa 3.5 */ +} + +static void tdfxDDColor( GLcontext *ctx, + GLubyte r, GLubyte g, GLubyte b, GLubyte a ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GrColor_t color; + + FLUSH_BATCH( fxMesa ); + + color = tdfxPackColor( fxMesa->fxScreen->cpp, r, g, b, a ); + + if ( fxMesa->Color.MonoColor != color ) { + fxMesa->Color.MonoColor = color; + fxMesa->dirty |= TDFX_UPLOAD_CONSTANT_COLOR; + } +} + +static void tdfxDDClearColor( GLcontext *ctx, + GLubyte red, GLubyte green, + GLubyte blue, GLubyte alpha ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + FLUSH_BATCH( fxMesa ); + + fxMesa->Color.ClearColor = TDFXPACKCOLOR888( red, green, blue ); + fxMesa->Color.ClearAlpha = alpha; +} + + +/* ============================================================= + * Light Model + */ + +static void tdfxDDLightModelfv( GLcontext *ctx, GLenum pname, + const GLfloat *param ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + if ( pname == GL_LIGHT_MODEL_COLOR_CONTROL ) { + FLUSH_BATCH( fxMesa ); + + fxMesa->Fallback &= ~TDFX_FALLBACK_SPECULAR; + + if ( ctx->Light.Enabled && + ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR ) { + fxMesa->Fallback |= TDFX_FALLBACK_SPECULAR; + } + } +} + +static void tdfxDDShadeModel( GLcontext *ctx, GLenum mode ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + /* FIXME: Can we implement native flat shading? */ + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_TEXTURE; +} + + +/* ============================================================= + * Scissor + */ + +static void +tdfxDDScissor(GLcontext * ctx, GLint x, GLint y, GLsizei w, GLsizei h) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_CLIP; +} + +/* ============================================================= + * Render + */ + +static void tdfxUpdateRenderAttrib( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + FLUSH_BATCH( fxMesa ); + fxMesa->dirty |= TDFX_UPLOAD_RENDER_BUFFER; +} + +/* ============================================================= + * Viewport + */ + +static void tdfxUpdateViewport( GLcontext *ctx ) +{ + /* XXX: Implement this when we're doing clip coordinates */ + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s()\n", __FUNCTION__ ); + } +} + + +static void tdfxDDViewport( GLcontext *ctx, GLint x, GLint y, + GLsizei w, GLsizei h ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_VIEWPORT; +} + + +static void tdfxDDNearFar( GLcontext *ctx, GLfloat nearVal, GLfloat farVal ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_VIEWPORT; +} + + +/* ============================================================= + * State enable/disable + */ + +static void tdfxDDEnable( GLcontext *ctx, GLenum cap, GLboolean state ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + + switch ( cap ) { + case GL_ALPHA_TEST: + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_ALPHA; + break; + + case GL_BLEND: + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_ALPHA; + + if (ctx->Color.ColorLogicOpEnabled && ctx->Color.LogicOp != GL_COPY) + fxMesa->Fallback |= TDFX_FALLBACK_LOGICOP; + else + fxMesa->Fallback &= ~TDFX_FALLBACK_LOGICOP; + break; + + case GL_CULL_FACE: + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_CULL; + break; + + case GL_DEPTH_TEST: + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_DEPTH; + break; + + case GL_DITHER: + FLUSH_BATCH( fxMesa ); + if ( state ) { + fxMesa->Color.Dither = GR_DITHER_2x2; + } else { + fxMesa->Color.Dither = GR_DITHER_DISABLE; + } + fxMesa->dirty |= TDFX_UPLOAD_DITHER; + break; + + case GL_FOG: + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_FOG; + break; + + case GL_COLOR_LOGIC_OP: + FLUSH_BATCH( fxMesa ); + if ( state && ctx->Color.LogicOp != GL_COPY ) { + fxMesa->Fallback |= TDFX_FALLBACK_LOGICOP; + } else { + fxMesa->Fallback &= ~TDFX_FALLBACK_LOGICOP; + } + break; + + case GL_LINE_SMOOTH: + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_LINE; + break; + + case GL_POLYGON_STIPPLE: + FLUSH_BATCH(fxMesa); + fxMesa->new_state |= TDFX_NEW_STIPPLE; + break; + + case GL_SCISSOR_TEST: + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_CLIP; + break; + + case GL_STENCIL_TEST: + FLUSH_BATCH( fxMesa ); + if (fxMesa->haveHwStencil) + fxMesa->new_state |= TDFX_NEW_STENCIL; + else if (state) + fxMesa->Fallback |= TDFX_FALLBACK_STENCIL; + else + fxMesa->Fallback &= ~TDFX_FALLBACK_STENCIL; + break; + + case GL_TEXTURE_1D: + case GL_TEXTURE_3D: + if (state) + fxMesa->Fallback |= TDFX_FALLBACK_TEXTURE; + else + fxMesa->Fallback &= ~TDFX_FALLBACK_TEXTURE; + fxMesa->new_state |= TDFX_NEW_TEXTURE; + break; + + case GL_TEXTURE_2D: + FLUSH_BATCH( fxMesa ); + fxMesa->new_state |= TDFX_NEW_TEXTURE; + break; + + default: + return; + } +} + + + +/* Set the buffer used for drawing */ +/* XXX support for separate read/draw buffers hasn't been tested */ +static GLboolean tdfxDDSetDrawBuffer( GLcontext *ctx, GLenum mode ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s()\n", __FUNCTION__ ); + } + + FLUSH_BATCH( fxMesa ); + + fxMesa->Fallback &= ~TDFX_FALLBACK_BUFFER; + + switch ( mode ) { + case GL_FRONT_LEFT: + fxMesa->DrawBuffer = GR_BUFFER_FRONTBUFFER; + fxMesa->new_state |= TDFX_NEW_RENDER; + return GL_TRUE; + + case GL_BACK_LEFT: + fxMesa->DrawBuffer = GR_BUFFER_BACKBUFFER; + fxMesa->new_state |= TDFX_NEW_RENDER; + return GL_TRUE; + + case GL_NONE: + FX_grColorMaskv( ctx, false4 ); + return GL_TRUE; + + default: + fxMesa->Fallback |= TDFX_FALLBACK_BUFFER; + return GL_FALSE; + } +} + + +/* Set the buffer used for reading */ +/* XXX support for separate read/draw buffers hasn't been tested */ +static void tdfxDDSetReadBuffer( GLcontext *ctx, + GLframebuffer *buffer, GLenum mode ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + (void) buffer; + + FLUSH_BATCH( fxMesa ); + + fxMesa->Fallback &= ~TDFX_FALLBACK_BUFFER; + + switch ( mode ) { + case GL_FRONT_LEFT: + fxMesa->ReadBuffer = GR_BUFFER_FRONTBUFFER; + break; + + case GL_BACK_LEFT: + fxMesa->ReadBuffer = GR_BUFFER_BACKBUFFER; + break; + + default: + fxMesa->Fallback |= TDFX_FALLBACK_BUFFER; + break; + } +} + +/* ============================================================= + * Polygon stipple + */ + +static void tdfxDDPolygonStipple( GLcontext *ctx, const GLubyte *mask ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + const GLubyte *m = mask; + GLubyte q[4]; + int i,j,k; + int active = (ctx->Polygon.StippleFlag && ctx->PB->primitive == GL_POLYGON); + + FLUSH_BATCH(fxMesa); + + if (active) { + ctx->Driver.TriangleCaps |= DD_TRI_STIPPLE; + } + + q[0] = mask[0]; + q[1] = mask[4]; + q[2] = mask[8]; + q[3] = mask[12]; + + for (k = 0 ; k < 8 ; k++) + for (j = 0 ; j < 4; j++) + for (i = 0 ; i < 4 ; i++,m++) { + if (*m != q[j]) { + ctx->Driver.TriangleCaps &= ~DD_TRI_STIPPLE; + fxMesa->Stipple.Pattern = 0xffffffff; /* ensure all pixels on */ + return; + } + } + + /* We can do it, so flag an upload of the stipple pattern */ + fxMesa->Stipple.Pattern = ( (q[0] << 0) | + (q[1] << 8) | + (q[2] << 16) | + (q[3] << 24) ); + fxMesa->dirty |= TDFX_UPLOAD_STIPPLE; +} + +/* Always called between RenderStart and RenderFinish --> We already + * hold the lock. + */ +static void tdfxDDReducedPrimitiveChange( GLcontext *ctx, GLenum prim ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + + FLUSH_BATCH( fxMesa ); + + tdfxUpdateCull(ctx); + if ( fxMesa->dirty & TDFX_UPLOAD_CULL ) { + grCullMode( fxMesa->CullMode ); + fxMesa->dirty &= ~TDFX_UPLOAD_CULL; + } + + tdfxUpdateStipple(ctx); + if ( fxMesa->dirty & TDFX_UPLOAD_STIPPLE ) { + grStipplePattern ( fxMesa->Stipple.Pattern ); + grStippleMode ( fxMesa->Stipple.Mode ); + fxMesa->dirty &= ~TDFX_UPLOAD_STIPPLE; + } +} + + + +static void tdfxDDPrintState( const char *msg, GLuint flags ) +{ + fprintf( stderr, + "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s\n", + msg, + flags, + (flags & TDFX_NEW_COLOR) ? "color, " : "", + (flags & TDFX_NEW_ALPHA) ? "alpha, " : "", + (flags & TDFX_NEW_DEPTH) ? "depth, " : "", + (flags & TDFX_NEW_RENDER) ? "render, " : "", + (flags & TDFX_NEW_FOG) ? "fog, " : "", + (flags & TDFX_NEW_STENCIL) ? "stencil, " : "", + (flags & TDFX_NEW_STIPPLE) ? "stipple, " : "", + (flags & TDFX_NEW_CLIP) ? "clip, " : "", + (flags & TDFX_NEW_VIEWPORT) ? "viewport, " : "", + (flags & TDFX_NEW_CULL) ? "cull, " : "", + (flags & TDFX_NEW_GLIDE) ? "glide, " : "", + (flags & TDFX_NEW_TEXTURE) ? "texture, " : "", + (flags & TDFX_NEW_CONTEXT) ? "context, " : ""); +} + + + +void tdfxDDUpdateHwState( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + int new_state = fxMesa->new_state; + + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s()\n", __FUNCTION__ ); + } + + if ( new_state ) + { + FLUSH_BATCH( fxMesa ); + + fxMesa->new_state = 0; + + if ( 0 ) + tdfxDDPrintState( "tdfxUpdateHwState", new_state ); + + /* Update the various parts of the context's state. + */ + if ( new_state & TDFX_NEW_ALPHA ) { + tdfxUpdateAlphaMode( ctx ); + } + + if ( new_state & TDFX_NEW_DEPTH ) + tdfxUpdateZMode( ctx ); + + if ( new_state & TDFX_NEW_FOG ) + tdfxUpdateFogAttrib( ctx ); + + if ( new_state & TDFX_NEW_CLIP ) + tdfxUpdateClipping( ctx ); + + if ( new_state & TDFX_NEW_STIPPLE ) + tdfxUpdateStipple( ctx ); + + if ( new_state & TDFX_NEW_CULL ) + tdfxUpdateCull( ctx ); + + if ( new_state & TDFX_NEW_LINE ) + tdfxUpdateLine( ctx ); + + if ( new_state & TDFX_NEW_VIEWPORT ) + tdfxUpdateViewport( ctx ); + + if ( new_state & TDFX_NEW_RENDER ) + tdfxUpdateRenderAttrib( ctx ); + + if ( new_state & TDFX_NEW_STENCIL ) + tdfxUpdateStencil( ctx ); + + if ( new_state & TDFX_NEW_TEXTURE ) { + tdfxUpdateTextureState( ctx ); + } + else if ( new_state & TDFX_NEW_TEXTURE_BIND ) { + tdfxUpdateTextureBinding( ctx ); + } + } + + if ( 0 ) { + FxI32 bias = (FxI32) (ctx->Polygon.OffsetUnits * TDFX_DEPTH_BIAS_SCALE); + + if ( fxMesa->Depth.Bias != bias ) { + fxMesa->Depth.Bias = bias; + fxMesa->dirty |= TDFX_UPLOAD_DEPTH_BIAS; + } + } + + if ( fxMesa->dirty ) { + LOCK_HARDWARE( fxMesa ); + tdfxEmitHwStateLocked( fxMesa ); + UNLOCK_HARDWARE( fxMesa ); + } +} + + +static void tdfxDDRenderStart( GLcontext *ctx ) +{ + tdfxDDUpdateHwState( ctx ); + LOCK_HARDWARE( TDFX_CONTEXT(ctx) ); +} + +static void tdfxDDRenderFinish( GLcontext *ctx ) +{ + UNLOCK_HARDWARE( TDFX_CONTEXT(ctx) ); +} + +#define INTERESTED (~(NEW_MODELVIEW | \ + NEW_PROJECTION | \ + NEW_TEXTURE_MATRIX | \ + NEW_USER_CLIP | \ + NEW_CLIENT_STATE | \ + NEW_TEXTURE_ENABLE)) + +static void tdfxDDUpdateState( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s()\n", __FUNCTION__ ); + } + + /* Have to do this here to detect texture, line fallbacks in time: + */ + if ( fxMesa->new_state & (TDFX_NEW_TEXTURE | TDFX_NEW_LINE) ) + tdfxDDUpdateHwState( ctx ); + + if ( ctx->NewState & INTERESTED ) { + tdfxDDChooseRenderState( ctx ); + } + + /* The choise of vertex setup function only depends on whether fog + * and/or texturing is enabled. + */ + if ( ctx->NewState & (NEW_FOG | NEW_TEXTURE_ENABLE | NEW_TEXTURING)) { + tdfxDDChooseRasterSetupFunc( ctx ); + } + + if ( 0 ) + fprintf( stderr, "fallback %x indirect %x\n", + fxMesa->Fallback, fxMesa->IndirectTriangles ); + + if ( fxMesa->Fallback ) { + ctx->IndirectTriangles |= ctx->TriangleCaps; + } + else { + ctx->IndirectTriangles &= ~DD_SW_RASTERIZE; + ctx->IndirectTriangles |= fxMesa->IndirectTriangles; + + ctx->Driver.PointsFunc = fxMesa->PointsFunc; + ctx->Driver.LineFunc = fxMesa->LineFunc; + ctx->Driver.TriangleFunc = fxMesa->TriangleFunc; + ctx->Driver.QuadFunc = fxMesa->QuadFunc; + ctx->Driver.RenderVBRawTab = fxMesa->RenderVBRawTab; + } +} + + + +/* Initialize the context's Glide state mirror. These values will be + * used as Glide function call parameters when the time comes. + */ +void tdfxInitState( tdfxContextPtr fxMesa ) +{ + GLcontext *ctx = fxMesa->glCtx; + GLint i; + + fxMesa->ColorCombine.Function = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->ColorCombine.Factor = GR_COMBINE_FACTOR_NONE; + fxMesa->ColorCombine.Local = GR_COMBINE_LOCAL_ITERATED; + fxMesa->ColorCombine.Other = GR_COMBINE_OTHER_NONE; + fxMesa->ColorCombine.Invert = FXFALSE; + fxMesa->AlphaCombine.Function = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->AlphaCombine.Factor = GR_COMBINE_FACTOR_NONE; + fxMesa->AlphaCombine.Local = GR_COMBINE_LOCAL_ITERATED; + fxMesa->AlphaCombine.Other = GR_COMBINE_OTHER_NONE; + fxMesa->AlphaCombine.Invert = FXFALSE; + + fxMesa->ColorCombineExt.SourceA = GR_CMBX_ITRGB; + fxMesa->ColorCombineExt.ModeA = GR_FUNC_MODE_X; + fxMesa->ColorCombineExt.SourceB = GR_CMBX_ZERO; + fxMesa->ColorCombineExt.ModeB = GR_FUNC_MODE_ZERO; + fxMesa->ColorCombineExt.SourceC = GR_CMBX_ZERO; + fxMesa->ColorCombineExt.InvertC = FXTRUE; + fxMesa->ColorCombineExt.SourceD = GR_CMBX_ZERO; + fxMesa->ColorCombineExt.InvertD = FXFALSE; + fxMesa->ColorCombineExt.Shift = 0; + fxMesa->ColorCombineExt.Invert = FXFALSE; + fxMesa->AlphaCombineExt.SourceA = GR_CMBX_ITALPHA; + fxMesa->AlphaCombineExt.ModeA = GR_FUNC_MODE_X; + fxMesa->AlphaCombineExt.SourceB = GR_CMBX_ZERO; + fxMesa->AlphaCombineExt.ModeB = GR_FUNC_MODE_ZERO; + fxMesa->AlphaCombineExt.SourceC = GR_CMBX_ZERO; + fxMesa->AlphaCombineExt.InvertC = FXTRUE; + fxMesa->AlphaCombineExt.SourceD = GR_CMBX_ZERO; + fxMesa->AlphaCombineExt.InvertD = FXFALSE; + fxMesa->AlphaCombineExt.Shift = 0; + fxMesa->AlphaCombineExt.Invert = FXFALSE; + + fxMesa->sScale0 = fxMesa->tScale0 = 1.0; + fxMesa->sScale1 = fxMesa->tScale1 = 1.0; + + fxMesa->TexPalette.Type = 0; + fxMesa->TexPalette.Data = NULL; + + for ( i = 0 ; i < TDFX_NUM_TMU ; i++ ) { + fxMesa->TexSource[i].StartAddress = 0; + fxMesa->TexSource[i].EvenOdd = GR_MIPMAPLEVELMASK_EVEN; + fxMesa->TexSource[i].Info = NULL; + + fxMesa->TexCombine[i].FunctionRGB = 0; + fxMesa->TexCombine[i].FactorRGB = 0; + fxMesa->TexCombine[i].FunctionAlpha = 0; + fxMesa->TexCombine[i].FactorAlpha = 0; + fxMesa->TexCombine[i].InvertRGB = FXFALSE; + fxMesa->TexCombine[i].InvertAlpha = FXFALSE; + + fxMesa->TexCombineExt[i].Alpha.SourceA = 0; + /* XXX more state to init here */ + fxMesa->TexCombineExt[i].Color.SourceA = 0; + fxMesa->TexCombineExt[i].EnvColor = 0x0; + + fxMesa->TexParams[i].sClamp = GR_TEXTURECLAMP_WRAP; + fxMesa->TexParams[i].tClamp = GR_TEXTURECLAMP_WRAP; + fxMesa->TexParams[i].minFilt = GR_TEXTUREFILTER_POINT_SAMPLED; + fxMesa->TexParams[i].magFilt = GR_TEXTUREFILTER_BILINEAR; + fxMesa->TexParams[i].mmMode = GR_MIPMAP_DISABLE; + fxMesa->TexParams[i].LODblend = FXFALSE; + fxMesa->TexParams[i].LodBias = 0.0; + + fxMesa->TexState.EnvMode[i] = ~0; + fxMesa->TexState.TexFormat[i] = ~0; + fxMesa->TexState.Enabled = 0; + } + + if ( ctx->Visual->DBflag) { + fxMesa->DrawBuffer = GR_BUFFER_BACKBUFFER; + fxMesa->ReadBuffer = GR_BUFFER_BACKBUFFER; + } else { + fxMesa->DrawBuffer = GR_BUFFER_FRONTBUFFER; + fxMesa->ReadBuffer = GR_BUFFER_FRONTBUFFER; + } + + fxMesa->Color.ClearColor = 0x00000000; + fxMesa->Color.ClearAlpha = 0x00; + fxMesa->Color.ColorMask[RCOMP] = FXTRUE; + fxMesa->Color.ColorMask[BCOMP] = FXTRUE; + fxMesa->Color.ColorMask[GCOMP] = FXTRUE; + fxMesa->Color.ColorMask[ACOMP] = FXTRUE; + fxMesa->Color.MonoColor = 0xffffffff; + + fxMesa->Color.AlphaFunc = GR_CMP_ALWAYS; + fxMesa->Color.AlphaRef = 0x00; + fxMesa->Color.BlendSrcRGB = GR_BLEND_ONE; + fxMesa->Color.BlendDstRGB = GR_BLEND_ZERO; + fxMesa->Color.BlendSrcA = GR_BLEND_ONE; + fxMesa->Color.BlendSrcA = GR_BLEND_ZERO; + + fxMesa->Color.Dither = GR_DITHER_2x2; + + if ( fxMesa->glVis->DepthBits > 0 ) { + fxMesa->Depth.Mode = GR_DEPTHBUFFER_ZBUFFER; + } else { + fxMesa->Depth.Mode = GR_DEPTHBUFFER_DISABLE; + } + fxMesa->Depth.Bias = 0; + fxMesa->Depth.Func = GR_CMP_LESS; + fxMesa->Depth.Clear = 0; /* computed later */ + fxMesa->Depth.Mask = FXTRUE; + + + fxMesa->Fog.Mode = GR_FOG_DISABLE; + fxMesa->Fog.Color = 0x00000000; + fxMesa->Fog.Table = NULL; + fxMesa->Fog.Density = 1.0; + fxMesa->Fog.Near = 1.0; + fxMesa->Fog.Far = 1.0; + + fxMesa->Stencil.Function = GR_CMP_ALWAYS; + fxMesa->Stencil.RefValue = 0; + fxMesa->Stencil.ValueMask = 0xff; + fxMesa->Stencil.WriteMask = 0xff; + fxMesa->Stencil.FailFunc = 0; + fxMesa->Stencil.ZFailFunc = 0; + fxMesa->Stencil.ZPassFunc = 0; + fxMesa->Stencil.Clear = 0; + + fxMesa->Stipple.Mode = GR_STIPPLE_DISABLE; + fxMesa->Stipple.Pattern = 0xffffffff; + + fxMesa->Scissor.minX = 0; + fxMesa->Scissor.minY = 0; + fxMesa->Scissor.maxX = 0; + fxMesa->Scissor.maxY = 0; + + fxMesa->Viewport.Mode = GR_WINDOW_COORDS; + fxMesa->Viewport.X = 0; + fxMesa->Viewport.Y = 0; + fxMesa->Viewport.Width = 0; + fxMesa->Viewport.Height = 0; + fxMesa->Viewport.Near = 0.0; + fxMesa->Viewport.Far = 0.0; + + fxMesa->CullMode = GR_CULL_DISABLE; + + fxMesa->Glide.ColorFormat = GR_COLORFORMAT_ABGR; + fxMesa->Glide.Origin = GR_ORIGIN_LOWER_LEFT; + fxMesa->Glide.Initialized = FXFALSE; +} + + + +void tdfxDDInitStateFuncs( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + ctx->Driver.UpdateState = tdfxDDUpdateState; + + ctx->Driver.ClearIndex = NULL; + ctx->Driver.ClearColor = tdfxDDClearColor; + ctx->Driver.Index = NULL; + ctx->Driver.Color = tdfxDDColor; + ctx->Driver.SetDrawBuffer = tdfxDDSetDrawBuffer; + ctx->Driver.SetReadBuffer = tdfxDDSetReadBuffer; + + ctx->Driver.IndexMask = NULL; + ctx->Driver.ColorMask = tdfxDDColorMask; + + ctx->Driver.NearFar = tdfxDDNearFar; + + ctx->Driver.RenderStart = tdfxDDRenderStart; + ctx->Driver.RenderFinish = tdfxDDRenderFinish; + ctx->Driver.RasterSetup = NULL; + + ctx->Driver.RenderVBClippedTab = NULL; + ctx->Driver.RenderVBCulledTab = NULL; + ctx->Driver.RenderVBRawTab = NULL; + + ctx->Driver.ReducedPrimitiveChange = tdfxDDReducedPrimitiveChange; + ctx->Driver.MultipassFunc = NULL; + + ctx->Driver.AlphaFunc = tdfxDDAlphaFunc; + ctx->Driver.BlendEquation = tdfxDDBlendEquation; + ctx->Driver.BlendFunc = tdfxDDBlendFunc; + ctx->Driver.BlendFuncSeparate = tdfxDDBlendFuncSeparate; + ctx->Driver.ClearDepth = tdfxDDClearDepth; + ctx->Driver.ClearStencil = NULL; + ctx->Driver.CullFace = tdfxDDCullFace; + ctx->Driver.FrontFace = tdfxDDFrontFace; + ctx->Driver.DepthFunc = tdfxDDDepthFunc; + ctx->Driver.DepthMask = tdfxDDDepthMask; + ctx->Driver.DepthRange = NULL; + ctx->Driver.Enable = tdfxDDEnable; + ctx->Driver.Fogfv = tdfxDDFogfv; + ctx->Driver.Hint = NULL; + ctx->Driver.Lightfv = NULL; + ctx->Driver.LightModelfv = tdfxDDLightModelfv; + ctx->Driver.LineStipple = NULL; + ctx->Driver.LineWidth = tdfxDDLineWidth; + ctx->Driver.LogicOpcode = tdfxDDLogicOp; +#if 0 + ctx->Driver.PolygonMode = NULL; +#endif + ctx->Driver.PolygonStipple = tdfxDDPolygonStipple; + ctx->Driver.Scissor = tdfxDDScissor; + ctx->Driver.ShadeModel = tdfxDDShadeModel; + + if ( fxMesa->haveHwStencil ) { + ctx->Driver.StencilFunc = tdfxDDStencilFunc; + ctx->Driver.StencilMask = tdfxDDStencilMask; + ctx->Driver.StencilOp = tdfxDDStencilOp; + } else { + ctx->Driver.StencilFunc = NULL; + ctx->Driver.StencilMask = NULL; + ctx->Driver.StencilOp = NULL; + } + + ctx->Driver.Viewport = tdfxDDViewport; +} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.h:1.1 --- /dev/null Mon Jun 4 12:37:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.h Wed Mar 21 11:14:28 2001 @@ -0,0 +1,55 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * + */ + +#ifndef __TDFX_STATE_H__ +#define __TDFX_STATE_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "context.h" +#include "tdfx_context.h" + +extern void tdfxDDInitStateFuncs( GLcontext *ctx ); + +extern void tdfxDDUpdateHwState( GLcontext *ctx ); + +extern void tdfxInitState( tdfxContextPtr fxMesa ); + +extern void tdfxUpdateClipping( GLcontext *ctx ); + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c:1.1.2.1 --- /dev/null Mon Jun 4 12:37:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c Tue May 22 17:25:41 2001 @@ -0,0 +1,1060 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c,v 1.1.2.1 2001/05/22 21:25:41 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * + */ + +#include "tdfx_context.h" +#include "tdfx_tex.h" +#include "tdfx_texman.h" + +#include "enums.h" +#include "image.h" +#include "texutil.h" + +#define TX_DITHER_NONE 0x00000000 + + +static int logbase2( int n ) +{ + GLint i = 1; + GLint log2 = 0; + + if ( n < 0 ) + return -1; + + while ( n > i ) { + i *= 2; + log2++; + } + if ( i != n ) { + return -1; + } else { + return log2; + } +} + +/* Compute various texture image parameters. + * Input: w, h - source texture width and height + * Output: lodlevel - Glide lod level token for the larger texture dimension + * aspectratio - Glide aspect ratio token + * sscale - S scale factor used during triangle setup + * tscale - T scale factor used during triangle setup + * wscale - OpenGL -> Glide image width scale factor + * hscale - OpenGL -> Glide image height scale factor + * + * Sample results: + * w h lodlevel aspectRatio + * 128 128 GR_LOD_LOG2_128 (=7) GR_ASPECT_LOG2_1x1 (=0) + * 64 64 GR_LOD_LOG2_64 (=6) GR_ASPECT_LOG2_1x1 (=0) + * 64 32 GR_LOD_LOG2_64 (=6) GR_ASPECT_LOG2_2x1 (=1) + * 32 64 GR_LOD_LOG2_64 (=6) GR_ASPECT_LOG2_1x2 (=-1) + * 32 32 GR_LOD_LOG2_32 (=5) GR_ASPECT_LOG2_1x1 (=0) + */ +static void tdfxTexGetInfo( const GLcontext *ctx, int w, int h, + GrLOD_t *lodlevel, GrAspectRatio_t *aspectratio, + float *sscale, float *tscale, + int *wscale, int *hscale ) +{ + int logw, logh, ar, lod, ws, hs; + float s, t; + + ASSERT( w >= 1 ); + ASSERT( h >= 1 ); + + logw = logbase2( w ); + logh = logbase2( h ); + ar = logw - logh; /* aspect ratio = difference in log dimensions */ + + /* Hardware only allows a maximum aspect ratio of 8x1, so handle + * |ar| > 3 by scaling the image and using an 8x1 aspect ratio. + */ + if ( ar >= 0 ) { + ASSERT( w >= h ); + lod = logw; + s = 256.0; + ws = 1; + if ( ar <= GR_ASPECT_LOG2_8x1 ) { + t = 256 >> ar; + hs = 1; + } else { + /* have to stretch image height */ + t = 32.0; + hs = 1 << (ar - 3); + } + } else { + ASSERT( w < h ); + lod = logh; + t = 256.0; + hs = 1; + if ( ar >= GR_ASPECT_LOG2_1x8 ) { + s = 256 >> -ar; + ws = 1; + } else { + /* have to stretch image width */ + s = 32.0; + ws = 1 << (-ar - 3); + } + } + + if ( ar < GR_ASPECT_LOG2_1x8 ) { + ar = GR_ASPECT_LOG2_1x8; + } else if ( ar > GR_ASPECT_LOG2_8x1 ) { + ar = GR_ASPECT_LOG2_8x1; + } + + if ( lodlevel ) + *lodlevel = (GrLOD_t)lod; + if ( aspectratio ) + *aspectratio = (GrAspectRatio_t)ar; + if ( sscale ) + *sscale = s; + if ( tscale ) + *tscale = t; + if ( wscale ) + *wscale = ws; + if ( hscale ) + *hscale = hs; +} + + +/* We need to call this when a texture object's minification filter + * or texture image sizes change. + */ +static void tdfxRevalidateTexture( GLcontext *ctx, + struct gl_texture_object *tObj ) +{ + tdfxTexObjPtr t = TDFX_TEXTURE_DATA(tObj); + GLint minl, maxl; + + if ( !t ) + return; + + minl = maxl = tObj->BaseLevel; + + if ( tObj->Image[minl] ) { + maxl = MIN2( tObj->MaxLevel, tObj->Image[minl]->MaxLog2 ); + + /* Compute largeLodLog2, aspect ratio and texcoord scale factors. + */ + tdfxTexGetInfo( ctx, + tObj->Image[minl]->Width, tObj->Image[minl]->Height, + &t->info.largeLodLog2, &t->info.aspectRatioLog2, + &t->sScale, &t->tScale, NULL, NULL ); + } + + if ( tObj->Image[maxl] && + tObj->MinFilter != GL_NEAREST && + tObj->MinFilter != GL_LINEAR ) { + /* Mipmapping: need to compute smallLodLog2 */ + tdfxTexGetInfo( ctx, + tObj->Image[maxl]->Width, tObj->Image[maxl]->Height, + &t->info.smallLodLog2, + NULL, NULL, NULL, NULL, NULL ); + } else { + /* Not mipmapping: smallLodLog2 = largeLodLog2 */ + t->info.smallLodLog2 = t->info.largeLodLog2; + } + + t->minLevel = minl; + t->maxLevel = maxl; + t->info.data = NULL; +} + + +static tdfxTexObjPtr tdfxAllocTexObj( tdfxContextPtr fxMesa ) +{ + tdfxTexObjPtr t; + int i; + + t = CALLOC( sizeof(tdfxTexObj) ); + if ( !t ) { + gl_problem( NULL, "tdfx driver: out of memory" ); + return NULL; + } + + t->isInTM = GL_FALSE; + + t->whichTMU = TDFX_TMU_NONE; + + t->range[TDFX_TMU0] = NULL; + t->range[TDFX_TMU1] = NULL; + + t->minFilt = GR_TEXTUREFILTER_POINT_SAMPLED; + t->magFilt = GR_TEXTUREFILTER_BILINEAR; + + t->sClamp = GR_TEXTURECLAMP_WRAP; + t->tClamp = GR_TEXTURECLAMP_WRAP; + + t->mmMode = GR_MIPMAP_NEAREST; + t->LODblend = FXFALSE; + + for ( i = 0 ; i < MAX_TEXTURE_LEVELS ; i++ ) { + t->image[i].original.data = NULL; + t->image[i].rescaled.data = NULL; + } + + return t; +} + + +/* Given an OpenGL internal texture format, return the corresponding + * Glide internal texture format and MesaIntTexFormat. + * If allow32bpp is true, we'll return 32-bit texel formats when + * appropriate. + */ +static GrTextureFormat_t +tdfxTexGetFormat( tdfxContextPtr fxMesa, struct gl_texture_image *texImage, + GLenum format, GLenum type ) +{ + const GLboolean allow32bpp = TDFX_IS_NAPALM(fxMesa); + const GLboolean is32bpp = ( fxMesa->fxScreen->cpp == 4 ); + const struct gl_texture_format *texFormat; + GrTextureFormat_t ret; + + if ( 0 ) + fprintf( stderr, "internal=%s format=%s type=%s\n", + texImage->IntFormat == 3 ? "GL_RGB (3)" : + texImage->IntFormat == 4 ? "GL_RGBA (4)" : + gl_lookup_enum_by_nr( texImage->IntFormat ), + gl_lookup_enum_by_nr( format ), + gl_lookup_enum_by_nr( type ) ); + +#define SET_FORMAT( gr, gl ) \ + do { \ + ret = (gr); \ + texFormat = &(gl); \ + } while (0) + +#define SET_FORMAT_32BPP( gr32, gl32, gr16, gl16 ) \ + do { \ + if ( allow32bpp ) { \ + ret = (gr32); \ + texFormat = &(gl32); \ + } else { \ + ret = (gr16); \ + texFormat = &(gl16); \ + } \ + } while (0) + + switch ( texImage->IntFormat ) { + /* GH: Bias towards GL_RGB, GL_RGBA texture formats. This has + * got to be better than sticking them way down the end of this + * huge list. + */ + case GL_RGBA: + case 4: + if ( format == GL_BGRA ) { + if ( type == GL_UNSIGNED_INT_8_8_8_8_REV && allow32bpp ) { + SET_FORMAT( GR_TEXFMT_ARGB_8888, _mesa_texformat_argb8888 ); + break; + } else if ( type == GL_UNSIGNED_SHORT_4_4_4_4_REV ) { + SET_FORMAT( GR_TEXFMT_ARGB_4444, _mesa_texformat_argb4444 ); + break; + } else if ( type == GL_UNSIGNED_SHORT_1_5_5_5_REV ) { + SET_FORMAT( GR_TEXFMT_ARGB_1555, _mesa_texformat_argb1555 ); + break; + } + } + if ( allow32bpp && is32bpp ) { + SET_FORMAT( GR_TEXFMT_ARGB_8888, _mesa_texformat_argb8888 ); + } else { + SET_FORMAT( GR_TEXFMT_ARGB_4444, _mesa_texformat_argb4444 ); + } + break; + + case GL_RGB: + case 3: + if ( format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5 ) { + SET_FORMAT( GR_TEXFMT_RGB_565, _mesa_texformat_rgb565 ); + break; + } + if ( allow32bpp && is32bpp ) { + SET_FORMAT( GR_TEXFMT_ARGB_8888, _mesa_texformat_argb8888 ); + } else { + SET_FORMAT( GR_TEXFMT_RGB_565, _mesa_texformat_rgb565 ); + } + break; + + /* GH: Okay, keep checking as normal. Still test for GL_RGB, + * GL_RGBA formats first. + */ + case GL_RGBA8: + case GL_RGB10_A2: + case GL_RGBA12: + case GL_RGBA16: + SET_FORMAT_32BPP( GR_TEXFMT_ARGB_8888, _mesa_texformat_argb8888, + GR_TEXFMT_ARGB_4444, _mesa_texformat_argb4444 ); + break; + + case GL_RGBA4: + case GL_RGBA2: + SET_FORMAT( GR_TEXFMT_ARGB_4444, _mesa_texformat_argb4444 ); + break; + + case GL_RGB5_A1: + SET_FORMAT( GR_TEXFMT_ARGB_1555, _mesa_texformat_argb1555 ); + break; + + case GL_RGB8: + case GL_RGB10: + case GL_RGB12: + case GL_RGB16: + SET_FORMAT_32BPP( GR_TEXFMT_ARGB_8888, _mesa_texformat_argb8888, + GR_TEXFMT_RGB_565, _mesa_texformat_rgb565 ); + break; + + case GL_RGB5: + case GL_RGB4: + case GL_R3_G3_B2: + SET_FORMAT( GR_TEXFMT_RGB_565, _mesa_texformat_rgb565 ); + break; + + case GL_ALPHA: + case GL_ALPHA4: + case GL_ALPHA8: + case GL_ALPHA12: + case GL_ALPHA16: + SET_FORMAT( GR_TEXFMT_ALPHA_8, _mesa_texformat_a8 ); + break; + + case 1: + case GL_LUMINANCE: + case GL_LUMINANCE4: + case GL_LUMINANCE8: + case GL_LUMINANCE12: + case GL_LUMINANCE16: + SET_FORMAT( GR_TEXFMT_INTENSITY_8, _mesa_texformat_l8 ); + break; + + case 2: + case GL_LUMINANCE_ALPHA: + case GL_LUMINANCE4_ALPHA4: + case GL_LUMINANCE6_ALPHA2: + case GL_LUMINANCE8_ALPHA8: + case GL_LUMINANCE12_ALPHA4: + case GL_LUMINANCE12_ALPHA12: + case GL_LUMINANCE16_ALPHA16: + SET_FORMAT( GR_TEXFMT_ALPHA_INTENSITY_88, _mesa_texformat_al88 ); + break; + + case GL_INTENSITY: + case GL_INTENSITY4: + case GL_INTENSITY8: + case GL_INTENSITY12: + case GL_INTENSITY16: + SET_FORMAT( GR_TEXFMT_ALPHA_8, _mesa_texformat_i8 ); + break; + + case GL_COLOR_INDEX: + case GL_COLOR_INDEX1_EXT: + case GL_COLOR_INDEX2_EXT: + case GL_COLOR_INDEX4_EXT: + case GL_COLOR_INDEX8_EXT: + case GL_COLOR_INDEX12_EXT: + case GL_COLOR_INDEX16_EXT: + SET_FORMAT( GR_TEXFMT_P_8, _mesa_texformat_ci8 ); + break; + + default: + fprintf( stderr, "bad texture format in fxTexGetFormat() %d", + texImage->IntFormat ); + return -1; + } + + texImage->TexFormat = texFormat; + + return ret; +} + + +static GLboolean +tdfxDDTexImage2D( GLcontext *ctx, GLenum target, GLint level, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage, + GLboolean *retainInternalCopy ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + const struct gl_texture_format *texFormat; + GrTextureFormat_t glideFormat; + tdfxTexObjPtr t; + tdfxTexImagePtr image; + GLint dstWidth, dstHeight, wScale, hScale; + GLint size; + void *data; + + if ( 0 ) { + printf("TexImage id=%d int 0x%x format 0x%x type 0x%x %dx%d\n", + texObj->Name, texImage->IntFormat, format, type, + texImage->Width, texImage->Height); + } + + if ( target != GL_TEXTURE_2D || texImage->Border > 0 ) + return GL_FALSE; + + if ( !texObj->DriverData ) + texObj->DriverData = tdfxAllocTexObj( fxMesa ); + + t = TDFX_TEXTURE_DATA(texObj); + image = &t->image[level]; + + /* Determine the appropriate GL internal texel format, Mesa internal + * texel format, and texelSize (bytes) given the user's internal + * texture format hint. + */ + glideFormat = tdfxTexGetFormat( fxMesa, texImage, format, type ); + + /* Get the destination internal format. + */ + texFormat = texImage->TexFormat; + + /* Determine width and height scale factors for texture. Remember, + * Glide is limited to 8:1 aspect ratios. + */ + tdfxTexGetInfo( ctx, + texImage->Width, texImage->Height, + NULL, NULL, NULL, NULL, + &wScale, &hScale ); + dstWidth = texImage->Width * wScale; + dstHeight = texImage->Height * hScale; + + /* Allocate new storage for texture image, if needed. This + * conditional wants to set uncompressedImage to point to the + * uncompressed image, and mml->data to the texture data. If the + * image is uncompressed, these are identical. If the image is not + * compressed, these are different. + */ + if ( !image->original.data || image->glideFormat != glideFormat || + image->original.width != texImage->Width || + image->original.height != texImage->Height ) + { + if ( image->original.data ) { + FREE( image->original.data ); + image->original.data = NULL; + } + if ( image->rescaled.data ) { + FREE( image->rescaled.data ); + image->rescaled.data = NULL; + } + + size = texImage->Width * texImage->Height * texFormat->TexelBytes; + image->original.data = (void *) MALLOC( size ); + if ( !image->original.data ) + return GL_FALSE; + + image->original.width = texImage->Width; + image->original.height = texImage->Height; + image->original.size = size; + + image->glideFormat = glideFormat; + image->wScale = wScale; + image->hScale = hScale; + + t->info.format = glideFormat; + tdfxTMMoveOutTM( fxMesa, texObj ); + } + + /* Store the texture image into the 'original' space. + */ + if ( !_mesa_convert_texsubimage2d( texFormat->IntFormat, + 0, 0, texImage->Width, + texImage->Height, texImage->Width, + format, type, packing, pixels, + image->original.data ) ) { + return GL_FALSE; + } + + data = image->original.data; + size = image->original.size; + + /* GH: Sigh... + */ + if ( wScale > 1 || hScale > 1 ) { + if ( image->rescaled.data ) { + FREE( image->rescaled.data ); + image->rescaled.data = NULL; + } + + size = dstWidth * dstHeight * texFormat->TexelBytes; + image->rescaled.data = (void *) MALLOC( size ); + if ( !image->rescaled.data ) + return GL_FALSE; + + image->rescaled.width = dstWidth; + image->rescaled.height = dstHeight; + image->rescaled.size = size; + + _mesa_rescale_teximage2d( texFormat, + texImage->Width, texImage->Height, + dstWidth, dstHeight, + image->original.data, image->rescaled.data ); + + data = image->rescaled.data; + } + + image->data = data; + image->size = size; + + tdfxRevalidateTexture( ctx, texObj ); + + t->reloadImages = GL_TRUE; + fxMesa->new_state |= TDFX_NEW_TEXTURE; + + *retainInternalCopy = GL_FALSE; + return GL_TRUE; +} + + +static GLboolean +tdfxDDTexSubImage2D( GLcontext *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + tdfxTexObjPtr t = TDFX_TEXTURE_DATA(texObj); + tdfxTexImagePtr image; + + if ( target != GL_TEXTURE_2D ) + return GL_FALSE; + + if ( !t ) + return GL_FALSE; + + if ( 0 ) { + fprintf( stderr, "TexSubImage id=%d lvl=%d int=0x%x format=0x%x type=0x%x x=%d y=%d w=%d h=%d fullW=%d fullH=%d\n", + texObj->Name, level, texImage->IntFormat, format, type, + xoffset, yoffset, width, height, + texImage->Width, texImage->Height ); + } + + image = &t->image[level]; + + /* Must have an existing texture image! + */ + assert( image->original.data ); + + if ( !_mesa_convert_texsubimage2d( texImage->TexFormat->IntFormat, + xoffset, yoffset, width, height, + texImage->Width, + format, type, packing, + pixels, image->original.data ) ) { + return GL_FALSE; + } + + /* Rescale the original image again if we have to. + */ + if ( image->wScale > 1 || image->hScale > 1 ) { + assert( image->rescaled.data ); + _mesa_rescale_teximage2d( texImage->TexFormat, + image->original.width, image->original.height, + image->rescaled.width, image->rescaled.height, + image->original.data, image->rescaled.data ); + } + + t->reloadImages = GL_TRUE; /* signal the image needs to be reloaded */ + fxMesa->new_state |= TDFX_NEW_TEXTURE; /* XXX this might be a bit much */ + + return GL_TRUE; +} + + + +/* ================================================================ + * + */ + +static void tdfxDDTexEnv( GLcontext *ctx, GLenum target, + GLenum pname, const GLfloat *param ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + if ( param ) { + fprintf( stderr, __FUNCTION__"( %x, %x )\n", pname, (GLint)(*param) ); + } else { + fprintf( stderr, __FUNCTION__"( %x )\n", pname ); + } + } + + fxMesa->new_state |= TDFX_NEW_TEXTURE; +} + +static void tdfxDDTexParameter( GLcontext *ctx, GLenum target, + struct gl_texture_object *tObj, + GLenum pname, const GLfloat *params ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GLenum param = (GLenum) (GLint) params[0]; + tdfxTexObjPtr t; + + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, __FUNCTION__ "( %d, %p, %x, %x )\n", + tObj->Name, tObj->DriverData, pname, param ); + } + + if ( target != GL_TEXTURE_2D ) + return; + + if ( !tObj->DriverData ) + tObj->DriverData = tdfxAllocTexObj( fxMesa ); + + t = TDFX_TEXTURE_DATA(tObj); + + switch ( pname ) { + case GL_TEXTURE_MIN_FILTER: + switch ( param ) { + case GL_NEAREST: + t->mmMode = GR_MIPMAP_DISABLE; + t->minFilt = GR_TEXTUREFILTER_POINT_SAMPLED; + t->LODblend = FXFALSE; + break; + + case GL_LINEAR: + t->mmMode = GR_MIPMAP_DISABLE; + t->minFilt = GR_TEXTUREFILTER_BILINEAR; + t->LODblend = FXFALSE; + break; + + case GL_NEAREST_MIPMAP_LINEAR: + if ( TDFX_IS_NAPALM(fxMesa) ) { + if ( fxMesa->numTMUs > 1 ) { + t->mmMode = GR_MIPMAP_NEAREST; + t->LODblend = FXTRUE; + } else { + t->mmMode = GR_MIPMAP_NEAREST_DITHER; + t->LODblend = FXFALSE; + } + t->minFilt = GR_TEXTUREFILTER_POINT_SAMPLED; + break; + } + /* XXX Voodoo3/Banshee mipmap blending seems to produce + * incorrectly filtered colors for the smallest mipmap levels. + * To work-around we fall-through here and use a different filter. + */ + case GL_NEAREST_MIPMAP_NEAREST: + t->mmMode = GR_MIPMAP_NEAREST; + t->minFilt = GR_TEXTUREFILTER_POINT_SAMPLED; + t->LODblend = FXFALSE; + break; + + case GL_LINEAR_MIPMAP_LINEAR: + if ( TDFX_IS_NAPALM(fxMesa) ) { + if ( fxMesa->numTMUs > 1 ) { + t->mmMode = GR_MIPMAP_NEAREST; + t->LODblend = FXTRUE; + } else { + t->mmMode = GR_MIPMAP_NEAREST_DITHER; + t->LODblend = FXFALSE; + } + t->minFilt = GR_TEXTUREFILTER_BILINEAR; + break; + } + /* XXX Voodoo3/Banshee mipmap blending seems to produce + * incorrectly filtered colors for the smallest mipmap levels. + * To work-around we fall-through here and use a different filter. + */ + case GL_LINEAR_MIPMAP_NEAREST: + t->mmMode = GR_MIPMAP_NEAREST; + t->minFilt = GR_TEXTUREFILTER_BILINEAR; + t->LODblend = FXFALSE; + break; + default: + break; + } + tdfxRevalidateTexture( ctx, tObj ); + fxMesa->new_state |= TDFX_NEW_TEXTURE; + break; + + case GL_TEXTURE_MAG_FILTER: + switch ( param ) { + case GL_NEAREST: + t->magFilt = GR_TEXTUREFILTER_POINT_SAMPLED; + break; + case GL_LINEAR: + t->magFilt = GR_TEXTUREFILTER_BILINEAR; + break; + default: + break; + } + fxMesa->new_state |= TDFX_NEW_TEXTURE; + break; + + case GL_TEXTURE_WRAP_S: + switch ( param ) { + case GL_CLAMP: + t->sClamp = GR_TEXTURECLAMP_CLAMP; + break; + case GL_REPEAT: + t->sClamp = GR_TEXTURECLAMP_WRAP; + break; + default: + break; + } + fxMesa->new_state |= TDFX_NEW_TEXTURE; + break; + + case GL_TEXTURE_WRAP_T: + switch ( param ) { + case GL_CLAMP: + t->tClamp = GR_TEXTURECLAMP_CLAMP; + break; + case GL_REPEAT: + t->tClamp = GR_TEXTURECLAMP_WRAP; + break; + default: + break; + } + fxMesa->new_state |= TDFX_NEW_TEXTURE; + break; + + case GL_TEXTURE_BASE_LEVEL: + tdfxRevalidateTexture( ctx, tObj ); + break; + + case GL_TEXTURE_MAX_LEVEL: + tdfxRevalidateTexture( ctx, tObj ); + break; + + case GL_TEXTURE_BORDER_COLOR: + /* TO DO */ + break; + case GL_TEXTURE_MIN_LOD: + /* TO DO */ + break; + case GL_TEXTURE_MAX_LOD: + /* TO DO */ + break; + + default: + break; + } +} + +static void tdfxDDBindTexture( GLcontext *ctx, GLenum target, + struct gl_texture_object *tObj ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + tdfxTexObjPtr t; + + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, __FUNCTION__ "( %d, %p )\n", + tObj->Name, tObj->DriverData ); + } + + if ( target != GL_TEXTURE_2D ) + return; + + if ( !tObj->DriverData ) + tObj->DriverData = tdfxAllocTexObj( fxMesa ); + + t = TDFX_TEXTURE_DATA(tObj); + t->lastTimeUsed = fxMesa->texBindNumber++; + + fxMesa->new_state |= TDFX_NEW_TEXTURE; +} + +static void tdfxDDDeleteTexture( GLcontext *ctx, + struct gl_texture_object *tObj ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + if ( fxMesa->driDrawable ) { + LOCK_HARDWARE( fxMesa ); + tdfxTMFreeTextureLocked( fxMesa, tObj ); + UNLOCK_HARDWARE( fxMesa ); + } + + fxMesa->new_state |= TDFX_NEW_TEXTURE; +} + +static GLboolean tdfxDDIsTextureResident( GLcontext *ctx, + struct gl_texture_object *tObj ) +{ + tdfxTexObjPtr t = TDFX_TEXTURE_DATA(tObj); + + return ( t && t->isInTM ); +} + + +/* Convert a gl_color_table texture palette to Glide's format. + */ +static void +tdfxConvertPalette( FxU32 data[256], const struct gl_color_table *table ) +{ + const GLubyte *tableUB = (const GLubyte *) table->Table; + GLint width = table->Size; + FxU32 r, g, b, a; + GLint i; + + ASSERT( table->TableType == GL_UNSIGNED_BYTE ); + + switch ( table->Format ) { + case GL_RGBA: + for ( i = 0 ; i < width ; i++ ) { + r = tableUB[i * 4 + 0]; + g = tableUB[i * 4 + 1]; + b = tableUB[i * 4 + 2]; + a = tableUB[i * 4 + 3]; + data[i] = PACK_COLOR_8888( a, r, g, b ); + } + break; + case GL_RGB: + for ( i = 0 ; i < width ; i++ ) { + r = tableUB[i * 3 + 0]; + g = tableUB[i * 3 + 1]; + b = tableUB[i * 3 + 2]; + a = 255; + data[i] = PACK_COLOR_8888( a, r, g, b ); + } + break; + case GL_LUMINANCE: + for ( i = 0 ; i < width ; i++ ) { + r = tableUB[i]; + g = tableUB[i]; + b = tableUB[i]; + a = 255; + data[i] = PACK_COLOR_8888( a, r, g, b ); + } + break; + case GL_ALPHA: + for ( i = 0 ; i < width ; i++ ) { + r = g = b = 255; + a = tableUB[i]; + data[i] = PACK_COLOR_8888( a, r, g, b ); + } + break; + case GL_LUMINANCE_ALPHA: + for ( i = 0 ; i < width ; i++ ) { + r = g = b = tableUB[i * 2 + 0]; + a = tableUB[i * 2 + 1]; + data[i] = PACK_COLOR_8888( a, r, g, b ); + } + break; + case GL_INTENSITY: + for ( i = 0 ; i < width ; i++ ) { + r = tableUB[i]; + g = tableUB[i]; + b = tableUB[i]; + a = tableUB[i]; + data[i] = PACK_COLOR_8888( a, r, g, b ); + } + break; + } +} + +static void +tdfxDDTexturePalette( GLcontext *ctx, struct gl_texture_object *tObj ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + tdfxTexObjPtr t; + + if ( tObj ) { + /* Per-texture palette */ + if ( !tObj->DriverData ) + tObj->DriverData = tdfxAllocTexObj(fxMesa); + + t = TDFX_TEXTURE_DATA(tObj); + tdfxConvertPalette( t->palette.data, &tObj->Palette ); + /*tdfxTexInvalidate( ctx, tObj );*/ + } else { + /* Global texture palette */ + tdfxConvertPalette( fxMesa->glbPalette.data, &ctx->Texture.Palette ); + } + + fxMesa->new_state |= TDFX_NEW_TEXTURE; /* XXX too heavy-handed */ +} + + + + +/**********************************************************************/ +/**** NEW TEXTURE IMAGE FUNCTIONS ****/ +/**********************************************************************/ + + + +#if 0 +static void +PrintTexture(int w, int h, int c, const GLubyte * data) +{ + int i, j; + for (i = 0; i < h; i++) { + for (j = 0; j < w; j++) { + if (c == 2) + printf("%02x %02x ", data[0], data[1]); + else if (c == 3) + printf("%02x %02x %02x ", data[0], data[1], data[2]); + data += c; + } + printf("\n"); + } +} +#endif + + +static GLboolean +tdfxDDTestProxyTexImage( GLcontext *ctx, GLenum target, + GLint level, GLint internalFormat, + GLenum format, GLenum type, + GLint width, GLint height, + GLint depth, GLint border ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + struct gl_shared_state *ss = fxMesa->glCtx->Shared; + tdfxSharedStatePtr tss = (tdfxSharedStatePtr)ss->DriverData; + + switch (target) { + case GL_PROXY_TEXTURE_1D: + return GL_TRUE; /* software rendering */ + case GL_PROXY_TEXTURE_2D: + { + struct gl_texture_object *tObj; + tdfxTexObjPtr t; + int memNeeded; + + tObj = ctx->Texture.Proxy2D; + if (!tObj->DriverData) + tObj->DriverData = tdfxAllocTexObj(fxMesa); + t = TDFX_TEXTURE_DATA(tObj); + + /* assign the parameters to test against */ + tObj->Image[level]->Width = width; + tObj->Image[level]->Height = height; + tObj->Image[level]->Border = border; + tObj->Image[level]->IntFormat = internalFormat; + if (level == 0) { + /* don't use mipmap levels > 0 */ + tObj->MinFilter = tObj->MagFilter = GL_NEAREST; + } + else { + /* test with all mipmap levels */ + tObj->MinFilter = GL_LINEAR_MIPMAP_LINEAR; + tObj->MagFilter = GL_NEAREST; + } + tdfxRevalidateTexture(ctx, tObj); + + /* + printf("small lodlog2 0x%x\n", t->info.smallLodLog2); + printf("large lodlog2 0x%x\n", t->info.largeLodLog2); + printf("aspect ratio 0x%x\n", t->info.aspectRatioLog2); + printf("glide format 0x%x\n", t->info.format); + printf("data %p\n", t->info.data); + printf("lodblend %d\n", (int) t->LODblend); + */ + + /* determine where texture will reside */ + if (t->LODblend && !tss->umaTexMemory) { + /* XXX GR_MIPMAPLEVELMASK_BOTH might not be right, but works */ + memNeeded = FX_grTexTextureMemRequired_NoLock( + GR_MIPMAPLEVELMASK_BOTH, &(t->info)); + } + else { + /* XXX GR_MIPMAPLEVELMASK_BOTH might not be right, but works */ + memNeeded = FX_grTexTextureMemRequired_NoLock( + GR_MIPMAPLEVELMASK_BOTH, &(t->info)); + } + /* + printf("Proxy test %d > %d\n", memNeeded, tss->totalTexMem[0]); + */ + if (memNeeded > tss->totalTexMem[0]) + return GL_FALSE; + else + return GL_TRUE; + } + case GL_PROXY_TEXTURE_3D: + return GL_TRUE; /* software rendering */ + default: + return GL_TRUE; /* never happens, silence compiler */ + } +} + + +/* Return a texture image to Mesa. This is either to satisfy + * a glGetTexImage() call or to prepare for software texturing. + */ +static GLvoid * +tdfxDDGetTexImage( GLcontext *ctx, GLenum target, GLint level, + const struct gl_texture_object *texObj, + GLenum *formatOut, GLenum *typeOut, + GLboolean *freeImageOut ) +{ + const struct gl_texture_image *texImage = texObj->Image[level]; + const struct gl_texture_format *texFormat = texImage->TexFormat; + tdfxTexObjPtr t = TDFX_TEXTURE_DATA(texObj); + tdfxTexImagePtr image; + GLubyte *data; + + if ( target != GL_TEXTURE_2D ) + return NULL; + if ( !t ) + return NULL; + + image = &t->image[level]; + if ( !image->original.data ) + return NULL; + + data = (GLubyte *) MALLOC( texImage->Width * texImage->Height * 4 ); + if ( !data ) + return NULL; + + _mesa_unconvert_teximage2d( texFormat->IntFormat, texImage->Format, + texImage->Width, texImage->Height, + image->original.data, data ); + + *formatOut = texImage->Format; + *typeOut = GL_UNSIGNED_BYTE; + *freeImageOut = GL_TRUE; + + return data; +} + + +void tdfxDDInitTextureFuncs( GLcontext *ctx ) +{ + ctx->Driver.TexImage2D = tdfxDDTexImage2D; + ctx->Driver.TexSubImage2D = tdfxDDTexSubImage2D; + ctx->Driver.GetTexImage = tdfxDDGetTexImage; + ctx->Driver.TexEnv = tdfxDDTexEnv; + ctx->Driver.TexParameter = tdfxDDTexParameter; + ctx->Driver.BindTexture = tdfxDDBindTexture; + ctx->Driver.DeleteTexture = tdfxDDDeleteTexture; + ctx->Driver.IsTextureResident = tdfxDDIsTextureResident; + ctx->Driver.UpdateTexturePalette = tdfxDDTexturePalette; +} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.h:1.1 --- /dev/null Mon Jun 4 12:37:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.h Wed Mar 21 11:14:28 2001 @@ -0,0 +1,46 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * + */ + +#ifndef __TDFX_TEX_H__ +#define __TDFX_TEX_H__ + +extern void tdfxUpdateTextureState( GLcontext *ctx ); +extern void tdfxUpdateTextureBinding( GLcontext *ctx ); + +extern void tdfxDDInitTextureFuncs( GLcontext *ctx ); + +#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c:1.2.2.1 --- /dev/null Mon Jun 4 12:37:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c Tue May 22 17:25:41 2001 @@ -0,0 +1,908 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c,v 1.2.2.1 2001/05/22 21:25:41 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * + */ + +#include "tdfx_context.h" +#include "tdfx_tex.h" +#include "tdfx_texman.h" + +#define BAD_ADDRESS ((FxU32) -1) + +/* Verify the consistancy of the texture memory manager. + * This involves: + * Traversing all texture objects and computing total memory used. + * Traverse the free block list and computing total memory free. + * Compare the total free and total used amounts to the total memory size. + * Make various assertions about the results. + */ +static void tdfxTMVerifyFreeList( tdfxContextPtr fxMesa, FxU32 unit ) +{ + struct gl_shared_state *ss = fxMesa->glCtx->Shared; + struct gl_texture_object *texObj; + tdfxSharedStatePtr tss = (tdfxSharedStatePtr)ss->DriverData; + tdfxMemRange *block; + int prevStart = -1, prevEnd = -1; + int totalFree = 0; + int numObj = 0, numRes = 0; + int totalUsed = 0; + + for ( block = tss->freeRanges[unit] ; block ; block = block->next ) { + assert( block->endAddr > 0 ); + assert( block->startAddr <= tss->totalTexMem[unit] ); + assert( block->endAddr <= tss->totalTexMem[unit] ); + assert( (int) block->startAddr > prevStart ); + assert( (int) block->startAddr >= prevEnd ); + prevStart = (int) block->startAddr; + prevEnd = (int) block->endAddr; + totalFree += (block->endAddr - block->startAddr); + } + assert( totalFree == tss->freeTexMem[unit] ); + + for ( texObj = ss->TexObjectList ; texObj ; texObj = texObj->Next ) { + tdfxTexObjPtr t = TDFX_TEXTURE_DATA(texObj); + numObj++; + if ( t ) { + if ( t->isInTM ) { + numRes++; + assert( t->range[0] ); + if ( t->range[unit] ) + totalUsed += (t->range[unit]->endAddr - t->range[unit]->startAddr); + } else { + assert(!t->range[0]); + } + } + } + + fprintf( stderr, + "totalFree: %d totalUsed: %d totalMem: %d #objs=%d #res=%d\n", + tss->freeTexMem[unit], totalUsed, tss->totalTexMem[unit], + numObj, numRes ); + + assert( totalUsed + totalFree == tss->totalTexMem[unit] ); +} + +static void tdfxTMDumpTexMem( tdfxContextPtr fxMesa ) +{ + struct gl_shared_state *ss = fxMesa->glCtx->Shared; + tdfxSharedStatePtr tss = (tdfxSharedStatePtr)ss->DriverData; + struct gl_texture_object *texObj; + tdfxMemRange *r; + FxU32 prev; + + printf( "DUMP Objects:\n" ); + for ( texObj = ss->TexObjectList ; texObj ; texObj = texObj->Next ) { + tdfxTexObjPtr t = TDFX_TEXTURE_DATA(texObj); + + if ( t && t->isInTM ) { + printf( "Obj %8p: %4d info = %p\n", texObj, texObj->Name, t ); + + printf( " isInTM=%d whichTMU=%ld lastTimeUsed=%d\n", + t->isInTM, t->whichTMU, t->lastTimeUsed ); + printf( " tm[0] = %p", t->range[0] ); + assert( t->range[0] ); + if ( t->range[0] ) { + printf( " tm startAddr = %ld endAddr = %ld", + t->range[0]->startAddr, + t->range[0]->endAddr ); + } + printf( "\n" ); + printf( " tm[1] = %p", t->range[1] ); + if ( t->range[1] ) { + printf( " tm startAddr = %ld endAddr = %ld", + t->range[1]->startAddr, + t->range[1]->endAddr ); + } + printf( "\n" ); + } + } + + tdfxTMVerifyFreeList( fxMesa, 0 ); + tdfxTMVerifyFreeList( fxMesa, 1 ); + + printf( "Free memory unit 0: %d bytes\n", tss->freeTexMem[0] ); + prev = 0; + for ( r = tss->freeRanges[0] ; r ; r = r->next ) { + printf( "%8p: start %8ld end %8ld size %8ld gap %8ld\n", + r, r->startAddr, r->endAddr, r->endAddr - r->startAddr, + r->startAddr - prev ); + prev = r->endAddr; + } + + printf( "Free memory unit 1: %d bytes\n", tss->freeTexMem[1] ); + prev = 0; + for ( r = tss->freeRanges[1] ; r ; r = r->next ) { + printf( "%8p: start %8ld end %8ld size %8ld gap %8ld\n", + r, r->startAddr, r->endAddr, r->endAddr - r->startAddr, + r->startAddr - prev ); + prev = r->endAddr; + } +} + + +#ifdef TEXSANITY +static void fubar( void ) +{ + /* GH: What am I meant to do??? */ +} + +/* Sanity Check + */ +static void sanity( tdfxContextPtr fxMesa ) +{ + tdfxMemRange *tmp, *prev, *pos; + + prev = 0; + tmp = fxMesa->freeRanges[0]; + while ( tmp ) { + if ( !tmp->startAddr && !tmp->endAddr ) { + fprintf( stderr, "Textures fubar\n" ); + fubar(); + } + if ( tmp->startAddr >= tmp->endAddr ) { + fprintf( stderr, "Node fubar\n" ); + fubar(); + } + if ( prev && ( prev->startAddr >= tmp->startAddr || + prev->endAddr > tmp->startAddr ) ) { + fprintf( stderr, "Sorting fubar\n" ); + fubar(); + } + prev = tmp; + tmp = tmp->next; + } + + prev = 0; + tmp = fxMesa->freeRanges[1]; + while ( tmp ) { + if ( !tmp->startAddr && !tmp->endAddr ) { + fprintf( stderr, "Textures fubar\n" ); + fubar(); + } + if ( tmp->startAddr >= tmp->endAddr ) { + fprintf( stderr, "Node fubar\n" ); + fubar(); + } + if ( prev && ( prev->startAddr >= tmp->startAddr || + prev->endAddr > tmp->startAddr ) ) { + fprintf( stderr, "Sorting fubar\n" ); + fubar(); + } + prev = tmp; + tmp = tmp->next; + } +} +#endif + + +/* Allocate and initialize a new MemRange struct. Try to allocate it + * from the pool of free MemRange nodes rather than malloc. + */ +static tdfxMemRange * +tdfxTMNewRangeNode( tdfxContextPtr fxMesa, FxU32 start, FxU32 end ) +{ + struct gl_shared_state *ss = fxMesa->glCtx->Shared; + tdfxSharedStatePtr tss = (tdfxSharedStatePtr)ss->DriverData; + tdfxMemRange *range; + + _glthread_LOCK_MUTEX( ss->Mutex ); + if ( tss && tss->rangePool ) { + range = tss->rangePool; + tss->rangePool = tss->rangePool->next; + } else { + range = MALLOC( sizeof(tdfxMemRange) ); + } + _glthread_UNLOCK_MUTEX( ss->Mutex ); + + if ( !range ) { + if ( TDFX_DEBUG & DEBUG_VERBOSE_TEXTURE ) + fprintf( stderr, __FUNCTION__ ": out of memory!\n" ); + return NULL; + } + + range->startAddr = start; + range->endAddr = end; + range->next = NULL; + + return range; +} + + +/* Initialize texture memory. We take care of one or both TMU's here. + */ +void tdfxTMInit( tdfxContextPtr fxMesa ) +{ + GLcontext *ctx = fxMesa->glCtx; + + if ( TDFX_DEBUG & DEBUG_VERBOSE_TEXTURE ) + fprintf( stderr, __FUNCTION__ "\n" ); + + if ( !ctx->Shared->DriverData ) { + const char *extensions; + tdfxSharedStatePtr tss = CALLOC_STRUCT( tdfx_shared_state ); + + if ( !tss ) + return; + + LOCK_HARDWARE( fxMesa ); + + extensions = grGetString( GR_EXTENSION ); + + if ( strstr( extensions, " TEXUMA " ) ) { + FxU32 start, end; + + tss->umaTexMemory = GL_TRUE; + + grEnable( GR_TEXTURE_UMA_EXT ); + + start = grTexMinAddress( 0 ); + end = grTexMaxAddress( 0 ); + + if ( TDFX_DEBUG & DEBUG_VERBOSE_TEXTURE ) + fprintf( stderr, " UMA tex memory: %d\n", (int)(end - start) ); + + tss->totalTexMem[0] = end - start; + tss->totalTexMem[1] = 0; + tss->freeTexMem[0] = end - start; + tss->freeTexMem[1] = 0; + tss->freeRanges[0] = tdfxTMNewRangeNode( fxMesa, start, end ); + tss->freeRanges[1] = NULL; + } else { + int unit; + + tss->umaTexMemory = GL_FALSE; + + for ( unit = 0 ; unit < fxMesa->numTMUs ; unit++ ) { + FxU32 start, end; + + start = grTexMinAddress( unit ); + end = grTexMaxAddress( unit ); + + tss->totalTexMem[unit] = end - start; + tss->freeTexMem[unit] = end - start; + tss->freeRanges[unit] = tdfxTMNewRangeNode( fxMesa, start, end ); + + if ( TDFX_DEBUG & DEBUG_VERBOSE_TEXTURE ) + fprintf( stderr, " Split tex memory: %d\n", + (int)(end - start) ); + } + } + + UNLOCK_HARDWARE( fxMesa ); + + tss->rangePool = NULL; + ctx->Shared->DriverData = tss; + + if ( TDFX_DEBUG & DEBUG_VERBOSE_TEXTURE ) + fprintf( stderr, " init UMA: %d\n", tss->umaTexMemory ); + } +} + + +/* Clean-up texture memory before destroying context. + */ +void tdfxTMClose( tdfxContextPtr fxMesa ) +{ + GLcontext *ctx = fxMesa->glCtx; + + if ( ctx->Shared->RefCount == 1 && fxMesa->driDrawable ) { + /* RefCount will soon go to zero, free our 3dfx stuff */ + tdfxSharedStatePtr tss = (tdfxSharedStatePtr)ctx->Shared->DriverData; + int unit; + tdfxMemRange *tmp, *next; + + /* Deallocate the pool of free tdfxMemRange nodes */ + tmp = tss->rangePool; + while ( tmp ) { + next = tmp->next; + FREE( tmp ); + tmp = next; + } + + /* Delete the texture memory block tdfxMemRange nodes */ + for ( unit = 0 ; unit < fxMesa->numTMUs ; unit++ ) { + tmp = tss->freeRanges[unit]; + while ( tmp ) { + next = tmp->next; + FREE( tmp ); + tmp = next; + } + } + + FREE( tss ); + ctx->Shared->DriverData = NULL; + } +} + + + +/* Delete a tdfxMemRange struct. + * We keep a linked list of free/available tdfxMemRange structs to + * avoid extra malloc/free calls. + */ +#define DELETE_RANGE_NODE( tss, range ) \ +do { \ + (range)->next = (tss)->rangePool; \ + (tss)->rangePool = (range); \ +} while (0) + +/* When we've run out of texture memory we have to throw out an + * existing texture to make room for the new one. This function + * determins the texture to throw out. + */ +static struct gl_texture_object * +tdfxTMFindOldestObject( tdfxContextPtr fxMesa, FxU32 unit ) +{ + struct gl_shared_state *ss = fxMesa->glCtx->Shared; + const GLuint bindNumber = fxMesa->texBindNumber; + struct gl_texture_object *oldestObj, *texObj, *lowestPriorityObj; + GLfloat lowestPriority; + GLuint oldestAge; + + if ( TDFX_DEBUG & DEBUG_VERBOSE_TEXTURE ) + fprintf( stderr, __FUNCTION__ "\n" ); + + oldestObj = NULL; + oldestAge = 0; + + lowestPriority = 1.0F; + lowestPriorityObj = NULL; + + for ( texObj = ss->TexObjectList ; texObj ; texObj = texObj->Next ) { + tdfxTexObjPtr t = TDFX_TEXTURE_DATA(texObj); + + if ( t && t->isInTM && + ( ( t->whichTMU == unit ) || + ( t->whichTMU == TDFX_TMU_BOTH ) || + ( t->whichTMU == TDFX_TMU_SPLIT ) ) ) { + GLuint age, lastTime; + + assert( t->range[0] ); + lastTime = t->lastTimeUsed; + + if ( lastTime > bindNumber ) { + /* TODO: check wrap around */ + age = bindNumber + (UINT_MAX - lastTime + 1); + } else { + age = bindNumber - lastTime; + } + if ( age >= oldestAge ) { + oldestAge = age; + oldestObj = texObj; + } + + /* examine priority */ + if ( texObj->Priority < lowestPriority ) { + lowestPriority = texObj->Priority; + lowestPriorityObj = texObj; + } + } + } + + if ( lowestPriority < 1.0 ) { + ASSERT( lowestPriorityObj ); + if ( TDFX_DEBUG & DEBUG_VERBOSE_TEXTURE ) + fprintf( stderr, "discard %d pri=%f\n", + lowestPriorityObj->Name, lowestPriority ); + return lowestPriorityObj; + } else { + if ( TDFX_DEBUG & DEBUG_VERBOSE_TEXTURE ) + fprintf( stderr, "discard %d age=%d\n", + oldestObj->Name, oldestAge ); + return oldestObj; + } +} + + +/* Find the address (offset?) at which we can store a new texture. + * is the texture unit. + * is the texture size in bytes. + */ +static FxU32 tdfxTMFindStartAddr( tdfxContextPtr fxMesa, + FxU32 unit, FxU32 size ) +{ + struct gl_shared_state *ss = fxMesa->glCtx->Shared; + tdfxSharedStatePtr tss = (tdfxSharedStatePtr)ss->DriverData; + struct gl_texture_object *texObj; + tdfxMemRange *prev, *block; + FxU32 result; + + if ( tss->umaTexMemory ) { + assert( unit == TDFX_TMU0 ); + } + + _glthread_LOCK_MUTEX( ss->Mutex ); + while ( 1 ) { + prev = NULL; + block = tss->freeRanges[unit]; + + while ( block ) { + if ( block->endAddr - block->startAddr >= size ) { + /* The texture will fit here */ + result = block->startAddr; + block->startAddr += size; + if ( block->startAddr == block->endAddr ) { + /* Remove this node since it's empty */ + if ( prev ) { + prev->next = block->next; + } else { + tss->freeRanges[unit] = block->next; + } + DELETE_RANGE_NODE( tss, block ); + } + tss->freeTexMem[unit] -= size; + _glthread_UNLOCK_MUTEX( ss->Mutex ); + return result; + } + prev = block; + block = block->next; + } + + /* We failed to find a block large enough to accomodate bytes. + * Find the oldest texObject and free it. + */ + texObj = tdfxTMFindOldestObject( fxMesa, unit ); + if ( texObj ) { + tdfxTMMoveOutTMLocked( fxMesa, texObj ); + fxMesa->stats.texSwaps++; + } else { + gl_problem( NULL, "tdfx driver: extreme texmem fragmentation" ); + _glthread_UNLOCK_MUTEX( ss->Mutex ); + return BAD_ADDRESS; + } + } + + /* never get here, but play it safe */ + _glthread_UNLOCK_MUTEX( ss->Mutex ); + return BAD_ADDRESS; +} + + +/* Remove the given tdfxMemRange node from hardware texture memory. + */ +static void tdfxTMRemoveRangeLocked( tdfxContextPtr fxMesa, + FxU32 unit, tdfxMemRange *range ) +{ + struct gl_shared_state *ss = fxMesa->glCtx->Shared; + tdfxSharedStatePtr tss = (tdfxSharedStatePtr)ss->DriverData; + tdfxMemRange *block, *prev; + + if ( tss->umaTexMemory ) { + assert( unit == TDFX_TMU0 ); + } + + if ( !range ) + return; + + if ( range->startAddr == range->endAddr ) { + DELETE_RANGE_NODE( tss, range ); + return; + } + tss->freeTexMem[unit] += range->endAddr - range->startAddr; + + /* find position in linked list to insert this tdfxMemRange node */ + prev = NULL; + block = tss->freeRanges[unit]; + while ( block ) { + assert( range->startAddr != block->startAddr ); + if ( range->startAddr > block->startAddr ) { + prev = block; + block = block->next; + } else { + break; + } + } + + /* Insert the free block, combine with adjacent blocks when possible */ + range->next = block; + if ( block ) { + if ( range->endAddr == block->startAddr ) { + /* Combine */ + block->startAddr = range->startAddr; + DELETE_RANGE_NODE( tss, range ); + range = block; + } + } + if ( prev ) { + if ( prev->endAddr == range->startAddr ) { + /* Combine */ + prev->endAddr = range->endAddr; + prev->next = range->next; + DELETE_RANGE_NODE( tss, range ); + } else { + prev->next = range; + } + } else { + tss->freeRanges[unit] = range; + } +} + + +/* Allocate space for a texture image. + * is the texture unit + * is the number of bytes to allocate + */ +static tdfxMemRange * +tdfxTMAllocTexMem( tdfxContextPtr fxMesa, FxU32 unit, FxU32 size ) +{ + tdfxMemRange *range = NULL; + FxU32 start; + + start = tdfxTMFindStartAddr( fxMesa, unit, size ); + + if ( start != BAD_ADDRESS ) { + range = tdfxTMNewRangeNode( fxMesa, start, start + size ); + } else { + fprintf( stderr, + "tdfxTMAllocTexMem returned NULL! unit=%ld size=%ld\n", + unit, size ); + } + return range; +} + + +/* Download (copy) the given texture data (all mipmap levels) into the + * Voodoo's texture memory. The texture memory must have already been + * allocated. + */ +void tdfxTMDownloadTextureLocked( tdfxContextPtr fxMesa, + struct gl_texture_object *tObj ) +{ + tdfxTexObjPtr t = TDFX_TEXTURE_DATA(tObj); + FxU32 targetTMU; + GLint l; + + assert( tObj ); + assert( t ); + + targetTMU = t->whichTMU; + + switch ( targetTMU ) { + case TDFX_TMU0: + case TDFX_TMU1: + if ( t->range[targetTMU] ) { + for ( l = t->minLevel ; l <= t->maxLevel && t->image[l].data ; l++ ) { + GrLOD_t glideLod = t->info.largeLodLog2 - l + tObj->BaseLevel; + + grTexDownloadMipMapLevel( targetTMU, + t->range[targetTMU]->startAddr, + glideLod, + t->info.largeLodLog2, + t->info.aspectRatioLog2, + t->info.format, + GR_MIPMAPLEVELMASK_BOTH, + t->image[l].data ); + } + } + break; + + case TDFX_TMU_SPLIT: + if ( t->range[TDFX_TMU0] && t->range[TDFX_TMU1] ) { + for ( l = t->minLevel ; l <= t->maxLevel && t->image[l].data ; l++ ) { + GrLOD_t glideLod = t->info.largeLodLog2 - l + tObj->BaseLevel; + + grTexDownloadMipMapLevel( GR_TMU0, + t->range[TDFX_TMU0]->startAddr, + glideLod, + t->info.largeLodLog2, + t->info.aspectRatioLog2, + t->info.format, + GR_MIPMAPLEVELMASK_ODD, + t->image[l].data ); + + grTexDownloadMipMapLevel( GR_TMU1, + t->range[TDFX_TMU1]->startAddr, + glideLod, + t->info.largeLodLog2, + t->info.aspectRatioLog2, + t->info.format, + GR_MIPMAPLEVELMASK_EVEN, + t->image[l].data ); + } + } + break; + + case TDFX_TMU_BOTH: + if ( t->range[TDFX_TMU0] && t->range[TDFX_TMU1] ) { + for ( l = t->minLevel ; l <= t->maxLevel && t->image[l].data ; l++ ) { + GrLOD_t glideLod = t->info.largeLodLog2 - l + tObj->BaseLevel; + + grTexDownloadMipMapLevel( GR_TMU0, + t->range[TDFX_TMU0]->startAddr, + glideLod, + t->info.largeLodLog2, + t->info.aspectRatioLog2, + t->info.format, + GR_MIPMAPLEVELMASK_BOTH, + t->image[l].data ); + + grTexDownloadMipMapLevel( GR_TMU1, + t->range[TDFX_TMU1]->startAddr, + glideLod, + t->info.largeLodLog2, + t->info.aspectRatioLog2, + t->info.format, + GR_MIPMAPLEVELMASK_BOTH, + t->image[l].data ); + } + } + break; + + default: + gl_problem( NULL, "error in tdfxTMDownloadTexture: bad unit" ); + return; + } +} + + +void tdfxTMReloadMipMapLevelLocked( GLcontext *ctx, + struct gl_texture_object *tObj, + GLint level ) +{ + tdfxTexObjPtr t = TDFX_TEXTURE_DATA(tObj); + GrLOD_t glideLod; + FxU32 unit; + + ASSERT( t->isInTM ); + + unit = t->whichTMU; + glideLod = t->info.largeLodLog2 - level + tObj->BaseLevel; + + switch ( unit ) { + case TDFX_TMU0: + case TDFX_TMU1: + grTexDownloadMipMapLevel( unit, + t->range[unit]->startAddr, + glideLod, + t->info.largeLodLog2, + t->info.aspectRatioLog2, + t->info.format, + GR_MIPMAPLEVELMASK_BOTH, + t->image[level].data ); + break; + + case TDFX_TMU_SPLIT: + grTexDownloadMipMapLevel( GR_TMU0, + t->range[GR_TMU0]->startAddr, + glideLod, + t->info.largeLodLog2, + t->info.aspectRatioLog2, + t->info.format, + GR_MIPMAPLEVELMASK_ODD, + t->image[level].data ); + + grTexDownloadMipMapLevel( GR_TMU1, + t->range[GR_TMU1]->startAddr, + glideLod, + t->info.largeLodLog2, + t->info.aspectRatioLog2, + t->info.format, + GR_MIPMAPLEVELMASK_EVEN, + t->image[level].data ); + break; + + case TDFX_TMU_BOTH: + grTexDownloadMipMapLevel( GR_TMU0, + t->range[GR_TMU0]->startAddr, + glideLod, + t->info.largeLodLog2, + t->info.aspectRatioLog2, + t->info.format, + GR_MIPMAPLEVELMASK_BOTH, + t->image[level].data ); + + grTexDownloadMipMapLevel( GR_TMU1, + t->range[GR_TMU1]->startAddr, + glideLod, + t->info.largeLodLog2, + t->info.aspectRatioLog2, + t->info.format, + GR_MIPMAPLEVELMASK_BOTH, + t->image[level].data ); + break; + + default: + gl_problem( ctx, "error in tdfxTMReloadMipMapLevel(): wrong unit" ); + break; + } +} + + +/* Allocate space for the given texture in texture memory then + * download (copy) it into that space. + */ +void tdfxTMMoveInTMLocked( tdfxContextPtr fxMesa, + struct gl_texture_object *tObj, FxU32 targetTMU ) +{ + tdfxTexObjPtr t = TDFX_TEXTURE_DATA(tObj); + FxU32 size; + + fxMesa->stats.reqTexUpload++; + + if ( t->isInTM ) { + if ( t->whichTMU == targetTMU ) + return; + + if ( targetTMU == TDFX_TMU_SPLIT || t->whichTMU == TDFX_TMU_SPLIT ) { + tdfxTMMoveOutTMLocked( fxMesa, tObj ); + } else { + if ( t->whichTMU == TDFX_TMU_BOTH ) + return; + targetTMU = TDFX_TMU_BOTH; + } + } + + t->whichTMU = targetTMU; + + switch ( targetTMU ) { + case TDFX_TMU0: + case TDFX_TMU1: + size = grTexTextureMemRequired( GR_MIPMAPLEVELMASK_BOTH, &t->info ); + t->range[targetTMU] = tdfxTMAllocTexMem(fxMesa, targetTMU, size); + break; + + case TDFX_TMU_SPLIT: + size = grTexTextureMemRequired( GR_MIPMAPLEVELMASK_ODD, &t->info ); + t->range[TDFX_TMU0] = tdfxTMAllocTexMem( fxMesa, TDFX_TMU0, size ); + if ( t->range[TDFX_TMU0] ) + fxMesa->stats.memTexUpload += size; + + size = grTexTextureMemRequired( GR_MIPMAPLEVELMASK_EVEN, &t->info ); + t->range[TDFX_TMU1] = tdfxTMAllocTexMem( fxMesa, TDFX_TMU1, size ); + break; + + case TDFX_TMU_BOTH: + size = grTexTextureMemRequired( GR_MIPMAPLEVELMASK_BOTH, &t->info ); + t->range[TDFX_TMU0] = tdfxTMAllocTexMem( fxMesa, TDFX_TMU0, size ); + if ( t->range[TDFX_TMU0] ) + fxMesa->stats.memTexUpload += size; + + size = grTexTextureMemRequired( GR_MIPMAPLEVELMASK_BOTH, &t->info ); + t->range[TDFX_TMU1] = tdfxTMAllocTexMem( fxMesa, TDFX_TMU1, size ); + break; + + default: + gl_problem( NULL, "error in tdfxTMMoveInTM() -> bad unit (%d)" ); + return; + } + + t->reloadImages = GL_TRUE; + t->isInTM = GL_TRUE; + + fxMesa->stats.texUpload++; +} + + +/* Move the given texture out of hardware texture memory. + * This deallocates the texture's memory space. + */ +void tdfxTMMoveOutTMLocked( tdfxContextPtr fxMesa, + struct gl_texture_object *tObj ) +{ + struct gl_shared_state *ss = fxMesa->glCtx->Shared; + tdfxSharedStatePtr tss = (tdfxSharedStatePtr)ss->DriverData; + tdfxTexObjPtr t = TDFX_TEXTURE_DATA(tObj); + + if ( TDFX_DEBUG & DEBUG_VERBOSE_TEXTURE ) { + fprintf( stderr, __FUNCTION__ "( %p (%d) )\n", tObj, tObj->Name ); + tdfxTMVerifyFreeList( fxMesa, 0 ); + tdfxTMVerifyFreeList( fxMesa, 1 ); + } + + if ( !t || !t->isInTM ) + return; + + switch ( t->whichTMU ) { + case TDFX_TMU0: + case TDFX_TMU1: + tdfxTMRemoveRangeLocked( fxMesa, t->whichTMU, t->range[t->whichTMU] ); + break; + + case TDFX_TMU_SPLIT: + case TDFX_TMU_BOTH: + assert( !tss->umaTexMemory ); + tdfxTMRemoveRangeLocked( fxMesa, TDFX_TMU0, t->range[TDFX_TMU0] ); + tdfxTMRemoveRangeLocked( fxMesa, TDFX_TMU1, t->range[TDFX_TMU1] ); + break; + + default: + gl_problem( NULL, "tdfx driver: bad unit in tdfxTMMOveOutTM()" ); + return; + } + + t->isInTM = GL_FALSE; + t->range[0] = NULL; + t->range[1] = NULL; + t->whichTMU = TDFX_TMU_NONE; + + if ( TDFX_DEBUG & DEBUG_VERBOSE_TEXTURE ) { + tdfxTMVerifyFreeList( fxMesa, 0 ); + tdfxTMVerifyFreeList( fxMesa, 1 ); + } +} + + +void tdfxTMFreeTextureLocked( tdfxContextPtr fxMesa, + struct gl_texture_object *tObj ) +{ + tdfxTexObjPtr t = TDFX_TEXTURE_DATA(tObj); + + if ( t ) { + int i; + tdfxTMMoveOutTMLocked( fxMesa, tObj ); + for ( i = 0 ; i < MAX_TEXTURE_LEVELS ; i++ ) { + if ( t->image[i].original.data ) FREE( t->image[i].original.data ); + if ( t->image[i].rescaled.data ) FREE( t->image[i].rescaled.data ); + } + FREE( t ); + tObj->DriverData = NULL; + } + + if ( TDFX_DEBUG & DEBUG_VERBOSE_TEXTURE ) { + tdfxTMVerifyFreeList( fxMesa, 0 ); + tdfxTMVerifyFreeList( fxMesa, 1 ); + } +} + + +/* After a context switch this function will be called to restore + * texture memory for the new context. + */ +void tdfxTMRestoreTexturesLocked( tdfxContextPtr fxMesa ) +{ + GLcontext *ctx = fxMesa->glCtx; + struct gl_texture_object *tObj; + int i; + + for ( tObj = ctx->Shared->TexObjectList ; tObj ; tObj = tObj->Next ) { + tdfxTexObjPtr t = TDFX_TEXTURE_DATA( tObj ); + if ( t && t->isInTM ) { + for ( i = 0 ; i < MAX_TEXTURE_UNITS ; i++ ) { + if ( ctx->Texture.Unit[i].Current == tObj ) { + tdfxTMDownloadTextureLocked( fxMesa, tObj ); + break; + } + } + if ( i == MAX_TEXTURE_UNITS ) { + tdfxTMMoveOutTMLocked( fxMesa, tObj ); + } + } + } + + if ( TDFX_DEBUG & DEBUG_VERBOSE_TEXTURE ) { + tdfxTMVerifyFreeList( fxMesa, 0 ); + tdfxTMVerifyFreeList( fxMesa, 1 ); + } +} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.h:1.1 --- /dev/null Mon Jun 4 12:37:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.h Wed Mar 21 11:14:28 2001 @@ -0,0 +1,76 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * + */ + +#ifndef __TDFX_TEXMAN_H__ +#define __TDFX_TEXMAN_H__ + +#include "tdfx_lock.h" + +extern void tdfxTMInit( tdfxContextPtr fxMesa ); +extern void tdfxTMClose( tdfxContextPtr fxMesa ); + +extern void tdfxTMDownloadTextureLocked( tdfxContextPtr fxMesa, + struct gl_texture_object *tObj ); +extern void tdfxTMReloadMipMapLevelLocked( GLcontext *ctx, + struct gl_texture_object *tObj, + GLint level ); +extern void tdfxTMMoveInTMLocked( tdfxContextPtr fxMesa, + struct gl_texture_object *tObj, + FxU32 targetTMU ); +extern void tdfxTMMoveOutTMLocked( tdfxContextPtr fxMesa, + struct gl_texture_object *tObj ); +extern void tdfxTMRestoreTexturesLocked( tdfxContextPtr fxMesa ); + +extern void tdfxTMFreeTextureLocked( tdfxContextPtr fxMesa, + struct gl_texture_object *tObj ); + + +#define tdfxTMMoveInTM( fxMesa, tObj, targetTMU ) \ +do { \ + LOCK_HARDWARE( fxMesa ); \ + tdfxTMMoveInTMLocked( fxMesa, tObj, targetTMU ); \ + UNLOCK_HARDWARE( fxMesa ); \ +} while (0) + +#define tdfxTMMoveOutTM( fxMesa, tObj ) \ +do { \ + LOCK_HARDWARE( fxMesa ); \ + tdfxTMMoveOutTMLocked( fxMesa, tObj ); \ + UNLOCK_HARDWARE( fxMesa ); \ +} while (0) + +#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_texstate.c diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_texstate.c:1.1 --- /dev/null Mon Jun 4 12:37:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_texstate.c Wed Mar 21 11:14:28 2001 @@ -0,0 +1,2097 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_texstate.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * + */ + +#include "tdfx_state.h" +#include "tdfx_tex.h" +#include "tdfx_texman.h" + + +/* ============================================================= + * Texture + */ + +/* + * These macros are used below when handling COMBINE_EXT. + */ +#define TEXENV_OPERAND_INVERTED(operand) \ + (((operand) == GL_ONE_MINUS_SRC_ALPHA) \ + || ((operand) == GL_ONE_MINUS_SRC_COLOR)) +#define TEXENV_OPERAND_ALPHA(operand) \ + (((operand) == GL_SRC_ALPHA) || ((operand) == GL_ONE_MINUS_SRC_ALPHA)) +#define TEXENV_SETUP_ARG_A(param, source, operand, iteratedAlpha) \ + switch (source) { \ + case GL_TEXTURE: \ + param = GR_CMBX_LOCAL_TEXTURE_ALPHA; \ + break; \ + case GL_CONSTANT_EXT: \ + param = GR_CMBX_TMU_CALPHA; \ + break; \ + case GL_PRIMARY_COLOR_EXT: \ + param = GR_CMBX_ITALPHA; \ + break; \ + case GL_PREVIOUS_EXT: \ + param = iteratedAlpha; \ + break; \ + default: \ + /* \ + * This is here just to keep from getting \ + * compiler warnings. \ + */ \ + param = GR_CMBX_ZERO; \ + break; \ + } + +#define TEXENV_SETUP_ARG_RGB(param, source, operand, iteratedColor, iteratedAlpha) \ + if (!TEXENV_OPERAND_ALPHA(operand)) { \ + switch (source) { \ + case GL_TEXTURE: \ + param = GR_CMBX_LOCAL_TEXTURE_RGB; \ + break; \ + case GL_CONSTANT_EXT: \ + param = GR_CMBX_TMU_CCOLOR; \ + break; \ + case GL_PRIMARY_COLOR_EXT: \ + param = GR_CMBX_ITRGB; \ + break; \ + case GL_PREVIOUS_EXT: \ + param = iteratedColor; \ + break; \ + default: \ + /* \ + * This is here just to keep from getting \ + * compiler warnings. \ + */ \ + param = GR_CMBX_ZERO; \ + break; \ + } \ + } else { \ + switch (source) { \ + case GL_TEXTURE: \ + param = GR_CMBX_LOCAL_TEXTURE_ALPHA; \ + break; \ + case GL_CONSTANT_EXT: \ + param = GR_CMBX_TMU_CALPHA; \ + break; \ + case GL_PRIMARY_COLOR_EXT: \ + param = GR_CMBX_ITALPHA; \ + break; \ + case GL_PREVIOUS_EXT: \ + param = iteratedAlpha; \ + break; \ + default: \ + /* \ + * This is here just to keep from getting \ + * compiler warnings. \ + */ \ + param = GR_CMBX_ZERO; \ + break; \ + } \ + } + +#define TEXENV_SETUP_MODE_RGB(param, operand) \ + switch (operand) { \ + case GL_SRC_COLOR: \ + case GL_SRC_ALPHA: \ + param = GR_FUNC_MODE_X; \ + break; \ + case GL_ONE_MINUS_SRC_ALPHA: \ + case GL_ONE_MINUS_SRC_COLOR: \ + param = GR_FUNC_MODE_ONE_MINUS_X; \ + break; \ + default: \ + param = GR_FUNC_MODE_ZERO; \ + break; \ + } + +#define TEXENV_SETUP_MODE_A(param, operand) \ + switch (operand) { \ + case GL_SRC_ALPHA: \ + param = GR_FUNC_MODE_X; \ + break; \ + case GL_ONE_MINUS_SRC_ALPHA: \ + param = GR_FUNC_MODE_ONE_MINUS_X; \ + break; \ + default: \ + param = GR_FUNC_MODE_ZERO; \ + break; \ + } + + + +/* + * Setup a texture environment on Voodoo5. + * Return GL_TRUE for success, GL_FALSE for failure. + * If we fail, we'll have to use software rendering. + */ +static GLboolean +SetupTexEnvNapalm(GLcontext *ctx, GLboolean useIteratedRGBA, + const struct gl_texture_unit *texUnit, GLenum baseFormat, + struct tdfx_texcombine_ext *env) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GrTCCUColor_t incomingRGB, incomingAlpha; + const GLenum envMode = texUnit->EnvMode; + + if (useIteratedRGBA) { + incomingRGB = GR_CMBX_ITRGB; + incomingAlpha = GR_CMBX_ITALPHA; + } + else { + incomingRGB = GR_CMBX_OTHER_TEXTURE_RGB; + incomingAlpha = GR_CMBX_OTHER_TEXTURE_ALPHA; + } + + /* invariant: */ + env->Color.Shift = 0; + env->Color.Invert = FXFALSE; + env->Alpha.Shift = 0; + env->Alpha.Invert = FXFALSE; + + switch (envMode) { + case GL_REPLACE: + /* -- Setup RGB combiner */ + if (baseFormat == GL_ALPHA) { + /* Rv = Rf */ + env->Color.SourceA = incomingRGB; + } + else { + /* Rv = Rt */ + env->Color.SourceA = GR_CMBX_LOCAL_TEXTURE_RGB; + } + env->Color.ModeA = GR_FUNC_MODE_X; + env->Color.SourceB = GR_CMBX_ZERO; + env->Color.ModeB = GR_FUNC_MODE_ZERO; + env->Color.SourceC = GR_CMBX_ZERO; + env->Color.InvertC = FXTRUE; + env->Color.SourceD = GR_CMBX_ZERO; + env->Color.InvertD = FXFALSE; + /* -- Setup Alpha combiner */ + if (baseFormat == GL_LUMINANCE || baseFormat == GL_RGB) { + /* Av = Af */ + env->Alpha.SourceD = incomingAlpha; + } + else { + /* Av = At */ + env->Alpha.SourceD = GR_CMBX_LOCAL_TEXTURE_ALPHA; + } + env->Alpha.SourceA = GR_CMBX_ITALPHA; + env->Alpha.ModeA = GR_FUNC_MODE_ZERO; + env->Alpha.SourceB = GR_CMBX_ITALPHA; + env->Alpha.ModeB = GR_FUNC_MODE_ZERO; + env->Alpha.SourceC = GR_CMBX_ZERO; + env->Alpha.InvertC = FXFALSE; + env->Alpha.InvertD = FXFALSE; + break; + + case GL_MODULATE: + /* -- Setup RGB combiner */ + if (baseFormat == GL_ALPHA) { + /* Rv = Rf */ + env->Color.SourceC = GR_CMBX_ZERO; + env->Color.InvertC = FXTRUE; + } + else { + /* Result = Frag * Tex */ + env->Color.SourceC = GR_CMBX_LOCAL_TEXTURE_RGB; + env->Color.InvertC = FXFALSE; + } + env->Color.SourceA = incomingRGB; + env->Color.ModeA = GR_FUNC_MODE_X; + env->Color.SourceB = GR_CMBX_ZERO; + env->Color.ModeB = GR_FUNC_MODE_ZERO; + env->Color.SourceD = GR_CMBX_ZERO; + env->Color.InvertD = FXFALSE; + /* -- Setup Alpha combiner */ + if (baseFormat == GL_LUMINANCE || baseFormat == GL_RGB) { + /* Av = Af */ + env->Alpha.SourceA = incomingAlpha; + env->Alpha.SourceC = GR_CMBX_ZERO; + env->Alpha.InvertC = FXTRUE; + } + else { + /* Av = Af * At */ + env->Alpha.SourceA = GR_CMBX_LOCAL_TEXTURE_ALPHA; + env->Alpha.SourceC = incomingAlpha; + env->Alpha.InvertC = FXFALSE; + } + env->Alpha.ModeA = GR_FUNC_MODE_X; + env->Alpha.SourceB = GR_CMBX_ITALPHA; + env->Alpha.ModeB = GR_FUNC_MODE_ZERO; + env->Alpha.SourceD = GR_CMBX_ZERO; + env->Alpha.InvertD = FXFALSE; + break; + + case GL_DECAL: + /* -- Setup RGB combiner */ + if (baseFormat == GL_RGB) { + /* Rv = Rt */ + env->Color.SourceB = GR_CMBX_ZERO; + env->Color.ModeB = GR_FUNC_MODE_X; + env->Color.SourceC = GR_CMBX_ZERO; + env->Color.InvertC = FXTRUE; + env->Color.SourceD = GR_CMBX_ZERO; + env->Color.InvertD = FXFALSE; + } + else { + /* Rv = Rf * (1 - At) + Rt * At */ + env->Color.SourceB = incomingRGB; + env->Color.ModeB = GR_FUNC_MODE_NEGATIVE_X; + env->Color.SourceC = GR_CMBX_LOCAL_TEXTURE_ALPHA; + env->Color.InvertC = FXFALSE; + env->Color.SourceD = GR_CMBX_B; + env->Color.InvertD = FXFALSE; + } + env->Color.SourceA = GR_CMBX_LOCAL_TEXTURE_RGB; + env->Color.ModeA = GR_FUNC_MODE_X; + /* -- Setup Alpha combiner */ + /* Av = Af */ + env->Alpha.SourceA = incomingAlpha; + env->Alpha.ModeA = GR_FUNC_MODE_X; + env->Alpha.SourceB = GR_CMBX_ITALPHA; + env->Alpha.ModeB = GR_FUNC_MODE_ZERO; + env->Alpha.SourceC = GR_CMBX_ZERO; + env->Alpha.InvertC = FXTRUE; + env->Alpha.SourceD = GR_CMBX_ZERO; + env->Alpha.InvertD = FXFALSE; + break; + + case GL_BLEND: + /* -- Setup RGB combiner */ + if (baseFormat == GL_ALPHA) { + /* Rv = Rf */ + env->Color.SourceA = incomingRGB; + env->Color.ModeA = GR_FUNC_MODE_X; + env->Color.SourceB = GR_CMBX_ZERO; + env->Color.ModeB = GR_FUNC_MODE_ZERO; + env->Color.SourceC = GR_CMBX_ZERO; + env->Color.InvertC = FXTRUE; + env->Color.SourceD = GR_CMBX_ZERO; + env->Color.InvertD = FXFALSE; + } + else { + /* Rv = Rf * (1 - Rt) + Rc * Rt */ + env->Color.SourceA = GR_CMBX_TMU_CCOLOR; + env->Color.ModeA = GR_FUNC_MODE_X; + env->Color.SourceB = incomingRGB; + env->Color.ModeB = GR_FUNC_MODE_NEGATIVE_X; + env->Color.SourceC = GR_CMBX_LOCAL_TEXTURE_RGB; + env->Color.InvertC = FXFALSE; + env->Color.SourceD = GR_CMBX_B; + env->Color.InvertD = FXFALSE; + } + /* -- Setup Alpha combiner */ + if (baseFormat == GL_LUMINANCE || baseFormat == GL_RGB) { + /* Av = Af */ + env->Alpha.SourceA = incomingAlpha; + env->Alpha.ModeA = GR_FUNC_MODE_X; + env->Alpha.SourceB = GR_CMBX_ZERO; + env->Alpha.ModeB = GR_FUNC_MODE_ZERO; + env->Alpha.SourceC = GR_CMBX_ZERO; + env->Alpha.InvertC = FXTRUE; + env->Alpha.SourceD = GR_CMBX_ZERO; + env->Alpha.InvertD = FXFALSE; + } + else if (baseFormat == GL_INTENSITY) { + /* Av = Af * (1 - It) + Ac * It */ + env->Alpha.SourceA = GR_CMBX_TMU_CALPHA; + env->Alpha.ModeA = GR_FUNC_MODE_X; + env->Alpha.SourceB = incomingAlpha; + env->Alpha.ModeB = GR_FUNC_MODE_NEGATIVE_X; + env->Alpha.SourceC = GR_CMBX_LOCAL_TEXTURE_ALPHA; + env->Alpha.InvertC = FXFALSE; + env->Alpha.SourceD = GR_CMBX_B; + env->Alpha.InvertD = FXFALSE; + } + else { + /* Av = Af * At */ + env->Alpha.SourceA = GR_CMBX_LOCAL_TEXTURE_ALPHA; + env->Alpha.ModeA = GR_FUNC_MODE_X; + env->Alpha.SourceB = GR_CMBX_ITALPHA; + env->Alpha.ModeB = GR_FUNC_MODE_ZERO; + env->Alpha.SourceC = incomingAlpha; + env->Alpha.InvertC = FXFALSE; + env->Alpha.SourceD = GR_CMBX_ZERO; + env->Alpha.InvertD = FXFALSE; + } + /* Also have to set up the tex env constant color */ + env->EnvColor = PACK_RGBA32(texUnit->EnvColor[0] * 255.0F, + texUnit->EnvColor[1] * 255.0F, + texUnit->EnvColor[2] * 255.0F, + texUnit->EnvColor[3] * 255.0F); + break; + case GL_ADD: + /* -- Setup RGB combiner */ + if (baseFormat == GL_ALPHA) { + /* Rv = Rf */ + env->Color.SourceB = GR_CMBX_ZERO; + env->Color.ModeB = GR_FUNC_MODE_ZERO; + } + else { + /* Rv = Rf + Tt */ + env->Color.SourceB = GR_CMBX_LOCAL_TEXTURE_RGB; + env->Color.ModeB = GR_FUNC_MODE_X; + } + env->Color.SourceA = incomingRGB; + env->Color.ModeA = GR_FUNC_MODE_X; + env->Color.SourceC = GR_CMBX_ZERO; + env->Color.InvertC = FXTRUE; + env->Color.SourceD = GR_CMBX_ZERO; + env->Color.InvertD = FXFALSE; + /* -- Setup Alpha combiner */ + if (baseFormat == GL_LUMINANCE || baseFormat == GL_RGB) { + /* Av = Af */ + env->Alpha.SourceA = incomingAlpha; + env->Alpha.SourceB = GR_CMBX_ITALPHA; + env->Alpha.ModeB = GR_FUNC_MODE_ZERO; + env->Alpha.SourceC = GR_CMBX_ZERO; + env->Alpha.InvertC = FXTRUE; + + } + else if (baseFormat == GL_INTENSITY) { + /* Av = Af + It */ + env->Alpha.SourceA = incomingAlpha; + env->Alpha.SourceB = GR_CMBX_LOCAL_TEXTURE_ALPHA; + env->Alpha.ModeB = GR_FUNC_MODE_X; + env->Alpha.SourceC = GR_CMBX_ZERO; + env->Alpha.InvertC = FXTRUE; + } + else { + /* Av = Af * At */ + env->Alpha.SourceA = GR_CMBX_LOCAL_TEXTURE_ALPHA; + env->Alpha.SourceB = GR_CMBX_ITALPHA; + env->Alpha.ModeB = GR_FUNC_MODE_ZERO; + env->Alpha.SourceC = incomingAlpha; + env->Alpha.InvertC = FXFALSE; + } + env->Alpha.ModeA = GR_FUNC_MODE_X; + env->Alpha.SourceD = GR_CMBX_ZERO; + env->Alpha.InvertD = FXFALSE; + break; + + case GL_COMBINE_EXT: + { + FxU32 A_RGB, B_RGB, C_RGB, D_RGB; + FxU32 Amode_RGB, Bmode_RGB; + FxBool Cinv_RGB, Dinv_RGB, Ginv_RGB; + FxU32 Shift_RGB; + FxU32 A_A, B_A, C_A, D_A; + FxU32 Amode_A, Bmode_A; + FxBool Cinv_A, Dinv_A, Ginv_A; + FxU32 Shift_A; + + /* + * + * In the formulas below, we write: + * o "1(x)" for the identity function applied to x, + * so 1(x) = x. + * o "0(x)" for the constant function 0, so + * 0(x) = 0 for all values of x. + * + * Calculate the color combination. + */ + Shift_RGB = texUnit->CombineScaleShiftRGB; + Shift_A = texUnit->CombineScaleShiftA; + switch (texUnit->CombineModeRGB) { + case GL_REPLACE: + /* + * The formula is: Arg0 + * We implement this by the formula: + * (Arg0 + 0(0))*(1-0) + 0 + */ + TEXENV_SETUP_ARG_RGB(A_RGB, + texUnit->CombineSourceRGB[0], + texUnit->CombineOperandRGB[0], + incomingRGB, incomingAlpha); + TEXENV_SETUP_MODE_RGB(Amode_RGB, + texUnit->CombineOperandRGB[0]); + B_RGB = C_RGB = D_RGB = GR_CMBX_ZERO; + Bmode_RGB = GR_FUNC_MODE_ZERO; + Cinv_RGB = FXTRUE; + Dinv_RGB = Ginv_RGB = FXFALSE; + break; + case GL_MODULATE: + /* + * The formula is: Arg0 * Arg1 + * + * We implement this by the formula + * (Arg0 + 0(0)) * Arg1 + 0(0) + */ + TEXENV_SETUP_ARG_RGB(A_RGB, + texUnit->CombineSourceRGB[0], + texUnit->CombineOperandRGB[0], + incomingRGB, incomingAlpha); + TEXENV_SETUP_MODE_RGB(Amode_RGB, + texUnit->CombineOperandRGB[0]); + B_RGB = GR_CMBX_ZERO; + Bmode_RGB = GR_CMBX_ZERO; + TEXENV_SETUP_ARG_RGB(C_RGB, + texUnit->CombineSourceRGB[1], + texUnit->CombineOperandRGB[1], + incomingRGB, incomingAlpha); + Cinv_RGB = TEXENV_OPERAND_INVERTED + (texUnit->CombineOperandRGB[1]); + D_RGB = GR_CMBX_ZERO; + Dinv_RGB = Ginv_RGB = FXFALSE; + break; + case GL_ADD: + /* + * The formula is Arg0 + Arg1 + */ + TEXENV_SETUP_ARG_RGB(A_RGB, + texUnit->CombineSourceRGB[0], + texUnit->CombineOperandRGB[0], + incomingRGB, incomingAlpha); + TEXENV_SETUP_MODE_RGB(Amode_RGB, + texUnit->CombineOperandRGB[0]); + TEXENV_SETUP_ARG_RGB(B_RGB, + texUnit->CombineSourceRGB[1], + texUnit->CombineOperandRGB[1], + incomingRGB, incomingAlpha); + TEXENV_SETUP_MODE_RGB(Bmode_RGB, + texUnit->CombineOperandRGB[1]); + C_RGB = D_RGB = GR_CMBX_ZERO; + Cinv_RGB = FXTRUE; + Dinv_RGB = Ginv_RGB = FXFALSE; + break; + case GL_ADD_SIGNED_EXT: + /* + * The formula is: Arg0 + Arg1 - 0.5. + * We compute this by calculating: + * (Arg0 - 1/2) + Arg1 if op0 is SRC_{COLOR,ALPHA} + * Arg0 + (Arg1 - 1/2) if op1 is SRC_{COLOR,ALPHA} + * If both op0 and op1 are ONE_MINUS_SRC_{COLOR,ALPHA} + * we cannot implement the formula properly. + */ + TEXENV_SETUP_ARG_RGB(A_RGB, + texUnit->CombineSourceRGB[0], + texUnit->CombineOperandRGB[0], + incomingRGB, incomingAlpha); + TEXENV_SETUP_ARG_RGB(B_RGB, + texUnit->CombineSourceRGB[1], + texUnit->CombineOperandRGB[1], + incomingRGB, incomingAlpha); + if (!TEXENV_OPERAND_INVERTED(texUnit->CombineOperandRGB[0])) { + /* + * A is not inverted. So, choose it. + */ + Amode_RGB = GR_FUNC_MODE_X_MINUS_HALF; + if (!TEXENV_OPERAND_INVERTED + (texUnit->CombineOperandRGB[1])) { + Bmode_RGB = GR_FUNC_MODE_X; + } + else { + Bmode_RGB = GR_FUNC_MODE_ONE_MINUS_X; + } + } + else { + /* + * A is inverted, so try to subtract 1/2 + * from B. + */ + Amode_RGB = GR_FUNC_MODE_ONE_MINUS_X; + if (!TEXENV_OPERAND_INVERTED + (texUnit->CombineOperandRGB[1])) { + Bmode_RGB = GR_FUNC_MODE_X_MINUS_HALF; + } + else { + /* + * Both are inverted. This is the case + * we cannot handle properly. We just + * choose to not add the - 1/2. + */ + Bmode_RGB = GR_FUNC_MODE_ONE_MINUS_X; + return GL_FALSE; + } + } + C_RGB = D_RGB = GR_CMBX_ZERO; + Cinv_RGB = FXTRUE; + Dinv_RGB = Ginv_RGB = FXFALSE; + break; + case GL_INTERPOLATE_EXT: + /* + * The formula is: Arg0 * Arg2 + Arg1 * (1 - Arg2). + * We compute this by the formula: + * (Arg0 - Arg1) * Arg2 + Arg1 + * == Arg0 * Arg2 - Arg1 * Arg2 + Arg1 + * == Arg0 * Arg2 + Arg1 * (1 - Arg2) + * However, if both Arg1 is ONE_MINUS_X, the HW does + * not support it properly. + */ + TEXENV_SETUP_ARG_RGB(A_RGB, + texUnit->CombineSourceRGB[0], + texUnit->CombineOperandRGB[0], + incomingRGB, incomingAlpha); + TEXENV_SETUP_MODE_RGB(Amode_RGB, + texUnit->CombineOperandRGB[0]); + TEXENV_SETUP_ARG_RGB(B_RGB, + texUnit->CombineSourceRGB[1], + texUnit->CombineOperandRGB[1], + incomingRGB, incomingAlpha); + if (TEXENV_OPERAND_INVERTED(texUnit->CombineOperandRGB[1])) { + /* + * This case is wrong. + */ + Bmode_RGB = GR_FUNC_MODE_NEGATIVE_X; + return GL_FALSE; + } + else { + Bmode_RGB = GR_FUNC_MODE_NEGATIVE_X; + } + /* + * The Source/Operand for the C value must + * specify some kind of alpha value. + */ + TEXENV_SETUP_ARG_A(C_RGB, + texUnit->CombineSourceRGB[2], + texUnit->CombineOperandRGB[2], + incomingAlpha); + Cinv_RGB = FXFALSE; + D_RGB = GR_CMBX_B; + Dinv_RGB = Ginv_RGB = FXFALSE; + break; + default: + /* + * This is here mostly to keep from getting + * a compiler warning about these not being set. + * However, this should set all the texture values + * to zero. + */ + A_RGB = B_RGB = C_RGB = D_RGB = GR_CMBX_ZERO; + Amode_RGB = Bmode_RGB = GR_FUNC_MODE_X; + Cinv_RGB = Dinv_RGB = Ginv_RGB = FXFALSE; + break; + } + /* + * Calculate the alpha combination. + */ + switch (texUnit->CombineModeA) { + case GL_REPLACE: + /* + * The formula is: Arg0 + * We implement this by the formula: + * (Arg0 + 0(0))*(1-0) + 0 + */ + TEXENV_SETUP_ARG_A(A_A, + texUnit->CombineSourceA[0], + texUnit->CombineOperandA[0], + incomingAlpha); + TEXENV_SETUP_MODE_A(Amode_A, + texUnit->CombineOperandA[0]); + B_A = GR_CMBX_ITALPHA; + Bmode_A = GR_FUNC_MODE_ZERO; + C_A = D_A = GR_CMBX_ZERO; + Cinv_A = FXTRUE; + Dinv_A = Ginv_A = FXFALSE; + break; + case GL_MODULATE: + /* + * The formula is: Arg0 * Arg1 + * + * We implement this by the formula + * (Arg0 + 0(0)) * Arg1 + 0(0) + */ + TEXENV_SETUP_ARG_A(A_A, + texUnit->CombineSourceA[0], + texUnit->CombineOperandA[0], + incomingAlpha); + TEXENV_SETUP_MODE_A(Amode_A, + texUnit->CombineOperandA[0]); + B_A = GR_CMBX_ZERO; + Bmode_A = GR_CMBX_ZERO; + TEXENV_SETUP_ARG_A(C_A, + texUnit->CombineSourceA[1], + texUnit->CombineOperandA[1], + incomingAlpha); + Cinv_A = TEXENV_OPERAND_INVERTED + (texUnit->CombineOperandA[1]); + D_A = GR_CMBX_ZERO; + Dinv_A = Ginv_A = FXFALSE; + break; + case GL_ADD: + /* + * The formula is Arg0 + Arg1 + */ + TEXENV_SETUP_ARG_A(A_A, + texUnit->CombineSourceA[0], + texUnit->CombineOperandA[0], + incomingAlpha); + TEXENV_SETUP_MODE_A(Amode_A, + texUnit->CombineOperandA[0]); + TEXENV_SETUP_ARG_A(B_A, + texUnit->CombineSourceA[1], + texUnit->CombineOperandA[1], + incomingAlpha); + TEXENV_SETUP_MODE_A(Bmode_A, + texUnit->CombineOperandA[0]); + C_A = D_A = GR_CMBX_ZERO; + Cinv_A = FXTRUE; + Dinv_A = Ginv_A = FXFALSE; + break; + case GL_ADD_SIGNED_EXT: + /* + * The formula is: Arg0 + Arg1 - 0.5. + * We compute this by calculating: + * (Arg0 - 1/2) + Arg1 if op0 is SRC_{COLOR,ALPHA} + * Arg0 + (Arg1 - 1/2) if op1 is SRC_{COLOR,ALPHA} + * If both op0 and op1 are ONE_MINUS_SRC_{COLOR,ALPHA} + * we cannot implement the formula properly. + */ + TEXENV_SETUP_ARG_A(A_A, + texUnit->CombineSourceA[0], + texUnit->CombineOperandA[0], + incomingAlpha); + TEXENV_SETUP_ARG_A(B_A, + texUnit->CombineSourceA[1], + texUnit->CombineOperandA[1], + incomingAlpha); + if (!TEXENV_OPERAND_INVERTED(texUnit->CombineOperandA[0])) { + /* + * A is not inverted. So, choose it. + */ + Amode_A = GR_FUNC_MODE_X_MINUS_HALF; + if (!TEXENV_OPERAND_INVERTED + (texUnit->CombineOperandA[1])) { + Bmode_A = GR_FUNC_MODE_X; + } else { + Bmode_A = GR_FUNC_MODE_ONE_MINUS_X; + } + } else { + /* + * A is inverted, so try to subtract 1/2 + * from B. + */ + Amode_A = GR_FUNC_MODE_ONE_MINUS_X; + if (!TEXENV_OPERAND_INVERTED + (texUnit->CombineOperandA[1])) { + Bmode_A = GR_FUNC_MODE_X_MINUS_HALF; + } else { + /* + * Both are inverted. This is the case + * we cannot handle properly. We just + * choose to not add the - 1/2. + */ + Bmode_A = GR_FUNC_MODE_ONE_MINUS_X; + return GL_FALSE; + } + } + C_A = D_A = GR_CMBX_ZERO; + Cinv_A = FXTRUE; + Dinv_A = Ginv_A = FXFALSE; + break; + case GL_INTERPOLATE_EXT: + /* + * The formula is: Arg0 * Arg2 + Arg1 * (1 - Arg2). + * We compute this by the formula: + * (Arg0 - Arg1) * Arg2 + Arg1 + * == Arg0 * Arg2 - Arg1 * Arg2 + Arg1 + * == Arg0 * Arg2 + Arg1 * (1 - Arg2) + * However, if both Arg1 is ONE_MINUS_X, the HW does + * not support it properly. + */ + TEXENV_SETUP_ARG_A(A_A, + texUnit->CombineSourceA[0], + texUnit->CombineOperandA[0], + incomingAlpha); + TEXENV_SETUP_MODE_A(Amode_A, + texUnit->CombineOperandA[0]); + TEXENV_SETUP_ARG_A(B_A, + texUnit->CombineSourceA[1], + texUnit->CombineOperandA[1], + incomingAlpha); + if (!TEXENV_OPERAND_INVERTED(texUnit->CombineOperandA[1])) { + Bmode_A = GR_FUNC_MODE_NEGATIVE_X; + } + else { + /* + * This case is wrong. + */ + Bmode_A = GR_FUNC_MODE_NEGATIVE_X; + return GL_FALSE; + } + /* + * The Source/Operand for the C value must + * specify some kind of alpha value. + */ + TEXENV_SETUP_ARG_A(C_A, + texUnit->CombineSourceA[2], + texUnit->CombineOperandA[2], + incomingAlpha); + Cinv_A = FXFALSE; + D_A = GR_CMBX_ZERO; + Dinv_A = Ginv_A = FXFALSE; + break; + default: + /* + * This is here mostly to keep from getting + * a compiler warning about these not being set. + * However, this should set all the alpha values + * to one. + */ + A_A = B_A = C_A = D_A = GR_CMBX_ZERO; + Amode_A = Bmode_A = GR_FUNC_MODE_X; + Cinv_A = Dinv_A = FXFALSE; + Ginv_A = FXTRUE; + break; + } + /* + * Save the parameters. + */ + env->Color.SourceA = A_RGB; + env->Color.ModeA = Amode_RGB; + env->Color.SourceB = B_RGB; + env->Color.ModeB = Bmode_RGB; + env->Color.SourceC = C_RGB; + env->Color.InvertC = Cinv_RGB; + env->Color.SourceD = D_RGB; + env->Color.InvertD = Dinv_RGB; + env->Color.Shift = Shift_RGB; + env->Color.Invert = Ginv_RGB; + env->Alpha.SourceA = A_A; + env->Alpha.ModeA = Amode_A; + env->Alpha.SourceB = B_A; + env->Alpha.ModeB = Bmode_A; + env->Alpha.SourceC = C_A; + env->Alpha.InvertC = Cinv_A; + env->Alpha.SourceD = D_A; + env->Alpha.InvertD = Dinv_A; + env->Alpha.Shift = Shift_A; + env->Alpha.Invert = Ginv_A; + env->EnvColor = PACK_RGBA32(texUnit->EnvColor[0] * 255.0F, + texUnit->EnvColor[1] * 255.0F, + texUnit->EnvColor[2] * 255.0F, + texUnit->EnvColor[3] * 255.0F); + } + break; + + default: + gl_problem(ctx, "Bad envMode in SetupTexEnvNapalm"); + } + + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_ENV; + + fxMesa->ColorCombineExt.SourceA = GR_CMBX_TEXTURE_RGB; + fxMesa->ColorCombineExt.ModeA = GR_FUNC_MODE_X, + fxMesa->ColorCombineExt.SourceB = GR_CMBX_ZERO; + fxMesa->ColorCombineExt.ModeB = GR_FUNC_MODE_X; + fxMesa->ColorCombineExt.SourceC = GR_CMBX_ZERO; + fxMesa->ColorCombineExt.InvertC = FXTRUE; + fxMesa->ColorCombineExt.SourceD = GR_CMBX_ZERO; + fxMesa->ColorCombineExt.InvertD = FXFALSE; + fxMesa->ColorCombineExt.Shift = 0; + fxMesa->ColorCombineExt.Invert = FXFALSE; + fxMesa->dirty |= TDFX_UPLOAD_COLOR_COMBINE; + fxMesa->AlphaCombineExt.SourceA = GR_CMBX_TEXTURE_ALPHA; + fxMesa->AlphaCombineExt.ModeA = GR_FUNC_MODE_X; + fxMesa->AlphaCombineExt.SourceB = GR_CMBX_ZERO; + fxMesa->AlphaCombineExt.ModeB = GR_FUNC_MODE_X; + fxMesa->AlphaCombineExt.SourceC = GR_CMBX_ZERO; + fxMesa->AlphaCombineExt.InvertC = FXTRUE; + fxMesa->AlphaCombineExt.SourceD = GR_CMBX_ZERO; + fxMesa->AlphaCombineExt.InvertD = FXFALSE; + fxMesa->AlphaCombineExt.Shift = 0; + fxMesa->AlphaCombineExt.Invert = FXFALSE; + fxMesa->dirty |= TDFX_UPLOAD_ALPHA_COMBINE; + return GL_TRUE; /* success */ +} + + + +/* + * Setup the Voodoo3 texture environment for a single texture unit. + * Return GL_TRUE for success, GL_FALSE for failure. + * If failure, we'll use software rendering. + */ +static GLboolean +SetupSingleTexEnvVoodoo3(GLcontext *ctx, int unit, + GLenum envMode, GLenum baseFormat) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GrCombineLocal_t localc, locala; + struct tdfx_combine alphaComb, colorComb; + + if (1 /*iteratedRGBA*/) + localc = locala = GR_COMBINE_LOCAL_ITERATED; + else + localc = locala = GR_COMBINE_LOCAL_CONSTANT; + + switch (envMode) { + case GL_DECAL: + alphaComb.Function = GR_COMBINE_FUNCTION_LOCAL; + alphaComb.Factor = GR_COMBINE_FACTOR_NONE; + alphaComb.Local = locala; + alphaComb.Other = GR_COMBINE_OTHER_NONE; + alphaComb.Invert = FXFALSE; + colorComb.Function = GR_COMBINE_FUNCTION_BLEND; + colorComb.Factor = GR_COMBINE_FACTOR_TEXTURE_ALPHA; + colorComb.Local = localc; + colorComb.Other = GR_COMBINE_OTHER_TEXTURE; + colorComb.Invert = FXFALSE; + break; + case GL_MODULATE: + alphaComb.Function = GR_COMBINE_FUNCTION_SCALE_OTHER; + alphaComb.Factor = GR_COMBINE_FACTOR_LOCAL; + alphaComb.Local = locala; + alphaComb.Other = GR_COMBINE_OTHER_TEXTURE; + alphaComb.Invert = FXFALSE; + if (baseFormat == GL_ALPHA) { + colorComb.Function = GR_COMBINE_FUNCTION_LOCAL; + colorComb.Factor = GR_COMBINE_FACTOR_NONE; + colorComb.Local = localc; + colorComb.Other = GR_COMBINE_OTHER_NONE; + colorComb.Invert = FXFALSE; + } + else { + colorComb.Function = GR_COMBINE_FUNCTION_SCALE_OTHER; + colorComb.Factor = GR_COMBINE_FACTOR_LOCAL; + colorComb.Local = localc; + colorComb.Other = GR_COMBINE_OTHER_TEXTURE; + colorComb.Invert = FXFALSE; + } + break; + + case GL_BLEND: + /* + * XXX we can't do real GL_BLEND mode. These settings assume that + * the TexEnv color is black and incoming fragment color is white. + */ + if (baseFormat == GL_LUMINANCE || baseFormat == GL_RGB) { + /* Av = Af */ + alphaComb.Function = GR_COMBINE_FUNCTION_LOCAL; + alphaComb.Factor = GR_COMBINE_FACTOR_NONE; + alphaComb.Local = locala; + alphaComb.Other = GR_COMBINE_OTHER_NONE; + alphaComb.Invert = FXFALSE; + } + else if (baseFormat == GL_INTENSITY) { + /* Av = Af * (1 - It) + Ac * It */ + /* XXX this is wrong */ + alphaComb.Function = GR_COMBINE_FUNCTION_LOCAL; + alphaComb.Factor = GR_COMBINE_FACTOR_NONE; + alphaComb.Local = locala; + alphaComb.Other = GR_COMBINE_OTHER_NONE; + alphaComb.Invert = FXFALSE; + } + else { + /* Av = Af * At */ + alphaComb.Function = GR_COMBINE_FUNCTION_SCALE_OTHER; + alphaComb.Factor = GR_COMBINE_FACTOR_LOCAL; + alphaComb.Local = locala; + alphaComb.Other = GR_COMBINE_OTHER_TEXTURE; + alphaComb.Invert = FXFALSE; + } + if (baseFormat == GL_ALPHA) { + colorComb.Function = GR_COMBINE_FUNCTION_LOCAL; + colorComb.Factor = GR_COMBINE_FACTOR_NONE; + colorComb.Local = localc; + colorComb.Other = GR_COMBINE_OTHER_NONE; + colorComb.Invert = FXFALSE; + } + else { + colorComb.Function = GR_COMBINE_FUNCTION_SCALE_OTHER; + colorComb.Factor = GR_COMBINE_FACTOR_ONE; + colorComb.Local = localc; + colorComb.Other = GR_COMBINE_OTHER_TEXTURE; + colorComb.Invert = FXTRUE; + } + /* XXX return GL_FALSE for modes we don't support */ + break; + + case GL_REPLACE: + if ((baseFormat == GL_RGB) || (baseFormat == GL_LUMINANCE)) { + alphaComb.Function = GR_COMBINE_FUNCTION_LOCAL; + alphaComb.Factor = GR_COMBINE_FACTOR_NONE; + alphaComb.Local = locala; + alphaComb.Other = GR_COMBINE_OTHER_NONE; + alphaComb.Invert = FXFALSE; + } + else { + alphaComb.Function = GR_COMBINE_FUNCTION_SCALE_OTHER; + alphaComb.Factor = GR_COMBINE_FACTOR_ONE; + alphaComb.Local = locala; + alphaComb.Other = GR_COMBINE_OTHER_TEXTURE; + alphaComb.Invert = FXFALSE; + } + if (baseFormat == GL_ALPHA) { + colorComb.Function = GR_COMBINE_FUNCTION_LOCAL; + colorComb.Factor = GR_COMBINE_FACTOR_NONE; + colorComb.Local = localc; + colorComb.Other = GR_COMBINE_OTHER_NONE; + colorComb.Invert = FXFALSE; + } + else { + colorComb.Function = GR_COMBINE_FUNCTION_SCALE_OTHER; + colorComb.Factor = GR_COMBINE_FACTOR_ONE; + colorComb.Local = localc; + colorComb.Other = GR_COMBINE_OTHER_TEXTURE; + colorComb.Invert = FXFALSE; + } + break; + + case GL_ADD: + if (baseFormat == GL_ALPHA || + baseFormat == GL_LUMINANCE_ALPHA || + baseFormat == GL_RGBA) { + /* product of texel and fragment alpha */ + alphaComb.Function = GR_COMBINE_FUNCTION_SCALE_OTHER; + alphaComb.Factor = GR_COMBINE_FACTOR_LOCAL; + alphaComb.Local = locala; + alphaComb.Other = GR_COMBINE_OTHER_TEXTURE; + alphaComb.Invert = FXFALSE; + } + else if (baseFormat == GL_LUMINANCE || baseFormat == GL_RGB) { + /* fragment alpha is unchanged */ + alphaComb.Function = GR_COMBINE_FUNCTION_LOCAL; + alphaComb.Factor = GR_COMBINE_FACTOR_NONE; + alphaComb.Local = locala; + alphaComb.Other = GR_COMBINE_OTHER_NONE; + alphaComb.Invert = FXFALSE; + } + else { + ASSERT(baseFormat == GL_INTENSITY); + /* sum of texel and fragment alpha */ + alphaComb.Function = GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL, + alphaComb.Factor = GR_COMBINE_FACTOR_ONE; + alphaComb.Local = locala; + alphaComb.Other = GR_COMBINE_OTHER_TEXTURE; + alphaComb.Invert = FXFALSE; + } + if (baseFormat == GL_ALPHA) { + /* rgb unchanged */ + colorComb.Function = GR_COMBINE_FUNCTION_LOCAL; + colorComb.Factor = GR_COMBINE_FACTOR_NONE; + colorComb.Local = localc; + colorComb.Other = GR_COMBINE_OTHER_NONE; + colorComb.Invert = FXFALSE; + } + else { + /* sum of texel and fragment rgb */ + colorComb.Function = GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL, + colorComb.Factor = GR_COMBINE_FACTOR_ONE; + colorComb.Local = localc; + colorComb.Other = GR_COMBINE_OTHER_TEXTURE; + colorComb.Invert = FXFALSE; + } + break; + + default: + gl_problem(NULL, "bad texture env mode in SetupSingleTexEnvVoodoo3"); + } + + if (colorComb.Function != fxMesa->ColorCombine.Function || + colorComb.Factor != fxMesa->ColorCombine.Factor || + colorComb.Local != fxMesa->ColorCombine.Local || + colorComb.Other != fxMesa->ColorCombine.Other || + colorComb.Invert != fxMesa->ColorCombine.Invert) { + fxMesa->ColorCombine = colorComb; + fxMesa->dirty |= TDFX_UPLOAD_COLOR_COMBINE; + } + + if (alphaComb.Function != fxMesa->AlphaCombine.Function || + alphaComb.Factor != fxMesa->AlphaCombine.Factor || + alphaComb.Local != fxMesa->AlphaCombine.Local || + alphaComb.Other != fxMesa->AlphaCombine.Other || + alphaComb.Invert != fxMesa->AlphaCombine.Invert) { + fxMesa->AlphaCombine = alphaComb; + fxMesa->dirty |= TDFX_UPLOAD_ALPHA_COMBINE; + } + return GL_TRUE; +} + + +/* + * Setup the Voodoo3 texture environment for dual texture units. + * Return GL_TRUE for success, GL_FALSE for failure. + * If failure, we'll use software rendering. + */ +static GLboolean +SetupDoubleTexEnvVoodoo3(GLcontext *ctx, int tmu0, + GLenum envMode0, GLenum baseFormat0, + GLenum envMode1, GLenum baseFormat1) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + const GrCombineLocal_t locala = GR_COMBINE_LOCAL_ITERATED; + const GrCombineLocal_t localc = GR_COMBINE_LOCAL_ITERATED; + const int tmu1 = 1 - tmu0; + + if (envMode0 == GL_MODULATE && envMode1 == GL_MODULATE) { + GLboolean isalpha[TDFX_NUM_TMU]; + + if (baseFormat0 == GL_ALPHA) + isalpha[tmu0] = GL_TRUE; + else + isalpha[tmu0] = GL_FALSE; + + if (baseFormat1 == GL_ALPHA) + isalpha[tmu1] = GL_TRUE; + else + isalpha[tmu1] = GL_FALSE; + + if (isalpha[TDFX_TMU1]) { + fxMesa->TexCombine[1].FunctionRGB = GR_COMBINE_FUNCTION_ZERO; + fxMesa->TexCombine[1].FactorRGB = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].FunctionAlpha = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[1].FactorAlpha = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].InvertRGB = FXTRUE; + fxMesa->TexCombine[1].InvertAlpha = FXFALSE; + } + else { + fxMesa->TexCombine[1].FunctionRGB = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[1].FactorRGB = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].FunctionAlpha = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[1].FactorAlpha = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].InvertRGB = FXFALSE; + fxMesa->TexCombine[1].InvertAlpha = FXFALSE; + } + if (isalpha[TDFX_TMU0]) { + fxMesa->TexCombine[0].FunctionRGB = GR_COMBINE_FUNCTION_BLEND_OTHER; + fxMesa->TexCombine[0].FactorRGB = GR_COMBINE_FACTOR_ONE; + fxMesa->TexCombine[0].FunctionAlpha = GR_COMBINE_FUNCTION_BLEND_OTHER; + fxMesa->TexCombine[0].FactorAlpha = GR_COMBINE_FACTOR_LOCAL; + fxMesa->TexCombine[0].InvertRGB = FXFALSE; + fxMesa->TexCombine[0].InvertAlpha = FXFALSE; + } + else { + fxMesa->TexCombine[0].FunctionRGB = GR_COMBINE_FUNCTION_BLEND_OTHER; + fxMesa->TexCombine[0].FactorRGB = GR_COMBINE_FACTOR_LOCAL; + fxMesa->TexCombine[0].FunctionAlpha = GR_COMBINE_FUNCTION_BLEND_OTHER; + fxMesa->TexCombine[0].FactorAlpha = GR_COMBINE_FACTOR_LOCAL; + fxMesa->TexCombine[0].InvertRGB = FXFALSE; + fxMesa->TexCombine[0].InvertAlpha = FXFALSE; + } + fxMesa->ColorCombine.Function = GR_COMBINE_FUNCTION_SCALE_OTHER; + fxMesa->ColorCombine.Factor = GR_COMBINE_FACTOR_LOCAL; + fxMesa->ColorCombine.Local = localc; + fxMesa->ColorCombine.Other = GR_COMBINE_OTHER_TEXTURE; + fxMesa->ColorCombine.Invert = FXFALSE; + fxMesa->AlphaCombine.Function = GR_COMBINE_FUNCTION_SCALE_OTHER; + fxMesa->AlphaCombine.Factor = GR_COMBINE_FACTOR_LOCAL; + fxMesa->AlphaCombine.Local = locala; + fxMesa->AlphaCombine.Other = GR_COMBINE_OTHER_TEXTURE; + fxMesa->AlphaCombine.Invert = FXFALSE; + } + else if (envMode0 == GL_REPLACE && envMode1 == GL_BLEND) { /* Quake */ + if (tmu1 == TDFX_TMU1) { + fxMesa->TexCombine[1].FunctionRGB = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[1].FactorRGB = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].FunctionAlpha = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[1].FactorAlpha = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].InvertRGB = FXTRUE; + fxMesa->TexCombine[1].InvertAlpha = FXFALSE; + fxMesa->TexCombine[0].FunctionRGB = GR_COMBINE_FUNCTION_BLEND_OTHER; + fxMesa->TexCombine[0].FactorRGB = GR_COMBINE_FACTOR_LOCAL; + fxMesa->TexCombine[0].FunctionAlpha = GR_COMBINE_FUNCTION_BLEND_OTHER; + fxMesa->TexCombine[0].FactorAlpha = GR_COMBINE_FACTOR_LOCAL; + fxMesa->TexCombine[0].InvertRGB = FXFALSE; + fxMesa->TexCombine[0].InvertAlpha = FXFALSE; + } + else { + fxMesa->TexCombine[1].FunctionRGB = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[1].FactorRGB = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].FunctionAlpha = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[1].FactorAlpha = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].InvertRGB = FXFALSE; + fxMesa->TexCombine[1].InvertAlpha = FXFALSE; + fxMesa->TexCombine[0].FunctionRGB = GR_COMBINE_FUNCTION_BLEND_OTHER; + fxMesa->TexCombine[0].FactorRGB = GR_COMBINE_FACTOR_ONE_MINUS_LOCAL; + fxMesa->TexCombine[0].FunctionAlpha = GR_COMBINE_FUNCTION_BLEND_OTHER; + fxMesa->TexCombine[0].FactorAlpha = GR_COMBINE_FACTOR_ONE_MINUS_LOCAL; + fxMesa->TexCombine[0].InvertRGB = FXFALSE; + fxMesa->TexCombine[0].InvertAlpha = FXFALSE; + } + fxMesa->ColorCombine.Function = GR_COMBINE_FUNCTION_SCALE_OTHER; + fxMesa->ColorCombine.Factor = GR_COMBINE_FACTOR_ONE; + fxMesa->ColorCombine.Local = localc; + fxMesa->ColorCombine.Other = GR_COMBINE_OTHER_TEXTURE; + fxMesa->ColorCombine.Invert = FXFALSE; + fxMesa->AlphaCombine.Function = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->AlphaCombine.Factor = GR_COMBINE_FACTOR_NONE; + fxMesa->AlphaCombine.Local = locala; + fxMesa->AlphaCombine.Other = GR_COMBINE_OTHER_NONE; + fxMesa->AlphaCombine.Invert = FXFALSE; + } + else if (envMode0 == GL_REPLACE && envMode1 == GL_MODULATE) { + /* Quake 2/3 */ + if (tmu1 == TDFX_TMU1) { + fxMesa->TexCombine[1].FunctionRGB = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[1].FactorRGB = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].FunctionAlpha = GR_COMBINE_FUNCTION_ZERO; + fxMesa->TexCombine[1].FactorAlpha = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].InvertRGB = FXFALSE; + fxMesa->TexCombine[1].InvertAlpha = FXTRUE; + fxMesa->TexCombine[0].FunctionRGB = GR_COMBINE_FUNCTION_BLEND_OTHER; + fxMesa->TexCombine[0].FactorRGB = GR_COMBINE_FACTOR_LOCAL; + fxMesa->TexCombine[0].FunctionAlpha = GR_COMBINE_FUNCTION_BLEND_OTHER; + fxMesa->TexCombine[0].FactorAlpha = GR_COMBINE_FACTOR_LOCAL; + fxMesa->TexCombine[0].InvertRGB = FXFALSE; + fxMesa->TexCombine[0].InvertAlpha = FXFALSE; + } + else { + fxMesa->TexCombine[1].FunctionRGB = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[1].FactorRGB = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].FunctionAlpha = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[1].FactorAlpha = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].InvertRGB = FXFALSE; + fxMesa->TexCombine[1].InvertAlpha = FXFALSE; + fxMesa->TexCombine[0].FunctionRGB = GR_COMBINE_FUNCTION_BLEND_OTHER; + fxMesa->TexCombine[0].FactorRGB = GR_COMBINE_FACTOR_LOCAL; + fxMesa->TexCombine[0].FunctionAlpha = GR_COMBINE_FUNCTION_BLEND_OTHER; + fxMesa->TexCombine[0].FactorAlpha = GR_COMBINE_FACTOR_ONE; + fxMesa->TexCombine[0].InvertRGB = FXFALSE; + fxMesa->TexCombine[0].InvertAlpha = FXFALSE; + } + + fxMesa->ColorCombine.Function = GR_COMBINE_FUNCTION_SCALE_OTHER; + fxMesa->ColorCombine.Factor = GR_COMBINE_FACTOR_ONE; + fxMesa->ColorCombine.Local = localc; + fxMesa->ColorCombine.Other = GR_COMBINE_OTHER_TEXTURE; + fxMesa->ColorCombine.Invert = FXFALSE; + if (baseFormat0 == GL_RGB) { + fxMesa->AlphaCombine.Function = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->AlphaCombine.Factor = GR_COMBINE_FACTOR_NONE; + fxMesa->AlphaCombine.Local = locala; + fxMesa->AlphaCombine.Other = GR_COMBINE_OTHER_NONE; + fxMesa->AlphaCombine.Invert = FXFALSE; + } + else { + fxMesa->AlphaCombine.Function = GR_COMBINE_FUNCTION_SCALE_OTHER; + fxMesa->AlphaCombine.Factor = GR_COMBINE_FACTOR_ONE; + fxMesa->AlphaCombine.Local = locala; + fxMesa->AlphaCombine.Other = GR_COMBINE_OTHER_NONE; + fxMesa->AlphaCombine.Invert = FXFALSE; + } + } + else if (envMode0 == GL_MODULATE && envMode1 == GL_ADD) { + /* Quake 3 sky */ + GLboolean isalpha[TDFX_NUM_TMU]; + if (baseFormat0 == GL_ALPHA) + isalpha[tmu0] = GL_TRUE; + else + isalpha[tmu0] = GL_FALSE; + if (baseFormat1 == GL_ALPHA) + isalpha[tmu1] = GL_TRUE; + else + isalpha[tmu1] = GL_FALSE; + + if (isalpha[TDFX_TMU1]) { + fxMesa->TexCombine[1].FunctionRGB = GR_COMBINE_FUNCTION_ZERO; + fxMesa->TexCombine[1].FactorRGB = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].FunctionAlpha = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[1].FactorAlpha = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].InvertRGB = FXTRUE; + fxMesa->TexCombine[1].InvertAlpha = FXFALSE; + } + else { + fxMesa->TexCombine[1].FunctionRGB = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[1].FactorRGB = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].FunctionAlpha = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[1].FactorAlpha = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].InvertRGB = FXFALSE; + fxMesa->TexCombine[1].InvertAlpha = FXFALSE; + } + if (isalpha[TDFX_TMU0]) { + fxMesa->TexCombine[0].FunctionRGB = GR_COMBINE_FUNCTION_SCALE_OTHER; + fxMesa->TexCombine[0].FactorRGB = GR_COMBINE_FACTOR_ONE; + fxMesa->TexCombine[0].FunctionAlpha = GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL; + fxMesa->TexCombine[0].FactorAlpha = GR_COMBINE_FACTOR_ONE; + fxMesa->TexCombine[0].InvertRGB = FXFALSE; + fxMesa->TexCombine[0].InvertAlpha = FXFALSE; + } + else { + fxMesa->TexCombine[0].FunctionRGB = GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL; + fxMesa->TexCombine[0].FactorRGB = GR_COMBINE_FACTOR_ONE; + fxMesa->TexCombine[0].FunctionAlpha = GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL; + fxMesa->TexCombine[0].FactorAlpha = GR_COMBINE_FACTOR_ONE; + fxMesa->TexCombine[0].InvertRGB = FXFALSE; + fxMesa->TexCombine[0].InvertAlpha = FXFALSE; + } + fxMesa->ColorCombine.Function = GR_COMBINE_FUNCTION_SCALE_OTHER; + fxMesa->ColorCombine.Factor = GR_COMBINE_FACTOR_LOCAL; + fxMesa->ColorCombine.Local = localc; + fxMesa->ColorCombine.Other = GR_COMBINE_OTHER_TEXTURE; + fxMesa->ColorCombine.Invert = FXFALSE; + fxMesa->AlphaCombine.Function = GR_COMBINE_FUNCTION_SCALE_OTHER; + fxMesa->AlphaCombine.Factor = GR_COMBINE_FACTOR_LOCAL; + fxMesa->AlphaCombine.Local = locala; + fxMesa->AlphaCombine.Other = GR_COMBINE_OTHER_TEXTURE; + fxMesa->AlphaCombine.Invert = FXFALSE; + } + else { + /*gl_problem(ctx, "Unexpected dual texture mode encountered\n");*/ + return GL_FALSE; + } + + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_ENV; + fxMesa->dirty |= TDFX_UPLOAD_COLOR_COMBINE; + fxMesa->dirty |= TDFX_UPLOAD_ALPHA_COMBINE; + return GL_TRUE; +} + + +/* + * This function makes sure that the correct mipmap levels are loaded + * in the right places in memory and then makes the Glide calls to + * setup the texture source pointers. + */ +static void +setupSingleTMU(tdfxContextPtr fxMesa, struct gl_texture_object *tObj) +{ + const GLcontext *ctx = fxMesa->glCtx; + tdfxSharedStatePtr tss = (tdfxSharedStatePtr)ctx->Shared->DriverData; + tdfxTexObjPtr t = TDFX_TEXTURE_DATA(tObj); + + /* Make sure we're not loaded incorrectly */ + if (t->isInTM && !tss->umaTexMemory) { + /* if doing filtering between mipmap levels, alternate mipmap levels + * must be in alternate TMUs. + */ + if (t->LODblend) { + if (t->whichTMU != TDFX_TMU_SPLIT) + tdfxTMMoveOutTMLocked(fxMesa, tObj); + } + else { + if (t->whichTMU == TDFX_TMU_SPLIT) + tdfxTMMoveOutTMLocked(fxMesa, tObj); + } + } + + /* Make sure we're loaded correctly */ + if (!t->isInTM) { + /* Have to download the texture */ + if (tss->umaTexMemory) { + tdfxTMMoveInTMLocked(fxMesa, tObj, TDFX_TMU0); + } + else { + /* Voodoo3 (split texture memory) */ + if (t->LODblend) { + tdfxTMMoveInTMLocked(fxMesa, tObj, TDFX_TMU_SPLIT); + } + else { +#if 0 + /* XXX putting textures into the second memory bank when the + * first bank is full is not working at this time. + */ + if (fxMesa->numTMUs > 1) { + GLint memReq = + grTexTextureMemRequired( GR_MIPMAPLEVELMASK_BOTH, &t->info ); + if (tss->freeTexMem[TDFX_TMU0] > memReq) { + tdfxTMMoveInTMLocked(fxMesa, tObj, TDFX_TMU0); + } + else { + tdfxTMMoveInTMLocked(fxMesa, tObj, TDFX_TMU1); + } + } + else +#endif + { + tdfxTMMoveInTMLocked( fxMesa, tObj, TDFX_TMU0 ); + } + } + } + } + + if (t->LODblend && t->whichTMU == TDFX_TMU_SPLIT) { + /* mipmap levels split between texture banks */ + GLint u; + + if (t->info.format == GR_TEXFMT_P_8 && !ctx->Texture.SharedPalette) { + fxMesa->TexPalette.Type = GR_TEXTABLE_PALETTE_6666_EXT; + fxMesa->TexPalette.Data = &(t->palette); + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_PALETTE; + } + + for (u = 0; u < 2; u++) { + fxMesa->TexParams[u].sClamp = t->sClamp; + fxMesa->TexParams[u].tClamp = t->tClamp; + fxMesa->TexParams[u].minFilt = t->minFilt; + fxMesa->TexParams[u].magFilt = t->magFilt; + fxMesa->TexParams[u].mmMode = t->mmMode; + fxMesa->TexParams[u].LODblend = t->LODblend; + fxMesa->TexParams[u].LodBias = ctx->Texture.Unit[u].LodBias; + } + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_PARAMS; + + fxMesa->TexSource[0].StartAddress = t->range[TDFX_TMU0]->startAddr; + fxMesa->TexSource[0].EvenOdd = GR_MIPMAPLEVELMASK_ODD; + fxMesa->TexSource[0].Info = &(t->info); + fxMesa->TexSource[1].StartAddress = t->range[TDFX_TMU1]->startAddr; + fxMesa->TexSource[1].EvenOdd = GR_MIPMAPLEVELMASK_EVEN; + fxMesa->TexSource[1].Info = &(t->info); + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_SOURCE; + } + else { + FxU32 tmu; + + if (t->whichTMU == TDFX_TMU_BOTH) + tmu = TDFX_TMU0; + else + tmu = t->whichTMU; + + if (tss->umaTexMemory) { + assert(t->whichTMU == TDFX_TMU0); + assert(tmu == TDFX_TMU0); + } + + if (t->info.format == GR_TEXFMT_P_8 && !ctx->Texture.SharedPalette) { + fxMesa->TexPalette.Type = GR_TEXTABLE_PALETTE_6666_EXT; + fxMesa->TexPalette.Data = &(t->palette); + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_PALETTE; + } + + /* KW: The alternative is to do the download to the other tmu. If + * we get to this point, I think it means we are thrashing the + * texture memory, so perhaps it's not a good idea. + */ + + if (fxMesa->TexParams[tmu].sClamp != t->sClamp || + fxMesa->TexParams[tmu].tClamp != t->tClamp || + fxMesa->TexParams[tmu].minFilt != t->minFilt || + fxMesa->TexParams[tmu].magFilt != t->magFilt || + fxMesa->TexParams[tmu].mmMode != t->mmMode || + fxMesa->TexParams[tmu].LODblend != FXFALSE || + fxMesa->TexParams[tmu].LodBias != ctx->Texture.Unit[tmu].LodBias) { + fxMesa->TexParams[tmu].sClamp = t->sClamp; + fxMesa->TexParams[tmu].tClamp = t->tClamp; + fxMesa->TexParams[tmu].minFilt = t->minFilt; + fxMesa->TexParams[tmu].magFilt = t->magFilt; + fxMesa->TexParams[tmu].mmMode = t->mmMode; + fxMesa->TexParams[tmu].LODblend = FXFALSE; + fxMesa->TexParams[tmu].LodBias = ctx->Texture.Unit[tmu].LodBias; + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_PARAMS; + } + + /* Glide texture source info */ + fxMesa->TexSource[0].Info = NULL; + fxMesa->TexSource[1].Info = NULL; + if (t->range[tmu]) { + fxMesa->TexSource[tmu].StartAddress = t->range[tmu]->startAddr; + fxMesa->TexSource[tmu].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; + fxMesa->TexSource[tmu].Info = &(t->info); + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_SOURCE; + } + } + + fxMesa->sScale0 = t->sScale; + fxMesa->tScale0 = t->tScale; +} + +static void +selectSingleTMUSrc(tdfxContextPtr fxMesa, GLint tmu, FxBool LODblend) +{ + if (LODblend) { + fxMesa->TexCombine[0].FunctionRGB = GR_COMBINE_FUNCTION_BLEND; + fxMesa->TexCombine[0].FactorRGB = GR_COMBINE_FACTOR_ONE_MINUS_LOD_FRACTION; + fxMesa->TexCombine[0].FunctionAlpha = GR_COMBINE_FUNCTION_BLEND; + fxMesa->TexCombine[0].FactorAlpha = GR_COMBINE_FACTOR_ONE_MINUS_LOD_FRACTION; + fxMesa->TexCombine[0].InvertRGB = FXFALSE; + fxMesa->TexCombine[0].InvertAlpha = FXFALSE; + + if ( fxMesa->numTMUs > 1 ) { + const struct gl_shared_state *ss = fxMesa->glCtx->Shared; + const tdfxSharedStatePtr tss = (tdfxSharedStatePtr)ss->DriverData; + int tmu; + + if (tss->umaTexMemory) + tmu = GR_TMU0; + else + tmu = GR_TMU1; + + fxMesa->TexCombine[tmu].FunctionRGB = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[tmu].FactorRGB = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[tmu].FunctionAlpha = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[tmu].FactorAlpha = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[tmu].InvertRGB = FXFALSE; + fxMesa->TexCombine[tmu].InvertAlpha = FXFALSE; + } + fxMesa->tmuSrc = TDFX_TMU_SPLIT; + } + else { + if (tmu != TDFX_TMU1) { + fxMesa->TexCombine[0].FunctionRGB = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[0].FactorRGB = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[0].FunctionAlpha = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[0].FactorAlpha = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[0].InvertRGB = FXFALSE; + fxMesa->TexCombine[0].InvertAlpha = FXFALSE; + if ( fxMesa->numTMUs > 1 ) { + fxMesa->TexCombine[1].FunctionRGB = GR_COMBINE_FUNCTION_ZERO; + fxMesa->TexCombine[1].FactorRGB = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].FunctionAlpha = GR_COMBINE_FUNCTION_ZERO; + fxMesa->TexCombine[1].FactorAlpha = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].InvertRGB = FXFALSE; + fxMesa->TexCombine[1].InvertAlpha = FXFALSE; + } + fxMesa->tmuSrc = TDFX_TMU0; + } + else { + fxMesa->TexCombine[1].FunctionRGB = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[1].FactorRGB = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].FunctionAlpha = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->TexCombine[1].FactorAlpha = GR_COMBINE_FACTOR_NONE; + fxMesa->TexCombine[1].InvertRGB = FXFALSE; + fxMesa->TexCombine[1].InvertAlpha = FXFALSE; + /* GR_COMBINE_FUNCTION_SCALE_OTHER doesn't work ?!? */ + fxMesa->TexCombine[0].FunctionRGB = GR_COMBINE_FUNCTION_BLEND; + fxMesa->TexCombine[0].FactorRGB = GR_COMBINE_FACTOR_ONE; + fxMesa->TexCombine[0].FunctionAlpha = GR_COMBINE_FUNCTION_BLEND; + fxMesa->TexCombine[0].FactorAlpha = GR_COMBINE_FACTOR_ONE; + fxMesa->TexCombine[0].InvertRGB = FXFALSE; + fxMesa->TexCombine[0].InvertAlpha = FXFALSE; + fxMesa->tmuSrc = TDFX_TMU1; + } + } + + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_ENV; +} + +static void print_state(tdfxContextPtr fxMesa) +{ + GLcontext *ctx = fxMesa->glCtx; + struct gl_texture_object *tObj0 = ctx->Texture.Unit[0].CurrentD[2]; + struct gl_texture_object *tObj1 = ctx->Texture.Unit[1].CurrentD[2]; + GLenum base0 = tObj0->Image[tObj0->BaseLevel] ? tObj0->Image[tObj0->BaseLevel]->Format : 99; + GLenum base1 = tObj1->Image[tObj1->BaseLevel] ? tObj1->Image[tObj1->BaseLevel]->Format : 99; + + printf("Unit 0: Enabled: GL=%d Gr=%d\n", ctx->Texture.Unit[0].ReallyEnabled, + fxMesa->TexState.Enabled); + printf(" EnvMode: GL=0x%x Gr=0x%x\n", ctx->Texture.Unit[0].EnvMode, + fxMesa->TexState.EnvMode[0]); + printf(" BaseFmt: GL=0x%x Gr=0x%x\n", base0, fxMesa->TexState.TexFormat[0]); + + + printf("Unit 1: Enabled: GL=%d Gr=%d\n", ctx->Texture.Unit[1].ReallyEnabled, + fxMesa->TexState.Enabled); + printf(" EnvMode: GL=0x%x Gr:0x%x\n", ctx->Texture.Unit[1].EnvMode, + fxMesa->TexState.EnvMode[1]); + printf(" BaseFmt: GL=0x%x Gr:0x%x\n", base1, fxMesa->TexState.TexFormat[1]); +} + + +/* + * When we're only using a single texture unit, we always use the 0th + * Glide/hardware unit, regardless if it's GL_TEXTURE0_ARB or GL_TEXTURE1_ARB + * that's enalbed. + * Input: ctx - the context + * unit - the OpenGL texture unit to use. + */ +static void setupTextureSingleTMU(GLcontext * ctx, GLuint unit) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + tdfxTexObjPtr t; + struct gl_texture_object *tObj; + int tmu; + GLenum envMode, baseFormat; + + tObj = ctx->Texture.Unit[unit].CurrentD[2]; + + if (!tObj->Image[tObj->BaseLevel]) { + fprintf(stderr, "tObj->Image[BaseLevel] is nil, how did this happen?!?\n"); + return; + } + + if (tObj->Image[tObj->BaseLevel]->Border > 0) { + fxMesa->Fallback |= TDFX_FALLBACK_TEXTURE_BORDER; + return; + } + + setupSingleTMU(fxMesa, tObj); + + t = TDFX_TEXTURE_DATA(tObj); + if (t->whichTMU == TDFX_TMU_BOTH) + tmu = TDFX_TMU0; + else + tmu = t->whichTMU; + + if (fxMesa->tmuSrc != tmu) { + selectSingleTMUSrc(fxMesa, tmu, t->LODblend); + } + + if (t->reloadImages) + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_IMAGES; + + /* Some texture environments not supported */ + fxMesa->Fallback &= ~TDFX_FALLBACK_TEXTURE_ENV; + + /* Check if we really need to update the texenv state */ + envMode = ctx->Texture.Unit[unit].EnvMode; + baseFormat = tObj->Image[tObj->BaseLevel]->Format; + + if (TDFX_IS_NAPALM(fxMesa)) { + /* see if we really need to update the unit */ + if (fxMesa->TexState.Enabled != ctx->Texture.ReallyEnabled || + envMode != fxMesa->TexState.EnvMode[0] || + envMode == GL_COMBINE_EXT || + baseFormat != fxMesa->TexState.TexFormat[0]) { + struct tdfx_texcombine_ext *otherEnv; + if (!SetupTexEnvNapalm(ctx, GL_TRUE, + &ctx->Texture.Unit[unit], baseFormat, + &fxMesa->TexCombineExt[0])) { + /* software fallback */ + fxMesa->Fallback |= TDFX_FALLBACK_TEXTURE_ENV; + } + /* disable other unit */ + otherEnv = &fxMesa->TexCombineExt[1]; + otherEnv->Color.SourceA = GR_CMBX_ZERO; + otherEnv->Color.ModeA = GR_FUNC_MODE_ZERO; + otherEnv->Color.SourceB = GR_CMBX_ZERO; + otherEnv->Color.ModeB = GR_FUNC_MODE_ZERO; + otherEnv->Color.SourceC = GR_CMBX_ZERO; + otherEnv->Color.InvertC = FXFALSE; + otherEnv->Color.SourceD = GR_CMBX_ZERO; + otherEnv->Color.InvertD = FXFALSE; + otherEnv->Color.Shift = 0; + otherEnv->Color.Invert = FXFALSE; + otherEnv->Alpha.SourceA = GR_CMBX_ITALPHA; + otherEnv->Alpha.ModeA = GR_FUNC_MODE_ZERO; + otherEnv->Alpha.SourceB = GR_CMBX_ITALPHA; + otherEnv->Alpha.ModeB = GR_FUNC_MODE_ZERO; + otherEnv->Alpha.SourceC = GR_CMBX_ZERO; + otherEnv->Alpha.InvertC = FXFALSE; + otherEnv->Alpha.SourceD = GR_CMBX_ZERO; + otherEnv->Alpha.InvertD = FXFALSE; + otherEnv->Alpha.Shift = 0; + otherEnv->Alpha.Invert = FXFALSE; + + fxMesa->TexState.Enabled = ctx->Texture.ReallyEnabled; + fxMesa->TexState.EnvMode[0] = envMode; + fxMesa->TexState.TexFormat[0] = baseFormat; + fxMesa->TexState.EnvMode[1] = 0; + fxMesa->TexState.TexFormat[1] = 0; + } + } + else { + /* Voodoo3 */ + + /* see if we really need to update the unit */ + if (fxMesa->TexState.Enabled != ctx->Texture.ReallyEnabled || + envMode != fxMesa->TexState.EnvMode[0] || + envMode == GL_COMBINE_EXT || + baseFormat != fxMesa->TexState.TexFormat[0]) { + if (!SetupSingleTexEnvVoodoo3(ctx, tmu, envMode, baseFormat)) { + /* software fallback */ + fxMesa->Fallback |= TDFX_FALLBACK_TEXTURE_ENV; + } + fxMesa->TexState.Enabled = ctx->Texture.ReallyEnabled; + fxMesa->TexState.EnvMode[0] = envMode; + fxMesa->TexState.TexFormat[0] = baseFormat; + fxMesa->TexState.EnvMode[1] = 0; + fxMesa->TexState.TexFormat[1] = 0; + } + } +} + + +static void +setupDoubleTMU(tdfxContextPtr fxMesa, + struct gl_texture_object *tObj0, + struct gl_texture_object *tObj1) +{ +#define T0_NOT_IN_TMU 0x01 +#define T1_NOT_IN_TMU 0x02 +#define T0_IN_TMU0 0x04 +#define T1_IN_TMU0 0x08 +#define T0_IN_TMU1 0x10 +#define T1_IN_TMU1 0x20 + + const struct gl_shared_state *ss = fxMesa->glCtx->Shared; + const tdfxSharedStatePtr tss = (tdfxSharedStatePtr)ss->DriverData; + const GLcontext *ctx = fxMesa->glCtx; + tdfxTexObjPtr t0 = TDFX_TEXTURE_DATA(tObj0); + tdfxTexObjPtr t1 = TDFX_TEXTURE_DATA(tObj1); + GLuint tstate = 0; + int tmu0 = 0, tmu1 = 1; + + if (tss->umaTexMemory) { + if (!t0->isInTM) { + tdfxTMMoveInTMLocked(fxMesa, tObj0, TDFX_TMU0); + assert(t0->isInTM); + } + if (!t1->isInTM) { + tdfxTMMoveInTMLocked(fxMesa, tObj1, TDFX_TMU0); + assert(t1->isInTM); + } + } + else { + /* We shouldn't need to do this. There is something wrong with + multitexturing when the TMUs are swapped. So, we're forcing + them to always be loaded correctly. !!! */ + if (t0->whichTMU == TDFX_TMU1) + tdfxTMMoveOutTMLocked(fxMesa, tObj0); + if (t1->whichTMU == TDFX_TMU0) + tdfxTMMoveOutTMLocked(fxMesa, tObj1); + + if (t0->isInTM) { + switch (t0->whichTMU) { + case TDFX_TMU0: + tstate |= T0_IN_TMU0; + break; + case TDFX_TMU1: + tstate |= T0_IN_TMU1; + break; + case TDFX_TMU_BOTH: + tstate |= T0_IN_TMU0 | T0_IN_TMU1; + break; + case TDFX_TMU_SPLIT: + tstate |= T0_NOT_IN_TMU; + break; + } + } + else + tstate |= T0_NOT_IN_TMU; + + if (t1->isInTM) { + switch (t1->whichTMU) { + case TDFX_TMU0: + tstate |= T1_IN_TMU0; + break; + case TDFX_TMU1: + tstate |= T1_IN_TMU1; + break; + case TDFX_TMU_BOTH: + tstate |= T1_IN_TMU0 | T1_IN_TMU1; + break; + case TDFX_TMU_SPLIT: + tstate |= T1_NOT_IN_TMU; + break; + } + } + else + tstate |= T1_NOT_IN_TMU; + + /* Move texture maps into TMUs */ + + if (!(((tstate & T0_IN_TMU0) && (tstate & T1_IN_TMU1)) || + ((tstate & T0_IN_TMU1) && (tstate & T1_IN_TMU0)))) { + if (tObj0 == tObj1) { + tdfxTMMoveInTMLocked(fxMesa, tObj1, TDFX_TMU_BOTH); + } + else { + /* Find the minimal way to correct the situation */ + if ((tstate & T0_IN_TMU0) || (tstate & T1_IN_TMU1)) { + /* We have one in the standard order, setup the other */ + if (tstate & T0_IN_TMU0) { + /* T0 is in TMU0, put T1 in TMU1 */ + tdfxTMMoveInTMLocked(fxMesa, tObj1, TDFX_TMU1); + } + else { + tdfxTMMoveInTMLocked(fxMesa, tObj0, TDFX_TMU0); + } + /* tmu0 and tmu1 are setup */ + } + else if ((tstate & T0_IN_TMU1) || (tstate & T1_IN_TMU0)) { + /* we have one in the reverse order, setup the other */ + if (tstate & T1_IN_TMU0) { + /* T1 is in TMU0, put T0 in TMU1 */ + tdfxTMMoveInTMLocked(fxMesa, tObj0, TDFX_TMU1); + } + else { + tdfxTMMoveInTMLocked(fxMesa, tObj1, TDFX_TMU0); + } + tmu0 = 1; + tmu1 = 0; + } + else { /* Nothing is loaded */ + tdfxTMMoveInTMLocked(fxMesa, tObj0, TDFX_TMU0); + tdfxTMMoveInTMLocked(fxMesa, tObj1, TDFX_TMU1); + /* tmu0 and tmu1 are setup */ + } + } + } + } + + t0->lastTimeUsed = fxMesa->texBindNumber; + t1->lastTimeUsed = fxMesa->texBindNumber; + + + if (!ctx->Texture.SharedPalette) { + if (t0->info.format == GR_TEXFMT_P_8) { + fxMesa->TexPalette.Type = GR_TEXTABLE_PALETTE_6666_EXT; + fxMesa->TexPalette.Data = &(t0->palette); + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_PALETTE; + } + else if (t1->info.format == GR_TEXFMT_P_8) { + fxMesa->TexPalette.Type = GR_TEXTABLE_PALETTE_6666_EXT; + fxMesa->TexPalette.Data = &(t1->palette); + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_PALETTE; + } + else { + fxMesa->TexPalette.Data = NULL; + } + } + + /* + * Setup Unit 0 + */ + assert(t0->isInTM); + assert(t0->range[tmu0]); + fxMesa->TexSource[tmu0].StartAddress = t0->range[tmu0]->startAddr; + fxMesa->TexSource[tmu0].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; + fxMesa->TexSource[tmu0].Info = &(t0->info); + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_SOURCE; + + if (fxMesa->TexParams[tmu0].sClamp != t0->sClamp || + fxMesa->TexParams[tmu0].tClamp != t0->tClamp || + fxMesa->TexParams[tmu0].minFilt != t0->minFilt || + fxMesa->TexParams[tmu0].magFilt != t0->magFilt || + fxMesa->TexParams[tmu0].mmMode != t0->mmMode || + fxMesa->TexParams[tmu0].LODblend != FXFALSE || + fxMesa->TexParams[tmu0].LodBias != ctx->Texture.Unit[tmu0].LodBias) { + fxMesa->TexParams[tmu0].sClamp = t0->sClamp; + fxMesa->TexParams[tmu0].tClamp = t0->tClamp; + fxMesa->TexParams[tmu0].minFilt = t0->minFilt; + fxMesa->TexParams[tmu0].magFilt = t0->magFilt; + fxMesa->TexParams[tmu0].mmMode = t0->mmMode; + fxMesa->TexParams[tmu0].LODblend = FXFALSE; + fxMesa->TexParams[tmu0].LodBias = ctx->Texture.Unit[tmu0].LodBias; + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_PARAMS; + } + + /* + * Setup Unit 1 + */ + if (tss->umaTexMemory) { + ASSERT(t1->isInTM); + ASSERT(t1->range[0]); + fxMesa->TexSource[tmu1].StartAddress = t1->range[0]->startAddr; + fxMesa->TexSource[tmu1].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; + fxMesa->TexSource[tmu1].Info = &(t1->info); + } + else { + ASSERT(t1->isInTM); + ASSERT(t1->range[tmu1]); + fxMesa->TexSource[tmu1].StartAddress = t1->range[tmu1]->startAddr; + fxMesa->TexSource[tmu1].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; + fxMesa->TexSource[tmu1].Info = &(t1->info); + } + + if (fxMesa->TexParams[tmu1].sClamp != t1->sClamp || + fxMesa->TexParams[tmu1].tClamp != t1->tClamp || + fxMesa->TexParams[tmu1].minFilt != t1->minFilt || + fxMesa->TexParams[tmu1].magFilt != t1->magFilt || + fxMesa->TexParams[tmu1].mmMode != t1->mmMode || + fxMesa->TexParams[tmu1].LODblend != FXFALSE || + fxMesa->TexParams[tmu1].LodBias != ctx->Texture.Unit[tmu1].LodBias) { + fxMesa->TexParams[tmu1].sClamp = t1->sClamp; + fxMesa->TexParams[tmu1].tClamp = t1->tClamp; + fxMesa->TexParams[tmu1].minFilt = t1->minFilt; + fxMesa->TexParams[tmu1].magFilt = t1->magFilt; + fxMesa->TexParams[tmu1].mmMode = t1->mmMode; + fxMesa->TexParams[tmu1].LODblend = FXFALSE; + fxMesa->TexParams[tmu1].LodBias = ctx->Texture.Unit[tmu1].LodBias; + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_PARAMS; + } + + fxMesa->sScale0 = t0->sScale; + fxMesa->tScale0 = t0->tScale; + fxMesa->sScale1 = t1->sScale; + fxMesa->tScale1 = t1->tScale; + +#undef T0_NOT_IN_TMU +#undef T1_NOT_IN_TMU +#undef T0_IN_TMU0 +#undef T1_IN_TMU0 +#undef T0_IN_TMU1 +#undef T1_IN_TMU1 +} + +static void setupTextureDoubleTMU(GLcontext * ctx) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + struct gl_texture_object *tObj0 = ctx->Texture.Unit[0].CurrentD[2]; + struct gl_texture_object *tObj1 = ctx->Texture.Unit[1].CurrentD[2]; + tdfxTexObjPtr t0 = TDFX_TEXTURE_DATA(tObj0); + tdfxTexObjPtr t1 = TDFX_TEXTURE_DATA(tObj1); + struct gl_texture_image *baseImage0 = tObj0->Image[tObj0->BaseLevel]; + struct gl_texture_image *baseImage1 = tObj1->Image[tObj1->BaseLevel]; + const GLenum envMode0 = ctx->Texture.Unit[0].EnvMode; + const GLenum envMode1 = ctx->Texture.Unit[1].EnvMode; + + if (baseImage0->Border > 0 || baseImage1->Border >0) { + fxMesa->Fallback |= TDFX_FALLBACK_TEXTURE_BORDER; + return; + } + + setupDoubleTMU(fxMesa, tObj0, tObj1); + + if (t0->reloadImages || t1->reloadImages) + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_IMAGES; + + fxMesa->tmuSrc = TDFX_TMU_BOTH; + + /* Some texture environments not supported */ + fxMesa->Fallback &= ~TDFX_FALLBACK_TEXTURE_ENV; + + if (TDFX_IS_NAPALM(fxMesa)) { + /* Remember, Glide has its texture units numbered in backward + * order compared to OpenGL. + */ + GLboolean hw1 = GL_TRUE, hw2 = GL_TRUE; + + /* check if we really need to update glide unit 1 */ + if (fxMesa->TexState.Enabled != ctx->Texture.ReallyEnabled || + envMode0 != fxMesa->TexState.EnvMode[1] || + envMode0 == GL_COMBINE_EXT || + baseImage0->Format != fxMesa->TexState.TexFormat[1] || + (fxMesa->Fallback & TDFX_FALLBACK_TEXTURE_ENV)) { + hw1 = SetupTexEnvNapalm(ctx, GL_TRUE, &ctx->Texture.Unit[0], + baseImage0->Format, &fxMesa->TexCombineExt[1]); + fxMesa->TexState.EnvMode[1] = envMode0; + fxMesa->TexState.TexFormat[1] = baseImage0->Format; + } + + /* check if we really need to update glide unit 0 */ + if (fxMesa->TexState.Enabled != ctx->Texture.ReallyEnabled || + envMode1 != fxMesa->TexState.EnvMode[0] || + envMode1 == GL_COMBINE_EXT || + baseImage1->Format != fxMesa->TexState.TexFormat[0] || + (fxMesa->Fallback & TDFX_FALLBACK_TEXTURE_ENV)) { + hw2 = SetupTexEnvNapalm(ctx, GL_FALSE, &ctx->Texture.Unit[1], + baseImage1->Format, &fxMesa->TexCombineExt[0]); + fxMesa->TexState.EnvMode[0] = envMode1; + fxMesa->TexState.TexFormat[0] = baseImage1->Format; + } + + fxMesa->TexState.Enabled = ctx->Texture.ReallyEnabled; + + if (!hw1 || !hw2) { + fxMesa->Fallback |= TDFX_FALLBACK_TEXTURE_ENV; + } + } + else { + int unit0, unit1; + if ((t0->whichTMU == TDFX_TMU1) || (t1->whichTMU == TDFX_TMU0)) + unit0 = 1; + else + unit0 = 0; + unit1 = 1 - unit0; + + if (fxMesa->TexState.Enabled != ctx->Texture.ReallyEnabled || + envMode0 != fxMesa->TexState.EnvMode[unit0] || + envMode0 == GL_COMBINE_EXT || + envMode1 != fxMesa->TexState.EnvMode[unit1] || + envMode1 == GL_COMBINE_EXT || + baseImage0->Format != fxMesa->TexState.TexFormat[unit0] || + baseImage1->Format != fxMesa->TexState.TexFormat[unit1] || + (fxMesa->Fallback & TDFX_FALLBACK_TEXTURE_ENV)) { + + if (!SetupDoubleTexEnvVoodoo3(ctx, unit0, + ctx->Texture.Unit[0].EnvMode, baseImage0->Format, + ctx->Texture.Unit[1].EnvMode, baseImage1->Format)) { + fxMesa->Fallback |= TDFX_FALLBACK_TEXTURE_ENV; + } + + fxMesa->TexState.EnvMode[unit0] = envMode0; + fxMesa->TexState.TexFormat[unit0] = baseImage0->Format; + fxMesa->TexState.EnvMode[unit1] = envMode1; + fxMesa->TexState.TexFormat[unit1] = baseImage1->Format; + fxMesa->TexState.Enabled = ctx->Texture.ReallyEnabled; + } + } +} + + +void tdfxUpdateTextureState( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GLuint enabled = ctx->Texture.ReallyEnabled; + + if ( fxMesa->numTMUs == 1 ) + enabled &= TEXTURE0_2D; + + switch ( enabled ) { + case TEXTURE0_2D: + LOCK_HARDWARE( fxMesa ); /* XXX remove locking eventually */ + setupTextureSingleTMU( ctx, 0 ); + UNLOCK_HARDWARE( fxMesa ); + break; + case TEXTURE1_2D: + LOCK_HARDWARE( fxMesa ); + setupTextureSingleTMU( ctx, 1 ); + UNLOCK_HARDWARE( fxMesa ); + break; + case TEXTURE0_2D | TEXTURE1_2D: + LOCK_HARDWARE( fxMesa ); + setupTextureDoubleTMU( ctx ); + UNLOCK_HARDWARE( fxMesa ); + break; + + default: + /* Disable hardware texturing */ + if ( TDFX_IS_NAPALM( fxMesa ) ) { + fxMesa->ColorCombineExt.SourceA = GR_CMBX_ITRGB; + fxMesa->ColorCombineExt.ModeA = GR_FUNC_MODE_X; + fxMesa->ColorCombineExt.SourceB = GR_CMBX_ZERO; + fxMesa->ColorCombineExt.ModeB = GR_FUNC_MODE_ZERO; + fxMesa->ColorCombineExt.SourceC = GR_CMBX_ZERO; + fxMesa->ColorCombineExt.InvertC = FXTRUE; + fxMesa->ColorCombineExt.SourceD = GR_CMBX_ZERO; + fxMesa->ColorCombineExt.InvertD = FXFALSE; + fxMesa->ColorCombineExt.Shift = 0; + fxMesa->ColorCombineExt.Invert = FXFALSE; + fxMesa->AlphaCombineExt.SourceA = GR_CMBX_ITALPHA; + fxMesa->AlphaCombineExt.ModeA = GR_FUNC_MODE_X; + fxMesa->AlphaCombineExt.SourceB = GR_CMBX_ZERO; + fxMesa->AlphaCombineExt.ModeB = GR_FUNC_MODE_ZERO; + fxMesa->AlphaCombineExt.SourceC = GR_CMBX_ZERO; + fxMesa->AlphaCombineExt.InvertC = FXTRUE; + fxMesa->AlphaCombineExt.SourceD = GR_CMBX_ZERO; + fxMesa->AlphaCombineExt.InvertD = FXFALSE; + fxMesa->AlphaCombineExt.Shift = 0; + fxMesa->AlphaCombineExt.Invert = FXFALSE; + } else { + /* Voodoo 3 */ + fxMesa->ColorCombine.Function = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->ColorCombine.Factor = GR_COMBINE_FACTOR_NONE; + fxMesa->ColorCombine.Local = GR_COMBINE_LOCAL_ITERATED; + fxMesa->ColorCombine.Other = GR_COMBINE_OTHER_NONE; + fxMesa->ColorCombine.Invert = FXFALSE; + fxMesa->AlphaCombine.Function = GR_COMBINE_FUNCTION_LOCAL; + fxMesa->AlphaCombine.Factor = GR_COMBINE_FACTOR_NONE; + fxMesa->AlphaCombine.Local = GR_COMBINE_LOCAL_ITERATED; + fxMesa->AlphaCombine.Other = GR_COMBINE_OTHER_NONE; + fxMesa->AlphaCombine.Invert = FXFALSE; + } + + fxMesa->TexState.Enabled = 0; + fxMesa->TexState.EnvMode[0] = 0; + fxMesa->TexState.EnvMode[1] = 0; + + fxMesa->dirty |= TDFX_UPLOAD_COLOR_COMBINE; + fxMesa->dirty |= TDFX_UPLOAD_ALPHA_COMBINE; + } +} + + +/* This is a special case of texture state update. + * It's used when we've simply bound a new texture to a texture + * unit and the new texture has the exact same attributes as the + * previously bound texture. + * This is very common in Quake3. + */ +void tdfxUpdateTextureBinding( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + const struct gl_shared_state *ss = fxMesa->glCtx->Shared; + const tdfxSharedStatePtr tss = (tdfxSharedStatePtr)ss->DriverData; + struct gl_texture_object *tObj0 = ctx->Texture.Unit[0].CurrentD[2]; + struct gl_texture_object *tObj1 = ctx->Texture.Unit[1].CurrentD[2]; + tdfxTexObjPtr t0 = TDFX_TEXTURE_DATA(tObj0); + tdfxTexObjPtr t1 = TDFX_TEXTURE_DATA(tObj1); + + if ( t0 ) { + fxMesa->sScale0 = t0->sScale; + fxMesa->tScale0 = t0->tScale; + if ( t0->info.format == GR_TEXFMT_P_8 ) { + fxMesa->TexPalette.Type = GR_TEXTABLE_PALETTE_6666_EXT; + fxMesa->TexPalette.Data = &t0->palette; + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_PALETTE; + } else if ( t1 && t1->info.format == GR_TEXFMT_P_8 ) { + fxMesa->TexPalette.Type = GR_TEXTABLE_PALETTE_6666_EXT; + fxMesa->TexPalette.Data = &t1->palette; + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_PALETTE; + } + } + if ( t1 ) { + fxMesa->sScale1 = t1->sScale; + fxMesa->tScale1 = t1->tScale; + } + + switch ( ctx->Texture.ReallyEnabled ) { + case TEXTURE0_2D: + if ( tss->umaTexMemory ) { + fxMesa->TexSource[0].StartAddress = t0->range[0]->startAddr; + fxMesa->TexSource[0].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; + fxMesa->TexSource[0].Info = &(t0->info); + } else { + if ( t0->LODblend && t0->whichTMU == TDFX_TMU_SPLIT ) { + fxMesa->TexSource[0].StartAddress = t0->range[TDFX_TMU0]->startAddr; + fxMesa->TexSource[0].EvenOdd = GR_MIPMAPLEVELMASK_ODD; + fxMesa->TexSource[0].Info = &t0->info; + fxMesa->TexSource[1].StartAddress = t0->range[TDFX_TMU1]->startAddr; + fxMesa->TexSource[1].EvenOdd = GR_MIPMAPLEVELMASK_EVEN; + fxMesa->TexSource[1].Info = &t0->info; + } else { + FxU32 unit; + if ( t0->whichTMU == TDFX_TMU_BOTH ) { + unit = TDFX_TMU0; + } else { + unit = t0->whichTMU; + } + fxMesa->TexSource[0].Info = NULL; + fxMesa->TexSource[1].Info = NULL; + if ( t0->range[unit] ) { + fxMesa->TexSource[unit].StartAddress = t0->range[unit]->startAddr; + fxMesa->TexSource[unit].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; + fxMesa->TexSource[unit].Info = &t0->info; + } + } + } + break; + + case TEXTURE1_2D: + if ( tss->umaTexMemory ) { + fxMesa->TexSource[0].StartAddress = t1->range[0]->startAddr; + fxMesa->TexSource[0].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; + fxMesa->TexSource[0].Info = &t1->info; + } + break; + + case TEXTURE0_2D | TEXTURE1_2D: + if ( tss->umaTexMemory ) { + const FxU32 tmu0 = 0, tmu1 = 1; + fxMesa->TexSource[tmu0].StartAddress = t0->range[0]->startAddr; + fxMesa->TexSource[tmu0].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; + fxMesa->TexSource[tmu0].Info = &t0->info; + + fxMesa->TexSource[tmu1].StartAddress = t1->range[0]->startAddr; + fxMesa->TexSource[tmu1].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; + fxMesa->TexSource[tmu1].Info = &t1->info; + } + else { + const FxU32 tmu0 = 0, tmu1 = 1; + fxMesa->TexSource[tmu0].StartAddress = t0->range[tmu0]->startAddr; + fxMesa->TexSource[tmu0].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; + fxMesa->TexSource[tmu0].Info = &t0->info; + + fxMesa->TexSource[tmu1].StartAddress = t1->range[tmu1]->startAddr; + fxMesa->TexSource[tmu1].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; + fxMesa->TexSource[tmu1].Info = &t1->info; + } + break; + } + + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_SOURCE; +} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c:1.1 --- /dev/null Mon Jun 4 12:37:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c Wed Mar 21 11:14:28 2001 @@ -0,0 +1,508 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * Keith Whitwell + * + */ + +#include "tdfx_context.h" +#include "tdfx_tris.h" + +#include "pipeline.h" +#include "vbindirect.h" + +static struct { + points_func points; + line_func line; + triangle_func triangle; + quad_func quad; + render_func *render_tab; +} rast_tab[TDFX_MAX_TRIFUNC]; + +#define TDFX_COLOR( to, from ) \ + do { \ + (to)[0] = (from)[2]; \ + (to)[1] = (from)[1]; \ + (to)[2] = (from)[0]; \ + (to)[3] = (from)[3]; \ + } while (0) + + +static void tdfxPrintRenderState( const char *msg, GLuint state ) +{ + fprintf( stderr, "%s: (0x%x) %s%s%s%s\n", + msg, state, + (state & TDFX_FLAT_BIT) ? "flat, " : "", + (state & TDFX_OFFSET_BIT) ? "offset, " : "", + (state & TDFX_TWOSIDE_BIT) ? "twoside, " : "", + (state & TDFX_CLIPRECT_BIT) ? "cliprects, " : ""); +} + + +#define IND (0) +#define TAG(x) x +#include "tdfx_tritmp.h" + +#define IND (TDFX_FLAT_BIT) +#define TAG(x) x##_flat +#include "tdfx_tritmp.h" + +#define IND (TDFX_OFFSET_BIT) +#define TAG(x) x##_offset +#include "tdfx_tritmp.h" + +#define IND (TDFX_OFFSET_BIT | TDFX_FLAT_BIT) +#define TAG(x) x##_offset_flat +#include "tdfx_tritmp.h" + +#define IND (TDFX_TWOSIDE_BIT) +#define TAG(x) x##_twoside +#include "tdfx_tritmp.h" + +#define IND (TDFX_TWOSIDE_BIT | TDFX_FLAT_BIT) +#define TAG(x) x##_twoside_flat +#include "tdfx_tritmp.h" + +#define IND (TDFX_TWOSIDE_BIT | TDFX_OFFSET_BIT) +#define TAG(x) x##_twoside_offset +#include "tdfx_tritmp.h" + +#define IND (TDFX_TWOSIDE_BIT | TDFX_OFFSET_BIT | TDFX_FLAT_BIT) +#define TAG(x) x##_twoside_offset_flat +#include "tdfx_tritmp.h" + +#define IND (TDFX_CLIPRECT_BIT) +#define TAG(x) x##_cliprect +#include "tdfx_tritmp.h" + +#define IND (TDFX_FLAT_BIT | TDFX_CLIPRECT_BIT) +#define TAG(x) x##_flat_cliprect +#include "tdfx_tritmp.h" + +#define IND (TDFX_OFFSET_BIT | TDFX_CLIPRECT_BIT) +#define TAG(x) x##_offset_cliprect +#include "tdfx_tritmp.h" + +#define IND (TDFX_OFFSET_BIT | TDFX_FLAT_BIT | TDFX_CLIPRECT_BIT) +#define TAG(x) x##_offset_flat_cliprect +#include "tdfx_tritmp.h" + +#define IND (TDFX_TWOSIDE_BIT | TDFX_CLIPRECT_BIT) +#define TAG(x) x##_twoside_cliprect +#include "tdfx_tritmp.h" + +#define IND (TDFX_TWOSIDE_BIT | TDFX_FLAT_BIT | TDFX_CLIPRECT_BIT) +#define TAG(x) x##_twoside_flat_cliprect +#include "tdfx_tritmp.h" + +#define IND (TDFX_TWOSIDE_BIT | TDFX_OFFSET_BIT | TDFX_CLIPRECT_BIT) +#define TAG(x) x##_twoside_offset_cliprect +#include "tdfx_tritmp.h" + +#define IND (TDFX_TWOSIDE_BIT | TDFX_OFFSET_BIT | TDFX_FLAT_BIT | TDFX_CLIPRECT_BIT) +#define TAG(x) x##_twoside_offset_flat_cliprect +#include "tdfx_tritmp.h" + +static void tdfx_render_vb_points( struct vertex_buffer *VB, + GLuint start, + GLuint count, + GLuint parity ) +{ + GLcontext *ctx = VB->ctx; + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; + GLint i; + (void) parity; + /* Adjust point coords */ + for (i = start; i < count; i++) { + fxVB[i].v.x += PNT_X_OFFSET - TRI_X_OFFSET; + fxVB[i].v.y += PNT_Y_OFFSET - TRI_Y_OFFSET; + } + grDrawVertexArrayContiguous( GR_POINTS, count-start, fxVB+start, + sizeof(*fxVB)); + /* restore point coords */ + for (i = start; i < count; i++) { + fxVB[i].v.x -= PNT_X_OFFSET - TRI_X_OFFSET; + fxVB[i].v.y -= PNT_Y_OFFSET - TRI_Y_OFFSET; + } +} + +static void tdfx_render_vb_line_strip( struct vertex_buffer *VB, + GLuint start, + GLuint count, + GLuint parity ) +{ + tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; + GLint i; + (void) parity; + /* adjust line coords */ + for (i = start; i < count; i++) { + fxVB[i].v.x += LINE_X_OFFSET - TRI_X_OFFSET; + fxVB[i].v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; + } + grDrawVertexArrayContiguous( GR_LINE_STRIP, count-start, fxVB+start, + sizeof(*fxVB)); + /* restore line coords */ + for (i = start; i < count; i++) { + fxVB[i].v.x -= LINE_X_OFFSET - TRI_X_OFFSET; + fxVB[i].v.y -= LINE_Y_OFFSET - TRI_Y_OFFSET; + } +} + +static void tdfx_render_vb_lines( struct vertex_buffer *VB, + GLuint start, + GLuint count, + GLuint parity ) +{ + tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; + GLint i; + (void) parity; + /* adjust line coords */ + for (i = start; i < count; i++) { + fxVB[i].v.x += LINE_X_OFFSET - TRI_X_OFFSET; + fxVB[i].v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; + } + grDrawVertexArrayContiguous( GR_LINES, count-start, fxVB+start, + sizeof(*fxVB)); + /* restore line coords */ + for (i = start; i < count; i++) { + fxVB[i].v.x -= LINE_X_OFFSET - TRI_X_OFFSET; + fxVB[i].v.y -= LINE_Y_OFFSET - TRI_Y_OFFSET; + } +} + +static void tdfx_render_vb_triangles( struct vertex_buffer *VB, + GLuint start, + GLuint count, + GLuint parity ) +{ + tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; + grDrawVertexArrayContiguous( GR_TRIANGLES, count-start, fxVB+start, + sizeof(*fxVB)); + (void) parity; +} + + +static void tdfx_render_vb_tri_strip( struct vertex_buffer *VB, + GLuint start, + GLuint count, + GLuint parity ) +{ + tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; + grDrawVertexArrayContiguous( GR_TRIANGLE_STRIP, count-start, fxVB+start, + sizeof(*fxVB)); + (void) parity; +} + + +static void tdfx_render_vb_tri_fan( struct vertex_buffer *VB, + GLuint start, + GLuint count, + GLuint parity ) +{ + tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; + grDrawVertexArrayContiguous( GR_TRIANGLE_FAN, count-start, fxVB+start, + sizeof(*fxVB) ); + (void) parity; +} + + +static void tdfx_render_vb_poly( struct vertex_buffer *VB, + GLuint start, + GLuint count, + GLuint parity ) +{ + tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; + grDrawVertexArrayContiguous( GR_POLYGON, count-start, fxVB+start, + sizeof(*fxVB)); + (void) parity; +} + + +#define RENDER_POINTS( start, count ) \ +do { \ + int i; \ + for (i = start ; i < count ; i++) { \ + v[elt[i]].v.x += PNT_X_OFFSET - TRI_X_OFFSET; \ + v[elt[i]].v.y += PNT_Y_OFFSET - TRI_Y_OFFSET; \ + grDrawPoint(&v[elt[i]]); \ + v[elt[i]].v.x -= PNT_X_OFFSET - TRI_X_OFFSET; \ + v[elt[i]].v.y -= PNT_Y_OFFSET - TRI_Y_OFFSET; \ + } \ +} while (0) + +#define RENDER_LINE( i0, i1 ) \ +do { \ + v[elt[i0]].v.x += LINE_X_OFFSET - TRI_X_OFFSET; \ + v[elt[i0]].v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; \ + v[elt[i1]].v.x += LINE_X_OFFSET - TRI_X_OFFSET; \ + v[elt[i1]].v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; \ + grDrawLine( &v[elt[i0]], &v[elt[i1]] ); \ + v[elt[i0]].v.x -= LINE_X_OFFSET - TRI_X_OFFSET; \ + v[elt[i0]].v.y -= LINE_Y_OFFSET - TRI_Y_OFFSET; \ + v[elt[i1]].v.x -= LINE_X_OFFSET - TRI_X_OFFSET; \ + v[elt[i1]].v.y -= LINE_Y_OFFSET - TRI_Y_OFFSET; \ +} while (0) + +#define RENDER_TRI( i2, i1, i, pv, parity ) \ +do { \ + if (parity) grDrawTriangle( &v[elt[i1]], &v[elt[i2]], &v[elt[i]] ); \ + else grDrawTriangle( &v[elt[i2]], &v[elt[i1]], &v[elt[i]] ); \ +} while (0) + +#define RENDER_QUAD( i3, i2, i1, i, pv ) \ +do { \ + grDrawTriangle( &v[elt[i3]], &v[elt[i2]], &v[elt[i]] ); \ + grDrawTriangle( &v[elt[i2]], &v[elt[i1]], &v[elt[i]] ); \ +} while (0) + + +#define LOCAL_VARS \ + GLcontext *ctx = VB->ctx; \ + const GLuint *elt = VB->EltPtr->data; \ + tdfxVertexPtr v = TDFX_DRIVER_DATA(VB)->verts; \ + (void) v; (void) ctx; + +#define TAG(x) tdfx_##x##_elts +#include "render_tmp.h" + + +static void tdfxDDRenderEltsRaw( struct vertex_buffer *VB ) +{ + GLcontext *ctx = VB->ctx; + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + struct vertex_buffer *OldVB = ctx->VB; + GLenum prim = ctx->CVA.elt_mode; + GLuint nr = VB->EltPtr->count; + render_func func = tdfx_render_tab_elts[prim]; + GLuint p = 0; + + ctx->VB = VB; + ctx->Driver.RenderStart( ctx ); + + BEGIN_CLIP_LOOP_LOCKED( fxMesa ); + do { + func( VB, 0, nr, 0 ); + } while ( ctx->Driver.MultipassFunc && + ctx->Driver.MultipassFunc( VB, ++p ) ); + END_CLIP_LOOP_LOCKED( fxMesa ); + + ctx->Driver.RenderFinish( ctx ); + ctx->VB = OldVB; +} + + +void tdfxDDTriangleFuncsInit( void ) +{ + init(); + init_flat(); + init_offset(); + init_offset_flat(); + init_twoside(); + init_twoside_flat(); + init_twoside_offset(); + init_twoside_offset_flat(); + + init_cliprect(); + init_flat_cliprect(); + init_offset_cliprect(); + init_offset_flat_cliprect(); + init_twoside_cliprect(); + init_twoside_flat_cliprect(); + init_twoside_offset_cliprect(); + init_twoside_offset_flat_cliprect(); + + rast_tab[0].render_tab[GL_POINTS] = tdfx_render_vb_points; + rast_tab[0].render_tab[GL_LINE_STRIP] = tdfx_render_vb_line_strip; + rast_tab[0].render_tab[GL_LINES] = tdfx_render_vb_lines; + rast_tab[0].render_tab[GL_TRIANGLES] = tdfx_render_vb_triangles; + rast_tab[0].render_tab[GL_TRIANGLE_STRIP] = tdfx_render_vb_tri_strip; + rast_tab[0].render_tab[GL_TRIANGLE_FAN] = tdfx_render_vb_tri_fan; + rast_tab[0].render_tab[GL_POLYGON] = tdfx_render_vb_poly; + + tdfx_render_init_elts(); +} + + +#define ALL_FALLBACK (DD_SELECT | DD_FEEDBACK) +#define POINT_FALLBACK (ALL_FALLBACK | DD_POINT_SMOOTH | DD_POINT_ATTEN) +#define LINE_FALLBACK (ALL_FALLBACK | DD_LINE_STIPPLE) +#define TRI_FALLBACK (ALL_FALLBACK | DD_TRI_SMOOTH | DD_TRI_UNFILLED) +#define ANY_FALLBACK (POINT_FALLBACK | LINE_FALLBACK | TRI_FALLBACK | DD_TRI_STIPPLE | DD_LINE_SMOOTH | DD_LINE_WIDTH | DD_POINT_SIZE ) +#define ANY_RENDER_FLAGS (DD_FLATSHADE | DD_TRI_LIGHT_TWOSIDE | DD_TRI_OFFSET) + +/* Setup the Point, Line, Triangle and Quad functions based on the + * current rendering state. Wherever possible, use the hardware to + * render the primitive. Otherwise, fallback to software rendering. + */ +void tdfxDDChooseRenderState( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + GLuint flags = ctx->TriangleCaps; + CARD32 index = 0; + fxMesa->RenderElementsRaw = tdfxDDRenderEltsRaw; + + if ( fxMesa->Fallback ) { + fxMesa->RenderElementsRaw = gl_render_elts; + fxMesa->RenderIndex = TDFX_FALLBACK_BIT; + return; + } + + if ( flags & ANY_RENDER_FLAGS ) { + if ( flags & DD_FLATSHADE ) index |= TDFX_FLAT_BIT; + if ( flags & DD_TRI_LIGHT_TWOSIDE ) index |= TDFX_TWOSIDE_BIT; + if ( flags & DD_TRI_OFFSET ) index |= TDFX_OFFSET_BIT; + fxMesa->RenderElementsRaw = gl_render_elts; + } + + if ( fxMesa->numClipRects > 1 ) + index |= TDFX_CLIPRECT_BIT; + + fxMesa->PointsFunc = rast_tab[index].points; + fxMesa->LineFunc = rast_tab[index].line; + fxMesa->TriangleFunc = rast_tab[index].triangle; + fxMesa->QuadFunc = rast_tab[index].quad; + fxMesa->RenderVBRawTab = rast_tab[index].render_tab; + fxMesa->RenderIndex = index; + fxMesa->IndirectTriangles = 0; + + if ( flags & ANY_FALLBACK ) { + if ( flags & POINT_FALLBACK ) { + fxMesa->PointsFunc = 0; + fxMesa->RenderVBRawTab = 0; + fxMesa->IndirectTriangles |= DD_POINT_SW_RASTERIZE; + fxMesa->RenderIndex |= TDFX_FALLBACK_BIT; + } + + if ( flags & LINE_FALLBACK ) { + fxMesa->LineFunc = 0; + fxMesa->RenderVBRawTab = 0; + fxMesa->IndirectTriangles |= DD_LINE_SW_RASTERIZE; + fxMesa->RenderIndex |= TDFX_FALLBACK_BIT; + } + + if ( flags & TRI_FALLBACK ) { + fxMesa->TriangleFunc = 0; + fxMesa->QuadFunc = 0; + fxMesa->RenderVBRawTab = 0; + fxMesa->IndirectTriangles |= (DD_TRI_SW_RASTERIZE | + DD_QUAD_SW_RASTERIZE); + fxMesa->RenderIndex |= TDFX_FALLBACK_BIT; + } + + /* Special case: wide, AA lines must be done in software */ + if (flags & DD_LINE_SMOOTH) { + if (ctx->Line.Width != 1.0) { + fxMesa->RenderVBRawTab = 0; + fxMesa->LineFunc = 0; + fxMesa->IndirectTriangles |= DD_LINE_SW_RASTERIZE; + fxMesa->RenderIndex |= TDFX_FALLBACK_BIT; + } + } + + /* Special case: we can do polygon stipples, but otherwise */ + if ((flags & DD_TRI_STIPPLE) && + (ctx->IndirectTriangles & DD_TRI_STIPPLE)) { + fxMesa->TriangleFunc = 0; + fxMesa->QuadFunc = 0; + fxMesa->RenderVBRawTab = 0; + fxMesa->IndirectTriangles |= (DD_TRI_SW_RASTERIZE | + DD_QUAD_SW_RASTERIZE); + fxMesa->RenderIndex |= TDFX_FALLBACK_BIT; + } + + if (flags & (DD_LINE_WIDTH | DD_POINT_SIZE)) + fxMesa->RenderVBRawTab = 0; + + fxMesa->RenderElementsRaw = gl_render_elts; + } + + + if ( 0 ) { + gl_print_tri_caps( "tricaps", ctx->TriangleCaps ); + tdfxPrintRenderState( "tdfx render state", fxMesa->RenderIndex ); + } +} + + +void tdfxDDToggleTriCliprects( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + int oldidx = fxMesa->RenderIndex; + int newidx; + + if (fxMesa->Fallback) + return; + + if (fxMesa->numClipRects > 1) + newidx = (fxMesa->RenderIndex |= TDFX_CLIPRECT_BIT); + else + newidx = (fxMesa->RenderIndex &= ~TDFX_CLIPRECT_BIT); + + if (ctx->Driver.TriangleFunc == rast_tab[oldidx].triangle) + ctx->Driver.TriangleFunc = rast_tab[newidx].triangle; + + if (ctx->Driver.QuadFunc == rast_tab[oldidx].quad) + ctx->Driver.QuadFunc = rast_tab[newidx].quad; + + if (ctx->Driver.LineFunc == rast_tab[oldidx].line) + ctx->Driver.LineFunc = rast_tab[newidx].line; + + if (ctx->Driver.PointsFunc == rast_tab[oldidx].points) + ctx->Driver.PointsFunc = rast_tab[newidx].points; + + if (ctx->Driver.RenderVBRawTab == rast_tab[oldidx].render_tab) + ctx->Driver.RenderVBRawTab = rast_tab[newidx].render_tab; + + if (ctx->TriangleFunc == rast_tab[oldidx].triangle) + ctx->TriangleFunc = rast_tab[newidx].triangle; + + if (ctx->QuadFunc == rast_tab[oldidx].quad) + ctx->QuadFunc = rast_tab[newidx].quad; + + fxMesa->PointsFunc = rast_tab[newidx].points; + fxMesa->LineFunc = rast_tab[newidx].line; + fxMesa->TriangleFunc = rast_tab[newidx].triangle; + fxMesa->QuadFunc = rast_tab[newidx].quad; + fxMesa->RenderVBRawTab = rast_tab[newidx].render_tab; + + if (newidx == 0 && + (ctx->IndirectTriangles & (DD_LINE_WIDTH|DD_POINT_SIZE)) == 0) + fxMesa->RenderElementsRaw = tdfxDDRenderEltsRaw; + else + fxMesa->RenderElementsRaw = gl_render_elts; + + if (0) + tdfxPrintRenderState( "toggle tdfx render state", fxMesa->RenderIndex ); +} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.h:1.1 --- /dev/null Mon Jun 4 12:37:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.h Wed Mar 21 11:14:28 2001 @@ -0,0 +1,176 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * Keith Whitwell + * + */ + +#ifndef __TDFX_TRIS_H__ +#define __TDFX_TRIS_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "tdfx_vb.h" +#include "tdfx_render.h" + +extern void tdfxDDChooseRenderState( GLcontext *ctx ); +extern void tdfxDDTriangleFuncsInit( void ); + + +#define TDFX_FLAT_BIT 0x01 +#define TDFX_OFFSET_BIT 0x02 +#define TDFX_TWOSIDE_BIT 0x04 +#define TDFX_CLIPRECT_BIT 0x10 +#define TDFX_FALLBACK_BIT 0x20 +#define TDFX_MAX_TRIFUNC 0x40 + + +static __inline void tdfx_draw_triangle( tdfxContextPtr fxMesa, + tdfxVertex *v0, + tdfxVertex *v1, + tdfxVertex *v2 ) +{ + grDrawTriangle( v0, v1, v2 ); +} + + +static __inline void tdfx_draw_point( tdfxContextPtr fxMesa, + tdfxVertex *tmp, float sz ) +{ + if ( sz <= 1.0 ) { + /* Save and restore original x,y rather than copying whole + * vertex. + */ + GLfloat x = tmp->v.x, y = tmp->v.y; + tmp->v.x += PNT_X_OFFSET - TRI_X_OFFSET; + tmp->v.y += PNT_Y_OFFSET - TRI_Y_OFFSET; + grDrawPoint( tmp ); + tmp->v.x = x; + tmp->v.y = y; + } + else { + const GLfloat xLeft = tmp->v.x - 0.5 * sz - TRI_X_OFFSET + PNT_X_OFFSET; + const GLfloat xRight = tmp->v.x + 0.5 * sz - TRI_X_OFFSET + PNT_X_OFFSET; + const GLfloat yBot = tmp->v.y - 0.5 * sz - TRI_Y_OFFSET + PNT_Y_OFFSET; + const GLfloat yTop = tmp->v.y + 0.5 * sz - TRI_Y_OFFSET + PNT_Y_OFFSET; + tdfxVertex verts[4]; + + verts[0] = *tmp; + verts[1] = *tmp; + verts[2] = *tmp; + verts[3] = *tmp; + + verts[0].v.x = xLeft; + verts[0].v.y = yBot; + + verts[1].v.x = xRight; + verts[1].v.y = yBot; + + verts[2].v.x = xRight; + verts[2].v.y = yTop; + + verts[3].v.x = xLeft; + verts[3].v.y = yTop; + + grDrawVertexArrayContiguous( GR_TRIANGLE_FAN, 4, verts, + sizeof(tdfxVertex) ); + } +} + + +static __inline void tdfx_draw_line( tdfxContextPtr fxMesa, + tdfxVertex *tmp0, + tdfxVertex *tmp1, + float width ) +{ + if ( width <= 1.0 ) + { + /* Faster to save and restore 4 dwords than to copy 32 dwords. + */ + GLfloat x0 = tmp0->v.x, y0 = tmp0->v.y; + GLfloat x1 = tmp1->v.x, y1 = tmp1->v.y; + tmp0->v.x += LINE_X_OFFSET - TRI_X_OFFSET; + tmp0->v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; + tmp1->v.x += LINE_X_OFFSET - TRI_X_OFFSET; + tmp1->v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; + grDrawLine(tmp0, tmp1); + tmp0->v.x = x0; + tmp0->v.y = y0; + tmp1->v.x = x1; + tmp1->v.y = y1; + } + else + { + tdfxVertex verts[4]; + float dx, dy, ix, iy; + + dx = tmp0->v.x - tmp1->v.x; + dy = tmp0->v.y - tmp1->v.y; + + if (dx * dx > dy * dy) { + iy = width * .5; + ix = 0; + } else { + iy = 0; + ix = width * .5; + } + + verts[0] = *tmp0; + verts[1] = *tmp0; + verts[2] = *tmp1; + verts[3] = *tmp1; + + verts[0].v.x = tmp0->v.x - ix; + verts[0].v.y = tmp0->v.y - iy; + + verts[1].v.x = tmp0->v.x + ix; + verts[1].v.y = tmp0->v.y + iy; + + verts[2].v.x = tmp1->v.x + ix; + verts[2].v.y = tmp1->v.y + iy; + + verts[3].v.x = tmp1->v.x - ix; + verts[3].v.y = tmp1->v.y - iy; + + grDrawVertexArrayContiguous( GR_TRIANGLE_FAN, 4, verts, + sizeof(tdfxVertex) ); + } +} + +void tdfxDDToggleTriCliprects( GLcontext *ctx ); + + +#endif /* GLX_DIRECT_RENDERING */ + +#endif /* __TDFX_TRIS_H__ */ Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tritmp.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_tritmp.h:1.1 --- /dev/null Mon Jun 4 12:37:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_tritmp.h Wed Mar 21 11:14:28 2001 @@ -0,0 +1,422 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tritmp.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Keith Whitwell + * + */ + +static __inline void TAG(triangle)( GLcontext *ctx, + GLuint e0, GLuint e1, GLuint e2, + GLuint pv ) +{ + struct vertex_buffer *VB = ctx->VB; + tdfxVertexPtr fxverts = TDFX_DRIVER_DATA(VB)->verts; + tdfxVertex *v[3]; + +#if (IND & TDFX_OFFSET_BIT) + GLfloat offset; + GLfloat z[3]; +#endif + +#if (IND & (TDFX_TWOSIDE_BIT | TDFX_FLAT_BIT)) + GLuint c[3]; +#endif + +#if (IND & TDFX_CLIPRECT_BIT) + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); +#endif + + v[0] = &fxverts[e0]; + v[1] = &fxverts[e1]; + v[2] = &fxverts[e2]; + +#if (IND & (TDFX_TWOSIDE_BIT | TDFX_FLAT_BIT)) + c[0] = v[0]->ui[4]; + c[1] = v[1]->ui[4]; + c[2] = v[2]->ui[4]; +#endif + + +#if (IND & (TDFX_TWOSIDE_BIT | TDFX_OFFSET_BIT)) + { + GLfloat ex = v[0]->v.x - v[2]->v.x; + GLfloat ey = v[0]->v.y - v[2]->v.y; + GLfloat fx = v[1]->v.x - v[2]->v.x; + GLfloat fy = v[1]->v.y - v[2]->v.y; + GLfloat cc = ex*fy - ey*fx; + +#if (IND & TDFX_TWOSIDE_BIT) + { + GLuint facing = ( cc < 0.0 ) ^ ctx->Polygon.FrontBit; + GLubyte (*vbcolor)[4] = VB->Color[facing]->data; + if (IND & TDFX_FLAT_BIT) { + TDFX_COLOR( (char *)&v[0]->ui[4], vbcolor[pv] ); + v[2]->ui[4] = v[1]->ui[4] = v[0]->ui[4]; + } else { + TDFX_COLOR( (char *)&v[0]->ui[4], vbcolor[e0] ); + TDFX_COLOR( (char *)&v[1]->ui[4], vbcolor[e1] ); + TDFX_COLOR( (char *)&v[2]->ui[4], vbcolor[e2] ); + } + } +#endif + +#if (IND & TDFX_OFFSET_BIT) + { + offset = ctx->Polygon.OffsetUnits; + z[0] = v[0]->v.z; + z[1] = v[1]->v.z; + z[2] = v[2]->v.z; + if (cc * cc > 1e-16) { + GLfloat ez = z[0] - z[2]; + GLfloat fz = z[1] - z[2]; + GLfloat a = ey*fz - ez*fy; + GLfloat b = ez*fx - ex*fz; + GLfloat ic = 1.0 / cc; + GLfloat ac = a * ic; + GLfloat bc = b * ic; + if ( ac < 0.0f ) ac = -ac; + if ( bc < 0.0f ) bc = -bc; + offset += MAX2( ac, bc ) * ctx->Polygon.OffsetFactor; + + } + v[0]->v.z += offset; + v[1]->v.z += offset; + v[2]->v.z += offset; + } +#endif + } +#elif (IND & TDFX_FLAT_BIT) + { + GLuint color = fxverts[pv].ui[4]; + v[0]->ui[4] = color; + v[1]->ui[4] = color; + v[2]->ui[4] = color; + } +#endif + +#if (IND & TDFX_CLIPRECT_BIT) + BEGIN_CLIP_LOOP_LOCKED( fxMesa ); + grDrawTriangle( v[0], v[1], v[2] ); + END_CLIP_LOOP_LOCKED( fxMesa ); +#else + grDrawTriangle( v[0], v[1], v[2] ); +#endif + +#if (IND & TDFX_OFFSET_BIT) + v[0]->v.z = z[0]; + v[1]->v.z = z[1]; + v[2]->v.z = z[2]; +#endif + +#if (IND & (TDFX_FLAT_BIT | TDFX_TWOSIDE_BIT)) + v[0]->ui[4] = c[0]; + v[1]->ui[4] = c[1]; + v[2]->ui[4] = c[2]; +#endif + +} + + + +static __inline void TAG(quad)( GLcontext *ctx, GLuint e0, + GLuint e1, GLuint e2, GLuint e3, + GLuint pv ) +{ + struct vertex_buffer *VB = ctx->VB; + tdfxVertexPtr fxverts = TDFX_DRIVER_DATA(VB)->verts; + tdfxVertex *v[4]; + +#if (IND & TDFX_OFFSET_BIT) + GLfloat offset; + GLfloat z[4]; +#endif + +#if (IND & (TDFX_TWOSIDE_BIT | TDFX_FLAT_BIT)) + GLuint c[4]; +#endif + +#if (IND & TDFX_CLIPRECT_BIT) + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); +#endif + + + v[0] = &fxverts[e0]; + v[1] = &fxverts[e1]; + v[2] = &fxverts[e2]; + v[3] = &fxverts[e3]; + + +/* fprintf(stderr, "%s\n", __FUNCTION__); */ + +#if (IND & (TDFX_TWOSIDE_BIT | TDFX_FLAT_BIT)) + c[0] = v[0]->ui[4]; + c[1] = v[1]->ui[4]; + c[2] = v[2]->ui[4]; + c[3] = v[3]->ui[4]; +#endif + + +#if (IND & (TDFX_TWOSIDE_BIT | TDFX_OFFSET_BIT)) + { + GLfloat ex = v[0]->v.x - v[2]->v.x; + GLfloat ey = v[0]->v.y - v[2]->v.y; + GLfloat fx = v[1]->v.x - v[2]->v.x; + GLfloat fy = v[1]->v.y - v[2]->v.y; + GLfloat cc = ex*fy - ey*fx; + +#if (IND & TDFX_TWOSIDE_BIT) + { + GLuint facing = ( cc < 0.0 ) ^ ctx->Polygon.FrontBit; + GLubyte (*vbcolor)[4] = VB->Color[facing]->data; + if (IND & TDFX_FLAT_BIT) { + TDFX_COLOR( (char *)&v[0]->ui[4], vbcolor[pv] ); + v[3]->ui[4] = v[2]->ui[4] = v[1]->ui[4] = v[0]->ui[4]; + } else { + TDFX_COLOR( (char *)&v[0]->ui[4], vbcolor[e0] ); + TDFX_COLOR( (char *)&v[1]->ui[4], vbcolor[e1] ); + TDFX_COLOR( (char *)&v[2]->ui[4], vbcolor[e2] ); + TDFX_COLOR( (char *)&v[3]->ui[4], vbcolor[e3] ); + } + } +#endif + +#if (IND & TDFX_OFFSET_BIT) + { + offset = ctx->Polygon.OffsetUnits; + z[0] = v[0]->v.z; + z[1] = v[1]->v.z; + z[2] = v[2]->v.z; + z[3] = v[3]->v.z; + if (cc * cc > 1e-16) { + GLfloat ez = z[0] - z[2]; + GLfloat fz = z[1] - z[2]; + GLfloat a = ey*fz - ez*fy; + GLfloat b = ez*fx - ex*fz; + GLfloat ic = 1.0 / cc; + GLfloat ac = a * ic; + GLfloat bc = b * ic; + if ( ac < 0.0f ) ac = -ac; + if ( bc < 0.0f ) bc = -bc; + offset += MAX2( ac, bc ) * ctx->Polygon.OffsetFactor; + + } + v[0]->v.z += offset; + v[1]->v.z += offset; + v[2]->v.z += offset; + v[3]->v.z += offset; + } +#endif + } +#elif (IND & TDFX_FLAT_BIT) + { + GLuint color = fxverts[pv].ui[4]; + v[0]->ui[4] = color; + v[1]->ui[4] = color; + v[2]->ui[4] = color; + v[3]->ui[4] = color; + } +#endif + +/* Marginally faster to call grDrawTriangle twice + * than calling grDrawVertexArray. + */ +#if (IND & TDFX_CLIPRECT_BIT) + BEGIN_CLIP_LOOP_LOCKED( fxMesa ); +/* grDrawVertexArray( GR_TRIANGLE_FAN, 4, v ); */ + grDrawTriangle( v[0], v[1], v[3] ); + grDrawTriangle( v[1], v[2], v[3] ); + END_CLIP_LOOP_LOCKED( fxMesa ); +#else +/* grDrawVertexArray( GR_TRIANGLE_FAN, 4, v ); */ + grDrawTriangle( v[0], v[1], v[3] ); + grDrawTriangle( v[1], v[2], v[3] ); +#endif + +#if (IND & TDFX_OFFSET_BIT) + v[0]->v.z = z[0]; + v[1]->v.z = z[1]; + v[2]->v.z = z[2]; + v[3]->v.z = z[3]; +#endif + +#if (IND & (TDFX_FLAT_BIT | TDFX_TWOSIDE_BIT)) + v[0]->ui[4] = c[0]; + v[1]->ui[4] = c[1]; + v[2]->ui[4] = c[2]; + v[3]->ui[4] = c[3]; +#endif +} + + + + + +static __inline void TAG(line)( GLcontext *ctx, GLuint v0, GLuint v1, + GLuint pv ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(ctx->VB)->verts; + float width = ctx->Line.Width; + GLfloat z0, z1; + GLuint c0, c1; + tdfxVertex *vert0 = &fxVB[v0]; + tdfxVertex *vert1 = &fxVB[v1]; + + if ( IND & TDFX_TWOSIDE_BIT ) { + GLubyte (*vbcolor)[4] = ctx->VB->ColorPtr->data; + + if ( IND & TDFX_FLAT_BIT ) { + TDFX_COLOR( (char *)&vert0->v.color,vbcolor[pv] ); + *(int *)&vert1->v.color = *(int *)&vert0->v.color; + } else { + TDFX_COLOR( (char *)&vert0->v.color,vbcolor[v0] ); + TDFX_COLOR( (char *)&vert1->v.color,vbcolor[v1] ); + } + } else if ( IND & TDFX_FLAT_BIT ) { + c0 = *(GLuint *) &(vert0->v.color); + c1 = *(GLuint *) &(vert1->v.color); + *(int *)&vert0->v.color = + *(int *)&vert1->v.color = *(int *)&fxVB[pv].v.color; + } + + if ( IND & TDFX_OFFSET_BIT ) { + GLfloat offset = ctx->LineZoffset; + z0 = vert0->v.z; + z1 = vert1->v.z; + vert0->v.z += offset; + vert1->v.z += offset; + } + + if (IND & TDFX_CLIPRECT_BIT) { + BEGIN_CLIP_LOOP_LOCKED( fxMesa ); + tdfx_draw_line( fxMesa, &fxVB[v0], &fxVB[v1], width ); + END_CLIP_LOOP_LOCKED( fxMesa ); + } else + tdfx_draw_line( fxMesa, &fxVB[v0], &fxVB[v1], width ); + + if ( IND & TDFX_OFFSET_BIT ) { + vert0->v.z = z0; + vert1->v.z = z1; + } + + if ( (IND & TDFX_FLAT_BIT) && !(IND & TDFX_TWOSIDE_BIT) ) { + *(GLuint *) &(vert0->v.color) = c0; + *(GLuint *) &(vert1->v.color) = c1; + } +} + + +static __inline void TAG(points)( GLcontext *ctx, GLuint first, GLuint last ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + struct vertex_buffer *VB = ctx->VB; + tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; + GLfloat sz = ctx->Point.Size; + int i; + + for ( i = first ; i < last ; i++ ) { + if ( VB->ClipMask[i] == 0 ) { + if ( IND & (TDFX_TWOSIDE_BIT|TDFX_OFFSET_BIT) ) + { + tdfxVertex tmp0 = fxVB[i]; + + if ( IND & TDFX_TWOSIDE_BIT ) { + GLubyte (*vbcolor)[4] = VB->ColorPtr->data; + TDFX_COLOR( (char *)&tmp0.v.color, vbcolor[i] ); + } + + if ( IND & TDFX_OFFSET_BIT ) { + GLfloat offset = ctx->PointZoffset; + tmp0.v.z += offset; + } + + if (IND & TDFX_CLIPRECT_BIT) { + BEGIN_CLIP_LOOP_LOCKED( fxMesa ); + tdfx_draw_point( fxMesa, &tmp0, sz ); + END_CLIP_LOOP_LOCKED( fxMesa ); + } else + tdfx_draw_point( fxMesa, &tmp0, sz ); + } + else if (IND & TDFX_CLIPRECT_BIT) + { + BEGIN_CLIP_LOOP_LOCKED( fxMesa ); + tdfx_draw_point( fxMesa, &fxVB[i], sz ); + END_CLIP_LOOP_LOCKED( fxMesa ); + } + else + tdfx_draw_point( fxMesa, &fxVB[i], sz ); + } + } +} + + + + +/* Accelerate unclipped VB rendering when fxMesa->renderIndex != 0 + * + * The versions for renderIndex == 0 are further optimized and appear + * in tdfx_tris.c + */ +#if (TYPE == 0) +#define RENDER_POINTS( start, count ) TAG(points)( ctx, start, count ) +#define RENDER_LINE( i1, i ) TAG(line)( ctx, i1, i, i ) +#define RENDER_TRI( i2, i1, i, pv, parity ) \ + do { \ + if (parity) TAG(triangle)( ctx, i1, i2, i, pv ); \ + else TAG(triangle)( ctx, i2, i1, i, pv ); \ + } while (0) +#define RENDER_QUAD( i3, i2, i1, i, pv ) TAG(quad)( ctx, i3, i2, i1, i, pv ) +#define LOCAL_VARS GLcontext *ctx = VB->ctx; +#define PRESERVE_TAG +#include "render_tmp.h" +#endif + + + +static void TAG(init)( void ) +{ + rast_tab[IND].triangle = TAG(triangle); + rast_tab[IND].quad = TAG(quad); + rast_tab[IND].line = TAG(line); + rast_tab[IND].points = TAG(points); +#if (TYPE == 0) + rast_tab[IND].render_tab = TAG(render_tab); +#else + rast_tab[IND].render_tab = 0; +#endif + TAG(render_init)(); +} + + +#undef IND +#undef TAG Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.c diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.c:1.1 --- /dev/null Mon Jun 4 12:37:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.c Wed Mar 21 11:14:28 2001 @@ -0,0 +1,498 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * Keith Whitwell + * + */ + +#include "tdfx_context.h" +#include "tdfx_vb.h" + +#include "stages.h" +#include "mem.h" + + +#define COORD \ +do { \ + v->v.x = winCoord[0] + xoffset; \ + v->v.y = winCoord[1] + yoffset; \ + v->v.z = winCoord[2]; \ + v->v.rhw = w; \ +} while (0) + + +/* The assembly is slower... + */ +#if 0 && defined(USE_X86_ASM) +#define COL \ +do { \ + __asm__ ( \ + "movl (%%edx),%%eax \n" \ + "bswap %%eax \n" \ + "rorl $8,%%eax \n" \ + "movl %%eax,16(%%edi) \n" \ + : \ + : "d" (color), "D" (v) \ + : "%eax" ); \ +} while (0) +#else +#define COL \ +do { \ + v->v.color.blue = color[2]; \ + v->v.color.green = color[1]; \ + v->v.color.red = color[0]; \ + v->v.color.alpha = color[3]; \ +} while (0) +#endif + + +#define TEX0 \ +do { \ + v->v.tu0 = tc0[i][0] * sScale0 * w; \ + v->v.tv0 = tc0[i][1] * tScale0 * w; \ +} while (0) + +#define TEX1 \ +do { \ + v->v.tu1 = tc1[i][0] * sScale1 * w; \ + v->v.tv1 = tc1[i][1] * tScale1 * w; \ +} while (0) + + +#define TEX0_4 \ + if ( VB->TexCoordPtr[0]->size == 4 ) { \ + GLfloat (*tc)[4] = VB->TexCoordPtr[0]->data; \ + winCoord = VB->Win.data[start]; \ + v = &(TDFX_DRIVER_DATA(VB)->verts[start]); \ + for ( i = start ; i < end ; i++, v++, winCoord+=4 ) { \ + v->v.tq0 = tc[i][3] * winCoord[3]; \ + } \ + } + +#define TEX1_4 \ + if ( VB->TexCoordPtr[1]->size == 4 ) { \ + GLfloat (*tc)[4] = VB->TexCoordPtr[1]->data; \ + winCoord = VB->Win.data[start]; \ + v = &(TDFX_DRIVER_DATA(VB)->verts[start]); \ + for ( i = start ; i < end ; i++, v++, winCoord+=4 ) { \ + v->v.tq1 = tc[i][3] * winCoord[3]; \ + } \ + } + + +#define FOG + + +#define NOP + + + +#define SETUPFUNC(name,win,col,tex0,tex1,tex0_4,tex1_4,fog) \ +static void name( struct vertex_buffer *VB, GLuint start, GLuint end ) \ +{ \ + tdfxContextPtr fxMesa = TDFX_CONTEXT(VB->ctx); \ + tdfxVertexPtr v; \ + const GLfloat *winCoord; \ + GLfloat (*tc0)[4]; \ + GLfloat (*tc1)[4]; \ + const GLfloat xoffset = fxMesa->x_offset + TRI_X_OFFSET; \ + const GLfloat yoffset = fxMesa->y_delta + TRI_Y_OFFSET; \ + const GLfloat sScale0 = fxMesa->sScale0; \ + const GLfloat tScale0 = fxMesa->tScale0; \ + const GLfloat sScale1 = fxMesa->sScale1; \ + const GLfloat tScale1 = fxMesa->tScale1; \ + const GLubyte *color; \ + int i; \ + \ + (void) xoffset; (void) yoffset; \ + (void) sScale0; (void) tScale0; \ + (void) sScale1; (void) tScale1; \ + \ + if (0) fprintf(stderr, "%s\n", __FUNCTION__); \ + gl_import_client_data( VB, VB->ctx->RenderFlags, \ + (VB->ClipOrMask \ + ? VEC_WRITABLE|VEC_GOOD_STRIDE \ + : VEC_GOOD_STRIDE)); \ + \ + tc0 = VB->TexCoordPtr[fxMesa->tmu_source[0]]->data; \ + tc1 = VB->TexCoordPtr[fxMesa->tmu_source[1]]->data; \ + color = VB->Color[0]->data[start]; \ + winCoord = VB->Win.data[start]; \ + \ + v = &(TDFX_DRIVER_DATA(VB)->verts[start]); \ + \ + if ( VB->ClipOrMask == 0 ) { \ + for ( i = start ; i < end ; i++, v++, color+=4, winCoord+=4 ) { \ + const GLfloat w = winCoord[3]; \ + (void) w; \ + win; \ + col; \ + fog; \ + tex0; \ + tex1; \ + } \ + } else { \ + for ( i = start ; i < end ; i++, v++, color+=4, winCoord+=4 ) { \ + if ( VB->ClipMask[i] == 0 ) { \ + const GLfloat w = winCoord[3]; \ + (void) w; \ + win; \ + fog; \ + tex0; \ + tex1; \ + } \ + col; \ + } \ + } \ + tex0_4; \ + tex1_4; \ +} + + +SETUPFUNC(rs_wt0, COORD, NOP, TEX0, NOP, TEX0_4, NOP, NOP) +SETUPFUNC(rs_wt0t1, COORD, NOP, TEX0, TEX1, TEX0_4, TEX1_4, NOP) +SETUPFUNC(rs_wft0, COORD, NOP, TEX0, NOP, TEX0_4, NOP, FOG) +SETUPFUNC(rs_wft0t1, COORD, NOP, TEX0, TEX1, TEX0_4, TEX1_4, FOG) +SETUPFUNC(rs_wg, COORD, COL, NOP, NOP, NOP, NOP, NOP) +SETUPFUNC(rs_wgt0, COORD, COL, TEX0, NOP, TEX0_4, NOP, NOP) +SETUPFUNC(rs_wgt0t1, COORD, COL, TEX0, TEX1, TEX0_4, TEX1_4, NOP) +SETUPFUNC(rs_wgf, COORD, COL, NOP, NOP, NOP, NOP, FOG) +SETUPFUNC(rs_wgft0, COORD, COL, TEX0, NOP, TEX0_4, NOP, FOG) +SETUPFUNC(rs_wgft0t1, COORD, COL, TEX0, TEX1, TEX0_4, TEX1_4, FOG) + +SETUPFUNC(rs_t0, NOP, NOP, TEX0, NOP, TEX0_4, NOP, NOP) +SETUPFUNC(rs_t0t1, NOP, NOP, TEX0, TEX1, TEX0_4, TEX1_4, NOP) +SETUPFUNC(rs_f, NOP, NOP, NOP, NOP, NOP, NOP, FOG) +SETUPFUNC(rs_ft0, NOP, NOP, TEX0, NOP, TEX0_4, NOP, FOG) +SETUPFUNC(rs_ft0t1, NOP, NOP, TEX0, TEX1, TEX0_4, TEX1_4, FOG) +SETUPFUNC(rs_g, NOP, COL, NOP, NOP, NOP, NOP, NOP) +SETUPFUNC(rs_gt0, NOP, COL, TEX0, NOP, TEX0_4, NOP, NOP) +SETUPFUNC(rs_gt0t1, NOP, COL, TEX0, TEX1, TEX0_4, TEX1_4, NOP) +SETUPFUNC(rs_gf, NOP, COL, NOP, NOP, NOP, NOP, FOG) +SETUPFUNC(rs_gft0, NOP, COL, TEX0, NOP, TEX0_4, NOP, FOG) +SETUPFUNC(rs_gft0t1, NOP, COL, TEX0, TEX1, TEX0_4, TEX1_4, FOG) + + + +static void rs_invalid( struct vertex_buffer *VB, GLuint start, GLuint end ) +{ + fprintf( stderr, "tdfxRasterSetup(): invalid setup function\n" ); +} + +typedef void (*setupFunc)( struct vertex_buffer *, GLuint, GLuint ); + +static setupFunc setup_func[0x40]; + + +void tdfxDDSetupInit( void ) +{ + int i; + + for (i = 0; i < Elements(setup_func); i++) + setup_func[i] = rs_invalid; + + /* Functions to build vertices from scratch */ + setup_func[TDFX_WIN_BIT|TDFX_TEX0_BIT] = rs_wt0; + setup_func[TDFX_WIN_BIT|TDFX_TEX0_BIT|TDFX_TEX1_BIT] = rs_wt0t1; + setup_func[TDFX_WIN_BIT|TDFX_FOG_BIT|TDFX_TEX0_BIT] = rs_wft0; + setup_func[TDFX_WIN_BIT|TDFX_FOG_BIT|TDFX_TEX0_BIT|TDFX_TEX1_BIT] = rs_wft0t1; + setup_func[TDFX_WIN_BIT|TDFX_RGBA_BIT] = rs_wg; + setup_func[TDFX_WIN_BIT|TDFX_RGBA_BIT|TDFX_TEX0_BIT] = rs_wgt0; + setup_func[TDFX_WIN_BIT|TDFX_RGBA_BIT|TDFX_TEX0_BIT|TDFX_TEX1_BIT] = rs_wgt0t1; + setup_func[TDFX_WIN_BIT|TDFX_RGBA_BIT|TDFX_FOG_BIT] = rs_wgf; + setup_func[TDFX_WIN_BIT|TDFX_RGBA_BIT|TDFX_FOG_BIT|TDFX_TEX0_BIT] = rs_wgft0; + setup_func[TDFX_WIN_BIT|TDFX_RGBA_BIT|TDFX_FOG_BIT|TDFX_TEX0_BIT|TDFX_TEX1_BIT] = rs_wgft0t1; + + /* Repair functions */ + setup_func[TDFX_TEX0_BIT] = rs_t0; + setup_func[TDFX_TEX0_BIT|TDFX_TEX1_BIT] = rs_t0t1; + setup_func[TDFX_FOG_BIT] = rs_f; + setup_func[TDFX_FOG_BIT|TDFX_TEX0_BIT] = rs_ft0; + setup_func[TDFX_FOG_BIT|TDFX_TEX0_BIT|TDFX_TEX1_BIT] = rs_ft0t1; + setup_func[TDFX_RGBA_BIT] = rs_g; + setup_func[TDFX_RGBA_BIT|TDFX_TEX0_BIT] = rs_gt0; + setup_func[TDFX_RGBA_BIT|TDFX_TEX0_BIT|TDFX_TEX1_BIT] = rs_gt0t1; + setup_func[TDFX_RGBA_BIT|TDFX_FOG_BIT] = rs_gf; + setup_func[TDFX_RGBA_BIT|TDFX_FOG_BIT|TDFX_TEX0_BIT] = rs_gft0; + setup_func[TDFX_RGBA_BIT|TDFX_FOG_BIT|TDFX_TEX0_BIT|TDFX_TEX1_BIT] = rs_gft0t1; +} + + +void tdfxPrintSetupFlags( char *msg, GLuint flags ) +{ + fprintf( stderr, "%s: 0x%x %s%s%s%s%s\n", + msg, + (int)flags, + (flags & TDFX_WIN_BIT) ? " xyzw," : "", + (flags & TDFX_RGBA_BIT) ? " rgba," : "", + (flags & TDFX_FOG_BIT) ? " fog," : "", + (flags & TDFX_TEX0_BIT) ? " tex-0," : "", + (flags & TDFX_TEX1_BIT) ? " tex-1," : "" ); +} + + +/* ================================================================ + * Raster Setup + */ + +void tdfxDDChooseRasterSetupFunc( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + int index = TDFX_WIN_BIT | TDFX_RGBA_BIT; + int vertexFormat = fxMesa->vertexFormat; + + fxMesa->vertsize = 8; + fxMesa->tmu_source[0] = 0; + fxMesa->tmu_source[1] = 1; + fxMesa->tex_dest[0] = TDFX_TEX0_BIT; + fxMesa->tex_dest[1] = TDFX_TEX1_BIT; + fxMesa->vertexFormat = TDFX_LAYOUT_SINGLE; + + if ( ctx->Texture.ReallyEnabled & ENABLE_TEX0 ) { + index |= TDFX_TEX0_BIT; + } + + if ( ctx->Texture.ReallyEnabled & ENABLE_TEX1 ) { + if ( ctx->Texture.ReallyEnabled & ENABLE_TEX0 ) { + fxMesa->vertexFormat = TDFX_LAYOUT_MULTI; + fxMesa->vertsize = 10; + index |= TDFX_TEX1_BIT; + } else { + /* Just a funny way of doing single texturing. + */ + fxMesa->tmu_source[0] = 1; + fxMesa->tex_dest[1] = TDFX_TEX0_BIT; + index |= TDFX_TEX0_BIT; + } + } + + if (ctx->Texture.ReallyEnabled & (ENABLE_TEX0 | ENABLE_TEX1)) { + if ((ctx->VB->TexCoordPtr[0] && ctx->VB->TexCoordPtr[0]->size == 4) || + (ctx->VB->TexCoordPtr[1] && ctx->VB->TexCoordPtr[1]->size == 4)) { + fxMesa->vertexFormat = TDFX_LAYOUT_PROJECT; + } + } + + if ( ctx->Fog.Enabled ) + index |= TDFX_FOG_BIT; + + fxMesa->SetupIndex = index; + ctx->Driver.RasterSetup = setup_func[index]; + + if ( fxMesa->vertexFormat != vertexFormat ) { + fxMesa->dirty |= TDFX_UPLOAD_VERTEX_LAYOUT; + } + + if (0) { + tdfxPrintSetupFlags( "full setup function", index ); + fprintf(stderr, "full setup function %p\n", ctx->Driver.RasterSetup); + } +} + +/* Check to see if vertices need repairing. + */ +void tdfxDDCheckPartialRasterSetup( GLcontext *ctx, + struct gl_pipeline_stage *d ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + int tmp = fxMesa->SetupDone; + + d->type = 0; + fxMesa->SetupDone = 0; /* cleared if we return */ + + if ( (ctx->Array.Summary & VERT_OBJ_ANY) == 0 ) + return; + if ( ctx->IndirectTriangles ) + return; + + fxMesa->SetupDone = tmp; +} + +/* Repair existing precalculated vertices with new data. + */ +void tdfxDDPartialRasterSetup( struct vertex_buffer *VB ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( VB->ctx ); + GLuint new = VB->pipeline->new_outputs; + GLuint available = VB->pipeline->outputs; + GLuint index = 0; + + if ( new & VERT_WIN ) { + new = available; + index |= TDFX_WIN_BIT | TDFX_FOG_BIT; + } + + if ( new & VERT_RGBA ) + index |= TDFX_RGBA_BIT; + + if ( new & VERT_TEX0_ANY ) + index |= TDFX_TEX0_BIT; + + if ( new & VERT_TEX1_ANY ) + index |= fxMesa->tex_dest[1]; + + if ( new & VERT_FOG_COORD ) + index |= TDFX_FOG_BIT; + + fxMesa->SetupDone &= ~index; + index &= fxMesa->SetupIndex; + fxMesa->SetupDone |= index; + + if ( 0 ) + tdfxPrintSetupFlags( "partial setup function", index ); + + if ( index ) + setup_func[index]( VB, VB->Start, VB->Count ); +} + +void tdfxDDDoRasterSetup( struct vertex_buffer *VB ) +{ + GLcontext *ctx = VB->ctx; + + if ( VB->Type == VB_CVA_PRECALC ) { + tdfxDDPartialRasterSetup( VB ); + } else if ( ctx->Driver.RasterSetup ) { + ctx->Driver.RasterSetup( VB, VB->CopyStart, VB->Count ); + } +} + + +/* ================================================================ + * Device-specific Vertex Buffers + */ + +void tdfxDDResizeVB( struct vertex_buffer *VB, GLuint size ) +{ + tdfxVertexBufferPtr fxVB = TDFX_DRIVER_DATA(VB); + + while ( fxVB->size < size ) + fxVB->size *= 2; + + ALIGN_FREE( fxVB->vert_store ); + fxVB->vert_store = ALIGN_MALLOC( sizeof(tdfxVertex) * fxVB->size, 32 ); + if ( !fxVB->vert_store ) { + fprintf( stderr, "Cannot allocate vertex store! Exiting...\n" ); + exit( 1 ); + } + + fxVB->verts = (tdfxVertexPtr)fxVB->vert_store; + + gl_vector1ui_free( &fxVB->clipped_elements ); + gl_vector1ui_alloc( &fxVB->clipped_elements, + VEC_WRITABLE, fxVB->size, 32 ); + if ( !fxVB->clipped_elements.start ) { + fprintf( stderr, "Cannot allocate clipped elements! Exiting...\n" ); + exit( 1 ); + } + + ALIGN_FREE( VB->ClipMask ); + VB->ClipMask = (GLubyte *)ALIGN_MALLOC( sizeof(GLubyte) * fxVB->size, 32 ); + if ( !VB->ClipMask ) { + fprintf( stderr, "Cannot allocate clipmask! Exiting...\n" ); + exit( 1 ); + } +} + +void tdfxDDResizeElts( struct vertex_buffer *VB, GLuint size ) +{ +#if 0 + tdfxVertexBufferPtr fxVB = TDFX_DRIVER_DATA(VB); + + FREE(fxVB->elts); + + while (fxVB->elt_size < size) + fxVB->elt_size *= 2; + + FREE(fxVB->elts); + fxVB->elts = MALLOC( sizeof(tdfxVertex *) * fxVB->elt_size ); + if ( !fxVB->elts ) { + fprintf( stderr, "Cannot allocate vertex indirection! Exiting...\n" ); + exit( 1 ); + } +#endif +} + +void tdfxDDRegisterVB( struct vertex_buffer *VB ) +{ + tdfxVertexBufferPtr fxVB; + + fxVB = (tdfxVertexBufferPtr) CALLOC( sizeof(*fxVB) ); + + fxVB->elt_size = fxVB->size = VB->Size * 2; + fxVB->vert_store = ALIGN_MALLOC( sizeof(tdfxVertex) * fxVB->size, 32 ); + if ( !fxVB->vert_store ) { + fprintf( stderr, "Cannot allocate vertex store! Exiting...\n" ); + exit( 1 ); + } + + fxVB->verts = (tdfxVertexPtr)fxVB->vert_store; + +#if 0 + fxVB->elts = MALLOC( sizeof(tdfxVertex *) * fxVB->elt_size ); + if ( !fxVB->elts ) { + fprintf( stderr, "Cannot allocate vertex indirection! Exiting...\n" ); + exit( 1 ); + } +#endif + + gl_vector1ui_alloc( &fxVB->clipped_elements, + VEC_WRITABLE, fxVB->size, 32 ); + if ( !fxVB->clipped_elements.start ) { + fprintf( stderr, "Cannot allocate clipped elements! Exiting...\n" ); + exit( 1 ); + } + + + ALIGN_FREE( VB->ClipMask ); + VB->ClipMask = (GLubyte *)ALIGN_MALLOC( sizeof(GLubyte) * fxVB->size, 32 ); + if ( !VB->ClipMask ) { + fprintf( stderr, "Cannot allocate clipmask! Exiting...\n" ); + exit( 1 ); + } + + VB->driver_data = fxVB; +} + +void tdfxDDUnregisterVB( struct vertex_buffer *VB ) +{ + tdfxVertexBufferPtr fxVB = TDFX_DRIVER_DATA(VB); + + if ( fxVB ) { + if ( fxVB->vert_store ) ALIGN_FREE( fxVB->vert_store ); + if ( fxVB->elts ) ALIGN_FREE( fxVB->elts ); + gl_vector1ui_free( &fxVB->clipped_elements ); + FREE( fxVB ); + VB->driver_data = NULL; + } +} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.h:1.1 --- /dev/null Mon Jun 4 12:37:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.h Wed Mar 21 11:14:28 2001 @@ -0,0 +1,127 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * Keith Whitwell + * + */ + +#ifndef __TDFX_VB_H__ +#define __TDFX_VB_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "types.h" +#include "vb.h" + +/* + * Color type for the vertex data + */ +typedef struct { + GLubyte blue; + GLubyte green; + GLubyte red; + GLubyte alpha; +} tdfx_color_t; + + +/* The vertex structure. The final tu1/tv1 values only used in + * multitexture modes, and tq0/tq1 in projected texture modes. + */ +typedef struct { + GLfloat x, y, z; /* Coordinates in screen space */ + GLfloat rhw; /* Reciprocal homogeneous w */ + tdfx_color_t color; /* Diffuse color */ + GLuint padding; /* ... */ + GLfloat tu0, tv0; /* Texture 0 coordinates */ + GLfloat tu1, tv1; /* Texture 1 coordinates */ + GLfloat tq0, tq1; /* Projected texture coordinates */ +} tdfx_vertex; + + +/* The fastpath code still expects a 16-float stride vertex. + */ +union tdfx_vertex_t { + tdfx_vertex v; + GLfloat f[16]; + GLuint ui[16]; +}; + +typedef union tdfx_vertex_t tdfxVertex; +typedef union tdfx_vertex_t *tdfxVertexPtr; + +/* Vertex buffer for use when on the fast path */ +struct tdfx_vertex_buffer { + tdfxVertexPtr verts; + GLvector1ui clipped_elements; + GLuint size; + int last_vert; + void *vert_store; + + tdfxVertexPtr *elts; + GLuint elt_size; + GLuint last_elt; +}; + +typedef struct tdfx_vertex_buffer *tdfxVertexBufferPtr; + +#define TDFX_DRIVER_DATA(vb) ((tdfxVertexBufferPtr)((vb)->driver_data)) + + +#define TDFX_WIN_BIT 0x01 +#define TDFX_RGBA_BIT 0x02 +#define TDFX_FOG_BIT 0x04 +#define TDFX_SPEC_BIT 0x08 +#define TDFX_TEX0_BIT 0x10 +#define TDFX_TEX1_BIT 0x20 + + +extern void tdfxDDSetupInit( void ); + +extern void tdfxDDChooseRasterSetupFunc( GLcontext *ctx ); +extern void tdfxPrintSetupFlags( char *msg, GLuint flags ); + +extern void tdfxDDCheckPartialRasterSetup( GLcontext *ctx, + struct gl_pipeline_stage *s ); +extern void tdfxDDPartialRasterSetup( struct vertex_buffer *VB ); +extern void tdfxDDDoRasterSetup( struct vertex_buffer *VB ); + +extern void tdfxDDResizeVB( struct vertex_buffer *VB, GLuint size ); +extern void tdfxDDResizeElts( struct vertex_buffer *VB, GLuint size ); +extern void tdfxDDRegisterVB( struct vertex_buffer *VB ); +extern void tdfxDDUnregisterVB( struct vertex_buffer *VB ); + + +#endif /* GLX_DIRECT_RENDERING */ + +#endif /* __TDFX_VB_H__ */ Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.c diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.c:1.1 --- /dev/null Mon Jun 4 12:37:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.c Wed Mar 21 11:14:28 2001 @@ -0,0 +1,382 @@ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * + */ + +#include +#include + +#include "tdfx_context.h" + + +FxI32 +FX_grGetInteger_NoLock(FxU32 pname) +{ + switch (pname) { + case FX_FOG_TABLE_ENTRIES: + case FX_GLIDE_STATE_SIZE: + case FX_LFB_PIXEL_PIPE: + case FX_PENDING_BUFFERSWAPS: + case FX_TEXTURE_ALIGN: + case GR_STATS_PIXELS_DEPTHFUNC_FAIL: + case GR_STATS_PIXELS_IN: + case GR_STATS_PIXELS_OUT: + { + FxI32 result; + FxU32 grname = pname; + grGet(grname, 4, &result); + return result; + } + case FX_ZDEPTH_MAX: + { + FxI32 zvals[2]; + grGet(GR_ZDEPTH_MIN_MAX, 8, zvals); + return zvals[0]; + } + default: + if (MESA_VERBOSE & VERBOSE_DRIVER) { + fprintf(stderr, "Wrong parameter in FX_grGetInteger!\n"); + } + } + + return 0; +} + + +FxI32 +FX_grGetInteger(tdfxContextPtr fxMesa, FxU32 pname) +{ + int result; + LOCK_HARDWARE(fxMesa); + result = FX_grGetInteger_NoLock(pname); + UNLOCK_HARDWARE(fxMesa); + return result; +} + + +const char * +FX_grGetString(tdfxContextPtr fxMesa, FxU32 pname) +{ + const char *s; + LOCK_HARDWARE(fxMesa); + s = grGetString(pname); + UNLOCK_HARDWARE(fxMesa); + return s; +} + + + +/* Wrapper for grColorMask() and grColorMaskExt(). + */ +void +FX_grColorMask(GLcontext *ctx, GLboolean r, GLboolean g, + GLboolean b, GLboolean a) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + LOCK_HARDWARE(fxMesa); + if (ctx->Visual->RedBits == 8) { + /* 32bpp mode */ + ASSERT( grColorMaskExtProc ); + grColorMaskExtProc(r, g, b, a); + } + else { + /* 16 bpp mode */ + /* we never have an alpha buffer */ + grColorMask(r || g || b, GL_FALSE); + } + UNLOCK_HARDWARE(fxMesa); +} + + +void +FX_grColorMask_NoLock(GLcontext *ctx, GLboolean r, GLboolean g, + GLboolean b, GLboolean a) +{ + if (ctx->Visual->RedBits == 8) { + /* 32bpp mode */ + ASSERT( grColorMaskExtProc ); + grColorMaskExtProc(r, g, b, a); + } + else { + /* 16 bpp mode */ + /* we never have an alpha buffer */ + grColorMask(r || g || b, GL_FALSE); + } +} + + +/* As above, but pass the mask as an array + */ +void +FX_grColorMaskv(GLcontext *ctx, const GLboolean rgba[4]) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + LOCK_HARDWARE(fxMesa); + if (ctx->Visual->RedBits == 8) { + /* 32bpp mode */ + ASSERT( grColorMaskExtProc ); + grColorMaskExtProc(rgba[RCOMP], rgba[GCOMP], + rgba[BCOMP], rgba[ACOMP]); + } + else { + /* 16 bpp mode */ + /* we never have an alpha buffer */ + grColorMask(rgba[RCOMP] || rgba[GCOMP] || rgba[BCOMP], GL_FALSE); + } + UNLOCK_HARDWARE(fxMesa); +} + +void +FX_grColorMaskv_NoLock(GLcontext *ctx, const GLboolean rgba[4]) +{ + if (ctx->Visual->RedBits == 8) { + /* 32bpp mode */ + ASSERT( grColorMaskExtProc ); + grColorMaskExtProc(rgba[RCOMP], rgba[GCOMP], + rgba[BCOMP], rgba[ACOMP]); + } + else { + /* 16 bpp mode */ + /* we never have an alpha buffer */ + grColorMask(rgba[RCOMP] || rgba[GCOMP] || rgba[BCOMP], GL_FALSE); + } +} + + + +FxBool +FX_grLfbLock(tdfxContextPtr fxMesa, GrLock_t type, GrBuffer_t buffer, + GrLfbWriteMode_t writeMode, GrOriginLocation_t origin, + FxBool pixelPipeline, GrLfbInfo_t * info) +{ + FxBool result; + + LOCK_HARDWARE(fxMesa); + result = grLfbLock(type, buffer, writeMode, origin, pixelPipeline, info); + UNLOCK_HARDWARE(fxMesa); + return result; +} + +FxU32 +FX_grTexTextureMemRequired(tdfxContextPtr fxMesa, FxU32 evenOdd, GrTexInfo * info) +{ + FxU32 result; + + LOCK_HARDWARE(fxMesa); + result = grTexTextureMemRequired(evenOdd, info); + UNLOCK_HARDWARE(fxMesa); + return result; +} + +FxU32 +FX_grTexMinAddress(tdfxContextPtr fxMesa, GrChipID_t tmu) +{ + FxU32 result; + + LOCK_HARDWARE(fxMesa); + result = grTexMinAddress(tmu); + UNLOCK_HARDWARE(fxMesa); + return result; +} + +extern FxU32 +FX_grTexMaxAddress(tdfxContextPtr fxMesa, GrChipID_t tmu) +{ + FxU32 result; + + LOCK_HARDWARE(fxMesa); + result = grTexMaxAddress(tmu); + UNLOCK_HARDWARE(fxMesa); + return result; +} + + +int +FX_getFogTableSize(tdfxContextPtr fxMesa) +{ + int result; + LOCK_HARDWARE(fxMesa); + grGet(GR_FOG_TABLE_ENTRIES, sizeof(int), (void *) &result); + UNLOCK_HARDWARE(fxMesa); + return result; +} + +int +FX_getGrStateSize(tdfxContextPtr fxMesa) +{ + int result; + LOCK_HARDWARE(fxMesa); + grGet(GR_GLIDE_STATE_SIZE, sizeof(int), (void *) &result); + UNLOCK_HARDWARE(fxMesa); + return result; +} + +void +FX_grAADrawLine(tdfxContextPtr fxMesa, GrVertex * a, GrVertex * b) +{ + /* ToDo */ + BEGIN_CLIP_LOOP(fxMesa); + grDrawLine(a, b); + END_CLIP_LOOP(fxMesa); +} + +void +FX_grAADrawPoint(tdfxContextPtr fxMesa, GrVertex * a) +{ + BEGIN_CLIP_LOOP(fxMesa); + grDrawPoint(a); + END_CLIP_LOOP(fxMesa); +} + +void +FX_grDrawPolygonVertexList(tdfxContextPtr fxMesa, int n, GrVertex * verts) +{ + BEGIN_CLIP_LOOP(fxMesa); + grDrawVertexArrayContiguous(GR_POLYGON, n, verts, sizeof(GrVertex)); + END_CLIP_LOOP(fxMesa); +} + +#if TDFX_USE_PARGB +void +FX_setupGrVertexLayout(tdfxContextPtr fxMesa) +{ + LOCK_HARDWARE(fxMesa); + grReset(GR_VERTEX_PARAMETER); + + grCoordinateSpace(GR_WINDOW_COORDS); + grVertexLayout(GR_PARAM_XY, GR_VERTEX_X_OFFSET << 2, GR_PARAM_ENABLE); + grVertexLayout(GR_PARAM_PARGB, GR_VERTEX_PARGB_OFFSET << 2, GR_PARAM_ENABLE); + grVertexLayout(GR_PARAM_Q, GR_VERTEX_OOW_OFFSET << 2, GR_PARAM_ENABLE); + grVertexLayout(GR_PARAM_Z, GR_VERTEX_OOZ_OFFSET << 2, GR_PARAM_ENABLE); + grVertexLayout(GR_PARAM_ST0, GR_VERTEX_SOW_TMU0_OFFSET << 2, GR_PARAM_ENABLE); + grVertexLayout(GR_PARAM_Q0, GR_VERTEX_OOW_TMU0_OFFSET << 2, GR_PARAM_DISABLE); + grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); + grVertexLayout(GR_PARAM_Q1, GR_VERTEX_OOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); + UNLOCK_HARDWARE(fxMesa); +} +#else /* TDFX_USE_PARGB */ +void +FX_setupGrVertexLayout(tdfxContextPtr fxMesa) +{ + LOCK_HARDWARE(fxMesa); + grReset(GR_VERTEX_PARAMETER); + + grCoordinateSpace(GR_WINDOW_COORDS); + grVertexLayout(GR_PARAM_XY, GR_VERTEX_X_OFFSET << 2, GR_PARAM_ENABLE); + grVertexLayout(GR_PARAM_RGB, GR_VERTEX_R_OFFSET << 2, GR_PARAM_ENABLE); + grVertexLayout(GR_PARAM_A, GR_VERTEX_A_OFFSET << 2, GR_PARAM_ENABLE); + grVertexLayout(GR_PARAM_Q, GR_VERTEX_OOW_OFFSET << 2, GR_PARAM_ENABLE); + grVertexLayout(GR_PARAM_Z, GR_VERTEX_OOZ_OFFSET << 2, GR_PARAM_ENABLE); + grVertexLayout(GR_PARAM_ST0, GR_VERTEX_SOW_TMU0_OFFSET << 2, GR_PARAM_ENABLE); + grVertexLayout(GR_PARAM_Q0, GR_VERTEX_OOW_TMU0_OFFSET << 2, GR_PARAM_DISABLE); + grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); + grVertexLayout(GR_PARAM_Q1, GR_VERTEX_OOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); + UNLOCK_HARDWARE(fxMesa); +} +#endif /* TDFX_USE_PARGB */ + +void +FX_grHints_NoLock(GrHint_t hintType, FxU32 hintMask) +{ + switch (hintType) { + case GR_HINT_STWHINT: + { + if (hintMask & GR_STWHINT_W_DIFF_TMU0) + grVertexLayout(GR_PARAM_Q0, GR_VERTEX_OOW_TMU0_OFFSET << 2, + GR_PARAM_ENABLE); + else + grVertexLayout(GR_PARAM_Q0, GR_VERTEX_OOW_TMU0_OFFSET << 2, + GR_PARAM_DISABLE); + + if (hintMask & GR_STWHINT_ST_DIFF_TMU1) + grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, + GR_PARAM_ENABLE); + else + grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, + GR_PARAM_DISABLE); + + if (hintMask & GR_STWHINT_W_DIFF_TMU1) + grVertexLayout(GR_PARAM_Q1, GR_VERTEX_OOW_TMU1_OFFSET << 2, + GR_PARAM_ENABLE); + else + grVertexLayout(GR_PARAM_Q1, GR_VERTEX_OOW_TMU1_OFFSET << 2, + GR_PARAM_DISABLE); + + } + } +} + +void +FX_grHints(tdfxContextPtr fxMesa, GrHint_t hintType, FxU32 hintMask) +{ + LOCK_HARDWARE(fxMesa); + FX_grHints_NoLock(hintType, hintMask); + UNLOCK_HARDWARE(fxMesa); +} + +/* It appears to me that this function is needed either way. */ +FX_GrContext_t +FX_grSstWinOpen(tdfxContextPtr fxMesa, + FxU32 hWnd, + GrScreenResolution_t screen_resolution, + GrScreenRefresh_t refresh_rate, + GrColorFormat_t color_format, + GrOriginLocation_t origin_location, + int nColBuffers, int nAuxBuffers) +{ + FX_GrContext_t i; + LOCK_HARDWARE(fxMesa); + i = grSstWinOpen(hWnd, + screen_resolution, + refresh_rate, + color_format, origin_location, nColBuffers, nAuxBuffers); + + /* + fprintf(stderr, + "grSstWinOpen( win %d res %d ref %d fmt %d\n" + " org %d ncol %d naux %d )\n" + " ==> %d\n", + hWnd, + screen_resolution, + refresh_rate, + color_format, + origin_location, + nColBuffers, + nAuxBuffers, + i); + */ + UNLOCK_HARDWARE(fxMesa); + return i; +} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.h:1.1 --- /dev/null Mon Jun 4 12:37:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.h Wed Mar 21 11:14:28 2001 @@ -0,0 +1,673 @@ +/* + * Mesa 3-D graphics library + * Version: 3.3 + * + * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * + * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the + * terms stated above. + * + * Thank you for your contribution, David! + * + * Please make note of the above copyright/license statement. If you + * contributed code or bug fixes to this code under the previous (GNU + * Library) license and object to the new license, your code will be + * removed at your request. Please see the Mesa docs/COPYRIGHT file + * for more information. + * + * Additional Mesa/3Dfx driver developers: + * Daryll Strauss + * Keith Whitwell + * + * See fxapi.h for more revision/author details. + */ + + +#ifndef __FX_GLIDE_WARPER__ +#define __FX_GLIDE_WARPER__ + +#include +#include + +typedef struct tdfx_context tdfxContextRec; +typedef struct tdfx_context *tdfxContextPtr; + +/* + * General context: + */ +typedef GrContext_t FX_GrContext_t; + +#define FX_FOG_TABLE_ENTRIES GR_FOG_TABLE_ENTRIES +#define FX_GLIDE_STATE_SIZE GR_GLIDE_STATE_SIZE +#define FX_LFB_PIXEL_PIPE GR_LFB_PIXEL_PIPE +#define FX_PENDING_BUFFERSWAPS GR_PENDING_BUFFERSWAPS +#define FX_TEXTURE_ALIGN GR_TEXTURE_ALIGN + +#define FX_ZDEPTH_MAX 0x100 + + +#define GR_ASPECT_1x1 GR_ASPECT_LOG2_1x1 +#define GR_ASPECT_2x1 GR_ASPECT_LOG2_2x1 +#define GR_ASPECT_4x1 GR_ASPECT_LOG2_4x1 +#define GR_ASPECT_8x1 GR_ASPECT_LOG2_8x1 +#define GR_ASPECT_1x2 GR_ASPECT_LOG2_1x2 +#define GR_ASPECT_1x4 GR_ASPECT_LOG2_1x4 +#define GR_ASPECT_1x8 GR_ASPECT_LOG2_1x8 + +#define GR_LOD_256 GR_LOD_LOG2_256 +#define GR_LOD_128 GR_LOD_LOG2_128 +#define GR_LOD_64 GR_LOD_LOG2_64 +#define GR_LOD_32 GR_LOD_LOG2_32 +#define GR_LOD_16 GR_LOD_LOG2_16 +#define GR_LOD_8 GR_LOD_LOG2_8 +#define GR_LOD_4 GR_LOD_LOG2_4 +#define GR_LOD_2 GR_LOD_LOG2_2 +#define GR_LOD_1 GR_LOD_LOG2_1 + +#define GR_FOG_WITH_TABLE GR_FOG_WITH_TABLE_ON_Q + + +typedef FxU32 GrHint_t; +#define GR_HINTTYPE_MIN 0 +#define GR_HINT_STWHINT 0 + +typedef FxU32 GrSTWHint_t; +#define GR_STWHINT_W_DIFF_FBI FXBIT(0) +#define GR_STWHINT_W_DIFF_TMU0 FXBIT(1) +#define GR_STWHINT_ST_DIFF_TMU0 FXBIT(2) +#define GR_STWHINT_W_DIFF_TMU1 FXBIT(3) +#define GR_STWHINT_ST_DIFF_TMU1 FXBIT(4) +#define GR_STWHINT_W_DIFF_TMU2 FXBIT(5) +#define GR_STWHINT_ST_DIFF_TMU2 FXBIT(6) + +#define GR_CONTROL_ACTIVATE 1 +#define GR_CONTROL_DEACTIVATE 0 + +#define GrState void + +/* +** move the vertex layout defintion to application +*/ +typedef struct +{ + GLfloat sow; /* s texture ordinate (s over w) */ + GLfloat tow; /* t texture ordinate (t over w) */ + GLfloat oow; /* 1/w (used mipmapping - really 0xfff/w) */ +} +GrTmuVertex; + + +#if FX_USE_PARGB + +/* standard vertex, packed argb, double texture, 12 dwords */ +typedef struct +{ + GLfloat x, y; /* X and Y in screen space */ + GLfloat ooz; /* 65535/Z (used for Z-buffering) */ + GLfloat oow; /* 1/W (used for W-buffering, texturing) */ + FxU32 argb; /* R, G, B, A [0..255.0] */ + GrTmuVertex tmuvtx[GLIDE_NUM_TMU]; + GLfloat z; /* Z is ignored */ +} +GrVertex; + +/* optimised vertex, packed argb, single texture, 8 dwords = 1 cacheline */ +typedef struct +{ + GLfloat x, y; /* X and Y in screen space */ + GLfloat ooz; /* 65535/Z (used for Z-buffering) */ + GLfloat oow; /* 1/W (used for W-buffering, texturing) */ + FxU32 argb; /* R, G, B, A [0..255.0] */ + GrTmuVertex tmuvtx; /* only 1 TMU used to keep vertex size down */ +} +GrVertex_Fast; + +/* following offsets work for both vertex layouts */ +#define GR_VERTEX_X_OFFSET 0 +#define GR_VERTEX_Y_OFFSET 1 +#define GR_VERTEX_OOZ_OFFSET 2 +#define GR_VERTEX_OOW_OFFSET 3 +#define GR_VERTEX_PARGB_OFFSET 4 +#define GR_VERTEX_SOW_TMU0_OFFSET 5 +#define GR_VERTEX_TOW_TMU0_OFFSET 6 +#define GR_VERTEX_OOW_TMU0_OFFSET 7 +#define GR_VERTEX_SOW_TMU1_OFFSET 8 +#define GR_VERTEX_TOW_TMU1_OFFSET 9 +#define GR_VERTEX_OOW_TMU1_OFFSET 10 +#define GR_VERTEX_Z_OFFSET 11 + +#if GLIDE_ENDIAN == GLIDE_ENDIAN_BIG +#define GET_PA(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4+3] +#define GET_PR(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4+2] +#define GET_PG(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4+1] +#define GET_PB(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4+0] +#else +#define GET_PA(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4+0] +#define GET_PR(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4+1] +#define GET_PG(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4+2] +#define GET_PB(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4+3] +#endif + +#define GET_PARGB(v) ((FxU32*)(v))[GR_VERTEX_PARGB_OFFSET] +#define PACK_4F_ARGB(dest, a, r, g, b) { \ + const GLuint cr = (int)r; \ + const GLuint cg = (int)g; \ + const GLuint ca = (int)a; \ + const GLuint cb = (int)b; \ + dest = ca << 24 | cr << 16 | cg << 8 | cb; \ +} + +#else /* FX_USE_PARGB */ + +typedef struct +{ + float x, y, z; /* X, Y, and Z of scrn space -- Z is ignored */ + float r, g, b; /* R, G, B, ([0..255.0]) */ + float ooz; /* 65535/Z (used for Z-buffering) */ + float a; /* Alpha [0..255.0] */ + float oow; /* 1/W (used for W-buffering, texturing) */ + GrTmuVertex tmuvtx[GLIDE_NUM_TMU]; +} +GrVertex; + +#define GR_VERTEX_X_OFFSET 0 +#define GR_VERTEX_Y_OFFSET 1 +#define GR_VERTEX_Z_OFFSET 2 +#define GR_VERTEX_R_OFFSET 3 +#define GR_VERTEX_G_OFFSET 4 +#define GR_VERTEX_B_OFFSET 5 +#define GR_VERTEX_OOZ_OFFSET 6 +#define GR_VERTEX_A_OFFSET 7 +#define GR_VERTEX_OOW_OFFSET 8 +#define GR_VERTEX_SOW_TMU0_OFFSET 9 +#define GR_VERTEX_TOW_TMU0_OFFSET 10 +#define GR_VERTEX_OOW_TMU0_OFFSET 11 +#define GR_VERTEX_SOW_TMU1_OFFSET 12 +#define GR_VERTEX_TOW_TMU1_OFFSET 13 +#define GR_VERTEX_OOW_TMU1_OFFSET 14 +#endif /* FX_USE_PARGB */ + + + +extern FxI32 FX_grGetInteger_NoLock(FxU32 pname); + +extern FxI32 FX_grGetInteger(tdfxContextPtr fxMesa, FxU32 pname); + +extern const char *FX_grGetString(tdfxContextPtr fxMesa, FxU32 pname); + + +#define FX_grTexDownloadTable(fxMesa, type, data) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grTexDownloadTable(type,data); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0); + +#define FX_grTexDownloadTable_NoLock(type, data) \ + grTexDownloadTable(type, data) + + +#define FX_grFlush(fxMesa) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grFlush(); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grFinish(fxMesa) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grFinish(); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + + +#define FX_grLfbWriteRegion(fxMesa,dst_buffer,dst_x,dst_y,src_format,src_width,src_height,src_stride,src_data) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grLfbWriteRegion(dst_buffer,dst_x,dst_y,src_format,src_width,src_height,FXFALSE,src_stride,src_data); \ + UNLOCK_HARDWARE(fxMesa); \ + } while(0) + + +#define FX_grLfbReadRegion(fxMesa,src_buffer,src_x,src_y,src_width,src_height,dst_stride,dst_data) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grLfbReadRegion(src_buffer,src_x,src_y,src_width,src_height,dst_stride,dst_data); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0); + + +#define FX_grDrawTriangle_NoLock(a,b,c) grDrawTriangle(a,b,c) +#define FX_grDrawTriangle(fxMesa, a,b,c) \ + do { \ + BEGIN_CLIP_LOOP(fxMesa); \ + FX_grDrawTriangle_NoLock(a,b,c); \ + END_CLIP_LOOP(fxMesa); \ + } while (0) + + + +extern void FX_grHints_NoLock(GrHint_t hintType, FxU32 hintMask); +extern void FX_grHints(tdfxContextPtr fxMesa, GrHint_t hintType, FxU32 hintMask); + + +extern void FX_grAADrawLine(tdfxContextPtr fxMesa, GrVertex * a, GrVertex * b); + +extern void FX_grAADrawPoint(tdfxContextPtr fxMesa, GrVertex * a); + + +extern void FX_setupGrVertexLayout(tdfxContextPtr fxMesa); + + +extern FX_GrContext_t FX_grSstWinOpen(tdfxContextPtr fxMesa, + FxU32 hWnd, + GrScreenResolution_t screen_resolution, + GrScreenRefresh_t refresh_rate, + GrColorFormat_t color_format, + GrOriginLocation_t origin_location, + int nColBuffers, int nAuxBuffers); + + +#define FX_grDrawLine_NoLock(v1, v2) grDrawLine(v1, v2) +#define FX_grDrawLine(fxMesa, v1, v2) \ + do { \ + BEGIN_CLIP_LOOP(fxMesa); \ + FX_grDrawLine_NoLock(v1, v2); \ + END_CLIP_LOOP(fxMesa); \ + } while (0) + +#define FX_grDrawPoint_NoLock(p) grDrawPoint(p) +#define FX_grDrawPoint(fxMesa, p) \ + do { \ + BEGIN_CLIP_LOOP(fxMesa); \ + FX_grDrawPoint_NoLock(p); \ + END_CLIP_LOOP(fxMesa); \ + } while (0) + +extern void FX_grDrawPolygonVertexList(tdfxContextPtr fxMesa, + int n, GrVertex * v); + +#define FX_grDitherMode(fxMesa, m) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grDitherMode(m); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grRenderBuffer(fxMesa, b) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grRenderBuffer(b); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grRenderBuffer_NoLock(b) grRenderBuffer(b) + +#define FX_grBufferClear(fxMesa, c, a, d) \ + do { \ + BEGIN_CLIP_LOOP(fxMesa); \ + grBufferClear(c, a, d); \ + END_CLIP_LOOP(fxMesa); \ + } while (0) + +#define FX_grBufferClear_NoLock(c, a, d) grBufferClear(c, a, d) + + +#define FX_grBufferClearExt_NoLock(c, a, d, s) grBufferClearExtProc(c, a, d, s) + +#define FX_grBufferClearExt(fxMesa, c, a, d, s) \ + do { \ + BEGIN_CLIP_LOOP(fxMesa); \ + grBufferClearExtProc(c, a, d, s); \ + END_CLIP_LOOP(fxMesa); \ + } while (0) + +#define FX_grEnable(fxMesa, m) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grEnable(m); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grEnable_NoLock(m) grEnable(m) + +#define FX_grDisable(fxMesa, m) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grDisable(m); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grDisable_NoLock(m) grDisable(m) + + +#define FX_grStencilFunc(fxMesa, fnc, ref, mask) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grStencilFuncProc((fnc), (ref), (mask)); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grStencilFunc_NoLock(f, r, m) grStencilFuncProc(f, r, m) + +#define FX_grStencilMask(fxMesa, write_mask) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grStencilMaskProc(write_mask); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grStencilMask_NoLock(m) grStencilMaskProc(m) + +#define FX_grStencilOp(fxMesa, stencil_fail, depth_fail, depth_pass) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grStencilOpProc((stencil_fail), (depth_fail), (depth_pass)); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grStencilOp_NoLock(sf, df, dp) grStencilOpProc(sf, df, dp) + +#define FX_grDepthMask(fxMesa, m) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grDepthMask(m); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grDepthMask_NoLock(m) grDepthMask(m) + + +extern void FX_grColorMask(GLcontext *ctx, GLboolean r, GLboolean g, + GLboolean b, GLboolean a); + +extern void FX_grColorMask_NoLock(GLcontext *ctx, GLboolean r, GLboolean g, + GLboolean b, GLboolean a); + +extern void FX_grColorMaskv(GLcontext *ctx, const GLboolean rgba[4]); + +extern void FX_grColorMaskv_NoLock(GLcontext *ctx, const GLboolean rgba[4]); + + +extern FxBool FX_grLfbLock(tdfxContextPtr fxMesa, + GrLock_t type, GrBuffer_t buffer, + GrLfbWriteMode_t writeMode, + GrOriginLocation_t origin, FxBool pixelPipeline, + GrLfbInfo_t * info); + +#define FX_grLfbUnlock(fxMesa, t, b) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grLfbUnlock(t, b); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grConstantColorValue(fxMesa, v) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grConstantColorValue(v); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grConstantColorValue_NoLock grConstantColorValue + +#define FX_grAADrawTriangle(fxMesa, a, b, c, ab, bc, ca) \ + do { \ + BEGIN_CLIP_LOOP(fxMesa); \ + grAADrawTriangle(a, b, c, ab, bc, ca); \ + END_CLIP_LOOP(fxMesa); \ + } while (0) + +#define FX_grAlphaBlendFunction(rs, rd, as, ad) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grAlphaBlendFunction(rs, rd, as, ad); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grAlphaCombine(func, fact, loc, oth, inv) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grAlphaCombine(func, fact, loc, oth, inv); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grAlphaCombine_NoLock grAlphaCombine + +#define FX_grAlphaTestFunction(fxMesa, f) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grAlphaTestFunction(f); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grAlphaTestReferenceValue(fxMesa, v) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grAlphaTestReferenceValue(v); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grClipWindow(fxMesa, minx, miny, maxx, maxy) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grClipWindow(minx, miny, maxx, maxy); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grClipWindow_NoLock grClipWindow + +#define FX_grColorCombine(fxMesa, func, fact, loc, oth, inv) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grColorCombine(func, fact, loc, oth, inv); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grColorCombine_NoLock grColorCombine + +#define FX_grCullMode(fxMesa, m) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grCullMode(m); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grDepthBiasLevel(fxMesa, lev) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grDepthBiasLevel(lev); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grDepthBufferFunction(fxMesa, func) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grDepthBufferFunction(func); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grFogColorValue(fxMesa, c) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grFogColorValue(c); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grFogMode(fxMesa, m) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grFogMode(m); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grFogTable(fxMesa, t)\ + do { \ + LOCK_HARDWARE(fxMesa); \ + grFogTable(t); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grTexClampMode(fxMesa, t, sc, tc) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grTexClampMode(t, sc, tc); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grTexClampMode_NoLock grTexClampMode + +#define FX_grTexCombine(fxMesa, t, rfunc, rfact, afunc, afact, rinv, ainv) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grTexCombine(t, rfunc, rfact, afunc, afact, rinv, ainv); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grTexCombine_NoLock grTexCombine + +#define FX_grTexDownloadMipMapLevel(fxMesa, t, sa, tlod, llod, ar, f, eo, d) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grTexDownloadMipMapLevel(t, sa, tlod, llod, ar, f, eo, d); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grTexDownloadMipMapLevelPartial(fxMesa, t, sa, tlod, llod, ar, f, eo, d, s, e); \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grTexDownloadMipMapLevelPartial(t, sa, tlod, llod, ar, f, eo, d, s, e); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grTexFilterMode(fxMesa, t, minf, magf) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grTexFilterMode(t, minf, magf); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grTexFilterMode_NoLock grTexFilterMode + +extern FxU32 FX_grTexMinAddress(tdfxContextPtr fxMesa, GrChipID_t tmu); +extern FxU32 FX_grTexMaxAddress(tdfxContextPtr fxMesa, GrChipID_t tmu); + +#define FX_grTexMipMapMode(t, m, lod) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grTexMipMapMode(t, m, lod); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grTexMipMapMode_NoLock grTexMipMapMode + +#define FX_grTexSource(t, sa, eo, i) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grTexSource(t, sa, eo, i); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grTexSource_NoLock grTexSource + +extern FxU32 FX_grTexTextureMemRequired(tdfxContextPtr fxMesa, + FxU32 evenOdd, GrTexInfo * info); + +#define FX_grTexTextureMemRequired_NoLock grTexTextureMemRequired + +#define FX_grGlideGetState(fxMesa, s) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grGlideGetState(s); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) +#define FX_grGlideGetState_NoLock(s) grGlideGetState(s); + +#define FX_grDRIBufferSwap(fxMesa, i) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grDRIBufferSwap(i); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grSstSelect(fxMesa, b) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grSstSelect(b); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grSstSelect_NoLock grSstSelect + +#define FX_grGlideSetState(fxMesa, s) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grGlideSetState(s); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) +#define FX_grGlideSetState_NoLock(s) grGlideSetState(s); + +#define FX_grDepthBufferMode(fxMesa, m) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grDepthBufferMode(m); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grLfbWriteColorFormat(fxMesa, f) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grLfbWriteColorFormat(f); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grDrawVertexArray(fxMesa, m, c, p) \ + do { \ + BEGIN_CLIP_LOOP(fxMesa); \ + grDrawVertexArray(m, c, p); \ + END_CLIP_LOOP(fxMesa); \ + } while (0) + +#define FX_grGlideShutdown(fxMesa) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grGlideShutdown(); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grTexLodBiasValue_NoLock(t, v) grTexLodBiasValue(t, v) + +#define FX_grTexLodBiasValue(t, v) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + grTexLodBiasValue(t, v); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + +#define FX_grGlideInit_NoLock grGlideInit +#define FX_grSstWinOpen_NoLock grSstWinOpen + +extern int FX_getFogTableSize(tdfxContextPtr fxMesa); + +extern int FX_getGrStateSize(tdfxContextPtr fxMesa); + +#endif /* __FX_GLIDE_WARPER__ */ Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c:1.10 xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c:1.12 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c:1.10 Fri Dec 8 14:36:24 2000 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c Wed Mar 21 11:14:28 2001 @@ -1,139 +1,137 @@ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -Copyright 2000 VA Linux Systems, Inc. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c,v 1.10 2000/12/08 19:36:24 alanh Exp $ */ +/* -*- mode: c; c-basic-offset: 3 -*- + * + * Copyright 2000 VA Linux Systems Inc., Fremont, California. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c,v 1.12 2001/03/21 16:14:28 dawes Exp $ */ /* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * * Authors: - * Daryll Strauss - * Brian E. Paul + * Gareth Hughes + * Brian Paul + * */ #ifdef GLX_DIRECT_RENDERING #include -#include -#include "fxdrv.h" + #include "context.h" #include "matrix.h" #include "mmath.h" #include "vbxform.h" -#include "fxtexman.h" +#include "dri_glide.h" -/* including xf86PciInfo.h causes a bunch of errors */ -#ifndef PCI_CHIP_VOODOO5 -#define PCI_CHIP_VOODOO5 0x0009 -#endif +#include "tdfx_context.h" +#include "tdfx_render.h" +#include "tdfx_state.h" +#include "tdfx_texman.h" GLboolean -XMesaInitDriver(__DRIscreenPrivate * sPriv) +XMesaInitDriver( __DRIscreenPrivate *sPriv ) { - tdfxScreenPrivate *gsp; + int major, minor, patch; + char msg[1024]; - /* Check the DRI version */ - { - int major, minor, patch; - if (XF86DRIQueryVersion(sPriv->display, &major, &minor, &patch)) { - if (major != 3 || minor != 0 || patch < 0) { - char msg[1000]; - sprintf(msg, - "3dfx DRI driver expected DRI version 3.0.x but got version %d.%d.%d", - major, minor, patch); - __driMesaMessage(msg); - return GL_FALSE; - } - } - } - - /* Check that the DDX driver version is compatible */ - if (sPriv->ddxMajor != 1 || sPriv->ddxMinor != 0 || sPriv->ddxPatch < 0) { - char msg[1000]; - sprintf(msg, - "3dfx DRI driver expected DDX driver version 1.0.x but got version %d.%d.%d", - sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch); - __driMesaMessage(msg); - return GL_FALSE; - } - - /* Check that the DRM driver version is compatible */ - if (sPriv->drmMajor != 1 || sPriv->drmMinor != 0 || sPriv->drmPatch < 0) { - char msg[1000]; - sprintf(msg, - "3dfx DRI driver expected DRM driver version 1.0.x but got version %d.%d.%d", - sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch); - __driMesaMessage(msg); - return GL_FALSE; - } - - /* Allocate the private area */ - gsp = (tdfxScreenPrivate *) Xmalloc(sizeof(tdfxScreenPrivate)); - if (!gsp) - return GL_FALSE; - - gsp->driScrnPriv = sPriv; - - sPriv->private = (void *) gsp; - - if (!tdfxMapAllRegions(sPriv)) { - Xfree(gsp); - sPriv->private = NULL; - return GL_FALSE; - } + if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) { + fprintf( stderr, "%s( %p )\n", __FUNCTION__, sPriv ); + } + + /* Check the DRI version */ + if ( XF86DRIQueryVersion( sPriv->display, &major, &minor, &patch ) ) { + if ( major != 4 || + minor < 0 ) { + sprintf( msg, + "3dfx DRI driver expected DRI version 4.0.x " + "but got version %d.%d.%d", + major, minor, patch ); + __driMesaMessage( msg ); + return GL_FALSE; + } + } + + /* Check that the DDX driver version is compatible */ + if ( sPriv->ddxMajor != 1 || + sPriv->ddxMinor < 0 ) { + sprintf( msg, + "3dfx DRI driver expected DDX driver version 1.0.x " + "but got version %d.%d.%d", + sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch ); + __driMesaMessage( msg ); + return GL_FALSE; + } + + /* Check that the DRM driver version is compatible */ + if ( sPriv->drmMajor != 1 || + sPriv->drmMinor < 0 ) { + sprintf( msg, + "3dfx DRI driver expected DRM driver version 1.0.x " + "but got version %d.%d.%d", + sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch ); + __driMesaMessage( msg ); + return GL_FALSE; + } + + if ( !tdfxCreateScreen( sPriv ) ) { + tdfxDestroyScreen( sPriv ); + return GL_FALSE; + } - return GL_TRUE; + return GL_TRUE; } void -XMesaResetDriver(__DRIscreenPrivate * sPriv) +XMesaResetDriver( __DRIscreenPrivate *sPriv ) { - tdfxUnmapAllRegions(sPriv); - Xfree(sPriv->private); - sPriv->private = NULL; + if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) { + fprintf( stderr, "%s( %p )\n", __FUNCTION__, sPriv ); + } + + tdfxDestroyScreen( sPriv ); } GLvisual * -XMesaCreateVisual(Display * dpy, - __DRIscreenPrivate * driScrnPriv, - const XVisualInfo * visinfo, - const __GLXvisualConfig * config) -{ - /* Drivers may change the args to _mesa_create_visual() in order to - * setup special visuals. - */ - return _mesa_create_visual(config->rgba, +XMesaCreateVisual( Display * dpy, + __DRIscreenPrivate *driScrnPriv, + const XVisualInfo *visinfo, + const __GLXvisualConfig *config ) +{ + /* Drivers may change the args to _mesa_create_visual() in order to + * setup special visuals. + */ + return _mesa_create_visual( config->rgba, config->doubleBuffer, config->stereo, - _mesa_bitcount(visinfo->red_mask), - _mesa_bitcount(visinfo->green_mask), - _mesa_bitcount(visinfo->blue_mask), + _mesa_bitcount( visinfo->red_mask ), + _mesa_bitcount( visinfo->green_mask ), + _mesa_bitcount( visinfo->blue_mask ), config->alphaSize, 0, /* index bits */ config->depthSize, @@ -142,410 +140,287 @@ config->accumGreenSize, config->accumBlueSize, config->accumAlphaSize, - 0 /* num samples */ - ); + 0 /* num samples */ ); } GLboolean -XMesaCreateContext(Display * dpy, GLvisual * mesaVis, - __DRIcontextPrivate * driContextPriv) +XMesaCreateContext( Display *dpy, GLvisual *mesaVis, + __DRIcontextPrivate *driContextPriv ) { - fxMesaContext fxMesa; - __DRIscreenPrivate *driScrnPriv = driContextPriv->driScreenPriv; - tdfxScreenPrivate *sPriv = (tdfxScreenPrivate *) driScrnPriv->private; - TDFXSAREAPriv *saPriv; - - fxMesa = (fxMesaContext) Xmalloc(sizeof(struct tfxMesaContext)); - if (!fxMesa) { - return GL_FALSE; - } - - fxMesa->hHWContext = driContextPriv->hHWContext; - fxMesa->tdfxScrnPriv = sPriv; - /* deviceID = 0x05 = Voodoo3 */ - /* deviceID = 0x09 = Voodoo5 (and Voodoo4?) */ - fxMesa->isNapalm = sPriv->deviceID == PCI_CHIP_VOODOO5; - fxMesa->haveHwStencil = fxMesa->isNapalm && sPriv->cpp == 4; - - - fxMesa->glVis = mesaVis; - fxMesa->screen_width = sPriv->width; - fxMesa->screen_height = sPriv->height; - fxMesa->new_state = ~0; - fxMesa->driContextPriv = driContextPriv; - fxMesa->glCtx = driContextPriv->mesaContext; - fxMesa->initDone = GL_FALSE; - - saPriv = - (TDFXSAREAPriv *) ((char *) driScrnPriv->pSAREA + - sizeof(XF86DRISAREARec)); - grDRIOpen(driScrnPriv->pFB, sPriv->regs.map, sPriv->deviceID, - sPriv->width, sPriv->height, sPriv->mem, sPriv->cpp, - sPriv->stride, sPriv->fifoOffset, sPriv->fifoSize, - sPriv->fbOffset, sPriv->backOffset, sPriv->depthOffset, - sPriv->textureOffset, sPriv->textureSize, &saPriv->fifoPtr, - &saPriv->fifoRead); + if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) { + fprintf( stderr, "%s( %p )\n", __FUNCTION__, driContextPriv ); + } - driContextPriv->driverPrivate = (void *) fxMesa; - - return GL_TRUE; + return tdfxCreateContext( dpy, mesaVis, driContextPriv ); } void -XMesaDestroyContext(__DRIcontextPrivate * driContextPriv) +XMesaDestroyContext( __DRIcontextPrivate *driContextPriv ) { - fxMesaContext fxMesa = (fxMesaContext) driContextPriv->driverPrivate; - if (fxMesa) { - if (fxMesa->glCtx->Shared->RefCount == 1) { - /* This share group is about to go away, free our private - * texture object data. - */ - struct gl_texture_object *tObj; - tObj = fxMesa->glCtx->Shared->TexObjectList; - while (tObj) { - fxTMFreeTexture(fxMesa, tObj); - tObj = tObj->Next; - } - } - XFree(fxMesa); - driContextPriv->driverPrivate = NULL; - } + tdfxContextPtr fxMesa; + + if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) { + fprintf( stderr, "%s( %p )\n", __FUNCTION__, driContextPriv ); + } + + fxMesa = (tdfxContextPtr) driContextPriv->driverPrivate; + tdfxDestroyContext( fxMesa ); + driContextPriv->driverPrivate = NULL; } GLframebuffer * -XMesaCreateWindowBuffer(Display * dpy, - __DRIscreenPrivate * driScrnPriv, - __DRIdrawablePrivate * driDrawPriv, - GLvisual * mesaVis) -{ - return gl_create_framebuffer(mesaVis, - GL_FALSE, /* software depth buffer? */ - mesaVis->StencilBits > 0, - mesaVis->AccumRedBits > 0, - GL_FALSE /* software alpha channel? */ - ); +XMesaCreateWindowBuffer( Display *dpy, + __DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + GLvisual *mesaVis ) +{ + return gl_create_framebuffer( mesaVis, + GL_FALSE, /* software depth buffer? */ + mesaVis->StencilBits > 0, + mesaVis->AccumRedBits > 0, + GL_FALSE /* software alpha channel? */ ); } GLframebuffer * -XMesaCreatePixmapBuffer(Display * dpy, - __DRIscreenPrivate * driScrnPriv, - __DRIdrawablePrivate * driDrawPriv, - GLvisual * mesaVis) +XMesaCreatePixmapBuffer( Display *dpy, + __DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + GLvisual *mesaVis ) { #if 0 - /* Different drivers may have different combinations of hardware and - * software ancillary buffers. - */ - return gl_create_framebuffer(mesaVis, - GL_FALSE, /* software depth buffer? */ - mesaVis->StencilBits > 0, - mesaVis->AccumRedBits > 0, - mesaVis->AlphaBits > 0); + /* Different drivers may have different combinations of hardware and + * software ancillary buffers. + */ + return gl_create_framebuffer( mesaVis, + GL_FALSE, /* software depth buffer? */ + mesaVis->StencilBits > 0, + mesaVis->AccumRedBits > 0, + mesaVis->AlphaBits > 0 ); #else - return NULL; /* not implemented yet */ + return NULL; /* not implemented yet */ #endif } - void -XMesaSwapBuffers(__DRIdrawablePrivate * driDrawPriv) +XMesaSwapBuffers( __DRIdrawablePrivate *driDrawPriv ) { - GET_CURRENT_CONTEXT(ctx); - fxMesaContext fxMesa = 0; - - if (!driDrawPriv->mesaBuffer->Visual->DBflag) - return; /* can't swap a single-buffered window */ - - /* If the current context's drawable matches the given drawable - * we have to do a glFinish (per the GLX spec). - */ - if (ctx) { - __DRIdrawablePrivate *curDrawPriv; - fxMesa = FX_CONTEXT(ctx); - curDrawPriv = fxMesa->driContextPriv->driDrawablePriv; - if (curDrawPriv == driDrawPriv) { - /* swapping window bound to current context, flush first */ - FLUSH_VB(ctx, "swap buffers"); - BEGIN_BOARD_LOCK(fxMesa); - } - else { - /* make fxMesa context current */ - grGlideGetState((GrState *) fxMesa->state); - fxMesa = (fxMesaContext) driDrawPriv->driContextPriv->driverPrivate; - BEGIN_BOARD_LOCK(fxMesa); - grSstSelect(fxMesa->board); - grGlideSetState((GrState *) fxMesa->state); - } - } + GET_CURRENT_CONTEXT(ctx); + tdfxContextPtr fxMesa = 0; + if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) { + fprintf( stderr, "%s( %p )\n", __FUNCTION__, driDrawPriv ); + } + + if ( !driDrawPriv->mesaBuffer->Visual->DBflag ) + return; /* can't swap a single-buffered window */ + + /* If the current context's drawable matches the given drawable + * we have to do a glFinish (per the GLX spec). + */ + if ( ctx ) { + __DRIdrawablePrivate *curDrawPriv; + fxMesa = TDFX_CONTEXT(ctx); + curDrawPriv = fxMesa->driContext->driDrawablePriv; + + if ( curDrawPriv == driDrawPriv ) { + /* swapping window bound to current context, flush first */ + FLUSH_VB( ctx, "swap buffers" ); + LOCK_HARDWARE( fxMesa ); + } + else { + /* find the fxMesa context previously bound to the window */ + fxMesa = (tdfxContextPtr) driDrawPriv->driContextPriv->driverPrivate; + if (!fxMesa) + return; + LOCK_HARDWARE( fxMesa ); + grSstSelect( fxMesa->Glide.Board ); + grGlideSetState( (GrState *) fxMesa->Glide.State ); + } + } #ifdef STATS - { - int stalls; - static int prevStalls = 0; - stalls = grFifoGetStalls(); - if (stalls != prevStalls) { - fprintf(stderr, "%d stalls occurred\n", stalls - prevStalls); - prevStalls = stalls; - } - if (fxMesa && fxMesa->texSwaps) { - fprintf(stderr, "%d texture swaps occurred\n", fxMesa->texSwaps); - fxMesa->texSwaps = 0; - } - } + { + int stalls; + static int prevStalls = 0; + + stalls = grFifoGetStalls(); + + fprintf( stderr, "%s:\n", __FUNCTION__ ); + if ( stalls != prevStalls ) { + fprintf( stderr, " %d stalls occurred\n", + stalls - prevStalls ); + prevStalls = stalls; + } + if ( fxMesa && fxMesa->texSwaps ) { + fprintf( stderr, " %d texture swaps occurred\n", + fxMesa->texSwaps ); + fxMesa->texSwaps = 0; + } + } #endif + if (fxMesa->scissoredClipRects) { + /* restore clip rects without scissor box */ + grDRIPosition( driDrawPriv->x, driDrawPriv->y, + driDrawPriv->w, driDrawPriv->h, + driDrawPriv->numClipRects, driDrawPriv->pClipRects ); + } + + grDRIBufferSwap( fxMesa->Glide.SwapInterval ); + + if (fxMesa->scissoredClipRects) { + /* restore clip rects WITH scissor box */ + grDRIPosition( driDrawPriv->x, driDrawPriv->y, + driDrawPriv->w, driDrawPriv->h, + fxMesa->numClipRects, fxMesa->pClipRects ); + } - /* XXX prototype grDRISwapClipRects() function may not be - * needed after all - */ -#if 0 - FX_grDRIBufferSwap(fxMesa, fxMesa->swapInterval); -#elif 1 - grDRIBufferSwap(fxMesa->swapInterval); -#else - grDRISwapClipRects(fxMesa->swapInterval, - driDrawPriv->numClipRects, - driDrawPriv->pClipRects); -#endif - #if 0 - { - FxI32 result; - do { - result = FX_grGetInteger(FX_PENDING_BUFFERSWAPS); - } while (result > fxMesa->maxPendingSwapBuffers); - } + { + FxI32 result; + do { + result = FX_grGetInteger( FX_PENDING_BUFFERSWAPS ); + } while ( result > fxMesa->maxPendingSwapBuffers ); + } #endif - fxMesa->stats.swapBuffer++; + fxMesa->stats.swapBuffer++; - if (ctx) { - if (ctx->DriverCtx != fxMesa) { - /* restore original context */ - fxMesa = FX_CONTEXT(ctx); - grSstSelect(fxMesa->board); - grGlideSetState((GrState *) fxMesa->state); - } - END_BOARD_LOCK(fxMesa); - } + if (ctx) { + if (ctx->DriverCtx != fxMesa) { + fxMesa = TDFX_CONTEXT(ctx); + grSstSelect( fxMesa->Glide.Board ); + grGlideSetState( (GrState *) fxMesa->Glide.State ); + } + UNLOCK_HARDWARE( fxMesa ); + } } GLboolean -XMesaUnbindContext(__DRIcontextPrivate * driContextPriv) +XMesaUnbindContext( __DRIcontextPrivate *driContextPriv ) { - GET_CURRENT_CONTEXT(ctx); - if (driContextPriv && driContextPriv->mesaContext == ctx) { - fxMesaContext fxMesa = FX_CONTEXT(ctx); - FX_grGlideGetState(fxMesa, (GrState *) fxMesa->state); - } - return GL_TRUE; + GET_CURRENT_CONTEXT(ctx); + + if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) { + fprintf( stderr, "%s( %p )\n", __FUNCTION__, driContextPriv ); + } + + if ( driContextPriv && driContextPriv->mesaContext == ctx ) { + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + FX_grGlideGetState( fxMesa, (GrState *) fxMesa->Glide.State ); + } + return GL_TRUE; } + GLboolean -XMesaOpenFullScreen(__DRIcontextPrivate *driContextPriv) +XMesaMakeCurrent( __DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv ) { - fprintf(stderr,"XMesaOpenFullScreen\n"); -#if 0 /* When new glide3 calls exist */ - return((GLboolean)grDRISetupFullScreen(GL_TRUE)); -#else - return GL_TRUE; -#endif + if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) { + fprintf( stderr, "%s( %p )\n", __FUNCTION__, driContextPriv ); + } + + if ( driContextPriv ) { + tdfxContextPtr fxMesa = (tdfxContextPtr) driContextPriv->driverPrivate; + GLcontext *ctx = fxMesa->glCtx; + + if ( fxMesa->driDrawable != driDrawPriv ) { + fxMesa->driDrawable = driDrawPriv; + fxMesa->dirty = ~0; + } + + if ( !fxMesa->Glide.Initialized ) { + if ( !tdfxInitContext( driDrawPriv, fxMesa ) ) + return GL_FALSE; + + LOCK_HARDWARE( fxMesa ); + + /* FIXME: Force loading of window information */ + fxMesa->width = 0; + tdfxUpdateClipping(ctx); + tdfxUploadClipping(fxMesa); + + UNLOCK_HARDWARE( fxMesa ); + } else { + LOCK_HARDWARE( fxMesa ); + + grSstSelect( fxMesa->Glide.Board ); + grGlideSetState( fxMesa->Glide.State ); + + tdfxUpdateClipping(ctx); + tdfxUploadClipping(fxMesa); + + UNLOCK_HARDWARE( fxMesa ); + } + + assert( ctx == driContextPriv->mesaContext ); + + gl_make_current2( ctx, driDrawPriv->mesaBuffer, + driReadPriv->mesaBuffer ); + + if ( !ctx->Viewport.Width ) { + gl_Viewport( ctx, 0, 0, driDrawPriv->w, driDrawPriv->h ); + } + } else { + gl_make_current( 0, 0 ); + } + + return GL_TRUE; } + GLboolean -XMesaCloseFullScreen(__DRIcontextPrivate *driContextPriv) +XMesaOpenFullScreen(__DRIcontextPrivate *driContextPriv) { - fprintf(stderr,"***** XMesaCloseFullScreen *****\n"); + if ( 0 ) + fprintf( stderr, "***** XMesaOpenFullScreen *****\n" ); #if 0 /* When new glide3 calls exist */ - return((GLboolean)grDRISetupFullScreen(GL_FALSE)); + return (GLboolean)grDRISetupFullScreen( GL_TRUE ); #else - return GL_TRUE; + return GL_TRUE; #endif } -/* - * This function sends the window position and cliprect list to - * Glide for the given context. - */ -static void -XMesaWindowMoved(fxMesaContext fxMesa) -{ - __DRIdrawablePrivate *dPriv = fxMesa->driContextPriv->driDrawablePriv; - GLcontext *ctx = fxMesa->glCtx; - - grDRIPosition(dPriv->x, dPriv->y, dPriv->w, dPriv->h, - dPriv->numClipRects, dPriv->pClipRects); - fxMesa->numClipRects = dPriv->numClipRects; - fxMesa->pClipRects = dPriv->pClipRects; - if (dPriv->x != fxMesa->x_offset || dPriv->y != fxMesa->y_offset || - dPriv->w != fxMesa->width || dPriv->h != fxMesa->height) { - fxMesa->x_offset = dPriv->x; - fxMesa->y_offset = dPriv->y; - fxMesa->width = dPriv->w; - fxMesa->height = dPriv->h; - fxMesa->y_delta = - fxMesa->screen_height - fxMesa->y_offset - fxMesa->height; - } - switch (dPriv->numClipRects) { - case 0: - fxMesa->clipMinX = dPriv->x; - fxMesa->clipMaxX = dPriv->x + dPriv->w; - fxMesa->clipMinY = dPriv->y; - fxMesa->clipMaxY = dPriv->y + dPriv->h; - fxSetScissorValues(ctx); - fxMesa->needClip = 0; - break; - case 1: - fxMesa->clipMinX = dPriv->pClipRects[0].x1; - fxMesa->clipMaxX = dPriv->pClipRects[0].x2; - fxMesa->clipMinY = dPriv->pClipRects[0].y1; - fxMesa->clipMaxY = dPriv->pClipRects[0].y2; - fxSetScissorValues(ctx); - fxMesa->needClip = 0; - break; - default: - fxMesa->needClip = 1; - } -} - GLboolean -XMesaMakeCurrent(__DRIcontextPrivate * driContextPriv, - __DRIdrawablePrivate * driDrawPriv, - __DRIdrawablePrivate * driReadPriv) -{ - if (driContextPriv) { - fxMesaContext fxMesa; - - fxMesa = (fxMesaContext) driContextPriv->driverPrivate; - - if (!fxMesa->initDone) { - if (!tdfxInitHW(driDrawPriv, fxMesa)) - return GL_FALSE; - fxMesa->width = 0; - XMesaWindowMoved(fxMesa); - FX_grGlideGetState(fxMesa, (GrState *) fxMesa->state); - } - else { - FX_grSstSelect(fxMesa, fxMesa->board); - FX_grGlideSetState(fxMesa, (GrState *) fxMesa->state); - XMesaWindowMoved(fxMesa); - } - - assert(fxMesa->glCtx == driContextPriv->mesaContext); - - gl_make_current2(fxMesa->glCtx, driDrawPriv->mesaBuffer, - driReadPriv->mesaBuffer); - - if (!fxMesa->glCtx->Viewport.Width) - gl_Viewport(fxMesa->glCtx, 0, 0, driDrawPriv->w, driDrawPriv->h); - } - else { - gl_make_current(0, 0); - } - return GL_TRUE; -} - - -/* This is called from within the LOCK_HARDWARE routine */ -void -XMesaUpdateState(fxMesaContext fxMesa) +XMesaCloseFullScreen(__DRIcontextPrivate *driContextPriv) { - __DRIcontextPrivate *cPriv = fxMesa->driContextPriv; - __DRIdrawablePrivate *dPriv = cPriv->driDrawablePriv; - __DRIscreenPrivate *sPriv = dPriv->driScreenPriv; - TDFXSAREAPriv *saPriv = (TDFXSAREAPriv *) (((char *) sPriv->pSAREA) + - sizeof(XF86DRISAREARec)); - int stamp; - char ret; - - DEBUG_CHECK_LOCK(); - DRM_CAS(&sPriv->pSAREA->lock, dPriv->driContextPriv->hHWContext, - DRM_LOCK_HELD | dPriv->driContextPriv->hHWContext, ret); - if (!ret) { - DEBUG_LOCK(); - return; - } - drmGetLock(sPriv->fd, dPriv->driContextPriv->hHWContext, 0); - stamp = dPriv->lastStamp; - /* This macro will update dPriv's cliprects if needed */ - XMESA_VALIDATE_DRAWABLE_INFO(cPriv->display, sPriv, dPriv); - /* fprintf(stderr, "In FifoPtr=%d FifoRead=%d\n", saPriv->fifoPtr, saPriv->fifoRead); */ - if (saPriv->fifoOwner != dPriv->driContextPriv->hHWContext) { - grDRIImportFifo(saPriv->fifoPtr, saPriv->fifoRead); - } - if (saPriv->ctxOwner != dPriv->driContextPriv->hHWContext) { - /* This sequence looks a little odd. Glide mirrors the state, and - when you get the state you are forcing the mirror to be up to - date, and then getting a copy from the mirror. You can then force - that state onto the hardware when you set the state. */ - void *state; - state = malloc(FX_grGetInteger_NoLock(FX_GLIDE_STATE_SIZE)); - FX_grGlideGetState_NoLock(state); - FX_grGlideSetState_NoLock(state); - free(state); - } - if (saPriv->texOwner != dPriv->driContextPriv->hHWContext) { - fxTMRestoreTextures_NoLock(fxMesa); - } -#if 0 - if (*dPriv->pStamp != stamp) + if ( 0 ) + fprintf( stderr, "***** XMesaCloseFullScreen *****\n" ); +#if 0 /* When new glide3 calls exist */ + return (GLboolean)grDRISetupFullScreen( GL_FALSE ); #else - if (*dPriv->pStamp != stamp || - saPriv->ctxOwner != dPriv->driContextPriv->hHWContext) + return GL_TRUE; #endif - XMesaWindowMoved(fxMesa); - DEBUG_LOCK(); } -/* - * XXX is this used by anyone? +/* Silence compiler warnings. */ -#if 000 -static void -XMesaSetSAREA(void) -{ - __DRIdrawablePrivate *dPriv = gCC->driDrawablePriv; - __DRIscreenPrivate *sPriv = dPriv->driScreenPriv; - TDFXSAREAPriv *saPriv = - (TDFXSAREAPriv *) (((char *) sPriv->pSAREA) + - sizeof(XF86DRISAREARec)); - - saPriv->fifoOwner = dPriv->driContextPriv->hHWContext; - saPriv->ctxOwner = dPriv->driContextPriv->hHWContext; - saPriv->texOwner = dPriv->driContextPriv->hHWContext; - grDRIResetSAREA(); - /* fprintf(stderr, "Out FifoPtr=%d FifoRead=%d\n", saPriv->fifoPtr, saPriv->fifoRead); */ -} -#endif - +extern void __driRegisterExtensions( void ); - -extern void __driRegisterExtensions(void); /* silence compiler warning */ - /* This function is called by libGL.so as soon as libGL.so is loaded. * This is where we'd register new extension functions with the dispatcher. */ -void -__driRegisterExtensions(void) +void __driRegisterExtensions( void ) { #if 0 - /* Example. Also look in fxdd.c for more details. */ - { - const int _gloffset_FooBarEXT = 555; /* just an example number! */ - if (_glapi_add_entrypoint("glFooBarEXT", _gloffset_FooBarEXT)) { - void *f = glXGetProcAddressARB("glFooBarEXT"); - assert(f); - } - } + /* Example. Also look in tdfx_dd.c for more details. */ + { + const int _gloffset_FooBarEXT = 555; /* just an example number! */ + if ( _glapi_add_entrypoint( "glFooBarEXT", _gloffset_FooBarEXT ) ) { + void *f = glXGetProcAddressARB( "glFooBarEXT" ); + assert( f ); + } + } #endif } Index: xc/lib/GLU/GLU-def.cpp diff -u /dev/null xc/lib/GLU/GLU-def.cpp:1.1 --- /dev/null Mon Jun 4 12:37:42 2001 +++ xc/lib/GLU/GLU-def.cpp Tue Feb 13 14:19:11 2001 @@ -0,0 +1,166 @@ +LIBRARY GLU +VERSION LIBRARY_VERSION +EXPORTS + +bezierPatchDelete +bezierPatchDeleteList +bezierPatchDraw +bezierPatchEval +bezierPatchEvalNormal +bezierPatchInsert +bezierPatchListDraw +bezierPatchMake +bezierPatchMake2 +bezierPatchPrint +bezierPatchPrintList +bezierPatchMeshBeginStrip +bezierPatchMeshDelDeg +bezierPatchMeshDelete +bezierPatchMeshDraw +bezierPatchMeshEndStrip +bezierPatchMeshEval +bezierPatchMeshInsertUV +bezierPatchMeshListCollect +bezierPatchMeshListDelDeg +bezierPatchMeshListDelete +bezierPatchMeshListDraw +bezierPatchMeshListEval +bezierPatchMeshListInsert +bezierPatchMeshListNumTriangles +bezierPatchMeshListPrint +bezierPatchMeshListReverse +bezierPatchMeshListTotalStrips +bezierPatchMeshListTotalVert +bezierPatchMeshMake +bezierPatchMeshMake2 +bezierPatchMeshNumTriangles +bezierPatchMeshPrint +bezierPatchMeshPutPatch +drawStrips +gluBeginCurve +gluBeginSurface +gluBeginTrim +gluDeleteNurbsRenderer +gluDeleteNurbsTessellatorEXT +gluEndCurve +gluEndSurface +gluEndTrim +gluGetNurbsProperty +gluLoadSamplingMatrices +gluNewNurbsRenderer +gluNurbsCallback +gluNurbsCallbackData +gluNurbsCallbackDataEXT +gluNurbsCurve +gluNurbsProperty +gluNurbsSurface +gluPwlCurve +glu_LOD_eval_list +__gl_dictListDelete +__gl_dictListDeleteDict +__gl_dictListInsertBefore +__gl_dictListNewDict +__gl_dictListSearch +__gl_edgeEval +__gl_edgeIntersect +__gl_edgeSign +__gl_transEval +__gl_transSign +__gl_vertCCW +__gl_vertLeq +__gl_memInit +__gl_meshAddEdgeVertex +; __gl_meshCheckMesh +__gl_meshConnect +__gl_meshDelete +__gl_meshDeleteMesh +__gl_meshMakeEdge +__gl_meshNewMesh +__gl_meshSplice +__gl_meshSplitEdge +__gl_meshUnion +__gl_meshZapFace +__gl_projectPolygon +__gl_pqHeapDelete +__gl_pqHeapDeletePriorityQ +__gl_pqHeapExtractMin +__gl_pqHeapInit +__gl_pqHeapInsert +__gl_pqHeapNewPriorityQ +__gl_pqSortDelete +__gl_pqSortDeletePriorityQ +__gl_pqSortExtractMin +__gl_pqSortInit +__gl_pqSortInsert +__gl_pqSortIsEmpty +__gl_pqSortMinimum +__gl_pqSortNewPriorityQ +__gl_renderBoundary +__gl_renderCache +__gl_renderMesh +__gl_computeInterior +__gl_noBeginData +__gl_noCombineData +__gl_noEdgeFlagData +__gl_noEndData +__gl_noErrorData +__gl_noVertexData +gluBeginPolygon +; gluDeleteMesh +gluDeleteTess +gluEndPolygon +gluGetTessProperty +gluNewTess +gluNextContour +gluTessBeginContour +gluTessBeginPolygon +gluTessCallback +gluTessEndContour +gluTessEndPolygon +gluTessNormal +gluTessProperty +gluTessVertex +__gl_meshDiscardExterior +__gl_meshSetWindingNumber +__gl_meshTessellateInterior +__gl_meshTessellateMonoRegion +gluErrorString +; __glNURBSErrorString +; __glTessErrorString +; bitmapBuild2DMipmaps +; fastBuild2DMipmaps +gluBuild1DMipmapLevels +gluBuild1DMipmaps +gluBuild2DMipmapLevels +gluBuild2DMipmaps +gluBuild3DMipmapLevels +gluBuild3DMipmaps +gluScaleImage +gluScaleImage3D +; __gluInvertMatrixd +; __gluMakeIdentityd +; __gluMakeIdentityf +; __gluMultMatricesd +; __gluMultMatrixVecd +gluLookAt +gluOrtho2D +gluPerspective +gluPickMatrix +gluProject +gluUnProject +gluUnProject4 +gluCylinder +gluDeleteQuadric +gluDisk +gluNewQuadric +gluPartialDisk +gluQuadricCallback +gluQuadricDrawStyle +gluQuadricNormals +gluQuadricOrientation +gluQuadricTexture +gluSphere +gluCheckExtension +gluGetString + +/* $XFree86: xc/lib/GLU/GLU-def.cpp,v 1.1 2001/02/13 19:19:11 dawes Exp $ */ Index: xc/lib/GLU/Imakefile diff -u /dev/null xc/lib/GLU/Imakefile:1.4 --- /dev/null Mon Jun 4 12:37:42 2001 +++ xc/lib/GLU/Imakefile Tue Feb 13 14:19:11 2001 @@ -0,0 +1,129 @@ +XCOMM $XFree86: xc/lib/GLU/Imakefile,v 1.4 2001/02/13 19:19:11 dawes Exp $ + +XCOMM License Applicability. Except to the extent portions of this file are +XCOMM made subject to an alternative license as permitted in the SGI Free +XCOMM Software License B, Version 1.1 (the "License"), the contents of this +XCOMM file are subject only to the provisions of the License. You may not use +XCOMM this file except in compliance with the License. You may obtain a copy +XCOMM of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +XCOMM Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +XCOMM +XCOMM http://oss.sgi.com/projects/FreeB +XCOMM +XCOMM Note that, as provided in the License, the Software is distributed on an +XCOMM "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +XCOMM DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +XCOMM CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +XCOMM PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +XCOMM +XCOMM Original Code. The Original Code is: OpenGL Sample Implementation, +XCOMM Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +XCOMM Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +XCOMM Copyright in any portions created by third parties is as indicated +XCOMM elsewhere herein. All Rights Reserved. +XCOMM +XCOMM Additional Notice Provisions: The application programming interfaces +XCOMM established by SGI in conjunction with the Original Code are The +XCOMM OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +XCOMM April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +XCOMM 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +XCOMM Window System(R) (Version 1.3), released October 19, 1998. This software +XCOMM was created using the OpenGL(R) version 1.2.1 Sample Implementation +XCOMM published by SGI, but has not been independently verified as being +XCOMM compliant with the OpenGL(R) version 1.2.1 Specification. +XCOMM + +#define IHaveSubdirs + +#define DoNormalLib NormalLibGlu +#define DoSharedLib SharedLibGlu +#define DoDebugLib DebugLibGlu +#define DoProfileLib ProfileLibGlu +#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' + +LIBNAME = GLU +SOREV = $(SOGLUREV) + +#define CplusplusSource + +#ifdef SharedGLUReqs +REQUIREDLIBS = SharedGLUReqs +#endif + +#ifndef SeparateSharedCompile +#define SeparateSharedCompile YES +#endif +#if NormalLibFont && SharedLibFont && SeparateSharedCompile +STATIC_OBJSDIR = unshared/ +#endif + +SUBDIRS = \ + include \ + libutil \ + libtess \ + libnurbs/internals \ + libnurbs/interface \ + libnurbs/nurbtess + + SHARED_OBJS = libutil/?*.o libtess/?*.o \ + libnurbs/internals/?*.o \ + libnurbs/interface/?*.o \ + libnurbs/nurbtess/?*.o + + STATIC_OBJS = libutil/$(STATIC_OBJSDIR)?*.o libtess/$(STATIC_OBJSDIR)?*.o \ + libnurbs/internals/$(STATIC_OBJSDIR)?*.o \ + libnurbs/interface/$(STATIC_OBJSDIR)?*.o \ + libnurbs/nurbtess/$(STATIC_OBJSDIR)?*.o + + DEBUG_OBJS = libutil/debugger/?*.o libtess/debugger/?*.o \ + libnurbs/internals/debugger/?*.o \ + libnurbs/interface/debugger/?*.o \ + libnurbs/nurbtess/debugger/?*.o + + PROFILE_OBJS = libutil/profiled/?*.o libtess/profiled/?*.o \ + libnurbs/internals/profiled/?*.o \ + libnurbs/interface/profiled/?*.o \ + libnurbs/nurbtess/profiled/?*.o + + DONES = libutil/DONE libtess/DONE \ + libnurbs/internals/DONE \ + libnurbs/interface/DONE \ + libnurbs/nurbtess/DONE + +#if HasParallelMake +MakeMutex($(SUBDIRS) $(DONES)) +#endif + +#if HasGnuMake || HasBsdMake +$(DONES): $(SUBDIRS) +#endif + +#include + +#undef _LinkBuildLibrary +#define _LinkBuildLibrary(lib) LinkBuildLibrary(lib) + +#if NormalLibGlu +NormalDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(STATIC_OBJS)) +InstallLibrary($(LIBNAME),$(USRLIBDIR)) +#endif + +#if SharedLibGlu +SharedDepLibraryTarget($(LIBNAME),$(SOREV),$(SUBDIRS) $(DONES),$(SHARED_OBJS),.,.) +InstallSharedLibrary($(LIBNAME),$(SOREV),$(SHLIBDIR)) +#endif + +#if DebugLibFont +DebuggedDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(DEBUG_OBJS)) +InstallLibrary($(LIBNAME)_d,$(USRLIBDIR)) +#endif /* DebugLibFont */ + +#if ProfileLibFont +ProfiledDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(PROFILE_OBJS)) +InstallLibrary($(LIBNAME)_p,$(USRLIBDIR)) +#endif /* ProfileLibFont */ + + +ForceSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) + Index: xc/lib/GLU/include/Imakefile diff -u /dev/null xc/lib/GLU/include/Imakefile:1.1 --- /dev/null Mon Jun 4 12:37:42 2001 +++ xc/lib/GLU/include/Imakefile Mon Jan 15 17:17:53 2001 @@ -0,0 +1,38 @@ +XCOMM $XFree86: xc/lib/GLU/include/Imakefile,v 1.1 2001/01/15 22:17:53 dawes Exp $ + +XCOMM License Applicability. Except to the extent portions of this file are +XCOMM made subject to an alternative license as permitted in the SGI Free +XCOMM Software License B, Version 1.1 (the "License"), the contents of this +XCOMM file are subject only to the provisions of the License. You may not use +XCOMM this file except in compliance with the License. You may obtain a copy +XCOMM of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +XCOMM Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +XCOMM +XCOMM http://oss.sgi.com/projects/FreeB +XCOMM +XCOMM Note that, as provided in the License, the Software is distributed on an +XCOMM "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +XCOMM DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +XCOMM CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +XCOMM PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +XCOMM +XCOMM Original Code. The Original Code is: OpenGL Sample Implementation, +XCOMM Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +XCOMM Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +XCOMM Copyright in any portions created by third parties is as indicated +XCOMM elsewhere herein. All Rights Reserved. +XCOMM +XCOMM Additional Notice Provisions: The application programming interfaces +XCOMM established by SGI in conjunction with the Original Code are The +XCOMM OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +XCOMM April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +XCOMM 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +XCOMM Window System(R) (Version 1.3), released October 19, 1998. This software +XCOMM was created using the OpenGL(R) version 1.2.1 Sample Implementation +XCOMM published by SGI, but has not been independently verified as being +XCOMM compliant with the OpenGL(R) version 1.2.1 Specification. +XCOMM + +GLUSRCDIR = $(OGLSAMPLESRCDIR)/main/gfx/lib/glu + +LinkSourceFile(gluos.h, $(GLUSRCDIR)/include) Index: xc/lib/GLU/libnurbs/interface/Imakefile diff -u /dev/null xc/lib/GLU/libnurbs/interface/Imakefile:1.3 --- /dev/null Mon Jun 4 12:37:42 2001 +++ xc/lib/GLU/libnurbs/interface/Imakefile Mon Jan 15 19:39:24 2001 @@ -0,0 +1,107 @@ +XCOMM $XFree86: xc/lib/GLU/libnurbs/interface/Imakefile,v 1.3 2001/01/16 00:39:24 dawes Exp $ + +XCOMM License Applicability. Except to the extent portions of this file are +XCOMM made subject to an alternative license as permitted in the SGI Free +XCOMM Software License B, Version 1.1 (the "License"), the contents of this +XCOMM file are subject only to the provisions of the License. You may not use +XCOMM this file except in compliance with the License. You may obtain a copy +XCOMM of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +XCOMM Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +XCOMM +XCOMM http://oss.sgi.com/projects/FreeB +XCOMM +XCOMM Note that, as provided in the License, the Software is distributed on an +XCOMM "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +XCOMM DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +XCOMM CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +XCOMM PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +XCOMM +XCOMM Original Code. The Original Code is: OpenGL Sample Implementation, +XCOMM Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +XCOMM Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +XCOMM Copyright in any portions created by third parties is as indicated +XCOMM elsewhere herein. All Rights Reserved. +XCOMM +XCOMM Additional Notice Provisions: The application programming interfaces +XCOMM established by SGI in conjunction with the Original Code are The +XCOMM OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +XCOMM April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +XCOMM 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +XCOMM Window System(R) (Version 1.3), released October 19, 1998. This software +XCOMM was created using the OpenGL(R) version 1.2.1 Sample Implementation +XCOMM published by SGI, but has not been independently verified as being +XCOMM compliant with the OpenGL(R) version 1.2.1 Specification. +XCOMM + +#define DoNormalLib NormalLibGlu +#define DoSharedLib SharedLibGlu +#define DoDebugLib DebugLibGlu +#define DoProfileLib ProfileLibGlu + +#define CplusplusSource + +#include + +SRCS = \ + bezierEval.cc \ + bezierPatch.cc \ + bezierPatchMesh.cc \ + glcurveval.cc \ + glinterface.cc \ + glrenderer.cc \ + glsurfeval.cc \ + incurveeval.cc \ + insurfeval.cc + +OBJS = \ + bezierEval.o \ + bezierPatch.o \ + bezierPatchMesh.o \ + glcurveval.o \ + glinterface.o \ + glrenderer.o \ + glsurfeval.o \ + incurveeval.o \ + insurfeval.o + +INCLUDES = \ + -I. \ + -I../internals \ + -I../nurbtess \ + -I../../include \ + -I$(TOP)/include \ + -I$(TOP)/include/GL + +DEFINES = \ + -DLIBRARYBUILD \ + -DNDEBUG + +LibraryObjectRule() + +SubdirLibraryRule($(OBJS)) +NormalLintTarget($(SRCS)) + +GLUSRCDIR = $(OGLSAMPLESRCDIR)/main/gfx/lib/glu + +LinkSourceFile(bezierEval.cc, $(GLUSRCDIR)/libnurbs/interface) +LinkSourceFile(bezierPatch.cc, $(GLUSRCDIR)/libnurbs/interface) +LinkSourceFile(bezierPatchMesh.cc, $(GLUSRCDIR)/libnurbs/interface) +LinkSourceFile(glcurveval.cc, $(GLUSRCDIR)/libnurbs/interface) +LinkSourceFile(glinterface.cc, $(GLUSRCDIR)/libnurbs/interface) +LinkSourceFile(glrenderer.cc, $(GLUSRCDIR)/libnurbs/interface) +LinkSourceFile(glsurfeval.cc, $(GLUSRCDIR)/libnurbs/interface) +LinkSourceFile(incurveeval.cc, $(GLUSRCDIR)/libnurbs/interface) +LinkSourceFile(insurfeval.cc, $(GLUSRCDIR)/libnurbs/interface) + +LinkSourceFile(bezierEval.h, $(GLUSRCDIR)/libnurbs/interface) +LinkSourceFile(bezierPatch.h, $(GLUSRCDIR)/libnurbs/interface) +LinkSourceFile(bezierPatchMesh.h, $(GLUSRCDIR)/libnurbs/interface) +LinkSourceFile(glcurveval.h, $(GLUSRCDIR)/libnurbs/interface) +LinkSourceFile(glimports.h, $(GLUSRCDIR)/libnurbs/interface) +LinkSourceFile(glrenderer.h, $(GLUSRCDIR)/libnurbs/interface) +LinkSourceFile(glsurfeval.h, $(GLUSRCDIR)/libnurbs/interface) +LinkSourceFile(mystdio.h, $(GLUSRCDIR)/libnurbs/interface) +LinkSourceFile(mystdlib.h, $(GLUSRCDIR)/libnurbs/interface) + +DependTarget() +CleanTarget() Index: xc/lib/GLU/libnurbs/internals/Imakefile diff -u /dev/null xc/lib/GLU/libnurbs/internals/Imakefile:1.5 --- /dev/null Mon Jun 4 12:37:42 2001 +++ xc/lib/GLU/libnurbs/internals/Imakefile Sat Apr 7 13:13:26 2001 @@ -0,0 +1,263 @@ +XCOMM $XFree86: xc/lib/GLU/libnurbs/internals/Imakefile,v 1.5 2001/04/07 17:13:26 dawes Exp $ + +XCOMM License Applicability. Except to the extent portions of this file are +XCOMM made subject to an alternative license as permitted in the SGI Free +XCOMM Software License B, Version 1.1 (the "License"), the contents of this +XCOMM file are subject only to the provisions of the License. You may not use +XCOMM this file except in compliance with the License. You may obtain a copy +XCOMM of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +XCOMM Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +XCOMM +XCOMM http://oss.sgi.com/projects/FreeB +XCOMM +XCOMM Note that, as provided in the License, the Software is distributed on an +XCOMM "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +XCOMM DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +XCOMM CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +XCOMM PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +XCOMM +XCOMM Original Code. The Original Code is: OpenGL Sample Implementation, +XCOMM Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +XCOMM Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +XCOMM Copyright in any portions created by third parties is as indicated +XCOMM elsewhere herein. All Rights Reserved. +XCOMM +XCOMM Additional Notice Provisions: The application programming interfaces +XCOMM established by SGI in conjunction with the Original Code are The +XCOMM OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +XCOMM April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +XCOMM 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +XCOMM Window System(R) (Version 1.3), released October 19, 1998. This software +XCOMM was created using the OpenGL(R) version 1.2.1 Sample Implementation +XCOMM published by SGI, but has not been independently verified as being +XCOMM compliant with the OpenGL(R) version 1.2.1 Specification. +XCOMM + +#define DoNormalLib NormalLibGlu +#define DoSharedLib SharedLibGlu +#define DoDebugLib DebugLibGlu +#define DoProfileLib ProfileLibGlu + +#define CplusplusSource + +#include + +SRCS = \ + arc.cc \ + arcsorter.cc \ + arctess.cc \ + backend.cc \ + basiccrveval.cc \ + basicsurfeval.cc \ + bin.cc \ + bufpool.cc \ + cachingeval.cc \ + ccw.cc \ + coveandtiler.cc \ + curve.cc \ + curvelist.cc \ + curvesub.cc \ + dataTransform.cc \ + displaylist.cc \ + flist.cc \ + flistsorter.cc \ + hull.cc \ + intersect.cc \ + knotvector.cc \ + mapdesc.cc \ + mapdescv.cc \ + maplist.cc \ + mesher.cc \ + monoTriangulationBackend.cc \ + monotonizer.cc \ + mycode.cc \ + nurbsinterfac.cc \ + nurbstess.cc \ + patch.cc \ + patchlist.cc \ + quilt.cc \ + reader.cc \ + renderhints.cc \ + slicer.cc \ + sorter.cc \ + splitarcs.cc \ + subdivider.cc \ + tobezier.cc \ + trimline.cc \ + trimregion.cc \ + trimvertpool.cc \ + uarray.cc \ + varray.cc + +OBJS = \ + arc.o \ + arcsorter.o \ + arctess.o \ + backend.o \ + basiccrveval.o \ + basicsurfeval.o \ + bin.o \ + bufpool.o \ + cachingeval.o \ + ccw.o \ + coveandtiler.o \ + curve.o \ + curvelist.o \ + curvesub.o \ + dataTransform.o \ + displaylist.o \ + flist.o \ + flistsorter.o \ + hull.o \ + intersect.o \ + knotvector.o \ + mapdesc.o \ + mapdescv.o \ + maplist.o \ + mesher.o \ + monoTriangulationBackend.o \ + monotonizer.o \ + mycode.o \ + nurbsinterfac.o \ + nurbstess.o \ + patch.o \ + patchlist.o \ + quilt.o \ + reader.o \ + renderhints.o \ + slicer.o \ + sorter.o \ + splitarcs.o \ + subdivider.o \ + tobezier.o \ + trimline.o \ + trimregion.o \ + trimvertpool.o \ + uarray.o \ + varray.o + +INCLUDES = \ + -I../nurbtess \ + -I../../libutil \ + -I../../include \ + -I$(TOP)/include \ + -I$(TOP)/include/GL + +#if SystemV4 +OSDEFINES = -DNEEDCEILF +#else +OSDEFINES = -D_EXTENSIONS_ +#endif + +DEFINES = $(OSDEFINES) \ + -DLIBRARYBUILD \ + -DNDEBUG + +LibraryObjectRule() + +SubdirLibraryRule($(OBJS)) +NormalLintTarget($(SRCS)) + +GLUSRCDIR = $(OGLSAMPLESRCDIR)/main/gfx/lib/glu + +LinkSourceFile(arc.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(arcsorter.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(arctess.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(backend.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(basiccrveval.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(basicsurfeval.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(bin.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(bufpool.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(cachingeval.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(ccw.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(coveandtiler.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(curve.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(curvelist.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(curvesub.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(dataTransform.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(displaylist.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(flist.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(flistsorter.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(hull.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(intersect.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(knotvector.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(mapdesc.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(mapdescv.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(maplist.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(mesher.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(monoTriangulationBackend.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(monotonizer.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(mycode.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(nurbsinterfac.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(nurbstess.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(patch.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(patchlist.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(quilt.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(reader.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(renderhints.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(slicer.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(sorter.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(splitarcs.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(subdivider.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(tobezier.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(trimline.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(trimregion.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(trimvertpool.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(uarray.cc, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(varray.cc, $(GLUSRCDIR)/libnurbs/internals) + +LinkSourceFile(arc.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(arcsorter.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(arctess.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(backend.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(basiccrveval.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(basicsurfeval.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(bezierarc.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(bin.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(bufpool.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(cachingeval.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(coveandtiler.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(curve.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(curvelist.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(dataTransform.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(defines.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(displaylist.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(displaymode.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(flist.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(flistsorter.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(gridline.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(gridtrimvertex.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(gridvertex.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(hull.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(jarcloc.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(knotvector.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(mapdesc.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(maplist.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(mesher.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(monotonizer.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(myassert.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(mymath.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(mysetjmp.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(mystring.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(nurbsconsts.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(nurbstess.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(patch.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(patchlist.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(pwlarc.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(quilt.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(reader.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(renderhints.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(simplemath.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(slicer.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(sorter.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(subdivider.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(trimline.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(trimregion.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(trimvertex.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(trimvertpool.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(types.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(uarray.h, $(GLUSRCDIR)/libnurbs/internals) +LinkSourceFile(varray.h, $(GLUSRCDIR)/libnurbs/internals) + +DependTarget() +CleanTarget() Index: xc/lib/GLU/libnurbs/nurbtess/Imakefile diff -u /dev/null xc/lib/GLU/libnurbs/nurbtess/Imakefile:1.3 --- /dev/null Mon Jun 4 12:37:42 2001 +++ xc/lib/GLU/libnurbs/nurbtess/Imakefile Mon Jan 15 19:39:25 2001 @@ -0,0 +1,150 @@ +XCOMM $XFree86: xc/lib/GLU/libnurbs/nurbtess/Imakefile,v 1.3 2001/01/16 00:39:25 dawes Exp $ + +XCOMM License Applicability. Except to the extent portions of this file are +XCOMM made subject to an alternative license as permitted in the SGI Free +XCOMM Software License B, Version 1.1 (the "License"), the contents of this +XCOMM file are subject only to the provisions of the License. You may not use +XCOMM this file except in compliance with the License. You may obtain a copy +XCOMM of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +XCOMM Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +XCOMM +XCOMM http://oss.sgi.com/projects/FreeB +XCOMM +XCOMM Note that, as provided in the License, the Software is distributed on an +XCOMM "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +XCOMM DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +XCOMM CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +XCOMM PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +XCOMM +XCOMM Original Code. The Original Code is: OpenGL Sample Implementation, +XCOMM Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +XCOMM Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +XCOMM Copyright in any portions created by third parties is as indicated +XCOMM elsewhere herein. All Rights Reserved. +XCOMM +XCOMM Additional Notice Provisions: The application programming interfaces +XCOMM established by SGI in conjunction with the Original Code are The +XCOMM OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +XCOMM April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +XCOMM 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +XCOMM Window System(R) (Version 1.3), released October 19, 1998. This software +XCOMM was created using the OpenGL(R) version 1.2.1 Sample Implementation +XCOMM published by SGI, but has not been independently verified as being +XCOMM compliant with the OpenGL(R) version 1.2.1 Specification. +XCOMM + +#define DoNormalLib NormalLibGlu +#define DoSharedLib SharedLibGlu +#define DoDebugLib DebugLibGlu +#define DoProfileLib ProfileLibGlu + +#define CplusplusSource + +#include + +SRCS = \ + directedLine.cc \ + gridWrap.cc \ + monoChain.cc \ + monoTriangulation.cc \ + partitionX.cc \ + partitionY.cc \ + polyDBG.cc \ + polyUtil.cc \ + primitiveStream.cc \ + quicksort.cc \ + rectBlock.cc \ + sampleComp.cc \ + sampleCompBot.cc \ + sampleCompRight.cc \ + sampleCompTop.cc \ + sampleMonoPoly.cc \ + sampledLine.cc \ + searchTree.cc \ + monoPolyPart.cc + +OBJS = \ + directedLine.o \ + gridWrap.o \ + monoChain.o \ + monoTriangulation.o \ + partitionX.o \ + partitionY.o \ + polyDBG.o \ + polyUtil.o \ + primitiveStream.o \ + quicksort.o \ + rectBlock.o \ + sampleComp.o \ + sampleCompBot.o \ + sampleCompRight.o \ + sampleCompTop.o \ + sampleMonoPoly.o \ + sampledLine.o \ + searchTree.o \ + monoPolyPart.o + +INCLUDES = \ + -I../internals \ + -I../../include \ + -I$(TOP)/include \ + -I$(TOP)/include/GL + +DEFINES = \ + -DLIBRARYBUILD \ + -DNDEBUG + +LibraryObjectRule() + +SubdirLibraryRule($(OBJS)) +NormalLintTarget($(SRCS)) + +GLUSRCDIR = $(OGLSAMPLESRCDIR)/main/gfx/lib/glu + +LinkSourceFile(directedLine.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(gridWrap.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(monoChain.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(monoTriangulation.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(partitionX.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(partitionY.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(polyDBG.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(polyUtil.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(primitiveStream.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(quicksort.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(rectBlock.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(sampleComp.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(sampleCompBot.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(sampleCompRight.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(sampleCompTop.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(sampleMonoPoly.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(sampledLine.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(searchTree.cc, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(monoPolyPart.cc, $(GLUSRCDIR)/libnurbs/nurbtess) + +LinkSourceFile(definitions.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(directedLine.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(glimports.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(gridWrap.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(monoChain.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(monoPolyPart.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(monoTriangulation.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(mystdio.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(mystdlib.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(partitionX.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(partitionY.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(polyDBG.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(polyUtil.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(primitiveStream.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(quicksort.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(rectBlock.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(sampleComp.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(sampleCompBot.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(sampleCompRight.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(sampleCompTop.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(sampleMonoPoly.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(sampledLine.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(searchTree.h, $(GLUSRCDIR)/libnurbs/nurbtess) +LinkSourceFile(zlassert.h, $(GLUSRCDIR)/libnurbs/nurbtess) + +DependTarget() +CleanTarget() Index: xc/lib/GLU/libtess/Imakefile diff -u /dev/null xc/lib/GLU/libtess/Imakefile:1.2 --- /dev/null Mon Jun 4 12:37:42 2001 +++ xc/lib/GLU/libtess/Imakefile Mon Jan 15 19:39:25 2001 @@ -0,0 +1,109 @@ +XCOMM $XFree86: xc/lib/GLU/libtess/Imakefile,v 1.2 2001/01/16 00:39:25 dawes Exp $ + +XCOMM License Applicability. Except to the extent portions of this file are +XCOMM made subject to an alternative license as permitted in the SGI Free +XCOMM Software License B, Version 1.1 (the "License"), the contents of this +XCOMM file are subject only to the provisions of the License. You may not use +XCOMM this file except in compliance with the License. You may obtain a copy +XCOMM of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +XCOMM Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +XCOMM +XCOMM http://oss.sgi.com/projects/FreeB +XCOMM +XCOMM Note that, as provided in the License, the Software is distributed on an +XCOMM "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +XCOMM DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +XCOMM CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +XCOMM PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +XCOMM +XCOMM Original Code. The Original Code is: OpenGL Sample Implementation, +XCOMM Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +XCOMM Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +XCOMM Copyright in any portions created by third parties is as indicated +XCOMM elsewhere herein. All Rights Reserved. +XCOMM +XCOMM Additional Notice Provisions: The application programming interfaces +XCOMM established by SGI in conjunction with the Original Code are The +XCOMM OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +XCOMM April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +XCOMM 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +XCOMM Window System(R) (Version 1.3), released October 19, 1998. This software +XCOMM was created using the OpenGL(R) version 1.2.1 Sample Implementation +XCOMM published by SGI, but has not been independently verified as being +XCOMM compliant with the OpenGL(R) version 1.2.1 Specification. +XCOMM + +#define DoNormalLib NormalLibGlu +#define DoSharedLib SharedLibGlu +#define DoDebugLib DebugLibGlu +#define DoProfileLib ProfileLibGlu + +#include + +SRCS = \ + dict.c \ + geom.c \ + memalloc.c \ + mesh.c \ + normal.c \ + priorityq.c \ + render.c \ + sweep.c \ + tess.c \ + tessmono.c + +OBJS = \ + dict.o \ + geom.o \ + memalloc.o \ + mesh.o \ + normal.o \ + priorityq.o \ + render.o \ + sweep.o \ + tess.o \ + tessmono.o + +INCLUDES = \ + -I../include \ + -I$(TOP)/include \ + -I$(TOP)/include/GL + +DEFINES = \ + -DNDEBUG + +LibraryObjectRule() + +SubdirLibraryRule($(OBJS)) +NormalLintTarget($(SRCS)) + +GLUSRCDIR = $(OGLSAMPLESRCDIR)/main/gfx/lib/glu + +LinkSourceFile(dict.c, $(GLUSRCDIR)/libtess) +LinkSourceFile(geom.c, $(GLUSRCDIR)/libtess) +LinkSourceFile(memalloc.c, $(GLUSRCDIR)/libtess) +LinkSourceFile(mesh.c, $(GLUSRCDIR)/libtess) +LinkSourceFile(normal.c, $(GLUSRCDIR)/libtess) +LinkSourceFile(priorityq-heap.c, $(GLUSRCDIR)/libtess) +LinkSourceFile(priorityq.c, $(GLUSRCDIR)/libtess) +LinkSourceFile(render.c, $(GLUSRCDIR)/libtess) +LinkSourceFile(sweep.c, $(GLUSRCDIR)/libtess) +LinkSourceFile(tess.c, $(GLUSRCDIR)/libtess) +LinkSourceFile(tessmono.c, $(GLUSRCDIR)/libtess) + +LinkSourceFile(dict-list.h, $(GLUSRCDIR)/libtess) +LinkSourceFile(dict.h, $(GLUSRCDIR)/libtess) +LinkSourceFile(geom.h, $(GLUSRCDIR)/libtess) +LinkSourceFile(memalloc.h, $(GLUSRCDIR)/libtess) +LinkSourceFile(mesh.h, $(GLUSRCDIR)/libtess) +LinkSourceFile(normal.h, $(GLUSRCDIR)/libtess) +LinkSourceFile(priorityq-heap.h, $(GLUSRCDIR)/libtess) +LinkSourceFile(priorityq-sort.h, $(GLUSRCDIR)/libtess) +LinkSourceFile(priorityq.h, $(GLUSRCDIR)/libtess) +LinkSourceFile(render.h, $(GLUSRCDIR)/libtess) +LinkSourceFile(sweep.h, $(GLUSRCDIR)/libtess) +LinkSourceFile(tess.h, $(GLUSRCDIR)/libtess) +LinkSourceFile(tessmono.h, $(GLUSRCDIR)/libtess) + +DependTarget() +CleanTarget() Index: xc/lib/GLU/libutil/Imakefile diff -u /dev/null xc/lib/GLU/libutil/Imakefile:1.2 --- /dev/null Mon Jun 4 12:37:43 2001 +++ xc/lib/GLU/libutil/Imakefile Mon Jan 15 19:39:26 2001 @@ -0,0 +1,84 @@ +XCOMM $XFree86: xc/lib/GLU/libutil/Imakefile,v 1.2 2001/01/16 00:39:26 dawes Exp $ + +XCOMM License Applicability. Except to the extent portions of this file are +XCOMM made subject to an alternative license as permitted in the SGI Free +XCOMM Software License B, Version 1.1 (the "License"), the contents of this +XCOMM file are subject only to the provisions of the License. You may not use +XCOMM this file except in compliance with the License. You may obtain a copy +XCOMM of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +XCOMM Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +XCOMM +XCOMM http://oss.sgi.com/projects/FreeB +XCOMM +XCOMM Note that, as provided in the License, the Software is distributed on an +XCOMM "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +XCOMM DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +XCOMM CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +XCOMM PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +XCOMM +XCOMM Original Code. The Original Code is: OpenGL Sample Implementation, +XCOMM Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +XCOMM Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +XCOMM Copyright in any portions created by third parties is as indicated +XCOMM elsewhere herein. All Rights Reserved. +XCOMM +XCOMM Additional Notice Provisions: The application programming interfaces +XCOMM established by SGI in conjunction with the Original Code are The +XCOMM OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +XCOMM April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +XCOMM 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +XCOMM Window System(R) (Version 1.3), released October 19, 1998. This software +XCOMM was created using the OpenGL(R) version 1.2.1 Sample Implementation +XCOMM published by SGI, but has not been independently verified as being +XCOMM compliant with the OpenGL(R) version 1.2.1 Specification. +XCOMM + +#define DoNormalLib NormalLibGlu +#define DoSharedLib SharedLibGlu +#define DoDebugLib DebugLibGlu +#define DoProfileLib ProfileLibGlu + +#include + +SRCS = \ + error.c \ + glue.c \ + mipmap.c \ + project.c \ + quad.c \ + registry.c + +OBJS = \ + error.o \ + glue.o \ + mipmap.o \ + project.o \ + quad.o \ + registry.o + +INCLUDES = \ + -I../include \ + -I$(TOP)/include \ + -I$(TOP)/include/GL + +DEFINES = \ + -DNDEBUG + +LibraryObjectRule() + +SubdirLibraryRule($(OBJS)) +NormalLintTarget($(SRCS)) + +GLUSRCDIR = $(OGLSAMPLESRCDIR)/main/gfx/lib/glu + +LinkSourceFile(error.c, $(GLUSRCDIR)/libutil) +LinkSourceFile(glue.c, $(GLUSRCDIR)/libutil) +LinkSourceFile(mipmap.c, $(GLUSRCDIR)/libutil) +LinkSourceFile(project.c, $(GLUSRCDIR)/libutil) +LinkSourceFile(quad.c, $(GLUSRCDIR)/libutil) +LinkSourceFile(registry.c, $(GLUSRCDIR)/libutil) + +LinkSourceFile(gluint.h, $(GLUSRCDIR)/libutil) + +DependTarget() +CleanTarget() Index: xc/lib/ICE/ICE-def.cpp diff -u xc/lib/ICE/ICE-def.cpp:1.3 xc/lib/ICE/ICE-def.cpp:1.5 --- xc/lib/ICE/ICE-def.cpp:1.3 Wed Aug 9 19:40:12 2000 +++ xc/lib/ICE/ICE-def.cpp Wed Apr 18 12:13:18 2001 @@ -62,5 +62,13 @@ _IceWrite IceListenForWellKnownConnections _IceTransGetHostname -/* $TOG: ICE-def.cpp /main/7 1998/01/04 12:31:53 kaleb $ */ -/* $XFree86: xc/lib/ICE/ICE-def.cpp,v 1.3 2000/08/09 23:40:12 dawes Exp $ */ + _IceTransSetOption + _IceTransConnect + _IceTransClose + _IceTransOpenCOTSClient + _IceTransGetConnectionNumber + _IceTransRead + _IceTransWrite + +/* $Xorg: ICE-def.cpp,v 1.3 2000/08/21 16:42:31 coskrey Exp $ */ +/* $XFree86: xc/lib/ICE/ICE-def.cpp,v 1.5 2001/04/18 16:13:18 dawes Exp $ */ Index: xc/lib/ICE/ICE.h diff -u xc/lib/ICE/ICE.h:1.1.1.2 xc/lib/ICE/ICE.h:1.1.1.3 --- xc/lib/ICE/ICE.h:1.1.1.2 Sun Sep 27 03:51:59 1998 +++ xc/lib/ICE/ICE.h Tue Jan 16 17:05:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: ICE.h /main/7 1998/02/06 13:56:58 kaleb $ */ +/* $Xorg: ICE.h,v 1.3 2000/08/17 19:44:08 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/ICE/ICEconn.h diff -u xc/lib/ICE/ICEconn.h:1.1.1.2 xc/lib/ICE/ICEconn.h:1.1.1.3 --- xc/lib/ICE/ICEconn.h:1.1.1.2 Sun Sep 27 03:51:59 1998 +++ xc/lib/ICE/ICEconn.h Tue Jan 16 17:05:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: ICEconn.h /main/5 1998/02/06 13:56:22 kaleb $ */ +/* $Xorg: ICEconn.h,v 1.4 2000/08/17 19:44:10 cpqbld Exp $ */ /****************************************************************************** @@ -25,6 +25,8 @@ #ifndef _ICECONN_H_ #define _ICECONN_H_ + +#include /* * Data structures for ICE connection object Index: xc/lib/ICE/ICElib.h diff -u xc/lib/ICE/ICElib.h:3.2 xc/lib/ICE/ICElib.h:3.3 --- xc/lib/ICE/ICElib.h:3.2 Sat Oct 3 04:41:09 1998 +++ xc/lib/ICE/ICElib.h Wed Jan 17 14:41:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: ICElib.h /main/42 1998/02/06 13:56:32 kaleb $ */ +/* $Xorg: ICElib.h,v 1.4 2000/08/17 19:44:10 cpqbld Exp $ */ /****************************************************************************** @@ -22,7 +22,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/ICElib.h,v 3.2 1998/10/03 08:41:09 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/ICElib.h,v 3.3 2001/01/17 19:41:29 dawes Exp $ */ #ifndef _ICELIB_H_ #define _ICELIB_H_ Index: xc/lib/ICE/ICElibint.h diff -u xc/lib/ICE/ICElibint.h:1.3 xc/lib/ICE/ICElibint.h:1.4 --- xc/lib/ICE/ICElibint.h:1.3 Sat Jun 17 14:23:22 2000 +++ xc/lib/ICE/ICElibint.h Wed Jan 17 14:41:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: ICElibint.h /main/43 1998/02/06 13:56:27 kaleb $ */ +/* $Xorg: ICElibint.h,v 1.3 2000/08/17 19:44:10 cpqbld Exp $ */ /****************************************************************************** @@ -22,7 +22,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/ICElibint.h,v 1.3 2000/06/17 18:23:22 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/ICElibint.h,v 1.4 2001/01/17 19:41:29 dawes Exp $ */ #ifndef _ICELIBINT_H_ #define _ICELIBINT_H_ Index: xc/lib/ICE/ICEmsg.h diff -u xc/lib/ICE/ICEmsg.h:1.1.1.2 xc/lib/ICE/ICEmsg.h:1.1.1.3 --- xc/lib/ICE/ICEmsg.h:1.1.1.2 Sun Sep 27 03:52:01 1998 +++ xc/lib/ICE/ICEmsg.h Tue Jan 16 17:05:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: ICEmsg.h /main/6 1998/02/06 13:56:38 kaleb $ */ +/* $Xorg: ICEmsg.h,v 1.3 2000/08/17 19:44:10 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/ICE/ICEproto.h diff -u xc/lib/ICE/ICEproto.h:1.1.1.2 xc/lib/ICE/ICEproto.h:1.1.1.3 --- xc/lib/ICE/ICEproto.h:1.1.1.2 Sun Sep 27 03:52:01 1998 +++ xc/lib/ICE/ICEproto.h Tue Jan 16 17:05:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: ICEproto.h /main/8 1998/02/06 13:56:44 kaleb $ */ +/* $Xorg: ICEproto.h,v 1.4 2000/08/17 19:44:11 cpqbld Exp $ */ /****************************************************************************** @@ -25,6 +25,8 @@ #ifndef _ICEPROTO_H_ #define _ICEPROTO_H_ + +#include typedef struct { CARD8 majorOpcode; Index: xc/lib/ICE/ICEutil.h diff -u xc/lib/ICE/ICEutil.h:1.1.1.2 xc/lib/ICE/ICEutil.h:1.1.1.3 --- xc/lib/ICE/ICEutil.h:1.1.1.2 Sun Sep 27 03:52:02 1998 +++ xc/lib/ICE/ICEutil.h Tue Jan 16 17:05:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: ICEutil.h /main/6 1998/02/06 13:56:49 kaleb $ */ +/* $Xorg: ICEutil.h,v 1.4 2000/08/17 19:44:11 cpqbld Exp $ */ /****************************************************************************** @@ -27,6 +27,7 @@ #define _ICEUTIL_H_ #include +#include /* * Data structure for entry in ICE authority file Index: xc/lib/ICE/Imakefile diff -u xc/lib/ICE/Imakefile:3.3 xc/lib/ICE/Imakefile:3.5 --- xc/lib/ICE/Imakefile:3.3 Sun Dec 20 06:56:49 1998 +++ xc/lib/ICE/Imakefile Mon Apr 23 12:17:06 2001 @@ -1,6 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/21 1996/11/29 13:30:33 swick $ -XCOMM $XFree86: xc/lib/ICE/Imakefile,v 3.3 1998/12/20 11:56:49 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:44:11 cpqbld Exp $ + + + +XCOMM $XFree86: xc/lib/ICE/Imakefile,v 3.5 2001/04/23 16:17:06 tsi Exp $ + #define DoNormalLib NormalLibICE #define DoSharedLib SharedLibICE #define DoExtraLib SharedLibICE @@ -30,7 +34,7 @@ SOCK_DEFINES = -DBSD44SOCKETS #endif -DEPEND_DEFINES = $(TRANS_INCLUDES) $(CONN_DEFINES) +DEPEND_DEFINES = $(TRANS_INCLUDES) $(CONN_DEFINES) DependDefines HEADERS = ICE.h \ ICEconn.h \ Index: xc/lib/ICE/accept.c diff -u xc/lib/ICE/accept.c:1.1.1.3 xc/lib/ICE/accept.c:1.1.1.4 --- xc/lib/ICE/accept.c:1.1.1.3 Sun Sep 27 03:52:02 1998 +++ xc/lib/ICE/accept.c Tue Jan 16 17:05:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: accept.c /main/25 1998/02/06 13:55:44 kaleb $ */ +/* $Xorg: accept.c,v 1.3 2000/08/17 19:44:12 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/ICE/authutil.c diff -u xc/lib/ICE/authutil.c:3.5 xc/lib/ICE/authutil.c:3.6 --- xc/lib/ICE/authutil.c:3.5 Sun May 23 02:33:23 1999 +++ xc/lib/ICE/authutil.c Wed Jan 17 14:41:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: authutil.c /main/18 1998/02/06 13:55:51 kaleb $ */ +/* $Xorg: authutil.c,v 1.4 2000/08/17 19:44:12 cpqbld Exp $ */ /****************************************************************************** @@ -22,7 +22,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/authutil.c,v 3.5 1999/05/23 06:33:23 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/authutil.c,v 3.6 2001/01/17 19:41:29 dawes Exp $ */ #include #include "ICElibint.h" Index: xc/lib/ICE/connect.c diff -u xc/lib/ICE/connect.c:3.5 xc/lib/ICE/connect.c:3.6 --- xc/lib/ICE/connect.c:3.5 Sun Mar 21 02:34:27 1999 +++ xc/lib/ICE/connect.c Wed Jan 17 14:41:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: connect.c /main/34 1998/05/29 14:30:51 kaleb $ */ +/* $Xorg: connect.c,v 1.3 2000/08/17 19:44:12 cpqbld Exp $ */ /****************************************************************************** @@ -22,7 +22,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/connect.c,v 3.5 1999/03/21 07:34:27 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/connect.c,v 3.6 2001/01/17 19:41:29 dawes Exp $ */ #include #include "ICElibint.h" Index: xc/lib/ICE/error.c diff -u xc/lib/ICE/error.c:1.2 xc/lib/ICE/error.c:1.3 --- xc/lib/ICE/error.c:1.2 Sun May 23 02:33:23 1999 +++ xc/lib/ICE/error.c Wed Jan 17 14:41:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: error.c /main/17 1998/02/06 13:56:02 kaleb $ */ +/* $Xorg: error.c,v 1.3 2000/08/17 19:44:13 cpqbld Exp $ */ /****************************************************************************** @@ -22,7 +22,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/error.c,v 1.2 1999/05/23 06:33:23 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/error.c,v 1.3 2001/01/17 19:41:29 dawes Exp $ */ #include #include "ICElibint.h" Index: xc/lib/ICE/getauth.c diff -u xc/lib/ICE/getauth.c:1.1.1.2 xc/lib/ICE/getauth.c:1.1.1.3 --- xc/lib/ICE/getauth.c:1.1.1.2 Sun Sep 27 03:52:05 1998 +++ xc/lib/ICE/getauth.c Tue Jan 16 17:06:00 2001 @@ -1,4 +1,4 @@ -/* $TOG: getauth.c /main/9 1998/02/06 13:56:07 kaleb $ */ +/* $Xorg: getauth.c,v 1.3 2000/08/17 19:44:14 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/ICE/globals.h diff -u xc/lib/ICE/globals.h:1.2 xc/lib/ICE/globals.h:1.3 --- xc/lib/ICE/globals.h:1.2 Sun Dec 20 06:56:49 1998 +++ xc/lib/ICE/globals.h Wed Jan 17 14:41:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: globals.h /main/15 1998/02/06 13:56:12 kaleb $ */ +/* $Xorg: globals.h,v 1.3 2000/08/17 19:44:14 cpqbld Exp $ */ /****************************************************************************** @@ -22,7 +22,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/globals.h,v 1.2 1998/12/20 11:56:49 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/globals.h,v 1.3 2001/01/17 19:41:29 dawes Exp $ */ extern void _IceDefaultErrorHandler (); extern void _IceDefaultIOErrorHandler (); Index: xc/lib/ICE/iceauth.c diff -u xc/lib/ICE/iceauth.c:3.2 xc/lib/ICE/iceauth.c:3.3 --- xc/lib/ICE/iceauth.c:3.2 Sat Oct 3 04:41:09 1998 +++ xc/lib/ICE/iceauth.c Wed Jan 17 14:41:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: iceauth.c /main/22 1998/02/06 13:56:17 kaleb $ */ +/* $Xorg: iceauth.c,v 1.3 2000/08/17 19:44:15 cpqbld Exp $ */ /****************************************************************************** @@ -22,7 +22,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/iceauth.c,v 3.2 1998/10/03 08:41:09 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/iceauth.c,v 3.3 2001/01/17 19:41:29 dawes Exp $ */ #include #include "ICElibint.h" Index: xc/lib/ICE/listen.c diff -u xc/lib/ICE/listen.c:1.1.1.3 xc/lib/ICE/listen.c:1.1.1.4 --- xc/lib/ICE/listen.c:1.1.1.3 Sun Sep 27 03:52:06 1998 +++ xc/lib/ICE/listen.c Tue Jan 16 17:06:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: listen.c /main/16 1998/02/06 13:57:14 kaleb $ */ +/* $Xorg: listen.c,v 1.4 2000/08/17 19:44:15 cpqbld Exp $ */ /****************************************************************************** @@ -40,7 +40,7 @@ { struct _IceListenObj *listenObjs; char *networkId; - int fd, transCount, partial, i, j; + int transCount, partial, i, j; Status status = 1; XtransConnInfo *transConns = NULL; Index: xc/lib/ICE/listenwk.c diff -u xc/lib/ICE/listenwk.c:1.2 xc/lib/ICE/listenwk.c:1.3 --- xc/lib/ICE/listenwk.c:1.2 Sun May 23 02:33:24 1999 +++ xc/lib/ICE/listenwk.c Wed Jan 17 14:41:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: listenwk.c /main/5 1998/02/09 08:30:39 barstow $ */ +/* $Xorg: listenwk.c,v 1.4 2000/08/17 19:44:15 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/ICE/listenwk.c,v 1.2 1999/05/23 06:33:24 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/listenwk.c,v 1.3 2001/01/17 19:41:29 dawes Exp $ */ /* Author: Ralph Mor, X Consortium */ Index: xc/lib/ICE/locking.c diff -u xc/lib/ICE/locking.c:1.1.1.2 xc/lib/ICE/locking.c:1.1.1.3 --- xc/lib/ICE/locking.c:1.1.1.2 Sun Sep 27 03:52:07 1998 +++ xc/lib/ICE/locking.c Tue Jan 16 17:06:03 2001 @@ -1,4 +1,4 @@ -/* $TOG: locking.c /main/5 1998/02/06 13:57:19 kaleb $ */ +/* $Xorg: locking.c,v 1.3 2000/08/17 19:44:15 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/ICE/misc.c diff -u xc/lib/ICE/misc.c:1.2 xc/lib/ICE/misc.c:1.3 --- xc/lib/ICE/misc.c:1.2 Sun May 23 02:33:24 1999 +++ xc/lib/ICE/misc.c Wed Jan 17 14:41:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: misc.c /main/30 1998/02/06 13:57:24 kaleb $ */ +/* $Xorg: misc.c,v 1.3 2000/08/17 19:44:15 cpqbld Exp $ */ /****************************************************************************** @@ -22,7 +22,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/misc.c,v 1.2 1999/05/23 06:33:24 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/misc.c,v 1.3 2001/01/17 19:41:29 dawes Exp $ */ #ifdef WIN32 #define _WILLWINSOCK_ Index: xc/lib/ICE/ping.c diff -u xc/lib/ICE/ping.c:1.1.1.2 xc/lib/ICE/ping.c:1.1.1.3 --- xc/lib/ICE/ping.c:1.1.1.2 Sun Sep 27 03:52:08 1998 +++ xc/lib/ICE/ping.c Tue Jan 16 17:06:04 2001 @@ -1,4 +1,4 @@ -/* $TOG: ping.c /main/9 1998/02/06 13:57:29 kaleb $ */ +/* $Xorg: ping.c,v 1.3 2000/08/17 19:44:15 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/ICE/process.c diff -u xc/lib/ICE/process.c:3.4 xc/lib/ICE/process.c:3.5 --- xc/lib/ICE/process.c:3.4 Sat Jun 17 13:44:18 2000 +++ xc/lib/ICE/process.c Wed Jan 17 14:41:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: process.c /main/44 1998/02/06 13:57:34 kaleb $ */ +/* $Xorg: process.c,v 1.3 2000/08/17 19:44:16 cpqbld Exp $ */ /****************************************************************************** @@ -22,7 +22,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/process.c,v 3.4 2000/06/17 17:44:18 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/process.c,v 3.5 2001/01/17 19:41:29 dawes Exp $ */ #include #include "ICElibint.h" Index: xc/lib/ICE/protosetup.c diff -u xc/lib/ICE/protosetup.c:1.1.1.2 xc/lib/ICE/protosetup.c:1.1.1.3 --- xc/lib/ICE/protosetup.c:1.1.1.2 Sun Sep 27 03:52:09 1998 +++ xc/lib/ICE/protosetup.c Tue Jan 16 17:06:07 2001 @@ -1,4 +1,4 @@ -/* $TOG: protosetup.c /main/20 1998/02/06 13:57:43 kaleb $ */ +/* $Xorg: protosetup.c,v 1.3 2000/08/17 19:44:17 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/ICE/register.c diff -u xc/lib/ICE/register.c:1.1.1.2 xc/lib/ICE/register.c:1.1.1.3 --- xc/lib/ICE/register.c:1.1.1.2 Sun Sep 27 03:52:09 1998 +++ xc/lib/ICE/register.c Tue Jan 16 17:06:08 2001 @@ -1,4 +1,4 @@ -/* $TOG: register.c /main/14 1998/02/06 13:57:48 kaleb $ */ +/* $Xorg: register.c,v 1.3 2000/08/17 19:44:18 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/ICE/replywait.c diff -u xc/lib/ICE/replywait.c:1.1.1.2 xc/lib/ICE/replywait.c:1.1.1.3 --- xc/lib/ICE/replywait.c:1.1.1.2 Sun Sep 27 03:52:10 1998 +++ xc/lib/ICE/replywait.c Tue Jan 16 17:06:09 2001 @@ -1,4 +1,4 @@ -/* $TOG: replywait.c /main/5 1998/02/06 13:57:54 kaleb $ */ +/* $Xorg: replywait.c,v 1.3 2000/08/17 19:44:18 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/ICE/setauth.c diff -u xc/lib/ICE/setauth.c:1.2 xc/lib/ICE/setauth.c:1.3 --- xc/lib/ICE/setauth.c:1.2 Sun Dec 20 06:56:50 1998 +++ xc/lib/ICE/setauth.c Wed Jan 17 14:41:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: setauth.c /main/9 1998/02/06 13:57:59 kaleb $ */ +/* $Xorg: setauth.c,v 1.3 2000/08/17 19:44:18 cpqbld Exp $ */ /****************************************************************************** @@ -22,7 +22,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/setauth.c,v 1.2 1998/12/20 11:56:50 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/setauth.c,v 1.3 2001/01/17 19:41:29 dawes Exp $ */ #include #include "ICElibint.h" Index: xc/lib/ICE/shutdown.c diff -u xc/lib/ICE/shutdown.c:3.1 xc/lib/ICE/shutdown.c:3.2 --- xc/lib/ICE/shutdown.c:3.1 Sat Oct 3 04:41:11 1998 +++ xc/lib/ICE/shutdown.c Wed Jan 17 14:41:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: shutdown.c /main/18 1998/02/06 13:58:05 kaleb $ */ +/* $Xorg: shutdown.c,v 1.3 2000/08/17 19:44:18 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/ICE/watch.c diff -u xc/lib/ICE/watch.c:1.1.1.2 xc/lib/ICE/watch.c:1.1.1.3 --- xc/lib/ICE/watch.c:1.1.1.2 Sun Sep 27 03:52:11 1998 +++ xc/lib/ICE/watch.c Tue Jan 16 17:06:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: watch.c /main/7 1998/02/06 13:58:11 kaleb $ */ +/* $Xorg: watch.c,v 1.3 2000/08/17 19:44:19 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/PEX5/Imakefile diff -u xc/lib/PEX5/Imakefile:1.3 xc/lib/PEX5/Imakefile:1.4 --- xc/lib/PEX5/Imakefile:1.3 Sun Dec 20 06:56:51 1998 +++ xc/lib/PEX5/Imakefile Wed Jan 17 14:41:30 2001 @@ -1,5 +1,9 @@ -XCOMM $XConsortium: Imakefile /main/18 1996/09/28 16:33:26 rws $ -XCOMM $XFree86: xc/lib/PEX5/Imakefile,v 1.3 1998/12/20 11:56:51 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:44:20 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/PEX5/Imakefile,v 1.4 2001/01/17 19:41:30 dawes Exp $ #define DoNormalLib NormalLibPex #define DoSharedLib SharedLibPex Index: xc/lib/PEX5/PEX.h diff -u xc/lib/PEX5/PEX.h:1.1.1.1 xc/lib/PEX5/PEX.h:1.1.1.2 --- xc/lib/PEX5/PEX.h:1.1.1.1 Wed Apr 27 03:11:56 1994 +++ xc/lib/PEX5/PEX.h Tue Jan 16 17:06:15 2001 @@ -1,7 +1,7 @@ #ifndef _PEX_H_ #define _PEX_H_ -/* $XConsortium: PEX.h,v 1.8 94/03/18 10:37:25 mor Exp $ */ +/* $Xorg: PEX.h,v 1.3 2000/08/17 19:44:20 cpqbld Exp $ */ /******************************************************************************/ /* Copyright 1987,1991 by Digital Equipment Corporation, Maynard, Mass. */ Index: xc/lib/PEX5/PEX5-def.cpp diff -u xc/lib/PEX5/PEX5-def.cpp:1.1.1.2 xc/lib/PEX5/PEX5-def.cpp:1.1.1.3 --- xc/lib/PEX5/PEX5-def.cpp:1.1.1.2 Sat Dec 21 22:28:27 1996 +++ xc/lib/PEX5/PEX5-def.cpp Tue Jan 16 17:06:18 2001 @@ -280,4 +280,4 @@ PEXViewOrientationMatrix2D PEXXCToNPCTransform PEXXCToNPCTransform2D -/* $XConsortium: PEX5-def.cpp /main/2 1996/05/07 13:15:18 kaleb $ */ +/* $Xorg: PEX5-def.cpp,v 1.3 2000/08/17 19:44:20 cpqbld Exp $ */ Index: xc/lib/PEX5/PEXlib.h diff -u xc/lib/PEX5/PEXlib.h:1.1.1.1 xc/lib/PEX5/PEXlib.h:1.1.1.2 --- xc/lib/PEX5/PEXlib.h:1.1.1.1 Wed Apr 27 03:11:56 1994 +++ xc/lib/PEX5/PEXlib.h Tue Jan 16 17:06:18 2001 @@ -1,7 +1,7 @@ #ifndef _PEXLIB_H_ #define _PEXLIB_H_ -/* $XConsortium: PEXlib.h,v 1.11 94/04/01 18:46:54 rws Exp $ */ +/* $Xorg: PEXlib.h,v 1.3 2000/08/17 19:44:20 cpqbld Exp $ */ /******************************************************************************/ /* Copyright 1987,1991 by Digital Equipment Corporation, Maynard, Mass. */ Index: xc/lib/PEX5/PEXlibint.h diff -u xc/lib/PEX5/PEXlibint.h:3.1 xc/lib/PEX5/PEXlibint.h:3.2 --- xc/lib/PEX5/PEXlibint.h:3.1 Sat Oct 3 04:41:12 1998 +++ xc/lib/PEX5/PEXlibint.h Wed Jan 17 14:41:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: PEXlibint.h /main/19 1998/02/06 16:09:05 kaleb $ */ +/* $Xorg: PEXlibint.h,v 1.4 2000/08/17 19:44:20 cpqbld Exp $ */ /****************************************************************************** @@ -133,7 +133,7 @@ #define PEXGetDisplayInfo(_display, _info) \ \ { \ - if (_info = PEXDisplayInfoHeader) \ + if ((_info = PEXDisplayInfoHeader)) \ { \ if (PEXDisplayInfoHeader->display != _display) \ { \ Index: xc/lib/PEX5/PEXproto.h diff -u xc/lib/PEX5/PEXproto.h:1.1.1.2 xc/lib/PEX5/PEXproto.h:1.1.1.3 --- xc/lib/PEX5/PEXproto.h:1.1.1.2 Sun Sep 27 03:58:34 1998 +++ xc/lib/PEX5/PEXproto.h Tue Jan 16 17:06:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: PEXproto.h /main/10 1998/02/06 16:09:31 kaleb $ */ +/* $Xorg: PEXproto.h,v 1.3 2000/08/17 19:44:21 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/PEX5/PEXprotost.h diff -u xc/lib/PEX5/PEXprotost.h:1.1.1.2 xc/lib/PEX5/PEXprotost.h:1.1.1.3 --- xc/lib/PEX5/PEXprotost.h:1.1.1.2 Sun Sep 27 03:58:35 1998 +++ xc/lib/PEX5/PEXprotost.h Tue Jan 16 17:06:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: PEXprotost.h /main/8 1998/02/06 16:09:26 kaleb $ */ +/* $Xorg: PEXprotost.h,v 1.3 2000/08/17 19:44:21 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/PEX5/jump_funcs diff -u xc/lib/PEX5/jump_funcs:3.1 xc/lib/PEX5/jump_funcs:3.2 --- xc/lib/PEX5/jump_funcs:3.1 Sat Jan 28 10:42:19 1995 +++ xc/lib/PEX5/jump_funcs Wed Jan 17 14:41:30 2001 @@ -1,5 +1,8 @@ -# $XConsortium: jump_funcs,v 1.2 94/12/07 10:48:56 kaleb Exp $ -# $XFree86: xc/lib/PEX5/jump_funcs,v 3.1 1995/01/28 15:42:19 dawes Exp $ +# $Xorg: jump_funcs,v 1.3 2000/08/17 19:44:21 cpqbld Exp $ +# +# +# +# $XFree86: xc/lib/PEX5/jump_funcs,v 3.2 2001/01/17 19:41:30 dawes Exp $ # 00000000 T _PEXEscape libPEX5 pl_escape 00000000 T _PEXEscapeWithReply libPEX5 pl_escape Index: xc/lib/PEX5/jump_ignore diff -u xc/lib/PEX5/jump_ignore:3.1 xc/lib/PEX5/jump_ignore:3.2 --- xc/lib/PEX5/jump_ignore:3.1 Sat Jan 28 10:42:20 1995 +++ xc/lib/PEX5/jump_ignore Wed Jan 17 14:41:30 2001 @@ -1,3 +1,6 @@ -# $XConsortium: jump_ignore,v 1.2 94/12/07 10:48:56 kaleb Exp $ -# $XFree86: xc/lib/PEX5/jump_ignore,v 3.1 1995/01/28 15:42:20 dawes Exp $ +# $Xorg: jump_ignore,v 1.3 2000/08/17 19:44:21 cpqbld Exp $ +# +# +# +# $XFree86: xc/lib/PEX5/jump_ignore,v 3.2 2001/01/17 19:41:30 dawes Exp $ # jump_ignore Index: xc/lib/PEX5/jump_vars diff -u xc/lib/PEX5/jump_vars:3.1 xc/lib/PEX5/jump_vars:3.2 --- xc/lib/PEX5/jump_vars:3.1 Sat Jan 28 10:42:22 1995 +++ xc/lib/PEX5/jump_vars Wed Jan 17 14:41:30 2001 @@ -1,5 +1,8 @@ -# $XConsortium: jump_vars,v 1.2 94/12/07 10:48:56 kaleb Exp $ -# $XFree86: xc/lib/PEX5/jump_vars,v 3.1 1995/01/28 15:42:22 dawes Exp $ +# $Xorg: jump_vars,v 1.3 2000/08/17 19:44:21 cpqbld Exp $ +# +# +# +# $XFree86: xc/lib/PEX5/jump_vars,v 3.2 2001/01/17 19:41:30 dawes Exp $ # 00000004 D _PEXDisplayInfoHeader libPEX5 pl_startup 00000004 D _PEXPickCache libPEX5 pl_startup Index: xc/lib/PEX5/pl_convert.c diff -u xc/lib/PEX5/pl_convert.c:1.1.1.2 xc/lib/PEX5/pl_convert.c:1.1.1.3 --- xc/lib/PEX5/pl_convert.c:1.1.1.2 Sun Sep 27 03:58:36 1998 +++ xc/lib/PEX5/pl_convert.c Tue Jan 16 17:06:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_convert.c /main/3 1998/02/06 16:09:48 kaleb $ */ +/* $Xorg: pl_convert.c,v 1.3 2000/08/17 19:44:22 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/PEX5/pl_convert.h diff -u xc/lib/PEX5/pl_convert.h:1.1.1.2 xc/lib/PEX5/pl_convert.h:1.1.1.3 --- xc/lib/PEX5/pl_convert.h:1.1.1.2 Sun Sep 27 03:58:36 1998 +++ xc/lib/PEX5/pl_convert.h Tue Jan 16 17:06:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_convert.h /main/4 1998/02/06 16:09:53 kaleb $ */ +/* $Xorg: pl_convert.h,v 1.3 2000/08/17 19:44:22 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/PEX5/pl_escape.c diff -u xc/lib/PEX5/pl_escape.c:1.1.1.2 xc/lib/PEX5/pl_escape.c:1.1.1.3 --- xc/lib/PEX5/pl_escape.c:1.1.1.2 Sun Sep 27 03:58:37 1998 +++ xc/lib/PEX5/pl_escape.c Tue Jan 16 17:06:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_escape.c /main/11 1998/02/06 16:09:59 kaleb $ */ +/* $Xorg: pl_escape.c,v 1.3 2000/08/17 19:44:23 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/PEX5/pl_extract.h diff -u xc/lib/PEX5/pl_extract.h:3.1 xc/lib/PEX5/pl_extract.h:3.2 --- xc/lib/PEX5/pl_extract.h:3.1 Sat Oct 3 04:41:12 1998 +++ xc/lib/PEX5/pl_extract.h Wed Jan 17 14:41:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_extract.h /main/6 1998/02/06 16:10:05 kaleb $ */ +/* $Xorg: pl_extract.h,v 1.3 2000/08/17 19:44:23 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/PEX5/pl_font.c diff -u xc/lib/PEX5/pl_font.c:1.1.1.2 xc/lib/PEX5/pl_font.c:1.1.1.3 --- xc/lib/PEX5/pl_font.c:1.1.1.2 Sun Sep 27 03:58:38 1998 +++ xc/lib/PEX5/pl_font.c Tue Jan 16 17:06:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_font.c /main/13 1998/02/06 16:10:11 kaleb $ */ +/* $Xorg: pl_font.c,v 1.3 2000/08/17 19:44:23 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/PEX5/pl_free.c diff -u xc/lib/PEX5/pl_free.c:1.1.1.2 xc/lib/PEX5/pl_free.c:1.1.1.3 --- xc/lib/PEX5/pl_free.c:1.1.1.2 Sun Sep 27 03:58:38 1998 +++ xc/lib/PEX5/pl_free.c Tue Jan 16 17:06:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_free.c /main/11 1998/02/06 16:10:16 kaleb $ */ +/* $Xorg: pl_free.c,v 1.3 2000/08/17 19:44:23 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/PEX5/pl_global.h diff -u xc/lib/PEX5/pl_global.h:1.1.1.2 xc/lib/PEX5/pl_global.h:1.1.1.3 --- xc/lib/PEX5/pl_global.h:1.1.1.2 Sun Sep 27 03:58:39 1998 +++ xc/lib/PEX5/pl_global.h Tue Jan 16 17:06:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_global.h /main/9 1998/02/06 16:10:22 kaleb $ */ +/* $Xorg: pl_global.h,v 1.3 2000/08/17 19:44:23 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/PEX5/pl_lut.c diff -u xc/lib/PEX5/pl_lut.c:1.1.1.2 xc/lib/PEX5/pl_lut.c:1.1.1.3 --- xc/lib/PEX5/pl_lut.c:1.1.1.2 Sun Sep 27 03:58:39 1998 +++ xc/lib/PEX5/pl_lut.c Tue Jan 16 17:06:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_lut.c /main/13 1998/02/06 16:10:27 kaleb $ */ +/* $Xorg: pl_lut.c,v 1.3 2000/08/17 19:44:24 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/PEX5/pl_lut.h diff -u xc/lib/PEX5/pl_lut.h:1.1.1.2 xc/lib/PEX5/pl_lut.h:1.1.1.3 --- xc/lib/PEX5/pl_lut.h:1.1.1.2 Sun Sep 27 03:58:40 1998 +++ xc/lib/PEX5/pl_lut.h Tue Jan 16 17:06:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_lut.h /main/5 1998/02/06 16:10:34 kaleb $ */ +/* $Xorg: pl_lut.h,v 1.3 2000/08/17 19:44:24 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/PEX5/pl_nameset.c diff -u xc/lib/PEX5/pl_nameset.c:1.1.1.2 xc/lib/PEX5/pl_nameset.c:1.1.1.3 --- xc/lib/PEX5/pl_nameset.c:1.1.1.2 Sun Sep 27 03:58:40 1998 +++ xc/lib/PEX5/pl_nameset.c Tue Jan 16 17:06:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_nameset.c /main/9 1998/02/06 16:10:40 kaleb $ */ +/* $Xorg: pl_nameset.c,v 1.3 2000/08/17 19:44:24 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/PEX5/pl_oc_attr.c diff -u xc/lib/PEX5/pl_oc_attr.c:1.1.1.2 xc/lib/PEX5/pl_oc_attr.c:1.1.1.3 --- xc/lib/PEX5/pl_oc_attr.c:1.1.1.2 Sun Sep 27 03:58:41 1998 +++ xc/lib/PEX5/pl_oc_attr.c Tue Jan 16 17:06:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_oc_attr.c /main/10 1998/02/06 16:10:45 kaleb $ */ +/* $Xorg: pl_oc_attr.c,v 1.4 2000/08/17 19:44:24 cpqbld Exp $ */ /****************************************************************************** @@ -1850,7 +1850,7 @@ * Copy the oc data. */ - if (pBuf = PEXGetOCAddr (display, req->length)) + if ((pBuf = PEXGetOCAddr (display, req->length))) { if (pscType == PEXPSCIsoCurves) { Index: xc/lib/PEX5/pl_oc_dec.c diff -u xc/lib/PEX5/pl_oc_dec.c:1.1.1.2 xc/lib/PEX5/pl_oc_dec.c:1.1.1.3 --- xc/lib/PEX5/pl_oc_dec.c:1.1.1.2 Sun Sep 27 03:58:41 1998 +++ xc/lib/PEX5/pl_oc_dec.c Tue Jan 16 17:06:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_oc_dec.c /main/15 1998/02/06 16:10:54 kaleb $ */ +/* $Xorg: pl_oc_dec.c,v 1.3 2000/08/17 19:44:25 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/PEX5/pl_oc_enc.c diff -u xc/lib/PEX5/pl_oc_enc.c:1.1.1.2 xc/lib/PEX5/pl_oc_enc.c:1.1.1.3 --- xc/lib/PEX5/pl_oc_enc.c:1.1.1.2 Sun Sep 27 03:58:42 1998 +++ xc/lib/PEX5/pl_oc_enc.c Tue Jan 16 17:06:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_oc_enc.c /main/12 1998/02/06 16:11:03 kaleb $ */ +/* $Xorg: pl_oc_enc.c,v 1.3 2000/08/17 19:44:26 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/PEX5/pl_oc_prim.c diff -u xc/lib/PEX5/pl_oc_prim.c:1.1.1.2 xc/lib/PEX5/pl_oc_prim.c:1.1.1.3 --- xc/lib/PEX5/pl_oc_prim.c:1.1.1.2 Sun Sep 27 03:58:43 1998 +++ xc/lib/PEX5/pl_oc_prim.c Tue Jan 16 17:06:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_oc_prim.c /main/16 1998/02/06 16:11:11 kaleb $ */ +/* $Xorg: pl_oc_prim.c,v 1.3 2000/08/17 19:44:26 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/PEX5/pl_oc_str.c diff -u xc/lib/PEX5/pl_oc_str.c:1.1.1.2 xc/lib/PEX5/pl_oc_str.c:1.1.1.3 --- xc/lib/PEX5/pl_oc_str.c:1.1.1.2 Sun Sep 27 03:58:43 1998 +++ xc/lib/PEX5/pl_oc_str.c Tue Jan 16 17:06:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_oc_str.c /main/8 1998/02/06 16:11:20 kaleb $ */ +/* $Xorg: pl_oc_str.c,v 1.3 2000/08/17 19:44:26 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/PEX5/pl_oc_util.c diff -u xc/lib/PEX5/pl_oc_util.c:1.1.1.2 xc/lib/PEX5/pl_oc_util.c:1.1.1.3 --- xc/lib/PEX5/pl_oc_util.c:1.1.1.2 Sun Sep 27 03:58:44 1998 +++ xc/lib/PEX5/pl_oc_util.c Tue Jan 16 17:06:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_oc_util.c /main/17 1998/02/06 16:11:25 kaleb $ */ +/* $Xorg: pl_oc_util.c,v 1.4 2000/08/17 19:44:26 cpqbld Exp $ */ /****************************************************************************** @@ -1799,7 +1799,7 @@ * work if numBytes % 4 != 0. */ - if (mod4bytes = numBytes % 4) + if ((mod4bytes = numBytes % 4)) { if (mod4bytes > BytesLeftInXBuffer (display)) _XFlush (display); Index: xc/lib/PEX5/pl_oc_util.h diff -u xc/lib/PEX5/pl_oc_util.h:3.1 xc/lib/PEX5/pl_oc_util.h:3.2 --- xc/lib/PEX5/pl_oc_util.h:3.1 Sat Oct 3 04:41:13 1998 +++ xc/lib/PEX5/pl_oc_util.h Wed Jan 17 14:41:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_oc_util.h /main/13 1998/02/06 16:11:35 kaleb $ */ +/* $Xorg: pl_oc_util.h,v 1.3 2000/08/17 19:44:26 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/PEX5/pl_pc.c diff -u xc/lib/PEX5/pl_pc.c:1.1.1.2 xc/lib/PEX5/pl_pc.c:1.1.1.3 --- xc/lib/PEX5/pl_pc.c:1.1.1.2 Sun Sep 27 03:58:45 1998 +++ xc/lib/PEX5/pl_pc.c Tue Jan 16 17:06:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_pc.c /main/14 1998/02/06 16:11:41 kaleb $ */ +/* $Xorg: pl_pc.c,v 1.3 2000/08/17 19:44:27 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/PEX5/pl_pick.c diff -u xc/lib/PEX5/pl_pick.c:1.1.1.2 xc/lib/PEX5/pl_pick.c:1.1.1.3 --- xc/lib/PEX5/pl_pick.c:1.1.1.2 Sun Sep 27 03:58:46 1998 +++ xc/lib/PEX5/pl_pick.c Tue Jan 16 17:06:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_pick.c /main/14 1998/02/06 16:11:48 kaleb $ */ +/* $Xorg: pl_pick.c,v 1.3 2000/08/17 19:44:27 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/PEX5/pl_rdr.c diff -u xc/lib/PEX5/pl_rdr.c:1.1.1.2 xc/lib/PEX5/pl_rdr.c:1.1.1.3 --- xc/lib/PEX5/pl_rdr.c:1.1.1.2 Sun Sep 27 03:58:46 1998 +++ xc/lib/PEX5/pl_rdr.c Tue Jan 16 17:06:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_rdr.c /main/12 1998/02/06 16:11:55 kaleb $ */ +/* $Xorg: pl_rdr.c,v 1.3 2000/08/17 19:44:27 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/PEX5/pl_sc.c diff -u xc/lib/PEX5/pl_sc.c:1.1.1.2 xc/lib/PEX5/pl_sc.c:1.1.1.3 --- xc/lib/PEX5/pl_sc.c:1.1.1.2 Sun Sep 27 03:58:47 1998 +++ xc/lib/PEX5/pl_sc.c Tue Jan 16 17:06:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_sc.c /main/13 1998/02/06 16:12:02 kaleb $ */ +/* $Xorg: pl_sc.c,v 1.3 2000/08/17 19:44:27 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/PEX5/pl_startup.c diff -u xc/lib/PEX5/pl_startup.c:1.1.1.2 xc/lib/PEX5/pl_startup.c:1.1.1.3 --- xc/lib/PEX5/pl_startup.c:1.1.1.2 Sun Sep 27 03:58:47 1998 +++ xc/lib/PEX5/pl_startup.c Tue Jan 16 17:06:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_startup.c /main/18 1998/02/06 16:12:09 kaleb $ */ +/* $Xorg: pl_startup.c,v 1.3 2000/08/17 19:44:27 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/PEX5/pl_store.h diff -u xc/lib/PEX5/pl_store.h:3.1 xc/lib/PEX5/pl_store.h:3.2 --- xc/lib/PEX5/pl_store.h:3.1 Sat Oct 3 04:41:13 1998 +++ xc/lib/PEX5/pl_store.h Wed Jan 17 14:41:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_store.h /main/5 1998/02/06 16:12:15 kaleb $ */ +/* $Xorg: pl_store.h,v 1.3 2000/08/17 19:44:27 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/PEX5/pl_struct.c diff -u xc/lib/PEX5/pl_struct.c:1.1.1.2 xc/lib/PEX5/pl_struct.c:1.1.1.3 --- xc/lib/PEX5/pl_struct.c:1.1.1.2 Sun Sep 27 03:58:48 1998 +++ xc/lib/PEX5/pl_struct.c Tue Jan 16 17:06:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_struct.c /main/13 1998/02/06 16:12:21 kaleb $ */ +/* $Xorg: pl_struct.c,v 1.4 2000/08/17 19:44:27 cpqbld Exp $ */ /****************************************************************************** @@ -676,7 +676,7 @@ */ *sizeReturn = repSize = rep.length << 2; - if (*ocsReturn = (char *) Xmalloc ((unsigned) repSize)) + if ((*ocsReturn = (char *) Xmalloc ((unsigned) repSize))) _XRead (display, *ocsReturn, (long) repSize); } Index: xc/lib/PEX5/pl_util.c diff -u xc/lib/PEX5/pl_util.c:1.1.1.2 xc/lib/PEX5/pl_util.c:1.1.1.3 --- xc/lib/PEX5/pl_util.c:1.1.1.2 Sun Sep 27 03:58:51 1998 +++ xc/lib/PEX5/pl_util.c Tue Jan 16 17:06:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_util.c /main/12 1998/02/06 16:12:27 kaleb $ */ +/* $Xorg: pl_util.c,v 1.3 2000/08/17 19:44:28 cpqbld Exp $ */ /****************************************************************************** Index: xc/lib/PEX5/pl_util.h diff -u xc/lib/PEX5/pl_util.h:1.1.1.2 xc/lib/PEX5/pl_util.h:1.1.1.3 --- xc/lib/PEX5/pl_util.h:1.1.1.2 Sun Sep 27 03:58:52 1998 +++ xc/lib/PEX5/pl_util.h Tue Jan 16 17:06:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_util.h /main/7 1998/02/06 16:12:37 kaleb $ */ +/* $Xorg: pl_util.h,v 1.3 2000/08/17 19:44:28 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/PEX5/pl_wks.c diff -u xc/lib/PEX5/pl_wks.c:1.1.1.2 xc/lib/PEX5/pl_wks.c:1.1.1.3 --- xc/lib/PEX5/pl_wks.c:1.1.1.2 Sun Sep 27 03:58:52 1998 +++ xc/lib/PEX5/pl_wks.c Tue Jan 16 17:06:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_wks.c /main/14 1998/02/06 16:12:43 kaleb $ */ +/* $Xorg: pl_wks.c,v 1.3 2000/08/17 19:44:28 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/PEX5/pl_xdata.h diff -u xc/lib/PEX5/pl_xdata.h:1.1.1.2 xc/lib/PEX5/pl_xdata.h:1.1.1.3 --- xc/lib/PEX5/pl_xdata.h:1.1.1.2 Sun Sep 27 03:58:53 1998 +++ xc/lib/PEX5/pl_xdata.h Tue Jan 16 17:06:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: pl_xdata.h /main/6 1998/02/06 16:12:50 kaleb $ */ +/* $Xorg: pl_xdata.h,v 1.3 2000/08/17 19:44:28 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/SM/Imakefile diff -u xc/lib/SM/Imakefile:1.2 xc/lib/SM/Imakefile:1.4 --- xc/lib/SM/Imakefile:1.2 Sun Dec 20 06:56:52 1998 +++ xc/lib/SM/Imakefile Mon Apr 23 12:17:07 2001 @@ -1,6 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/12 1996/12/04 10:22:18 lehors $ -XCOMM $XFree86: xc/lib/SM/Imakefile,v 1.2 1998/12/20 11:56:52 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:44:28 cpqbld Exp $ + + + +XCOMM $XFree86: xc/lib/SM/Imakefile,v 1.4 2001/04/23 16:17:07 tsi Exp $ + #define DoNormalLib NormalLibSM #define DoSharedLib SharedLibSM #define DoExtraLib SharedLibSM @@ -22,7 +26,7 @@ #else CONN_DEFINES = $(CONNECTION_FLAGS) -DICE_t #endif -DEPEND_DEFINES = $(CONN_DEFINES) +DEPEND_DEFINES = $(CONN_DEFINES) DependDefines HEADERS = SM.h \ SMproto.h \ Index: xc/lib/SM/SM-def.cpp diff -u xc/lib/SM/SM-def.cpp:1.1.1.2 xc/lib/SM/SM-def.cpp:1.1.1.3 --- xc/lib/SM/SM-def.cpp:1.1.1.2 Sat Dec 21 22:21:13 1996 +++ xc/lib/SM/SM-def.cpp Tue Jan 16 17:06:52 2001 @@ -38,4 +38,4 @@ SmsSaveYourselfPhase2 SmsSetErrorHandler SmsShutdownCancelled -/* $XConsortium: SM-def.cpp /main/3 1996/05/07 13:15:21 kaleb $ */ +/* $Xorg: SM-def.cpp,v 1.3 2000/08/17 19:44:28 cpqbld Exp $ */ Index: xc/lib/SM/SM.h diff -u xc/lib/SM/SM.h:1.1.1.2 xc/lib/SM/SM.h:1.1.1.3 --- xc/lib/SM/SM.h:1.1.1.2 Sun Sep 27 03:53:17 1998 +++ xc/lib/SM/SM.h Tue Jan 16 17:06:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: SM.h /main/10 1998/02/06 14:09:46 kaleb $ */ +/* $Xorg: SM.h,v 1.3 2000/08/17 19:44:28 cpqbld Exp $ */ /* Index: xc/lib/SM/SMlib.h diff -u xc/lib/SM/SMlib.h:1.1.1.3 xc/lib/SM/SMlib.h:1.1.1.4 --- xc/lib/SM/SMlib.h:1.1.1.3 Sun Sep 27 03:53:18 1998 +++ xc/lib/SM/SMlib.h Tue Jan 16 17:06:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: SMlib.h /main/24 1998/02/06 14:09:29 kaleb $ */ +/* $Xorg: SMlib.h,v 1.3 2000/08/17 19:44:28 cpqbld Exp $ */ /* Index: xc/lib/SM/SMlibint.h diff -u xc/lib/SM/SMlibint.h:1.1.1.2 xc/lib/SM/SMlibint.h:1.1.1.3 --- xc/lib/SM/SMlibint.h:1.1.1.2 Sun Sep 27 03:53:19 1998 +++ xc/lib/SM/SMlibint.h Tue Jan 16 17:06:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: SMlibint.h /main/21 1998/02/06 14:09:24 kaleb $ */ +/* $Xorg: SMlibint.h,v 1.3 2000/08/17 19:44:28 cpqbld Exp $ */ /* Index: xc/lib/SM/SMproto.h diff -u xc/lib/SM/SMproto.h:1.1.1.2 xc/lib/SM/SMproto.h:1.1.1.3 --- xc/lib/SM/SMproto.h:1.1.1.2 Sun Sep 27 03:53:19 1998 +++ xc/lib/SM/SMproto.h Tue Jan 16 17:06:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: SMproto.h /main/10 1998/02/06 14:09:35 kaleb $ */ +/* $Xorg: SMproto.h,v 1.4 2000/08/17 19:44:28 cpqbld Exp $ */ /* @@ -28,6 +28,8 @@ #ifndef _SMPROTO_H_ #define _SMPROTO_H_ + +#include typedef struct { CARD8 majorOpcode; Index: xc/lib/SM/globals.h diff -u xc/lib/SM/globals.h:1.2 xc/lib/SM/globals.h:1.3 --- xc/lib/SM/globals.h:1.2 Sun Dec 20 06:56:53 1998 +++ xc/lib/SM/globals.h Wed Jan 17 14:41:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: globals.h /main/13 1998/02/06 14:09:11 kaleb $ */ +/* $Xorg: globals.h,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/SM/globals.h,v 1.2 1998/12/20 11:56:53 dawes Exp $ */ +/* $XFree86: xc/lib/SM/globals.h,v 1.3 2001/01/17 19:41:31 dawes Exp $ */ /* * Author: Ralph Mor, X Consortium Index: xc/lib/SM/sm_auth.c diff -u xc/lib/SM/sm_auth.c:1.1.1.2 xc/lib/SM/sm_auth.c:1.1.1.3 --- xc/lib/SM/sm_auth.c:1.1.1.2 Sun Sep 27 03:53:21 1998 +++ xc/lib/SM/sm_auth.c Tue Jan 16 17:06:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: sm_auth.c /main/12 1998/02/06 14:09:51 kaleb $ */ +/* $Xorg: sm_auth.c,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ /* Index: xc/lib/SM/sm_client.c diff -u xc/lib/SM/sm_client.c:1.1.1.2 xc/lib/SM/sm_client.c:1.1.1.3 --- xc/lib/SM/sm_client.c:1.1.1.2 Sun Sep 27 03:53:22 1998 +++ xc/lib/SM/sm_client.c Tue Jan 16 17:06:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: sm_client.c /main/31 1998/02/06 14:09:55 kaleb $ */ +/* $Xorg: sm_client.c,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ /* Index: xc/lib/SM/sm_error.c diff -u xc/lib/SM/sm_error.c:1.1.1.2 xc/lib/SM/sm_error.c:1.1.1.3 --- xc/lib/SM/sm_error.c:1.1.1.2 Sun Sep 27 03:53:23 1998 +++ xc/lib/SM/sm_error.c Tue Jan 16 17:06:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: sm_error.c /main/12 1998/02/06 14:10:01 kaleb $ */ +/* $Xorg: sm_error.c,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ /* Index: xc/lib/SM/sm_genid.c diff -u xc/lib/SM/sm_genid.c:3.10 xc/lib/SM/sm_genid.c:3.11 --- xc/lib/SM/sm_genid.c:3.10 Sun Dec 20 06:56:54 1998 +++ xc/lib/SM/sm_genid.c Wed Jan 17 14:41:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: sm_genid.c /main/23 1998/02/06 14:10:08 kaleb $ */ +/* $Xorg: sm_genid.c,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/SM/sm_genid.c,v 3.10 1998/12/20 11:56:54 dawes Exp $ */ +/* $XFree86: xc/lib/SM/sm_genid.c,v 3.11 2001/01/17 19:41:31 dawes Exp $ */ /* * Author: Ralph Mor, X Consortium Index: xc/lib/SM/sm_manager.c diff -u xc/lib/SM/sm_manager.c:1.1.1.3 xc/lib/SM/sm_manager.c:1.1.1.4 --- xc/lib/SM/sm_manager.c:1.1.1.3 Sun Sep 27 03:53:25 1998 +++ xc/lib/SM/sm_manager.c Tue Jan 16 17:06:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: sm_manager.c /main/25 1998/02/06 14:10:13 kaleb $ */ +/* $Xorg: sm_manager.c,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ /* Index: xc/lib/SM/sm_misc.c diff -u xc/lib/SM/sm_misc.c:1.1.1.2 xc/lib/SM/sm_misc.c:1.1.1.3 --- xc/lib/SM/sm_misc.c:1.1.1.2 Sun Sep 27 03:53:26 1998 +++ xc/lib/SM/sm_misc.c Tue Jan 16 17:06:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: sm_misc.c /main/8 1998/02/06 14:10:19 kaleb $ */ +/* $Xorg: sm_misc.c,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ /* Index: xc/lib/SM/sm_process.c diff -u xc/lib/SM/sm_process.c:1.1.1.3 xc/lib/SM/sm_process.c:1.1.1.4 --- xc/lib/SM/sm_process.c:1.1.1.3 Sun Sep 27 03:53:27 1998 +++ xc/lib/SM/sm_process.c Tue Jan 16 17:06:59 2001 @@ -1,4 +1,4 @@ -/* $TOG: sm_process.c /main/30 1998/02/06 14:10:24 kaleb $ */ +/* $Xorg: sm_process.c,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ /* Index: xc/lib/X11/AddDIC.c diff -u xc/lib/X11/AddDIC.c:1.1.1.1 xc/lib/X11/AddDIC.c:1.1.1.2 --- xc/lib/X11/AddDIC.c:1.1.1.1 Wed Apr 27 03:11:14 1994 +++ xc/lib/X11/AddDIC.c Tue Jan 16 17:06:59 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: AddDIC.c,v 1.5 91/05/15 15:40:22 rws Exp $" */ +/* $Xorg: AddDIC.c,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/AddSF.c diff -u xc/lib/X11/AddSF.c:1.1.1.1 xc/lib/X11/AddSF.c:1.1.1.2 --- xc/lib/X11/AddSF.c:1.1.1.1 Wed Apr 27 03:11:14 1994 +++ xc/lib/X11/AddSF.c Tue Jan 16 17:07:00 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: AddSF.c,v 1.6 91/11/06 16:29:27 rws Exp $" */ +/* $Xorg: AddSF.c,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/AllCells.c diff -u xc/lib/X11/AllCells.c:1.1.1.2 xc/lib/X11/AllCells.c:1.1.1.3 --- xc/lib/X11/AllCells.c:1.1.1.2 Sun Sep 27 03:55:06 1998 +++ xc/lib/X11/AllCells.c Tue Jan 16 17:07:00 2001 @@ -1,4 +1,4 @@ -/* $TOG: AllCells.c /main/8 1998/02/06 17:02:37 kaleb $ */ +/* $Xorg: AllCells.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/AllPlanes.c diff -u xc/lib/X11/AllPlanes.c:1.2 xc/lib/X11/AllPlanes.c:1.3 --- xc/lib/X11/AllPlanes.c:1.2 Tue Sep 26 11:56:51 2000 +++ xc/lib/X11/AllPlanes.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: AllPlanes.c /main/7 1998/02/06 17:03:08 kaleb $ */ +/* $Xorg: AllPlanes.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/AllPlanes.c,v 1.2 2000/09/26 15:56:51 tsi Exp $ */ +/* $XFree86: xc/lib/X11/AllPlanes.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/AllowEv.c diff -u xc/lib/X11/AllowEv.c:1.2 xc/lib/X11/AllowEv.c:1.3 --- xc/lib/X11/AllowEv.c:1.2 Sun May 9 06:48:55 1999 +++ xc/lib/X11/AllowEv.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: AllowEv.c /main/6 1998/02/06 17:02:55 kaleb $ */ +/* $Xorg: AllowEv.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/AllowEv.c,v 1.2 1999/05/09 10:48:55 dawes Exp $ */ +/* $XFree86: xc/lib/X11/AllowEv.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/AutoRep.c diff -u xc/lib/X11/AutoRep.c:1.2 xc/lib/X11/AutoRep.c:1.3 --- xc/lib/X11/AutoRep.c:1.2 Sun May 9 06:48:56 1999 +++ xc/lib/X11/AutoRep.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: AutoRep.c /main/6 1998/02/06 17:03:21 kaleb $ */ +/* $Xorg: AutoRep.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ /* Copyright 1985, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/AutoRep.c,v 1.2 1999/05/09 10:48:56 dawes Exp $ */ +/* $XFree86: xc/lib/X11/AutoRep.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Backgnd.c diff -u xc/lib/X11/Backgnd.c:1.2 xc/lib/X11/Backgnd.c:1.3 --- xc/lib/X11/Backgnd.c:1.2 Sun May 9 06:48:56 1999 +++ xc/lib/X11/Backgnd.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: Backgnd.c /main/7 1998/02/06 17:03:34 kaleb $ */ +/* $Xorg: Backgnd.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Backgnd.c,v 1.2 1999/05/09 10:48:56 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Backgnd.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/BdrWidth.c diff -u xc/lib/X11/BdrWidth.c:1.2 xc/lib/X11/BdrWidth.c:1.3 --- xc/lib/X11/BdrWidth.c:1.2 Sun May 9 06:48:57 1999 +++ xc/lib/X11/BdrWidth.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: BdrWidth.c /main/7 1998/02/06 17:03:47 kaleb $ */ +/* $Xorg: BdrWidth.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/BdrWidth.c,v 1.2 1999/05/09 10:48:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/BdrWidth.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Bell.c diff -u xc/lib/X11/Bell.c:1.2 xc/lib/X11/Bell.c:1.3 --- xc/lib/X11/Bell.c:1.2 Sun May 9 06:48:57 1999 +++ xc/lib/X11/Bell.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: Bell.c /main/6 1998/02/06 17:04:02 kaleb $ */ +/* $Xorg: Bell.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Bell.c,v 1.2 1999/05/09 10:48:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Bell.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Border.c diff -u xc/lib/X11/Border.c:1.2 xc/lib/X11/Border.c:1.3 --- xc/lib/X11/Border.c:1.2 Sun May 9 06:48:57 1999 +++ xc/lib/X11/Border.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: Border.c /main/7 1998/02/06 17:04:17 kaleb $ */ +/* $Xorg: Border.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Border.c,v 1.2 1999/05/09 10:48:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Border.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/CCC.c diff -u xc/lib/X11/CCC.c:1.2 xc/lib/X11/CCC.c:1.3 --- xc/lib/X11/CCC.c:1.2 Sun May 9 06:48:58 1999 +++ xc/lib/X11/CCC.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: CCC.c /main/15 1998/02/06 17:04:41 kaleb $" */ +/* $Xorg: CCC.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -33,7 +33,7 @@ * * */ -/* $XFree86: xc/lib/X11/CCC.c,v 1.2 1999/05/09 10:48:58 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CCC.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ /* Index: xc/lib/X11/ChAccCon.c diff -u xc/lib/X11/ChAccCon.c:1.2 xc/lib/X11/ChAccCon.c:1.3 --- xc/lib/X11/ChAccCon.c:1.2 Sun May 9 06:48:58 1999 +++ xc/lib/X11/ChAccCon.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: ChAccCon.c /main/6 1998/02/06 17:04:54 kaleb $ */ +/* $Xorg: ChAccCon.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChAccCon.c,v 1.2 1999/05/09 10:48:58 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChAccCon.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChActPGb.c diff -u xc/lib/X11/ChActPGb.c:1.2 xc/lib/X11/ChActPGb.c:1.3 --- xc/lib/X11/ChActPGb.c:1.2 Sun May 9 06:48:59 1999 +++ xc/lib/X11/ChActPGb.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: ChActPGb.c /main/6 1998/02/06 17:05:07 kaleb $ */ +/* $Xorg: ChActPGb.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChActPGb.c,v 1.2 1999/05/09 10:48:59 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChActPGb.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChClMode.c diff -u xc/lib/X11/ChClMode.c:1.2 xc/lib/X11/ChClMode.c:1.3 --- xc/lib/X11/ChClMode.c:1.2 Sun May 9 06:48:59 1999 +++ xc/lib/X11/ChClMode.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: ChClMode.c /main/6 1998/02/06 17:05:21 kaleb $ */ +/* $Xorg: ChClMode.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChClMode.c,v 1.2 1999/05/09 10:48:59 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChClMode.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChCmap.c diff -u xc/lib/X11/ChCmap.c:1.2 xc/lib/X11/ChCmap.c:1.3 --- xc/lib/X11/ChCmap.c:1.2 Sun May 9 06:48:59 1999 +++ xc/lib/X11/ChCmap.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: ChCmap.c /main/7 1998/02/06 17:05:35 kaleb $ */ +/* $Xorg: ChCmap.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChCmap.c,v 1.2 1999/05/09 10:48:59 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChCmap.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChGC.c diff -u xc/lib/X11/ChGC.c:1.2 xc/lib/X11/ChGC.c:1.3 --- xc/lib/X11/ChGC.c:1.2 Sun May 9 06:49:00 1999 +++ xc/lib/X11/ChGC.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: ChGC.c /main/8 1998/02/06 17:05:48 kaleb $ */ +/* $Xorg: ChGC.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChGC.c,v 1.2 1999/05/09 10:49:00 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChGC.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChKeyCon.c diff -u xc/lib/X11/ChKeyCon.c:1.2 xc/lib/X11/ChKeyCon.c:1.3 --- xc/lib/X11/ChKeyCon.c:1.2 Sun May 9 06:49:00 1999 +++ xc/lib/X11/ChKeyCon.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: ChKeyCon.c /main/10 1998/02/06 17:06:01 kaleb $ */ +/* $Xorg: ChKeyCon.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChKeyCon.c,v 1.2 1999/05/09 10:49:00 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChKeyCon.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChPntCon.c diff -u xc/lib/X11/ChPntCon.c:1.2 xc/lib/X11/ChPntCon.c:1.3 --- xc/lib/X11/ChPntCon.c:1.2 Sun May 9 06:49:01 1999 +++ xc/lib/X11/ChPntCon.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: ChPntCon.c /main/7 1998/02/06 17:07:27 kaleb $ */ +/* $Xorg: ChPntCon.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChPntCon.c,v 1.2 1999/05/09 10:49:01 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChPntCon.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChProp.c diff -u xc/lib/X11/ChProp.c:1.2 xc/lib/X11/ChProp.c:1.3 --- xc/lib/X11/ChProp.c:1.2 Sun May 9 06:49:01 1999 +++ xc/lib/X11/ChProp.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: ChProp.c /main/17 1998/02/06 17:07:40 kaleb $ */ +/* $Xorg: ChProp.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChProp.c,v 1.2 1999/05/09 10:49:01 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChProp.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChSaveSet.c diff -u xc/lib/X11/ChSaveSet.c:1.2 xc/lib/X11/ChSaveSet.c:1.3 --- xc/lib/X11/ChSaveSet.c:1.2 Sun May 9 06:49:01 1999 +++ xc/lib/X11/ChSaveSet.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: ChSaveSet.c /main/6 1998/02/06 17:07:53 kaleb $ */ +/* $Xorg: ChSaveSet.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChSaveSet.c,v 1.2 1999/05/09 10:49:01 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChSaveSet.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChWAttrs.c diff -u xc/lib/X11/ChWAttrs.c:1.2 xc/lib/X11/ChWAttrs.c:1.3 --- xc/lib/X11/ChWAttrs.c:1.2 Sun May 9 06:49:02 1999 +++ xc/lib/X11/ChWAttrs.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: ChWAttrs.c /main/7 1998/02/06 17:08:08 kaleb $ */ +/* $Xorg: ChWAttrs.c,v 1.4 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChWAttrs.c,v 1.2 1999/05/09 10:49:02 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChWAttrs.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChWindow.c diff -u xc/lib/X11/ChWindow.c:1.4 xc/lib/X11/ChWindow.c:1.5 --- xc/lib/X11/ChWindow.c:1.4 Sun May 9 06:49:02 1999 +++ xc/lib/X11/ChWindow.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: ChWindow.c /main/10 1998/02/06 17:08:21 kaleb $ */ +/* $Xorg: ChWindow.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChWindow.c,v 1.4 1999/05/09 10:49:02 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChWindow.c,v 1.5 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChkIfEv.c diff -u xc/lib/X11/ChkIfEv.c:1.1.1.2 xc/lib/X11/ChkIfEv.c:1.1.1.3 --- xc/lib/X11/ChkIfEv.c:1.1.1.2 Sun Sep 27 03:55:15 1998 +++ xc/lib/X11/ChkIfEv.c Tue Jan 16 17:07:09 2001 @@ -1,4 +1,4 @@ -/* $TOG: ChkIfEv.c /main/11 1998/02/06 17:06:16 kaleb $ */ +/* $Xorg: ChkIfEv.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1985, 1987, 1998 The Open Group Index: xc/lib/X11/ChkMaskEv.c diff -u xc/lib/X11/ChkMaskEv.c:3.1 xc/lib/X11/ChkMaskEv.c:3.2 --- xc/lib/X11/ChkMaskEv.c:3.1 Sat Oct 3 04:41:15 1998 +++ xc/lib/X11/ChkMaskEv.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: ChkMaskEv.c /main/18 1998/02/06 17:06:30 kaleb $ */ +/* $Xorg: ChkMaskEv.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1985, 1987, 1998 The Open Group Index: xc/lib/X11/ChkTypEv.c diff -u xc/lib/X11/ChkTypEv.c:1.1.1.2 xc/lib/X11/ChkTypEv.c:1.1.1.3 --- xc/lib/X11/ChkTypEv.c:1.1.1.2 Sun Sep 27 03:55:18 1998 +++ xc/lib/X11/ChkTypEv.c Tue Jan 16 17:07:09 2001 @@ -1,4 +1,4 @@ -/* $TOG: ChkTypEv.c /main/10 1998/02/06 17:06:46 kaleb $ */ +/* $Xorg: ChkTypEv.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1985, 1987, 1998 The Open Group Index: xc/lib/X11/ChkTypWEv.c diff -u xc/lib/X11/ChkTypWEv.c:1.1.1.2 xc/lib/X11/ChkTypWEv.c:1.1.1.3 --- xc/lib/X11/ChkTypWEv.c:1.1.1.2 Sun Sep 27 03:55:18 1998 +++ xc/lib/X11/ChkTypWEv.c Tue Jan 16 17:07:10 2001 @@ -1,4 +1,4 @@ -/* $TOG: ChkTypWEv.c /main/10 1998/02/06 17:06:59 kaleb $ */ +/* $Xorg: ChkTypWEv.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1985, 1987, 1998 The Open Group Index: xc/lib/X11/ChkWinEv.c diff -u xc/lib/X11/ChkWinEv.c:3.1 xc/lib/X11/ChkWinEv.c:3.2 --- xc/lib/X11/ChkWinEv.c:3.1 Sat Oct 3 04:41:15 1998 +++ xc/lib/X11/ChkWinEv.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: ChkWinEv.c /main/18 1998/02/06 17:07:14 kaleb $ */ +/* $Xorg: ChkWinEv.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1985, 1987, 1998 The Open Group Index: xc/lib/X11/CirWin.c diff -u xc/lib/X11/CirWin.c:1.2 xc/lib/X11/CirWin.c:1.3 --- xc/lib/X11/CirWin.c:1.2 Sun May 9 06:49:03 1999 +++ xc/lib/X11/CirWin.c Wed Jan 17 14:41:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: CirWin.c /main/6 1998/02/06 17:08:59 kaleb $ */ +/* $Xorg: CirWin.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CirWin.c,v 1.2 1999/05/09 10:49:03 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CirWin.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/CirWinDn.c diff -u xc/lib/X11/CirWinDn.c:1.2 xc/lib/X11/CirWinDn.c:1.3 --- xc/lib/X11/CirWinDn.c:1.2 Sun May 9 06:49:04 1999 +++ xc/lib/X11/CirWinDn.c Wed Jan 17 14:41:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: CirWinDn.c /main/6 1998/02/06 17:08:34 kaleb $ */ +/* $Xorg: CirWinDn.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CirWinDn.c,v 1.2 1999/05/09 10:49:04 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CirWinDn.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/CirWinUp.c diff -u xc/lib/X11/CirWinUp.c:1.2 xc/lib/X11/CirWinUp.c:1.3 --- xc/lib/X11/CirWinUp.c:1.2 Sun May 9 06:49:04 1999 +++ xc/lib/X11/CirWinUp.c Wed Jan 17 14:41:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: CirWinUp.c /main/6 1998/02/06 17:08:47 kaleb $ */ +/* $Xorg: CirWinUp.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CirWinUp.c,v 1.2 1999/05/09 10:49:04 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CirWinUp.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ClDisplay.c diff -u xc/lib/X11/ClDisplay.c:1.2 xc/lib/X11/ClDisplay.c:1.3 --- xc/lib/X11/ClDisplay.c:1.2 Sun May 9 06:49:05 1999 +++ xc/lib/X11/ClDisplay.c Wed Jan 17 14:41:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: ClDisplay.c /main/23 1998/02/06 17:09:12 kaleb $ */ +/* $Xorg: ClDisplay.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/ClDisplay.c,v 1.2 1999/05/09 10:49:05 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ClDisplay.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Clear.c diff -u xc/lib/X11/Clear.c:1.2 xc/lib/X11/Clear.c:1.3 --- xc/lib/X11/Clear.c:1.2 Sun May 9 06:49:05 1999 +++ xc/lib/X11/Clear.c Wed Jan 17 14:41:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: Clear.c /main/6 1998/02/06 17:09:43 kaleb $ */ +/* $Xorg: Clear.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Clear.c,v 1.2 1999/05/09 10:49:05 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Clear.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ClearArea.c diff -u xc/lib/X11/ClearArea.c:1.2 xc/lib/X11/ClearArea.c:1.3 --- xc/lib/X11/ClearArea.c:1.2 Sun May 9 06:49:06 1999 +++ xc/lib/X11/ClearArea.c Wed Jan 17 14:41:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: ClearArea.c /main/6 1998/02/06 17:09:29 kaleb $ */ +/* $Xorg: ClearArea.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ClearArea.c,v 1.2 1999/05/09 10:49:06 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ClearArea.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ConfWind.c diff -u xc/lib/X11/ConfWind.c:1.2 xc/lib/X11/ConfWind.c:1.3 --- xc/lib/X11/ConfWind.c:1.2 Sun May 9 06:49:06 1999 +++ xc/lib/X11/ConfWind.c Wed Jan 17 14:41:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: ConfWind.c /main/9 1998/02/06 17:12:00 kaleb $ */ +/* $Xorg: ConfWind.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ConfWind.c,v 1.2 1999/05/09 10:49:06 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ConfWind.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ConnDis.c diff -u xc/lib/X11/ConnDis.c:3.17 xc/lib/X11/ConnDis.c:3.18 --- xc/lib/X11/ConnDis.c:3.17 Sat Jan 29 13:58:08 2000 +++ xc/lib/X11/ConnDis.c Wed Jan 17 14:41:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: ConnDis.c /main/115 1998/02/06 17:12:13 kaleb $ */ +/* $Xorg: ConnDis.c,v 1.7 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1989, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ConnDis.c,v 3.17 2000/01/29 18:58:08 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ConnDis.c,v 3.18 2001/01/17 19:41:33 dawes Exp $ */ /* * This file contains operating system dependencies. @@ -122,7 +122,10 @@ int connect_stat; #ifdef LOCALCONN struct utsname sys; +#ifdef TCPCONN + char *tcphostname = NULL; /* A place to save hostname pointer */ #endif +#endif p = display_name; @@ -183,10 +186,20 @@ p = lastc; #ifdef LOCALCONN - /* check if phostname == localnodename */ - if (phostname && uname(&sys) >= 0 && - !strncmp(phostname, sys.nodename, strlen(sys.nodename))) + /* check if phostname == localnodename AND protocol not specified */ + if (!pprotocol && phostname && uname(&sys) >= 0 && + !strncmp(phostname, sys.nodename, + (strlen(sys.nodename) < strlen(phostname) ? + strlen(phostname) : strlen(sys.nodename)))) { +#ifdef TCPCONN + /* + * We'll first attempt to connect using the local transport. If + * this fails (which is the case if sshd X protocol forwarding is + * being used), retry using tcp and this hostname. + */ + tcphostname = copystring(phostname, strlen(phostname)); +#endif Xfree (phostname); phostname = copystring ("unix", 4); } @@ -282,6 +295,7 @@ } #endif + connect: /* * This seems kind of backwards, but we need to put the protocol, * host, and port back together to pass to _X11TransOpenCOTSClient(). @@ -396,6 +410,16 @@ if (saddr) free ((char *) saddr); if (pprotocol) Xfree (pprotocol); if (phostname) Xfree (phostname); + +#if defined(LOCALCONN) && defined(TCPCONN) + if (tcphostname) { + pprotocol = copystring("tcp", 3); + phostname = tcphostname; + tcphostname = NULL; + goto connect; + } +#endif + if (pdpynum) Xfree (pdpynum); if (pscrnum) Xfree (pscrnum); return NULL; Index: xc/lib/X11/Context.c diff -u xc/lib/X11/Context.c:1.2 xc/lib/X11/Context.c:1.3 --- xc/lib/X11/Context.c:1.2 Sun May 9 06:49:07 1999 +++ xc/lib/X11/Context.c Wed Jan 17 14:41:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: Context.c /main/22 1998/02/06 17:12:29 kaleb $ */ +/* $Xorg: Context.c,v 1.4 2000/08/17 19:44:31 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988, 1990 by Digital Equipment Corporation, Maynard, @@ -46,7 +46,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/Context.c,v 1.2 1999/05/09 10:49:07 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Context.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ /* This module implements a simple sparse array. Index: xc/lib/X11/ConvSel.c diff -u xc/lib/X11/ConvSel.c:1.2 xc/lib/X11/ConvSel.c:1.3 --- xc/lib/X11/ConvSel.c:1.2 Sun May 9 06:49:07 1999 +++ xc/lib/X11/ConvSel.c Wed Jan 17 14:41:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: ConvSel.c /main/6 1998/02/06 17:12:42 kaleb $ */ +/* $Xorg: ConvSel.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1986,1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ConvSel.c,v 1.2 1999/05/09 10:49:07 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ConvSel.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/CopyArea.c diff -u xc/lib/X11/CopyArea.c:1.2 xc/lib/X11/CopyArea.c:1.3 --- xc/lib/X11/CopyArea.c:1.2 Sun May 9 06:49:08 1999 +++ xc/lib/X11/CopyArea.c Wed Jan 17 14:41:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: CopyArea.c /main/6 1998/02/06 17:12:55 kaleb $ */ +/* $Xorg: CopyArea.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CopyArea.c,v 1.2 1999/05/09 10:49:08 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CopyArea.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/CopyCmap.c diff -u xc/lib/X11/CopyCmap.c:1.2 xc/lib/X11/CopyCmap.c:1.3 --- xc/lib/X11/CopyCmap.c:1.2 Sun May 9 06:49:08 1999 +++ xc/lib/X11/CopyCmap.c Wed Jan 17 14:41:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: CopyCmap.c /main/7 1998/02/06 17:13:08 kaleb $ */ +/* $Xorg: CopyCmap.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CopyCmap.c,v 1.2 1999/05/09 10:49:08 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CopyCmap.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/CopyGC.c diff -u xc/lib/X11/CopyGC.c:1.2 xc/lib/X11/CopyGC.c:1.3 --- xc/lib/X11/CopyGC.c:1.2 Sun May 9 06:49:09 1999 +++ xc/lib/X11/CopyGC.c Wed Jan 17 14:41:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: CopyGC.c /main/10 1998/02/06 17:13:20 kaleb $ */ +/* $Xorg: CopyGC.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CopyGC.c,v 1.2 1999/05/09 10:49:09 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CopyGC.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/CopyPlane.c diff -u xc/lib/X11/CopyPlane.c:1.2 xc/lib/X11/CopyPlane.c:1.3 --- xc/lib/X11/CopyPlane.c:1.2 Sun May 9 06:49:09 1999 +++ xc/lib/X11/CopyPlane.c Wed Jan 17 14:41:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: CopyPlane.c /main/6 1998/02/06 17:13:33 kaleb $ */ +/* $Xorg: CopyPlane.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CopyPlane.c,v 1.2 1999/05/09 10:49:09 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CopyPlane.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/CrBFData.c diff -u xc/lib/X11/CrBFData.c:1.1.1.2 xc/lib/X11/CrBFData.c:1.1.1.3 --- xc/lib/X11/CrBFData.c:1.1.1.2 Sun Sep 27 03:55:26 1998 +++ xc/lib/X11/CrBFData.c Tue Jan 16 17:07:14 2001 @@ -1,4 +1,4 @@ -/* $TOG: CrBFData.c /main/13 1998/02/06 17:13:46 kaleb $ */ +/* $Xorg: CrBFData.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1987, 1998 The Open Group Index: xc/lib/X11/CrCmap.c diff -u xc/lib/X11/CrCmap.c:1.2 xc/lib/X11/CrCmap.c:1.3 --- xc/lib/X11/CrCmap.c:1.2 Sun May 9 06:49:09 1999 +++ xc/lib/X11/CrCmap.c Wed Jan 17 14:41:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: CrCmap.c /main/7 1998/02/06 17:13:58 kaleb $ */ +/* $Xorg: CrCmap.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CrCmap.c,v 1.2 1999/05/09 10:49:09 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CrCmap.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/CrCursor.c diff -u xc/lib/X11/CrCursor.c:1.1.1.2 xc/lib/X11/CrCursor.c:1.1.1.3 --- xc/lib/X11/CrCursor.c:1.1.1.2 Sun Sep 27 03:55:27 1998 +++ xc/lib/X11/CrCursor.c Tue Jan 16 17:07:14 2001 @@ -1,4 +1,4 @@ -/* $TOG: CrCursor.c /main/5 1998/02/06 17:14:11 kaleb $ */ +/* $Xorg: CrCursor.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/CrGC.c diff -u xc/lib/X11/CrGC.c:3.3 xc/lib/X11/CrGC.c:3.4 --- xc/lib/X11/CrGC.c:3.3 Sun May 9 06:49:10 1999 +++ xc/lib/X11/CrGC.c Wed Jan 17 14:41:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: CrGC.c /main/27 1998/02/06 17:14:22 kaleb $ */ +/* $Xorg: CrGC.c,v 1.4 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CrGC.c,v 3.3 1999/05/09 10:49:10 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CrGC.c,v 3.4 2001/01/17 19:41:33 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/CrGlCur.c diff -u xc/lib/X11/CrGlCur.c:1.2 xc/lib/X11/CrGlCur.c:1.3 --- xc/lib/X11/CrGlCur.c:1.2 Sat Jan 29 13:58:09 2000 +++ xc/lib/X11/CrGlCur.c Wed Jan 17 14:41:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: CrGlCur.c /main/5 1998/02/06 17:14:36 kaleb $ */ +/* $Xorg: CrGlCur.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CrGlCur.c,v 1.2 2000/01/29 18:58:09 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CrGlCur.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/CrPFBData.c diff -u xc/lib/X11/CrPFBData.c:1.1.1.2 xc/lib/X11/CrPFBData.c:1.1.1.3 --- xc/lib/X11/CrPFBData.c:1.1.1.2 Sun Sep 27 03:55:29 1998 +++ xc/lib/X11/CrPFBData.c Tue Jan 16 17:07:15 2001 @@ -1,4 +1,4 @@ -/* $TOG: CrPFBData.c /main/9 1998/02/06 17:14:49 kaleb $ */ +/* $Xorg: CrPFBData.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1987, 1998 The Open Group Index: xc/lib/X11/CrPixmap.c diff -u xc/lib/X11/CrPixmap.c:1.1.1.2 xc/lib/X11/CrPixmap.c:1.1.1.3 --- xc/lib/X11/CrPixmap.c:1.1.1.2 Sun Sep 27 03:55:29 1998 +++ xc/lib/X11/CrPixmap.c Tue Jan 16 17:07:15 2001 @@ -1,4 +1,4 @@ -/* $TOG: CrPixmap.c /main/5 1998/02/06 17:15:01 kaleb $ */ +/* $Xorg: CrPixmap.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/CrWindow.c diff -u xc/lib/X11/CrWindow.c:1.1.1.2 xc/lib/X11/CrWindow.c:1.1.1.3 --- xc/lib/X11/CrWindow.c:1.1.1.2 Sun Sep 27 03:55:30 1998 +++ xc/lib/X11/CrWindow.c Tue Jan 16 17:07:16 2001 @@ -1,4 +1,4 @@ -/* $TOG: CrWindow.c /main/8 1998/02/06 17:15:28 kaleb $ */ +/* $Xorg: CrWindow.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/Cursor.c diff -u xc/lib/X11/Cursor.c:1.2 xc/lib/X11/Cursor.c:1.3 --- xc/lib/X11/Cursor.c:1.2 Sat Jan 29 13:58:09 2000 +++ xc/lib/X11/Cursor.c Wed Jan 17 14:41:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: Cursor.c /main/8 1998/02/06 17:16:09 kaleb $ */ +/* $Xorg: Cursor.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Cursor.c,v 1.2 2000/01/29 18:58:09 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Cursor.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ #include "Xlibint.h" static XColor _Xconst foreground = { 0, 0, 0, 0 }; /* black */ Index: xc/lib/X11/CvColW.c diff -u xc/lib/X11/CvColW.c:1.2 xc/lib/X11/CvColW.c:1.3 --- xc/lib/X11/CvColW.c:1.2 Sun May 9 06:49:10 1999 +++ xc/lib/X11/CvColW.c Wed Jan 17 14:41:34 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: CvColW.c,v 1.4 91/05/13 23:19:33 rws Exp $" */ +/* $Xorg: CvColW.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -33,7 +33,7 @@ * * */ -/* $XFree86: xc/lib/X11/CvColW.c,v 1.2 1999/05/09 10:49:10 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CvColW.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/CvCols.c diff -u xc/lib/X11/CvCols.c:1.2 xc/lib/X11/CvCols.c:1.3 --- xc/lib/X11/CvCols.c:1.2 Sun May 9 06:49:11 1999 +++ xc/lib/X11/CvCols.c Wed Jan 17 14:41:34 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: CvCols.c,v 1.12 93/09/07 21:30:32 rws Exp $" */ +/* $Xorg: CvCols.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -33,7 +33,7 @@ * * */ -/* $XFree86: xc/lib/X11/CvCols.c,v 1.2 1999/05/09 10:49:11 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CvCols.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/DefCursor.c diff -u xc/lib/X11/DefCursor.c:1.2 xc/lib/X11/DefCursor.c:1.3 --- xc/lib/X11/DefCursor.c:1.2 Sun May 9 06:49:11 1999 +++ xc/lib/X11/DefCursor.c Wed Jan 17 14:41:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: DefCursor.c /main/7 1998/02/06 17:16:48 kaleb $ */ +/* $Xorg: DefCursor.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1986,1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DefCursor.c,v 1.2 1999/05/09 10:49:11 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DefCursor.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DelProp.c diff -u xc/lib/X11/DelProp.c:1.2 xc/lib/X11/DelProp.c:1.3 --- xc/lib/X11/DelProp.c:1.2 Sun May 9 06:49:12 1999 +++ xc/lib/X11/DelProp.c Wed Jan 17 14:41:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: DelProp.c /main/6 1998/02/06 17:17:00 kaleb $ */ +/* $Xorg: DelProp.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DelProp.c,v 1.2 1999/05/09 10:49:12 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DelProp.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Depths.c diff -u xc/lib/X11/Depths.c:1.1.1.2 xc/lib/X11/Depths.c:1.1.1.3 --- xc/lib/X11/Depths.c:1.1.1.2 Sun Sep 27 03:55:32 1998 +++ xc/lib/X11/Depths.c Tue Jan 16 17:07:18 2001 @@ -1,4 +1,4 @@ -/* $TOG: Depths.c /main/8 1998/02/06 17:17:12 kaleb $ */ +/* $Xorg: Depths.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1989, 1998 The Open Group Index: xc/lib/X11/DestSubs.c diff -u xc/lib/X11/DestSubs.c:1.2 xc/lib/X11/DestSubs.c:1.3 --- xc/lib/X11/DestSubs.c:1.2 Sun May 9 06:49:12 1999 +++ xc/lib/X11/DestSubs.c Wed Jan 17 14:41:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: DestSubs.c /main/6 1998/02/06 17:17:24 kaleb $ */ +/* $Xorg: DestSubs.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DestSubs.c,v 1.2 1999/05/09 10:49:12 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DestSubs.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DestWind.c diff -u xc/lib/X11/DestWind.c:1.2 xc/lib/X11/DestWind.c:1.3 --- xc/lib/X11/DestWind.c:1.2 Sun May 9 06:49:12 1999 +++ xc/lib/X11/DestWind.c Wed Jan 17 14:41:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: DestWind.c /main/6 1998/02/06 17:17:37 kaleb $ */ +/* $Xorg: DestWind.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DestWind.c,v 1.2 1999/05/09 10:49:12 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DestWind.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DisName.c diff -u xc/lib/X11/DisName.c:1.1.1.2 xc/lib/X11/DisName.c:1.1.1.3 --- xc/lib/X11/DisName.c:1.1.1.2 Sun Sep 27 03:55:33 1998 +++ xc/lib/X11/DisName.c Tue Jan 16 17:07:18 2001 @@ -1,4 +1,4 @@ -/* $TOG: DisName.c /main/6 1998/02/06 17:17:50 kaleb $ */ +/* $Xorg: DisName.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Index: xc/lib/X11/DrArc.c diff -u xc/lib/X11/DrArc.c:1.2 xc/lib/X11/DrArc.c:1.3 --- xc/lib/X11/DrArc.c:1.2 Sun May 9 06:49:13 1999 +++ xc/lib/X11/DrArc.c Wed Jan 17 14:41:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: DrArc.c /main/9 1998/02/06 17:18:14 kaleb $ */ +/* $Xorg: DrArc.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrArc.c,v 1.2 1999/05/09 10:49:13 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrArc.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ /* Note to future maintainers: XDrawArc does NOT batch successive PolyArc requests into a single request like XDrawLine, XDrawPoint, etc. Index: xc/lib/X11/DrArcs.c diff -u xc/lib/X11/DrArcs.c:1.2 xc/lib/X11/DrArcs.c:1.3 --- xc/lib/X11/DrArcs.c:1.2 Sun May 9 06:49:13 1999 +++ xc/lib/X11/DrArcs.c Wed Jan 17 14:41:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: DrArcs.c /main/14 1998/02/06 17:18:02 kaleb $ */ +/* $Xorg: DrArcs.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrArcs.c,v 1.2 1999/05/09 10:49:13 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrArcs.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DrLine.c diff -u xc/lib/X11/DrLine.c:1.2 xc/lib/X11/DrLine.c:1.3 --- xc/lib/X11/DrLine.c:1.2 Sun May 9 06:49:14 1999 +++ xc/lib/X11/DrLine.c Wed Jan 17 14:41:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: DrLine.c /main/9 1998/02/06 17:18:37 kaleb $ */ +/* $Xorg: DrLine.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrLine.c,v 1.2 1999/05/09 10:49:14 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrLine.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DrLines.c diff -u xc/lib/X11/DrLines.c:1.2 xc/lib/X11/DrLines.c:1.3 --- xc/lib/X11/DrLines.c:1.2 Sun May 9 06:49:14 1999 +++ xc/lib/X11/DrLines.c Wed Jan 17 14:41:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: DrLines.c /main/11 1998/02/06 17:18:25 kaleb $ */ +/* $Xorg: DrLines.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrLines.c,v 1.2 1999/05/09 10:49:14 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrLines.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DrPoint.c diff -u xc/lib/X11/DrPoint.c:1.2 xc/lib/X11/DrPoint.c:1.3 --- xc/lib/X11/DrPoint.c:1.2 Sun May 9 06:49:15 1999 +++ xc/lib/X11/DrPoint.c Wed Jan 17 14:41:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: DrPoint.c /main/9 1998/02/06 17:19:00 kaleb $ */ +/* $Xorg: DrPoint.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrPoint.c,v 1.2 1999/05/09 10:49:15 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrPoint.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DrPoints.c diff -u xc/lib/X11/DrPoints.c:1.2 xc/lib/X11/DrPoints.c:1.3 --- xc/lib/X11/DrPoints.c:1.2 Sun May 9 06:49:15 1999 +++ xc/lib/X11/DrPoints.c Wed Jan 17 14:41:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: DrPoints.c /main/12 1998/02/06 17:18:48 kaleb $ */ +/* $Xorg: DrPoints.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrPoints.c,v 1.2 1999/05/09 10:49:15 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrPoints.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DrRect.c diff -u xc/lib/X11/DrRect.c:1.2 xc/lib/X11/DrRect.c:1.3 --- xc/lib/X11/DrRect.c:1.2 Sun May 9 06:49:15 1999 +++ xc/lib/X11/DrRect.c Wed Jan 17 14:41:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: DrRect.c /main/9 1998/02/06 17:19:23 kaleb $ */ +/* $Xorg: DrRect.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrRect.c,v 1.2 1999/05/09 10:49:15 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrRect.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DrRects.c diff -u xc/lib/X11/DrRects.c:1.2 xc/lib/X11/DrRects.c:1.3 --- xc/lib/X11/DrRects.c:1.2 Sun May 9 06:49:16 1999 +++ xc/lib/X11/DrRects.c Wed Jan 17 14:41:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: DrRects.c /main/11 1998/02/06 17:19:12 kaleb $ */ +/* $Xorg: DrRects.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrRects.c,v 1.2 1999/05/09 10:49:16 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrRects.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DrSegs.c diff -u xc/lib/X11/DrSegs.c:1.2 xc/lib/X11/DrSegs.c:1.3 --- xc/lib/X11/DrSegs.c:1.2 Sun May 9 06:49:16 1999 +++ xc/lib/X11/DrSegs.c Wed Jan 17 14:41:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: DrSegs.c /main/10 1998/02/06 17:19:40 kaleb $ */ +/* $Xorg: DrSegs.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrSegs.c,v 1.2 1999/05/09 10:49:16 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrSegs.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ErrDes.c diff -u xc/lib/X11/ErrDes.c:3.7 xc/lib/X11/ErrDes.c:3.8 --- xc/lib/X11/ErrDes.c:3.7 Sun May 9 06:49:16 1999 +++ xc/lib/X11/ErrDes.c Wed Jan 17 14:41:34 2001 @@ -1,5 +1,5 @@ /* - * $TOG: ErrDes.c /main/44 1998/04/28 17:17:38 kaleb $ + * $Xorg: ErrDes.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /*********************************************************** @@ -44,7 +44,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/ErrDes.c,v 3.7 1999/05/09 10:49:16 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ErrDes.c,v 3.8 2001/01/17 19:41:34 dawes Exp $ */ #include "Xlibint.h" #include Index: xc/lib/X11/ErrHndlr.c diff -u xc/lib/X11/ErrHndlr.c:1.3 xc/lib/X11/ErrHndlr.c:1.4 --- xc/lib/X11/ErrHndlr.c:1.3 Tue Mar 2 06:49:21 1999 +++ xc/lib/X11/ErrHndlr.c Wed Jan 17 14:41:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: ErrHndlr.c /main/14 1998/02/06 17:20:03 kaleb $ */ +/* $Xorg: ErrHndlr.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ErrHndlr.c,v 1.3 1999/03/02 11:49:21 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ErrHndlr.c,v 1.4 2001/01/17 19:41:35 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/EvToWire.c diff -u xc/lib/X11/EvToWire.c:1.2 xc/lib/X11/EvToWire.c:1.3 --- xc/lib/X11/EvToWire.c:1.2 Sun May 9 06:49:17 1999 +++ xc/lib/X11/EvToWire.c Wed Jan 17 14:41:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: EvToWire.c /main/13 1998/02/06 17:20:28 kaleb $ */ +/* $Xorg: EvToWire.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/EvToWire.c,v 1.2 1999/05/09 10:49:17 dawes Exp $ */ +/* $XFree86: xc/lib/X11/EvToWire.c,v 1.3 2001/01/17 19:41:35 dawes Exp $ */ /* * XEvToWire.c - Internal support routines for the C subroutine Index: xc/lib/X11/FSSaver.c diff -u xc/lib/X11/FSSaver.c:1.2 xc/lib/X11/FSSaver.c:1.3 --- xc/lib/X11/FSSaver.c:1.2 Sun May 9 06:49:17 1999 +++ xc/lib/X11/FSSaver.c Wed Jan 17 14:41:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSSaver.c /main/6 1998/02/06 17:23:57 kaleb $ */ +/* $Xorg: FSSaver.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FSSaver.c,v 1.2 1999/05/09 10:49:17 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FSSaver.c,v 1.3 2001/01/17 19:41:35 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FSWrap.c diff -u xc/lib/X11/FSWrap.c:1.4 xc/lib/X11/FSWrap.c:1.5 --- xc/lib/X11/FSWrap.c:1.4 Sun May 9 06:49:18 1999 +++ xc/lib/X11/FSWrap.c Wed Jan 17 14:41:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: FSWrap.c /main/16 1998/05/29 14:46:29 kaleb $ */ +/* $Xorg: FSWrap.c,v 1.4 2000/08/17 19:44:33 cpqbld Exp $ */ /* * Copyright 1991 by the Open Software Foundation @@ -52,7 +52,7 @@ */ -/* $XFree86: xc/lib/X11/FSWrap.c,v 1.4 1999/05/09 10:49:18 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FSWrap.c,v 1.5 2001/01/17 19:41:35 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" Index: xc/lib/X11/FetchName.c diff -u xc/lib/X11/FetchName.c:1.1.1.2 xc/lib/X11/FetchName.c:1.1.1.3 --- xc/lib/X11/FetchName.c:1.1.1.2 Sun Sep 27 03:55:41 1998 +++ xc/lib/X11/FetchName.c Tue Jan 16 17:07:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: FetchName.c /main/11 1998/02/06 17:20:40 kaleb $ */ +/* $Xorg: FetchName.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/FillArc.c diff -u xc/lib/X11/FillArc.c:1.2 xc/lib/X11/FillArc.c:1.3 --- xc/lib/X11/FillArc.c:1.2 Sun May 9 06:49:18 1999 +++ xc/lib/X11/FillArc.c Wed Jan 17 14:41:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: FillArc.c /main/9 1998/02/06 17:21:02 kaleb $ */ +/* $Xorg: FillArc.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FillArc.c,v 1.2 1999/05/09 10:49:18 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FillArc.c,v 1.3 2001/01/17 19:41:35 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FillArcs.c diff -u xc/lib/X11/FillArcs.c:1.2 xc/lib/X11/FillArcs.c:1.3 --- xc/lib/X11/FillArcs.c:1.2 Sun May 9 06:49:19 1999 +++ xc/lib/X11/FillArcs.c Wed Jan 17 14:41:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: FillArcs.c /main/12 1998/02/06 17:20:51 kaleb $ */ +/* $Xorg: FillArcs.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FillArcs.c,v 1.2 1999/05/09 10:49:19 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FillArcs.c,v 1.3 2001/01/17 19:41:35 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FillPoly.c diff -u xc/lib/X11/FillPoly.c:1.2 xc/lib/X11/FillPoly.c:1.3 --- xc/lib/X11/FillPoly.c:1.2 Sun May 9 06:49:19 1999 +++ xc/lib/X11/FillPoly.c Wed Jan 17 14:41:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: FillPoly.c /main/11 1998/02/06 17:21:14 kaleb $ */ +/* $Xorg: FillPoly.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FillPoly.c,v 1.2 1999/05/09 10:49:19 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FillPoly.c,v 1.3 2001/01/17 19:41:35 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FillRct.c diff -u xc/lib/X11/FillRct.c:1.2 xc/lib/X11/FillRct.c:1.3 --- xc/lib/X11/FillRct.c:1.2 Sun May 9 06:49:19 1999 +++ xc/lib/X11/FillRct.c Wed Jan 17 14:41:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: FillRct.c /main/9 1998/02/06 17:21:38 kaleb $ */ +/* $Xorg: FillRct.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FillRct.c,v 1.2 1999/05/09 10:49:19 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FillRct.c,v 1.3 2001/01/17 19:41:35 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FillRcts.c diff -u xc/lib/X11/FillRcts.c:1.2 xc/lib/X11/FillRcts.c:1.3 --- xc/lib/X11/FillRcts.c:1.2 Sun May 9 06:49:20 1999 +++ xc/lib/X11/FillRcts.c Wed Jan 17 14:41:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: FillRcts.c /main/11 1998/02/06 17:21:26 kaleb $ */ +/* $Xorg: FillRcts.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FillRcts.c,v 1.2 1999/05/09 10:49:20 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FillRcts.c,v 1.3 2001/01/17 19:41:35 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FilterEv.c diff -u xc/lib/X11/FilterEv.c:3.1 xc/lib/X11/FilterEv.c:3.2 --- xc/lib/X11/FilterEv.c:3.1 Sat Oct 3 04:41:17 1998 +++ xc/lib/X11/FilterEv.c Wed Jan 17 14:41:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: FilterEv.c /main/10 1998/02/06 17:21:51 kaleb $ */ +/* $Xorg: FilterEv.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* * Copyright 1990, 1991 by OMRON Corporation Index: xc/lib/X11/Flush.c diff -u xc/lib/X11/Flush.c:1.2 xc/lib/X11/Flush.c:1.3 --- xc/lib/X11/Flush.c:1.2 Sun May 9 06:49:20 1999 +++ xc/lib/X11/Flush.c Wed Jan 17 14:41:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: Flush.c /main/7 1998/02/06 17:22:02 kaleb $ */ +/* $Xorg: Flush.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Flush.c,v 1.2 1999/05/09 10:49:20 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Flush.c,v 1.3 2001/01/17 19:41:35 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Font.c diff -u xc/lib/X11/Font.c:1.11 xc/lib/X11/Font.c:1.13 --- xc/lib/X11/Font.c:1.11 Tue Sep 26 11:56:51 2000 +++ xc/lib/X11/Font.c Tue May 1 03:53:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: Font.c /main/30 1998/02/06 17:22:37 kaleb $ */ +/* $Xorg: Font.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright (c) 1986 X Consortium @@ -28,7 +28,7 @@ authorization from the X Consortium and the XFree86 Project. */ -/* $XFree86: xc/lib/X11/Font.c,v 1.11 2000/09/26 15:56:51 tsi Exp $ */ +/* $XFree86: xc/lib/X11/Font.c,v 1.13 2001/05/01 07:53:46 alanh Exp $ */ #define NEED_REPLIES #include "Xlibint.h" @@ -39,11 +39,7 @@ #ifdef USE_XF86BIGFONT #include #ifdef HAS_SHM -#ifndef __CYGWIN__ #include -#else -#include -#endif #include #endif Index: xc/lib/X11/FontInfo.c diff -u xc/lib/X11/FontInfo.c:1.4 xc/lib/X11/FontInfo.c:1.5 --- xc/lib/X11/FontInfo.c:1.4 Tue Sep 26 11:56:51 2000 +++ xc/lib/X11/FontInfo.c Wed Jan 17 14:41:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: FontInfo.c /main/17 1998/02/06 17:22:14 kaleb $ */ +/* $Xorg: FontInfo.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FontInfo.c,v 1.4 2000/09/26 15:56:51 tsi Exp $ */ +/* $XFree86: xc/lib/X11/FontInfo.c,v 1.5 2001/01/17 19:41:35 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/FontNames.c diff -u xc/lib/X11/FontNames.c:1.4 xc/lib/X11/FontNames.c:1.5 --- xc/lib/X11/FontNames.c:1.4 Sun May 9 06:49:21 1999 +++ xc/lib/X11/FontNames.c Wed Jan 17 14:41:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: FontNames.c /main/14 1998/05/17 09:16:03 kaleb $ */ +/* $Xorg: FontNames.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -21,7 +21,7 @@ */ -/* $XFree86: xc/lib/X11/FontNames.c,v 1.4 1999/05/09 10:49:21 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FontNames.c,v 1.5 2001/01/17 19:41:35 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/FreeCmap.c diff -u xc/lib/X11/FreeCmap.c:1.2 xc/lib/X11/FreeCmap.c:1.3 --- xc/lib/X11/FreeCmap.c:1.2 Sun May 9 06:49:22 1999 +++ xc/lib/X11/FreeCmap.c Wed Jan 17 14:41:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: FreeCmap.c /main/9 1998/02/06 17:22:49 kaleb $ */ +/* $Xorg: FreeCmap.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FreeCmap.c,v 1.2 1999/05/09 10:49:22 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FreeCmap.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FreeCols.c diff -u xc/lib/X11/FreeCols.c:1.2 xc/lib/X11/FreeCols.c:1.3 --- xc/lib/X11/FreeCols.c:1.2 Sun May 9 06:49:22 1999 +++ xc/lib/X11/FreeCols.c Wed Jan 17 14:41:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: FreeCols.c /main/8 1998/02/06 17:23:00 kaleb $ */ +/* $Xorg: FreeCols.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FreeCols.c,v 1.2 1999/05/09 10:49:22 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FreeCols.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FreeCurs.c diff -u xc/lib/X11/FreeCurs.c:1.2 xc/lib/X11/FreeCurs.c:1.3 --- xc/lib/X11/FreeCurs.c:1.2 Sun May 9 06:49:23 1999 +++ xc/lib/X11/FreeCurs.c Wed Jan 17 14:41:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: FreeCurs.c /main/6 1998/02/06 17:23:13 kaleb $ */ +/* $Xorg: FreeCurs.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FreeCurs.c,v 1.2 1999/05/09 10:49:23 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FreeCurs.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FreeEData.c diff -u xc/lib/X11/FreeEData.c:1.2 xc/lib/X11/FreeEData.c:1.3 --- xc/lib/X11/FreeEData.c:1.2 Sun May 9 06:49:23 1999 +++ xc/lib/X11/FreeEData.c Wed Jan 17 14:41:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: FreeEData.c /main/6 1998/02/06 17:23:24 kaleb $ */ +/* $Xorg: FreeEData.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FreeEData.c,v 1.2 1999/05/09 10:49:23 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FreeEData.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FreeGC.c diff -u xc/lib/X11/FreeGC.c:1.2 xc/lib/X11/FreeGC.c:1.3 --- xc/lib/X11/FreeGC.c:1.2 Sun May 9 06:49:23 1999 +++ xc/lib/X11/FreeGC.c Wed Jan 17 14:41:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: FreeGC.c /main/9 1998/02/06 17:23:35 kaleb $ */ +/* $Xorg: FreeGC.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FreeGC.c,v 1.2 1999/05/09 10:49:23 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FreeGC.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FreePix.c diff -u xc/lib/X11/FreePix.c:1.2 xc/lib/X11/FreePix.c:1.3 --- xc/lib/X11/FreePix.c:1.2 Sun May 9 06:49:24 1999 +++ xc/lib/X11/FreePix.c Wed Jan 17 14:41:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: FreePix.c /main/6 1998/02/06 17:23:46 kaleb $ */ +/* $Xorg: FreePix.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FreePix.c,v 1.2 1999/05/09 10:49:24 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FreePix.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/GCMisc.c diff -u xc/lib/X11/GCMisc.c:1.2 xc/lib/X11/GCMisc.c:1.3 --- xc/lib/X11/GCMisc.c:1.2 Sun May 9 06:49:24 1999 +++ xc/lib/X11/GCMisc.c Wed Jan 17 14:41:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: GCMisc.c /main/6 1998/02/06 17:24:20 kaleb $ */ +/* $Xorg: GCMisc.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GCMisc.c,v 1.2 1999/05/09 10:49:24 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GCMisc.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Geom.c diff -u xc/lib/X11/Geom.c:1.1.1.2 xc/lib/X11/Geom.c:1.1.1.3 --- xc/lib/X11/Geom.c:1.1.1.2 Sun Sep 27 03:55:51 1998 +++ xc/lib/X11/Geom.c Tue Jan 16 17:07:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: Geom.c /main/9 1998/02/06 17:24:31 kaleb $ */ +/* $Xorg: Geom.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /* Index: xc/lib/X11/GetAtomNm.c diff -u xc/lib/X11/GetAtomNm.c:3.2 xc/lib/X11/GetAtomNm.c:3.3 --- xc/lib/X11/GetAtomNm.c:3.2 Sun May 9 06:49:24 1999 +++ xc/lib/X11/GetAtomNm.c Wed Jan 17 14:41:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetAtomNm.c /main/12 1998/02/06 17:24:48 kaleb $ */ +/* $Xorg: GetAtomNm.c,v 1.4 2000/08/17 19:44:34 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetAtomNm.c,v 3.2 1999/05/09 10:49:24 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetAtomNm.c,v 3.3 2001/01/17 19:41:36 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/GetColor.c diff -u xc/lib/X11/GetColor.c:1.2 xc/lib/X11/GetColor.c:1.3 --- xc/lib/X11/GetColor.c:1.2 Sun May 9 06:49:25 1999 +++ xc/lib/X11/GetColor.c Wed Jan 17 14:41:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetColor.c /main/19 1998/02/06 17:24:59 kaleb $ */ +/* $Xorg: GetColor.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetColor.c,v 1.2 1999/05/09 10:49:25 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetColor.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ #define NEED_REPLIES #include Index: xc/lib/X11/GetDflt.c diff -u xc/lib/X11/GetDflt.c:3.16 xc/lib/X11/GetDflt.c:3.17 --- xc/lib/X11/GetDflt.c:3.16 Sun May 9 06:49:25 1999 +++ xc/lib/X11/GetDflt.c Wed Jan 17 14:41:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetDflt.c /main/59 1998/05/12 11:19:09 kaleb $ */ +/* $Xorg: GetDflt.c,v 1.5 2000/08/17 19:44:34 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/GetDflt.c,v 3.16 1999/05/09 10:49:25 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetDflt.c,v 3.17 2001/01/17 19:41:36 dawes Exp $ */ #include "Xlibint.h" #include Index: xc/lib/X11/GetFPath.c diff -u xc/lib/X11/GetFPath.c:1.2 xc/lib/X11/GetFPath.c:1.3 --- xc/lib/X11/GetFPath.c:1.2 Sun May 9 06:49:26 1999 +++ xc/lib/X11/GetFPath.c Wed Jan 17 14:41:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetFPath.c /main/8 1998/02/06 17:25:22 kaleb $ */ +/* $Xorg: GetFPath.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetFPath.c,v 1.2 1999/05/09 10:49:26 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetFPath.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/GetFProp.c diff -u xc/lib/X11/GetFProp.c:1.1.1.2 xc/lib/X11/GetFProp.c:1.1.1.3 --- xc/lib/X11/GetFProp.c:1.1.1.2 Sun Sep 27 03:55:53 1998 +++ xc/lib/X11/GetFProp.c Tue Jan 16 17:07:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetFProp.c /main/5 1998/02/06 17:25:33 kaleb $ */ +/* $Xorg: GetFProp.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/GetGCVals.c diff -u xc/lib/X11/GetGCVals.c:1.1.1.2 xc/lib/X11/GetGCVals.c:1.1.1.3 --- xc/lib/X11/GetGCVals.c:1.1.1.2 Sun Sep 27 03:55:54 1998 +++ xc/lib/X11/GetGCVals.c Tue Jan 16 17:07:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetGCVals.c /main/5 1998/02/06 17:25:45 kaleb $ */ +/* $Xorg: GetGCVals.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /* Index: xc/lib/X11/GetGeom.c diff -u xc/lib/X11/GetGeom.c:1.1.1.2 xc/lib/X11/GetGeom.c:1.1.1.3 --- xc/lib/X11/GetGeom.c:1.1.1.2 Sun Sep 27 03:55:54 1998 +++ xc/lib/X11/GetGeom.c Tue Jan 16 17:07:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetGeom.c /main/7 1998/02/06 17:25:56 kaleb $ */ +/* $Xorg: GetGeom.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/GetHColor.c diff -u xc/lib/X11/GetHColor.c:1.1.1.2 xc/lib/X11/GetHColor.c:1.1.1.3 --- xc/lib/X11/GetHColor.c:1.1.1.2 Sun Sep 27 03:55:55 1998 +++ xc/lib/X11/GetHColor.c Tue Jan 16 17:07:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetHColor.c /main/5 1998/02/06 17:26:07 kaleb $ */ +/* $Xorg: GetHColor.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/GetHints.c diff -u xc/lib/X11/GetHints.c:1.2 xc/lib/X11/GetHints.c:1.3 --- xc/lib/X11/GetHints.c:1.2 Sun May 9 06:49:26 1999 +++ xc/lib/X11/GetHints.c Wed Jan 17 14:41:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetHints.c /main/23 1998/02/06 17:26:18 kaleb $ */ +/* $Xorg: GetHints.c,v 1.4 2000/08/17 19:44:34 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/GetHints.c,v 1.2 1999/05/09 10:49:26 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetHints.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ #include #include Index: xc/lib/X11/GetIFocus.c diff -u xc/lib/X11/GetIFocus.c:1.2 xc/lib/X11/GetIFocus.c:1.3 --- xc/lib/X11/GetIFocus.c:1.2 Sun May 9 06:49:27 1999 +++ xc/lib/X11/GetIFocus.c Wed Jan 17 14:41:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetIFocus.c /main/6 1998/02/06 17:26:31 kaleb $ */ +/* $Xorg: GetIFocus.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetIFocus.c,v 1.2 1999/05/09 10:49:27 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetIFocus.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/GetImage.c diff -u xc/lib/X11/GetImage.c:1.2 xc/lib/X11/GetImage.c:1.3 --- xc/lib/X11/GetImage.c:1.2 Sun May 9 06:49:27 1999 +++ xc/lib/X11/GetImage.c Wed Jan 17 14:41:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetImage.c /main/17 1998/02/06 17:26:43 kaleb $ */ +/* $Xorg: GetImage.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetImage.c,v 1.2 1999/05/09 10:49:27 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetImage.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/GetKCnt.c diff -u xc/lib/X11/GetKCnt.c:1.4 xc/lib/X11/GetKCnt.c:1.5 --- xc/lib/X11/GetKCnt.c:1.4 Sun May 9 06:49:27 1999 +++ xc/lib/X11/GetKCnt.c Wed Jan 17 14:41:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetKCnt.c /main/13 1998/02/06 17:26:54 kaleb $ */ +/* $Xorg: GetKCnt.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetKCnt.c,v 1.4 1999/05/09 10:49:27 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetKCnt.c,v 1.5 2001/01/17 19:41:36 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/GetMoEv.c diff -u xc/lib/X11/GetMoEv.c:1.1.1.2 xc/lib/X11/GetMoEv.c:1.1.1.3 --- xc/lib/X11/GetMoEv.c:1.1.1.2 Sun Sep 27 03:55:57 1998 +++ xc/lib/X11/GetMoEv.c Tue Jan 16 17:07:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetMoEv.c /main/10 1998/02/06 17:27:07 kaleb $ */ +/* $Xorg: GetMoEv.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/GetNrmHint.c diff -u xc/lib/X11/GetNrmHint.c:1.1.1.2 xc/lib/X11/GetNrmHint.c:1.1.1.3 --- xc/lib/X11/GetNrmHint.c:1.1.1.2 Sun Sep 27 03:55:58 1998 +++ xc/lib/X11/GetNrmHint.c Tue Jan 16 17:07:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetNrmHint.c /main/8 1998/02/06 17:27:17 kaleb $ */ +/* $Xorg: GetNrmHint.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /*********************************************************** Copyright 1988 by Wyse Technology, Inc., San Jose, Ca, Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, Index: xc/lib/X11/GetPCnt.c diff -u xc/lib/X11/GetPCnt.c:1.2 xc/lib/X11/GetPCnt.c:1.3 --- xc/lib/X11/GetPCnt.c:1.2 Sun May 9 06:49:28 1999 +++ xc/lib/X11/GetPCnt.c Wed Jan 17 14:41:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetPCnt.c /main/6 1998/02/06 17:27:29 kaleb $ */ +/* $Xorg: GetPCnt.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetPCnt.c,v 1.2 1999/05/09 10:49:28 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetPCnt.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/GetPntMap.c diff -u xc/lib/X11/GetPntMap.c:1.4 xc/lib/X11/GetPntMap.c:1.5 --- xc/lib/X11/GetPntMap.c:1.4 Tue Sep 26 11:56:51 2000 +++ xc/lib/X11/GetPntMap.c Wed Jan 17 14:41:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetPntMap.c /main/14 1998/05/30 08:06:05 kaleb $ */ +/* $Xorg: GetPntMap.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -21,7 +21,7 @@ */ -/* $XFree86: xc/lib/X11/GetPntMap.c,v 1.4 2000/09/26 15:56:51 tsi Exp $ */ +/* $XFree86: xc/lib/X11/GetPntMap.c,v 1.5 2001/01/17 19:41:36 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/GetProp.c diff -u xc/lib/X11/GetProp.c:1.3 xc/lib/X11/GetProp.c:1.4 --- xc/lib/X11/GetProp.c:1.3 Thu Jun 15 19:59:06 2000 +++ xc/lib/X11/GetProp.c Wed Jan 17 14:41:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetProp.c /main/11 1998/02/06 17:27:52 kaleb $ */ +/* $Xorg: GetProp.c,v 1.4 2000/08/17 19:44:34 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetProp.c,v 1.3 2000/06/15 23:59:06 keithp Exp $ */ +/* $XFree86: xc/lib/X11/GetProp.c,v 1.4 2001/01/17 19:41:37 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/GetRGBCMap.c diff -u xc/lib/X11/GetRGBCMap.c:1.1.1.2 xc/lib/X11/GetRGBCMap.c:1.1.1.3 --- xc/lib/X11/GetRGBCMap.c:1.1.1.2 Sun Sep 27 03:56:00 1998 +++ xc/lib/X11/GetRGBCMap.c Tue Jan 16 17:07:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetRGBCMap.c /main/7 1998/02/06 17:28:03 kaleb $ */ +/* $Xorg: GetRGBCMap.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /* Index: xc/lib/X11/GetSOwner.c diff -u xc/lib/X11/GetSOwner.c:1.1.1.2 xc/lib/X11/GetSOwner.c:1.1.1.3 --- xc/lib/X11/GetSOwner.c:1.1.1.2 Sun Sep 27 03:56:00 1998 +++ xc/lib/X11/GetSOwner.c Tue Jan 16 17:07:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetSOwner.c /main/5 1998/02/06 17:28:14 kaleb $ */ +/* $Xorg: GetSOwner.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/GetSSaver.c diff -u xc/lib/X11/GetSSaver.c:1.2 xc/lib/X11/GetSSaver.c:1.3 --- xc/lib/X11/GetSSaver.c:1.2 Sun May 9 06:49:29 1999 +++ xc/lib/X11/GetSSaver.c Wed Jan 17 14:41:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetSSaver.c /main/6 1998/02/06 17:28:26 kaleb $ */ +/* $Xorg: GetSSaver.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetSSaver.c,v 1.2 1999/05/09 10:49:29 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetSSaver.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/GetStCmap.c diff -u xc/lib/X11/GetStCmap.c:1.1.1.2 xc/lib/X11/GetStCmap.c:1.1.1.3 --- xc/lib/X11/GetStCmap.c:1.1.1.2 Sun Sep 27 03:56:01 1998 +++ xc/lib/X11/GetStCmap.c Tue Jan 16 17:07:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetStCmap.c /main/10 1998/02/06 17:28:37 kaleb $ */ +/* $Xorg: GetStCmap.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/X11/GetTxtProp.c diff -u xc/lib/X11/GetTxtProp.c:1.1.1.2 xc/lib/X11/GetTxtProp.c:1.1.1.3 --- xc/lib/X11/GetTxtProp.c:1.1.1.2 Sun Sep 27 03:56:01 1998 +++ xc/lib/X11/GetTxtProp.c Tue Jan 16 17:07:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetTxtProp.c /main/8 1998/02/06 17:28:48 kaleb $ */ +/* $Xorg: GetTxtProp.c,v 1.3 2000/08/17 19:44:35 cpqbld Exp $ */ /*********************************************************** Copyright 1988 by Wyse Technology, Inc., San Jose, Ca., Index: xc/lib/X11/GetWAttrs.c diff -u xc/lib/X11/GetWAttrs.c:1.1.1.2 xc/lib/X11/GetWAttrs.c:1.1.1.3 --- xc/lib/X11/GetWAttrs.c:1.1.1.2 Sun Sep 27 03:56:02 1998 +++ xc/lib/X11/GetWAttrs.c Tue Jan 16 17:07:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetWAttrs.c /main/10 1998/02/06 17:29:01 kaleb $ */ +/* $Xorg: GetWAttrs.c,v 1.3 2000/08/17 19:44:35 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/GetWMCMapW.c diff -u xc/lib/X11/GetWMCMapW.c:1.1.1.2 xc/lib/X11/GetWMCMapW.c:1.1.1.3 --- xc/lib/X11/GetWMCMapW.c:1.1.1.2 Sun Sep 27 03:56:02 1998 +++ xc/lib/X11/GetWMCMapW.c Tue Jan 16 17:07:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetWMCMapW.c /main/7 1998/02/06 17:29:13 kaleb $ */ +/* $Xorg: GetWMCMapW.c,v 1.3 2000/08/17 19:44:35 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/X11/GetWMProto.c diff -u xc/lib/X11/GetWMProto.c:1.1.1.2 xc/lib/X11/GetWMProto.c:1.1.1.3 --- xc/lib/X11/GetWMProto.c:1.1.1.2 Sun Sep 27 03:56:03 1998 +++ xc/lib/X11/GetWMProto.c Tue Jan 16 17:07:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetWMProto.c /main/7 1998/02/06 17:29:24 kaleb $ */ +/* $Xorg: GetWMProto.c,v 1.3 2000/08/17 19:44:35 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/X11/GrButton.c diff -u xc/lib/X11/GrButton.c:1.2 xc/lib/X11/GrButton.c:1.3 --- xc/lib/X11/GrButton.c:1.2 Sun May 9 06:49:29 1999 +++ xc/lib/X11/GrButton.c Wed Jan 17 14:41:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: GrButton.c /main/6 1998/02/06 17:29:47 kaleb $ */ +/* $Xorg: GrButton.c,v 1.3 2000/08/17 19:44:35 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GrButton.c,v 1.2 1999/05/09 10:49:29 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GrButton.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/GrKey.c diff -u xc/lib/X11/GrKey.c:1.2 xc/lib/X11/GrKey.c:1.3 --- xc/lib/X11/GrKey.c:1.2 Sun May 9 06:49:29 1999 +++ xc/lib/X11/GrKey.c Wed Jan 17 14:41:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: GrKey.c /main/7 1998/02/06 17:30:10 kaleb $ */ +/* $Xorg: GrKey.c,v 1.3 2000/08/17 19:44:36 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GrKey.c,v 1.2 1999/05/09 10:49:29 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GrKey.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/GrKeybd.c diff -u xc/lib/X11/GrKeybd.c:1.1.1.2 xc/lib/X11/GrKeybd.c:1.1.1.3 --- xc/lib/X11/GrKeybd.c:1.1.1.2 Sun Sep 27 03:56:04 1998 +++ xc/lib/X11/GrKeybd.c Tue Jan 16 17:07:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: GrKeybd.c /main/6 1998/02/06 17:29:58 kaleb $ */ +/* $Xorg: GrKeybd.c,v 1.3 2000/08/17 19:44:36 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/GrPointer.c diff -u xc/lib/X11/GrPointer.c:1.1.1.2 xc/lib/X11/GrPointer.c:1.1.1.3 --- xc/lib/X11/GrPointer.c:1.1.1.2 Sun Sep 27 03:56:05 1998 +++ xc/lib/X11/GrPointer.c Tue Jan 16 17:07:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: GrPointer.c /main/5 1998/02/06 17:30:21 kaleb $ */ +/* $Xorg: GrPointer.c,v 1.3 2000/08/17 19:44:36 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/GrServer.c diff -u xc/lib/X11/GrServer.c:1.2 xc/lib/X11/GrServer.c:1.3 --- xc/lib/X11/GrServer.c:1.2 Sun May 9 06:49:30 1999 +++ xc/lib/X11/GrServer.c Wed Jan 17 14:41:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: GrServer.c /main/6 1998/02/06 17:30:31 kaleb $ */ +/* $Xorg: GrServer.c,v 1.3 2000/08/17 19:44:36 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GrServer.c,v 1.2 1999/05/09 10:49:30 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GrServer.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/HVC.c diff -u xc/lib/X11/HVC.c:1.2 xc/lib/X11/HVC.c:1.3 --- xc/lib/X11/HVC.c:1.2 Sun May 9 06:49:30 1999 +++ xc/lib/X11/HVC.c Wed Jan 17 14:41:37 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: HVC.c,v 1.13 93/09/07 21:30:46 rws Exp $ */ +/* $Xorg: HVC.c,v 1.3 2000/08/17 19:44:36 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -47,7 +47,7 @@ * DOCUMENTATION * "TekColor Color Management System, System Implementor's Manual" */ -/* $XFree86: xc/lib/X11/HVC.c,v 1.2 1999/05/09 10:49:30 dawes Exp $ */ +/* $XFree86: xc/lib/X11/HVC.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/HVCGcC.c diff -u xc/lib/X11/HVCGcC.c:1.2 xc/lib/X11/HVCGcC.c:1.3 --- xc/lib/X11/HVCGcC.c:1.2 Sun May 9 06:49:31 1999 +++ xc/lib/X11/HVCGcC.c Wed Jan 17 14:41:37 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: HVCGcC.c,v 1.8 93/07/05 11:43:37 rws Exp $" */ +/* $Xorg: HVCGcC.c,v 1.3 2000/08/17 19:44:36 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -43,7 +43,7 @@ * Source for XcmsTekHVCClipC() gamut compression routine. * */ -/* $XFree86: xc/lib/X11/HVCGcC.c,v 1.2 1999/05/09 10:49:31 dawes Exp $ */ +/* $XFree86: xc/lib/X11/HVCGcC.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/HVCGcV.c diff -u xc/lib/X11/HVCGcV.c:1.2 xc/lib/X11/HVCGcV.c:1.3 --- xc/lib/X11/HVCGcV.c:1.2 Sun May 9 06:49:31 1999 +++ xc/lib/X11/HVCGcV.c Wed Jan 17 14:41:37 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: HVCGcV.c,v 1.8 93/09/07 21:30:49 rws Exp $" */ +/* $Xorg: HVCGcV.c,v 1.3 2000/08/17 19:44:36 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -43,7 +43,7 @@ * Source for XcmsTekHVCClipV() gamut compression routine. * */ -/* $XFree86: xc/lib/X11/HVCGcV.c,v 1.2 1999/05/09 10:49:31 dawes Exp $ */ +/* $XFree86: xc/lib/X11/HVCGcV.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/HVCGcVC.c diff -u xc/lib/X11/HVCGcVC.c:1.2 xc/lib/X11/HVCGcVC.c:1.3 --- xc/lib/X11/HVCGcVC.c:1.2 Sun May 9 06:49:32 1999 +++ xc/lib/X11/HVCGcVC.c Wed Jan 17 14:41:37 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: HVCGcVC.c,v 1.11 94/02/07 22:30:20 rws Exp $" */ +/* $Xorg: HVCGcVC.c,v 1.3 2000/08/17 19:44:36 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -43,7 +43,7 @@ * Source for XcmsTekHVCClipVC() gamut * compression function. */ -/* $XFree86: xc/lib/X11/HVCGcVC.c,v 1.2 1999/05/09 10:49:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/HVCGcVC.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/HVCMnV.c diff -u xc/lib/X11/HVCMnV.c:1.1.1.1 xc/lib/X11/HVCMnV.c:1.1.1.2 --- xc/lib/X11/HVCMnV.c:1.1.1.1 Wed Apr 27 03:11:19 1994 +++ xc/lib/X11/HVCMnV.c Tue Jan 16 17:07:41 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: HVCMnV.c,v 1.7 93/09/07 21:30:53 rws Exp $" */ +/* $Xorg: HVCMnV.c,v 1.3 2000/08/17 19:44:37 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/HVCMxC.c diff -u xc/lib/X11/HVCMxC.c:1.2 xc/lib/X11/HVCMxC.c:1.3 --- xc/lib/X11/HVCMxC.c:1.2 Sun May 9 06:49:32 1999 +++ xc/lib/X11/HVCMxC.c Wed Jan 17 14:41:37 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: HVCMxC.c,v 1.9 93/09/07 21:30:55 rws Exp $" */ +/* $Xorg: HVCMxC.c,v 1.3 2000/08/17 19:44:37 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -44,7 +44,7 @@ * querying routine. * */ -/* $XFree86: xc/lib/X11/HVCMxC.c,v 1.2 1999/05/09 10:49:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/HVCMxC.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/HVCMxV.c diff -u xc/lib/X11/HVCMxV.c:1.2 xc/lib/X11/HVCMxV.c:1.3 --- xc/lib/X11/HVCMxV.c:1.2 Sun May 9 06:49:32 1999 +++ xc/lib/X11/HVCMxV.c Wed Jan 17 14:41:37 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: HVCMxV.c,v 1.9 93/09/07 21:30:58 rws Exp $" */ +/* $Xorg: HVCMxV.c,v 1.3 2000/08/17 19:44:37 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -44,7 +44,7 @@ * querying routine. * */ -/* $XFree86: xc/lib/X11/HVCMxV.c,v 1.2 1999/05/09 10:49:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/HVCMxV.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/HVCMxVC.c diff -u xc/lib/X11/HVCMxVC.c:1.1.1.1 xc/lib/X11/HVCMxVC.c:1.1.1.2 --- xc/lib/X11/HVCMxVC.c:1.1.1.1 Wed Apr 27 03:11:25 1994 +++ xc/lib/X11/HVCMxVC.c Tue Jan 16 17:07:41 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: HVCMxVC.c,v 1.8 93/10/07 18:49:10 rws Exp $" */ +/* $Xorg: HVCMxVC.c,v 1.3 2000/08/17 19:44:37 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/HVCMxVs.c diff -u xc/lib/X11/HVCMxVs.c:1.2 xc/lib/X11/HVCMxVs.c:1.3 --- xc/lib/X11/HVCMxVs.c:1.2 Sun May 9 06:49:33 1999 +++ xc/lib/X11/HVCMxVs.c Wed Jan 17 14:41:37 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: HVCMxVs.c,v 1.7 93/09/07 21:31:03 rws Exp $" */ +/* $Xorg: HVCMxVs.c,v 1.3 2000/08/17 19:44:37 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -43,7 +43,7 @@ * Source for the XcmsTekHVCQueryMaxVSamples() gamut boundary * querying routine. */ -/* $XFree86: xc/lib/X11/HVCMxVs.c,v 1.2 1999/05/09 10:49:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/HVCMxVs.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/HVCWpAj.c diff -u xc/lib/X11/HVCWpAj.c:1.1.1.1 xc/lib/X11/HVCWpAj.c:1.1.1.2 --- xc/lib/X11/HVCWpAj.c:1.1.1.1 Wed Apr 27 03:11:19 1994 +++ xc/lib/X11/HVCWpAj.c Tue Jan 16 17:07:42 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: HVCWpAj.c,v 1.4 91/05/13 22:48:45 rws Exp $" */ +/* $Xorg: HVCWpAj.c,v 1.3 2000/08/17 19:44:37 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/Host.c diff -u xc/lib/X11/Host.c:1.2 xc/lib/X11/Host.c:1.3 --- xc/lib/X11/Host.c:1.2 Sun May 9 06:49:33 1999 +++ xc/lib/X11/Host.c Wed Jan 17 14:41:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: Host.c /main/8 1998/02/06 17:30:43 kaleb $ */ +/* $Xorg: Host.c,v 1.3 2000/08/17 19:44:37 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Host.c,v 1.2 1999/05/09 10:49:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Host.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ /* this might be rightly reguarded an os dependent file */ Index: xc/lib/X11/ICWrap.c diff -u xc/lib/X11/ICWrap.c:1.3 xc/lib/X11/ICWrap.c:1.4 --- xc/lib/X11/ICWrap.c:1.3 Wed Nov 29 12:40:23 2000 +++ xc/lib/X11/ICWrap.c Wed Jan 17 14:41:37 2001 @@ -1,5 +1,5 @@ /* - * $TOG: ICWrap.c /main/10 1998/02/06 17:32:58 kaleb $ + * $Xorg: ICWrap.c,v 1.3 2000/08/17 19:44:37 cpqbld Exp $ */ /* @@ -60,7 +60,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/ICWrap.c,v 1.3 2000/11/29 17:40:23 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ICWrap.c,v 1.4 2001/01/17 19:41:37 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" Index: xc/lib/X11/IMWrap.c diff -u xc/lib/X11/IMWrap.c:3.6 xc/lib/X11/IMWrap.c:3.7 --- xc/lib/X11/IMWrap.c:3.6 Sun Dec 20 06:56:55 1998 +++ xc/lib/X11/IMWrap.c Wed Jan 17 14:41:37 2001 @@ -1,5 +1,5 @@ /* - * $TOG: IMWrap.c /main/14 1998/02/06 17:37:48 kaleb $ + * $Xorg: IMWrap.c,v 1.3 2000/08/17 19:44:37 cpqbld Exp $ */ /* @@ -53,7 +53,7 @@ */ -/* $XFree86: xc/lib/X11/IMWrap.c,v 3.6 1998/12/20 11:56:55 dawes Exp $ */ +/* $XFree86: xc/lib/X11/IMWrap.c,v 3.7 2001/01/17 19:41:37 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" Index: xc/lib/X11/Iconify.c diff -u xc/lib/X11/Iconify.c:1.1.1.2 xc/lib/X11/Iconify.c:1.1.1.3 --- xc/lib/X11/Iconify.c:1.1.1.2 Sun Sep 27 03:56:09 1998 +++ xc/lib/X11/Iconify.c Tue Jan 16 17:07:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: Iconify.c /main/9 1998/02/06 17:32:48 kaleb $ */ +/* $Xorg: Iconify.c,v 1.3 2000/08/17 19:44:37 cpqbld Exp $ */ /*********************************************************** Copyright 1988 by Wyse Technology, Inc., San Jose, Ca. Index: xc/lib/X11/IdOfPr.c diff -u xc/lib/X11/IdOfPr.c:1.1.1.1 xc/lib/X11/IdOfPr.c:1.1.1.2 --- xc/lib/X11/IdOfPr.c:1.1.1.1 Wed Apr 27 03:11:22 1994 +++ xc/lib/X11/IdOfPr.c Tue Jan 16 17:07:43 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: IdOfPr.c,v 1.6 91/11/06 16:45:23 rws Exp $" */ +/* $Xorg: IdOfPr.c,v 1.3 2000/08/17 19:44:38 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/IfEvent.c diff -u xc/lib/X11/IfEvent.c:1.2 xc/lib/X11/IfEvent.c:1.3 --- xc/lib/X11/IfEvent.c:1.2 Sun May 9 06:49:35 1999 +++ xc/lib/X11/IfEvent.c Wed Jan 17 14:41:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: IfEvent.c /main/9 1998/02/06 17:33:19 kaleb $ */ +/* $Xorg: IfEvent.c,v 1.3 2000/08/17 19:44:38 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/IfEvent.c,v 1.2 1999/05/09 10:49:35 dawes Exp $ */ +/* $XFree86: xc/lib/X11/IfEvent.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" Index: xc/lib/X11/ImText.c diff -u xc/lib/X11/ImText.c:1.2 xc/lib/X11/ImText.c:1.3 --- xc/lib/X11/ImText.c:1.2 Sun May 9 06:49:36 1999 +++ xc/lib/X11/ImText.c Wed Jan 17 14:41:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: ImText.c /main/12 1998/02/06 17:36:40 kaleb $ */ +/* $Xorg: ImText.c,v 1.3 2000/08/17 19:44:38 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ImText.c,v 1.2 1999/05/09 10:49:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ImText.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/ImText16.c diff -u xc/lib/X11/ImText16.c:1.2 xc/lib/X11/ImText16.c:1.3 --- xc/lib/X11/ImText16.c:1.2 Sun May 9 06:49:36 1999 +++ xc/lib/X11/ImText16.c Wed Jan 17 14:41:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: ImText16.c /main/12 1998/02/06 17:36:32 kaleb $ */ +/* $Xorg: ImText16.c,v 1.3 2000/08/17 19:44:38 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ImText16.c,v 1.2 1999/05/09 10:49:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ImText16.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/ImUtil.c diff -u xc/lib/X11/ImUtil.c:3.6 xc/lib/X11/ImUtil.c:3.7 --- xc/lib/X11/ImUtil.c:3.6 Sat Jan 29 13:58:10 2000 +++ xc/lib/X11/ImUtil.c Wed Jan 17 14:41:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: ImUtil.c /main/48 1998/02/06 17:37:38 kaleb $ */ +/* $Xorg: ImUtil.c,v 1.3 2000/08/17 19:44:38 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ImUtil.c,v 3.6 2000/01/29 18:58:10 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ImUtil.c,v 3.7 2001/01/17 19:41:38 dawes Exp $ */ #include #include Index: xc/lib/X11/Imakefile diff -u xc/lib/X11/Imakefile:3.34 xc/lib/X11/Imakefile:3.38 --- xc/lib/X11/Imakefile:3.34 Tue Nov 28 13:49:25 2000 +++ xc/lib/X11/Imakefile Tue May 1 06:35:05 2001 @@ -1,9 +1,10 @@ -XCOMM $TOG: Imakefile /main/196 1997/05/20 10:06:09 kaleb $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:44:38 cpqbld Exp $ -XCOMM $XFree86: xc/lib/X11/Imakefile,v 3.34 2000/11/28 18:49:25 dawes Exp $ +XCOMM $XFree86: xc/lib/X11/Imakefile,v 3.38 2001/05/01 10:35:05 alanh Exp $ + #define DoNormalLib NormalLibX11 #define DoSharedLib SharedLibX11 #define DoExtraLib SharedLibX11 @@ -92,7 +93,7 @@ #endif DEFINES = $(MALLOC_DEFINES) $(LIB_DEFINES) $(MISC_DEFINES) OPEN_DEFINES = -I$(EXTINCSRC) $(K5INCL) $(K5DEFS) - DEPEND_DEFINES = $(OPEN_DEFINES) $(TRANS_INCLUDES) $(CONN_DEFINES) $(THREADS_DEFINES) + DEPEND_DEFINES = $(OPEN_DEFINES) $(TRANS_INCLUDES) $(CONN_DEFINES) $(THREADS_DEFINES) DependDefines AUTHOBJS = AuDispose.o AuGetBest.o AuFileName.o AuRead.o AUTHSRCS = AuDispose.c AuGetBest.c AuFileName.c AuRead.c SRCS = $(SRCS1) $(SRCS2) $(SRCS3) /* try *.c if you have trouble */ @@ -899,8 +900,12 @@ #endif OBJS = $(OBJS1) $(OBJS2) $(OBJS3) + +#if UseCygIPC +REQUIREDLIBS = -lcygipc +#endif -#if !BuildServersOnly || XnestServer || BuildGLXLibrary +#if !BuildServersOnly || XnestServer || BuildGLXLibrary || BuildClients #include SpecialCLibObjectRule(ErrDes,$(ICONFIGFILES),$(EDB_DEFINES)) Index: xc/lib/X11/InitExt.c diff -u xc/lib/X11/InitExt.c:1.4 xc/lib/X11/InitExt.c:1.5 --- xc/lib/X11/InitExt.c:1.4 Sun May 9 06:49:37 1999 +++ xc/lib/X11/InitExt.c Wed Jan 17 14:41:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: InitExt.c /main/23 1998/02/06 17:37:56 kaleb $ */ +/* $Xorg: InitExt.c,v 1.3 2000/08/17 19:44:38 cpqbld Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/InitExt.c,v 1.4 1999/05/09 10:49:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/InitExt.c,v 1.5 2001/01/17 19:41:38 dawes Exp $ */ #include #include Index: xc/lib/X11/InsCmap.c diff -u xc/lib/X11/InsCmap.c:1.2 xc/lib/X11/InsCmap.c:1.3 --- xc/lib/X11/InsCmap.c:1.2 Sun May 9 06:49:37 1999 +++ xc/lib/X11/InsCmap.c Wed Jan 17 14:41:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: InsCmap.c /main/6 1998/02/06 17:38:04 kaleb $ */ +/* $Xorg: InsCmap.c,v 1.3 2000/08/17 19:44:38 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/InsCmap.c,v 1.2 1999/05/09 10:49:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/InsCmap.c,v 1.3 2001/01/17 19:41:38 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/IntAtom.c diff -u xc/lib/X11/IntAtom.c:1.2 xc/lib/X11/IntAtom.c:1.3 --- xc/lib/X11/IntAtom.c:1.2 Sun May 9 06:49:38 1999 +++ xc/lib/X11/IntAtom.c Wed Jan 17 14:41:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: IntAtom.c /main/20 1998/02/06 17:38:11 kaleb $ */ +/* $Xorg: IntAtom.c,v 1.4 2000/08/17 19:44:38 cpqbld Exp $ */ /* Copyright 1986, 1990, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/IntAtom.c,v 1.2 1999/05/09 10:49:38 dawes Exp $ */ +/* $XFree86: xc/lib/X11/IntAtom.c,v 1.3 2001/01/17 19:41:38 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/KeyBind.c diff -u xc/lib/X11/KeyBind.c:1.3 xc/lib/X11/KeyBind.c:1.4 --- xc/lib/X11/KeyBind.c:1.3 Mon Jan 31 09:40:58 2000 +++ xc/lib/X11/KeyBind.c Wed Jan 17 14:41:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: KeyBind.c /main/56 1998/02/06 17:38:19 kaleb $ */ +/* $Xorg: KeyBind.c,v 1.3 2000/08/17 19:44:38 cpqbld Exp $ */ /* Copyright 1985, 1987, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/KeyBind.c,v 1.3 2000/01/31 14:40:58 dawes Exp $ */ +/* $XFree86: xc/lib/X11/KeyBind.c,v 1.4 2001/01/17 19:41:38 dawes Exp $ */ /* Beware, here be monsters (still under construction... - JG */ Index: xc/lib/X11/KeysymStr.c diff -u xc/lib/X11/KeysymStr.c:3.5 xc/lib/X11/KeysymStr.c:3.6 --- xc/lib/X11/KeysymStr.c:3.5 Wed Dec 6 17:00:42 2000 +++ xc/lib/X11/KeysymStr.c Wed Jan 17 14:41:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: KeysymStr.c /main/13 1998/02/06 17:38:27 kaleb $ */ +/* $Xorg: KeysymStr.c,v 1.4 2000/08/17 19:44:39 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/KeysymStr.c,v 3.5 2000/12/06 22:00:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/KeysymStr.c,v 3.6 2001/01/17 19:41:38 dawes Exp $ */ #include "Xlibint.h" #include Index: xc/lib/X11/KillCl.c diff -u xc/lib/X11/KillCl.c:1.2 xc/lib/X11/KillCl.c:1.3 --- xc/lib/X11/KillCl.c:1.2 Sun May 9 06:49:39 1999 +++ xc/lib/X11/KillCl.c Wed Jan 17 14:41:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: KillCl.c /main/6 1998/02/06 17:38:34 kaleb $ */ +/* $Xorg: KillCl.c,v 1.3 2000/08/17 19:44:39 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/KillCl.c,v 1.2 1999/05/09 10:49:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/KillCl.c,v 1.3 2001/01/17 19:41:38 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/LRGB.c diff -u xc/lib/X11/LRGB.c:3.3 xc/lib/X11/LRGB.c:3.4 --- xc/lib/X11/LRGB.c:3.3 Sun May 9 06:49:40 1999 +++ xc/lib/X11/LRGB.c Wed Jan 17 14:41:38 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: LRGB.c,v 1.32 95/06/08 23:20:39 gildea Exp $" */ +/* $Xorg: LRGB.c,v 1.3 2000/08/17 19:44:39 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -35,7 +35,7 @@ * 4. RGB intensity to CIE XYZ * */ -/* $XFree86: xc/lib/X11/LRGB.c,v 3.3 1999/05/09 10:49:40 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LRGB.c,v 3.4 2001/01/17 19:41:38 dawes Exp $ */ #include #include Index: xc/lib/X11/Lab.c diff -u xc/lib/X11/Lab.c:1.2 xc/lib/X11/Lab.c:1.3 --- xc/lib/X11/Lab.c:1.2 Sun May 9 06:49:40 1999 +++ xc/lib/X11/Lab.c Wed Jan 17 14:41:38 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: Lab.c,v 1.11 93/09/07 21:31:18 rws Exp $ */ +/* $Xorg: Lab.c,v 1.3 2000/08/17 19:44:39 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -36,7 +36,7 @@ * * Note that the range for L* is 0 to 1. */ -/* $XFree86: xc/lib/X11/Lab.c,v 1.2 1999/05/09 10:49:40 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Lab.c,v 1.3 2001/01/17 19:41:38 dawes Exp $ */ #include Index: xc/lib/X11/LabGcC.c diff -u xc/lib/X11/LabGcC.c:1.2 xc/lib/X11/LabGcC.c:1.3 --- xc/lib/X11/LabGcC.c:1.2 Sun May 9 06:49:41 1999 +++ xc/lib/X11/LabGcC.c Wed Jan 17 14:41:38 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: LabGcC.c,v 1.1 91/07/24 23:26:14 rws Exp $ */ +/* $Xorg: LabGcC.c,v 1.3 2000/08/17 19:44:39 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -30,7 +30,7 @@ * Source for XcmsCIELabClipuv() gamut compression routine. * */ -/* $XFree86: xc/lib/X11/LabGcC.c,v 1.2 1999/05/09 10:49:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LabGcC.c,v 1.3 2001/01/17 19:41:38 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/LabGcL.c diff -u xc/lib/X11/LabGcL.c:1.2 xc/lib/X11/LabGcL.c:1.3 --- xc/lib/X11/LabGcL.c:1.2 Sun May 9 06:49:41 1999 +++ xc/lib/X11/LabGcL.c Wed Jan 17 14:41:38 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: LabGcL.c,v 1.3 93/09/07 21:31:21 rws Exp $ */ +/* $Xorg: LabGcL.c,v 1.3 2000/08/17 19:44:39 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -30,7 +30,7 @@ * Source for XcmsCIELabClipL() gamut compression routine. * */ -/* $XFree86: xc/lib/X11/LabGcL.c,v 1.2 1999/05/09 10:49:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LabGcL.c,v 1.3 2001/01/17 19:41:38 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/LabGcLC.c diff -u xc/lib/X11/LabGcLC.c:1.2 xc/lib/X11/LabGcLC.c:1.3 --- xc/lib/X11/LabGcLC.c:1.2 Sun May 9 06:49:41 1999 +++ xc/lib/X11/LabGcLC.c Wed Jan 17 14:41:39 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: LabGcLC.c,v 1.3 93/09/07 21:31:25 rws Exp $ */ +/* $Xorg: LabGcLC.c,v 1.3 2000/08/17 19:44:39 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -30,7 +30,7 @@ * Source for XcmsCIELabClipLab() gamut * compression function. */ -/* $XFree86: xc/lib/X11/LabGcLC.c,v 1.2 1999/05/09 10:49:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LabGcLC.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/LabMnL.c diff -u xc/lib/X11/LabMnL.c:1.2 xc/lib/X11/LabMnL.c:1.3 --- xc/lib/X11/LabMnL.c:1.2 Sun May 9 06:49:42 1999 +++ xc/lib/X11/LabMnL.c Wed Jan 17 14:41:39 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: LabMnL.c /main/4 1995/10/24 11:18:39 gildea $ */ +/* $Xorg: LabMnL.c,v 1.3 2000/08/17 19:44:39 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -31,7 +31,7 @@ * querying routine. * */ -/* $XFree86: xc/lib/X11/LabMnL.c,v 1.2 1999/05/09 10:49:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LabMnL.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/LabMxC.c diff -u xc/lib/X11/LabMxC.c:1.2 xc/lib/X11/LabMxC.c:1.3 --- xc/lib/X11/LabMxC.c:1.2 Sun May 9 06:49:42 1999 +++ xc/lib/X11/LabMxC.c Wed Jan 17 14:41:39 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: LabMxC.c,v 1.3 93/09/07 21:31:29 rws Exp $ */ +/* $Xorg: LabMxC.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -33,7 +33,7 @@ * querying routine. * */ -/* $XFree86: xc/lib/X11/LabMxC.c,v 1.2 1999/05/09 10:49:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LabMxC.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/LabMxL.c diff -u xc/lib/X11/LabMxL.c:1.2 xc/lib/X11/LabMxL.c:1.3 --- xc/lib/X11/LabMxL.c:1.2 Sun May 9 06:49:43 1999 +++ xc/lib/X11/LabMxL.c Wed Jan 17 14:41:39 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: LabMxL.c /main/4 1995/10/24 11:18:46 gildea $ */ +/* $Xorg: LabMxL.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -31,7 +31,7 @@ * querying routine. * */ -/* $XFree86: xc/lib/X11/LabMxL.c,v 1.2 1999/05/09 10:49:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LabMxL.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/LabMxLC.c diff -u xc/lib/X11/LabMxLC.c:1.1.1.1 xc/lib/X11/LabMxLC.c:1.1.1.2 --- xc/lib/X11/LabMxLC.c:1.1.1.1 Wed Apr 27 03:11:26 1994 +++ xc/lib/X11/LabMxLC.c Tue Jan 16 17:07:48 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: LabMxLC.c,v 1.4 93/10/07 18:49:34 rws Exp $ */ +/* $Xorg: LabMxLC.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/LabWpAj.c diff -u xc/lib/X11/LabWpAj.c:1.1.1.1 xc/lib/X11/LabWpAj.c:1.1.1.2 --- xc/lib/X11/LabWpAj.c:1.1.1.1 Wed Apr 27 03:11:26 1994 +++ xc/lib/X11/LabWpAj.c Tue Jan 16 17:07:48 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: LabWpAj.c,v 1.4 91/05/13 22:20:55 rws Exp $" */ +/* $Xorg: LabWpAj.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/LiHosts.c diff -u xc/lib/X11/LiHosts.c:1.3 xc/lib/X11/LiHosts.c:1.4 --- xc/lib/X11/LiHosts.c:1.3 Sat Oct 3 04:41:20 1998 +++ xc/lib/X11/LiHosts.c Wed Jan 17 14:41:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: LiHosts.c /main/15 1998/02/06 17:41:59 kaleb $ */ +/* $Xorg: LiHosts.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/LiICmaps.c diff -u xc/lib/X11/LiICmaps.c:1.2 xc/lib/X11/LiICmaps.c:1.3 --- xc/lib/X11/LiICmaps.c:1.2 Tue Sep 26 11:56:51 2000 +++ xc/lib/X11/LiICmaps.c Wed Jan 17 14:41:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: LiICmaps.c /main/7 1998/02/06 17:42:04 kaleb $ */ +/* $Xorg: LiICmaps.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/LiICmaps.c,v 1.2 2000/09/26 15:56:51 tsi Exp $ */ +/* $XFree86: xc/lib/X11/LiICmaps.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/LiProps.c diff -u xc/lib/X11/LiProps.c:1.2 xc/lib/X11/LiProps.c:1.3 --- xc/lib/X11/LiProps.c:1.2 Tue Sep 26 11:56:51 2000 +++ xc/lib/X11/LiProps.c Wed Jan 17 14:41:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: LiProps.c /main/8 1998/02/06 17:42:10 kaleb $ */ +/* $Xorg: LiProps.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/LiProps.c,v 1.2 2000/09/26 15:56:51 tsi Exp $ */ +/* $XFree86: xc/lib/X11/LiProps.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/ListExt.c diff -u xc/lib/X11/ListExt.c:1.2 xc/lib/X11/ListExt.c:1.3 --- xc/lib/X11/ListExt.c:1.2 Sun May 9 06:49:43 1999 +++ xc/lib/X11/ListExt.c Wed Jan 17 14:41:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: ListExt.c /main/9 1998/02/06 17:42:15 kaleb $ */ +/* $Xorg: ListExt.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ListExt.c,v 1.2 1999/05/09 10:49:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ListExt.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/LoadFont.c diff -u xc/lib/X11/LoadFont.c:1.1.1.2 xc/lib/X11/LoadFont.c:1.1.1.3 --- xc/lib/X11/LoadFont.c:1.1.1.2 Sun Sep 27 03:56:21 1998 +++ xc/lib/X11/LoadFont.c Tue Jan 16 17:07:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: LoadFont.c /main/8 1998/02/06 17:42:20 kaleb $ */ +/* $Xorg: LoadFont.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/LockDis.c diff -u xc/lib/X11/LockDis.c:1.1.1.2 xc/lib/X11/LockDis.c:1.1.1.3 --- xc/lib/X11/LockDis.c:1.1.1.2 Sun Sep 27 03:56:22 1998 +++ xc/lib/X11/LockDis.c Tue Jan 16 17:07:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: LockDis.c /main/11 1998/02/06 17:42:26 kaleb $ */ +/* $Xorg: LockDis.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ /* Index: xc/lib/X11/LookupCol.c diff -u xc/lib/X11/LookupCol.c:1.2 xc/lib/X11/LookupCol.c:1.3 --- xc/lib/X11/LookupCol.c:1.2 Sun May 9 06:49:44 1999 +++ xc/lib/X11/LookupCol.c Wed Jan 17 14:41:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: LookupCol.c /main/19 1998/02/06 17:42:44 kaleb $ */ +/* $Xorg: LookupCol.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ /* Copyright 1985, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/LookupCol.c,v 1.2 1999/05/09 10:49:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LookupCol.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ #define NEED_REPLIES #include Index: xc/lib/X11/LowerWin.c diff -u xc/lib/X11/LowerWin.c:1.2 xc/lib/X11/LowerWin.c:1.3 --- xc/lib/X11/LowerWin.c:1.2 Sun May 9 06:49:44 1999 +++ xc/lib/X11/LowerWin.c Wed Jan 17 14:41:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: LowerWin.c /main/8 1998/02/06 17:42:50 kaleb $ */ +/* $Xorg: LowerWin.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/LowerWin.c,v 1.2 1999/05/09 10:49:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LowerWin.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Luv.c diff -u xc/lib/X11/Luv.c:1.2 xc/lib/X11/Luv.c:1.3 --- xc/lib/X11/Luv.c:1.2 Sun May 9 06:49:44 1999 +++ xc/lib/X11/Luv.c Wed Jan 17 14:41:39 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: Luv.c,v 1.13 93/09/07 21:31:42 rws Exp $ */ +/* $Xorg: Luv.c,v 1.3 2000/08/17 19:44:41 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -38,7 +38,7 @@ * Fred W. Billmeyer & Max Saltzman, "Principles of Color * Technology", John Wily & Sons, Inc, 1981. */ -/* $XFree86: xc/lib/X11/Luv.c,v 1.2 1999/05/09 10:49:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Luv.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ #include #include "Xlibint.h" Index: xc/lib/X11/LuvGcC.c diff -u xc/lib/X11/LuvGcC.c:1.2 xc/lib/X11/LuvGcC.c:1.3 --- xc/lib/X11/LuvGcC.c:1.2 Sun May 9 06:49:45 1999 +++ xc/lib/X11/LuvGcC.c Wed Jan 17 14:41:39 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: LuvGcC.c,v 1.1 91/07/24 23:26:39 rws Exp $ */ +/* $Xorg: LuvGcC.c,v 1.3 2000/08/17 19:44:41 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -30,7 +30,7 @@ * Source for XcmsCIELuvClipuv() gamut compression routine. * */ -/* $XFree86: xc/lib/X11/LuvGcC.c,v 1.2 1999/05/09 10:49:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LuvGcC.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/LuvGcL.c diff -u xc/lib/X11/LuvGcL.c:1.2 xc/lib/X11/LuvGcL.c:1.3 --- xc/lib/X11/LuvGcL.c:1.2 Sun May 9 06:49:45 1999 +++ xc/lib/X11/LuvGcL.c Wed Jan 17 14:41:39 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: LuvGcL.c,v 1.3 93/09/07 21:31:45 rws Exp $ */ +/* $Xorg: LuvGcL.c,v 1.3 2000/08/17 19:44:41 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -30,7 +30,7 @@ * Source for XcmsCIELuvClipL() gamut compression routine. * */ -/* $XFree86: xc/lib/X11/LuvGcL.c,v 1.2 1999/05/09 10:49:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LuvGcL.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/LuvGcLC.c diff -u xc/lib/X11/LuvGcLC.c:1.2 xc/lib/X11/LuvGcLC.c:1.3 --- xc/lib/X11/LuvGcLC.c:1.2 Sun May 9 06:49:46 1999 +++ xc/lib/X11/LuvGcLC.c Wed Jan 17 14:41:39 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: LuvGcLC.c,v 1.3 93/09/07 21:31:47 rws Exp $ */ +/* $Xorg: LuvGcLC.c,v 1.3 2000/08/17 19:44:41 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -30,7 +30,7 @@ * Source for XcmsCIELuvClipLuv() gamut * compression function. */ -/* $XFree86: xc/lib/X11/LuvGcLC.c,v 1.2 1999/05/09 10:49:46 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LuvGcLC.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/LuvMnL.c diff -u xc/lib/X11/LuvMnL.c:1.2 xc/lib/X11/LuvMnL.c:1.3 --- xc/lib/X11/LuvMnL.c:1.2 Sun May 9 06:49:46 1999 +++ xc/lib/X11/LuvMnL.c Wed Jan 17 14:41:39 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: LuvMnL.c /main/4 1995/10/24 11:18:53 gildea $ */ +/* $Xorg: LuvMnL.c,v 1.3 2000/08/17 19:44:41 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -31,7 +31,7 @@ * querying routine. * */ -/* $XFree86: xc/lib/X11/LuvMnL.c,v 1.2 1999/05/09 10:49:46 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LuvMnL.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/LuvMxC.c diff -u xc/lib/X11/LuvMxC.c:1.2 xc/lib/X11/LuvMxC.c:1.3 --- xc/lib/X11/LuvMxC.c:1.2 Sun May 9 06:49:47 1999 +++ xc/lib/X11/LuvMxC.c Wed Jan 17 14:41:39 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: LuvMxC.c,v 1.3 93/09/07 21:31:54 rws Exp $ */ +/* $Xorg: LuvMxC.c,v 1.3 2000/08/17 19:44:41 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -33,7 +33,7 @@ * querying routine. * */ -/* $XFree86: xc/lib/X11/LuvMxC.c,v 1.2 1999/05/09 10:49:47 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LuvMxC.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/LuvMxL.c diff -u xc/lib/X11/LuvMxL.c:1.2 xc/lib/X11/LuvMxL.c:1.3 --- xc/lib/X11/LuvMxL.c:1.2 Sun May 9 06:49:47 1999 +++ xc/lib/X11/LuvMxL.c Wed Jan 17 14:41:40 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: LuvMxL.c /main/4 1995/10/24 11:18:58 gildea $ */ +/* $Xorg: LuvMxL.c,v 1.3 2000/08/17 19:44:45 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -31,7 +31,7 @@ * querying routine. * */ -/* $XFree86: xc/lib/X11/LuvMxL.c,v 1.2 1999/05/09 10:49:47 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LuvMxL.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/LuvMxLC.c diff -u xc/lib/X11/LuvMxLC.c:1.1.1.1 xc/lib/X11/LuvMxLC.c:1.1.1.2 --- xc/lib/X11/LuvMxLC.c:1.1.1.1 Wed Apr 27 03:11:28 1994 +++ xc/lib/X11/LuvMxLC.c Tue Jan 16 17:07:52 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: LuvMxLC.c,v 1.4 93/10/07 18:49:37 rws Exp $ */ +/* $Xorg: LuvMxLC.c,v 1.3 2000/08/17 19:44:45 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/LuvWpAj.c diff -u xc/lib/X11/LuvWpAj.c:1.1.1.1 xc/lib/X11/LuvWpAj.c:1.1.1.2 --- xc/lib/X11/LuvWpAj.c:1.1.1.1 Wed Apr 27 03:11:28 1994 +++ xc/lib/X11/LuvWpAj.c Tue Jan 16 17:07:53 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: LuvWpAj.c,v 1.4 91/05/13 22:22:56 rws Exp $" */ +/* $Xorg: LuvWpAj.c,v 1.3 2000/08/17 19:44:45 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/Macros.c diff -u xc/lib/X11/Macros.c:1.2 xc/lib/X11/Macros.c:1.3 --- xc/lib/X11/Macros.c:1.2 Sun May 9 06:49:47 1999 +++ xc/lib/X11/Macros.c Wed Jan 17 14:41:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: Macros.c /main/16 1998/02/06 17:43:56 kaleb $ */ +/* $Xorg: Macros.c,v 1.3 2000/08/17 19:44:45 cpqbld Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Macros.c,v 1.2 1999/05/09 10:49:47 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Macros.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ #include "Xlibint.h" /* Index: xc/lib/X11/MapRaised.c diff -u xc/lib/X11/MapRaised.c:1.2 xc/lib/X11/MapRaised.c:1.3 --- xc/lib/X11/MapRaised.c:1.2 Sun May 9 06:49:48 1999 +++ xc/lib/X11/MapRaised.c Wed Jan 17 14:41:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: MapRaised.c /main/7 1998/02/06 17:44:01 kaleb $ */ +/* $Xorg: MapRaised.c,v 1.3 2000/08/17 19:44:46 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/MapRaised.c,v 1.2 1999/05/09 10:49:48 dawes Exp $ */ +/* $XFree86: xc/lib/X11/MapRaised.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/MapSubs.c diff -u xc/lib/X11/MapSubs.c:1.2 xc/lib/X11/MapSubs.c:1.3 --- xc/lib/X11/MapSubs.c:1.2 Sun May 9 06:49:48 1999 +++ xc/lib/X11/MapSubs.c Wed Jan 17 14:41:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: MapSubs.c /main/6 1998/02/06 17:44:07 kaleb $ */ +/* $Xorg: MapSubs.c,v 1.3 2000/08/17 19:44:46 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/MapSubs.c,v 1.2 1999/05/09 10:49:48 dawes Exp $ */ +/* $XFree86: xc/lib/X11/MapSubs.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/MapWindow.c diff -u xc/lib/X11/MapWindow.c:1.2 xc/lib/X11/MapWindow.c:1.3 --- xc/lib/X11/MapWindow.c:1.2 Sun May 9 06:49:49 1999 +++ xc/lib/X11/MapWindow.c Wed Jan 17 14:41:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: MapWindow.c /main/6 1998/02/06 17:44:12 kaleb $ */ +/* $Xorg: MapWindow.c,v 1.3 2000/08/17 19:44:46 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/MapWindow.c,v 1.2 1999/05/09 10:49:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/MapWindow.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/MaskEvent.c diff -u xc/lib/X11/MaskEvent.c:3.2 xc/lib/X11/MaskEvent.c:3.3 --- xc/lib/X11/MaskEvent.c:3.2 Sun May 9 06:49:49 1999 +++ xc/lib/X11/MaskEvent.c Wed Jan 17 14:41:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: MaskEvent.c /main/14 1998/02/06 17:44:18 kaleb $ */ +/* $Xorg: MaskEvent.c,v 1.3 2000/08/17 19:44:46 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/MaskEvent.c,v 3.2 1999/05/09 10:49:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/MaskEvent.c,v 3.3 2001/01/17 19:41:40 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" Index: xc/lib/X11/Misc.c diff -u xc/lib/X11/Misc.c:1.2 xc/lib/X11/Misc.c:1.3 --- xc/lib/X11/Misc.c:1.2 Sun May 9 06:49:49 1999 +++ xc/lib/X11/Misc.c Wed Jan 17 14:41:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: Misc.c /main/8 1998/02/06 17:44:35 kaleb $ */ +/* $Xorg: Misc.c,v 1.3 2000/08/17 19:44:46 cpqbld Exp $ */ /* Copyright 1988, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Misc.c,v 1.2 1999/05/09 10:49:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Misc.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ModMap.c diff -u xc/lib/X11/ModMap.c:1.2 xc/lib/X11/ModMap.c:1.3 --- xc/lib/X11/ModMap.c:1.2 Sun May 9 06:49:50 1999 +++ xc/lib/X11/ModMap.c Wed Jan 17 14:41:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: ModMap.c /main/16 1998/02/06 17:44:41 kaleb $ */ +/* $Xorg: ModMap.c,v 1.3 2000/08/17 19:44:46 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ModMap.c,v 1.2 1999/05/09 10:49:50 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ModMap.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/MoveWin.c diff -u xc/lib/X11/MoveWin.c:1.2 xc/lib/X11/MoveWin.c:1.3 --- xc/lib/X11/MoveWin.c:1.2 Sun May 9 06:49:50 1999 +++ xc/lib/X11/MoveWin.c Wed Jan 17 14:41:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: MoveWin.c /main/9 1998/02/06 17:44:47 kaleb $ */ +/* $Xorg: MoveWin.c,v 1.3 2000/08/17 19:44:46 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/MoveWin.c,v 1.2 1999/05/09 10:49:50 dawes Exp $ */ +/* $XFree86: xc/lib/X11/MoveWin.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/NextEvent.c diff -u xc/lib/X11/NextEvent.c:1.2 xc/lib/X11/NextEvent.c:1.3 --- xc/lib/X11/NextEvent.c:1.2 Sun May 9 06:49:51 1999 +++ xc/lib/X11/NextEvent.c Wed Jan 17 14:41:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: NextEvent.c /main/8 1998/02/06 17:44:53 kaleb $ */ +/* $Xorg: NextEvent.c,v 1.3 2000/08/17 19:44:47 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/NextEvent.c,v 1.2 1999/05/09 10:49:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/NextEvent.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" Index: xc/lib/X11/OCWrap.c diff -u xc/lib/X11/OCWrap.c:1.2 xc/lib/X11/OCWrap.c:1.3 --- xc/lib/X11/OCWrap.c:1.2 Sun May 9 06:49:51 1999 +++ xc/lib/X11/OCWrap.c Wed Jan 17 14:41:40 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: OCWrap.c,v 1.1 94/01/20 17:54:55 rws Exp $ */ +/* $Xorg: OCWrap.c,v 1.4 2000/08/17 19:44:47 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/OCWrap.c,v 1.2 1999/05/09 10:49:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/OCWrap.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" Index: xc/lib/X11/OMWrap.c diff -u xc/lib/X11/OMWrap.c:1.2 xc/lib/X11/OMWrap.c:1.3 --- xc/lib/X11/OMWrap.c:1.2 Sun May 9 06:49:51 1999 +++ xc/lib/X11/OMWrap.c Wed Jan 17 14:41:40 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: OMWrap.c /main/3 1996/01/05 11:22:34 kaleb $ */ +/* $Xorg: OMWrap.c,v 1.4 2000/08/17 19:44:47 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/OMWrap.c,v 1.2 1999/05/09 10:49:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/OMWrap.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" Index: xc/lib/X11/OfCCC.c diff -u xc/lib/X11/OfCCC.c:1.1.1.1 xc/lib/X11/OfCCC.c:1.1.1.2 --- xc/lib/X11/OfCCC.c:1.1.1.1 Wed Apr 27 03:11:19 1994 +++ xc/lib/X11/OfCCC.c Tue Jan 16 17:07:55 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: OfCCC.c,v 1.1 91/05/13 22:37:17 rws Exp $ */ +/* $Xorg: OfCCC.c,v 1.3 2000/08/17 19:44:47 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/OpenDis.c diff -u xc/lib/X11/OpenDis.c:3.8 xc/lib/X11/OpenDis.c:3.9 --- xc/lib/X11/OpenDis.c:3.8 Mon Nov 27 00:06:44 2000 +++ xc/lib/X11/OpenDis.c Wed Jan 17 14:41:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: OpenDis.c /main/111 1998/02/06 17:46:07 kaleb $ */ +/* $Xorg: OpenDis.c,v 1.3 2000/08/17 19:44:47 cpqbld Exp $ */ /* Copyright 1985, 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/OpenDis.c,v 3.8 2000/11/27 05:06:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/OpenDis.c,v 3.9 2001/01/17 19:41:41 dawes Exp $ */ #define NEED_REPLIES #define NEED_EVENTS Index: xc/lib/X11/ParseCmd.c diff -u xc/lib/X11/ParseCmd.c:1.2 xc/lib/X11/ParseCmd.c:1.3 --- xc/lib/X11/ParseCmd.c:1.2 Sun Dec 20 06:56:57 1998 +++ xc/lib/X11/ParseCmd.c Wed Jan 17 14:41:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: ParseCmd.c /main/26 1998/02/06 17:46:14 kaleb $ */ +/* $Xorg: ParseCmd.c,v 1.3 2000/08/17 19:44:47 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/ParseCmd.c,v 1.2 1998/12/20 11:56:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ParseCmd.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ /* XrmParseCommand() Index: xc/lib/X11/ParseCol.c diff -u xc/lib/X11/ParseCol.c:1.2 xc/lib/X11/ParseCol.c:1.3 --- xc/lib/X11/ParseCol.c:1.2 Sun May 9 06:49:52 1999 +++ xc/lib/X11/ParseCol.c Wed Jan 17 14:41:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: ParseCol.c /main/20 1998/02/06 17:46:21 kaleb $ */ +/* $Xorg: ParseCol.c,v 1.3 2000/08/17 19:44:47 cpqbld Exp $ */ /* Copyright 1985, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ParseCol.c,v 1.2 1999/05/09 10:49:52 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ParseCol.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ #define NEED_REPLIES #include Index: xc/lib/X11/ParseGeom.c diff -u xc/lib/X11/ParseGeom.c:1.1.1.2 xc/lib/X11/ParseGeom.c:1.1.1.3 --- xc/lib/X11/ParseGeom.c:1.1.1.2 Sun Sep 27 03:56:32 1998 +++ xc/lib/X11/ParseGeom.c Tue Jan 16 17:07:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: ParseGeom.c /main/11 1998/02/06 17:46:27 kaleb $ */ +/* $Xorg: ParseGeom.c,v 1.3 2000/08/17 19:44:47 cpqbld Exp $ */ /* Index: xc/lib/X11/PeekEvent.c diff -u xc/lib/X11/PeekEvent.c:1.2 xc/lib/X11/PeekEvent.c:1.3 --- xc/lib/X11/PeekEvent.c:1.2 Sun May 9 06:49:53 1999 +++ xc/lib/X11/PeekEvent.c Wed Jan 17 14:41:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: PeekEvent.c /main/8 1998/02/06 17:46:33 kaleb $ */ +/* $Xorg: PeekEvent.c,v 1.3 2000/08/17 19:44:47 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PeekEvent.c,v 1.2 1999/05/09 10:49:53 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PeekEvent.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" Index: xc/lib/X11/PeekIfEv.c diff -u xc/lib/X11/PeekIfEv.c:1.2 xc/lib/X11/PeekIfEv.c:1.3 --- xc/lib/X11/PeekIfEv.c:1.2 Sun May 9 06:49:53 1999 +++ xc/lib/X11/PeekIfEv.c Wed Jan 17 14:41:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: PeekIfEv.c /main/9 1998/02/06 17:46:39 kaleb $ */ +/* $Xorg: PeekIfEv.c,v 1.3 2000/08/17 19:44:48 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PeekIfEv.c,v 1.2 1999/05/09 10:49:53 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PeekIfEv.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" Index: xc/lib/X11/Pending.c diff -u xc/lib/X11/Pending.c:1.1.1.2 xc/lib/X11/Pending.c:1.1.1.3 --- xc/lib/X11/Pending.c:1.1.1.2 Sun Sep 27 03:56:33 1998 +++ xc/lib/X11/Pending.c Tue Jan 16 17:07:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: Pending.c /main/7 1998/02/06 17:46:45 kaleb $ */ +/* $Xorg: Pending.c,v 1.3 2000/08/17 19:44:48 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/PixFormats.c diff -u xc/lib/X11/PixFormats.c:1.1.1.2 xc/lib/X11/PixFormats.c:1.1.1.3 --- xc/lib/X11/PixFormats.c:1.1.1.2 Sun Sep 27 03:56:34 1998 +++ xc/lib/X11/PixFormats.c Tue Jan 16 17:07:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: PixFormats.c /main/7 1998/02/06 17:46:50 kaleb $ */ +/* $Xorg: PixFormats.c,v 1.3 2000/08/17 19:44:48 cpqbld Exp $ */ /* Copyright 1989, 1998 The Open Group Index: xc/lib/X11/PmapBgnd.c diff -u xc/lib/X11/PmapBgnd.c:1.2 xc/lib/X11/PmapBgnd.c:1.3 --- xc/lib/X11/PmapBgnd.c:1.2 Sun May 9 06:49:53 1999 +++ xc/lib/X11/PmapBgnd.c Wed Jan 17 14:41:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: PmapBgnd.c /main/7 1998/02/06 17:46:56 kaleb $ */ +/* $Xorg: PmapBgnd.c,v 1.3 2000/08/17 19:44:48 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PmapBgnd.c,v 1.2 1999/05/09 10:49:53 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PmapBgnd.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/PmapBord.c diff -u xc/lib/X11/PmapBord.c:1.2 xc/lib/X11/PmapBord.c:1.3 --- xc/lib/X11/PmapBord.c:1.2 Sun May 9 06:49:54 1999 +++ xc/lib/X11/PmapBord.c Wed Jan 17 14:41:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: PmapBord.c /main/7 1998/02/06 17:47:02 kaleb $ */ +/* $Xorg: PmapBord.c,v 1.3 2000/08/17 19:44:48 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PmapBord.c,v 1.2 1999/05/09 10:49:54 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PmapBord.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/PolyReg.c diff -u xc/lib/X11/PolyReg.c:1.4 xc/lib/X11/PolyReg.c:1.5 --- xc/lib/X11/PolyReg.c:1.4 Sat Oct 3 04:41:21 1998 +++ xc/lib/X11/PolyReg.c Wed Jan 17 14:41:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: PolyReg.c /main/15 1998/02/06 17:47:08 kaleb $ */ +/* $Xorg: PolyReg.c,v 1.4 2000/08/17 19:44:48 cpqbld Exp $ */ /************************************************************************ Copyright 1987, 1998 The Open Group @@ -41,7 +41,7 @@ SOFTWARE. ************************************************************************/ -/* $XFree86: xc/lib/X11/PolyReg.c,v 1.4 1998/10/03 08:41:21 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PolyReg.c,v 1.5 2001/01/17 19:41:41 dawes Exp $ */ #define LARGE_COORDINATE 1000000 #define SMALL_COORDINATE -LARGE_COORDINATE Index: xc/lib/X11/PolyTxt.c diff -u xc/lib/X11/PolyTxt.c:3.3 xc/lib/X11/PolyTxt.c:3.4 --- xc/lib/X11/PolyTxt.c:3.3 Sun May 9 06:49:54 1999 +++ xc/lib/X11/PolyTxt.c Wed Jan 17 14:41:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: PolyTxt.c /main/15 1998/02/06 17:47:21 kaleb $ */ +/* $Xorg: PolyTxt.c,v 1.3 2000/08/17 19:44:48 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PolyTxt.c,v 3.3 1999/05/09 10:49:54 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PolyTxt.c,v 3.4 2001/01/17 19:41:41 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/PolyTxt16.c diff -u xc/lib/X11/PolyTxt16.c:1.2 xc/lib/X11/PolyTxt16.c:1.3 --- xc/lib/X11/PolyTxt16.c:1.2 Sun May 9 06:49:54 1999 +++ xc/lib/X11/PolyTxt16.c Wed Jan 17 14:41:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: PolyTxt16.c /main/14 1998/02/06 17:47:14 kaleb $ */ +/* $Xorg: PolyTxt16.c,v 1.3 2000/08/17 19:44:48 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PolyTxt16.c,v 1.2 1999/05/09 10:49:54 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PolyTxt16.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/PrOfId.c diff -u xc/lib/X11/PrOfId.c:1.1.1.1 xc/lib/X11/PrOfId.c:1.1.1.2 --- xc/lib/X11/PrOfId.c:1.1.1.1 Wed Apr 27 03:11:01 1994 +++ xc/lib/X11/PrOfId.c Tue Jan 16 17:07:59 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PrOfId.c,v 1.5 91/05/13 23:26:56 rws Exp $" */ +/* $Xorg: PrOfId.c,v 1.3 2000/08/17 19:44:48 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/PropAlloc.c diff -u xc/lib/X11/PropAlloc.c:1.2 xc/lib/X11/PropAlloc.c:1.3 --- xc/lib/X11/PropAlloc.c:1.2 Sun May 9 06:49:55 1999 +++ xc/lib/X11/PropAlloc.c Wed Jan 17 14:41:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: PropAlloc.c /main/7 1998/02/06 17:47:38 kaleb $ */ +/* $Xorg: PropAlloc.c,v 1.4 2000/08/17 19:44:48 cpqbld Exp $ */ /* Copyright 1989, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PropAlloc.c,v 1.2 1999/05/09 10:49:55 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PropAlloc.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ #include "Xlibint.h" #include "Xutil.h" Index: xc/lib/X11/PutBEvent.c diff -u xc/lib/X11/PutBEvent.c:1.2 xc/lib/X11/PutBEvent.c:1.3 --- xc/lib/X11/PutBEvent.c:1.2 Sun May 9 06:49:55 1999 +++ xc/lib/X11/PutBEvent.c Wed Jan 17 14:41:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: PutBEvent.c /main/8 1998/02/06 17:47:43 kaleb $ */ +/* $Xorg: PutBEvent.c,v 1.3 2000/08/17 19:44:49 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/PutBEvent.c,v 1.2 1999/05/09 10:49:55 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PutBEvent.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ /* XPutBackEvent puts an event back at the head of the queue. */ #define NEED_EVENTS Index: xc/lib/X11/PutImage.c diff -u xc/lib/X11/PutImage.c:3.5 xc/lib/X11/PutImage.c:3.6 --- xc/lib/X11/PutImage.c:3.5 Sun May 9 06:49:56 1999 +++ xc/lib/X11/PutImage.c Wed Jan 17 14:41:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: PutImage.c /main/44 1998/02/06 17:47:49 kaleb $ */ +/* $Xorg: PutImage.c,v 1.3 2000/08/17 19:44:49 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PutImage.c,v 3.5 1999/05/09 10:49:56 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PutImage.c,v 3.6 2001/01/17 19:41:41 dawes Exp $ */ #include "Xlibint.h" #include "Xutil.h" Index: xc/lib/X11/QBlack.c diff -u xc/lib/X11/QBlack.c:1.1.1.1 xc/lib/X11/QBlack.c:1.1.1.2 --- xc/lib/X11/QBlack.c:1.1.1.1 Wed Apr 27 03:11:22 1994 +++ xc/lib/X11/QBlack.c Tue Jan 16 17:08:00 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: QBlack.c,v 1.3 93/09/07 21:32:17 rws Exp $ */ +/* $Xorg: QBlack.c,v 1.3 2000/08/17 19:44:49 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/QBlue.c diff -u xc/lib/X11/QBlue.c:1.1.1.1 xc/lib/X11/QBlue.c:1.1.1.2 --- xc/lib/X11/QBlue.c:1.1.1.1 Wed Apr 27 03:11:22 1994 +++ xc/lib/X11/QBlue.c Tue Jan 16 17:08:00 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: QBlue.c,v 1.3 93/09/07 21:32:19 rws Exp $ */ +/* $Xorg: QBlue.c,v 1.3 2000/08/17 19:44:49 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/QGreen.c diff -u xc/lib/X11/QGreen.c:1.1.1.1 xc/lib/X11/QGreen.c:1.1.1.2 --- xc/lib/X11/QGreen.c:1.1.1.1 Wed Apr 27 03:11:18 1994 +++ xc/lib/X11/QGreen.c Tue Jan 16 17:08:00 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: QGreen.c,v 1.3 93/09/07 21:32:21 rws Exp $ */ +/* $Xorg: QGreen.c,v 1.3 2000/08/17 19:44:49 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/QRed.c diff -u xc/lib/X11/QRed.c:1.1.1.1 xc/lib/X11/QRed.c:1.1.1.2 --- xc/lib/X11/QRed.c:1.1.1.1 Wed Apr 27 03:11:22 1994 +++ xc/lib/X11/QRed.c Tue Jan 16 17:08:01 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: QRed.c,v 1.3 93/09/07 21:32:24 rws Exp $ */ +/* $Xorg: QRed.c,v 1.3 2000/08/17 19:44:49 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/QWhite.c diff -u xc/lib/X11/QWhite.c:1.1.1.1 xc/lib/X11/QWhite.c:1.1.1.2 --- xc/lib/X11/QWhite.c:1.1.1.1 Wed Apr 27 03:11:22 1994 +++ xc/lib/X11/QWhite.c Tue Jan 16 17:08:01 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: QWhite.c,v 1.3 93/09/07 21:32:26 rws Exp $ */ +/* $Xorg: QWhite.c,v 1.3 2000/08/17 19:44:49 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/QuBest.c diff -u xc/lib/X11/QuBest.c:1.1.1.2 xc/lib/X11/QuBest.c:1.1.1.3 --- xc/lib/X11/QuBest.c:1.1.1.2 Sun Sep 27 03:56:39 1998 +++ xc/lib/X11/QuBest.c Tue Jan 16 17:08:01 2001 @@ -1,4 +1,4 @@ -/* $TOG: QuBest.c /main/5 1998/02/06 17:48:26 kaleb $ */ +/* $Xorg: QuBest.c,v 1.3 2000/08/17 19:44:49 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/QuCol.c diff -u xc/lib/X11/QuCol.c:1.2 xc/lib/X11/QuCol.c:1.3 --- xc/lib/X11/QuCol.c:1.2 Sun May 9 06:49:56 1999 +++ xc/lib/X11/QuCol.c Wed Jan 17 14:41:42 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: QuCol.c,v 1.4 91/05/13 23:27:56 rws Exp $" */ +/* $Xorg: QuCol.c,v 1.3 2000/08/17 19:44:50 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -32,7 +32,7 @@ * * */ -/* $XFree86: xc/lib/X11/QuCol.c,v 1.2 1999/05/09 10:49:56 dawes Exp $ */ +/* $XFree86: xc/lib/X11/QuCol.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/QuColor.c diff -u xc/lib/X11/QuColor.c:1.2 xc/lib/X11/QuColor.c:1.3 --- xc/lib/X11/QuColor.c:1.2 Sun May 9 06:49:57 1999 +++ xc/lib/X11/QuColor.c Wed Jan 17 14:41:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: QuColor.c /main/8 1998/02/06 17:48:39 kaleb $ */ +/* $Xorg: QuColor.c,v 1.3 2000/08/17 19:44:50 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/QuColor.c,v 1.2 1999/05/09 10:49:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/QuColor.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/QuColors.c diff -u xc/lib/X11/QuColors.c:1.2 xc/lib/X11/QuColors.c:1.3 --- xc/lib/X11/QuColors.c:1.2 Sun May 9 06:49:57 1999 +++ xc/lib/X11/QuColors.c Wed Jan 17 14:41:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: QuColors.c /main/11 1998/02/06 17:48:32 kaleb $ */ +/* $Xorg: QuColors.c,v 1.4 2000/08/17 19:44:50 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/QuColors.c,v 1.2 1999/05/09 10:49:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/QuColors.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/QuCols.c diff -u xc/lib/X11/QuCols.c:1.2 xc/lib/X11/QuCols.c:1.3 --- xc/lib/X11/QuCols.c:1.2 Sun May 9 06:49:57 1999 +++ xc/lib/X11/QuCols.c Wed Jan 17 14:41:42 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: QuCols.c,v 1.4 91/05/13 23:28:26 rws Exp $" */ +/* $Xorg: QuCols.c,v 1.3 2000/08/17 19:44:50 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -32,7 +32,7 @@ * * */ -/* $XFree86: xc/lib/X11/QuCols.c,v 1.2 1999/05/09 10:49:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/QuCols.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/QuCurShp.c diff -u xc/lib/X11/QuCurShp.c:1.1.1.2 xc/lib/X11/QuCurShp.c:1.1.1.3 --- xc/lib/X11/QuCurShp.c:1.1.1.2 Sun Sep 27 03:56:41 1998 +++ xc/lib/X11/QuCurShp.c Tue Jan 16 17:08:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: QuCurShp.c /main/5 1998/02/06 17:48:56 kaleb $ */ +/* $Xorg: QuCurShp.c,v 1.3 2000/08/17 19:44:50 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/QuExt.c diff -u xc/lib/X11/QuExt.c:1.1.1.2 xc/lib/X11/QuExt.c:1.1.1.3 --- xc/lib/X11/QuExt.c:1.1.1.2 Sun Sep 27 03:56:42 1998 +++ xc/lib/X11/QuExt.c Tue Jan 16 17:08:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: QuExt.c /main/9 1998/02/06 17:49:02 kaleb $ */ +/* $Xorg: QuExt.c,v 1.3 2000/08/17 19:44:50 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/QuKeybd.c diff -u xc/lib/X11/QuKeybd.c:1.2 xc/lib/X11/QuKeybd.c:1.3 --- xc/lib/X11/QuKeybd.c:1.2 Sun May 9 06:49:58 1999 +++ xc/lib/X11/QuKeybd.c Wed Jan 17 14:41:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: QuKeybd.c /main/8 1998/02/06 17:49:08 kaleb $ */ +/* $Xorg: QuKeybd.c,v 1.3 2000/08/17 19:44:50 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/QuKeybd.c,v 1.2 1999/05/09 10:49:58 dawes Exp $ */ +/* $XFree86: xc/lib/X11/QuKeybd.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/QuPntr.c diff -u xc/lib/X11/QuPntr.c:1.1.1.2 xc/lib/X11/QuPntr.c:1.1.1.3 --- xc/lib/X11/QuPntr.c:1.1.1.2 Sun Sep 27 03:56:43 1998 +++ xc/lib/X11/QuPntr.c Tue Jan 16 17:08:03 2001 @@ -1,4 +1,4 @@ -/* $TOG: QuPntr.c /main/6 1998/02/06 17:49:13 kaleb $ */ +/* $Xorg: QuPntr.c,v 1.3 2000/08/17 19:44:50 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/QuStipShp.c diff -u xc/lib/X11/QuStipShp.c:1.1.1.2 xc/lib/X11/QuStipShp.c:1.1.1.3 --- xc/lib/X11/QuStipShp.c:1.1.1.2 Sun Sep 27 03:56:43 1998 +++ xc/lib/X11/QuStipShp.c Tue Jan 16 17:08:03 2001 @@ -1,4 +1,4 @@ -/* $TOG: QuStipShp.c /main/5 1998/02/06 17:49:18 kaleb $ */ +/* $Xorg: QuStipShp.c,v 1.3 2000/08/17 19:44:50 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/QuTextE16.c diff -u xc/lib/X11/QuTextE16.c:1.2 xc/lib/X11/QuTextE16.c:1.3 --- xc/lib/X11/QuTextE16.c:1.2 Sun May 9 06:49:58 1999 +++ xc/lib/X11/QuTextE16.c Wed Jan 17 14:41:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: QuTextE16.c /main/14 1998/02/06 17:49:24 kaleb $ */ +/* $Xorg: QuTextE16.c,v 1.4 2000/08/17 19:44:51 cpqbld Exp $ */ /* Copyright 1986, 1987, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/QuTextE16.c,v 1.2 1999/05/09 10:49:58 dawes Exp $ */ +/* $XFree86: xc/lib/X11/QuTextE16.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/QuTextExt.c diff -u xc/lib/X11/QuTextExt.c:1.2 xc/lib/X11/QuTextExt.c:1.3 --- xc/lib/X11/QuTextExt.c:1.2 Sun May 9 06:49:58 1999 +++ xc/lib/X11/QuTextExt.c Wed Jan 17 14:41:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: QuTextExt.c /main/15 1998/02/06 17:49:30 kaleb $ */ +/* $Xorg: QuTextExt.c,v 1.4 2000/08/17 19:44:51 cpqbld Exp $ */ /* Copyright 1986, 1987, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/QuTextExt.c,v 1.2 1999/05/09 10:49:58 dawes Exp $ */ +/* $XFree86: xc/lib/X11/QuTextExt.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/QuTileShp.c diff -u xc/lib/X11/QuTileShp.c:1.1.1.2 xc/lib/X11/QuTileShp.c:1.1.1.3 --- xc/lib/X11/QuTileShp.c:1.1.1.2 Sun Sep 27 03:56:44 1998 +++ xc/lib/X11/QuTileShp.c Tue Jan 16 17:08:04 2001 @@ -1,4 +1,4 @@ -/* $TOG: QuTileShp.c /main/5 1998/02/06 17:49:36 kaleb $ */ +/* $Xorg: QuTileShp.c,v 1.3 2000/08/17 19:44:51 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/QuTree.c diff -u xc/lib/X11/QuTree.c:1.4 xc/lib/X11/QuTree.c:1.5 --- xc/lib/X11/QuTree.c:1.4 Tue Sep 26 11:56:51 2000 +++ xc/lib/X11/QuTree.c Wed Jan 17 14:41:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: QuTree.c /main/8 1998/02/06 17:49:41 kaleb $ */ +/* $Xorg: QuTree.c,v 1.3 2000/08/17 19:44:51 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/QuTree.c,v 1.4 2000/09/26 15:56:51 tsi Exp $ */ +/* $XFree86: xc/lib/X11/QuTree.c,v 1.5 2001/01/17 19:41:42 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/Quarks.c diff -u xc/lib/X11/Quarks.c:1.2 xc/lib/X11/Quarks.c:1.3 --- xc/lib/X11/Quarks.c:1.2 Sun May 9 06:49:59 1999 +++ xc/lib/X11/Quarks.c Wed Jan 17 14:41:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: Quarks.c /main/43 1998/02/06 17:48:19 kaleb $ */ +/* $Xorg: Quarks.c,v 1.4 2000/08/17 19:44:51 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988, 1990 by Digital Equipment Corporation, Maynard, @@ -45,7 +45,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/Quarks.c,v 1.2 1999/05/09 10:49:59 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Quarks.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ #include "Xlibint.h" #include @@ -159,7 +159,7 @@ if ((sizeof(TestType1) != (sizeof(TestType2) - sizeof(unsigned long) + sizeof(double))) && !(length & (DALIGN-1)) && - (i = (NEVERFREETABLESIZE - neverFreeTableSize) & (DALIGN-1))) { + ((i = (NEVERFREETABLESIZE - neverFreeTableSize) & (DALIGN-1)))) { neverFreeTableSize -= DALIGN - i; neverFreeTable += DALIGN - i; } else Index: xc/lib/X11/RaiseWin.c diff -u xc/lib/X11/RaiseWin.c:1.2 xc/lib/X11/RaiseWin.c:1.3 --- xc/lib/X11/RaiseWin.c:1.2 Sun May 9 06:49:59 1999 +++ xc/lib/X11/RaiseWin.c Wed Jan 17 14:41:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: RaiseWin.c /main/7 1998/02/06 17:49:52 kaleb $ */ +/* $Xorg: RaiseWin.c,v 1.3 2000/08/17 19:44:51 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/RaiseWin.c,v 1.2 1999/05/09 10:49:59 dawes Exp $ */ +/* $XFree86: xc/lib/X11/RaiseWin.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/RdBitF.c diff -u xc/lib/X11/RdBitF.c:3.2 xc/lib/X11/RdBitF.c:3.3 --- xc/lib/X11/RdBitF.c:3.2 Sun May 9 06:50:00 1999 +++ xc/lib/X11/RdBitF.c Wed Jan 17 14:41:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: RdBitF.c /main/20 1998/02/06 17:49:57 kaleb $ */ +/* $Xorg: RdBitF.c,v 1.4 2000/08/17 19:44:51 cpqbld Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/RdBitF.c,v 3.2 1999/05/09 10:50:00 dawes Exp $ */ +/* $XFree86: xc/lib/X11/RdBitF.c,v 3.3 2001/01/17 19:41:42 dawes Exp $ */ /* * Code to read bitmaps from disk files. Interprets Index: xc/lib/X11/RecolorC.c diff -u xc/lib/X11/RecolorC.c:1.2 xc/lib/X11/RecolorC.c:1.3 --- xc/lib/X11/RecolorC.c:1.2 Sun May 9 06:50:00 1999 +++ xc/lib/X11/RecolorC.c Wed Jan 17 14:41:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: RecolorC.c /main/6 1998/02/06 17:50:03 kaleb $ */ +/* $Xorg: RecolorC.c,v 1.3 2000/08/17 19:44:51 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/RecolorC.c,v 1.2 1999/05/09 10:50:00 dawes Exp $ */ +/* $XFree86: xc/lib/X11/RecolorC.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ReconfWM.c diff -u xc/lib/X11/ReconfWM.c:1.1.1.2 xc/lib/X11/ReconfWM.c:1.1.1.3 --- xc/lib/X11/ReconfWM.c:1.1.1.2 Sun Sep 27 03:56:49 1998 +++ xc/lib/X11/ReconfWM.c Tue Jan 16 17:08:06 2001 @@ -1,4 +1,4 @@ -/* $TOG: ReconfWM.c /main/10 1998/02/06 17:50:16 kaleb $ */ +/* $Xorg: ReconfWM.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/ReconfWin.c diff -u xc/lib/X11/ReconfWin.c:1.2 xc/lib/X11/ReconfWin.c:1.3 --- xc/lib/X11/ReconfWin.c:1.2 Sun May 9 06:50:01 1999 +++ xc/lib/X11/ReconfWin.c Wed Jan 17 14:41:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: ReconfWin.c /main/10 1998/02/06 17:50:10 kaleb $ */ +/* $Xorg: ReconfWin.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ReconfWin.c,v 1.2 1999/05/09 10:50:01 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ReconfWin.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Region.c diff -u xc/lib/X11/Region.c:1.5 xc/lib/X11/Region.c:1.6 --- xc/lib/X11/Region.c:1.5 Sun May 9 06:50:01 1999 +++ xc/lib/X11/Region.c Wed Jan 17 14:41:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: Region.c /main/31 1998/02/06 17:50:22 kaleb $ */ +/* $Xorg: Region.c,v 1.5 2000/08/17 19:44:52 cpqbld Exp $ */ /************************************************************************ Copyright 1987, 1988, 1998 The Open Group @@ -41,7 +41,7 @@ SOFTWARE. ************************************************************************/ -/* $XFree86: xc/lib/X11/Region.c,v 1.5 1999/05/09 10:50:01 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Region.c,v 1.6 2001/01/17 19:41:42 dawes Exp $ */ /* * The functions in this file implement the Region abstraction, similar to one * used in the X11 sample server. A Region is simply an area, as the name Index: xc/lib/X11/RegstFlt.c diff -u xc/lib/X11/RegstFlt.c:1.2 xc/lib/X11/RegstFlt.c:1.3 --- xc/lib/X11/RegstFlt.c:1.2 Sun May 9 06:50:01 1999 +++ xc/lib/X11/RegstFlt.c Wed Jan 17 14:41:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: RegstFlt.c /main/12 1998/02/06 17:50:36 kaleb $ */ +/* $Xorg: RegstFlt.c,v 1.4 2000/08/17 19:44:52 cpqbld Exp $ */ /* * Copyright 1990, 1991 by OMRON Corporation @@ -48,7 +48,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/RegstFlt.c,v 1.2 1999/05/09 10:50:01 dawes Exp $ */ +/* $XFree86: xc/lib/X11/RegstFlt.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" Index: xc/lib/X11/RepWindow.c diff -u xc/lib/X11/RepWindow.c:1.2 xc/lib/X11/RepWindow.c:1.3 --- xc/lib/X11/RepWindow.c:1.2 Sun May 9 06:50:02 1999 +++ xc/lib/X11/RepWindow.c Wed Jan 17 14:41:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: RepWindow.c /main/6 1998/02/06 17:50:42 kaleb $ */ +/* $Xorg: RepWindow.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/RepWindow.c,v 1.2 1999/05/09 10:50:02 dawes Exp $ */ +/* $XFree86: xc/lib/X11/RepWindow.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/RestackWs.c diff -u xc/lib/X11/RestackWs.c:1.2 xc/lib/X11/RestackWs.c:1.3 --- xc/lib/X11/RestackWs.c:1.2 Sun May 9 06:50:02 1999 +++ xc/lib/X11/RestackWs.c Wed Jan 17 14:41:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: RestackWs.c /main/10 1998/02/06 17:50:47 kaleb $ */ +/* $Xorg: RestackWs.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/RestackWs.c,v 1.2 1999/05/09 10:50:02 dawes Exp $ */ +/* $XFree86: xc/lib/X11/RestackWs.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/RotProp.c diff -u xc/lib/X11/RotProp.c:1.2 xc/lib/X11/RotProp.c:1.3 --- xc/lib/X11/RotProp.c:1.2 Sun May 9 06:50:03 1999 +++ xc/lib/X11/RotProp.c Wed Jan 17 14:41:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: RotProp.c /main/9 1998/02/06 17:50:53 kaleb $ */ +/* $Xorg: RotProp.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/RotProp.c,v 1.2 1999/05/09 10:50:03 dawes Exp $ */ +/* $XFree86: xc/lib/X11/RotProp.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ScrResStr.c diff -u xc/lib/X11/ScrResStr.c:1.1.1.2 xc/lib/X11/ScrResStr.c:1.1.1.3 --- xc/lib/X11/ScrResStr.c:1.1.1.2 Sun Sep 27 03:56:52 1998 +++ xc/lib/X11/ScrResStr.c Tue Jan 16 17:08:08 2001 @@ -1,4 +1,4 @@ -/* $TOG: ScrResStr.c /main/4 1998/02/06 17:50:58 kaleb $ */ +/* $Xorg: ScrResStr.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ /* Copyright 1991, 1998 The Open Group Index: xc/lib/X11/SelInput.c diff -u xc/lib/X11/SelInput.c:1.2 xc/lib/X11/SelInput.c:1.3 --- xc/lib/X11/SelInput.c:1.2 Sun May 9 06:50:03 1999 +++ xc/lib/X11/SelInput.c Wed Jan 17 14:41:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: SelInput.c /main/8 1998/02/06 17:51:04 kaleb $ */ +/* $Xorg: SelInput.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SelInput.c,v 1.2 1999/05/09 10:50:03 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SelInput.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SendEvent.c diff -u xc/lib/X11/SendEvent.c:1.1.1.2 xc/lib/X11/SendEvent.c:1.1.1.3 --- xc/lib/X11/SendEvent.c:1.1.1.2 Sun Sep 27 03:56:53 1998 +++ xc/lib/X11/SendEvent.c Tue Jan 16 17:08:09 2001 @@ -1,4 +1,4 @@ -/* $TOG: SendEvent.c /main/9 1998/02/06 17:51:10 kaleb $ */ +/* $Xorg: SendEvent.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/SetBack.c diff -u xc/lib/X11/SetBack.c:1.2 xc/lib/X11/SetBack.c:1.3 --- xc/lib/X11/SetBack.c:1.2 Sun May 9 06:50:03 1999 +++ xc/lib/X11/SetBack.c Wed Jan 17 14:41:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetBack.c /main/6 1998/02/06 17:51:16 kaleb $ */ +/* $Xorg: SetBack.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetBack.c,v 1.2 1999/05/09 10:50:03 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetBack.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetCCC.c diff -u xc/lib/X11/SetCCC.c:1.1.1.1 xc/lib/X11/SetCCC.c:1.1.1.2 --- xc/lib/X11/SetCCC.c:1.1.1.1 Wed Apr 27 03:11:22 1994 +++ xc/lib/X11/SetCCC.c Tue Jan 16 17:08:09 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: SetCCC.c,v 1.5 93/09/07 21:32:37 rws Exp $ */ +/* $Xorg: SetCCC.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/SetCRects.c diff -u xc/lib/X11/SetCRects.c:1.2 xc/lib/X11/SetCRects.c:1.3 --- xc/lib/X11/SetCRects.c:1.2 Sun May 9 06:50:05 1999 +++ xc/lib/X11/SetCRects.c Wed Jan 17 14:41:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetCRects.c /main/13 1998/02/06 17:51:38 kaleb $ */ +/* $Xorg: SetCRects.c,v 1.3 2000/08/17 19:44:53 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetCRects.c,v 1.2 1999/05/09 10:50:05 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetCRects.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetClMask.c diff -u xc/lib/X11/SetClMask.c:1.2 xc/lib/X11/SetClMask.c:1.3 --- xc/lib/X11/SetClMask.c:1.2 Sun May 9 06:50:06 1999 +++ xc/lib/X11/SetClMask.c Wed Jan 17 14:41:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetClMask.c /main/7 1998/02/06 17:51:27 kaleb $ */ +/* $Xorg: SetClMask.c,v 1.3 2000/08/17 19:44:53 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetClMask.c,v 1.2 1999/05/09 10:50:06 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetClMask.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetClOrig.c diff -u xc/lib/X11/SetClOrig.c:1.2 xc/lib/X11/SetClOrig.c:1.3 --- xc/lib/X11/SetClOrig.c:1.2 Sun May 9 06:50:06 1999 +++ xc/lib/X11/SetClOrig.c Wed Jan 17 14:41:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetClOrig.c /main/6 1998/02/06 17:51:33 kaleb $ */ +/* $Xorg: SetClOrig.c,v 1.3 2000/08/17 19:44:53 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetClOrig.c,v 1.2 1999/05/09 10:50:06 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetClOrig.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetDashes.c diff -u xc/lib/X11/SetDashes.c:1.2 xc/lib/X11/SetDashes.c:1.3 --- xc/lib/X11/SetDashes.c:1.2 Sun May 9 06:50:07 1999 +++ xc/lib/X11/SetDashes.c Wed Jan 17 14:41:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetDashes.c /main/9 1998/02/06 17:51:44 kaleb $ */ +/* $Xorg: SetDashes.c,v 1.3 2000/08/17 19:44:53 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetDashes.c,v 1.2 1999/05/09 10:50:07 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetDashes.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetFPath.c diff -u xc/lib/X11/SetFPath.c:1.4 xc/lib/X11/SetFPath.c:1.5 --- xc/lib/X11/SetFPath.c:1.4 Sun May 9 06:50:07 1999 +++ xc/lib/X11/SetFPath.c Wed Jan 17 14:41:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetFPath.c /main/10 1998/02/06 17:51:59 kaleb $ */ +/* $Xorg: SetFPath.c,v 1.4 2000/08/17 19:44:53 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetFPath.c,v 1.4 1999/05/09 10:50:07 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetFPath.c,v 1.5 2001/01/17 19:41:43 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetFont.c diff -u xc/lib/X11/SetFont.c:1.2 xc/lib/X11/SetFont.c:1.3 --- xc/lib/X11/SetFont.c:1.2 Sun May 9 06:50:07 1999 +++ xc/lib/X11/SetFont.c Wed Jan 17 14:41:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetFont.c /main/6 1998/02/06 17:51:49 kaleb $ */ +/* $Xorg: SetFont.c,v 1.3 2000/08/17 19:44:53 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetFont.c,v 1.2 1999/05/09 10:50:07 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetFont.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetFore.c diff -u xc/lib/X11/SetFore.c:1.2 xc/lib/X11/SetFore.c:1.3 --- xc/lib/X11/SetFore.c:1.2 Sun May 9 06:50:08 1999 +++ xc/lib/X11/SetFore.c Wed Jan 17 14:41:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetFore.c /main/6 1998/02/06 17:51:54 kaleb $ */ +/* $Xorg: SetFore.c,v 1.3 2000/08/17 19:44:53 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetFore.c,v 1.2 1999/05/09 10:50:08 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetFore.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetFunc.c diff -u xc/lib/X11/SetFunc.c:1.2 xc/lib/X11/SetFunc.c:1.3 --- xc/lib/X11/SetFunc.c:1.2 Sun May 9 06:50:08 1999 +++ xc/lib/X11/SetFunc.c Wed Jan 17 14:41:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetFunc.c /main/6 1998/02/06 17:52:05 kaleb $ */ +/* $Xorg: SetFunc.c,v 1.3 2000/08/17 19:44:53 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetFunc.c,v 1.2 1999/05/09 10:50:08 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetFunc.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetGetCols.c diff -u xc/lib/X11/SetGetCols.c:1.1.1.1 xc/lib/X11/SetGetCols.c:1.1.1.2 --- xc/lib/X11/SetGetCols.c:1.1.1.1 Wed Apr 27 03:11:24 1994 +++ xc/lib/X11/SetGetCols.c Tue Jan 16 17:08:12 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: SetGetCols.c,v 1.5 91/05/13 23:28:55 rws Exp $" */ +/* $Xorg: SetGetCols.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/SetHints.c diff -u xc/lib/X11/SetHints.c:1.2 xc/lib/X11/SetHints.c:1.3 --- xc/lib/X11/SetHints.c:1.2 Sun May 9 06:50:08 1999 +++ xc/lib/X11/SetHints.c Wed Jan 17 14:41:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetHints.c /main/25 1998/02/06 17:52:15 kaleb $ */ +/* $Xorg: SetHints.c,v 1.4 2000/08/17 19:44:54 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/SetHints.c,v 1.2 1999/05/09 10:50:08 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetHints.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ #include #include Index: xc/lib/X11/SetIFocus.c diff -u xc/lib/X11/SetIFocus.c:1.2 xc/lib/X11/SetIFocus.c:1.3 --- xc/lib/X11/SetIFocus.c:1.2 Sun May 9 06:50:09 1999 +++ xc/lib/X11/SetIFocus.c Wed Jan 17 14:41:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetIFocus.c /main/6 1998/02/06 17:52:22 kaleb $ */ +/* $Xorg: SetIFocus.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetIFocus.c,v 1.2 1999/05/09 10:50:09 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetIFocus.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetLStyle.c diff -u xc/lib/X11/SetLStyle.c:1.2 xc/lib/X11/SetLStyle.c:1.3 --- xc/lib/X11/SetLStyle.c:1.2 Sun May 9 06:50:09 1999 +++ xc/lib/X11/SetLStyle.c Wed Jan 17 14:41:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetLStyle.c /main/6 1998/02/06 17:52:34 kaleb $ */ +/* $Xorg: SetLStyle.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetLStyle.c,v 1.2 1999/05/09 10:50:09 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetLStyle.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetLocale.c diff -u xc/lib/X11/SetLocale.c:3.12 xc/lib/X11/SetLocale.c:3.13 --- xc/lib/X11/SetLocale.c:3.12 Wed Sep 27 14:51:07 2000 +++ xc/lib/X11/SetLocale.c Wed Jan 17 14:41:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetLocale.c /main/42 1998/06/17 14:47:35 kaleb $ */ +/* $Xorg: SetLocale.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ /* * Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation, @@ -51,7 +51,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/SetLocale.c,v 3.12 2000/09/27 18:51:07 keithp Exp $ */ +/* $XFree86: xc/lib/X11/SetLocale.c,v 3.13 2001/01/17 19:41:43 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" Index: xc/lib/X11/SetNrmHint.c diff -u xc/lib/X11/SetNrmHint.c:1.1.1.2 xc/lib/X11/SetNrmHint.c:1.1.1.3 --- xc/lib/X11/SetNrmHint.c:1.1.1.2 Sun Sep 27 03:57:00 1998 +++ xc/lib/X11/SetNrmHint.c Tue Jan 16 17:08:13 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetNrmHint.c /main/5 1998/02/06 17:52:40 kaleb $ */ +/* $Xorg: SetNrmHint.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ /*********************************************************** Copyright 1988 by Wyse Technology, Inc., San Jose, Ca, Index: xc/lib/X11/SetPMask.c diff -u xc/lib/X11/SetPMask.c:1.2 xc/lib/X11/SetPMask.c:1.3 --- xc/lib/X11/SetPMask.c:1.2 Sun May 9 06:50:10 1999 +++ xc/lib/X11/SetPMask.c Wed Jan 17 14:41:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetPMask.c /main/6 1998/02/06 17:52:46 kaleb $ */ +/* $Xorg: SetPMask.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetPMask.c,v 1.2 1999/05/09 10:50:10 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetPMask.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetPntMap.c diff -u xc/lib/X11/SetPntMap.c:1.2 xc/lib/X11/SetPntMap.c:1.3 --- xc/lib/X11/SetPntMap.c:1.2 Sun May 9 06:50:10 1999 +++ xc/lib/X11/SetPntMap.c Wed Jan 17 14:41:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetPntMap.c /main/14 1998/02/06 17:52:52 kaleb $ */ +/* $Xorg: SetPntMap.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetPntMap.c,v 1.2 1999/05/09 10:50:10 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetPntMap.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ #define NEED_REPLIES Index: xc/lib/X11/SetRGBCMap.c diff -u xc/lib/X11/SetRGBCMap.c:1.1.1.2 xc/lib/X11/SetRGBCMap.c:1.1.1.3 --- xc/lib/X11/SetRGBCMap.c:1.1.1.2 Sun Sep 27 03:57:02 1998 +++ xc/lib/X11/SetRGBCMap.c Tue Jan 16 17:08:15 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetRGBCMap.c /main/6 1998/02/06 17:52:57 kaleb $ */ +/* $Xorg: SetRGBCMap.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ /* Copyright 1989, 1998 The Open Group Index: xc/lib/X11/SetSOwner.c diff -u xc/lib/X11/SetSOwner.c:1.2 xc/lib/X11/SetSOwner.c:1.3 --- xc/lib/X11/SetSOwner.c:1.2 Sun May 9 06:50:10 1999 +++ xc/lib/X11/SetSOwner.c Wed Jan 17 14:41:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetSOwner.c /main/6 1998/02/06 17:53:03 kaleb $ */ +/* $Xorg: SetSOwner.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetSOwner.c,v 1.2 1999/05/09 10:50:10 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetSOwner.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetSSaver.c diff -u xc/lib/X11/SetSSaver.c:1.2 xc/lib/X11/SetSSaver.c:1.3 --- xc/lib/X11/SetSSaver.c:1.2 Sun May 9 06:50:11 1999 +++ xc/lib/X11/SetSSaver.c Wed Jan 17 14:41:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetSSaver.c /main/6 1998/02/06 17:53:09 kaleb $ */ +/* $Xorg: SetSSaver.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetSSaver.c,v 1.2 1999/05/09 10:50:11 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetSSaver.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetStCmap.c diff -u xc/lib/X11/SetStCmap.c:1.1.1.2 xc/lib/X11/SetStCmap.c:1.1.1.3 --- xc/lib/X11/SetStCmap.c:1.1.1.2 Sun Sep 27 03:57:03 1998 +++ xc/lib/X11/SetStCmap.c Tue Jan 16 17:08:17 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetStCmap.c /main/8 1998/02/06 17:53:20 kaleb $ */ +/* $Xorg: SetStCmap.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/X11/SetState.c diff -u xc/lib/X11/SetState.c:1.2 xc/lib/X11/SetState.c:1.3 --- xc/lib/X11/SetState.c:1.2 Sun May 9 06:50:11 1999 +++ xc/lib/X11/SetState.c Wed Jan 17 14:41:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetState.c /main/6 1998/02/06 17:53:15 kaleb $ */ +/* $Xorg: SetState.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetState.c,v 1.2 1999/05/09 10:50:11 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetState.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetStip.c diff -u xc/lib/X11/SetStip.c:1.2 xc/lib/X11/SetStip.c:1.3 --- xc/lib/X11/SetStip.c:1.2 Sun May 9 06:50:12 1999 +++ xc/lib/X11/SetStip.c Wed Jan 17 14:41:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetStip.c /main/7 1998/02/06 17:53:26 kaleb $ */ +/* $Xorg: SetStip.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetStip.c,v 1.2 1999/05/09 10:50:12 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetStip.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetTSOrig.c diff -u xc/lib/X11/SetTSOrig.c:1.2 xc/lib/X11/SetTSOrig.c:1.3 --- xc/lib/X11/SetTSOrig.c:1.2 Sun May 9 06:50:12 1999 +++ xc/lib/X11/SetTSOrig.c Wed Jan 17 14:41:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetTSOrig.c /main/6 1998/02/06 17:53:37 kaleb $ */ +/* $Xorg: SetTSOrig.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetTSOrig.c,v 1.2 1999/05/09 10:50:12 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetTSOrig.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetTile.c diff -u xc/lib/X11/SetTile.c:1.2 xc/lib/X11/SetTile.c:1.3 --- xc/lib/X11/SetTile.c:1.2 Sun May 9 06:50:12 1999 +++ xc/lib/X11/SetTile.c Wed Jan 17 14:41:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetTile.c /main/7 1998/02/06 17:53:31 kaleb $ */ +/* $Xorg: SetTile.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetTile.c,v 1.2 1999/05/09 10:50:12 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetTile.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetTxtProp.c diff -u xc/lib/X11/SetTxtProp.c:1.1.1.2 xc/lib/X11/SetTxtProp.c:1.1.1.3 --- xc/lib/X11/SetTxtProp.c:1.1.1.2 Sun Sep 27 03:57:06 1998 +++ xc/lib/X11/SetTxtProp.c Tue Jan 16 17:08:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetTxtProp.c /main/7 1998/02/06 17:53:43 kaleb $ */ +/* $Xorg: SetTxtProp.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ /*********************************************************** Copyright 1988 by Wyse Technology, Inc., San Jose, Ca. Index: xc/lib/X11/SetWMCMapW.c diff -u xc/lib/X11/SetWMCMapW.c:1.1.1.2 xc/lib/X11/SetWMCMapW.c:1.1.1.3 --- xc/lib/X11/SetWMCMapW.c:1.1.1.2 Sun Sep 27 03:57:06 1998 +++ xc/lib/X11/SetWMCMapW.c Tue Jan 16 17:08:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetWMCMapW.c /main/6 1998/02/06 17:53:48 kaleb $ */ +/* $Xorg: SetWMCMapW.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/X11/SetWMProto.c diff -u xc/lib/X11/SetWMProto.c:1.1.1.2 xc/lib/X11/SetWMProto.c:1.1.1.3 --- xc/lib/X11/SetWMProto.c:1.1.1.2 Sun Sep 27 03:57:06 1998 +++ xc/lib/X11/SetWMProto.c Tue Jan 16 17:08:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetWMProto.c /main/6 1998/02/06 17:53:54 kaleb $ */ +/* $Xorg: SetWMProto.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/X11/StBytes.c diff -u xc/lib/X11/StBytes.c:1.2 xc/lib/X11/StBytes.c:1.3 --- xc/lib/X11/StBytes.c:1.2 Sun May 9 06:50:13 1999 +++ xc/lib/X11/StBytes.c Wed Jan 17 14:41:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: StBytes.c /main/13 1998/02/06 17:54:00 kaleb $ */ +/* $Xorg: StBytes.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/StBytes.c,v 1.2 1999/05/09 10:50:13 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StBytes.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ #include #include Index: xc/lib/X11/StCol.c diff -u xc/lib/X11/StCol.c:1.2 xc/lib/X11/StCol.c:1.3 --- xc/lib/X11/StCol.c:1.2 Sun May 9 06:50:13 1999 +++ xc/lib/X11/StCol.c Wed Jan 17 14:41:44 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: StCol.c,v 1.5 91/09/21 21:49:25 rws Exp $" */ +/* $Xorg: StCol.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -32,7 +32,7 @@ * * */ -/* $XFree86: xc/lib/X11/StCol.c,v 1.2 1999/05/09 10:50:13 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StCol.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/StColor.c diff -u xc/lib/X11/StColor.c:1.2 xc/lib/X11/StColor.c:1.3 --- xc/lib/X11/StColor.c:1.2 Sun May 9 06:50:13 1999 +++ xc/lib/X11/StColor.c Wed Jan 17 14:41:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: StColor.c /main/9 1998/02/06 17:54:13 kaleb $ */ +/* $Xorg: StColor.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/StColor.c,v 1.2 1999/05/09 10:50:13 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StColor.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/StColors.c diff -u xc/lib/X11/StColors.c:1.2 xc/lib/X11/StColors.c:1.3 --- xc/lib/X11/StColors.c:1.2 Sun May 9 06:50:14 1999 +++ xc/lib/X11/StColors.c Wed Jan 17 14:41:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: StColors.c /main/9 1998/02/06 17:54:07 kaleb $ */ +/* $Xorg: StColors.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/StColors.c,v 1.2 1999/05/09 10:50:14 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StColors.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/StCols.c diff -u xc/lib/X11/StCols.c:1.2 xc/lib/X11/StCols.c:1.3 --- xc/lib/X11/StCols.c:1.2 Sun May 9 06:50:14 1999 +++ xc/lib/X11/StCols.c Wed Jan 17 14:41:44 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: StCols.c,v 1.8 93/09/07 21:32:42 rws Exp $" */ +/* $Xorg: StCols.c,v 1.3 2000/08/17 19:44:56 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -32,7 +32,7 @@ * * */ -/* $XFree86: xc/lib/X11/StCols.c,v 1.2 1999/05/09 10:50:14 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StCols.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/StNColor.c diff -u xc/lib/X11/StNColor.c:1.2 xc/lib/X11/StNColor.c:1.3 --- xc/lib/X11/StNColor.c:1.2 Sun May 9 06:50:15 1999 +++ xc/lib/X11/StNColor.c Wed Jan 17 14:41:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: StNColor.c /main/21 1998/02/06 17:54:35 kaleb $ */ +/* $Xorg: StNColor.c,v 1.3 2000/08/17 19:44:56 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/StNColor.c,v 1.2 1999/05/09 10:50:15 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StNColor.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ #include #include "Xlibint.h" Index: xc/lib/X11/StName.c diff -u xc/lib/X11/StName.c:1.2 xc/lib/X11/StName.c:1.3 --- xc/lib/X11/StName.c:1.2 Sun May 9 06:50:15 1999 +++ xc/lib/X11/StName.c Wed Jan 17 14:41:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: StName.c /main/10 1998/02/06 17:54:29 kaleb $ */ +/* $Xorg: StName.c,v 1.3 2000/08/17 19:44:56 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/StName.c,v 1.2 1999/05/09 10:50:15 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StName.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ #include #include Index: xc/lib/X11/StrKeysym.c diff -u xc/lib/X11/StrKeysym.c:3.3 xc/lib/X11/StrKeysym.c:3.4 --- xc/lib/X11/StrKeysym.c:3.3 Fri Dec 1 20:16:03 2000 +++ xc/lib/X11/StrKeysym.c Wed Jan 17 14:41:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: StrKeysym.c /main/18 1998/02/06 17:54:40 kaleb $ */ +/* $Xorg: StrKeysym.c,v 1.4 2000/08/17 19:44:56 cpqbld Exp $ */ /* Copyright 1985, 1987, 1990, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/StrKeysym.c,v 3.3 2000/12/02 01:16:03 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StrKeysym.c,v 3.4 2001/01/17 19:41:44 dawes Exp $ */ #include "Xlibint.h" #include Index: xc/lib/X11/StrToText.c diff -u xc/lib/X11/StrToText.c:1.1.1.2 xc/lib/X11/StrToText.c:1.1.1.3 --- xc/lib/X11/StrToText.c:1.1.1.2 Sun Sep 27 03:57:10 1998 +++ xc/lib/X11/StrToText.c Tue Jan 16 17:08:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: StrToText.c /main/6 1998/02/06 17:54:45 kaleb $ */ +/* $Xorg: StrToText.c,v 1.3 2000/08/17 19:44:56 cpqbld Exp $ */ /* Copyright 1989, 1998 The Open Group Index: xc/lib/X11/Sync.c diff -u xc/lib/X11/Sync.c:1.2 xc/lib/X11/Sync.c:1.3 --- xc/lib/X11/Sync.c:1.2 Sun May 9 06:50:16 1999 +++ xc/lib/X11/Sync.c Wed Jan 17 14:41:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: Sync.c /main/8 1998/02/06 17:54:56 kaleb $ */ +/* $Xorg: Sync.c,v 1.3 2000/08/17 19:44:56 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Sync.c,v 1.2 1999/05/09 10:50:16 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Sync.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ #define NEED_REPLIES #define NEED_EVENTS Index: xc/lib/X11/Synchro.c diff -u xc/lib/X11/Synchro.c:1.1.1.2 xc/lib/X11/Synchro.c:1.1.1.3 --- xc/lib/X11/Synchro.c:1.1.1.2 Sun Sep 27 03:57:11 1998 +++ xc/lib/X11/Synchro.c Tue Jan 16 17:08:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: Synchro.c /main/11 1998/02/06 17:54:51 kaleb $ */ +/* $Xorg: Synchro.c,v 1.3 2000/08/17 19:44:56 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/Text.c diff -u xc/lib/X11/Text.c:1.2 xc/lib/X11/Text.c:1.3 --- xc/lib/X11/Text.c:1.2 Sun May 9 06:50:16 1999 +++ xc/lib/X11/Text.c Wed Jan 17 14:41:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: Text.c /main/14 1998/02/06 17:55:26 kaleb $ */ +/* $Xorg: Text.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Text.c,v 1.2 1999/05/09 10:50:16 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Text.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Text16.c diff -u xc/lib/X11/Text16.c:1.2 xc/lib/X11/Text16.c:1.4 --- xc/lib/X11/Text16.c:1.2 Sun May 9 06:50:16 1999 +++ xc/lib/X11/Text16.c Sun Jan 21 17:58:08 2001 @@ -1,4 +1,4 @@ -/* $TOG: Text16.c /main/13 1998/02/06 17:55:02 kaleb $ */ +/* $Xorg: Text16.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Text16.c,v 1.2 1999/05/09 10:50:16 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Text16.c,v 1.4 2001/01/21 22:58:08 keithp Exp $ */ #include "Xlibint.h" @@ -97,7 +97,7 @@ } } #else - memcpy ((char *) (elt + 1), (char *)CharacterOffset, 254 * 2); + memcpy (((char *) elt) + 2, (char *)CharacterOffset, 254 * 2); #endif PartialNChars = PartialNChars - 254; CharacterOffset += 254; @@ -120,7 +120,7 @@ } } #else - memcpy((char *)(elt + 1), (char *)CharacterOffset, PartialNChars * 2); + memcpy(((char *)elt) + 2, (char *)CharacterOffset, PartialNChars * 2); #endif } } Index: xc/lib/X11/TextExt.c diff -u xc/lib/X11/TextExt.c:1.2 xc/lib/X11/TextExt.c:1.3 --- xc/lib/X11/TextExt.c:1.2 Sun May 9 06:50:17 1999 +++ xc/lib/X11/TextExt.c Wed Jan 17 14:41:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: TextExt.c /main/22 1998/02/06 17:55:14 kaleb $ */ +/* $Xorg: TextExt.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ /* Copyright 1989, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/TextExt.c,v 1.2 1999/05/09 10:50:17 dawes Exp $ */ +/* $XFree86: xc/lib/X11/TextExt.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ /* * Copyright 1995 by FUJITSU LIMITED * This is source code modified by FUJITSU LIMITED under the Joint Index: xc/lib/X11/TextExt16.c diff -u xc/lib/X11/TextExt16.c:1.2 xc/lib/X11/TextExt16.c:1.3 --- xc/lib/X11/TextExt16.c:1.2 Sun May 9 06:50:17 1999 +++ xc/lib/X11/TextExt16.c Wed Jan 17 14:41:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: TextExt16.c /main/17 1998/02/06 17:55:08 kaleb $ */ +/* $Xorg: TextExt16.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ /* Copyright 1989, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/TextExt16.c,v 1.2 1999/05/09 10:50:17 dawes Exp $ */ +/* $XFree86: xc/lib/X11/TextExt16.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ /* * Copyright 1995 by FUJITSU LIMITED * This is source code modified by FUJITSU LIMITED under the Joint Index: xc/lib/X11/TextToStr.c diff -u xc/lib/X11/TextToStr.c:1.3 xc/lib/X11/TextToStr.c:1.4 --- xc/lib/X11/TextToStr.c:1.3 Sat Oct 3 04:41:23 1998 +++ xc/lib/X11/TextToStr.c Wed Jan 17 14:41:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: TextToStr.c /main/6 1998/02/06 17:55:20 kaleb $ */ +/* $Xorg: TextToStr.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ /* Copyright 1989, 1998 The Open Group @@ -21,7 +21,7 @@ */ -/* $XFree86: xc/lib/X11/TextToStr.c,v 1.3 1998/10/03 08:41:23 dawes Exp $ */ +/* $XFree86: xc/lib/X11/TextToStr.c,v 1.4 2001/01/17 19:41:45 dawes Exp $ */ #include #include Index: xc/lib/X11/TrCoords.c diff -u xc/lib/X11/TrCoords.c:1.1.1.2 xc/lib/X11/TrCoords.c:1.1.1.3 --- xc/lib/X11/TrCoords.c:1.1.1.2 Sun Sep 27 03:57:14 1998 +++ xc/lib/X11/TrCoords.c Tue Jan 16 17:08:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: TrCoords.c /main/7 1998/02/06 17:55:31 kaleb $ */ +/* $Xorg: TrCoords.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/UNDEFINED.c diff -u xc/lib/X11/UNDEFINED.c:1.1.1.1 xc/lib/X11/UNDEFINED.c:1.1.1.2 --- xc/lib/X11/UNDEFINED.c:1.1.1.1 Wed Apr 27 03:11:23 1994 +++ xc/lib/X11/UNDEFINED.c Tue Jan 16 17:08:37 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: UNDEFINED.c,v 1.5 91/07/25 01:10:56 rws Exp $" */ +/* $Xorg: UNDEFINED.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/UndefCurs.c diff -u xc/lib/X11/UndefCurs.c:1.2 xc/lib/X11/UndefCurs.c:1.3 --- xc/lib/X11/UndefCurs.c:1.2 Sun May 9 06:50:18 1999 +++ xc/lib/X11/UndefCurs.c Wed Jan 17 14:41:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: UndefCurs.c /main/7 1998/02/06 17:55:44 kaleb $ */ +/* $Xorg: UndefCurs.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UndefCurs.c,v 1.2 1999/05/09 10:50:18 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UndefCurs.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UngrabBut.c diff -u xc/lib/X11/UngrabBut.c:1.2 xc/lib/X11/UngrabBut.c:1.3 --- xc/lib/X11/UngrabBut.c:1.2 Sun May 9 06:50:18 1999 +++ xc/lib/X11/UngrabBut.c Wed Jan 17 14:41:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: UngrabBut.c /main/6 1998/02/06 17:55:56 kaleb $ */ +/* $Xorg: UngrabBut.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UngrabBut.c,v 1.2 1999/05/09 10:50:18 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UngrabBut.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UngrabKbd.c diff -u xc/lib/X11/UngrabKbd.c:1.2 xc/lib/X11/UngrabKbd.c:1.3 --- xc/lib/X11/UngrabKbd.c:1.2 Sun May 9 06:50:18 1999 +++ xc/lib/X11/UngrabKbd.c Wed Jan 17 14:41:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: UngrabKbd.c /main/6 1998/02/06 17:56:02 kaleb $ */ +/* $Xorg: UngrabKbd.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UngrabKbd.c,v 1.2 1999/05/09 10:50:18 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UngrabKbd.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UngrabKey.c diff -u xc/lib/X11/UngrabKey.c:1.2 xc/lib/X11/UngrabKey.c:1.3 --- xc/lib/X11/UngrabKey.c:1.2 Sun May 9 06:50:19 1999 +++ xc/lib/X11/UngrabKey.c Wed Jan 17 14:41:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: UngrabKey.c /main/6 1998/02/06 17:56:08 kaleb $ */ +/* $Xorg: UngrabKey.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UngrabKey.c,v 1.2 1999/05/09 10:50:19 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UngrabKey.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UngrabPtr.c diff -u xc/lib/X11/UngrabPtr.c:1.2 xc/lib/X11/UngrabPtr.c:1.3 --- xc/lib/X11/UngrabPtr.c:1.2 Sun May 9 06:50:19 1999 +++ xc/lib/X11/UngrabPtr.c Wed Jan 17 14:41:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: UngrabPtr.c /main/6 1998/02/06 17:56:13 kaleb $ */ +/* $Xorg: UngrabPtr.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UngrabPtr.c,v 1.2 1999/05/09 10:50:19 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UngrabPtr.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UngrabSvr.c diff -u xc/lib/X11/UngrabSvr.c:1.2 xc/lib/X11/UngrabSvr.c:1.3 --- xc/lib/X11/UngrabSvr.c:1.2 Sun May 9 06:50:20 1999 +++ xc/lib/X11/UngrabSvr.c Wed Jan 17 14:41:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: UngrabSvr.c /main/6 1998/02/06 17:56:19 kaleb $ */ +/* $Xorg: UngrabSvr.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UngrabSvr.c,v 1.2 1999/05/09 10:50:20 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UngrabSvr.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UninsCmap.c diff -u xc/lib/X11/UninsCmap.c:1.2 xc/lib/X11/UninsCmap.c:1.3 --- xc/lib/X11/UninsCmap.c:1.2 Sun May 9 06:50:20 1999 +++ xc/lib/X11/UninsCmap.c Wed Jan 17 14:41:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: UninsCmap.c /main/6 1998/02/06 17:56:24 kaleb $ */ +/* $Xorg: UninsCmap.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UninsCmap.c,v 1.2 1999/05/09 10:50:20 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UninsCmap.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UnldFont.c diff -u xc/lib/X11/UnldFont.c:1.2 xc/lib/X11/UnldFont.c:1.3 --- xc/lib/X11/UnldFont.c:1.2 Sun May 9 06:50:20 1999 +++ xc/lib/X11/UnldFont.c Wed Jan 17 14:41:45 2001 @@ -1,4 +1,4 @@ - /* $TOG: UnldFont.c /main/6 1998/02/06 17:56:30 kaleb $ */ + /* $Xorg: UnldFont.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UnldFont.c,v 1.2 1999/05/09 10:50:20 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UnldFont.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UnmapSubs.c diff -u xc/lib/X11/UnmapSubs.c:1.2 xc/lib/X11/UnmapSubs.c:1.3 --- xc/lib/X11/UnmapSubs.c:1.2 Sun May 9 06:50:21 1999 +++ xc/lib/X11/UnmapSubs.c Wed Jan 17 14:41:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: UnmapSubs.c /main/6 1998/02/06 17:56:35 kaleb $ */ +/* $Xorg: UnmapSubs.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UnmapSubs.c,v 1.2 1999/05/09 10:50:21 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UnmapSubs.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UnmapWin.c diff -u xc/lib/X11/UnmapWin.c:1.2 xc/lib/X11/UnmapWin.c:1.3 --- xc/lib/X11/UnmapWin.c:1.2 Sun May 9 06:50:21 1999 +++ xc/lib/X11/UnmapWin.c Wed Jan 17 14:41:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: UnmapWin.c /main/6 1998/02/06 17:56:41 kaleb $ */ +/* $Xorg: UnmapWin.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UnmapWin.c,v 1.2 1999/05/09 10:50:21 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UnmapWin.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/VisUtil.c diff -u xc/lib/X11/VisUtil.c:1.1.1.2 xc/lib/X11/VisUtil.c:1.1.1.3 --- xc/lib/X11/VisUtil.c:1.1.1.2 Sun Sep 27 03:57:20 1998 +++ xc/lib/X11/VisUtil.c Tue Jan 16 17:08:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: VisUtil.c /main/11 1998/02/06 17:56:53 kaleb $ */ +/* $Xorg: VisUtil.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group Index: xc/lib/X11/WMGeom.c diff -u xc/lib/X11/WMGeom.c:1.1.1.2 xc/lib/X11/WMGeom.c:1.1.1.3 --- xc/lib/X11/WMGeom.c:1.1.1.2 Sun Sep 27 03:57:21 1998 +++ xc/lib/X11/WMGeom.c Tue Jan 16 17:08:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: WMGeom.c /main/6 1998/02/06 17:57:27 kaleb $ */ +/* $Xorg: WMGeom.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ /* Copyright 1989, 1998 The Open Group Index: xc/lib/X11/WMProps.c diff -u xc/lib/X11/WMProps.c:3.3 xc/lib/X11/WMProps.c:3.4 --- xc/lib/X11/WMProps.c:3.3 Fri Mar 31 15:13:12 2000 +++ xc/lib/X11/WMProps.c Wed Jan 17 14:41:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: WMProps.c /main/10 1998/02/06 17:57:32 kaleb $ */ +/* $Xorg: WMProps.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ /* Copyright 1987, 1988, 1993, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/WMProps.c,v 3.3 2000/03/31 20:13:12 dawes Exp $ */ +/* $XFree86: xc/lib/X11/WMProps.c,v 3.4 2001/01/17 19:41:46 dawes Exp $ */ /*********************************************************** Copyright 1988 by Wyse Technology, Inc., San Jose, Ca., Index: xc/lib/X11/WarpPtr.c diff -u xc/lib/X11/WarpPtr.c:1.2 xc/lib/X11/WarpPtr.c:1.3 --- xc/lib/X11/WarpPtr.c:1.2 Sun May 9 06:50:22 1999 +++ xc/lib/X11/WarpPtr.c Wed Jan 17 14:41:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: WarpPtr.c /main/6 1998/02/06 17:56:58 kaleb $ */ +/* $Xorg: WarpPtr.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/WarpPtr.c,v 1.2 1999/05/09 10:50:22 dawes Exp $ */ +/* $XFree86: xc/lib/X11/WarpPtr.c,v 1.3 2001/01/17 19:41:47 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/WinEvent.c diff -u xc/lib/X11/WinEvent.c:3.2 xc/lib/X11/WinEvent.c:3.3 --- xc/lib/X11/WinEvent.c:3.2 Sun May 9 06:50:22 1999 +++ xc/lib/X11/WinEvent.c Wed Jan 17 14:41:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: WinEvent.c /main/13 1998/02/06 17:57:15 kaleb $ */ +/* $Xorg: WinEvent.c,v 1.3 2000/08/17 19:44:59 cpqbld Exp $ */ /* Copyright 1985, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/WinEvent.c,v 3.2 1999/05/09 10:50:22 dawes Exp $ */ +/* $XFree86: xc/lib/X11/WinEvent.c,v 3.3 2001/01/17 19:41:47 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" Index: xc/lib/X11/Window.c diff -u xc/lib/X11/Window.c:1.2 xc/lib/X11/Window.c:1.3 --- xc/lib/X11/Window.c:1.2 Sun May 9 06:50:22 1999 +++ xc/lib/X11/Window.c Wed Jan 17 14:41:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: Window.c /main/10 1998/02/06 17:57:10 kaleb $ */ +/* $Xorg: Window.c,v 1.4 2000/08/17 19:44:59 cpqbld Exp $ */ /* Copyright 1986, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Window.c,v 1.2 1999/05/09 10:50:22 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Window.c,v 1.3 2001/01/17 19:41:47 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Withdraw.c diff -u xc/lib/X11/Withdraw.c:1.1.1.2 xc/lib/X11/Withdraw.c:1.1.1.3 --- xc/lib/X11/Withdraw.c:1.1.1.2 Sun Sep 27 03:57:23 1998 +++ xc/lib/X11/Withdraw.c Tue Jan 16 17:08:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: Withdraw.c /main/7 1998/02/06 17:57:21 kaleb $ */ +/* $Xorg: Withdraw.c,v 1.3 2000/08/17 19:44:59 cpqbld Exp $ */ /*********************************************************** Copyright 1988 by Wyse Technology, Inc., San Jose, Ca., Index: xc/lib/X11/WrBitF.c diff -u xc/lib/X11/WrBitF.c:3.2 xc/lib/X11/WrBitF.c:3.3 --- xc/lib/X11/WrBitF.c:3.2 Sat Oct 3 04:41:24 1998 +++ xc/lib/X11/WrBitF.c Wed Jan 17 14:41:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: WrBitF.c /main/14 1998/02/06 17:57:38 kaleb $ */ +/* $Xorg: WrBitF.c,v 1.3 2000/08/17 19:44:59 cpqbld Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/WrBitF.c,v 3.2 1998/10/03 08:41:24 dawes Exp $ */ +/* $XFree86: xc/lib/X11/WrBitF.c,v 3.3 2001/01/17 19:41:47 dawes Exp $ */ #include "Xlibint.h" #include Index: xc/lib/X11/X11-def.cpp diff -u xc/lib/X11/X11-def.cpp:1.6 xc/lib/X11/X11-def.cpp:1.10 --- xc/lib/X11/X11-def.cpp:1.6 Wed Aug 9 19:40:12 2000 +++ xc/lib/X11/X11-def.cpp Thu Apr 5 15:29:38 2001 @@ -12,25 +12,6 @@ _XLockMutex_fn_p=_XLockMutex_fn CONSTANT _XUnlockMutex_fn_p=_XUnlockMutex_fn CONSTANT _Xglobal_lock_p=_Xglobal_lock CONSTANT -#else - _Xdebug - _Xsetlocale - _XFlush - _Xlcmbtowc - _Xlcwctomb - _Xlcmbstowcs - _Xlcwcstombs - _Xmbtowc - _Xmblen - _Xwctomb - _Xmbstowcs - _Xwcstombs - _Xwcscpy - _Xwcsncpy - _Xwcslen - _Xwcscmp - _Xwcsncmp -#endif XActivateScreenSaver XAddConnectionWatch XAddExtension @@ -623,22 +604,13 @@ _XDeqAsyncHandler _XEatData _XError -#ifndef __CYGWIN__ _XFlushIt -#endif _XFlushGCCache _XFreeTemp _XGetAsyncData _XGetAsyncReply -#ifdef __CYGWIN__ - _XGetBitsPerPixel - _XGetScanlinePad -#endif _XIOError _XInitImageFuncPtrs -#ifndef __CYGWIN__ - _XLockDisplay -#endif _XRead _XReadEvents _XReadPad @@ -652,10 +624,8 @@ _XUnregisterFilter _XUnregisterInternalConnection _XVIDtoVisual -#ifndef __CYGWIN__ _Xthread_init _Xthread_waiter -#endif XkbIgnoreExtension XkbOpenDisplay XkbQueryExtension @@ -840,5 +810,1182 @@ XkbUpdateKeyTypeVirtualMods XkbUpdateMapFromCore XkbXlibControlsImplemented -/* $TOG: X11-def.cpp /main/19 1998/06/16 16:04:58 kaleb $ */ -/* $XFree86: xc/lib/X11/X11-def.cpp,v 1.6 2000/08/09 23:40:12 dawes Exp $ */ + Xutf8TextPropertyToTextList + Xutf8TextListToTextProperty +#else + XSaveContext + XFindContext + XDeleteContext + XListDepths + XrmParseCommand + Xpermalloc + _XrmInternalStringToQuark + XrmStringToQuark + XrmPermStringToQuark + XrmUniqueQuark + XrmQuarkToString + XAllocColorCells + XAllocColorPlanes + XAllowEvents + XAutoRepeatOn + XAutoRepeatOff + XSetWindowBackground + XSetWindowBorderWidth + XBell + XSetWindowBorder + XEnableAccessControl + XDisableAccessControl + XSetAccessControl + XSetCloseDownMode + XChangeActivePointerGrab + XSetWindowColormap + XChangeGC + XChangeKeyboardControl + XChangePointerControl + XChangeProperty + XChangeSaveSet + XAddToSaveSet + XRemoveFromSaveSet + XChangeWindowAttributes + XResizeWindow + XCheckIfEvent + XCheckMaskEvent + XCheckWindowEvent + XCheckTypedEvent + XCheckTypedWindowEvent + XCirculateSubwindows + XCirculateSubwindowsDown + XCirculateSubwindowsUp + XCloseDisplay + XClearWindow + XClearArea + XMoveResizeWindow + _XConnectDisplay + _XDisconnectDisplay + _XSendClientPrefix + XSetAuthorization + XConvertSelection + XCopyArea + XCopyColormapAndFree + XCopyGC + XCopyPlane + XCreateBitmapFromData + XCreateColormap + XCreatePixmapCursor + XCreateGC + _XUpdateGCCache + _XFlushGCCache + XFlushGC + XGContextFromGC + XCreateGlyphCursor + XCreatePixmapFromBitmapData + XCreatePixmap + XCreateSimpleWindow + XCreateFontCursor + XDefineCursor + XDeleteProperty + XDestroySubwindows + XDestroyWindow + XDisplayName + XDrawArc + XDrawArcs + XDrawLine + XDrawLines + XDrawPoint + XDrawPoints + XDrawRectangle + XDrawRectangles + XDrawSegments + XGetErrorText + XGetErrorDatabaseText + XSetErrorHandler + XSetIOErrorHandler + _XEventToWire + XFetchName + XGetIconName + XFillArc + XFillArcs + XFillPolygon + XFillRectangle + XFillRectangles + XFlush + XLoadQueryFont + XFreeFont + XQueryFont + XListFonts + XFreeFontNames + XListFontsWithInfo + XFreeFontInfo + XFreeColormap + XFreeColors + XFreeCursor + _XFreeExtData + XFreeGC + XFreePixmap + XActivateScreenSaver + XResetScreenSaver + XForceScreenSaver + XSetArcMode + XSetFillRule + XSetFillStyle + XSetGraphicsExposures + XSetSubwindowMode + XGeometry + XGetAtomName + XAllocNamedColor + XGetDefault + XGetFontPath + XFreeFontPath + XGetFontProperty + XGetGeometry + XAllocColor + XGetSizeHints + XGetWMHints + XGetZoomHints + XGetNormalHints + XGetIconSizes + XGetCommand + XGetTransientForHint + XGetClassHint + XGetInputFocus + XGetImage + XGetSubImage + XGetKeyboardControl + XGetMotionEvents + XGetPointerControl + XGetPointerMapping + XGetKeyboardMapping + XGetWindowProperty + XGetSelectionOwner + XGetScreenSaver + XGetStandardColormap + XGetWindowAttributes + XGrabButton + XGrabKey + XGrabKeyboard + XGrabPointer + XGrabServer + XAddHost + XRemoveHost + XAddHosts + XRemoveHosts + XIfEvent + _XGetScanlinePad + _XGetBitsPerPixel + XCreateImage + _XSetImage + _XInitImageFuncPtrs + XDrawImageString + XDrawImageString16 + XInitExtension + XAddExtension + XEHeadOfExtensionList + XAddToExtensionList + XFindOnExtensionList + XESetCreateGC + XESetCopyGC + XESetFlushGC + XESetFreeGC + XESetCreateFont + XESetFreeFont + XESetCloseDisplay + XESetWireToEvent + XESetEventToWire + XESetWireToError + XESetError + XESetErrorString + XESetPrintErrorValues + XInstallColormap + XInternAtom + XKeycodeToKeysym + XKeysymToKeycode + XLookupKeysym + XRefreshKeyboardMapping + XLookupString + XRebindKeysym + XKeysymToString + XKillClient + XListHosts + XListInstalledColormaps + XListProperties + XListExtensions + XFreeExtensionList + XLoadFont + XLookupColor + XLowerWindow + XConnectionNumber + XRootWindow + XDefaultScreen + XDefaultRootWindow + XDefaultVisual + XDefaultGC + XBlackPixel + XWhitePixel + XAllPlanes + XQLength + XDisplayWidth + XDisplayHeight + XDisplayWidthMM + XDisplayHeightMM + XDisplayPlanes + XDisplayCells + XScreenCount + XServerVendor + XProtocolVersion + XProtocolRevision + XVendorRelease + XDisplayString + XDefaultDepth + XDefaultColormap + XBitmapUnit + XBitmapBitOrder + XBitmapPad + XImageByteOrder + XNextRequest + XLastKnownRequestProcessed + XScreenOfDisplay + XDefaultScreenOfDisplay + XDisplayOfScreen + XRootWindowOfScreen + XBlackPixelOfScreen + XWhitePixelOfScreen + XDefaultColormapOfScreen + XDefaultDepthOfScreen + XDefaultGCOfScreen + XDefaultVisualOfScreen + XWidthOfScreen + XHeightOfScreen + XWidthMMOfScreen + XHeightMMOfScreen + XPlanesOfScreen + XCellsOfScreen + XMinCmapsOfScreen + XMaxCmapsOfScreen + XDoesSaveUnders + XDoesBackingStore + XEventMaskOfScreen + XScreenNumberOfScreen + XDestroyImage + XGetPixel + XPutPixel + XSubImage + XAddPixel + XNoOp + XMapRaised + XMapSubwindows + XMapWindow + XMaskEvent + XMaxRequestSize + XResourceManagerString + XDisplayMotionBufferSize + XDisplayKeycodes + XVisualIDFromVisual + XGetModifierMapping + XSetModifierMapping + XNewModifiermap + XFreeModifiermap + XInsertModifiermapEntry + XDeleteModifiermapEntry + XMoveWindow + XNextEvent + XOpenDisplay + _XFreeDisplayStructure + XParseColor + XParseGeometry + XPeekEvent + XPeekIfEvent + XEventsQueued + XPending + XSetWindowBackgroundPixmap + XSetWindowBorderPixmap + XPolygonRegion + XDrawText + XDrawText16 + XPutBackEvent + _XReverse_Bytes + XPutImage + XQueryBestSize + XQueryColor + XQueryColors + XQueryBestCursor + XQueryExtension + XQueryKeymap + XQueryPointer + XQueryBestStipple + XQueryTextExtents16 + XQueryTextExtents + XQueryBestTile + XQueryTree + XRaiseWindow + XReadBitmapFile + XRecolorCursor + XConfigureWindow + XCreateRegion + XClipBox + XUnionRectWithRegion + XSetRegion + XDestroyRegion + XOffsetRegion + XShrinkRegion + XIntersectRegion + XUnionRegion + XSubtractRegion + XXorRegion + XEmptyRegion + XEqualRegion + XPointInRegion + XRectInRegion + XReparentWindow + XRestackWindows + XRotateWindowProperties + XScreenResourceString + XSelectInput + XSendEvent + XSetBackground + XSetClipRectangles + _XSetClipRectangles + XSetClipMask + XSetClipOrigin + XSetDashes + XSetFontPath + XSetFont + XSetForeground + XSetFunction + XSetSizeHints + XSetWMHints + XSetZoomHints + XSetNormalHints + XSetIconSizes + XSetCommand + XSetStandardProperties + XSetTransientForHint + XSetClassHint + XSetInputFocus + XSetLineAttributes + XSetPlaneMask + XSetPointerMapping + XChangeKeyboardMapping + XSetSelectionOwner + XSetScreenSaver + XSetState + XSetStipple + XSetStandardColormap + XSetTile + XSetTSOrigin + XRotateBuffers + XFetchBuffer + XFetchBytes + XStoreBuffer + XStoreBytes + XStoreColor + XStoreColors + XStoreNamedColor + XStoreName + XSetIconName + _XInitKeysymDB + XStringToKeysym + XSync + _XSyncFunction + XSynchronize + XSetAfterFunction + XDrawString + XDrawString16 + XTextExtents + XTextWidth + XTextExtents16 + XTextWidth16 + XTranslateCoordinates + XUndefineCursor + XUngrabButton + XUngrabKeyboard + XUngrabKey + XUngrabPointer + XUngrabServer + XUninstallColormap + XUnloadFont + XUnmapSubwindows + XUnmapWindow + XGetVisualInfo + XMatchVisualInfo + XWarpPointer + XWindowEvent + XCreateWindow + _XProcessWindowAttributes + XWriteBitmapFile + _XFlush + _XEventsQueued + _XReadEvents + _XRead + _XReadPad + _XSend + _XAllocID + _XSetLastRequestRead + _XReply + _XEatData + _XEnq + _XUnknownWireEvent + _XUnknownNativeEvent + _XWireToEvent + _XDefaultIOError + _XDefaultError + _XDefaultWireError + _XError + _XIOError + _XAllocScratch + _XVIDtoVisual + XFree + _XGetHostname + _XScreenOfWindow + _XAllocIDs + _XAllocTemp + _XFreeTemp + XrmInitialize + XrmGetDatabase + XrmSetDatabase + XrmStringToQuarkList + XrmStringToBindingQuarkList + XrmCombineDatabase + XrmMergeDatabases + XrmQPutResource + XrmPutResource + XrmQPutStringResource + XrmPutStringResource + XrmPutLineResource + XrmGetStringDatabase + XrmGetFileDatabase + XrmCombineFileDatabase + XrmEnumerateDatabase + XrmPutFileDatabase + XrmQGetSearchList + XrmQGetSearchResource + XrmQGetResource + XrmGetResource + XrmLocaleOfDatabase + XrmDestroyDatabase + XGetGCValues + XGetWMSizeHints + XGetWMNormalHints + XGetRGBColormaps + XGetTextProperty + XGetWMName + XGetWMIconName + XGetWMClientMachine + XGetWMColormapWindows + XGetWMProtocols + XIconifyWindow + XListPixmapFormats + XAllocSizeHints + XAllocStandardColormap + XAllocWMHints + XAllocClassHint + XAllocIconSize + XReconfigureWMWindow + XSetWMSizeHints + XSetWMNormalHints + XSetRGBColormaps + XSetTextProperty + XSetWMName + XSetWMIconName + XSetWMClientMachine + XSetWMColormapWindows + XSetWMProperties + XSetWMProtocols + XStringListToTextProperty + XTextPropertyToStringList + XFreeStringList + XWMGeometry + XWithdrawWindow + XauDisposeAuth + XauGetBestAuthByAddr + XauFileName + XauReadAuth + XcmsCIELabToCIEXYZ + XcmsCIEXYZToCIELab + XcmsCIELabClipab + XcmsCIELabClipL + XcmsCIELabClipLab + XcmsCIELabQueryMinL + XcmsCIELabQueryMaxC + XcmsCIELabQueryMaxL + _XcmsCIELabQueryMaxLCRGB + XcmsCIELabQueryMaxLC + XcmsCIELabWhiteShiftColors + XcmsCIELuvToCIEuvY + XcmsCIEuvYToCIELuv + XcmsCIELuvClipuv + XcmsCIELuvClipL + XcmsCIELuvClipLuv + XcmsCIELuvQueryMinL + XcmsCIELuvQueryMaxC + XcmsCIELuvQueryMaxL + _XcmsCIELuvQueryMaxLCRGB + XcmsCIELuvQueryMaxLC + XcmsCIELuvWhiteShiftColors + XcmsCIEuvYToCIEXYZ + XcmsCIEXYZToCIEuvY + XcmsCIExyYToCIEXYZ + XcmsCIEXYZToCIExyY + XcmsTekHVCToCIEuvY + XcmsCIEuvYToTekHVC + _XcmsTekHVC_CheckModify + XcmsTekHVCClipC + XcmsTekHVCClipV + XcmsTekHVCClipVC + XcmsTekHVCQueryMinV + XcmsTekHVCQueryMaxC + XcmsTekHVCQueryMaxV + _XcmsTekHVCQueryMaxVCRGB + XcmsTekHVCQueryMaxVC + XcmsTekHVCQueryMaxVSamples + XcmsTekHVCWhiteShiftColors + XcmsAddColorSpace + XcmsAddFunctionSet + XcmsAllocNamedColor + XcmsAllocColor + XcmsCreateCCC + XcmsDefaultCCC + XcmsFreeCCC + _XcmsAddCmapRec + _XcmsCopyCmapRecAndFree + _XcmsDeleteCmapRec + XcmsCCCOfColormap + _XcmsCopyISOLatin1Lowered + _XcmsResolveColorString + _XcmsConvertColorsWithWhitePt + _XcmsEqualWhitePts + _XcmsDIConvertColors + _XcmsDDConvertColors + XcmsConvertColors + _XcmsRegFormatOfPrefix + XcmsFormatOfPrefix + _XcmsCopyPointerArray + _XcmsFreePointerArray + _XcmsPushPointerArray + _XcmsInitDefaultCCCs + _XcmsInitScrnInfo + _XcmsFreeIntensityMaps + _XcmsGetIntensityMap + _XcmsGetTableType0 + _XcmsGetTableType1 + _XcmsValueCmp + _XcmsIntensityCmp + _XcmsValueInterpolation + _XcmsIntensityInterpolation + _XcmsTableSearch + _XcmsMatVec + XcmsCIEXYZToRGBi + XcmsRGBiToCIEXYZ + XcmsRGBiToRGB + XcmsRGBToRGBi + _XcmsLRGB_InitScrnDefault + XcmsLookupColor + _XcmsCubeRoot + _XcmsSquareRoot + XcmsDisplayOfCCC + XcmsVisualOfCCC + XcmsScreenNumberOfCCC + XcmsScreenWhitePointOfCCC + XcmsClientWhitePointOfCCC + XcmsPrefixOfFormat + _XcmsGetElement + _XcmsGetProperty + XcmsQueryBlack + XcmsQueryBlue + XcmsQueryGreen + XcmsQueryRed + XcmsQueryWhite + XcmsQueryColor + XcmsQueryColors + XcmsSetWhitePoint + XcmsSetCompressionProc + XcmsSetWhiteAdjustProc + _XcmsSetGetColors + XcmsStoreColor + XcmsStoreColors + _XcmsCosine + _XcmsSine + _XcmsArcTangent + _XcmsRGB_to_XColor + _XColor_to_XcmsRGB + _XcmsResolveColor + _XcmsUnresolveColor + _XUnresolveColor + _XParseBaseFontNameList + XCreateFontSet + XFontsOfFontSet + XBaseFontNameListOfFontSet + XLocaleOfFontSet + XContextDependentDrawing + XExtentsOfFontSet + XFreeFontSet + XVaCreateNestedList + XGetIMValues + XCreateIC + XDestroyIC + XGetICValues + XSetICValues + XSetICFocus + XUnsetICFocus + XIMOfIC + XmbResetIC + XwcResetIC + XmbLookupString + XwcLookupString + _XIMCompileResourceList + _XCopyToArg + XOpenIM + XCloseIM + XDisplayOfIM + XLocaleOfIM + XSetLocaleModifiers + XSupportsLocale + _XlcValidModSyntax + _XlcDefaultMapModifiers + _XlcAddLoader + _XlcCurrentLC + XmbSetWMProperties + XmbDrawText + XmbDrawString + XmbDrawImageString + XmbTextEscapement + XmbTextExtents + XmbTextPerCharExtents + XwcDrawText + XwcDrawString + XwcDrawImageString + XwcTextEscapement + XwcTextExtents + XwcTextPerCharExtents + XFilterEvent + _XRegisterFilterByMask + _XRegisterFilterByType + _XUnregisterFilter + _Xsetlocale + XDefaultString + _XlcDefaultLoader + _XrmInitParseInfo + XmbTextPropertyToTextList + XmbTextListToTextProperty + XwcTextPropertyToTextList + XwcFreeStringList + XwcTextListToTextProperty + _X11TransConnectDisplay + XGetAtomNames + XInitImage + XESetBeforeFlush + _XFreeAtomTable + _XUpdateAtomCache + XInternAtoms + _XKeyInitialize + XConvertCase + _XTranslateKey + _XTranslateKeySym + _XKeysymToModifiers + XExtendedMaxRequestSize + XReadBitmapFileData + _XAsyncErrorHandler + _XDeqAsyncHandler + _XGetAsyncReply + _XGetAsyncData + _XPollfdCacheInit + _XPollfdCacheAdd + _XPollfdCacheDel + _XRegisterInternalConnection + _XUnregisterInternalConnection + XInternalConnectionNumbers + XProcessInternalConnection + XAddConnectionWatch + XRemoveConnectionWatch + _XDeq + _XcmsCIEXYZ_ValidSpec + _XcmsCIEuvY_ValidSpec + XcmsSetCCCOfColormap + XDirectionalDependentDrawing + XContextualDrawing + XSetIMValues + XRegisterIMInstantiateCallback + XUnregisterIMInstantiateCallback + XCreateOC + XDestroyOC + XOMOfOC + XSetOCValues + XGetOCValues + XOpenOM + XCloseOM + XSetOMValues + XGetOMValues + XDisplayOfOM + XLocaleOfOM + _XlcRemoveLoader + _XOpenLC + _XCloseLC + _XlcCopyFromArg + _XlcCopyToArg + _XlcCountVaList + _XlcVaToArgList + _XlcCompileResourceList + _XlcGetValues + _XlcSetValues + XInitThreads + XLockDisplay + XUnlockDisplay + _X11TransFreeConnInfo + _X11TransOpenCOTSClient + _X11TransOpenCLTSClient + _X11TransSetOption + _X11TransConnect + _X11TransBytesReadable + _X11TransRead + _X11TransWrite + _X11TransReadv + _X11TransWritev + _X11TransDisconnect + _X11TransClose + _X11TransCloseForCloning + _X11TransIsLocal + _X11TransGetMyAddr + _X11TransGetPeerAddr + _X11TransGetConnectionNumber + _X11TransGetHostname + _X11TransConvertAddress + _XimCbDispatch + _XimLookupMBText + _XimLookupWCText + _XimRegisterFilter + _XimUnregisterFilter + _XimReregisterFilter + _XimRegisterServerFilter + _XimUnregisterServerFilter + _XimProtoCreateIC + _XimCheckDataSize + _XimSetHeader + _XimProtoIMFree + _XimProtoOpenIM + _XimICOfXICID + _XimSetEventMaskCallback + _XimSync + _XimProcSyncReply + _XimRespSyncReply + _XimSyncCallback + _XimForwardEvent + _XimForwardEventCallback + _XimRegisterTriggerKeysCallback + _XimGetWindowEventmask + _XimTriggerNotify + _XimFreeCommitInfo + _XimCommitCallback + _XimProcError + _XimErrorCallback + _XimError + _Ximctstombs + _Ximctstowcs + _XimProtoMbLookupString + _XimProtoWcLookupString + _XimRegProtoIntrCallback + _XimFreeProtoIntrCallback + _XimDispatchInit + _XimProtoEventToWire + _XimProtoWireToEvent + _XimExtension + _XimRegisterIMInstantiateCallback + _XimUnRegisterIMInstantiateCallback + _XimResetIMInstantiateCallback + _XimDestroyIMStructureList + _XimServerDestroy + _XInitIM + _XimLocalFilter + _XimLocalGetICValues + _XimLocalCreateIC + _XimCheckIfLocalProcessing + _XimLocalIMFree + _XimLocalGetIMValues + _XimLocalSetIMValues + _XimLocalOpenIM + _XimLocalMbLookupString + _XimLocalWcLookupString + _XimParseStringFile + _XimSetICValueData + _XimLocalSetICValues + _XimSetIMResourceList + _XimSetICResourceList + _XimSetInnerIMResourceList + _XimSetInnerICResourceList + _XimCheckCreateICValues + _XimGetResourceListRec + _XimSetIMMode + _XimCheckIMMode + _XimSetICMode + _XimCheckICMode + _XimSetLocalIMDefaults + _XimSetICDefaults + _XimDecodeLocalIMAttr + _XimDecodeLocalICAttr + _XimCheckLocalInputStyle + _XimEncodeLocalIMAttr + _XimEncodeLocalICAttr + _XimGetCurrentIMValues + _XimSetCurrentIMValues + _XimGetCurrentICValues + _XimSetCurrentICValues + _XimInitialResourceInfo + _XimDecodeIMATTRIBUTE + _XimDecodeICATTRIBUTE + _XimEncodeIMATTRIBUTE + _XimEncodeICATTRIBUTE + _XimGetAttributeID + _XimThaiFilter + _XimThaiCreateIC + _XimCheckIfThaiProcessing + _XimThaiOpenIM + _XimThaiIMFree + _XimThaiCloseIM + _XimXConf + _XimConnect + _XimShutdown + _XimFlush + _XimFilterWaitEvent + _XimFreeTransIntrCallback + _XimTransFilterWaitEvent + _XimTransInternalConnection + _XimTransFlush + _XimTransConf + _XlcParseCharSet + _XlcInitCTInfo + _XlcGetCSValues + _XlcGetCharSet + _XlcAddCharSet + _XlcCreateDefaultCharSet + _XlcSetConverter + _XlcOpenConverter + _XlcCloseConverter + _XlcConvert + _XlcResetConverter + _XlcGetResource + _XlcGetLocaleDataBase + _XlcDestroyLocaleDataBase + _XlcCreateLocaleDataBase + _XlcEucLoader + _XlcFileName + _XlcResolveLocaleName +;REMOVED _XlcResolveDBName + _XlcResolveI18NPath + _XlcGenericLoader + _XlcInitLoader + _XmbTextPropertyToTextList + _XwcTextPropertyToTextList + _XwcFreeStringList + _XGetLCValues + _XlcDestroyLC + _XlcCreateLC + _XrmDefaultInitParseInfo + _XlcSjisLoader + _Xlcmbtowc + _Xlcwctomb + _Xlcmbstowcs + _Xlcwcstombs + _Xmbtowc + _Xwctomb + _Xmbstowcs + _Xwcstombs + _Xwcscpy + _Xwcsncpy + _Xwcslen + _Xwcscmp + _Xwcsncmp + _XmbTextListToTextProperty + _XwcTextListToTextProperty +; _XlcUtfLoader + _XlcCompareISOLatin1 + _XlcNCompareISOLatin1 + _XmbDefaultTextEscapement + _XwcDefaultTextEscapement + _XmbDefaultTextExtents + _XwcDefaultTextExtents + _XmbDefaultTextPerCharExtents + _XwcDefaultTextPerCharExtents + _XmbDefaultDrawString + _XwcDefaultDrawString + _XmbDefaultDrawImageString + _XwcDefaultDrawImageString + _XomGenericOpenOM + _XInitOM + _XmbGenericDrawImageString + _XwcGenericDrawImageString + _XomGenericDrawString + _XmbGenericDrawString + _XwcGenericDrawString + _XmbGenericTextEscapement + _XwcGenericTextEscapement + _XomGenericTextExtents + _XmbGenericTextExtents + _XwcGenericTextExtents + _XmbGenericTextPerCharExtents + _XwcGenericTextPerCharExtents + _XomConvert + _XomInitConverter + _Xmblen + _XimGetResourceListRecByQuark + _XimSetIMValueData + _XimGetIMValueData + _XimGetICValueData + _XimMakeIMAttrIDList + _XimMakeICAttrIDList + _XimWrite + _XimRead + _XimRegisterDispatcher + _XimTransRegisterDispatcher + _XimTransCallDispatcher + _XimTransWrite + _XimTransRead + _XimXTransFreeConnInfo + _XimXTransOpenCOTSClient + _XimXTransOpenCLTSClient + _XimXTransSetOption + _XimXTransConnect + _XimXTransBytesReadable + _XimXTransRead + _XimXTransWrite + _XimXTransReadv + _XimXTransWritev + _XimXTransDisconnect + _XimXTransClose + _XimXTransCloseForCloning + _XimXTransIsLocal + _XimXTransGetMyAddr + _XimXTransGetPeerAddr + _XimXTransGetConnectionNumber + _XimXTransGetHostname + _Xdebug + Xutf8TextPropertyToTextList + Xutf8TextListToTextProperty + XkbIgnoreExtension + XkbOpenDisplay + XkbQueryExtension + XkbUseExtension + XkbLibraryVersion + XkbSetXlibControls + XkbGetXlibControls + XkbSetAtomFuncs + XkbKeycodeToKeysym + XkbKeysymToModifiers + XkbLookupKeySym + XkbLookupKeyBinding + XkbTranslateKeyCode + XkbTranslateKeySym + XkbSetAutoRepeatRate + XkbGetAutoRepeatRate + XkbChangeEnabledControls + XkbDeviceBell + XkbForceDeviceBell + XkbDeviceBellEvent + XkbBell + XkbForceBell + XkbBellEvent + XkbSelectEvents + XkbSelectEventDetails + XkbNoteMapChanges + XkbNoteNameChanges + XkbGetIndicatorState + XkbGetIndicatorMap + XkbSetIndicatorMap + XkbGetNamedIndicator + XkbGetNamedDeviceIndicator + XkbSetNamedIndicator + XkbSetNamedDeviceIndicator + XkbLockModifiers + XkbLatchModifiers + XkbLockGroup + XkbLatchGroup + XkbSetServerInternalMods + XkbSetIgnoreLockMods + XkbVirtualModsToReal + XkbComputeEffectiveMap + XkbInitCanonicalKeyTypes + XkbAllocKeyboard + XkbFreeKeyboard + XkbAllocClientMap + XkbAllocServerMap + XkbFreeClientMap + XkbFreeServerMap + XkbAddKeyType + XkbAllocIndicatorMaps + XkbFreeIndicatorMaps + XkbGetMap + XkbGetUpdatedMap + XkbGetMapChanges + XkbRefreshKeyboardMapping + XkbGetKeyTypes + XkbGetKeySyms + XkbGetKeyActions + XkbGetKeyBehaviors + XkbGetVirtualMods + XkbGetKeyExplicitComponents + XkbGetKeyModifierMap + XkbAllocControls + XkbFreeControls + XkbGetControls + XkbSetControls + XkbAllocCompatMap + XkbFreeCompatMap + XkbGetCompatMap + XkbSetCompatMap + XkbAllocNames + XkbGetNames + XkbSetNames + XkbChangeNames + XkbFreeNames + XkbGetState + XkbSetMap + XkbChangeMap + XkbSetDetectableAutoRepeat + XkbGetDetectableAutoRepeat + XkbSetAutoResetControls + XkbGetAutoResetControls + XkbCopyKeyType + XkbCopyKeyTypes + XkbResizeKeyType + XkbResizeKeySyms + XkbResizeKeyActions + XkbChangeTypesOfKey + XkbListComponents + XkbFreeComponentList + XkbGetKeyboard + XkbGetKeyboardByName + XkbAddDeviceLedInfo + XkbResizeDeviceButtonActions + XkbAllocDeviceInfo + XkbFreeDeviceInfo + XkbNoteDeviceChanges + XkbGetDeviceInfo + XkbGetDeviceInfoChanges + XkbGetDeviceButtonActions + XkbGetDeviceLedInfo + XkbSetDeviceInfo + XkbChangeDeviceInfo + XkbSetDeviceLedInfo + XkbSetDeviceButtonActions + XkbToControl + XkbSetDebuggingFlags + _XkbInternAtomFunc + _XkbGetAtomNameFunc + _XkbReloadDpy + _XKeycodeToKeysym + _XKeysymToKeycode + _XLookupKeysym + _XRefreshKeyboardMapping + _XLookupString + _XkbNoteCoreMapChanges + _XkbInitReadBuffer + _XkbSkipReadBufferData + _XkbCopyFromReadBuffer + _XkbReadCopyKeySyms + _XkbWriteCopyKeySyms + _XkbReadBufferCopyKeySyms + _XkbPeekAtReadBuffer + _XkbGetReadBufferPtr + _XkbFreeReadBuffer + _XkbGetReadBufferCountedString + _XkbGetCharset + _XkbGetConverters + XkbGetGeometry + XkbAddGeomShape + XkbAddGeomOutline + XkbComputeShapeBounds + XkbAddGeomDoodad + XkbAddGeomColor + XkbAddGeomOverlayRow + XkbAddGeomSection + XkbAddGeomRow + XkbAddGeomKey + XkbComputeSectionBounds + XkbAllocGeometry + XkbAddGeomProperty + XkbAddGeomOverlay + XkbComputeShapeTop + XkbFindOverlayForKey + XkbAllocGeomKeyAliases + XkbSetGeometry + XkbXlibControlsImplemented + XkbTranslateKey + XkbAddGeomOverlayKey + XkbNoteControlsChanges + XkbGetKeyVirtualModMap + XkbComputeRowBounds + XkbGetNamedGeometry + XkbKeyTypesForCoreSymbols + XkbApplyCompatMapToKey + XkbUpdateMapFromCore + XkbUpdateActionVirtualMods + XkbUpdateKeyTypeVirtualMods + XkbApplyVirtualModChanges + XkbFreeGeomProperties + XkbFreeGeomKeyAliases + XkbFreeGeomColors + XkbFreeGeomPoints + XkbFreeGeomOutlines + XkbFreeGeomShapes + XkbFreeGeomOverlayKeys + XkbFreeGeomOverlayRows + XkbFreeGeomOverlays + XkbFreeGeomKeys + XkbFreeGeomRows + XkbFreeGeomSections + XkbFreeGeomDoodads + XkbFreeGeometry + XkbAllocGeomProps + XkbAllocGeomColors + XkbAllocGeomShapes + XkbAllocGeomSections + XkbAllocGeomOverlays + XkbAllocGeomOverlayRows + XkbAllocGeomOverlayKeys + XkbAllocGeomDoodads + XkbAllocGeomSectionDoodads + XkbAllocGeomOutlines + XkbAllocGeomRows + XkbAllocGeomPoints + XkbAllocGeomKeys + XkbAddGeomKeyAlias + _XkeyTable + _Xevent_to_mask + _qfree + _XIOErrorFunction + _XErrorFunction + _XHeadOfDisplayList + XcmsCIELabColorSpace + XcmsCIELuvColorSpace + XcmsCIEXYZColorSpace + XcmsCIEuvYColorSpace + XcmsCIExyYColorSpace + XcmsTekHVCColorSpace + XcmsUNDEFINEDColorSpace + _XcmsDIColorSpacesInit + _XcmsDIColorSpaces + _XcmsDDColorSpacesInit + _XcmsDDColorSpaces + _XcmsSCCFuncSetsInit + _XcmsSCCFuncSets + _XcmsCIEXYZ_prefix + _XcmsCIEuvY_prefix + _XcmsCIExyY_prefix + _XcmsCIELab_prefix + _XcmsCIELuv_prefix + _XcmsTekHVC_prefix + _XcmsRGBi_prefix + _XcmsRGB_prefix + _XcmsRegColorSpaces + XcmsRGBiColorSpace + XcmsRGBColorSpace + XcmsLinearRGBFunctionSet + _X11TransSocketINETFuncs + _X11TransSocketTCPFuncs + _XimXTransSocketINETFuncs + _XimXTransSocketTCPFuncs + _XimImSportRec + _XimTransportRec + _XlcGenericMethods + _XlcPublicMethods +#endif + +/* $Xorg: X11-def.cpp,v 1.3 2000/08/17 19:44:59 cpqbld Exp $ */ +/* $XFree86: xc/lib/X11/X11-def.cpp,v 1.10 2001/04/05 19:29:38 dawes Exp $ */ Index: xc/lib/X11/XErrorDB diff -u xc/lib/X11/XErrorDB:3.33 xc/lib/X11/XErrorDB:3.35 --- xc/lib/X11/XErrorDB:3.33 Mon Apr 17 12:29:48 2000 +++ xc/lib/X11/XErrorDB Fri May 18 19:35:28 2001 @@ -1,4 +1,4 @@ -! $TOG: XErrorDB /main/48 1998/02/11 15:36:23 kaleb $ +! $Xorg: XErrorDB,v 1.3 2000/08/17 19:44:59 cpqbld Exp $ ! Copyright 1993, 1995, 1998 The Open Group ! All Rights Reserved. @@ -19,7 +19,7 @@ ! other dealings in this Software without prior written authorization ! from The Open Group. ! -! $XFree86: xc/lib/X11/XErrorDB,v 3.33 2000/04/17 16:29:48 eich Exp $ +! $XFree86: xc/lib/X11/XErrorDB,v 3.35 2001/05/18 23:35:28 dawes Exp $ ! ! these are used in XGetErrorMessage. XlibMessage.XError: X Error of failed request @@ -581,6 +581,9 @@ XRequest.XFree86-VidModeExtension.14: XF86VidModeSetClientVersion XRequest.XFree86-VidModeExtension.15: XF86VidModeSetGamma XRequest.XFree86-VidModeExtension.16: XF86VidModeGetGamma +XRequest.XFree86-VidModeExtension.17: XF86VidModeGetGammaRamp +XRequest.XFree86-VidModeExtension.18: XF86VidModeSetGammaRamp +XRequest.XFree86-VidModeExtension.19: XF86VidModeGetGammaRampSize XProtoError.XFree86-VidModeExtension.0: XF86VidModeBadClock XProtoError.XFree86-VidModeExtension.1: XF86VidModeBadHTimings XProtoError.XFree86-VidModeExtension.2: XF86VidModeBadVTimings Index: xc/lib/X11/XKB.c diff -u xc/lib/X11/XKB.c:1.3 xc/lib/X11/XKB.c:1.5 --- xc/lib/X11/XKB.c:1.3 Sun May 9 06:50:23 1999 +++ xc/lib/X11/XKB.c Tue Feb 20 11:43:14 2001 @@ -1,4 +1,4 @@ -/* $TOG: XKB.c /main/23 1997/11/10 15:13:33 kaleb $ */ +/* $Xorg: XKB.c,v 1.3 2000/08/17 19:44:59 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKB.c,v 1.3 1999/05/09 10:50:23 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKB.c,v 1.5 2001/02/20 16:43:14 paulo Exp $ */ #include #define NEED_REPLIES @@ -854,9 +854,9 @@ UnlockDisplay(dpy); SyncHandle(); if (ctrls) - *ctrls= ((rep.value & XkbPCF_GrabsUseXKBStateMask) | + *ctrls= (rep.value & (XkbPCF_GrabsUseXKBStateMask | XkbPCF_LookupStateWhenGrabbed | - XkbPCF_SendEventUsesXKBState); + XkbPCF_SendEventUsesXKBState)); return (True); } Index: xc/lib/X11/XKBAlloc.c diff -u xc/lib/X11/XKBAlloc.c:3.4 xc/lib/X11/XKBAlloc.c:3.5 --- xc/lib/X11/XKBAlloc.c:3.4 Thu Aug 20 04:55:49 1998 +++ xc/lib/X11/XKBAlloc.c Wed Jan 17 14:41:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: XKBAlloc.c /main/7 1997/08/17 20:47:47 kaleb $ */ +/* $Xorg: XKBAlloc.c,v 1.4 2000/08/17 19:44:59 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBAlloc.c,v 3.4 1998/08/20 08:55:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBAlloc.c,v 3.5 2001/01/17 19:41:48 dawes Exp $ */ #ifndef XKB_IN_SERVER Index: xc/lib/X11/XKBBell.c diff -u xc/lib/X11/XKBBell.c:1.1.1.2 xc/lib/X11/XKBBell.c:1.1.1.3 --- xc/lib/X11/XKBBell.c:1.1.1.2 Sat Jan 6 21:35:17 1996 +++ xc/lib/X11/XKBBell.c Tue Jan 16 17:08:54 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKBBell.c /main/4 1996/01/01 11:25:48 kaleb $ */ +/* $Xorg: XKBBell.c,v 1.3 2000/08/17 19:45:00 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. Index: xc/lib/X11/XKBBind.c diff -u xc/lib/X11/XKBBind.c:3.12 xc/lib/X11/XKBBind.c:3.13 --- xc/lib/X11/XKBBind.c:3.12 Sat Aug 26 11:11:23 2000 +++ xc/lib/X11/XKBBind.c Wed Jan 17 14:41:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: XKBBind.c /main/28 1998/02/06 17:59:23 kaleb $ */ +/* $Xorg: XKBBind.c,v 1.3 2000/08/17 19:45:00 cpqbld Exp $ */ /* Copyright 1985, 1987, 1994, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/XKBBind.c,v 3.12 2000/08/26 15:11:23 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBBind.c,v 3.13 2001/01/17 19:41:48 dawes Exp $ */ /* the new monsters ate the old ones */ Index: xc/lib/X11/XKBCompat.c diff -u xc/lib/X11/XKBCompat.c:3.0 xc/lib/X11/XKBCompat.c:3.1 --- xc/lib/X11/XKBCompat.c:3.0 Sun Mar 3 23:20:14 1996 +++ xc/lib/X11/XKBCompat.c Wed Jan 17 14:41:48 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKBCompat.c /main/8 1996/03/01 14:29:32 kaleb $ */ +/* $Xorg: XKBCompat.c,v 1.3 2000/08/17 19:45:00 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. Index: xc/lib/X11/XKBCtrls.c diff -u xc/lib/X11/XKBCtrls.c:1.2 xc/lib/X11/XKBCtrls.c:1.3 --- xc/lib/X11/XKBCtrls.c:1.2 Sat Aug 26 11:11:24 2000 +++ xc/lib/X11/XKBCtrls.c Wed Jan 17 14:41:48 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKBCtrls.c /main/7 1996/02/02 14:09:20 kaleb $ */ +/* $Xorg: XKBCtrls.c,v 1.3 2000/08/17 19:45:00 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBCtrls.c,v 1.2 2000/08/26 15:11:24 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBCtrls.c,v 1.3 2001/01/17 19:41:48 dawes Exp $ */ #include #define NEED_REPLIES Index: xc/lib/X11/XKBCvt.c diff -u xc/lib/X11/XKBCvt.c:3.28 xc/lib/X11/XKBCvt.c:3.30 --- xc/lib/X11/XKBCvt.c:3.28 Tue Nov 28 12:25:07 2000 +++ xc/lib/X11/XKBCvt.c Thu Feb 8 19:02:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: XKBCvt.c /main/35 1998/05/30 20:29:41 kaleb $ */ +/* $Xorg: XKBCvt.c,v 1.4 2000/08/17 19:45:00 cpqbld Exp $ */ /* Copyright 1988, 1989, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/XKBCvt.c,v 3.28 2000/11/28 17:25:07 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBCvt.c,v 3.30 2001/02/09 00:02:53 dawes Exp $ */ #include #include @@ -266,7 +266,7 @@ */ #define CHARSET_FILE "/usr/lib/X11/input/charsets" -static char *_XkbKnownLanguages = "c=ascii:da,de,en,es,fr,is,it,nl,no,pt,sv=iso8859-1:hu,pl,cs=iso8859-2:eo=iso8859-3:sp=iso8859-5:ar,ara=iso8859-6:el=iso8859-7:he=iso8859-8:tr=iso8859-9:lt,lv=iso8859-13:et,fi=iso8859-15:ru=koi8-r:uk=koi8-u:th,th_TH,th_TH.TACTIS=tactis:hy=armscii-8:vi=tcvn-5712:ka=georgian-academy:be,bg=microsoft-cp1251"; +static char *_XkbKnownLanguages = "c=ascii:da,de,en,es,fr,is,it,nl,no,pt,sv=iso8859-1:hu,pl,cs=iso8859-2:eo=iso8859-3:sp=iso8859-5:ar,ara=iso8859-6:el=iso8859-7:he=iso8859-8:tr=iso8859-9:lt,lv=iso8859-13:et,fi=iso8859-15:ru=koi8-r:uk=koi8-u:th,th_TH,th_TH.TIS620=tis620:hy=armscii-8:vi=tcvn-5712:ka=georgian-academy:be,bg=microsoft-cp1251"; char * _XkbGetCharset() Index: xc/lib/X11/XKBExtDev.c diff -u xc/lib/X11/XKBExtDev.c:3.2 xc/lib/X11/XKBExtDev.c:3.3 --- xc/lib/X11/XKBExtDev.c:3.2 Sun May 9 06:50:23 1999 +++ xc/lib/X11/XKBExtDev.c Wed Jan 17 14:41:48 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKBExtDev.c /main/3 1996/08/31 12:44:26 kaleb $ */ +/* $Xorg: XKBExtDev.c,v 1.3 2000/08/17 19:45:01 cpqbld Exp $ */ /************************************************************ Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBExtDev.c,v 3.2 1999/05/09 10:50:23 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBExtDev.c,v 3.3 2001/01/17 19:41:48 dawes Exp $ */ #include #define NEED_REPLIES Index: xc/lib/X11/XKBGAlloc.c diff -u xc/lib/X11/XKBGAlloc.c:3.3 xc/lib/X11/XKBGAlloc.c:3.4 --- xc/lib/X11/XKBGAlloc.c:3.3 Sun Oct 26 08:24:43 1997 +++ xc/lib/X11/XKBGAlloc.c Wed Jan 17 14:41:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: XKBGAlloc.c /main/8 1997/08/17 20:49:48 kaleb $ */ +/* $Xorg: XKBGAlloc.c,v 1.3 2000/08/17 19:45:01 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBGAlloc.c,v 3.3 1997/10/26 13:24:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBGAlloc.c,v 3.4 2001/01/17 19:41:48 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES Index: xc/lib/X11/XKBGeom.c diff -u xc/lib/X11/XKBGeom.c:1.2 xc/lib/X11/XKBGeom.c:1.3 --- xc/lib/X11/XKBGeom.c:1.2 Sun May 9 06:50:24 1999 +++ xc/lib/X11/XKBGeom.c Wed Jan 17 14:41:48 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKBGeom.c /main/7 1996/02/02 14:38:29 kaleb $ */ +/* $Xorg: XKBGeom.c,v 1.4 2000/08/17 19:45:01 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBGeom.c,v 1.2 1999/05/09 10:50:24 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBGeom.c,v 1.3 2001/01/17 19:41:48 dawes Exp $ */ #ifdef DEBUG #include Index: xc/lib/X11/XKBGetByName.c diff -u xc/lib/X11/XKBGetByName.c:1.1.1.2 xc/lib/X11/XKBGetByName.c:1.1.1.3 --- xc/lib/X11/XKBGetByName.c:1.1.1.2 Sat Jan 6 21:35:21 1996 +++ xc/lib/X11/XKBGetByName.c Tue Jan 16 17:09:03 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKBGetByName.c /main/4 1996/01/01 11:26:52 kaleb $ */ +/* $Xorg: XKBGetByName.c,v 1.3 2000/08/17 19:45:02 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. Index: xc/lib/X11/XKBGetMap.c diff -u xc/lib/X11/XKBGetMap.c:1.5 xc/lib/X11/XKBGetMap.c:1.6 --- xc/lib/X11/XKBGetMap.c:1.5 Thu Feb 17 09:16:21 2000 +++ xc/lib/X11/XKBGetMap.c Wed Jan 17 14:41:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: XKBGetMap.c /main/11 1998/06/17 13:24:49 kaleb $ */ +/* $Xorg: XKBGetMap.c,v 1.4 2000/08/17 19:45:02 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. @@ -25,7 +25,7 @@ ********************************************************/ -/* $XFree86: xc/lib/X11/XKBGetMap.c,v 1.5 2000/02/17 14:16:21 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBGetMap.c,v 1.6 2001/01/17 19:41:48 dawes Exp $ */ #define NEED_REPLIES #define NEED_EVENTS Index: xc/lib/X11/XKBList.c diff -u xc/lib/X11/XKBList.c:1.1.1.2 xc/lib/X11/XKBList.c:1.1.1.3 --- xc/lib/X11/XKBList.c:1.1.1.2 Fri Feb 9 04:41:48 1996 +++ xc/lib/X11/XKBList.c Tue Jan 16 17:09:08 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKBList.c /main/3 1996/02/05 06:00:46 kaleb $ */ +/* $Xorg: XKBList.c,v 1.3 2000/08/17 19:45:02 cpqbld Exp $ */ /************************************************************ Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc. Index: xc/lib/X11/XKBMAlloc.c diff -u xc/lib/X11/XKBMAlloc.c:3.10 xc/lib/X11/XKBMAlloc.c:3.11 --- xc/lib/X11/XKBMAlloc.c:3.10 Sat Oct 3 04:41:27 1998 +++ xc/lib/X11/XKBMAlloc.c Wed Jan 17 14:41:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: XKBMAlloc.c /main/8 1997/08/17 20:51:56 kaleb $ */ +/* $Xorg: XKBMAlloc.c,v 1.4 2000/08/17 19:45:02 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBMAlloc.c,v 3.10 1998/10/03 08:41:27 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBMAlloc.c,v 3.11 2001/01/17 19:41:48 dawes Exp $ */ #ifndef XKB_IN_SERVER Index: xc/lib/X11/XKBMisc.c diff -u xc/lib/X11/XKBMisc.c:3.2 xc/lib/X11/XKBMisc.c:3.3 --- xc/lib/X11/XKBMisc.c:3.2 Sun May 9 06:50:24 1999 +++ xc/lib/X11/XKBMisc.c Wed Jan 17 14:41:48 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKBMisc.c /main/3 1996/03/01 14:29:50 kaleb $ */ +/* $Xorg: XKBMisc.c,v 1.4 2000/08/17 19:45:02 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBMisc.c,v 3.2 1999/05/09 10:50:24 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBMisc.c,v 3.3 2001/01/17 19:41:48 dawes Exp $ */ #ifndef XKB_IN_SERVER @@ -474,7 +474,7 @@ unsigned char explicit,mods; XkbSymInterpretPtr *interps,ibuf[IBUF_SIZE]; int n,nSyms,found; -unsigned changed,tmp; +unsigned changed,tmp; if ((!xkb)||(!xkb->map)||(!xkb->map->key_sym_map)|| (!xkb->compat)||(!xkb->compat->sym_interpret)|| Index: xc/lib/X11/XKBNames.c diff -u xc/lib/X11/XKBNames.c:1.2 xc/lib/X11/XKBNames.c:1.3 --- xc/lib/X11/XKBNames.c:1.2 Sun Oct 26 08:24:44 1997 +++ xc/lib/X11/XKBNames.c Wed Jan 17 14:41:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: XKBNames.c /main/10 1997/09/08 13:56:03 kaleb $ */ +/* $Xorg: XKBNames.c,v 1.3 2000/08/17 19:45:02 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. Index: xc/lib/X11/XKBRdBuf.c diff -u xc/lib/X11/XKBRdBuf.c:1.1.1.4 xc/lib/X11/XKBRdBuf.c:1.1.1.5 --- xc/lib/X11/XKBRdBuf.c:1.1.1.4 Mon Jan 15 01:51:33 1996 +++ xc/lib/X11/XKBRdBuf.c Tue Jan 16 17:09:13 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKBRdBuf.c /main/7 1996/01/14 16:43:48 kaleb $ */ +/* $Xorg: XKBRdBuf.c,v 1.3 2000/08/17 19:45:02 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. Index: xc/lib/X11/XKBSetGeom.c diff -u xc/lib/X11/XKBSetGeom.c:3.3 xc/lib/X11/XKBSetGeom.c:3.4 --- xc/lib/X11/XKBSetGeom.c:3.3 Sun Jun 22 06:16:51 1997 +++ xc/lib/X11/XKBSetGeom.c Wed Jan 17 14:41:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: XKBSetGeom.c /main/8 1997/06/10 06:53:24 kaleb $ */ +/* $Xorg: XKBSetGeom.c,v 1.3 2000/08/17 19:45:03 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. Index: xc/lib/X11/XKBSetMap.c diff -u xc/lib/X11/XKBSetMap.c:3.1 xc/lib/X11/XKBSetMap.c:3.2 --- xc/lib/X11/XKBSetMap.c:3.1 Sun May 9 06:50:25 1999 +++ xc/lib/X11/XKBSetMap.c Wed Jan 17 14:41:49 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKBSetMap.c /main/8 1996/03/01 14:30:01 kaleb $ */ +/* $Xorg: XKBSetMap.c,v 1.4 2000/08/17 19:45:03 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBSetMap.c,v 3.1 1999/05/09 10:50:25 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBSetMap.c,v 3.2 2001/01/17 19:41:49 dawes Exp $ */ #include #define NEED_REPLIES Index: xc/lib/X11/XKBUse.c diff -u xc/lib/X11/XKBUse.c:3.3 xc/lib/X11/XKBUse.c:3.4 --- xc/lib/X11/XKBUse.c:3.3 Sat Aug 26 11:11:24 2000 +++ xc/lib/X11/XKBUse.c Wed Jan 17 14:41:49 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKBUse.c /main/15 1996/09/28 16:34:51 rws $ */ +/* $Xorg: XKBUse.c,v 1.3 2000/08/17 19:45:03 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBUse.c,v 3.3 2000/08/26 15:11:24 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBUse.c,v 3.4 2001/01/17 19:41:49 dawes Exp $ */ #include #include Index: xc/lib/X11/XKBleds.c diff -u xc/lib/X11/XKBleds.c:1.1.1.4 xc/lib/X11/XKBleds.c:1.3 --- xc/lib/X11/XKBleds.c:1.1.1.4 Mon Jan 15 01:51:36 1996 +++ xc/lib/X11/XKBleds.c Wed Feb 21 10:18:03 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKBleds.c /main/6 1996/01/14 16:43:58 kaleb $ */ +/* $Xorg: XKBleds.c,v 1.3 2000/08/17 19:45:03 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. @@ -24,6 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/X11/XKBleds.c,v 1.3 2001/02/21 15:18:03 tsi Exp $ */ #define NEED_REPLIES #define NEED_EVENTS @@ -340,8 +341,7 @@ XkbInfoPtr xkbi; if ((dpy->flags & XlibDisplayNoXkb) || (name==None) || - (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL)) || - (pMap==NULL)) + (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) return False; LockDisplay(dpy); xkbi = dpy->xkb_info; Index: xc/lib/X11/XKBlib.h diff -u xc/lib/X11/XKBlib.h:3.1 xc/lib/X11/XKBlib.h:3.2 --- xc/lib/X11/XKBlib.h:3.1 Sat Dec 13 21:55:30 1997 +++ xc/lib/X11/XKBlib.h Wed Jan 17 14:41:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: XKBlib.h /main/18 1997/12/12 09:03:32 kaleb $ */ +/* $Xorg: XKBlib.h,v 1.6 2000/08/17 19:45:03 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. @@ -28,6 +28,7 @@ #ifndef _XKBLIB_H_ #define _XKBLIB_H_ +#include #include typedef struct _XkbAnyEvent { Index: xc/lib/X11/XKBlibint.h diff -u xc/lib/X11/XKBlibint.h:3.3 xc/lib/X11/XKBlibint.h:3.4 --- xc/lib/X11/XKBlibint.h:3.3 Sun Jun 22 06:16:51 1997 +++ xc/lib/X11/XKBlibint.h Wed Jan 17 14:41:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: XKBlibint.h /main/15 1997/06/10 06:53:27 kaleb $ */ +/* $Xorg: XKBlibint.h,v 1.3 2000/08/17 19:45:04 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBlibint.h,v 3.3 1997/06/22 10:16:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBlibint.h,v 3.4 2001/01/17 19:41:49 dawes Exp $ */ #ifndef _XKBLIBINT_H_ #define _XKBLIBINT_H_ Index: xc/lib/X11/XKeysymDB diff -u xc/lib/X11/XKeysymDB:3.6 xc/lib/X11/XKeysymDB:3.11 --- xc/lib/X11/XKeysymDB:3.6 Wed Nov 1 21:51:10 2000 +++ xc/lib/X11/XKeysymDB Thu Apr 5 22:16:21 2001 @@ -1,4 +1,4 @@ -! $XConsortium: XKeysymDB,v 1.14 94/07/07 09:35:29 rws Exp $ +! $Xorg: XKeysymDB,v 1.3 2000/08/17 19:45:04 cpqbld Exp $ ! Copyright 1993 Massachusetts Institute of Technology ! ! Permission to use, copy, modify, distribute, and sell this software and @@ -11,7 +11,7 @@ ! suitability of this software for any purpose. It is provided "as is" ! without express or implied warranty. ! -! $XFree86: xc/lib/X11/XKeysymDB,v 3.6 2000/11/02 02:51:10 dawes Exp $ +! $XFree86: xc/lib/X11/XKeysymDB,v 3.11 2001/04/06 02:16:21 dawes Exp $ hpmute_acute :100000A8 hpmute_grave :100000A9 @@ -227,7 +227,10 @@ XF86Refresh :1008FF29 XF86PowerOff :1008FF2A XF86WakeUp :1008FF2B -! 1008FF2C - 1008FF2F are yet to be assigned +XF86Eject :1008FF2C +XF86ScreenSaver :1008FF2D +XF86WWW :1008FF2E +XF86Sleep :1008FF2F XF86Favorites :1008FF30 XF86AudioPause :1008FF31 XF86AudioMedia :1008FF32 @@ -235,6 +238,29 @@ XF86VendorHome :1008FF34 XF86LightBulb :1008FF35 XF86Shop :1008FF36 +XF86History :1008FF37 +XF86OpenURL :1008FF38 +XF86AddFavorite :1008FF39 +XF86HotLinks :1008FF3A +XF86BrightnessAdjust :1008FF3B +! Allocate 1008FF3C-F next + +XF86Launch0 :1008FF40 +XF86Launch1 :1008FF41 +XF86Launch2 :1008FF42 +XF86Launch3 :1008FF43 +XF86Launch4 :1008FF44 +XF86Launch5 :1008FF45 +XF86Launch6 :1008FF46 +XF86Launch7 :1008FF47 +XF86Launch8 :1008FF48 +XF86Launch9 :1008FF49 +XF86LaunchA :1008FF4A +XF86LaunchB :1008FF4B +XF86LaunchC :1008FF4C +XF86LaunchD :1008FF4D +XF86LaunchE :1008FF4E +XF86LaunchF :1008FF4F usldead_acute :100000A8 Index: xc/lib/X11/XRGB.c diff -u xc/lib/X11/XRGB.c:3.0 xc/lib/X11/XRGB.c:3.1 --- xc/lib/X11/XRGB.c:3.0 Wed Jun 14 03:07:01 1995 +++ xc/lib/X11/XRGB.c Wed Jan 17 14:41:49 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XRGB.c,v 1.6 95/06/08 23:20:39 gildea Exp $" */ +/* $Xorg: XRGB.c,v 1.3 2000/08/17 19:45:04 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/XYZ.c diff -u xc/lib/X11/XYZ.c:1.2 xc/lib/X11/XYZ.c:1.3 --- xc/lib/X11/XYZ.c:1.2 Sun May 9 06:50:25 1999 +++ xc/lib/X11/XYZ.c Wed Jan 17 14:41:49 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XYZ.c,v 1.8 92/06/11 16:26:24 converse Exp $ */ +/* $Xorg: XYZ.c,v 1.3 2000/08/17 19:45:04 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -33,7 +33,7 @@ * * */ -/* $XFree86: xc/lib/X11/XYZ.c,v 1.2 1999/05/09 10:50:25 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XYZ.c,v 1.3 2001/01/17 19:41:49 dawes Exp $ */ #include #include "Xlibint.h" Index: xc/lib/X11/Xaixlcint.h diff -u xc/lib/X11/Xaixlcint.h:3.0 xc/lib/X11/Xaixlcint.h:3.1 --- xc/lib/X11/Xaixlcint.h:3.0 Sat Jul 1 06:44:34 1995 +++ xc/lib/X11/Xaixlcint.h Wed Jan 17 14:41:49 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: Xaixlcint.h,v 1.3 95/04/07 19:22:34 kaleb Exp $ */ +/* $Xorg: Xaixlcint.h,v 1.3 2000/08/17 19:45:04 cpqbld Exp $ */ /* * * Copyright IBM Corporation 1993 Index: xc/lib/X11/Xatomtype.h diff -u xc/lib/X11/Xatomtype.h:1.1.1.2 xc/lib/X11/Xatomtype.h:1.1.1.3 --- xc/lib/X11/Xatomtype.h:1.1.1.2 Sun Sep 27 03:57:32 1998 +++ xc/lib/X11/Xatomtype.h Tue Jan 16 17:09:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xatomtype.h /main/10 1998/02/06 17:57:49 kaleb $ */ +/* $Xorg: Xatomtype.h,v 1.3 2000/08/17 19:45:04 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/X11/Xcms.h diff -u xc/lib/X11/Xcms.h:1.4 xc/lib/X11/Xcms.h:1.5 --- xc/lib/X11/Xcms.h:1.4 Sat Mar 13 22:21:04 1999 +++ xc/lib/X11/Xcms.h Wed Jan 17 14:41:49 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: Xcms.h,v 1.15 92/11/19 16:43:04 rws Exp $ */ +/* $Xorg: Xcms.h,v 1.6 2000/08/17 19:45:04 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -27,9 +27,11 @@ * DESCRIPTION * Public include file for X Color Management System */ -/* $XFree86: xc/lib/X11/Xcms.h,v 1.4 1999/03/14 03:21:04 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xcms.h,v 1.5 2001/01/17 19:41:49 dawes Exp $ */ #ifndef _XCMS_H_ #define _XCMS_H_ + +#include /* * XCMS Status Values Index: xc/lib/X11/Xcmsint.h diff -u xc/lib/X11/Xcmsint.h:3.1 xc/lib/X11/Xcmsint.h:3.2 --- xc/lib/X11/Xcmsint.h:3.1 Sat Jan 29 13:58:11 2000 +++ xc/lib/X11/Xcmsint.h Wed Jan 17 14:41:49 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: Xcmsint.h,v 1.19 95/06/08 23:20:39 gildea Exp $ */ +/* $Xorg: Xcmsint.h,v 1.3 2000/08/17 19:45:05 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -29,7 +29,7 @@ * (i.e., for API internal use only) * */ -/* $XFree86: xc/lib/X11/Xcmsint.h,v 3.1 2000/01/29 18:58:11 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xcmsint.h,v 3.2 2001/01/17 19:41:49 dawes Exp $ */ #ifndef _XCMSINT_H_ #define _XCMSINT_H_ Index: xc/lib/X11/XimImSw.h diff -u xc/lib/X11/XimImSw.h:1.1.1.1 xc/lib/X11/XimImSw.h:1.1.1.2 --- xc/lib/X11/XimImSw.h:1.1.1.1 Wed Apr 27 03:11:29 1994 +++ xc/lib/X11/XimImSw.h Tue Jan 16 17:09:37 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XimImSw.h,v 1.3 94/03/31 22:01:03 rws Exp $ */ +/* $Xorg: XimImSw.h,v 1.3 2000/08/17 19:45:05 cpqbld Exp $ */ /****************************************************************** Copyright 1992, 1993 by FUJITSU LIMITED Index: xc/lib/X11/XimProto.h diff -u xc/lib/X11/XimProto.h:1.1.1.2 xc/lib/X11/XimProto.h:1.1.1.3 --- xc/lib/X11/XimProto.h:1.1.1.2 Sat Sep 17 00:42:37 1994 +++ xc/lib/X11/XimProto.h Tue Jan 16 17:09:38 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XimProto.h,v 1.4 94/09/01 18:44:49 kaleb Exp $ */ +/* $Xorg: XimProto.h,v 1.3 2000/08/17 19:45:05 cpqbld Exp $ */ /****************************************************************** Copyright 1992, 1993 by FUJITSU LIMITED Index: xc/lib/X11/XimThai.h diff -u xc/lib/X11/XimThai.h:1.1.1.2 xc/lib/X11/XimThai.h:1.2 --- xc/lib/X11/XimThai.h:1.1.1.2 Sun Sep 27 03:57:34 1998 +++ xc/lib/X11/XimThai.h Thu Feb 8 19:02:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: XimThai.h /main/5 1998/02/06 17:58:47 kaleb $ */ +/* $Xorg: XimThai.h,v 1.3 2000/08/17 19:45:05 cpqbld Exp $ */ /*********************************************************** Copyright 1993, 1998 The Open Group @@ -41,6 +41,7 @@ SOFTWARE. ******************************************************************/ +/* $XFree86: xc/lib/X11/XimThai.h,v 1.2 2001/02/09 00:02:53 dawes Exp $ */ /* **++ @@ -61,7 +62,7 @@ #include -/* Classification of characters in TACTIS according to WTT */ +/* Classification of characters in TIS620 according to WTT */ #define CTRL 0 /* control chars */ #define NON 1 /* non composibles */ Index: xc/lib/X11/XimTrInt.h diff -u xc/lib/X11/XimTrInt.h:1.1.1.1 xc/lib/X11/XimTrInt.h:1.1.1.2 --- xc/lib/X11/XimTrInt.h:1.1.1.1 Wed Apr 27 03:11:30 1994 +++ xc/lib/X11/XimTrInt.h Tue Jan 16 17:09:41 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XimTrInt.h,v 1.4 94/03/26 16:57:07 rws Exp $ */ +/* $Xorg: XimTrInt.h,v 1.3 2000/08/17 19:45:05 cpqbld Exp $ */ /****************************************************************** Copyright 1992 by Sun Microsystems, Inc. Index: xc/lib/X11/XimTrX.h diff -u xc/lib/X11/XimTrX.h:1.1.1.1 xc/lib/X11/XimTrX.h:1.1.1.2 --- xc/lib/X11/XimTrX.h:1.1.1.1 Wed Apr 27 03:11:30 1994 +++ xc/lib/X11/XimTrX.h Tue Jan 16 17:09:42 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XimTrX.h,v 1.4 94/03/31 22:01:43 rws Exp $ */ +/* $Xorg: XimTrX.h,v 1.3 2000/08/17 19:45:05 cpqbld Exp $ */ /****************************************************************** Copyright 1992 by Sun Microsystems, Inc. Index: xc/lib/X11/XimTrans.h diff -u xc/lib/X11/XimTrans.h:1.1.1.1 xc/lib/X11/XimTrans.h:1.1.1.2 --- xc/lib/X11/XimTrans.h:1.1.1.1 Wed Apr 27 03:11:03 1994 +++ xc/lib/X11/XimTrans.h Tue Jan 16 17:09:44 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XimTrans.h,v 1.3 94/03/26 16:57:12 rws Exp $ */ +/* $Xorg: XimTrans.h,v 1.3 2000/08/17 19:45:05 cpqbld Exp $ */ /****************************************************************** Copyright 1992 by Sun Microsystems, Inc. Index: xc/lib/X11/Ximint.h diff -u xc/lib/X11/Ximint.h:3.8 xc/lib/X11/Ximint.h:3.9 --- xc/lib/X11/Ximint.h:3.8 Mon Dec 4 13:49:19 2000 +++ xc/lib/X11/Ximint.h Wed Jan 17 14:41:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: Ximint.h /main/12 1998/06/16 16:05:08 kaleb $ */ +/* $Xorg: Ximint.h,v 1.3 2000/08/17 19:45:05 cpqbld Exp $ */ /****************************************************************** Copyright 1992, 1993, 1994 by FUJITSU LIMITED @@ -30,7 +30,7 @@ makoto@sm.sony.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/Ximint.h,v 3.8 2000/12/04 18:49:19 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Ximint.h,v 3.9 2001/01/17 19:41:49 dawes Exp $ */ #ifndef _XIMINT_H #define _XIMINT_H Index: xc/lib/X11/XimintL.h diff -u xc/lib/X11/XimintL.h:1.6 xc/lib/X11/XimintL.h:1.7 --- xc/lib/X11/XimintL.h:1.6 Mon Dec 4 13:49:19 2000 +++ xc/lib/X11/XimintL.h Wed Jan 17 14:41:49 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XimintL.h,v 1.6 94/07/06 14:46:45 kaleb Exp $ */ +/* $Xorg: XimintL.h,v 1.3 2000/08/17 19:45:05 cpqbld Exp $ */ /****************************************************************** Copyright 1991, 1992, 1993, 1994 by FUJITSU LIMITED @@ -32,7 +32,7 @@ frankyling@hgrd01.enet.dec.com ******************************************************************/ -/* $XFree86: xc/lib/X11/XimintL.h,v 1.6 2000/12/04 18:49:19 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XimintL.h,v 1.7 2001/01/17 19:41:49 dawes Exp $ */ #ifndef _XIMINTL_H #define _XIMINTL_H Index: xc/lib/X11/XimintP.h diff -u xc/lib/X11/XimintP.h:1.6 xc/lib/X11/XimintP.h:1.7 --- xc/lib/X11/XimintP.h:1.6 Mon Dec 4 13:49:19 2000 +++ xc/lib/X11/XimintP.h Wed Jan 17 14:41:49 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XimintP.h,v 1.6 94/03/26 16:57:21 rws Exp $ */ +/* $Xorg: XimintP.h,v 1.3 2000/08/17 19:45:05 cpqbld Exp $ */ /****************************************************************** Copyright 1991, 1992 by Sun Microsystems, Inc. @@ -35,7 +35,7 @@ miyamoto@jrd.dec.com ******************************************************************/ -/* $XFree86: xc/lib/X11/XimintP.h,v 1.6 2000/12/04 18:49:19 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XimintP.h,v 1.7 2001/01/17 19:41:49 dawes Exp $ */ #ifndef _XIMINTP_H #define _XIMINTP_H Index: xc/lib/X11/XlcGeneric.h diff -u xc/lib/X11/XlcGeneric.h:1.2 xc/lib/X11/XlcGeneric.h:1.3 --- xc/lib/X11/XlcGeneric.h:1.2 Fri Feb 25 13:27:53 2000 +++ xc/lib/X11/XlcGeneric.h Wed Jan 17 14:41:49 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XlcGeneric.h /main/7 1996/12/05 10:38:44 swick $ */ +/* $Xorg: XlcGeneric.h,v 1.3 2000/08/17 19:45:06 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -31,7 +31,7 @@ * Modifier: Takanori Tateno FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/XlcGeneric.h,v 1.2 2000/02/25 18:27:53 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XlcGeneric.h,v 1.3 2001/01/17 19:41:49 dawes Exp $ */ #ifndef _XLCGENERIC_H_ #define _XLCGENERIC_H_ Index: xc/lib/X11/XlcPubI.h diff -u xc/lib/X11/XlcPubI.h:3.7 xc/lib/X11/XlcPubI.h:3.8 --- xc/lib/X11/XlcPubI.h:3.7 Mon Dec 4 13:49:20 2000 +++ xc/lib/X11/XlcPubI.h Wed Jan 17 14:41:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: XlcPubI.h /main/8 1997/06/03 15:52:40 kaleb $ */ +/* $Xorg: XlcPubI.h,v 1.3 2000/08/17 19:45:06 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/XlcPubI.h,v 3.7 2000/12/04 18:49:20 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XlcPubI.h,v 3.8 2001/01/17 19:41:49 dawes Exp $ */ #ifndef _XLCPUBLICI_H_ #define _XLCPUBLICI_H_ Index: xc/lib/X11/XlcPublic.h diff -u xc/lib/X11/XlcPublic.h:1.8 xc/lib/X11/XlcPublic.h:1.9 --- xc/lib/X11/XlcPublic.h:1.8 Mon Dec 4 13:49:20 2000 +++ xc/lib/X11/XlcPublic.h Wed Jan 17 14:41:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: XlcPublic.h /main/6 1997/06/22 07:38:55 kaleb $ */ +/* $Xorg: XlcPublic.h,v 1.3 2000/08/17 19:45:06 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -31,7 +31,7 @@ * Modifier: Takanori Tateno FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/XlcPublic.h,v 1.8 2000/12/04 18:49:20 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XlcPublic.h,v 1.9 2001/01/17 19:41:49 dawes Exp $ */ /* * Most of this API is documented in i18n/Framework.PS */ Index: xc/lib/X11/Xlcint.h diff -u xc/lib/X11/Xlcint.h:3.7 xc/lib/X11/Xlcint.h:3.8 --- xc/lib/X11/Xlcint.h:3.7 Sat Dec 2 10:30:22 2000 +++ xc/lib/X11/Xlcint.h Wed Jan 17 14:41:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xlcint.h /main/26 1998/02/06 18:01:56 kaleb $ */ +/* $Xorg: Xlcint.h,v 1.3 2000/08/17 19:45:06 cpqbld Exp $ */ /* Copyright 1991, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/Xlcint.h,v 3.7 2000/12/02 15:30:22 tsi Exp $ */ +/* $XFree86: xc/lib/X11/Xlcint.h,v 3.8 2001/01/17 19:41:49 dawes Exp $ */ /* * Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation, Index: xc/lib/X11/Xlib.h diff -u xc/lib/X11/Xlib.h:3.18 xc/lib/X11/Xlib.h:3.19 --- xc/lib/X11/Xlib.h:3.18 Mon Dec 4 13:49:20 2000 +++ xc/lib/X11/Xlib.h Wed Jan 17 14:41:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xlib.h /main/122 1998/03/22 18:22:09 barstow $ */ +/* $Xorg: Xlib.h,v 1.5 2000/08/17 19:45:06 cpqbld Exp $ */ /* Copyright 1985, 1986, 1987, 1991, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Xlib.h,v 3.18 2000/12/04 18:49:20 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xlib.h,v 3.19 2001/01/17 19:41:50 dawes Exp $ */ /* Index: xc/lib/X11/XlibAsync.c diff -u xc/lib/X11/XlibAsync.c:1.1.1.4 xc/lib/X11/XlibAsync.c:1.1.1.5 --- xc/lib/X11/XlibAsync.c:1.1.1.4 Sun Sep 27 03:57:38 1998 +++ xc/lib/X11/XlibAsync.c Tue Jan 16 17:10:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: XlibAsync.c /main/10 1998/02/06 18:02:17 kaleb $ */ +/* $Xorg: XlibAsync.c,v 1.3 2000/08/17 19:45:07 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/X11/XlibInt.c diff -u xc/lib/X11/XlibInt.c:3.23 xc/lib/X11/XlibInt.c:3.26 --- xc/lib/X11/XlibInt.c:3.23 Thu Nov 30 18:29:59 2000 +++ xc/lib/X11/XlibInt.c Thu Apr 26 12:23:09 2001 @@ -1,4 +1,4 @@ -/* $TOG: XlibInt.c /main/186 1998/02/06 18:02:22 kaleb $ */ +/* $Xorg: XlibInt.c,v 1.7 2000/08/17 19:45:07 cpqbld Exp $ */ /* Copyright 1985, 1986, 1987, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/XlibInt.c,v 3.23 2000/11/30 23:29:59 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XlibInt.c,v 3.26 2001/04/26 16:23:09 dawes Exp $ */ /* * XlibInt.c - Internal support routines for the C subroutine @@ -588,10 +588,18 @@ register char *bufindex; _XExtension *ext; - if (dpy->flags & XlibDisplayIOError) { - dpy->bufptr = dpy->buffer; /* reset to avoid buffer overflows */ + /* This fix resets the bufptr to the front of the buffer so + * additional appends to the bufptr will not corrupt memory. Since + * the server is down, these appends are no-op's anyway but + * callers of _XFlush() are not verifying this before they call it. + */ + if (dpy->flags & XlibDisplayIOError) + { + dpy->bufptr = dpy->buffer; + dpy->last_req = (char *)&_dummy_request; return; } + #ifdef XTHREADS while (dpy->flags & XlibDisplayWriting) { if (dpy->lock) { @@ -743,6 +751,7 @@ */ if (!pend && !dpy->qlen && ++dpy->conn_checker >= XCONN_CHECK_FREQ) { + int result; #ifdef USE_POLL struct pollfd filedes; #else @@ -754,14 +763,14 @@ #ifdef USE_POLL filedes.fd = dpy->fd; filedes.events = POLLIN; - if ((pend = poll(&filedes, 1, 0))) + if ((result = poll(&filedes, 1, 0))) #else FD_ZERO(&r_mask); FD_SET(dpy->fd, &r_mask); - if (pend = Select(dpy->fd + 1, &r_mask, NULL, NULL, &zero_time)) + if ((result = Select(dpy->fd + 1, &r_mask, NULL, NULL, &zero_time))) #endif { - if (pend > 0) + if (result > 0) { if (_X11TransBytesReadable(dpy->trans_conn, &pend) < 0) _XIOError(dpy); @@ -769,7 +778,7 @@ if (!pend) pend = SIZEOF(xReply); } - else if (pend < 0 && !ECHECK(EINTR)) + else if (result < 0 && !ECHECK(EINTR)) _XIOError(dpy); } } @@ -1806,7 +1815,13 @@ (void) _XSetLastRequestRead(dpy, &rep->generic); len = SIZEOF(xReply) + (rep->generic.length << 2); - + if (len < SIZEOF(xReply)) { + _XIOError (dpy); + buf += *lenp; + *lenp = 0; + return buf; + } + for (async = dpy->async_handlers; async; async = next) { next = async->next; if ((consumed = (*async->handler)(dpy, rep, buf, *lenp, async->data))) Index: xc/lib/X11/Xlibint.h diff -u xc/lib/X11/Xlibint.h:3.15 xc/lib/X11/Xlibint.h:3.16 --- xc/lib/X11/Xlibint.h:3.15 Tue Feb 8 12:18:43 2000 +++ xc/lib/X11/Xlibint.h Wed Jan 17 14:41:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xlibint.h /main/117 1998/06/17 08:44:01 barstow $ */ +/* $Xorg: Xlibint.h,v 1.4 2000/08/17 19:45:07 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/Xlibint.h,v 3.15 2000/02/08 17:18:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xlibint.h,v 3.16 2001/01/17 19:41:50 dawes Exp $ */ #ifndef _XLIBINT_H_ #define _XLIBINT_H_ 1 @@ -561,8 +561,20 @@ Data32(dpy, (long *)&_BRdat, 4); \ } #else +#ifdef LONG64 #define MakeBigReq(req,n) \ { \ + CARD64 _BRdat; \ + CARD32 _BRlen = req->length - 1; \ + req->length = 0; \ + _BRdat = ((CARD32 *)req)[_BRlen]; \ + memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen << 2); \ + ((CARD32 *)req)[1] = _BRlen + n + 2; \ + Data32(dpy, &_BRdat, 4); \ + } +#else +#define MakeBigReq(req,n) \ + { \ CARD32 _BRdat; \ CARD32 _BRlen = req->length - 1; \ req->length = 0; \ @@ -571,6 +583,7 @@ ((CARD32 *)req)[1] = _BRlen + n + 2; \ Data32(dpy, &_BRdat, 4); \ } +#endif #endif #define SetReqLen(req,n,badlen) \ Index: xc/lib/X11/Xlocale.h diff -u xc/lib/X11/Xlocale.h:1.1.1.2 xc/lib/X11/Xlocale.h:1.1.1.3 --- xc/lib/X11/Xlocale.h:1.1.1.2 Sun Sep 27 03:57:41 1998 +++ xc/lib/X11/Xlocale.h Tue Jan 16 17:10:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xlocale.h /main/11 1998/02/06 18:02:56 kaleb $ */ +/* $Xorg: Xlocale.h,v 1.3 2000/08/17 19:45:07 cpqbld Exp $ */ /* Copyright 1991, 1998 The Open Group Index: xc/lib/X11/XomGeneric.h diff -u xc/lib/X11/XomGeneric.h:1.3 xc/lib/X11/XomGeneric.h:1.4 --- xc/lib/X11/XomGeneric.h:1.3 Wed Nov 29 12:40:23 2000 +++ xc/lib/X11/XomGeneric.h Wed Jan 17 14:41:50 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XomGeneric.h /main/4 1996/12/05 10:40:15 swick $ */ +/* $Xorg: XomGeneric.h,v 1.3 2000/08/17 19:45:08 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -31,7 +31,7 @@ * Modifier: Takanori Tateno FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/XomGeneric.h,v 1.3 2000/11/29 17:40:23 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XomGeneric.h,v 1.4 2001/01/17 19:41:50 dawes Exp $ */ #ifndef _XOMGENERIC_H_ #define _XOMGENERIC_H_ Index: xc/lib/X11/Xresource.h diff -u xc/lib/X11/Xresource.h:3.5 xc/lib/X11/Xresource.h:3.6 --- xc/lib/X11/Xresource.h:3.5 Tue Nov 28 13:49:28 2000 +++ xc/lib/X11/Xresource.h Wed Jan 17 14:41:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xresource.h /main/39 1998/02/06 18:03:08 kaleb $ */ +/* $Xorg: Xresource.h,v 1.6 2000/08/17 19:45:08 cpqbld Exp $ */ /*********************************************************** @@ -42,12 +42,14 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/Xresource.h,v 3.5 2000/11/28 18:49:28 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xresource.h,v 3.6 2001/01/17 19:41:50 dawes Exp $ */ #ifndef _XRESOURCE_H_ #define _XRESOURCE_H_ /* You must include before including this file */ + +#include /**************************************************************** **************************************************************** Index: xc/lib/X11/Xrm.c diff -u xc/lib/X11/Xrm.c:3.14 xc/lib/X11/Xrm.c:3.15 --- xc/lib/X11/Xrm.c:3.14 Tue Nov 28 13:49:29 2000 +++ xc/lib/X11/Xrm.c Wed Jan 17 14:41:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xrm.c /main/94 1998/02/06 18:03:25 kaleb $ */ +/* $Xorg: Xrm.c,v 1.6 2000/08/17 19:45:08 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988, 1990 by Digital Equipment Corporation, Maynard @@ -45,7 +45,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/Xrm.c,v 3.14 2000/11/28 18:49:29 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xrm.c,v 3.15 2001/01/17 19:41:50 dawes Exp $ */ #include #include Index: xc/lib/X11/XrmI.h diff -u xc/lib/X11/XrmI.h:1.3 xc/lib/X11/XrmI.h:1.4 --- xc/lib/X11/XrmI.h:1.3 Sat Oct 3 04:41:31 1998 +++ xc/lib/X11/XrmI.h Wed Jan 17 14:41:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: XrmI.h /main/11 1998/02/06 18:03:19 kaleb $ */ +/* $Xorg: XrmI.h,v 1.3 2000/08/17 19:45:08 cpqbld Exp $ */ /* Copyright 1990, 1998 The Open Group Index: xc/lib/X11/Xutil.h diff -u xc/lib/X11/Xutil.h:3.2 xc/lib/X11/Xutil.h:3.3 --- xc/lib/X11/Xutil.h:3.2 Tue Nov 28 13:49:29 2000 +++ xc/lib/X11/Xutil.h Wed Jan 17 14:41:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xutil.h /main/45 1998/02/06 18:03:35 kaleb $ */ +/* $Xorg: Xutil.h,v 1.7 2000/08/17 19:45:08 cpqbld Exp $ */ /*********************************************************** @@ -42,12 +42,13 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/Xutil.h,v 3.2 2000/11/28 18:49:29 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xutil.h,v 3.3 2001/01/17 19:41:50 dawes Exp $ */ #ifndef _XUTIL_H_ #define _XUTIL_H_ /* You must include before including this file */ +#include /* * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding Index: xc/lib/X11/Xvarargs.h diff -u xc/lib/X11/Xvarargs.h:1.2 xc/lib/X11/Xvarargs.h:1.3 --- xc/lib/X11/Xvarargs.h:1.2 Tue Nov 28 13:49:30 2000 +++ xc/lib/X11/Xvarargs.h Wed Jan 17 14:41:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xvarargs.h /main/5 1998/02/06 18:03:41 kaleb $ */ +/* $Xorg: Xvarargs.h,v 1.3 2000/08/17 19:45:08 cpqbld Exp $ */ /* Copyright 1985, 1986, 1987, 1988, 1989, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/Xvarargs.h,v 1.2 2000/11/28 18:49:30 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xvarargs.h,v 1.3 2001/01/17 19:41:50 dawes Exp $ */ #ifndef _XVARARGS_H_ #define _XVARARGS_H_ Index: xc/lib/X11/cmsAllCol.c diff -u xc/lib/X11/cmsAllCol.c:1.2 xc/lib/X11/cmsAllCol.c:1.3 --- xc/lib/X11/cmsAllCol.c:1.2 Sun May 9 06:50:27 1999 +++ xc/lib/X11/cmsAllCol.c Wed Jan 17 14:41:50 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: cmsAllCol.c,v 1.5 91/05/13 23:03:17 rws Exp $" */ +/* $Xorg: cmsAllCol.c,v 1.3 2000/08/17 19:45:08 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -32,7 +32,7 @@ * * */ -/* $XFree86: xc/lib/X11/cmsAllCol.c,v 1.2 1999/05/09 10:50:27 dawes Exp $ */ +/* $XFree86: xc/lib/X11/cmsAllCol.c,v 1.3 2001/01/17 19:41:50 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/cmsAllNCol.c diff -u xc/lib/X11/cmsAllNCol.c:1.2 xc/lib/X11/cmsAllNCol.c:1.3 --- xc/lib/X11/cmsAllNCol.c:1.2 Sun May 9 06:50:28 1999 +++ xc/lib/X11/cmsAllNCol.c Wed Jan 17 14:41:50 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: cmsAllNCol.c,v 1.9 93/09/07 21:32:50 rws Exp $" */ +/* $Xorg: cmsAllNCol.c,v 1.3 2000/08/17 19:45:09 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -32,7 +32,7 @@ * * */ -/* $XFree86: xc/lib/X11/cmsAllNCol.c,v 1.2 1999/05/09 10:50:28 dawes Exp $ */ +/* $XFree86: xc/lib/X11/cmsAllNCol.c,v 1.3 2001/01/17 19:41:50 dawes Exp $ */ #define NEED_REPLIES #include Index: xc/lib/X11/cmsCmap.c diff -u xc/lib/X11/cmsCmap.c:3.0 xc/lib/X11/cmsCmap.c:3.1 --- xc/lib/X11/cmsCmap.c:3.0 Thu Jun 29 09:20:53 1995 +++ xc/lib/X11/cmsCmap.c Wed Jan 17 14:41:50 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: cmsCmap.c,v 1.17 95/04/27 18:28:37 converse Exp $ */ +/* $Xorg: cmsCmap.c,v 1.3 2000/08/17 19:45:09 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. Index: xc/lib/X11/cmsColNm.c diff -u xc/lib/X11/cmsColNm.c:3.6 xc/lib/X11/cmsColNm.c:3.7 --- xc/lib/X11/cmsColNm.c:3.6 Sat Jan 29 13:58:14 2000 +++ xc/lib/X11/cmsColNm.c Wed Jan 17 14:41:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: cmsColNm.c /main/32 1998/03/13 14:14:50 barstow $" */ +/* $Xorg: cmsColNm.c,v 1.3 2000/08/17 19:45:09 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -31,7 +31,7 @@ * * */ -/* $XFree86: xc/lib/X11/cmsColNm.c,v 3.6 2000/01/29 18:58:14 dawes Exp $ */ +/* $XFree86: xc/lib/X11/cmsColNm.c,v 3.7 2001/01/17 19:41:51 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/cmsGlobls.c diff -u xc/lib/X11/cmsGlobls.c:1.3 xc/lib/X11/cmsGlobls.c:1.4 --- xc/lib/X11/cmsGlobls.c:1.3 Sat Jan 29 13:58:14 2000 +++ xc/lib/X11/cmsGlobls.c Wed Jan 17 14:41:51 2001 @@ -1,4 +1,4 @@ -/*$XConsortium: cmsGlobls.c,v 1.10 93/07/05 11:44:05 rws Exp $ */ +/*$Xorg: cmsGlobls.c,v 1.3 2000/08/17 19:45:09 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -32,7 +32,7 @@ * * */ -/* $XFree86: xc/lib/X11/cmsGlobls.c,v 1.3 2000/01/29 18:58:14 dawes Exp $ */ +/* $XFree86: xc/lib/X11/cmsGlobls.c,v 1.4 2001/01/17 19:41:51 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/cmsInt.c diff -u xc/lib/X11/cmsInt.c:1.2 xc/lib/X11/cmsInt.c:1.3 --- xc/lib/X11/cmsInt.c:1.2 Sun May 9 06:50:29 1999 +++ xc/lib/X11/cmsInt.c Wed Jan 17 14:41:51 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: cmsInt.c,v 1.12 94/04/17 20:21:58 rws Exp $" */ +/* $Xorg: cmsInt.c,v 1.4 2000/08/17 19:45:09 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -34,7 +34,7 @@ * * */ -/* $XFree86: xc/lib/X11/cmsInt.c,v 1.2 1999/05/09 10:50:29 dawes Exp $ */ +/* $XFree86: xc/lib/X11/cmsInt.c,v 1.3 2001/01/17 19:41:51 dawes Exp $ */ /* #define NEED_EVENTS */ #include Index: xc/lib/X11/cmsLkCol.c diff -u xc/lib/X11/cmsLkCol.c:1.2 xc/lib/X11/cmsLkCol.c:1.3 --- xc/lib/X11/cmsLkCol.c:1.2 Sun May 9 06:50:29 1999 +++ xc/lib/X11/cmsLkCol.c Wed Jan 17 14:41:51 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: cmsLkCol.c,v 1.14 94/03/31 21:51:17 rws Exp $ */ +/* $Xorg: cmsLkCol.c,v 1.3 2000/08/17 19:45:09 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -32,7 +32,7 @@ * * */ -/* $XFree86: xc/lib/X11/cmsLkCol.c,v 1.2 1999/05/09 10:50:29 dawes Exp $ */ +/* $XFree86: xc/lib/X11/cmsLkCol.c,v 1.3 2001/01/17 19:41:51 dawes Exp $ */ #define NEED_REPLIES #include Index: xc/lib/X11/cmsMath.c diff -u xc/lib/X11/cmsMath.c:3.1 xc/lib/X11/cmsMath.c:3.2 --- xc/lib/X11/cmsMath.c:3.1 Sat Oct 3 04:41:32 1998 +++ xc/lib/X11/cmsMath.c Wed Jan 17 14:41:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: cmsMath.c /main/12 1998/02/06 17:11:19 kaleb $ */ +/* $Xorg: cmsMath.c,v 1.3 2000/08/17 19:45:09 cpqbld Exp $ */ /* Index: xc/lib/X11/cmsProp.c diff -u xc/lib/X11/cmsProp.c:1.1.1.1 xc/lib/X11/cmsProp.c:1.1.1.2 --- xc/lib/X11/cmsProp.c:1.1.1.1 Wed Apr 27 03:11:17 1994 +++ xc/lib/X11/cmsProp.c Tue Jan 16 17:10:58 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: cmsProp.c,v 1.11 93/09/22 22:30:00 rws Exp $" */ +/* $Xorg: cmsProp.c,v 1.3 2000/08/17 19:45:10 cpqbld Exp $ */ /* * Index: xc/lib/X11/cmsTrig.c diff -u xc/lib/X11/cmsTrig.c:3.5 xc/lib/X11/cmsTrig.c:3.6 --- xc/lib/X11/cmsTrig.c:3.5 Thu Aug 31 15:03:54 2000 +++ xc/lib/X11/cmsTrig.c Wed Jan 17 14:41:51 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: cmsTrig.c,v 1.7 95/06/08 23:20:39 gildea Exp $" */ +/* $Xorg: cmsTrig.c,v 1.3 2000/08/17 19:45:10 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -24,7 +24,7 @@ * CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/lib/X11/cmsTrig.c,v 3.5 2000/08/31 19:03:54 tsi Exp $ */ +/* $XFree86: xc/lib/X11/cmsTrig.c,v 3.6 2001/01/17 19:41:51 dawes Exp $ */ /* * It should be pointed out that for simplicity's sake, the * environment parameters are defined as floating point constants, Index: xc/lib/X11/cursorfont.h diff -u xc/lib/X11/cursorfont.h:1.1.1.2 xc/lib/X11/cursorfont.h:1.1.1.3 --- xc/lib/X11/cursorfont.h:1.1.1.2 Sun Sep 27 03:57:50 1998 +++ xc/lib/X11/cursorfont.h Tue Jan 16 17:11:01 2001 @@ -1,4 +1,4 @@ -/* $TOG: cursorfont.h /main/5 1998/02/06 17:15:54 kaleb $ */ +/* $Xorg: cursorfont.h,v 1.3 2000/08/17 19:45:10 cpqbld Exp $ */ /* Copyright 1987, 1998 The Open Group Index: xc/lib/X11/evtomask.c diff -u xc/lib/X11/evtomask.c:3.1 xc/lib/X11/evtomask.c:3.2 --- xc/lib/X11/evtomask.c:3.1 Sat Oct 3 04:41:32 1998 +++ xc/lib/X11/evtomask.c Wed Jan 17 14:41:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: evtomask.c /main/11 1998/02/06 17:20:16 kaleb $ */ +/* $Xorg: evtomask.c,v 1.3 2000/08/17 19:45:10 cpqbld Exp $ */ /* Copyright 1987, 1998 The Open Group Index: xc/lib/X11/globals.c diff -u xc/lib/X11/globals.c:3.1 xc/lib/X11/globals.c:3.2 --- xc/lib/X11/globals.c:3.1 Sat Oct 3 04:41:33 1998 +++ xc/lib/X11/globals.c Wed Jan 17 14:41:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: globals.c /main/20 1998/02/06 17:29:35 kaleb $ */ +/* $Xorg: globals.c,v 1.3 2000/08/17 19:45:10 cpqbld Exp $ */ /* Copyright 1989, 1998 The Open Group Index: xc/lib/X11/imCallbk.c diff -u xc/lib/X11/imCallbk.c:3.4 xc/lib/X11/imCallbk.c:3.5 --- xc/lib/X11/imCallbk.c:3.4 Sun May 9 06:50:30 1999 +++ xc/lib/X11/imCallbk.c Wed Jan 17 14:41:51 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: imCallbk.c /main/16 1996/09/28 16:37:06 rws $ */ +/* $Xorg: imCallbk.c,v 1.4 2000/08/17 19:45:10 cpqbld Exp $ */ /*********************************************************************** Copyright 1993 by Digital Equipment Corporation, Maynard, Massachusetts, Copyright 1994 by FUJITSU LIMITED @@ -32,7 +32,7 @@ makoto@sm.sony.co.jp ***********************************************************************/ -/* $XFree86: xc/lib/X11/imCallbk.c,v 3.4 1999/05/09 10:50:30 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imCallbk.c,v 3.5 2001/01/17 19:41:51 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -545,7 +545,7 @@ tmp_len = (int)*(CARD16*)buf; buf += sz_CARD16; - if ((tmp_buf = (char*)Xmalloc(tmp_len + 1)) != 0) { + if ((tmp_buf = (char*)Xmalloc(tmp_len + 1))) { memcpy(tmp_buf, buf, tmp_len); tmp_buf[tmp_len] = '\0'; Index: xc/lib/X11/imConv.c diff -u xc/lib/X11/imConv.c:1.30 xc/lib/X11/imConv.c:1.31 --- xc/lib/X11/imConv.c:1.30 Mon Dec 4 13:49:21 2000 +++ xc/lib/X11/imConv.c Thu Feb 8 19:02:53 2001 @@ -33,7 +33,7 @@ ******************************************************************/ /* 2000 Modifier: Ivan Pascal The XFree86 Project. */ -/* $XFree86: xc/lib/X11/imConv.c,v 1.30 2000/12/04 18:49:21 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imConv.c,v 1.31 2001/02/09 00:02:53 dawes Exp $ */ #define NEED_EVENTS #include @@ -76,7 +76,7 @@ static struct SubstRec SubstTable[] = { {"STRING", "ISO8859-1"}, - {"TACTIS", "TIS620.2533-1"}, + {"TIS620", "TIS620-0"}, {"UTF-8", "ISO10646-1"} }; #define num_substitute (sizeof SubstTable / sizeof SubstTable[0]) Index: xc/lib/X11/imDefFlt.c diff -u xc/lib/X11/imDefFlt.c:1.3 xc/lib/X11/imDefFlt.c:1.4 --- xc/lib/X11/imDefFlt.c:1.3 Sun May 9 06:50:31 1999 +++ xc/lib/X11/imDefFlt.c Wed Jan 17 14:41:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: imDefFlt.c /main/9 1997/04/28 16:39:25 barstow $ */ +/* $Xorg: imDefFlt.c,v 1.4 2000/08/17 19:45:11 cpqbld Exp $ */ /****************************************************************** Copyright 1992, 1993, 1994 by FUJITSU LIMITED @@ -26,7 +26,7 @@ fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imDefFlt.c,v 1.3 1999/05/09 10:50:31 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imDefFlt.c,v 1.4 2001/01/17 19:41:51 dawes Exp $ */ #include #define NEED_EVENTS Index: xc/lib/X11/imDefIc.c diff -u xc/lib/X11/imDefIc.c:3.7 xc/lib/X11/imDefIc.c:3.8 --- xc/lib/X11/imDefIc.c:3.7 Tue Nov 28 13:49:35 2000 +++ xc/lib/X11/imDefIc.c Wed Jan 17 14:41:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: imDefIc.c /main/18 1997/06/22 18:11:11 kaleb $ */ +/* $Xorg: imDefIc.c,v 1.5 2000/08/17 19:45:11 cpqbld Exp $ */ /****************************************************************** Copyright 1991, 1992 by Sun Microsystems, Inc. @@ -28,7 +28,7 @@ fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imDefIc.c,v 3.7 2000/11/28 18:49:35 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imDefIc.c,v 3.8 2001/01/17 19:41:51 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" Index: xc/lib/X11/imDefIm.c diff -u xc/lib/X11/imDefIm.c:1.7 xc/lib/X11/imDefIm.c:1.8 --- xc/lib/X11/imDefIm.c:1.7 Mon Dec 4 13:49:22 2000 +++ xc/lib/X11/imDefIm.c Wed Jan 17 14:41:51 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: imDefIm.c /main/19 1996/01/21 15:11:43 kaleb $ */ +/* $Xorg: imDefIm.c,v 1.5 2000/08/17 19:45:12 cpqbld Exp $ */ /****************************************************************** Copyright 1990, 1991, 1992 by Sun Microsystems, Inc. Copyright 1992, 1993, 1994 by FUJITSU LIMITED @@ -31,7 +31,7 @@ makoto@sm.sony.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imDefIm.c,v 1.7 2000/12/04 18:49:22 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imDefIm.c,v 1.8 2001/01/17 19:41:51 dawes Exp $ */ #include #define NEED_EVENTS Index: xc/lib/X11/imDefLkup.c diff -u xc/lib/X11/imDefLkup.c:3.7 xc/lib/X11/imDefLkup.c:3.8 --- xc/lib/X11/imDefLkup.c:3.7 Tue Nov 28 13:49:36 2000 +++ xc/lib/X11/imDefLkup.c Wed Jan 17 14:41:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: imDefLkup.c /main/18 1998/04/28 17:33:12 kaleb $ */ +/* $Xorg: imDefLkup.c,v 1.3 2000/08/17 19:45:12 cpqbld Exp $ */ /****************************************************************** Copyright 1992, 1993, 1994 by FUJITSU LIMITED @@ -26,7 +26,7 @@ fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imDefLkup.c,v 3.7 2000/11/28 18:49:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imDefLkup.c,v 3.8 2001/01/17 19:41:51 dawes Exp $ */ #include #define NEED_EVENTS Index: xc/lib/X11/imDispch.c diff -u xc/lib/X11/imDispch.c:1.2 xc/lib/X11/imDispch.c:1.3 --- xc/lib/X11/imDispch.c:1.2 Sun May 9 06:50:33 1999 +++ xc/lib/X11/imDispch.c Wed Jan 17 14:41:51 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: imDispch.c,v 1.4 94/03/26 16:57:53 rws Exp $ */ +/* $Xorg: imDispch.c,v 1.3 2000/08/17 19:45:12 cpqbld Exp $ */ /****************************************************************** Copyright 1993, 1994 by FUJITSU LIMITED @@ -26,7 +26,7 @@ fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imDispch.c,v 1.2 1999/05/09 10:50:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imDispch.c,v 1.3 2001/01/17 19:41:51 dawes Exp $ */ #include #include "Xlibint.h" Index: xc/lib/X11/imEvToWire.c diff -u xc/lib/X11/imEvToWire.c:1.1.1.1 xc/lib/X11/imEvToWire.c:1.1.1.2 --- xc/lib/X11/imEvToWire.c:1.1.1.1 Wed Apr 27 03:11:33 1994 +++ xc/lib/X11/imEvToWire.c Tue Jan 16 17:11:22 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: imEvToWire.c,v 1.4 94/04/17 20:22:04 rws Exp $ */ +/* $Xorg: imEvToWire.c,v 1.3 2000/08/17 19:45:12 cpqbld Exp $ */ /*********************************************************** Copyright 1993 by Digital Equipment Corporation, Maynard, Massachusetts, Index: xc/lib/X11/imExten.c diff -u xc/lib/X11/imExten.c:1.1.1.3 xc/lib/X11/imExten.c:1.1.1.4 --- xc/lib/X11/imExten.c:1.1.1.3 Wed Jan 3 01:58:33 1996 +++ xc/lib/X11/imExten.c Tue Jan 16 17:11:24 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: imExten.c /main/6 1995/12/06 11:23:36 kaleb $ */ +/* $Xorg: imExten.c,v 1.3 2000/08/17 19:45:12 cpqbld Exp $ */ /****************************************************************** Copyright 1992, 1993, 1994 by FUJITSU LIMITED Index: xc/lib/X11/imImSw.c diff -u xc/lib/X11/imImSw.c:1.2 xc/lib/X11/imImSw.c:1.3 --- xc/lib/X11/imImSw.c:1.2 Sun May 9 06:50:33 1999 +++ xc/lib/X11/imImSw.c Wed Jan 17 14:41:51 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: imImSw.c,v 1.2 94/01/20 18:04:32 rws Exp $ */ +/* $Xorg: imImSw.c,v 1.3 2000/08/17 19:45:12 cpqbld Exp $ */ /****************************************************************** Copyright 1992, 1993 by FUJITSU LIMITED @@ -32,7 +32,7 @@ frankyling@hgrd01.enet.dec.com ******************************************************************/ -/* $XFree86: xc/lib/X11/imImSw.c,v 1.2 1999/05/09 10:50:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imImSw.c,v 1.3 2001/01/17 19:41:51 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" Index: xc/lib/X11/imInsClbk.c diff -u xc/lib/X11/imInsClbk.c:3.0 xc/lib/X11/imInsClbk.c:3.1 --- xc/lib/X11/imInsClbk.c:3.0 Fri Feb 9 03:18:54 1996 +++ xc/lib/X11/imInsClbk.c Wed Jan 17 14:41:51 2001 @@ -1,5 +1,4 @@ -/* $XConsortium: imInsClbk.c /main/4 1995/11/18 16:08:11 kaleb $ */ -/* $XFree86: xc/lib/X11/imInsClbk.c,v 3.0 1996/02/09 08:18:54 dawes Exp $ */ +/* $Xorg: imInsClbk.c,v 1.3 2000/08/17 19:45:13 cpqbld Exp $ */ /****************************************************************** Copyright 1993, 1994 by Sony Corporation @@ -27,6 +26,7 @@ makoto@sm.sony.co.jp ******************************************************************/ +/* $XFree86: xc/lib/X11/imInsClbk.c,v 3.1 2001/01/17 19:41:51 dawes Exp $ */ #include #define NEED_EVENTS Index: xc/lib/X11/imInt.c diff -u xc/lib/X11/imInt.c:3.8 xc/lib/X11/imInt.c:3.9 --- xc/lib/X11/imInt.c:3.8 Mon Jun 12 22:28:28 2000 +++ xc/lib/X11/imInt.c Wed Jan 17 14:41:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: imInt.c /main/5 1998/05/30 21:11:16 kaleb $ */ +/* $Xorg: imInt.c,v 1.8 2000/08/17 19:45:13 cpqbld Exp $ */ /****************************************************************** Copyright 1992, 1993, 1994 by FUJITSU LIMITED @@ -26,7 +26,7 @@ fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imInt.c,v 3.8 2000/06/13 02:28:28 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imInt.c,v 3.9 2001/01/17 19:41:51 dawes Exp $ */ #include #include @@ -166,7 +166,7 @@ int len; len = strlen(dest); - while ((src = strchr(src, *dest)) != 0) { + while((src = strchr(src, *dest))) { if(!strncmp(src, dest, len)) return src; src++; @@ -194,22 +194,18 @@ end = begin += strlen(ximmodifier); while (*end && *end != '@') end++; - ret = Xmalloc(end - begin + 1); - if (ret != NULL) { - if (begin != NULL && end != NULL) { - (void)strncpy(ret, begin, end - begin); - ret[end - begin] = '\0'; - } - } - return ret; } } - - /* else return an empty string */ - ret = Xmalloc(1); + ret = Xmalloc(end - begin + 1); if (ret != NULL) { - ret[0] = '\0'; + if (begin != NULL && end != NULL) { + (void)strncpy(ret, begin, end - begin); + ret[end - begin] = '\0'; + } else { + ret[0] = '\0'; + } } + return ret; } Index: xc/lib/X11/imLcFlt.c diff -u xc/lib/X11/imLcFlt.c:1.1.1.3 xc/lib/X11/imLcFlt.c:1.1.1.4 --- xc/lib/X11/imLcFlt.c:1.1.1.3 Wed Jan 3 01:58:36 1996 +++ xc/lib/X11/imLcFlt.c Tue Jan 16 17:11:30 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: imLcFlt.c /main/5 1995/11/18 16:08:14 kaleb $ */ +/* $Xorg: imLcFlt.c,v 1.3 2000/08/17 19:45:13 cpqbld Exp $ */ /****************************************************************** Copyright 1992 by Fuji Xerox Co., Ltd. Index: xc/lib/X11/imLcGIc.c diff -u xc/lib/X11/imLcGIc.c:1.1.1.1 xc/lib/X11/imLcGIc.c:1.1.1.2 --- xc/lib/X11/imLcGIc.c:1.1.1.1 Wed Apr 27 03:11:35 1994 +++ xc/lib/X11/imLcGIc.c Tue Jan 16 17:11:32 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: imLcGIc.c,v 1.3 94/03/26 17:00:30 rws Exp $ */ +/* $Xorg: imLcGIc.c,v 1.3 2000/08/17 19:45:13 cpqbld Exp $ */ /****************************************************************** Copyright 1992,1993, 1994 by FUJITSU LIMITED Index: xc/lib/X11/imLcIc.c diff -u xc/lib/X11/imLcIc.c:1.3 xc/lib/X11/imLcIc.c:1.4 --- xc/lib/X11/imLcIc.c:1.3 Tue Nov 28 13:49:36 2000 +++ xc/lib/X11/imLcIc.c Wed Jan 17 14:41:52 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: imLcIc.c /main/6 1996/10/22 14:24:42 kaleb $ */ +/* $Xorg: imLcIc.c,v 1.3 2000/08/17 19:45:13 cpqbld Exp $ */ /****************************************************************** Copyright 1992,1993, 1994 by FUJITSU LIMITED @@ -26,7 +26,7 @@ fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imLcIc.c,v 1.3 2000/11/28 18:49:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imLcIc.c,v 1.4 2001/01/17 19:41:52 dawes Exp $ */ #include #include Index: xc/lib/X11/imLcIm.c diff -u xc/lib/X11/imLcIm.c:1.8 xc/lib/X11/imLcIm.c:1.9 --- xc/lib/X11/imLcIm.c:1.8 Mon Dec 4 13:49:23 2000 +++ xc/lib/X11/imLcIm.c Wed Jan 17 14:41:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: imLcIm.c /main/12 1998/06/16 16:05:15 kaleb $ */ +/* $Xorg: imLcIm.c,v 1.3 2000/08/17 19:45:14 cpqbld Exp $ */ /****************************************************************** Copyright 1992, 1993, 1994 by FUJITSU LIMITED @@ -32,7 +32,7 @@ frankyling@hgrd01.enet.dec.com ******************************************************************/ -/* $XFree86: xc/lib/X11/imLcIm.c,v 1.8 2000/12/04 18:49:23 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imLcIm.c,v 1.9 2001/01/17 19:41:52 dawes Exp $ */ #include /* Index: xc/lib/X11/imLcLkup.c diff -u xc/lib/X11/imLcLkup.c:3.4 xc/lib/X11/imLcLkup.c:3.5 --- xc/lib/X11/imLcLkup.c:3.4 Mon Dec 4 13:49:24 2000 +++ xc/lib/X11/imLcLkup.c Wed Jan 17 14:41:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: imLcLkup.c /main/9 1998/04/28 17:34:55 kaleb $ */ +/* $Xorg: imLcLkup.c,v 1.3 2000/08/17 19:45:14 cpqbld Exp $ */ /****************************************************************** Copyright 1992 by Fuji Xerox Co., Ltd. @@ -29,7 +29,7 @@ fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imLcLkup.c,v 3.4 2000/12/04 18:49:24 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imLcLkup.c,v 3.5 2001/01/17 19:41:52 dawes Exp $ */ #include #include Index: xc/lib/X11/imLcPrs.c diff -u xc/lib/X11/imLcPrs.c:1.5 xc/lib/X11/imLcPrs.c:1.6 --- xc/lib/X11/imLcPrs.c:1.5 Tue Nov 28 13:49:38 2000 +++ xc/lib/X11/imLcPrs.c Wed Jan 17 14:41:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: imLcPrs.c /main/11 1998/06/17 12:19:31 kaleb $ */ +/* $Xorg: imLcPrs.c,v 1.3 2000/08/17 19:45:14 cpqbld Exp $ */ /****************************************************************** Copyright 1992 by Oki Technosystems Laboratory, Inc. @@ -30,7 +30,7 @@ ******************************************************************/ -/* $XFree86: xc/lib/X11/imLcPrs.c,v 1.5 2000/11/28 18:49:38 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imLcPrs.c,v 1.6 2001/01/17 19:41:52 dawes Exp $ */ #include #include Index: xc/lib/X11/imLcSIc.c diff -u xc/lib/X11/imLcSIc.c:1.1.1.1 xc/lib/X11/imLcSIc.c:1.1.1.2 --- xc/lib/X11/imLcSIc.c:1.1.1.1 Wed Apr 27 03:11:36 1994 +++ xc/lib/X11/imLcSIc.c Tue Jan 16 17:11:39 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: imLcSIc.c,v 1.3 94/03/26 17:00:41 rws Exp $ */ +/* $Xorg: imLcSIc.c,v 1.3 2000/08/17 19:45:14 cpqbld Exp $ */ /****************************************************************** Copyright 1990, 1991, 1992, 1993, 1994 by FUJITSU LIMITED Index: xc/lib/X11/imRm.c diff -u xc/lib/X11/imRm.c:3.9 xc/lib/X11/imRm.c:3.11 --- xc/lib/X11/imRm.c:3.9 Tue Sep 26 11:56:51 2000 +++ xc/lib/X11/imRm.c Mon Jan 22 16:32:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: imRm.c /main/14 1998/06/01 09:55:01 kaleb $ */ +/* $Xorg: imRm.c,v 1.4 2000/08/17 19:45:14 cpqbld Exp $ */ /****************************************************************** Copyright 1990, 1991, 1992,1993, 1994 by FUJITSU LIMITED @@ -30,7 +30,7 @@ makoto@sm.sony.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imRm.c,v 3.9 2000/09/26 15:56:51 tsi Exp $ */ +/* $XFree86: xc/lib/X11/imRm.c,v 3.11 2001/01/22 21:32:32 dawes Exp $ */ #include #include @@ -39,13 +39,6 @@ #include "Ximint.h" #include "Xresource.h" -#ifndef isalnum -#define isalnum(c) \ - (('0' <= (c) && (c) <= '9') || \ - ('A' <= (c) && (c) <= 'Z') || \ - ('a' <= (c) && (c) <= 'z')) -#endif - typedef struct _XimValueOffsetInfo { char *name; XrmQuark quark; @@ -2798,17 +2791,17 @@ return p->name; } if(res->xrm_name == pre_quark) { - if((name = _XimSetICValueData(ic, + if(((name = _XimSetICValueData(ic, (XPointer)(&((XimDefICValues *)top)->preedit_attr), res_list, list_num, (XIMArg *)p->value, - (mode | XIM_PREEDIT_ATTR), flag))) { + (mode | XIM_PREEDIT_ATTR), flag)))) { return name; } } else if(res->xrm_name == sts_quark) { - if((name = _XimSetICValueData(ic, + if(((name = _XimSetICValueData(ic, (XPointer)(&((XimDefICValues *)top)->status_attr), res_list, list_num, (XIMArg *)p->value, - (mode | XIM_STATUS_ATTR), flag))) { + (mode | XIM_STATUS_ATTR), flag)))) { return name; } } else { Index: xc/lib/X11/imRmAttr.c diff -u xc/lib/X11/imRmAttr.c:1.4 xc/lib/X11/imRmAttr.c:1.5 --- xc/lib/X11/imRmAttr.c:1.4 Tue Sep 26 11:56:52 2000 +++ xc/lib/X11/imRmAttr.c Wed Jan 17 14:41:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: imRmAttr.c /main/13 1997/06/22 18:11:18 kaleb $ */ +/* $Xorg: imRmAttr.c,v 1.4 2000/08/17 19:45:15 cpqbld Exp $ */ /****************************************************************** Copyright 1992, 1993, 1994 by FUJITSU LIMITED @@ -26,7 +26,7 @@ fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imRmAttr.c,v 1.4 2000/09/26 15:56:52 tsi Exp $ */ +/* $XFree86: xc/lib/X11/imRmAttr.c,v 1.5 2001/01/17 19:41:52 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" Index: xc/lib/X11/imThaiFlt.c diff -u xc/lib/X11/imThaiFlt.c:3.6.2.1 xc/lib/X11/imThaiFlt.c:3.8 --- xc/lib/X11/imThaiFlt.c:3.6.2.1 Fri Mar 16 11:44:41 2001 +++ xc/lib/X11/imThaiFlt.c Wed Feb 28 19:56:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: imThaiFlt.c /main/10 1998/02/06 17:36:48 kaleb $ */ +/* $Xorg: imThaiFlt.c,v 1.4 2000/08/17 19:45:15 cpqbld Exp $ */ /*********************************************************** Copyright 1993, 1998 The Open Group @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/imThaiFlt.c,v 3.6.2.1 2001/03/16 16:44:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imThaiFlt.c,v 3.8 2001/03/01 00:56:52 dawes Exp $ */ /* **++ Index: xc/lib/X11/imThaiIc.c diff -u xc/lib/X11/imThaiIc.c:1.3 xc/lib/X11/imThaiIc.c:1.4 --- xc/lib/X11/imThaiIc.c:1.3 Wed Nov 29 12:40:24 2000 +++ xc/lib/X11/imThaiIc.c Wed Jan 17 14:41:52 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: imThaiIc.c /main/5 1996/10/22 14:24:50 kaleb $ */ +/* $Xorg: imThaiIc.c,v 1.3 2000/08/17 19:45:15 cpqbld Exp $ */ /****************************************************************** Copyright 1992, 1993, 1994 by FUJITSU LIMITED @@ -32,7 +32,7 @@ frankyling@hgrd01.enet.dec.com ******************************************************************/ -/* $XFree86: xc/lib/X11/imThaiIc.c,v 1.3 2000/11/29 17:40:24 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imThaiIc.c,v 1.4 2001/01/17 19:41:52 dawes Exp $ */ #include #include Index: xc/lib/X11/imThaiIm.c diff -u xc/lib/X11/imThaiIm.c:1.6 xc/lib/X11/imThaiIm.c:1.7 --- xc/lib/X11/imThaiIm.c:1.6 Mon Dec 4 13:49:24 2000 +++ xc/lib/X11/imThaiIm.c Wed Jan 17 14:41:52 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: imThaiIm.c /main/5 1996/01/21 15:12:18 kaleb $ */ +/* $Xorg: imThaiIm.c,v 1.3 2000/08/17 19:45:15 cpqbld Exp $ */ /****************************************************************** Copyright 1992, 1993, 1994 by FUJITSU LIMITED @@ -32,7 +32,7 @@ frankyling@hgrd01.enet.dec.com ******************************************************************/ -/* $XFree86: xc/lib/X11/imThaiIm.c,v 1.6 2000/12/04 18:49:24 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imThaiIm.c,v 1.7 2001/01/17 19:41:52 dawes Exp $ */ #include #include Index: xc/lib/X11/imTrX.c diff -u xc/lib/X11/imTrX.c:1.1.1.2 xc/lib/X11/imTrX.c:1.1.1.3 --- xc/lib/X11/imTrX.c:1.1.1.2 Wed Jan 3 01:58:47 1996 +++ xc/lib/X11/imTrX.c Tue Jan 16 17:11:51 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: imTrX.c /main/8 1995/11/18 16:08:29 kaleb $ */ +/* $Xorg: imTrX.c,v 1.4 2000/08/17 19:45:15 cpqbld Exp $ */ /****************************************************************** Copyright 1992 by Sun Microsystems, Inc. @@ -105,9 +105,23 @@ { Xim im = (Xim)arg; XSpecRec *spec = (XSpecRec *)im->private.proto.spec; + Bool ret; spec->ev = (XPointer)ev; - return _XimFilterWaitEvent(im); + ret = _XimFilterWaitEvent(im); + + /* + * If ev is a pointer to a stack variable, there could be + * a coredump later on if the pointer is dereferenced. + * Therefore, reset to NULL to force reinitialization in + * _XimXRead(). + * + * Keep in mind _XimXRead may be called again when the stack + * is very different. + */ + spec->ev = (XPointer)NULL; + + return ret; } Private Bool Index: xc/lib/X11/imTrans.c diff -u xc/lib/X11/imTrans.c:1.1.1.3 xc/lib/X11/imTrans.c:1.1.1.4 --- xc/lib/X11/imTrans.c:1.1.1.3 Sat Jan 6 21:34:51 1996 +++ xc/lib/X11/imTrans.c Tue Jan 16 17:11:53 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: imTrans.c /main/7 1996/01/06 11:59:21 kaleb $ */ +/* $Xorg: imTrans.c,v 1.3 2000/08/17 19:45:16 cpqbld Exp $ */ /****************************************************************** Copyright 1992 by Sun Microsystems, Inc. Index: xc/lib/X11/imTransR.c diff -u xc/lib/X11/imTransR.c:3.3 xc/lib/X11/imTransR.c:3.4 --- xc/lib/X11/imTransR.c:3.3 Sun May 9 06:50:37 1999 +++ xc/lib/X11/imTransR.c Wed Jan 17 14:41:52 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: imTransR.c /main/9 1995/12/06 11:23:40 kaleb $ */ +/* $Xorg: imTransR.c,v 1.4 2000/08/17 19:45:16 cpqbld Exp $ */ /****************************************************************** Copyright 1992 by Sun Microsystems, Inc. @@ -28,7 +28,7 @@ fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imTransR.c,v 3.3 1999/05/09 10:50:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imTransR.c,v 3.4 2001/01/17 19:41:52 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" Index: xc/lib/X11/jump_funcs diff -u xc/lib/X11/jump_funcs:3.10 xc/lib/X11/jump_funcs:3.11 --- xc/lib/X11/jump_funcs:3.10 Sat Oct 3 04:41:36 1998 +++ xc/lib/X11/jump_funcs Wed Jan 17 14:41:52 2001 @@ -1,5 +1,9 @@ -# $TOG: jump_funcs /main/8 1998/06/17 15:34:53 kaleb $ -# $XFree86: xc/lib/X11/jump_funcs,v 3.10 1998/10/03 08:41:36 dawes Exp $ +# $Xorg: jump_funcs,v 1.3 2000/08/17 19:45:16 cpqbld Exp $ +# +# +# +# +# $XFree86: xc/lib/X11/jump_funcs,v 3.11 2001/01/17 19:41:52 dawes Exp $ # 00000000 T _XSaveContext libX11 Context 00000000 T _XFindContext libX11 Context Index: xc/lib/X11/jump_ignore diff -u xc/lib/X11/jump_ignore:3.10 xc/lib/X11/jump_ignore:3.11 --- xc/lib/X11/jump_ignore:3.10 Sat May 29 22:27:59 1999 +++ xc/lib/X11/jump_ignore Wed Jan 17 14:41:52 2001 @@ -1,5 +1,9 @@ -# $XConsortium: jump_ignore,v 1.3 95/06/06 21:20:40 kaleb Exp $ -# $XFree86: xc/lib/X11/jump_ignore,v 3.10 1999/05/30 02:27:59 dawes Exp $ +# $Xorg: jump_ignore,v 1.3 2000/08/17 19:45:16 cpqbld Exp $ +# +# +# +# +# $XFree86: xc/lib/X11/jump_ignore,v 3.11 2001/01/17 19:41:52 dawes Exp $ # jump_ignore 00000000 T __XlcAddCT libX11 lcCT 00000000 T __XKeycodeToKeysym libX11 KeyBind Index: xc/lib/X11/jump_vars diff -u xc/lib/X11/jump_vars:3.1 xc/lib/X11/jump_vars:3.2 --- xc/lib/X11/jump_vars:3.1 Sat Jan 28 10:42:57 1995 +++ xc/lib/X11/jump_vars Wed Jan 17 14:41:53 2001 @@ -1,5 +1,9 @@ -# $XConsortium: jump_vars,v 1.2 94/12/07 10:48:04 kaleb Exp $ -# $XFree86: xc/lib/X11/jump_vars,v 3.1 1995/01/28 15:42:57 dawes Exp $ +# $Xorg: jump_vars,v 1.3 2000/08/17 19:45:16 cpqbld Exp $ +# +# +# +# +# $XFree86: xc/lib/X11/jump_vars,v 3.2 2001/01/17 19:41:53 dawes Exp $ # 00008000 K __XkeyTable libX11 XStrKeysym 00000100 K __Xevent_to_mask libX11 evtomask Index: xc/lib/X11/lcCT.c diff -u xc/lib/X11/lcCT.c:3.22 xc/lib/X11/lcCT.c:3.24 --- xc/lib/X11/lcCT.c:3.22 Thu Dec 7 15:26:11 2000 +++ xc/lib/X11/lcCT.c Thu Feb 8 19:02:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: lcCT.c /main/17 1998/06/18 13:17:06 kaleb $ */ +/* $Xorg: lcCT.c,v 1.4 2000/08/17 19:45:16 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -36,7 +36,7 @@ * Modifier: Ivan Pascal The XFree86 Project * Modifier: Bruno Haible The XFree86 Project */ -/* $XFree86: xc/lib/X11/lcCT.c,v 3.22 2000/12/07 20:26:11 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcCT.c,v 3.24 2001/02/09 00:02:53 dawes Exp $ */ #include "Xlibint.h" #include "XlcPubI.h" @@ -78,7 +78,7 @@ { "ISO8859-16:GR", /* ISO-8859-16 226 */ "\033-f" }, { "JISX0201.1976-0:GL", /* ISO-646-JP 14 */ "\033(J" }, { "JISX0201.1976-0:GR", "\033)I" }, - { "TIS620.2533-1:GR", /* TIS-620 166 */ "\033-T" }, + { "TIS620-0:GR", /* TIS-620 166 */ "\033-T" }, /* Registered character sets with two byte per character */ { "GB2312.1980-0:GL", /* GB_2312-80 58 */ "\033$(A" }, Index: xc/lib/X11/lcCharSet.c diff -u xc/lib/X11/lcCharSet.c:3.7 xc/lib/X11/lcCharSet.c:3.8 --- xc/lib/X11/lcCharSet.c:3.7 Mon Dec 4 13:49:26 2000 +++ xc/lib/X11/lcCharSet.c Wed Jan 17 14:41:53 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lcCharSet.c,v 1.3 95/02/22 22:02:59 kaleb Exp $ */ +/* $Xorg: lcCharSet.c,v 1.3 2000/08/17 19:45:16 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcCharSet.c,v 3.7 2000/12/04 18:49:26 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcCharSet.c,v 3.8 2001/01/17 19:41:53 dawes Exp $ */ #include #include "Xlibint.h" Index: xc/lib/X11/lcConv.c diff -u xc/lib/X11/lcConv.c:1.5 xc/lib/X11/lcConv.c:1.6 --- xc/lib/X11/lcConv.c:1.5 Mon Dec 4 13:49:26 2000 +++ xc/lib/X11/lcConv.c Wed Jan 17 14:41:53 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lcConv.c /main/8 1996/09/28 16:37:28 rws $ */ +/* $Xorg: lcConv.c,v 1.4 2000/08/17 19:45:17 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcConv.c,v 1.5 2000/12/04 18:49:26 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcConv.c,v 1.6 2001/01/17 19:41:53 dawes Exp $ */ #include "Xlibint.h" #include "XlcPubI.h" @@ -302,7 +302,7 @@ from_type = XrmStringToQuark(from); to_type = XrmStringToQuark(to); - if ((conv = get_converter(from_lcd, from_type, to_lcd, to_type)) != NULL) + if ((conv = get_converter(from_lcd, from_type, to_lcd, to_type))) return conv; return open_indirect_converter(from_lcd, from, to_lcd, to); Index: xc/lib/X11/lcDB.c diff -u xc/lib/X11/lcDB.c:3.12 xc/lib/X11/lcDB.c:3.13 --- xc/lib/X11/lcDB.c:3.12 Tue Nov 28 13:49:41 2000 +++ xc/lib/X11/lcDB.c Wed Jan 17 14:41:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: lcDB.c /main/16 1998/06/26 14:37:14 kaleb $ */ +/* $Xorg: lcDB.c,v 1.6 2000/08/17 19:45:17 cpqbld Exp $ */ /* * * Copyright IBM Corporation 1993 @@ -28,7 +28,7 @@ * This is source code modified by FUJITSU LIMITED under the Joint * Development Agreement for the CDE/Motif PST. */ -/* $XFree86: xc/lib/X11/lcDB.c,v 3.12 2000/11/28 18:49:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcDB.c,v 3.13 2001/01/17 19:41:53 dawes Exp $ */ Index: xc/lib/X11/lcDefConv.c diff -u xc/lib/X11/lcDefConv.c:1.5 xc/lib/X11/lcDefConv.c:1.6 --- xc/lib/X11/lcDefConv.c:1.5 Tue Nov 28 13:49:42 2000 +++ xc/lib/X11/lcDefConv.c Wed Jan 17 14:41:53 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lcDefConv.c /main/5 1996/10/22 14:24:59 kaleb $ */ +/* $Xorg: lcDefConv.c,v 1.3 2000/08/17 19:45:17 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -27,7 +27,7 @@ * 2000 * Modifier: Ivan Pascal The XFree86 Project */ -/* $XFree86: xc/lib/X11/lcDefConv.c,v 1.5 2000/11/28 18:49:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcDefConv.c,v 1.6 2001/01/17 19:41:53 dawes Exp $ */ /* * The default locale loader. Index: xc/lib/X11/lcDynamic.c diff -u xc/lib/X11/lcDynamic.c:1.3 xc/lib/X11/lcDynamic.c:1.4 --- xc/lib/X11/lcDynamic.c:1.3 Tue Nov 28 13:49:42 2000 +++ xc/lib/X11/lcDynamic.c Wed Jan 17 14:41:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: lcDynamic.c /main/3 1998/02/06 17:40:11 kaleb $ */ +/* $Xorg: lcDynamic.c,v 1.3 2000/08/17 19:45:17 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -28,7 +28,7 @@ * Modifier: Takanori Tateno FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/lcDynamic.c,v 1.3 2000/11/28 18:49:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcDynamic.c,v 1.4 2001/01/17 19:41:53 dawes Exp $ */ /* * A dynamically loaded locale. Index: xc/lib/X11/lcEuc.c diff -u xc/lib/X11/lcEuc.c:3.8 xc/lib/X11/lcEuc.c:3.10 --- xc/lib/X11/lcEuc.c:3.8 Tue Nov 28 13:49:43 2000 +++ xc/lib/X11/lcEuc.c Wed Jan 17 14:41:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: lcEuc.c /main/21 1998/04/30 11:02:13 kaleb $ */ +/* $Xorg: lcEuc.c,v 1.3 2000/08/17 19:45:17 cpqbld Exp $ */ /****************************************************************** Copyright 1992, 1993 by FUJITSU LIMITED @@ -30,7 +30,7 @@ Yoshiyuki Segawa (segawa@ossi.com) *****************************************************************/ -/* $XFree86: xc/lib/X11/lcEuc.c,v 3.8 2000/11/28 18:49:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcEuc.c,v 3.10 2001/01/17 19:41:53 dawes Exp $ */ /* * An EUC locale. @@ -1084,7 +1084,7 @@ XPointer *args, int num_args) { - const char *inbufptr = *from; + char *inbufptr = *from; XPointer outbufptr = *to; const char *inbuf_base; XPointer outbuf_base = outbufptr; Index: xc/lib/X11/lcFile.c diff -u xc/lib/X11/lcFile.c:3.19 xc/lib/X11/lcFile.c:3.23 --- xc/lib/X11/lcFile.c:3.19 Tue Nov 28 13:49:43 2000 +++ xc/lib/X11/lcFile.c Fri May 18 19:35:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: lcFile.c /main/13 1998/05/28 14:21:35 kaleb $ */ +/* $Xorg: lcFile.c,v 1.4 2000/08/17 19:45:17 cpqbld Exp $ */ /* * * Copyright IBM Corporation 1993 @@ -23,7 +23,7 @@ * SOFTWARE. * */ -/* $XFree86: xc/lib/X11/lcFile.c,v 3.19 2000/11/28 18:49:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcFile.c,v 3.23 2001/05/18 23:35:28 dawes Exp $ */ #include #include Index: xc/lib/X11/lcGenConv.c diff -u xc/lib/X11/lcGenConv.c:3.17 xc/lib/X11/lcGenConv.c:3.18 --- xc/lib/X11/lcGenConv.c:3.17 Mon Dec 4 13:49:27 2000 +++ xc/lib/X11/lcGenConv.c Wed Jan 17 14:41:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: lcGenConv.c /main/17 1997/11/13 18:54:29 kaleb $ */ +/* $Xorg: lcGenConv.c,v 1.5 2000/08/17 19:45:17 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -35,7 +35,7 @@ * 2000 * Modifier: Ivan Pascal The XFree86 Project */ -/* $XFree86: xc/lib/X11/lcGenConv.c,v 3.17 2000/12/04 18:49:27 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcGenConv.c,v 3.18 2001/01/17 19:41:54 dawes Exp $ */ /* * A generic locale loader for all kinds of ISO-2022 based codesets. @@ -3076,6 +3076,7 @@ XLCdGenericPart *gen; lcd = _XlcCreateLC(name, _XlcGenericMethods); + if (lcd == NULL) return lcd; Index: xc/lib/X11/lcGeneric.c diff -u xc/lib/X11/lcGeneric.c:3.13 xc/lib/X11/lcGeneric.c:3.14 --- xc/lib/X11/lcGeneric.c:3.13 Wed Dec 6 17:00:42 2000 +++ xc/lib/X11/lcGeneric.c Wed Jan 17 14:41:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: lcGeneric.c /main/12 1998/06/25 16:09:44 kaleb $ */ +/* $Xorg: lcGeneric.c,v 1.6 2000/08/17 19:45:18 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -28,7 +28,7 @@ * This is source code modified by FUJITSU LIMITED under the Joint * Development Agreement for the CDE/Motif PST. */ -/* $XFree86: xc/lib/X11/lcGeneric.c,v 3.13 2000/12/06 22:00:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcGeneric.c,v 3.14 2001/01/17 19:41:54 dawes Exp $ */ #include #include "Xlibint.h" @@ -442,7 +442,7 @@ if (num > 0) { /* hackers will get truncated -- C'est la vie */ strncpy(cset_name,value[0], sizeof cset_name - 1); - cset_name[sizeof cset_name - 1] = '\0'; + cset_name[(sizeof cset_name) - 1] = '\0'; sprintf(name, "%s.%s", csd , "side"); _XlcGetResource(lcd, "XLC_CHARSET_DEFINE", name, &value, &num); if (num > 0) { Index: xc/lib/X11/lcInit.c diff -u xc/lib/X11/lcInit.c:3.7 xc/lib/X11/lcInit.c:3.8 --- xc/lib/X11/lcInit.c:3.7 Tue Nov 28 13:49:46 2000 +++ xc/lib/X11/lcInit.c Wed Jan 17 14:41:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: lcInit.c /main/5 1997/11/13 18:54:36 kaleb $ */ +/* $Xorg: lcInit.c,v 1.3 2000/08/17 19:45:18 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -31,7 +31,7 @@ * Modifier: Masayoshi Shimamura FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/lcInit.c,v 3.7 2000/11/28 18:49:46 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcInit.c,v 3.8 2001/01/17 19:41:54 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" Index: xc/lib/X11/lcJis.c diff -u xc/lib/X11/lcJis.c:1.6 xc/lib/X11/lcJis.c:1.7 --- xc/lib/X11/lcJis.c:1.6 Tue Nov 28 13:49:46 2000 +++ xc/lib/X11/lcJis.c Wed Jan 17 14:41:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: lcJis.c /main/8 1998/04/30 11:02:21 kaleb $ */ +/* $Xorg: lcJis.c,v 1.3 2000/08/17 19:45:18 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcJis.c,v 1.6 2000/11/28 18:49:46 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcJis.c,v 1.7 2001/01/17 19:41:54 dawes Exp $ */ /* * A Japanese JIS locale. Index: xc/lib/X11/lcPrTxt.c diff -u xc/lib/X11/lcPrTxt.c:1.5 xc/lib/X11/lcPrTxt.c:1.6 --- xc/lib/X11/lcPrTxt.c:1.5 Fri Dec 15 17:48:39 2000 +++ xc/lib/X11/lcPrTxt.c Wed Jan 17 14:41:55 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lcPrTxt.c /main/4 1996/01/05 11:23:11 kaleb $ */ +/* $Xorg: lcPrTxt.c,v 1.3 2000/08/17 19:45:18 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcPrTxt.c,v 1.5 2000/12/15 22:48:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcPrTxt.c,v 1.6 2001/01/17 19:41:55 dawes Exp $ */ #include "Xlibint.h" #include "XlcPubI.h" Index: xc/lib/X11/lcPubWrap.c diff -u xc/lib/X11/lcPubWrap.c:1.3 xc/lib/X11/lcPubWrap.c:1.4 --- xc/lib/X11/lcPubWrap.c:1.3 Tue Nov 28 13:49:47 2000 +++ xc/lib/X11/lcPubWrap.c Wed Jan 17 14:41:55 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lcPubWrap.c,v 1.3 94/01/20 18:07:08 rws Exp $ */ +/* $Xorg: lcPubWrap.c,v 1.3 2000/08/17 19:45:18 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcPubWrap.c,v 1.3 2000/11/28 18:49:47 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcPubWrap.c,v 1.4 2001/01/17 19:41:55 dawes Exp $ */ #include "Xlibint.h" #include "XlcPubI.h" Index: xc/lib/X11/lcPublic.c diff -u xc/lib/X11/lcPublic.c:1.8 xc/lib/X11/lcPublic.c:1.9 --- xc/lib/X11/lcPublic.c:1.8 Wed Dec 6 17:00:42 2000 +++ xc/lib/X11/lcPublic.c Wed Jan 17 14:41:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: lcPublic.c /main/11 1998/06/01 16:15:27 kaleb $ */ +/* $Xorg: lcPublic.c,v 1.3 2000/08/17 19:45:19 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcPublic.c,v 1.8 2000/12/06 22:00:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcPublic.c,v 1.9 2001/01/17 19:41:55 dawes Exp $ */ #include #include "Xlibint.h" Index: xc/lib/X11/lcRM.c diff -u xc/lib/X11/lcRM.c:1.4 xc/lib/X11/lcRM.c:1.5 --- xc/lib/X11/lcRM.c:1.4 Tue Nov 28 13:49:48 2000 +++ xc/lib/X11/lcRM.c Wed Jan 17 14:41:55 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lcRM.c,v 1.3 94/01/20 18:07:18 rws Exp $ */ +/* $Xorg: lcRM.c,v 1.3 2000/08/17 19:45:19 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -24,7 +24,7 @@ * mopi@osa.ilab.toshiba.co.jp * Bug fixes: Bruno Haible XFree86 Inc. */ -/* $XFree86: xc/lib/X11/lcRM.c,v 1.4 2000/11/28 18:49:48 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcRM.c,v 1.5 2001/01/17 19:41:55 dawes Exp $ */ #include "Xlibint.h" #include "XlcPubI.h" Index: xc/lib/X11/lcSjis.c diff -u xc/lib/X11/lcSjis.c:3.7 xc/lib/X11/lcSjis.c:3.8 --- xc/lib/X11/lcSjis.c:3.7 Tue Nov 28 13:49:48 2000 +++ xc/lib/X11/lcSjis.c Wed Jan 17 14:41:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: lcSjis.c /main/25 1998/04/30 11:02:27 kaleb $ */ +/* $Xorg: lcSjis.c,v 1.3 2000/08/17 19:45:19 cpqbld Exp $ */ /**************************************************************** Copyright 1992, 1993 by FUJITSU LIMITED @@ -35,7 +35,7 @@ makoto@sm.sony.co.jp *****************************************************************/ -/* $XFree86: xc/lib/X11/lcSjis.c,v 3.7 2000/11/28 18:49:48 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcSjis.c,v 3.8 2001/01/17 19:41:55 dawes Exp $ */ /* * A Japanese SJIS locale. Index: xc/lib/X11/lcStd.c diff -u xc/lib/X11/lcStd.c:1.4 xc/lib/X11/lcStd.c:1.5 --- xc/lib/X11/lcStd.c:1.4 Tue Nov 28 13:49:49 2000 +++ xc/lib/X11/lcStd.c Wed Jan 17 14:41:55 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lcStd.c /main/5 1996/10/22 17:22:55 kaleb $ */ +/* $Xorg: lcStd.c,v 1.4 2000/08/17 19:45:20 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcStd.c,v 1.4 2000/11/28 18:49:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcStd.c,v 1.5 2001/01/17 19:41:55 dawes Exp $ */ #include "Xlibint.h" #include "XlcPubI.h" Index: xc/lib/X11/lcTxtPr.c diff -u xc/lib/X11/lcTxtPr.c:3.2 xc/lib/X11/lcTxtPr.c:3.3 --- xc/lib/X11/lcTxtPr.c:3.2 Tue Nov 28 13:49:49 2000 +++ xc/lib/X11/lcTxtPr.c Wed Jan 17 14:41:55 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lcTxtPr.c /main/7 1996/10/22 17:21:47 kaleb $ */ +/* $Xorg: lcTxtPr.c,v 1.3 2000/08/17 19:45:20 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcTxtPr.c,v 3.2 2000/11/28 18:49:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcTxtPr.c,v 3.3 2001/01/17 19:41:55 dawes Exp $ */ #include "Xlibint.h" #include "XlcPubI.h" Index: xc/lib/X11/lcUTF8.c diff -u xc/lib/X11/lcUTF8.c:1.11 xc/lib/X11/lcUTF8.c:1.12 --- xc/lib/X11/lcUTF8.c:1.11 Thu Dec 7 15:26:11 2000 +++ xc/lib/X11/lcUTF8.c Thu Feb 8 19:02:53 2001 @@ -24,7 +24,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/lcUTF8.c,v 1.11 2000/12/07 20:26:11 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUTF8.c,v 1.12 2001/02/09 00:02:53 dawes Exp $ */ /* * This file contains: @@ -267,7 +267,7 @@ { "JISX0201.1976-0", NULLQUARK, jisx0201_mbtowc, jisx0201_wctomb }, - { "TIS620.2533-1", NULLQUARK, + { "TIS620-0", NULLQUARK, tis620_mbtowc, tis620_wctomb }, { "GB2312.1980-0", NULLQUARK, Index: xc/lib/X11/lcUtil.c diff -u xc/lib/X11/lcUtil.c:1.3 xc/lib/X11/lcUtil.c:1.4 --- xc/lib/X11/lcUtil.c:1.3 Wed Nov 29 12:40:24 2000 +++ xc/lib/X11/lcUtil.c Wed Jan 17 14:41:55 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lcUtil.c,v 1.3 94/01/20 18:07:47 rws Exp $ */ +/* $Xorg: lcUtil.c,v 1.3 2000/08/17 19:45:20 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -24,7 +24,7 @@ * mopi@osa.ilab.toshiba.co.jp * Bug fixes: Bruno Haible XFree86 Inc. */ -/* $XFree86: xc/lib/X11/lcUtil.c,v 1.3 2000/11/29 17:40:24 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUtil.c,v 1.4 2001/01/17 19:41:55 dawes Exp $ */ #include #include "XlcPublic.h" Index: xc/lib/X11/lcWrap.c diff -u xc/lib/X11/lcWrap.c:3.9 xc/lib/X11/lcWrap.c:3.10 --- xc/lib/X11/lcWrap.c:3.9 Tue Nov 28 13:49:51 2000 +++ xc/lib/X11/lcWrap.c Wed Jan 17 14:41:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: lcWrap.c /main/28 1998/06/01 16:15:36 kaleb $ */ +/* $Xorg: lcWrap.c,v 1.4 2000/08/17 19:45:20 cpqbld Exp $ */ /* Copyright 1991, 1998 The Open Group @@ -49,7 +49,7 @@ * * Katsuhisa Yano TOSHIBA Corp. */ -/* $XFree86: xc/lib/X11/lcWrap.c,v 3.9 2000/11/28 18:49:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcWrap.c,v 3.10 2001/01/17 19:41:55 dawes Exp $ */ #include #include "Xlibint.h" Index: xc/lib/X11/libX11.elist diff -u xc/lib/X11/libX11.elist:1.1.1.1 xc/lib/X11/libX11.elist:1.1.1.2 --- xc/lib/X11/libX11.elist:1.1.1.1 Sat Dec 21 22:28:24 1996 +++ xc/lib/X11/libX11.elist Tue Jan 16 17:12:58 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: libX11.elist /main/1 1996/09/28 16:38:57 rws $ */ +/* $Xorg: libX11.elist,v 1.3 2000/08/17 19:45:20 cpqbld Exp $ */ /************************************************************************* * Export list for libX11 Index: xc/lib/X11/locking.c diff -u xc/lib/X11/locking.c:1.1.1.2 xc/lib/X11/locking.c:1.1.1.3 --- xc/lib/X11/locking.c:1.1.1.2 Sun Sep 27 03:58:16 1998 +++ xc/lib/X11/locking.c Tue Jan 16 17:13:01 2001 @@ -1,4 +1,4 @@ -/* $TOG: locking.c /main/37 1998/02/06 17:42:31 kaleb $ */ +/* $Xorg: locking.c,v 1.4 2000/08/17 19:45:20 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group @@ -315,7 +315,7 @@ } /* signal new front after it is in place */ - if (dpy->lock->reply_first = (dpy->lock->reply_awaiters != NULL)) { + if ((dpy->lock->reply_first = (dpy->lock->reply_awaiters != NULL))) { ConditionSignal(dpy, dpy->lock->reply_awaiters->cv); } else if (dpy->lock->event_awaiters) { ConditionSignal(dpy, dpy->lock->event_awaiters->cv); @@ -429,7 +429,7 @@ xcondition_clear(dpy->lock->writers); xcondition_free(dpy->lock->writers); } - while (cvl = dpy->lock->free_cvls) { + while ((cvl = dpy->lock->free_cvls)) { dpy->lock->free_cvls = cvl->next; xcondition_clear(cvl->cv); Xfree((char *)cvl->cv); Index: xc/lib/X11/locking.h diff -u xc/lib/X11/locking.h:1.1.1.2 xc/lib/X11/locking.h:1.1.1.3 --- xc/lib/X11/locking.h:1.1.1.2 Sun Sep 27 03:58:16 1998 +++ xc/lib/X11/locking.h Tue Jan 16 17:13:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: locking.h /main/16 1998/02/06 17:42:38 kaleb $ */ +/* $Xorg: locking.h,v 1.3 2000/08/17 19:45:20 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group Index: xc/lib/X11/mbWMProps.c diff -u xc/lib/X11/mbWMProps.c:1.3 xc/lib/X11/mbWMProps.c:1.4 --- xc/lib/X11/mbWMProps.c:1.3 Wed Nov 29 12:40:24 2000 +++ xc/lib/X11/mbWMProps.c Wed Jan 17 14:41:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: mbWMProps.c /main/6 1998/02/06 17:44:24 kaleb $ */ +/* $Xorg: mbWMProps.c,v 1.3 2000/08/17 19:45:21 cpqbld Exp $ */ /* Copyright 1991, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/mbWMProps.c,v 1.3 2000/11/29 17:40:24 dawes Exp $ */ +/* $XFree86: xc/lib/X11/mbWMProps.c,v 1.4 2001/01/17 19:41:56 dawes Exp $ */ #include #include Index: xc/lib/X11/mbWrap.c diff -u xc/lib/X11/mbWrap.c:1.3 xc/lib/X11/mbWrap.c:1.4 --- xc/lib/X11/mbWrap.c:1.3 Wed Nov 29 12:40:25 2000 +++ xc/lib/X11/mbWrap.c Wed Jan 17 14:41:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: mbWrap.c /main/7 1998/02/06 17:44:30 kaleb $ */ +/* $Xorg: mbWrap.c,v 1.3 2000/08/17 19:45:21 cpqbld Exp $ */ /* Copyright 1991, 1998 The Open Group @@ -46,7 +46,7 @@ * * M. Collins OSF */ -/* $XFree86: xc/lib/X11/mbWrap.c,v 1.3 2000/11/29 17:40:25 dawes Exp $ */ +/* $XFree86: xc/lib/X11/mbWrap.c,v 1.4 2001/01/17 19:41:56 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" Index: xc/lib/X11/omDefault.c diff -u xc/lib/X11/omDefault.c:1.4 xc/lib/X11/omDefault.c:1.5 --- xc/lib/X11/omDefault.c:1.4 Wed Nov 29 12:40:25 2000 +++ xc/lib/X11/omDefault.c Wed Jan 17 14:41:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: omDefault.c /main/6 1997/06/22 15:53:43 kaleb $ */ +/* $Xorg: omDefault.c,v 1.3 2000/08/17 19:45:21 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -28,7 +28,7 @@ * This is source code modified by FUJITSU LIMITED under the Joint * Development Agreement for the CDE/Motif PST. */ -/* $XFree86: xc/lib/X11/omDefault.c,v 1.4 2000/11/29 17:40:25 dawes Exp $ */ +/* $XFree86: xc/lib/X11/omDefault.c,v 1.5 2001/01/17 19:41:56 dawes Exp $ */ #include "Xlibint.h" #include "XomGeneric.h" Index: xc/lib/X11/omGeneric.c diff -u xc/lib/X11/omGeneric.c:3.17.2.1 xc/lib/X11/omGeneric.c:3.20 --- xc/lib/X11/omGeneric.c:3.17.2.1 Fri Mar 2 17:55:19 2001 +++ xc/lib/X11/omGeneric.c Thu Apr 5 13:42:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: omGeneric.c /main/28 1998/06/25 16:15:55 kaleb $ */ +/* $Xorg: omGeneric.c,v 1.6 2000/08/17 19:45:21 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -31,7 +31,7 @@ * Modifier: Takanori Tateno FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/omGeneric.c,v 3.17.2.1 2001/03/02 22:55:19 dawes Exp $ */ +/* $XFree86: xc/lib/X11/omGeneric.c,v 3.20 2001/04/05 17:42:26 dawes Exp $ */ /* * Fixed the algorithms in parse_fontname() and parse_fontdata() @@ -713,20 +713,23 @@ if(is_match_charset(font_data, pattern) != True) { if ((fn_list = XListFontsWithInfo(dpy, pattern, MAXFONTS, - &list_num, &fs_list)) - && (prop_fname = get_prop_name(dpy, fs_list)) - && (is_match_charset(font_data, prop_fname) != True)) { - if (fn_list) { - XFreeFontInfo(fn_list, fs_list, list_num); - fn_list = NULL; - } - return False; + &list_num, &fs_list)) == NULL) { + return False; + } + else if ((prop_fname = get_prop_name(dpy, fs_list)) == NULL) { + XFreeFontInfo(fn_list, fs_list, list_num); + return False; } - font_data->xlfd_name = prop_fname; - if (fn_list) { - XFreeFontInfo(fn_list, fs_list, list_num); - } - return True; + else if ((is_match_charset(font_data, prop_fname) != True)) { + XFree(prop_fname); + XFreeFontInfo(fn_list, fs_list, list_num); + return False; + } + else { + font_data->xlfd_name = prop_fname; + XFreeFontInfo(fn_list, fs_list, list_num); + return True; + } } font_data->xlfd_name = (char *)Xmalloc(strlen(pattern)+1); @@ -936,6 +939,8 @@ if(font_data == NULL || font_data_count <= 0) { return False; } + + font_data_return->xlfd_name = NULL; /* Loop through each FontSet defined in the "font_data" CharSet. */ for ( ; font_data_count-- > 0; font_data++) { Index: xc/lib/X11/omImText.c diff -u xc/lib/X11/omImText.c:1.3 xc/lib/X11/omImText.c:1.4 --- xc/lib/X11/omImText.c:1.3 Wed Nov 29 12:40:26 2000 +++ xc/lib/X11/omImText.c Wed Jan 17 14:41:56 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: omImText.c,v 1.2 94/01/20 18:08:09 rws Exp $ */ +/* $Xorg: omImText.c,v 1.3 2000/08/17 19:45:22 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/omImText.c,v 1.3 2000/11/29 17:40:26 dawes Exp $ */ +/* $XFree86: xc/lib/X11/omImText.c,v 1.4 2001/01/17 19:41:56 dawes Exp $ */ #include "Xlibint.h" #include "XomGeneric.h" Index: xc/lib/X11/omText.c diff -u xc/lib/X11/omText.c:1.3 xc/lib/X11/omText.c:1.4 --- xc/lib/X11/omText.c:1.3 Tue Nov 28 13:49:53 2000 +++ xc/lib/X11/omText.c Wed Jan 17 14:41:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: omText.c /main/6 1998/03/14 06:08:58 kaleb $ */ +/* $Xorg: omText.c,v 1.3 2000/08/17 19:45:22 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/omText.c,v 1.3 2000/11/28 18:49:53 dawes Exp $ */ +/* $XFree86: xc/lib/X11/omText.c,v 1.4 2001/01/17 19:41:56 dawes Exp $ */ /* * Copyright 1995 by FUJITSU LIMITED * This is source code modified by FUJITSU LIMITED under the Joint Index: xc/lib/X11/omTextEsc.c diff -u xc/lib/X11/omTextEsc.c:1.4 xc/lib/X11/omTextEsc.c:1.5 --- xc/lib/X11/omTextEsc.c:1.4 Tue Nov 28 13:49:54 2000 +++ xc/lib/X11/omTextEsc.c Wed Jan 17 14:41:56 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: omTextEsc.c /main/4 1996/12/05 10:40:59 swick $ */ +/* $Xorg: omTextEsc.c,v 1.3 2000/08/17 19:45:22 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/omTextEsc.c,v 1.4 2000/11/28 18:49:54 dawes Exp $ */ +/* $XFree86: xc/lib/X11/omTextEsc.c,v 1.5 2001/01/17 19:41:56 dawes Exp $ */ /* * Copyright 1995 by FUJITSU LIMITED * This is source code modified by FUJITSU LIMITED under the Joint Index: xc/lib/X11/omTextExt.c diff -u xc/lib/X11/omTextExt.c:1.3 xc/lib/X11/omTextExt.c:1.4 --- xc/lib/X11/omTextExt.c:1.3 Wed Nov 29 12:40:26 2000 +++ xc/lib/X11/omTextExt.c Wed Jan 17 14:41:57 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: omTextExt.c,v 1.2 94/01/20 18:08:23 rws Exp $ */ +/* $Xorg: omTextExt.c,v 1.3 2000/08/17 19:45:22 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/omTextExt.c,v 1.3 2000/11/29 17:40:26 dawes Exp $ */ +/* $XFree86: xc/lib/X11/omTextExt.c,v 1.4 2001/01/17 19:41:57 dawes Exp $ */ #include "Xlibint.h" #include "XomGeneric.h" Index: xc/lib/X11/omTextPer.c diff -u xc/lib/X11/omTextPer.c:1.3 xc/lib/X11/omTextPer.c:1.4 --- xc/lib/X11/omTextPer.c:1.3 Wed Nov 29 12:40:26 2000 +++ xc/lib/X11/omTextPer.c Wed Jan 17 14:41:57 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: omTextPer.c,v 1.2 94/01/20 18:08:28 rws Exp $ */ +/* $Xorg: omTextPer.c,v 1.3 2000/08/17 19:45:22 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/omTextPer.c,v 1.3 2000/11/29 17:40:26 dawes Exp $ */ +/* $XFree86: xc/lib/X11/omTextPer.c,v 1.4 2001/01/17 19:41:57 dawes Exp $ */ #include "Xlibint.h" #include "XomGeneric.h" Index: xc/lib/X11/omXChar.c diff -u xc/lib/X11/omXChar.c:1.4 xc/lib/X11/omXChar.c:1.5 --- xc/lib/X11/omXChar.c:1.4 Wed Nov 29 12:40:26 2000 +++ xc/lib/X11/omXChar.c Wed Jan 17 14:41:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: omXChar.c /main/8 1998/03/14 06:09:03 kaleb $ */ +/* $Xorg: omXChar.c,v 1.3 2000/08/17 19:45:23 cpqbld Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -34,7 +34,7 @@ /* * Modifiers: Jeff Walls, Paul Anderson (HEWLETT-PACKARD) */ -/* $XFree86: xc/lib/X11/omXChar.c,v 1.4 2000/11/29 17:40:26 dawes Exp $ */ +/* $XFree86: xc/lib/X11/omXChar.c,v 1.5 2001/01/17 19:41:57 dawes Exp $ */ #include "Xlibint.h" #include "XlcPublic.h" Index: xc/lib/X11/poly.h diff -u xc/lib/X11/poly.h:1.1.1.2 xc/lib/X11/poly.h:1.1.1.3 --- xc/lib/X11/poly.h:1.1.1.2 Sun Sep 27 03:58:24 1998 +++ xc/lib/X11/poly.h Tue Jan 16 17:13:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: poly.h /main/5 1998/02/06 17:47:27 kaleb $ */ +/* $Xorg: poly.h,v 1.3 2000/08/17 19:45:23 cpqbld Exp $ */ /************************************************************************ Copyright 1987, 1998 The Open Group Index: xc/lib/X11/region.h diff -u xc/lib/X11/region.h:1.1.1.2 xc/lib/X11/region.h:1.1.1.3 --- xc/lib/X11/region.h:1.1.1.2 Sun Sep 27 03:58:25 1998 +++ xc/lib/X11/region.h Tue Jan 16 17:13:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: region.h /main/9 1998/02/06 17:50:30 kaleb $ */ +/* $Xorg: region.h,v 1.3 2000/08/17 19:45:23 cpqbld Exp $ */ /************************************************************************ Copyright 1987, 1998 The Open Group Index: xc/lib/X11/udcInf.c diff -u xc/lib/X11/udcInf.c:1.5 xc/lib/X11/udcInf.c:1.6 --- xc/lib/X11/udcInf.c:1.5 Mon Dec 4 13:49:28 2000 +++ xc/lib/X11/udcInf.c Wed Jan 17 14:41:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: udcInf.c /main/4 1998/02/06 17:55:37 kaleb $ */ +/* $Xorg: udcInf.c,v 1.6 2000/08/17 19:45:23 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -29,7 +29,7 @@ * */ -/* $XFree86: xc/lib/X11/udcInf.c,v 1.5 2000/12/04 18:49:28 dawes Exp $ */ +/* $XFree86: xc/lib/X11/udcInf.c,v 1.6 2001/01/17 19:41:57 dawes Exp $ */ #include #include Index: xc/lib/X11/uvY.c diff -u xc/lib/X11/uvY.c:1.2 xc/lib/X11/uvY.c:1.3 --- xc/lib/X11/uvY.c:1.2 Sun May 9 06:50:43 1999 +++ xc/lib/X11/uvY.c Wed Jan 17 14:41:57 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: uvY.c,v 1.10 93/09/07 21:33:36 rws Exp $ */ +/* $Xorg: uvY.c,v 1.3 2000/08/17 19:45:23 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -35,7 +35,7 @@ * DOCUMENTATION * "TekColor Color Management System, System Implementor's Manual" */ -/* $XFree86: xc/lib/X11/uvY.c,v 1.2 1999/05/09 10:50:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/uvY.c,v 1.3 2001/01/17 19:41:57 dawes Exp $ */ #include #include "Xlibint.h" Index: xc/lib/X11/wcWrap.c diff -u xc/lib/X11/wcWrap.c:1.3 xc/lib/X11/wcWrap.c:1.4 --- xc/lib/X11/wcWrap.c:1.3 Wed Nov 29 12:40:27 2000 +++ xc/lib/X11/wcWrap.c Wed Jan 17 14:41:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: wcWrap.c /main/7 1998/02/06 17:57:03 kaleb $ */ +/* $Xorg: wcWrap.c,v 1.3 2000/08/17 19:45:23 cpqbld Exp $ */ /* Copyright 1991, 1998 The Open Group @@ -47,7 +47,7 @@ * * M. Collins OSF */ -/* $XFree86: xc/lib/X11/wcWrap.c,v 1.3 2000/11/29 17:40:27 dawes Exp $ */ +/* $XFree86: xc/lib/X11/wcWrap.c,v 1.4 2001/01/17 19:41:57 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" Index: xc/lib/X11/xyY.c diff -u xc/lib/X11/xyY.c:1.2 xc/lib/X11/xyY.c:1.3 --- xc/lib/X11/xyY.c:1.2 Sun May 9 06:50:43 1999 +++ xc/lib/X11/xyY.c Wed Jan 17 14:41:57 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: xyY.c,v 1.10 93/09/07 21:33:40 rws Exp $ */ +/* $Xorg: xyY.c,v 1.3 2000/08/17 19:45:23 cpqbld Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -34,7 +34,7 @@ * DOCUMENTATION * "TekColor Color Management System, System Implementor's Manual" */ -/* $XFree86: xc/lib/X11/xyY.c,v 1.2 1999/05/09 10:50:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/xyY.c,v 1.3 2001/01/17 19:41:57 dawes Exp $ */ #include #include Index: xc/lib/X11/lcUniConv/8bit_tab_to_h.c diff -u xc/lib/X11/lcUniConv/8bit_tab_to_h.c:1.2 xc/lib/X11/lcUniConv/8bit_tab_to_h.c:1.3 --- xc/lib/X11/lcUniConv/8bit_tab_to_h.c:1.2 Mon Dec 4 13:49:30 2000 +++ xc/lib/X11/lcUniConv/8bit_tab_to_h.c Thu Feb 8 19:02:54 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/X11/lcUniConv/8bit_tab_to_h.c,v 1.2 2000/12/04 18:49:30 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUniConv/8bit_tab_to_h.c,v 1.3 2001/02/09 00:02:54 dawes Exp $ */ /* * Generates an 8-bit character set table from a .TXT table as found on @@ -19,7 +19,7 @@ * ./8bit_tab_to_h ISO-8859-14 iso8859_14 < tab8859_14 * ./8bit_tab_to_h ISO-8859-15 iso8859_15 < tab8859_15 * ./8bit_tab_to_h JISX0201.1976-0 jisx0201 < jis0201 - * ./8bit_tab_to_h TIS620.2533-1 tis620 < tabtis620 + * ./8bit_tab_to_h TIS620-0 tis620 < tabtis620 * ./8bit_tab_to_h KOI8-R koi8_r < tabkoi8_r * ./8bit_tab_to_h KOI8-U koi8_u < tabkoi8_u * ./8bit_tab_to_h ARMSCII-8 armscii_8 < tabarmscii_8 Index: xc/lib/X11/lcUniConv/tis620.h diff -u xc/lib/X11/lcUniConv/tis620.h:1.3 xc/lib/X11/lcUniConv/tis620.h:1.4 --- xc/lib/X11/lcUniConv/tis620.h:1.3 Wed Nov 29 12:40:35 2000 +++ xc/lib/X11/lcUniConv/tis620.h Thu Feb 8 19:02:54 2001 @@ -1,7 +1,7 @@ -/* $XFree86: xc/lib/X11/lcUniConv/tis620.h,v 1.3 2000/11/29 17:40:35 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUniConv/tis620.h,v 1.4 2001/02/09 00:02:54 dawes Exp $ */ /* - * TIS620.2533-1 + * TIS620-0 */ static const unsigned short tis620_2uni[96] = { Index: xc/lib/X11/util/makekeys.c diff -u xc/lib/X11/util/makekeys.c:3.4 xc/lib/X11/util/makekeys.c:3.5 --- xc/lib/X11/util/makekeys.c:3.4 Mon Oct 5 09:22:00 1998 +++ xc/lib/X11/util/makekeys.c Wed Jan 17 14:42:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: makekeys.c /main/11 1998/02/09 09:22:41 kaleb $ */ +/* $Xorg: makekeys.c,v 1.4 2000/08/17 19:45:24 cpqbld Exp $ */ /* Copyright 1990, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/util/makekeys.c,v 3.4 1998/10/05 13:22:00 dawes Exp $ */ +/* $XFree86: xc/lib/X11/util/makekeys.c,v 3.5 2001/01/17 19:42:20 dawes Exp $ */ /* Constructs hash tables for XStringToKeysym and XKeysymToString. */ Index: xc/lib/XIE/Imakefile diff -u xc/lib/XIE/Imakefile:1.2 xc/lib/XIE/Imakefile:1.3 --- xc/lib/XIE/Imakefile:1.2 Sun Dec 20 06:56:58 1998 +++ xc/lib/XIE/Imakefile Wed Jan 17 14:42:20 2001 @@ -1,5 +1,9 @@ -XCOMM $XConsortium: Imakefile /main/7 1996/09/28 16:43:07 rws $ -XCOMM $XFree86: xc/lib/XIE/Imakefile,v 1.2 1998/12/20 11:56:58 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:45:25 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/XIE/Imakefile,v 1.3 2001/01/17 19:42:20 dawes Exp $ #define DoNormalLib NormalLibXie #define DoSharedLib SharedLibXie Index: xc/lib/XIE/XIE-def.cpp diff -u xc/lib/XIE/XIE-def.cpp:1.1.1.2 xc/lib/XIE/XIE-def.cpp:1.1.1.3 --- xc/lib/XIE/XIE-def.cpp:1.1.1.2 Sat Dec 21 22:22:59 1996 +++ xc/lib/XIE/XIE-def.cpp Tue Jan 16 17:13:40 2001 @@ -110,4 +110,4 @@ XieTecWhiteAdjustCIELabShift XieTecYCCToRGB XieTecYCbCrToRGB -/* $XConsortium: XIE-def.cpp /main/3 1996/05/07 13:15:28 kaleb $ */ +/* $Xorg: XIE-def.cpp,v 1.3 2000/08/17 19:45:25 cpqbld Exp $ */ Index: xc/lib/XIE/XIElib.h diff -u xc/lib/XIE/XIElib.h:3.1 xc/lib/XIE/XIElib.h:3.2 --- xc/lib/XIE/XIElib.h:3.1 Sat Oct 3 04:41:56 1998 +++ xc/lib/XIE/XIElib.h Wed Jan 17 14:42:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: XIElib.h /main/13 1998/02/06 15:13:26 kaleb $ */ +/* $Xorg: XIElib.h,v 1.5 2000/08/17 19:45:25 cpqbld Exp $ */ /* @@ -246,7 +246,11 @@ XiePhototag src2; XieProcessDomain domain; XieConstant constant; +#if defined(__cplusplus) || defined(c_plusplus) + XieArithmeticOp c_operator; +#else XieArithmeticOp operator; +#endif unsigned int band_mask; } Arithmetic; @@ -283,7 +287,11 @@ XiePhototag src2; XieProcessDomain domain; XieConstant constant; +#if defined(__cplusplus) || defined(c_plusplus) + XieCompareOp c_operator; +#else XieCompareOp operator; +#endif Bool combine; unsigned int band_mask; } Compare; @@ -357,7 +365,11 @@ XiePhototag src2; XieProcessDomain domain; XieConstant constant; +#if defined(__cplusplus) || defined(c_plusplus) + int c_operator; +#else int operator; +#endif unsigned int band_mask; } Logical; @@ -371,7 +383,11 @@ struct { XiePhototag src; XieProcessDomain domain; +#if defined(__cplusplus) || defined(c_plusplus) + XieMathOp c_operator; +#else XieMathOp operator; +#endif unsigned int band_mask; } Math; @@ -861,7 +877,11 @@ unsigned long name_space; XiePhototag phototag; unsigned int elem_type; +#if defined(__cplusplus) || defined(c_plusplus) + unsigned int c_operator; +#else unsigned int operator; +#endif } XieFloOperatorError; typedef struct { Index: xc/lib/XIE/XIElibint.h diff -u xc/lib/XIE/XIElibint.h:3.3 xc/lib/XIE/XIElibint.h:3.4 --- xc/lib/XIE/XIElibint.h:3.3 Sun Jun 13 12:18:06 1999 +++ xc/lib/XIE/XIElibint.h Wed Jan 17 14:42:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: XIElibint.h /main/9 1998/02/06 15:13:20 kaleb $ */ +/* $Xorg: XIElibint.h,v 1.4 2000/08/17 19:45:25 cpqbld Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/XIElibint.h,v 3.3 1999/06/13 16:18:06 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/XIElibint.h,v 3.4 2001/01/17 19:42:21 dawes Exp $ */ #ifndef _XIELIBINT_H_ #define _XIELIBINT_H_ @@ -103,7 +103,7 @@ #define GET_EXTENSION_INFO(_display, _info) \ \ { \ - if ((_info = _XieExtInfoHeader) != 0) \ + if ((_info = _XieExtInfoHeader)) \ { \ if (_XieExtInfoHeader->display != _display) \ { \ Index: xc/lib/XIE/abort.c diff -u xc/lib/XIE/abort.c:1.3 xc/lib/XIE/abort.c:1.4 --- xc/lib/XIE/abort.c:1.3 Sun Jun 13 12:18:07 1999 +++ xc/lib/XIE/abort.c Wed Jan 17 14:42:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: abort.c /main/3 1998/02/06 15:11:19 kaleb $ */ +/* $Xorg: abort.c,v 1.3 2000/08/17 19:45:25 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/abort.c,v 1.3 1999/06/13 16:18:07 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/abort.c,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/await.c diff -u xc/lib/XIE/await.c:1.3 xc/lib/XIE/await.c:1.4 --- xc/lib/XIE/await.c:1.3 Sun Jun 13 12:18:07 1999 +++ xc/lib/XIE/await.c Wed Jan 17 14:42:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: await.c /main/3 1998/02/06 15:11:25 kaleb $ */ +/* $Xorg: await.c,v 1.3 2000/08/17 19:45:25 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/await.c,v 1.3 1999/06/13 16:18:07 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/await.c,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/clientdata.c diff -u xc/lib/XIE/clientdata.c:1.3 xc/lib/XIE/clientdata.c:1.4 --- xc/lib/XIE/clientdata.c:1.3 Sun Jun 13 12:18:07 1999 +++ xc/lib/XIE/clientdata.c Wed Jan 17 14:42:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: clientdata.c /main/5 1998/02/06 15:11:30 kaleb $ */ +/* $Xorg: clientdata.c,v 1.3 2000/08/17 19:45:25 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/clientdata.c,v 1.3 1999/06/13 16:18:07 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/clientdata.c,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/colorlist.c diff -u xc/lib/XIE/colorlist.c:1.4 xc/lib/XIE/colorlist.c:1.5 --- xc/lib/XIE/colorlist.c:1.4 Tue Sep 26 11:56:53 2000 +++ xc/lib/XIE/colorlist.c Wed Jan 17 14:42:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: colorlist.c /main/7 1998/02/06 15:11:36 kaleb $ */ +/* $Xorg: colorlist.c,v 1.3 2000/08/17 19:45:25 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/colorlist.c,v 1.4 2000/09/26 15:56:53 tsi Exp $ */ +/* $XFree86: xc/lib/XIE/colorlist.c,v 1.5 2001/01/17 19:42:21 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/conven.c diff -u xc/lib/XIE/conven.c:1.3 xc/lib/XIE/conven.c:1.4 --- xc/lib/XIE/conven.c:1.3 Sun Jun 13 12:18:08 1999 +++ xc/lib/XIE/conven.c Wed Jan 17 14:42:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: conven.c /main/10 1998/02/06 15:11:41 kaleb $ */ +/* $Xorg: conven.c,v 1.5 2000/08/17 19:45:25 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/conven.c,v 1.3 1999/06/13 16:18:08 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/conven.c,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ #include "XIElibint.h" @@ -168,7 +168,7 @@ XiePhototag src2, XieProcessDomain *domain, XieConstant constant, - XieArithmeticOp operator, + XieArithmeticOp op, unsigned int band_mask) { element->elemType = xieElemArithmetic; @@ -180,7 +180,7 @@ element->data.Arithmetic.constant[0] = constant[0]; element->data.Arithmetic.constant[1] = constant[1]; element->data.Arithmetic.constant[2] = constant[2]; - element->data.Arithmetic.operator = operator; + element->data.Arithmetic.operator = op; element->data.Arithmetic.band_mask = band_mask; } @@ -262,7 +262,7 @@ XiePhototag src2, XieProcessDomain *domain, XieConstant constant, - XieCompareOp operator, + XieCompareOp op, Bool combine, unsigned int band_mask) { @@ -275,7 +275,7 @@ element->data.Compare.constant[0] = constant[0]; element->data.Compare.constant[1] = constant[1]; element->data.Compare.constant[2] = constant[2]; - element->data.Compare.operator = operator; + element->data.Compare.operator = op; element->data.Compare.combine = combine; element->data.Compare.band_mask = band_mask; } @@ -450,7 +450,7 @@ XiePhototag src2, XieProcessDomain *domain, XieConstant constant, - unsigned long operator, + unsigned long op, unsigned int band_mask) { element->elemType = xieElemLogical; @@ -462,7 +462,7 @@ element->data.Logical.constant[0] = constant[0]; element->data.Logical.constant[1] = constant[1]; element->data.Logical.constant[2] = constant[2]; - element->data.Logical.operator = operator; + element->data.Logical.operator = op; element->data.Logical.band_mask = band_mask; } @@ -490,7 +490,7 @@ XiePhotoElement *element, XiePhototag src, XieProcessDomain *domain, - XieMathOp operator, + XieMathOp op, unsigned int band_mask) { element->elemType = xieElemMath; @@ -498,7 +498,7 @@ element->data.Math.domain.offset_x = domain->offset_x; element->data.Math.domain.offset_y = domain->offset_y; element->data.Math.domain.phototag = domain->phototag; - element->data.Math.operator = operator; + element->data.Math.operator = op; element->data.Math.band_mask = band_mask; } Index: xc/lib/XIE/elements.c diff -u xc/lib/XIE/elements.c:1.3 xc/lib/XIE/elements.c:1.4 --- xc/lib/XIE/elements.c:1.3 Sun Jun 13 12:18:08 1999 +++ xc/lib/XIE/elements.c Wed Jan 17 14:42:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: elements.c /main/6 1998/02/06 15:11:48 kaleb $ */ +/* $Xorg: elements.c,v 1.5 2000/08/17 19:45:26 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/elements.c,v 1.3 1999/06/13 16:18:08 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/elements.c,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ #include "XIElibint.h" #include "elements.h" Index: xc/lib/XIE/elements.h diff -u xc/lib/XIE/elements.h:3.1 xc/lib/XIE/elements.h:3.2 --- xc/lib/XIE/elements.h:3.1 Sat Oct 3 04:41:56 1998 +++ xc/lib/XIE/elements.h Wed Jan 17 14:42:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: elements.h /main/6 1998/02/06 15:11:55 kaleb $ */ +/* $Xorg: elements.h,v 1.3 2000/08/17 19:45:26 cpqbld Exp $ */ /* Index: xc/lib/XIE/errors.c diff -u xc/lib/XIE/errors.c:3.3 xc/lib/XIE/errors.c:3.4 --- xc/lib/XIE/errors.c:3.3 Sun Jun 13 12:18:09 1999 +++ xc/lib/XIE/errors.c Wed Jan 17 14:42:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: errors.c /main/6 1998/02/06 15:12:00 kaleb $ */ +/* $Xorg: errors.c,v 1.5 2000/08/17 19:45:26 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/errors.c,v 3.3 1999/06/13 16:18:09 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/errors.c,v 3.4 2001/01/17 19:42:21 dawes Exp $ */ #define NEED_EVENTS /* so XErrorEvent will get pulled in */ Index: xc/lib/XIE/events.c diff -u xc/lib/XIE/events.c:1.3 xc/lib/XIE/events.c:1.4 --- xc/lib/XIE/events.c:1.3 Sun Jun 13 12:18:09 1999 +++ xc/lib/XIE/events.c Wed Jan 17 14:42:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: events.c /main/7 1998/02/06 15:12:05 kaleb $ */ +/* $Xorg: events.c,v 1.3 2000/08/17 19:45:26 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/events.c,v 1.3 1999/06/13 16:18:09 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/events.c,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ #define NEED_EVENTS /* so xEvent will get pulled in */ #include "XIElibint.h" Index: xc/lib/XIE/free.c diff -u xc/lib/XIE/free.c:1.3 xc/lib/XIE/free.c:1.4 --- xc/lib/XIE/free.c:1.3 Sun Jun 13 12:18:10 1999 +++ xc/lib/XIE/free.c Wed Jan 17 14:42:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: free.c /main/4 1998/02/06 15:12:10 kaleb $ */ +/* $Xorg: free.c,v 1.3 2000/08/17 19:45:26 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/free.c,v 1.3 1999/06/13 16:18:10 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/free.c,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/globals.h diff -u xc/lib/XIE/globals.h:1.3 xc/lib/XIE/globals.h:1.4 --- xc/lib/XIE/globals.h:1.3 Sun Jun 13 09:47:01 1999 +++ xc/lib/XIE/globals.h Wed Jan 17 14:42:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: globals.h /main/4 1998/02/06 15:12:14 kaleb $ */ +/* $Xorg: globals.h,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/globals.h,v 1.3 1999/06/13 13:47:01 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/globals.h,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ extern void _XieElemImportClientLUT (char **, XiePhotoElement *); extern void _XieElemImportClientPhoto (char **, XiePhotoElement *); Index: xc/lib/XIE/ieee.c diff -u xc/lib/XIE/ieee.c:1.3 xc/lib/XIE/ieee.c:1.4 --- xc/lib/XIE/ieee.c:1.3 Sun Jun 13 12:18:10 1999 +++ xc/lib/XIE/ieee.c Wed Jan 17 14:42:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: ieee.c /main/6 1998/02/06 15:12:20 kaleb $ */ +/* $Xorg: ieee.c,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ /****************************************************************************** NOTICE @@ -64,7 +64,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/ieee.c,v 1.3 1999/06/13 16:18:10 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/ieee.c,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ #include "XIElibint.h" #include Index: xc/lib/XIE/init.c diff -u xc/lib/XIE/init.c:3.4 xc/lib/XIE/init.c:3.5 --- xc/lib/XIE/init.c:3.4 Tue Sep 26 11:56:53 2000 +++ xc/lib/XIE/init.c Wed Jan 17 14:42:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: init.c /main/12 1998/02/06 15:12:25 kaleb $ */ +/* $Xorg: init.c,v 1.5 2000/08/17 19:45:27 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/init.c,v 3.4 2000/09/26 15:56:53 tsi Exp $ */ +/* $XFree86: xc/lib/XIE/init.c,v 3.5 2001/01/17 19:42:21 dawes Exp $ */ #define NEED_EVENTS /* so XErrorEvent will get pulled in */ Index: xc/lib/XIE/init.h diff -u xc/lib/XIE/init.h:1.1.1.2 xc/lib/XIE/init.h:1.1.1.3 --- xc/lib/XIE/init.h:1.1.1.2 Sun Sep 27 03:55:00 1998 +++ xc/lib/XIE/init.h Tue Jan 16 17:14:14 2001 @@ -1,4 +1,4 @@ -/* $TOG: init.h /main/4 1998/02/06 15:12:30 kaleb $ */ +/* $Xorg: init.h,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ /* Index: xc/lib/XIE/jump_funcs diff -u xc/lib/XIE/jump_funcs:3.1 xc/lib/XIE/jump_funcs:3.2 --- xc/lib/XIE/jump_funcs:3.1 Sat Jan 28 10:43:09 1995 +++ xc/lib/XIE/jump_funcs Wed Jan 17 14:42:21 2001 @@ -1,5 +1,9 @@ -# $XConsortium: jump_funcs,v 1.2 94/12/07 10:44:37 kaleb Exp $ -# $XFree86: xc/lib/XIE/jump_funcs,v 3.1 1995/01/28 15:43:09 dawes Exp $ +# $Xorg: jump_funcs,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ +# +# +# +# +# $XFree86: xc/lib/XIE/jump_funcs,v 3.2 2001/01/17 19:42:21 dawes Exp $ 00000000 T _XieAbort libXIE abort 00000000 T _XieAwait libXIE await 00000000 T _XiePutClientData libXIE clientdata Index: xc/lib/XIE/jump_ignore diff -u xc/lib/XIE/jump_ignore:3.1 xc/lib/XIE/jump_ignore:3.2 --- xc/lib/XIE/jump_ignore:3.1 Sat Jan 28 10:43:12 1995 +++ xc/lib/XIE/jump_ignore Wed Jan 17 14:42:22 2001 @@ -1,3 +1,7 @@ -# $XConsortium: jump_ignore,v 1.2 94/12/07 10:44:37 kaleb Exp $ -# $XFree86: xc/lib/XIE/jump_ignore,v 3.1 1995/01/28 15:43:12 dawes Exp $ +# $Xorg: jump_ignore,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ +# +# +# +# +# $XFree86: xc/lib/XIE/jump_ignore,v 3.2 2001/01/17 19:42:22 dawes Exp $ # jump_ignore Index: xc/lib/XIE/jump_vars diff -u xc/lib/XIE/jump_vars:3.1 xc/lib/XIE/jump_vars:3.2 --- xc/lib/XIE/jump_vars:3.1 Sat Jan 28 10:43:13 1995 +++ xc/lib/XIE/jump_vars Wed Jan 17 14:42:22 2001 @@ -1,5 +1,9 @@ -# $XConsortium: jump_vars,v 1.2 94/12/07 10:44:37 kaleb Exp $ -# $XFree86: xc/lib/XIE/jump_vars,v 3.1 1995/01/28 15:43:13 dawes Exp $ +# $Xorg: jump_vars,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ +# +# +# +# +# $XFree86: xc/lib/XIE/jump_vars,v 3.2 2001/01/17 19:42:22 dawes Exp $ 00000004 D __XieExtInfoHeader libXIE init 000000b4 D __XieElemFuncs libXIE init 00000004 D __XieTechFuncsInitialized libXIE init Index: xc/lib/XIE/lut.c diff -u xc/lib/XIE/lut.c:1.3 xc/lib/XIE/lut.c:1.4 --- xc/lib/XIE/lut.c:1.3 Sun Jun 13 12:18:10 1999 +++ xc/lib/XIE/lut.c Wed Jan 17 14:42:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: lut.c /main/3 1998/02/06 15:12:36 kaleb $ */ +/* $Xorg: lut.c,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/lut.c,v 1.3 1999/06/13 16:18:10 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/lut.c,v 1.4 2001/01/17 19:42:22 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/photoflo.c diff -u xc/lib/XIE/photoflo.c:1.3 xc/lib/XIE/photoflo.c:1.4 --- xc/lib/XIE/photoflo.c:1.3 Sun Jun 13 12:18:11 1999 +++ xc/lib/XIE/photoflo.c Wed Jan 17 14:42:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: photoflo.c /main/7 1998/02/06 15:12:41 kaleb $ */ +/* $Xorg: photoflo.c,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/photoflo.c,v 1.3 1999/06/13 16:18:11 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/photoflo.c,v 1.4 2001/01/17 19:42:22 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/photomap.c diff -u xc/lib/XIE/photomap.c:1.3 xc/lib/XIE/photomap.c:1.4 --- xc/lib/XIE/photomap.c:1.3 Sun Jun 13 12:18:11 1999 +++ xc/lib/XIE/photomap.c Wed Jan 17 14:42:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: photomap.c /main/7 1998/02/06 15:12:46 kaleb $ */ +/* $Xorg: photomap.c,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/photomap.c,v 1.3 1999/06/13 16:18:11 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/photomap.c,v 1.4 2001/01/17 19:42:22 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/photospace.c diff -u xc/lib/XIE/photospace.c:1.3 xc/lib/XIE/photospace.c:1.4 --- xc/lib/XIE/photospace.c:1.3 Sun Jun 13 12:18:11 1999 +++ xc/lib/XIE/photospace.c Wed Jan 17 14:42:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: photospace.c /main/3 1998/02/06 15:12:51 kaleb $ */ +/* $Xorg: photospace.c,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/photospace.c,v 1.3 1999/06/13 16:18:11 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/photospace.c,v 1.4 2001/01/17 19:42:22 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/roi.c diff -u xc/lib/XIE/roi.c:1.3 xc/lib/XIE/roi.c:1.4 --- xc/lib/XIE/roi.c:1.3 Sun Jun 13 12:18:12 1999 +++ xc/lib/XIE/roi.c Wed Jan 17 14:42:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: roi.c /main/3 1998/02/06 15:12:57 kaleb $ */ +/* $Xorg: roi.c,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/roi.c,v 1.3 1999/06/13 16:18:12 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/roi.c,v 1.4 2001/01/17 19:42:22 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/technique.c diff -u xc/lib/XIE/technique.c:1.3 xc/lib/XIE/technique.c:1.4 --- xc/lib/XIE/technique.c:1.3 Sun Jun 13 12:18:12 1999 +++ xc/lib/XIE/technique.c Wed Jan 17 14:42:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: technique.c /main/8 1998/02/06 15:13:02 kaleb $ */ +/* $Xorg: technique.c,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/technique.c,v 1.3 1999/06/13 16:18:12 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/technique.c,v 1.4 2001/01/17 19:42:22 dawes Exp $ */ #include "XIElibint.h" #include "technique.h" Index: xc/lib/XIE/technique.h diff -u xc/lib/XIE/technique.h:1.1.1.2 xc/lib/XIE/technique.h:1.1.1.3 --- xc/lib/XIE/technique.h:1.1.1.2 Sun Sep 27 03:55:04 1998 +++ xc/lib/XIE/technique.h Tue Jan 16 17:14:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: technique.h /main/5 1998/02/06 15:13:09 kaleb $ */ +/* $Xorg: technique.h,v 1.3 2000/08/17 19:45:28 cpqbld Exp $ */ /* Index: xc/lib/XIE/utils.c diff -u xc/lib/XIE/utils.c:1.3 xc/lib/XIE/utils.c:1.4 --- xc/lib/XIE/utils.c:1.3 Sun Jun 13 12:18:12 1999 +++ xc/lib/XIE/utils.c Wed Jan 17 14:42:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: utils.c /main/4 1998/04/30 14:40:10 kaleb $ */ +/* $Xorg: utils.c,v 1.3 2000/08/17 19:45:28 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/utils.c,v 1.3 1999/06/13 16:18:12 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/utils.c,v 1.4 2001/01/17 19:42:22 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/Xau/AuDispose.c diff -u xc/lib/Xau/AuDispose.c:1.2 xc/lib/Xau/AuDispose.c:1.3 --- xc/lib/Xau/AuDispose.c:1.2 Sat Mar 13 22:21:06 1999 +++ xc/lib/Xau/AuDispose.c Wed Jan 17 14:42:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: AuDispose.c /main/6 1998/02/06 14:14:30 kaleb $ */ +/* $Xorg: AuDispose.c,v 1.3 2000/08/17 19:45:28 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xau/AuDispose.c,v 1.2 1999/03/14 03:21:06 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/AuDispose.c,v 1.3 2001/01/17 19:42:23 dawes Exp $ */ #include Index: xc/lib/Xau/AuFileName.c diff -u xc/lib/Xau/AuFileName.c:3.4 xc/lib/Xau/AuFileName.c:3.5 --- xc/lib/Xau/AuFileName.c:3.4 Sun May 9 06:51:32 1999 +++ xc/lib/Xau/AuFileName.c Wed Jan 17 14:42:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: AuFileName.c /main/9 1998/02/06 14:14:36 kaleb $ */ +/* $Xorg: AuFileName.c,v 1.4 2000/08/17 19:45:28 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xau/AuFileName.c,v 3.4 1999/05/09 10:51:32 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/AuFileName.c,v 3.5 2001/01/17 19:42:23 dawes Exp $ */ #include #include Index: xc/lib/Xau/AuGetAddr.c diff -u xc/lib/Xau/AuGetAddr.c:1.3 xc/lib/Xau/AuGetAddr.c:1.4 --- xc/lib/Xau/AuGetAddr.c:1.3 Tue Jun 13 20:16:06 2000 +++ xc/lib/Xau/AuGetAddr.c Wed Jan 17 14:42:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: AuGetAddr.c /main/14 1998/02/06 14:14:42 kaleb $ */ +/* $Xorg: AuGetAddr.c,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xau/AuGetAddr.c,v 1.3 2000/06/14 00:16:06 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/AuGetAddr.c,v 1.4 2001/01/17 19:42:23 dawes Exp $ */ #include #include Index: xc/lib/Xau/AuGetBest.c diff -u xc/lib/Xau/AuGetBest.c:1.3 xc/lib/Xau/AuGetBest.c:1.4 --- xc/lib/Xau/AuGetBest.c:1.3 Tue Jun 13 20:16:06 2000 +++ xc/lib/Xau/AuGetBest.c Wed Jan 17 14:42:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: AuGetBest.c /main/24 1998/02/06 14:14:47 kaleb $ */ +/* $Xorg: AuGetBest.c,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xau/AuGetBest.c,v 1.3 2000/06/14 00:16:06 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/AuGetBest.c,v 1.4 2001/01/17 19:42:23 dawes Exp $ */ #include #include Index: xc/lib/Xau/AuLock.c diff -u xc/lib/Xau/AuLock.c:3.2 xc/lib/Xau/AuLock.c:3.3 --- xc/lib/Xau/AuLock.c:3.2 Mon Feb 14 12:43:40 2000 +++ xc/lib/Xau/AuLock.c Wed Jan 17 14:42:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: AuLock.c /main/16 1998/02/06 14:14:52 kaleb $ */ +/* $Xorg: AuLock.c,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xau/AuLock.c,v 3.2 2000/02/14 17:43:40 robin Exp $ */ +/* $XFree86: xc/lib/Xau/AuLock.c,v 3.3 2001/01/17 19:42:24 dawes Exp $ */ #include #include Index: xc/lib/Xau/AuRead.c diff -u xc/lib/Xau/AuRead.c:1.3 xc/lib/Xau/AuRead.c:1.4 --- xc/lib/Xau/AuRead.c:1.3 Sun May 9 06:51:33 1999 +++ xc/lib/Xau/AuRead.c Wed Jan 17 14:42:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: AuRead.c /main/8 1998/02/06 14:14:57 kaleb $ */ +/* $Xorg: AuRead.c,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xau/AuRead.c,v 1.3 1999/05/09 10:51:33 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/AuRead.c,v 1.4 2001/01/17 19:42:24 dawes Exp $ */ #include Index: xc/lib/Xau/AuUnlock.c diff -u xc/lib/Xau/AuUnlock.c:1.2 xc/lib/Xau/AuUnlock.c:1.3 --- xc/lib/Xau/AuUnlock.c:1.2 Sun May 9 06:51:34 1999 +++ xc/lib/Xau/AuUnlock.c Wed Jan 17 14:42:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: AuUnlock.c /main/11 1998/02/06 14:15:10 kaleb $ */ +/* $Xorg: AuUnlock.c,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xau/AuUnlock.c,v 1.2 1999/05/09 10:51:34 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/AuUnlock.c,v 1.3 2001/01/17 19:42:24 dawes Exp $ */ #include #include Index: xc/lib/Xau/AuWrite.c diff -u xc/lib/Xau/AuWrite.c:1.2 xc/lib/Xau/AuWrite.c:1.3 --- xc/lib/Xau/AuWrite.c:1.2 Sun May 9 06:51:34 1999 +++ xc/lib/Xau/AuWrite.c Wed Jan 17 14:42:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: AuWrite.c /main/7 1998/02/06 14:15:18 kaleb $ */ +/* $Xorg: AuWrite.c,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xau/AuWrite.c,v 1.2 1999/05/09 10:51:34 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/AuWrite.c,v 1.3 2001/01/17 19:42:24 dawes Exp $ */ #include Index: xc/lib/Xau/Autest.c diff -u xc/lib/Xau/Autest.c:1.1.1.2 xc/lib/Xau/Autest.c:1.1.1.3 --- xc/lib/Xau/Autest.c:1.1.1.2 Sun Sep 27 03:52:18 1998 +++ xc/lib/Xau/Autest.c Tue Jan 16 17:14:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: Autest.c /main/5 1998/02/06 14:15:03 kaleb $ */ +/* $Xorg: Autest.c,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ /* Index: xc/lib/Xau/Imakefile diff -u xc/lib/Xau/Imakefile:3.5 xc/lib/Xau/Imakefile:3.6 --- xc/lib/Xau/Imakefile:3.5 Sat Apr 17 05:08:11 1999 +++ xc/lib/Xau/Imakefile Wed Jan 17 14:42:24 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/27 1996/09/28 16:43:28 rws $ -XCOMM $XFree86: xc/lib/Xau/Imakefile,v 3.5 1999/04/17 09:08:11 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/Xau/Imakefile,v 3.6 2001/01/17 19:42:24 dawes Exp $ + #define DoNormalLib NormalLibXau #define DoSharedLib SharedLibXau #define DoExtraLib SharedLibXau Index: xc/lib/Xau/Xauth.h diff -u xc/lib/Xau/Xauth.h:1.3 xc/lib/Xau/Xauth.h:1.4 --- xc/lib/Xau/Xauth.h:1.3 Sun Oct 11 07:23:43 1998 +++ xc/lib/Xau/Xauth.h Wed Jan 17 14:42:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xauth.h /main/19 1998/02/06 14:15:45 kaleb $ */ +/* $Xorg: Xauth.h,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ /* @@ -22,7 +22,7 @@ */ -/* $XFree86: xc/lib/Xau/Xauth.h,v 1.3 1998/10/11 11:23:43 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/Xauth.h,v 1.4 2001/01/17 19:42:24 dawes Exp $ */ #ifndef _Xauth_h #define _Xauth_h Index: xc/lib/Xau/k5encode.c diff -u xc/lib/Xau/k5encode.c:1.1.1.3 xc/lib/Xau/k5encode.c:1.1.1.4 --- xc/lib/Xau/k5encode.c:1.1.1.3 Sun Sep 27 03:52:19 1998 +++ xc/lib/Xau/k5encode.c Tue Jan 16 17:15:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: k5encode.c /main/7 1998/02/06 14:15:31 kaleb $ */ +/* $Xorg: k5encode.c,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ /* Index: xc/lib/Xaw/AllWidgets.c diff -u xc/lib/Xaw/AllWidgets.c:1.1.1.2 xc/lib/Xaw/AllWidgets.c:1.1.1.3 --- xc/lib/Xaw/AllWidgets.c:1.1.1.2 Sun Sep 27 03:49:38 1998 +++ xc/lib/Xaw/AllWidgets.c Tue Jan 16 17:15:09 2001 @@ -1,4 +1,4 @@ -/* $TOG: AllWidgets.c /main/9 1998/02/06 12:43:49 kaleb $ */ +/* $Xorg: AllWidgets.c,v 1.3 2000/08/17 19:45:30 cpqbld Exp $ */ /* Index: xc/lib/Xaw/AllWidgets.h diff -u xc/lib/Xaw/AllWidgets.h:1.1.1.2 xc/lib/Xaw/AllWidgets.h:1.1.1.3 --- xc/lib/Xaw/AllWidgets.h:1.1.1.2 Sun Sep 27 03:49:38 1998 +++ xc/lib/Xaw/AllWidgets.h Tue Jan 16 17:15:10 2001 @@ -1,5 +1,5 @@ /* - * $TOG: AllWidgets.h /main/4 1998/02/06 12:43:57 kaleb $ + * $Xorg: AllWidgets.h,v 1.4 2000/08/17 19:45:30 cpqbld Exp $ * Copyright 1990, 1998 The Open Group @@ -22,6 +22,8 @@ #ifndef _XawAllWidgets_h #define _XawAllWidgets_h + +#include /* * This file matches the generated AllWidgets.c Index: xc/lib/Xaw/AsciiSink.c diff -u xc/lib/Xaw/AsciiSink.c:1.22 xc/lib/Xaw/AsciiSink.c:1.23 --- xc/lib/Xaw/AsciiSink.c:1.22 Tue Sep 26 11:56:53 2000 +++ xc/lib/Xaw/AsciiSink.c Wed Jan 17 14:42:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: AsciiSink.c /main/63 1998/02/06 12:44:08 kaleb $ */ +/* $Xorg: AsciiSink.c,v 1.3 2000/08/17 19:45:30 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/AsciiSink.c,v 1.22 2000/09/26 15:56:53 tsi Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiSink.c,v 1.23 2001/01/17 19:42:24 dawes Exp $ */ #include #include Index: xc/lib/Xaw/AsciiSink.h diff -u xc/lib/Xaw/AsciiSink.h:1.4 xc/lib/Xaw/AsciiSink.h:1.5 --- xc/lib/Xaw/AsciiSink.h:1.4 Sat Oct 3 04:41:59 1998 +++ xc/lib/Xaw/AsciiSink.h Wed Jan 17 14:42:25 2001 @@ -1,5 +1,5 @@ /* - * $TOG: AsciiSink.h /main/10 1998/02/06 12:44:13 kaleb $ + * $Xorg: AsciiSink.h,v 1.3 2000/08/17 19:45:30 cpqbld Exp $ */ /*********************************************************** @@ -44,7 +44,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/AsciiSink.h,v 1.4 1998/10/03 08:41:59 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiSink.h,v 1.5 2001/01/17 19:42:25 dawes Exp $ */ #ifndef _XawAsciiSink_h #define _XawAsciiSink_h Index: xc/lib/Xaw/AsciiSinkP.h diff -u xc/lib/Xaw/AsciiSinkP.h:1.8 xc/lib/Xaw/AsciiSinkP.h:1.9 --- xc/lib/Xaw/AsciiSinkP.h:1.8 Sun Jun 20 04:40:55 1999 +++ xc/lib/Xaw/AsciiSinkP.h Wed Jan 17 14:42:25 2001 @@ -1,5 +1,5 @@ /* -* $TOG: AsciiSinkP.h /main/5 1998/02/06 12:44:02 kaleb $ +* $Xorg: AsciiSinkP.h,v 1.3 2000/08/17 19:45:30 cpqbld Exp $ */ @@ -45,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/AsciiSinkP.h,v 1.8 1999/06/20 08:40:55 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiSinkP.h,v 1.9 2001/01/17 19:42:25 dawes Exp $ */ #ifndef _XawAsciiSinkP_h #define _XawAsciiSinkP_h Index: xc/lib/Xaw/AsciiSrc.c diff -u xc/lib/Xaw/AsciiSrc.c:1.25.2.1 xc/lib/Xaw/AsciiSrc.c:1.27 --- xc/lib/Xaw/AsciiSrc.c:1.25.2.1 Sat Jan 27 15:06:11 2001 +++ xc/lib/Xaw/AsciiSrc.c Fri Jan 26 17:35:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: AsciiSrc.c /main/69 1998/05/14 14:55:34 kaleb $ */ +/* $Xorg: AsciiSrc.c,v 1.3 2000/08/17 19:45:30 cpqbld Exp $ */ /* @@ -22,7 +22,7 @@ */ -/* $XFree86: xc/lib/Xaw/AsciiSrc.c,v 1.25.2.1 2001/01/27 20:06:11 herrb Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiSrc.c,v 1.27 2001/01/26 22:35:23 herrb Exp $ */ /* * AsciiSrc.c - AsciiSrc object. (For use with the text widget). Index: xc/lib/Xaw/AsciiSrc.h diff -u xc/lib/Xaw/AsciiSrc.h:1.6 xc/lib/Xaw/AsciiSrc.h:1.7 --- xc/lib/Xaw/AsciiSrc.h:1.6 Sun May 9 06:51:36 1999 +++ xc/lib/Xaw/AsciiSrc.h Wed Jan 17 14:42:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: AsciiSrc.h /main/17 1998/02/11 14:53:05 kaleb $ */ +/* $Xorg: AsciiSrc.h,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/AsciiSrc.h,v 1.6 1999/05/09 10:51:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiSrc.h,v 1.7 2001/01/17 19:42:25 dawes Exp $ */ /* Index: xc/lib/Xaw/AsciiSrcP.h diff -u xc/lib/Xaw/AsciiSrcP.h:1.7 xc/lib/Xaw/AsciiSrcP.h:1.8 --- xc/lib/Xaw/AsciiSrcP.h:1.7 Sun Jun 20 04:40:57 1999 +++ xc/lib/Xaw/AsciiSrcP.h Wed Jan 17 14:42:25 2001 @@ -1,5 +1,5 @@ /* -* $TOG: AsciiSrcP.h /main/13 1998/06/24 11:53:13 kaleb $ +* $Xorg: AsciiSrcP.h,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ */ @@ -45,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/AsciiSrcP.h,v 1.7 1999/06/20 08:40:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiSrcP.h,v 1.8 2001/01/17 19:42:25 dawes Exp $ */ /* * AsciiSrcP.h - Private Header for Ascii Text Source. Index: xc/lib/Xaw/AsciiText.c diff -u xc/lib/Xaw/AsciiText.c:3.8 xc/lib/Xaw/AsciiText.c:3.9 --- xc/lib/Xaw/AsciiText.c:3.8 Sun Jun 13 09:47:15 1999 +++ xc/lib/Xaw/AsciiText.c Wed Jan 17 14:42:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: AsciiText.c /main/49 1998/02/11 14:53:14 kaleb $ */ +/* $Xorg: AsciiText.c,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ */ /* @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/lib/Xaw/AsciiText.c,v 3.8 1999/06/13 13:47:15 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiText.c,v 3.9 2001/01/17 19:42:25 dawes Exp $ */ /* * AsciiText.c - Source code for AsciiText Widget Index: xc/lib/Xaw/AsciiText.h diff -u xc/lib/Xaw/AsciiText.h:1.4 xc/lib/Xaw/AsciiText.h:1.5 --- xc/lib/Xaw/AsciiText.h:1.4 Sat Oct 3 04:42:01 1998 +++ xc/lib/Xaw/AsciiText.h Wed Jan 17 14:42:25 2001 @@ -1,5 +1,5 @@ /* - * $TOG: AsciiText.h /main/20 1998/02/11 14:53:18 kaleb $ + * $Xorg: AsciiText.h,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ */ /*********************************************************** @@ -44,7 +44,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/AsciiText.h,v 1.4 1998/10/03 08:42:01 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiText.h,v 1.5 2001/01/17 19:42:25 dawes Exp $ */ /* * AsciiText.h - Public header file for AsciiText Widget Index: xc/lib/Xaw/AsciiTextP.h diff -u xc/lib/Xaw/AsciiTextP.h:1.7 xc/lib/Xaw/AsciiTextP.h:1.8 --- xc/lib/Xaw/AsciiTextP.h:1.7 Sun Jun 20 04:40:57 1999 +++ xc/lib/Xaw/AsciiTextP.h Wed Jan 17 14:42:25 2001 @@ -1,5 +1,5 @@ /* - * $TOG: AsciiTextP.h /main/19 1998/02/11 14:53:10 kaleb $ + * $Xorg: AsciiTextP.h,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ */ /*********************************************************** @@ -44,7 +44,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/AsciiTextP.h,v 1.7 1999/06/20 08:40:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiTextP.h,v 1.8 2001/01/17 19:42:25 dawes Exp $ */ /* * AsciiText.c - Private header file for AsciiText Widget. Index: xc/lib/Xaw/Box.c diff -u xc/lib/Xaw/Box.c:1.13 xc/lib/Xaw/Box.c:1.14 --- xc/lib/Xaw/Box.c:1.13 Sun Jun 6 04:47:53 1999 +++ xc/lib/Xaw/Box.c Wed Jan 17 14:42:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: Box.c /main/50 1998/02/06 12:44:59 kaleb $ */ +/* $Xorg: Box.c,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Box.c,v 1.13 1999/06/06 08:47:53 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Box.c,v 1.14 2001/01/17 19:42:25 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Box.h diff -u xc/lib/Xaw/Box.h:1.6 xc/lib/Xaw/Box.h:1.7 --- xc/lib/Xaw/Box.h:1.6 Sun Jun 6 04:47:53 1999 +++ xc/lib/Xaw/Box.h Wed Jan 17 14:42:25 2001 @@ -1,5 +1,5 @@ /* -* $TOG: Box.h /main/23 1998/02/06 12:45:05 kaleb $ +* $Xorg: Box.h,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ */ @@ -45,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Box.h,v 1.6 1999/06/06 08:47:53 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Box.h,v 1.7 2001/01/17 19:42:25 dawes Exp $ */ #ifndef _XawBox_h #define _XawBox_h Index: xc/lib/Xaw/BoxP.h diff -u xc/lib/Xaw/BoxP.h:1.9 xc/lib/Xaw/BoxP.h:1.10 --- xc/lib/Xaw/BoxP.h:1.9 Sun Jun 20 04:40:57 1999 +++ xc/lib/Xaw/BoxP.h Wed Jan 17 14:42:25 2001 @@ -1,5 +1,5 @@ /* -* $TOG: BoxP.h /main/19 1998/02/06 12:44:53 kaleb $ +* $Xorg: BoxP.h,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ */ @@ -45,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/BoxP.h,v 1.9 1999/06/20 08:40:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/BoxP.h,v 1.10 2001/01/17 19:42:25 dawes Exp $ */ #ifndef _XawBoxP_h #define _XawBoxP_h Index: xc/lib/Xaw/Cardinals.h diff -u xc/lib/Xaw/Cardinals.h:1.1.1.2 xc/lib/Xaw/Cardinals.h:1.1.1.3 --- xc/lib/Xaw/Cardinals.h:1.1.1.2 Sun Sep 27 03:49:47 1998 +++ xc/lib/Xaw/Cardinals.h Tue Jan 16 17:15:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: Cardinals.h /main/7 1998/02/06 12:45:10 kaleb $ */ +/* $Xorg: Cardinals.h,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ */ /* Copyright 1985, 1986, 1987, 1998 The Open Group Index: xc/lib/Xaw/Command.c diff -u xc/lib/Xaw/Command.c:1.11 xc/lib/Xaw/Command.c:1.12 --- xc/lib/Xaw/Command.c:1.11 Sun Jun 13 09:47:18 1999 +++ xc/lib/Xaw/Command.c Wed Jan 17 14:42:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: Command.c /main/80 1998/02/06 12:45:20 kaleb $ */ +/* $Xorg: Command.c,v 1.4 2000/08/17 19:45:31 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Command.c,v 1.11 1999/06/13 13:47:18 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Command.c,v 1.12 2001/01/17 19:42:26 dawes Exp $ */ /* * Command.c - Command button widget Index: xc/lib/Xaw/Command.h diff -u xc/lib/Xaw/Command.h:1.4 xc/lib/Xaw/Command.h:1.5 --- xc/lib/Xaw/Command.h:1.4 Sat Oct 3 04:42:03 1998 +++ xc/lib/Xaw/Command.h Wed Jan 17 14:42:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: Command.h /main/30 1998/02/06 12:45:25 kaleb $ */ +/* $Xorg: Command.h,v 1.3 2000/08/17 19:45:32 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Command.h,v 1.4 1998/10/03 08:42:03 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Command.h,v 1.5 2001/01/17 19:42:26 dawes Exp $ */ #ifndef _XawCommand_h #define _XawCommand_h Index: xc/lib/Xaw/CommandP.h diff -u xc/lib/Xaw/CommandP.h:1.6 xc/lib/Xaw/CommandP.h:1.7 --- xc/lib/Xaw/CommandP.h:1.6 Sun Jun 20 04:40:58 1999 +++ xc/lib/Xaw/CommandP.h Wed Jan 17 14:42:26 2001 @@ -1,5 +1,5 @@ /* -* $TOG: CommandP.h /main/28 1998/02/06 12:45:15 kaleb $ +* $Xorg: CommandP.h,v 1.3 2000/08/17 19:45:32 cpqbld Exp $ */ @@ -45,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/CommandP.h,v 1.6 1999/06/20 08:40:58 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/CommandP.h,v 1.7 2001/01/17 19:42:26 dawes Exp $ */ #ifndef _XawCommandP_h #define _XawCommandP_h Index: xc/lib/Xaw/Dialog.c diff -u xc/lib/Xaw/Dialog.c:1.6 xc/lib/Xaw/Dialog.c:1.7 --- xc/lib/Xaw/Dialog.c:1.6 Tue Jun 13 19:15:48 2000 +++ xc/lib/Xaw/Dialog.c Wed Jan 17 14:42:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: Dialog.c /main/49 1998/02/06 12:45:36 kaleb $ */ +/* $Xorg: Dialog.c,v 1.3 2000/08/17 19:45:32 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Dialog.c,v 1.6 2000/06/13 23:15:48 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Dialog.c,v 1.7 2001/01/17 19:42:26 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Dialog.h diff -u xc/lib/Xaw/Dialog.h:1.4 xc/lib/Xaw/Dialog.h:1.5 --- xc/lib/Xaw/Dialog.h:1.4 Sat Oct 3 04:42:04 1998 +++ xc/lib/Xaw/Dialog.h Wed Jan 17 14:42:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: Dialog.h /main/29 1998/02/06 12:45:41 kaleb $ */ +/* $Xorg: Dialog.h,v 1.3 2000/08/17 19:45:32 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Dialog.h,v 1.4 1998/10/03 08:42:04 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Dialog.h,v 1.5 2001/01/17 19:42:26 dawes Exp $ */ #ifndef _XawDialog_h #define _XawDialog_h Index: xc/lib/Xaw/DialogP.h diff -u xc/lib/Xaw/DialogP.h:1.7 xc/lib/Xaw/DialogP.h:1.8 --- xc/lib/Xaw/DialogP.h:1.7 Sun Jun 20 04:40:59 1999 +++ xc/lib/Xaw/DialogP.h Wed Jan 17 14:42:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: DialogP.h /main/14 1998/02/06 12:45:30 kaleb $ */ +/* $Xorg: DialogP.h,v 1.3 2000/08/17 19:45:32 cpqbld Exp $ */ /*********************************************************** @@ -43,7 +43,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/DialogP.h,v 1.7 1999/06/20 08:40:59 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/DialogP.h,v 1.8 2001/01/17 19:42:26 dawes Exp $ */ #ifndef _DialogP_h #define _DialogP_h Index: xc/lib/Xaw/Form.c diff -u xc/lib/Xaw/Form.c:1.18.2.1 xc/lib/Xaw/Form.c:1.20 --- xc/lib/Xaw/Form.c:1.18.2.1 Fri Feb 9 15:45:08 2001 +++ xc/lib/Xaw/Form.c Mon Feb 5 17:38:04 2001 @@ -43,7 +43,7 @@ ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Form.c,v 1.18.2.1 2001/02/09 20:45:08 paulo Exp $ */ +/* $XFree86: xc/lib/Xaw/Form.c,v 1.20 2001/02/05 22:38:04 paulo Exp $ */ #include #include Index: xc/lib/Xaw/Form.h diff -u xc/lib/Xaw/Form.h:1.7 xc/lib/Xaw/Form.h:1.8 --- xc/lib/Xaw/Form.h:1.7 Sun Jun 6 04:47:56 1999 +++ xc/lib/Xaw/Form.h Wed Jan 17 14:42:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: Form.h /main/31 1998/02/06 12:45:58 kaleb $ */ +/* $Xorg: Form.h,v 1.4 2000/08/17 19:45:32 cpqbld Exp $ */ /*********************************************************** @@ -43,12 +43,12 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Form.h,v 1.7 1999/06/06 08:47:56 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Form.h,v 1.8 2001/01/17 19:42:26 dawes Exp $ */ #ifndef _XawForm_h #define _XawForm_h -#include +#include /* Resources: Index: xc/lib/Xaw/FormP.h diff -u xc/lib/Xaw/FormP.h:1.11 xc/lib/Xaw/FormP.h:1.12 --- xc/lib/Xaw/FormP.h:1.11 Sun Jun 20 04:41:00 1999 +++ xc/lib/Xaw/FormP.h Wed Jan 17 14:42:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: FormP.h /main/23 1998/02/06 12:45:46 kaleb $ */ +/* $Xorg: FormP.h,v 1.3 2000/08/17 19:45:33 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/FormP.h,v 1.11 1999/06/20 08:41:00 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/FormP.h,v 1.12 2001/01/17 19:42:26 dawes Exp $ */ /* Form widget private definitions */ Index: xc/lib/Xaw/Grip.c diff -u xc/lib/Xaw/Grip.c:1.6 xc/lib/Xaw/Grip.c:1.7 --- xc/lib/Xaw/Grip.c:1.6 Sun Jun 6 04:47:57 1999 +++ xc/lib/Xaw/Grip.c Wed Jan 17 14:42:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: Grip.c /main/34 1998/02/06 12:46:09 kaleb $ */ +/* $Xorg: Grip.c,v 1.3 2000/08/17 19:45:33 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Grip.c,v 1.6 1999/06/06 08:47:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Grip.c,v 1.7 2001/01/17 19:42:26 dawes Exp $ */ /* * Grip.c - Grip Widget (Used by Paned Widget) Index: xc/lib/Xaw/Grip.h diff -u xc/lib/Xaw/Grip.h:1.5 xc/lib/Xaw/Grip.h:1.6 --- xc/lib/Xaw/Grip.h:1.5 Sun Jun 6 04:47:57 1999 +++ xc/lib/Xaw/Grip.h Wed Jan 17 14:42:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: Grip.h /main/20 1998/02/06 12:46:14 kaleb $ */ +/* $Xorg: Grip.h,v 1.3 2000/08/17 19:45:33 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Grip.h,v 1.5 1999/06/06 08:47:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Grip.h,v 1.6 2001/01/17 19:42:26 dawes Exp $ */ /* * Grip.h - Public Definitions for Grip widget (used by VPane Widget) Index: xc/lib/Xaw/GripP.h diff -u xc/lib/Xaw/GripP.h:1.6 xc/lib/Xaw/GripP.h:1.7 --- xc/lib/Xaw/GripP.h:1.6 Sun Jun 20 04:41:01 1999 +++ xc/lib/Xaw/GripP.h Wed Jan 17 14:42:26 2001 @@ -1,5 +1,5 @@ /* -* $TOG: GripP.h /main/16 1998/02/06 12:46:03 kaleb $ +* $Xorg: GripP.h,v 1.3 2000/08/17 19:45:33 cpqbld Exp $ */ @@ -45,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/GripP.h,v 1.6 1999/06/20 08:41:01 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/GripP.h,v 1.7 2001/01/17 19:42:26 dawes Exp $ */ #ifndef _XawGripP_h #define _XawGripP_h Index: xc/lib/Xaw/Imakefile diff -u xc/lib/Xaw/Imakefile:1.9 xc/lib/Xaw/Imakefile:1.10 --- xc/lib/Xaw/Imakefile:1.9 Thu May 18 12:29:52 2000 +++ xc/lib/Xaw/Imakefile Wed Jan 17 14:42:27 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/87 1996/09/28 16:43:34 rws $ -XCOMM $XFree86: xc/lib/Xaw/Imakefile,v 1.9 2000/05/18 16:29:52 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:45:33 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/Xaw/Imakefile,v 1.10 2001/01/17 19:42:27 dawes Exp $ + #define DoNormalLib NormalLibXaw #define DoSharedLib SharedLibXaw #define DoExtraLib SharedLibXaw Index: xc/lib/Xaw/Label.c diff -u xc/lib/Xaw/Label.c:1.11 xc/lib/Xaw/Label.c:1.12 --- xc/lib/Xaw/Label.c:1.11 Sun Jun 27 10:07:33 1999 +++ xc/lib/Xaw/Label.c Wed Jan 17 14:42:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: Label.c /main/98 1998/02/06 12:46:24 kaleb $ */ +/* $Xorg: Label.c,v 1.4 2000/08/17 19:45:33 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Label.c,v 1.11 1999/06/27 14:07:33 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Label.c,v 1.12 2001/01/17 19:42:27 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Label.h diff -u xc/lib/Xaw/Label.h:1.5 xc/lib/Xaw/Label.h:1.6 --- xc/lib/Xaw/Label.h:1.5 Sat Oct 3 04:42:06 1998 +++ xc/lib/Xaw/Label.h Wed Jan 17 14:42:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: Label.h /main/35 1998/02/06 12:46:30 kaleb $ */ +/* $Xorg: Label.h,v 1.3 2000/08/17 19:45:33 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Label.h,v 1.5 1998/10/03 08:42:06 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Label.h,v 1.6 2001/01/17 19:42:27 dawes Exp $ */ #ifndef _XawLabel_h #define _XawLabel_h Index: xc/lib/Xaw/LabelP.h diff -u xc/lib/Xaw/LabelP.h:1.6 xc/lib/Xaw/LabelP.h:1.7 --- xc/lib/Xaw/LabelP.h:1.6 Sun Jun 20 04:41:02 1999 +++ xc/lib/Xaw/LabelP.h Wed Jan 17 14:42:27 2001 @@ -1,5 +1,5 @@ /* -* $TOG: LabelP.h /main/30 1998/02/06 12:46:19 kaleb $ +* $Xorg: LabelP.h,v 1.3 2000/08/17 19:45:33 cpqbld Exp $ */ @@ -45,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/LabelP.h,v 1.6 1999/06/20 08:41:02 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/LabelP.h,v 1.7 2001/01/17 19:42:27 dawes Exp $ */ #ifndef _XawLabelP_h #define _XawLabelP_h Index: xc/lib/Xaw/List.c diff -u xc/lib/Xaw/List.c:1.15 xc/lib/Xaw/List.c:1.16 --- xc/lib/Xaw/List.c:1.15 Tue Apr 4 18:36:42 2000 +++ xc/lib/Xaw/List.c Wed Jan 17 14:42:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: List.c /main/38 1998/02/11 14:53:23 kaleb $ */ +/* $Xorg: List.c,v 1.3 2000/08/17 19:45:33 cpqbld Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group @@ -19,7 +19,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/List.c,v 1.15 2000/04/04 22:36:42 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/List.c,v 1.16 2001/01/17 19:42:27 dawes Exp $ */ /* * List.c - List widget Index: xc/lib/Xaw/List.h diff -u xc/lib/Xaw/List.h:1.6 xc/lib/Xaw/List.h:1.7 --- xc/lib/Xaw/List.h:1.6 Fri Feb 25 13:27:58 2000 +++ xc/lib/Xaw/List.h Wed Jan 17 14:42:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: List.h /main/21 1998/02/11 14:53:28 kaleb $ */ +/* $Xorg: List.h,v 1.3 2000/08/17 19:45:34 cpqbld Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group @@ -19,7 +19,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/List.h,v 1.6 2000/02/25 18:27:58 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/List.h,v 1.7 2001/01/17 19:42:27 dawes Exp $ */ /* This is the List widget, it is useful to display a list, without the * overhead of having a widget for each item in the list. It allows Index: xc/lib/Xaw/ListP.h diff -u xc/lib/Xaw/ListP.h:1.7 xc/lib/Xaw/ListP.h:1.8 --- xc/lib/Xaw/ListP.h:1.7 Fri Feb 25 13:27:58 2000 +++ xc/lib/Xaw/ListP.h Wed Jan 17 14:42:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: ListP.h /main/13 1998/02/06 12:46:36 kaleb $ */ +/* $Xorg: ListP.h,v 1.3 2000/08/17 19:45:34 cpqbld Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group @@ -19,7 +19,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/ListP.h,v 1.7 2000/02/25 18:27:58 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/ListP.h,v 1.8 2001/01/17 19:42:27 dawes Exp $ */ /* Index: xc/lib/Xaw/MenuButtoP.h diff -u xc/lib/Xaw/MenuButtoP.h:1.6 xc/lib/Xaw/MenuButtoP.h:1.7 --- xc/lib/Xaw/MenuButtoP.h:1.6 Sun Jun 20 04:41:02 1999 +++ xc/lib/Xaw/MenuButtoP.h Wed Jan 17 14:42:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: MenuButtoP.h /main/10 1998/02/11 14:53:41 kaleb $ +/* $Xorg: MenuButtoP.h,v 1.3 2000/08/17 19:45:34 cpqbld Exp $ * Copyright 1989,1998 The Open Group @@ -18,7 +18,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/MenuButtoP.h,v 1.6 1999/06/20 08:41:02 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/MenuButtoP.h,v 1.7 2001/01/17 19:42:27 dawes Exp $ */ /* * MenuButtonP.h - Private Header file for MenuButton widget. Index: xc/lib/Xaw/MenuButton.c diff -u xc/lib/Xaw/MenuButton.c:3.7 xc/lib/Xaw/MenuButton.c:3.8 --- xc/lib/Xaw/MenuButton.c:3.7 Sun Jun 6 04:47:59 1999 +++ xc/lib/Xaw/MenuButton.c Wed Jan 17 14:42:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: MenuButton.c /main/24 1998/06/24 11:53:20 kaleb $ */ +/* $Xorg: MenuButton.c,v 1.3 2000/08/17 19:45:34 cpqbld Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group @@ -21,7 +21,7 @@ * */ -/* $XFree86: xc/lib/Xaw/MenuButton.c,v 3.7 1999/06/06 08:47:59 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/MenuButton.c,v 3.8 2001/01/17 19:42:27 dawes Exp $ */ /* * MenuButton.c - Source code for MenuButton widget. Index: xc/lib/Xaw/MenuButton.h diff -u xc/lib/Xaw/MenuButton.h:1.4 xc/lib/Xaw/MenuButton.h:1.5 --- xc/lib/Xaw/MenuButton.h:1.4 Sat Oct 3 04:42:08 1998 +++ xc/lib/Xaw/MenuButton.h Wed Jan 17 14:42:27 2001 @@ -1,5 +1,5 @@ /* - * $TOG: MenuButton.h /main/11 1998/02/11 14:53:37 kaleb $ + * $Xorg: MenuButton.h,v 1.3 2000/08/17 19:45:34 cpqbld Exp $ * Copyright 1989, 1994, 1998 The Open Group @@ -19,7 +19,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/MenuButton.h,v 1.4 1998/10/03 08:42:08 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/MenuButton.h,v 1.5 2001/01/17 19:42:27 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xaw/MultiSink.c diff -u xc/lib/Xaw/MultiSink.c:1.18 xc/lib/Xaw/MultiSink.c:1.19 --- xc/lib/Xaw/MultiSink.c:1.18 Tue Sep 26 11:56:54 2000 +++ xc/lib/Xaw/MultiSink.c Wed Jan 17 14:42:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: MultiSink.c /main/7 1998/02/06 12:47:13 kaleb $ */ +/* $Xorg: MultiSink.c,v 1.3 2000/08/17 19:45:34 cpqbld Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -66,7 +66,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/MultiSink.c,v 1.18 2000/09/26 15:56:54 tsi Exp $ */ +/* $XFree86: xc/lib/Xaw/MultiSink.c,v 1.19 2001/01/17 19:42:27 dawes Exp $ */ #include #include Index: xc/lib/Xaw/MultiSink.h diff -u xc/lib/Xaw/MultiSink.h:1.4 xc/lib/Xaw/MultiSink.h:1.5 --- xc/lib/Xaw/MultiSink.h:1.4 Sat Oct 3 04:42:09 1998 +++ xc/lib/Xaw/MultiSink.h Wed Jan 17 14:42:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: MultiSink.h /main/3 1998/02/06 12:47:18 kaleb $ */ +/* $Xorg: MultiSink.h,v 1.3 2000/08/17 19:45:34 cpqbld Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -66,7 +66,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/MultiSink.h,v 1.4 1998/10/03 08:42:09 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/MultiSink.h,v 1.5 2001/01/17 19:42:27 dawes Exp $ */ #ifndef _XawMultiSink_h #define _XawMultiSink_h Index: xc/lib/Xaw/MultiSinkP.h diff -u xc/lib/Xaw/MultiSinkP.h:1.7 xc/lib/Xaw/MultiSinkP.h:1.8 --- xc/lib/Xaw/MultiSinkP.h:1.7 Sun Jun 20 04:41:02 1999 +++ xc/lib/Xaw/MultiSinkP.h Wed Jan 17 14:42:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: MultiSinkP.h /main/3 1998/02/06 12:47:08 kaleb $ */ +/* $Xorg: MultiSinkP.h,v 1.3 2000/08/17 19:45:35 cpqbld Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -67,7 +67,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/MultiSinkP.h,v 1.7 1999/06/20 08:41:02 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/MultiSinkP.h,v 1.8 2001/01/17 19:42:28 dawes Exp $ */ #ifndef _XawMultiSinkP_h #define _XawMultiSinkP_h Index: xc/lib/Xaw/MultiSrc.c diff -u xc/lib/Xaw/MultiSrc.c:1.19.2.1 xc/lib/Xaw/MultiSrc.c:1.21 --- xc/lib/Xaw/MultiSrc.c:1.19.2.1 Sat Jan 27 15:06:56 2001 +++ xc/lib/Xaw/MultiSrc.c Fri Jan 26 17:45:59 2001 @@ -1,4 +1,4 @@ -/* $TOG: MultiSrc.c /main/12 1998/05/14 14:55:50 kaleb $ */ +/* $Xorg: MultiSrc.c,v 1.3 2000/08/17 19:45:35 cpqbld Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -27,7 +27,7 @@ * * Much code taken from X11R3 String and Disk Sources. */ -/* $XFree86: xc/lib/Xaw/MultiSrc.c,v 1.19.2.1 2001/01/27 20:06:56 herrb Exp $ */ +/* $XFree86: xc/lib/Xaw/MultiSrc.c,v 1.21 2001/01/26 22:45:59 herrb Exp $ */ /* Index: xc/lib/Xaw/MultiSrc.h diff -u xc/lib/Xaw/MultiSrc.h:1.5 xc/lib/Xaw/MultiSrc.h:1.6 --- xc/lib/Xaw/MultiSrc.h:1.5 Sun May 9 06:51:39 1999 +++ xc/lib/Xaw/MultiSrc.h Wed Jan 17 14:42:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: MultiSrc.h /main/3 1998/02/06 12:47:36 kaleb $ */ +/* $Xorg: MultiSrc.h,v 1.3 2000/08/17 19:45:35 cpqbld Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -45,7 +45,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/MultiSrc.h,v 1.5 1999/05/09 10:51:39 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/MultiSrc.h,v 1.6 2001/01/17 19:42:28 dawes Exp $ */ /* * This file was modified from AsciiSrc.h. Index: xc/lib/Xaw/MultiSrcP.h diff -u xc/lib/Xaw/MultiSrcP.h:1.7 xc/lib/Xaw/MultiSrcP.h:1.8 --- xc/lib/Xaw/MultiSrcP.h:1.7 Sun Jun 20 04:41:03 1999 +++ xc/lib/Xaw/MultiSrcP.h Wed Jan 17 14:42:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: MultiSrcP.h /main/5 1998/06/24 11:53:25 kaleb $ */ +/* $Xorg: MultiSrcP.h,v 1.3 2000/08/17 19:45:35 cpqbld Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -67,7 +67,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/MultiSrcP.h,v 1.7 1999/06/20 08:41:03 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/MultiSrcP.h,v 1.8 2001/01/17 19:42:28 dawes Exp $ */ /* * MultiSrcP.h - Private Header for Multi Text Source. Index: xc/lib/Xaw/Paned.c diff -u xc/lib/Xaw/Paned.c:1.9 xc/lib/Xaw/Paned.c:1.10 --- xc/lib/Xaw/Paned.c:1.9 Sun Jun 6 04:48:01 1999 +++ xc/lib/Xaw/Paned.c Wed Jan 17 14:42:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: Paned.c /main/29 1998/02/11 14:53:59 kaleb $ */ +/* $Xorg: Paned.c,v 1.3 2000/08/17 19:45:35 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Paned.c,v 1.9 1999/06/06 08:48:01 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Paned.c,v 1.10 2001/01/17 19:42:28 dawes Exp $ */ /* * Updated and significantly modified from the Athena VPaned Widget. Index: xc/lib/Xaw/Paned.h diff -u xc/lib/Xaw/Paned.h:1.5 xc/lib/Xaw/Paned.h:1.6 --- xc/lib/Xaw/Paned.h:1.5 Mon May 3 08:15:42 1999 +++ xc/lib/Xaw/Paned.h Wed Jan 17 14:42:28 2001 @@ -1,5 +1,5 @@ /* -* $TOG: Paned.h /main/17 1998/02/11 14:54:05 kaleb $ +* $Xorg: Paned.h,v 1.4 2000/08/17 19:45:35 cpqbld Exp $ */ @@ -45,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Paned.h,v 1.5 1999/05/03 12:15:42 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Paned.h,v 1.6 2001/01/17 19:42:28 dawes Exp $ */ /* * Paned.h - Paned Composite Widget's public header file. @@ -62,7 +62,7 @@ #ifndef _XawPaned_h #define _XawPaned_h -#include +#include #include /* RESOURCES: Index: xc/lib/Xaw/PanedP.h diff -u xc/lib/Xaw/PanedP.h:1.6 xc/lib/Xaw/PanedP.h:1.7 --- xc/lib/Xaw/PanedP.h:1.6 Sun Jun 20 04:41:04 1999 +++ xc/lib/Xaw/PanedP.h Wed Jan 17 14:42:28 2001 @@ -1,6 +1,6 @@ /*********************************************************** - $TOG: PanedP.h /main/8 1998/02/11 14:53:55 kaleb $ + $Xorg: PanedP.h,v 1.3 2000/08/17 19:45:35 cpqbld Exp $ Copyright 1987, 1988, 1998 The Open Group @@ -43,7 +43,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/PanedP.h,v 1.6 1999/06/20 08:41:04 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/PanedP.h,v 1.7 2001/01/17 19:42:28 dawes Exp $ */ /* * Updated and significantly modified from the Athena VPaned Widget. Index: xc/lib/Xaw/Panner.c diff -u xc/lib/Xaw/Panner.c:3.5 xc/lib/Xaw/Panner.c:3.6 --- xc/lib/Xaw/Panner.c:3.5 Sun Jun 6 04:48:02 1999 +++ xc/lib/Xaw/Panner.c Wed Jan 17 14:42:28 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Panner.c /main/54 1998/02/11 14:54:13 kaleb $ + * $Xorg: Panner.c,v 1.3 2000/08/17 19:45:36 cpqbld Exp $ * Copyright 1989, 1994, 1998 The Open Group @@ -22,7 +22,7 @@ * Author: Jim Fulton, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/Panner.c,v 3.5 1999/06/06 08:48:02 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Panner.c,v 3.6 2001/01/17 19:42:28 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Panner.h diff -u xc/lib/Xaw/Panner.h:1.4 xc/lib/Xaw/Panner.h:1.5 --- xc/lib/Xaw/Panner.h:1.4 Sat Oct 3 04:42:14 1998 +++ xc/lib/Xaw/Panner.h Wed Jan 17 14:42:28 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Panner.h /main/24 1998/02/11 14:54:19 kaleb $ + * $Xorg: Panner.h,v 1.4 2000/08/17 19:45:36 cpqbld Exp $ * Copyright 1989, 1998 The Open Group @@ -21,11 +21,12 @@ * * Author: Jim Fulton, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/Panner.h,v 1.4 1998/10/03 08:42:14 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Panner.h,v 1.5 2001/01/17 19:42:28 dawes Exp $ */ #ifndef _XawPanner_h #define _XawPanner_h +#include #include /***************************************************************************** Index: xc/lib/Xaw/PannerP.h diff -u xc/lib/Xaw/PannerP.h:1.6 xc/lib/Xaw/PannerP.h:1.7 --- xc/lib/Xaw/PannerP.h:1.6 Sun Jun 20 04:41:04 1999 +++ xc/lib/Xaw/PannerP.h Wed Jan 17 14:42:29 2001 @@ -1,5 +1,5 @@ /* - * $TOG: PannerP.h /main/21 1998/02/11 14:54:09 kaleb $ + * $Xorg: PannerP.h,v 1.3 2000/08/17 19:45:36 cpqbld Exp $ * Copyright 1989, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Jim Fulton, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/PannerP.h,v 1.6 1999/06/20 08:41:04 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/PannerP.h,v 1.7 2001/01/17 19:42:29 dawes Exp $ */ #ifndef _XawPannerP_h #define _XawPannerP_h Index: xc/lib/Xaw/Pixmap.c diff -u xc/lib/Xaw/Pixmap.c:3.15.2.1 xc/lib/Xaw/Pixmap.c:3.16 --- xc/lib/Xaw/Pixmap.c:3.15.2.1 Fri Feb 9 15:45:09 2001 +++ xc/lib/Xaw/Pixmap.c Tue Jan 30 10:03:34 2001 @@ -25,7 +25,7 @@ * XFree86 Project. */ -/* $XFree86: xc/lib/Xaw/Pixmap.c,v 3.15.2.1 2001/02/09 20:45:09 paulo Exp $ */ +/* $XFree86: xc/lib/Xaw/Pixmap.c,v 3.16 2001/01/30 15:03:34 paulo Exp $ */ #include #include Index: xc/lib/Xaw/Porthole.c diff -u xc/lib/Xaw/Porthole.c:1.5 xc/lib/Xaw/Porthole.c:1.6 --- xc/lib/Xaw/Porthole.c:1.5 Sun Jun 6 04:48:06 1999 +++ xc/lib/Xaw/Porthole.c Wed Jan 17 14:42:29 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Porthole.c /main/18 1998/02/11 14:54:27 kaleb $ + * $Xorg: Porthole.c,v 1.3 2000/08/17 19:45:36 cpqbld Exp $ * Copyright 1990, 1994, 1998 The Open Group @@ -24,7 +24,7 @@ * This widget is a trivial clipping widget. It is typically used with a * panner or scrollbar to navigate. */ -/* $XFree86: xc/lib/Xaw/Porthole.c,v 1.5 1999/06/06 08:48:06 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Porthole.c,v 1.6 2001/01/17 19:42:29 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Porthole.h diff -u xc/lib/Xaw/Porthole.h:1.4 xc/lib/Xaw/Porthole.h:1.5 --- xc/lib/Xaw/Porthole.h:1.4 Sat Oct 3 04:42:15 1998 +++ xc/lib/Xaw/Porthole.h Wed Jan 17 14:42:29 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Porthole.h /main/4 1998/02/11 14:54:31 kaleb $ + * $Xorg: Porthole.h,v 1.4 2000/08/17 19:45:36 cpqbld Exp $ * Copyright 1990, 1998 The Open Group @@ -21,11 +21,12 @@ * * Author: Jim Fulton, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/Porthole.h,v 1.4 1998/10/03 08:42:15 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Porthole.h,v 1.5 2001/01/17 19:42:29 dawes Exp $ */ #ifndef _XawPorthole_h #define _XawPorthole_h +#include #include /***************************************************************************** Index: xc/lib/Xaw/PortholeP.h diff -u xc/lib/Xaw/PortholeP.h:1.6 xc/lib/Xaw/PortholeP.h:1.7 --- xc/lib/Xaw/PortholeP.h:1.6 Sun Jun 20 04:41:04 1999 +++ xc/lib/Xaw/PortholeP.h Wed Jan 17 14:42:29 2001 @@ -1,5 +1,5 @@ /* - * $TOG: PortholeP.h /main/5 1998/02/11 14:54:23 kaleb $ + * $Xorg: PortholeP.h,v 1.3 2000/08/17 19:45:36 cpqbld Exp $ * Copyright 1990, 1994, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Jim Fulton, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/PortholeP.h,v 1.6 1999/06/20 08:41:04 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/PortholeP.h,v 1.7 2001/01/17 19:42:29 dawes Exp $ */ #ifndef _XawPortholeP_h #define _XawPortholeP_h Index: xc/lib/Xaw/Repeater.c diff -u xc/lib/Xaw/Repeater.c:1.5 xc/lib/Xaw/Repeater.c:1.6 --- xc/lib/Xaw/Repeater.c:1.5 Sun Jun 6 04:48:07 1999 +++ xc/lib/Xaw/Repeater.c Wed Jan 17 14:42:29 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Repeater.c /main/13 1998/02/11 14:54:39 kaleb $ + * $Xorg: Repeater.c,v 1.3 2000/08/17 19:45:36 cpqbld Exp $ * Copyright 1990, 1994, 1998 The Open Group @@ -23,7 +23,7 @@ * * This widget is used for press-and-hold style buttons. */ -/* $XFree86: xc/lib/Xaw/Repeater.c,v 1.5 1999/06/06 08:48:07 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Repeater.c,v 1.6 2001/01/17 19:42:29 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Repeater.h diff -u xc/lib/Xaw/Repeater.h:1.4 xc/lib/Xaw/Repeater.h:1.5 --- xc/lib/Xaw/Repeater.h:1.4 Sat Oct 3 04:42:16 1998 +++ xc/lib/Xaw/Repeater.h Wed Jan 17 14:42:29 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Repeater.h /main/6 1998/02/11 14:54:43 kaleb $ + * $Xorg: Repeater.h,v 1.3 2000/08/17 19:45:36 cpqbld Exp $ * Copyright 1989, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Jim Fulton, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/Repeater.h,v 1.4 1998/10/03 08:42:16 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Repeater.h,v 1.5 2001/01/17 19:42:29 dawes Exp $ */ #ifndef _XawRepeater_h #define _XawRepeater_h Index: xc/lib/Xaw/RepeaterP.h diff -u xc/lib/Xaw/RepeaterP.h:1.6 xc/lib/Xaw/RepeaterP.h:1.7 --- xc/lib/Xaw/RepeaterP.h:1.6 Sun Jun 20 04:41:05 1999 +++ xc/lib/Xaw/RepeaterP.h Wed Jan 17 14:42:29 2001 @@ -1,5 +1,5 @@ /* - * $TOG: RepeaterP.h /main/6 1998/02/11 14:54:35 kaleb $ + * $Xorg: RepeaterP.h,v 1.3 2000/08/17 19:45:36 cpqbld Exp $ * Copyright 1989, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Jim Fulton, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/RepeaterP.h,v 1.6 1999/06/20 08:41:05 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/RepeaterP.h,v 1.7 2001/01/17 19:42:29 dawes Exp $ */ #ifndef _XawRepeaterP_h #define _XawRepeaterP_h Index: xc/lib/Xaw/Reports.h diff -u xc/lib/Xaw/Reports.h:1.1.1.2 xc/lib/Xaw/Reports.h:1.1.1.3 --- xc/lib/Xaw/Reports.h:1.1.1.2 Sun Sep 27 03:50:09 1998 +++ xc/lib/Xaw/Reports.h Tue Jan 16 17:17:10 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Reports.h /main/5 1998/02/06 12:48:45 kaleb $ + * $Xorg: Reports.h,v 1.4 2000/08/17 19:45:36 cpqbld Exp $ * Copyright 1990, 1998 The Open Group @@ -22,6 +22,8 @@ #ifndef _Xaw_Reports_h #define _Xaw_Reports_h + +#include /* * XawPannerReport - this structure is used by the reportCallback of the Index: xc/lib/Xaw/Scrollbar.c diff -u xc/lib/Xaw/Scrollbar.c:1.11 xc/lib/Xaw/Scrollbar.c:1.12 --- xc/lib/Xaw/Scrollbar.c:1.11 Tue Sep 26 11:56:54 2000 +++ xc/lib/Xaw/Scrollbar.c Wed Jan 17 14:42:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: Scrollbar.c /main/73 1998/02/06 12:48:56 kaleb $ */ +/* $Xorg: Scrollbar.c,v 1.3 2000/08/17 19:45:36 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Scrollbar.c,v 1.11 2000/09/26 15:56:54 tsi Exp $ */ +/* $XFree86: xc/lib/Xaw/Scrollbar.c,v 1.12 2001/01/17 19:42:29 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Scrollbar.h diff -u xc/lib/Xaw/Scrollbar.h:1.5 xc/lib/Xaw/Scrollbar.h:1.6 --- xc/lib/Xaw/Scrollbar.h:1.5 Mon May 3 08:15:42 1999 +++ xc/lib/Xaw/Scrollbar.h Wed Jan 17 14:42:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: Scrollbar.h /main/9 1998/02/06 12:49:02 kaleb $ */ +/* $Xorg: Scrollbar.h,v 1.3 2000/08/17 19:45:37 cpqbld Exp $ */ /*********************************************************** @@ -43,7 +43,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Scrollbar.h,v 1.5 1999/05/03 12:15:42 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Scrollbar.h,v 1.6 2001/01/17 19:42:29 dawes Exp $ */ #ifndef _Scrollbar_h #define _Scrollbar_h Index: xc/lib/Xaw/ScrollbarP.h diff -u xc/lib/Xaw/ScrollbarP.h:1.6 xc/lib/Xaw/ScrollbarP.h:1.7 --- xc/lib/Xaw/ScrollbarP.h:1.6 Sun Jun 20 04:41:05 1999 +++ xc/lib/Xaw/ScrollbarP.h Wed Jan 17 14:42:29 2001 @@ -1,5 +1,5 @@ /* - * $TOG: ScrollbarP.h /main/4 1998/02/06 12:48:51 kaleb $ + * $Xorg: ScrollbarP.h,v 1.3 2000/08/17 19:45:37 cpqbld Exp $ */ @@ -45,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/ScrollbarP.h,v 1.6 1999/06/20 08:41:05 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/ScrollbarP.h,v 1.7 2001/01/17 19:42:29 dawes Exp $ */ #ifndef _ScrollbarP_h #define _ScrollbarP_h Index: xc/lib/Xaw/Simple.c diff -u xc/lib/Xaw/Simple.c:1.14 xc/lib/Xaw/Simple.c:1.15 --- xc/lib/Xaw/Simple.c:1.14 Sun Jun 27 10:07:34 1999 +++ xc/lib/Xaw/Simple.c Wed Jan 17 14:42:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: Simple.c /main/38 1998/06/24 11:53:29 kaleb $ */ +/* $Xorg: Simple.c,v 1.3 2000/08/17 19:45:37 cpqbld Exp $ */ /*********************************************************** @@ -43,7 +43,7 @@ ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Simple.c,v 1.14 1999/06/27 14:07:34 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Simple.c,v 1.15 2001/01/17 19:42:29 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Simple.h diff -u xc/lib/Xaw/Simple.h:1.7 xc/lib/Xaw/Simple.h:1.8 --- xc/lib/Xaw/Simple.h:1.7 Sun Jun 27 10:07:34 1999 +++ xc/lib/Xaw/Simple.h Wed Jan 17 14:42:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: Simple.h /main/15 1998/02/06 12:49:39 kaleb $ */ +/* $Xorg: Simple.h,v 1.3 2000/08/17 19:45:37 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Simple.h,v 1.7 1999/06/27 14:07:34 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Simple.h,v 1.8 2001/01/17 19:42:30 dawes Exp $ */ #ifndef _Simple_h #define _Simple_h Index: xc/lib/Xaw/SimpleMenP.h diff -u xc/lib/Xaw/SimpleMenP.h:1.11 xc/lib/Xaw/SimpleMenP.h:1.12 --- xc/lib/Xaw/SimpleMenP.h:1.11 Sun Jun 20 04:41:05 1999 +++ xc/lib/Xaw/SimpleMenP.h Wed Jan 17 14:42:30 2001 @@ -1,5 +1,5 @@ /* - * $TOG: SimpleMenP.h /main/16 1998/02/11 14:54:47 kaleb $ + * $Xorg: SimpleMenP.h,v 1.3 2000/08/17 19:45:37 cpqbld Exp $ * Copyright 1989, 1994, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. * */ -/* $XFree86: xc/lib/Xaw/SimpleMenP.h,v 1.11 1999/06/20 08:41:05 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SimpleMenP.h,v 1.12 2001/01/17 19:42:30 dawes Exp $ */ /* * SimpleMenuP.h - Private Header file for SimpleMenu widget. Index: xc/lib/Xaw/SimpleMenu.c diff -u xc/lib/Xaw/SimpleMenu.c:3.19 xc/lib/Xaw/SimpleMenu.c:3.21 --- xc/lib/Xaw/SimpleMenu.c:3.19 Sun Jul 11 04:49:14 1999 +++ xc/lib/Xaw/SimpleMenu.c Fri Mar 23 18:59:15 2001 @@ -1,4 +1,4 @@ -/* $TOG: SimpleMenu.c /main/47 1998/06/24 11:53:33 kaleb $ */ +/* $Xorg: SimpleMenu.c,v 1.3 2000/08/17 19:45:37 cpqbld Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/SimpleMenu.c,v 3.19 1999/07/11 08:49:14 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SimpleMenu.c,v 3.21 2001/03/23 23:59:15 paulo Exp $ */ /* * SimpleMenu.c - Source code file for SimpleMenu widget. @@ -590,16 +590,17 @@ XDefineCursor(XtDisplay(cnew), XtWindow(cnew), smw_new->simple_menu.cursor); - if (smw_old->simple_menu.label_string !=smw_new->simple_menu.label_string) - if (smw_new->simple_menu.label_string == NULL) /* Destroy */ - XtDestroyWidget((Widget)smw_old->simple_menu.label); - else if (smw_old->simple_menu.label_string == NULL) /* Create */ - CreateLabel(cnew); - else { /* Change */ - Arg arglist[1]; + if (smw_old->simple_menu.label_string !=smw_new->simple_menu.label_string) { + if (smw_new->simple_menu.label_string == NULL) /* Destroy */ + XtDestroyWidget((Widget)smw_old->simple_menu.label); + else if (smw_old->simple_menu.label_string == NULL) /* Create */ + CreateLabel(cnew); + else { /* Change */ + Arg arglist[1]; - XtSetArg(arglist[0], XtNlabel, smw_new->simple_menu.label_string); - XtSetValues((Widget)smw_new->simple_menu.label, arglist, ONE); + XtSetArg(arglist[0], XtNlabel, smw_new->simple_menu.label_string); + XtSetValues((Widget)smw_new->simple_menu.label, arglist, ONE); + } } if (smw_old->simple_menu.label_class != smw_new->simple_menu.label_class) @@ -1717,6 +1718,17 @@ Popdown(Widget w, XEvent *event, String *params, Cardinal *num_params) { SimpleMenuWidget smw = (SimpleMenuWidget)w; + + while (XtParent(w) && + XtIsSubclass(XtParent(w), simpleMenuWidgetClass)) { + if (((SimpleMenuWidget)XtParent(w))->simple_menu.sub_menu == (Widget)w) { + w = XtParent(w); + smw = (SimpleMenuWidget)w; + smw->simple_menu.entry_set = NULL; + } + else + break; + } smw->simple_menu.state |= SMW_UNMAPPING; if (smw->simple_menu.sub_menu) Index: xc/lib/Xaw/SimpleMenu.h diff -u xc/lib/Xaw/SimpleMenu.h:1.6 xc/lib/Xaw/SimpleMenu.h:1.7 --- xc/lib/Xaw/SimpleMenu.h:1.6 Sun Jun 13 09:47:21 1999 +++ xc/lib/Xaw/SimpleMenu.h Wed Jan 17 14:42:30 2001 @@ -1,5 +1,5 @@ /* - * $TOG: SimpleMenu.h /main/24 1998/02/11 14:54:57 kaleb $ + * $Xorg: SimpleMenu.h,v 1.3 2000/08/17 19:45:37 cpqbld Exp $ * Copyright 1989, 1994, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Chris D. Peterson, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/SimpleMenu.h,v 1.6 1999/06/13 13:47:21 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SimpleMenu.h,v 1.7 2001/01/17 19:42:30 dawes Exp $ */ /* * SimpleMenu.h - Public Header file for SimpleMenu widget. Index: xc/lib/Xaw/SimpleP.h diff -u xc/lib/Xaw/SimpleP.h:1.10 xc/lib/Xaw/SimpleP.h:1.11 --- xc/lib/Xaw/SimpleP.h:1.10 Sun Jun 27 10:07:34 1999 +++ xc/lib/Xaw/SimpleP.h Wed Jan 17 14:42:30 2001 @@ -1,6 +1,6 @@ /*********************************************************** - $TOG: SimpleP.h /main/13 1998/02/06 12:49:30 kaleb $ + $Xorg: SimpleP.h,v 1.3 2000/08/17 19:45:38 cpqbld Exp $ Copyright 1987, 1988, 1994, 1998 The Open Group @@ -43,7 +43,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/SimpleP.h,v 1.10 1999/06/27 14:07:34 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SimpleP.h,v 1.11 2001/01/17 19:42:30 dawes Exp $ */ #ifndef _SimpleP_h #define _SimpleP_h Index: xc/lib/Xaw/Sme.c diff -u xc/lib/Xaw/Sme.c:1.5 xc/lib/Xaw/Sme.c:1.6 --- xc/lib/Xaw/Sme.c:1.5 Sun Jun 6 04:48:10 1999 +++ xc/lib/Xaw/Sme.c Wed Jan 17 14:42:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: Sme.c /main/14 1998/02/11 14:55:31 kaleb $ */ +/* $Xorg: Sme.c,v 1.3 2000/08/17 19:45:38 cpqbld Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group @@ -19,7 +19,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/Sme.c,v 1.5 1999/06/06 08:48:10 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Sme.c,v 1.6 2001/01/17 19:42:31 dawes Exp $ */ /* * Date: September 26, 1989 Index: xc/lib/Xaw/Sme.h diff -u xc/lib/Xaw/Sme.h:1.4 xc/lib/Xaw/Sme.h:1.5 --- xc/lib/Xaw/Sme.h:1.4 Sat Oct 3 04:42:20 1998 +++ xc/lib/Xaw/Sme.h Wed Jan 17 14:42:31 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Sme.h /main/8 1998/02/11 14:55:35 kaleb $ + * $Xorg: Sme.h,v 1.4 2000/08/17 19:45:38 cpqbld Exp $ * Copyright 1989, 1994, 1998 The Open Group @@ -19,7 +19,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/Sme.h,v 1.4 1998/10/03 08:42:20 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Sme.h,v 1.5 2001/01/17 19:42:31 dawes Exp $ */ /* * This is the public header file for the Athena Sme object. @@ -35,6 +35,7 @@ #ifndef _Sme_h #define _Sme_h +#include #include /* Resources: Index: xc/lib/Xaw/SmeBSB.c diff -u xc/lib/Xaw/SmeBSB.c:1.10 xc/lib/Xaw/SmeBSB.c:1.11 --- xc/lib/Xaw/SmeBSB.c:1.10 Sun Jun 6 04:48:11 1999 +++ xc/lib/Xaw/SmeBSB.c Wed Jan 17 14:42:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: SmeBSB.c /main/23 1998/06/24 11:53:39 kaleb $ */ +/* $Xorg: SmeBSB.c,v 1.4 2000/08/17 19:45:38 cpqbld Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/SmeBSB.c,v 1.10 1999/06/06 08:48:11 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SmeBSB.c,v 1.11 2001/01/17 19:42:31 dawes Exp $ */ /* * SmeBSB.c - Source code file for BSB Menu Entry object. Index: xc/lib/Xaw/SmeBSB.h diff -u xc/lib/Xaw/SmeBSB.h:1.5 xc/lib/Xaw/SmeBSB.h:1.6 --- xc/lib/Xaw/SmeBSB.h:1.5 Sun Apr 25 06:01:26 1999 +++ xc/lib/Xaw/SmeBSB.h Wed Jan 17 14:42:31 2001 @@ -1,5 +1,5 @@ /* - * $TOG: SmeBSB.h /main/9 1998/02/11 14:55:10 kaleb $ + * $Xorg: SmeBSB.h,v 1.3 2000/08/17 19:45:38 cpqbld Exp $ * Copyright 1989, 1994, 1998 The Open Group @@ -19,7 +19,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/SmeBSB.h,v 1.5 1999/04/25 10:01:26 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SmeBSB.h,v 1.6 2001/01/17 19:42:31 dawes Exp $ */ /* * SmeBSB.h - Public Header file for SmeBSB object. Index: xc/lib/Xaw/SmeBSBP.h diff -u xc/lib/Xaw/SmeBSBP.h:1.7 xc/lib/Xaw/SmeBSBP.h:1.8 --- xc/lib/Xaw/SmeBSBP.h:1.7 Sun Jun 20 04:41:07 1999 +++ xc/lib/Xaw/SmeBSBP.h Wed Jan 17 14:42:31 2001 @@ -1,5 +1,5 @@ /* - * $TOG: SmeBSBP.h /main/10 1998/02/11 14:55:01 kaleb $ + * $Xorg: SmeBSBP.h,v 1.3 2000/08/17 19:45:38 cpqbld Exp $ * Copyright 1989, 1994, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Chris D. Peterson, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/SmeBSBP.h,v 1.7 1999/06/20 08:41:07 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SmeBSBP.h,v 1.8 2001/01/17 19:42:31 dawes Exp $ */ #ifndef _XawSmeBSBP_h #define _XawSmeBSBP_h Index: xc/lib/Xaw/SmeLine.c diff -u xc/lib/Xaw/SmeLine.c:1.6 xc/lib/Xaw/SmeLine.c:1.7 --- xc/lib/Xaw/SmeLine.c:1.6 Sun Jun 6 04:48:11 1999 +++ xc/lib/Xaw/SmeLine.c Wed Jan 17 14:42:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: SmeLine.c /main/17 1998/02/11 14:55:18 kaleb $ */ +/* $Xorg: SmeLine.c,v 1.3 2000/08/17 19:45:38 cpqbld Exp $ */ /* Copyright 1989, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Chris D. Peterson, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/SmeLine.c,v 1.6 1999/06/06 08:48:11 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SmeLine.c,v 1.7 2001/01/17 19:42:31 dawes Exp $ */ /* * Sme.c - Source code for the generic menu entry Index: xc/lib/Xaw/SmeLine.h diff -u xc/lib/Xaw/SmeLine.h:1.4 xc/lib/Xaw/SmeLine.h:1.5 --- xc/lib/Xaw/SmeLine.h:1.4 Sat Oct 3 04:42:21 1998 +++ xc/lib/Xaw/SmeLine.h Wed Jan 17 14:42:31 2001 @@ -1,5 +1,5 @@ /* - * $TOG: SmeLine.h /main/6 1998/02/11 14:55:23 kaleb $ + * $Xorg: SmeLine.h,v 1.3 2000/08/17 19:45:38 cpqbld Exp $ * Copyright 1989, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. * */ -/* $XFree86: xc/lib/Xaw/SmeLine.h,v 1.4 1998/10/03 08:42:21 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SmeLine.h,v 1.5 2001/01/17 19:42:31 dawes Exp $ */ /* * This is the public header file for the Athena SmeLine object. Index: xc/lib/Xaw/SmeLineP.h diff -u xc/lib/Xaw/SmeLineP.h:1.6 xc/lib/Xaw/SmeLineP.h:1.7 --- xc/lib/Xaw/SmeLineP.h:1.6 Sun Jun 20 04:41:07 1999 +++ xc/lib/Xaw/SmeLineP.h Wed Jan 17 14:42:31 2001 @@ -1,5 +1,5 @@ /* - * $TOG: SmeLineP.h /main/6 1998/02/11 14:55:14 kaleb $ + * $Xorg: SmeLineP.h,v 1.3 2000/08/17 19:45:39 cpqbld Exp $ * Copyright 1989, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Chris D. Peterson, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/SmeLineP.h,v 1.6 1999/06/20 08:41:07 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SmeLineP.h,v 1.7 2001/01/17 19:42:31 dawes Exp $ */ #ifndef _XawSmeLineP_h #define _XawSmeLineP_h Index: xc/lib/Xaw/SmeP.h diff -u xc/lib/Xaw/SmeP.h:1.6 xc/lib/Xaw/SmeP.h:1.7 --- xc/lib/Xaw/SmeP.h:1.6 Sun Jun 20 04:41:07 1999 +++ xc/lib/Xaw/SmeP.h Wed Jan 17 14:42:32 2001 @@ -1,5 +1,5 @@ /* - * $TOG: SmeP.h /main/8 1998/02/11 14:55:27 kaleb $ + * $Xorg: SmeP.h,v 1.3 2000/08/17 19:45:39 cpqbld Exp $ * Copyright 1989, 1994, 1998 The Open Group @@ -19,7 +19,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/SmeP.h,v 1.6 1999/06/20 08:41:07 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SmeP.h,v 1.7 2001/01/17 19:42:32 dawes Exp $ */ /* * This is the private header file for the Athena Sme object. Index: xc/lib/Xaw/StripCharP.h diff -u xc/lib/Xaw/StripCharP.h:1.6 xc/lib/Xaw/StripCharP.h:1.7 --- xc/lib/Xaw/StripCharP.h:1.6 Sun Jun 20 04:41:08 1999 +++ xc/lib/Xaw/StripCharP.h Wed Jan 17 14:42:32 2001 @@ -1,5 +1,5 @@ /* -* $TOG: StripCharP.h /main/6 1998/02/06 12:50:31 kaleb $ +* $Xorg: StripCharP.h,v 1.3 2000/08/17 19:45:39 cpqbld Exp $ */ @@ -45,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/StripCharP.h,v 1.6 1999/06/20 08:41:08 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/StripCharP.h,v 1.7 2001/01/17 19:42:32 dawes Exp $ */ #ifndef _XawStripChartP_h #define _XawStripChartP_h Index: xc/lib/Xaw/StripChart.c diff -u xc/lib/Xaw/StripChart.c:1.6 xc/lib/Xaw/StripChart.c:1.7 --- xc/lib/Xaw/StripChart.c:1.6 Sun Jun 6 04:48:12 1999 +++ xc/lib/Xaw/StripChart.c Wed Jan 17 14:42:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: StripChart.c /main/26 1998/02/06 12:50:36 kaleb $ */ +/* $Xorg: StripChart.c,v 1.3 2000/08/17 19:45:39 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/StripChart.c,v 1.6 1999/06/06 08:48:12 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/StripChart.c,v 1.7 2001/01/17 19:42:32 dawes Exp $ */ #include #include Index: xc/lib/Xaw/StripChart.h diff -u xc/lib/Xaw/StripChart.h:1.4 xc/lib/Xaw/StripChart.h:1.5 --- xc/lib/Xaw/StripChart.h:1.4 Sat Oct 3 04:42:23 1998 +++ xc/lib/Xaw/StripChart.h Wed Jan 17 14:42:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: StripChart.h /main/7 1998/02/06 12:50:41 kaleb $ */ +/* $Xorg: StripChart.h,v 1.4 2000/08/17 19:45:39 cpqbld Exp $ */ /*********************************************************** @@ -42,12 +42,20 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/StripChart.h,v 1.4 1998/10/03 08:42:23 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/StripChart.h,v 1.5 2001/01/17 19:42:32 dawes Exp $ */ #ifndef _XawStripChart_h #define _XawStripChart_h -/* Resources: +#include + +/*********************************************************************** + * + * StripChart Widget + * + ***********************************************************************/ + +/* StripChart resources: Name Class RepType Default Value ---- ----- ------- ------------- Index: xc/lib/Xaw/Template.c diff -u xc/lib/Xaw/Template.c:1.6 xc/lib/Xaw/Template.c:1.7 --- xc/lib/Xaw/Template.c:1.6 Sun Jun 6 04:48:13 1999 +++ xc/lib/Xaw/Template.c Wed Jan 17 14:42:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: Template.c /main/6 1998/02/06 12:50:51 kaleb $ */ +/* $Xorg: Template.c,v 1.3 2000/08/17 19:45:40 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/Template.c,v 1.6 1999/06/06 08:48:13 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Template.c,v 1.7 2001/01/17 19:42:32 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Template.h diff -u xc/lib/Xaw/Template.h:1.4 xc/lib/Xaw/Template.h:1.5 --- xc/lib/Xaw/Template.h:1.4 Sat Oct 3 04:42:23 1998 +++ xc/lib/Xaw/Template.h Wed Jan 17 14:42:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: Template.h /main/7 1998/02/06 12:50:56 kaleb $ */ +/* $Xorg: Template.h,v 1.4 2000/08/17 19:45:40 cpqbld Exp $ */ /* @@ -21,10 +21,18 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/Template.h,v 1.4 1998/10/03 08:42:23 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Template.h,v 1.5 2001/01/17 19:42:32 dawes Exp $ */ #ifndef _Template_h #define _Template_h + +#include + +/**************************************************************** + * + * Template widget + * + ****************************************************************/ /* Resources: Index: xc/lib/Xaw/TemplateP.h diff -u xc/lib/Xaw/TemplateP.h:1.5 xc/lib/Xaw/TemplateP.h:1.6 --- xc/lib/Xaw/TemplateP.h:1.5 Sun Jun 6 04:48:13 1999 +++ xc/lib/Xaw/TemplateP.h Wed Jan 17 14:42:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: TemplateP.h /main/8 1998/02/06 12:50:46 kaleb $ */ +/* $Xorg: TemplateP.h,v 1.4 2000/08/17 19:45:40 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/TemplateP.h,v 1.5 1999/06/06 08:48:13 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TemplateP.h,v 1.6 2001/01/17 19:42:32 dawes Exp $ */ #ifndef _TemplateP_h #define _TemplateP_h @@ -54,7 +54,11 @@ typedef struct _TemplateRec { CorePart core; +#if defined(__cplusplus) || defined(c_plusplus) + TemplatePart c_template; +#else TemplatePart template; +#endif } TemplateRec; #endif /* _TemplateP_h */ Index: xc/lib/Xaw/Text.c diff -u xc/lib/Xaw/Text.c:3.40.2.1 xc/lib/Xaw/Text.c:3.42.2.1 --- xc/lib/Xaw/Text.c:3.40.2.1 Fri Feb 9 15:45:09 2001 +++ xc/lib/Xaw/Text.c Fri May 25 17:44:59 2001 @@ -70,7 +70,7 @@ * XFree86 Project. */ -/* $XFree86: xc/lib/Xaw/Text.c,v 3.40.2.1 2001/02/09 20:45:09 paulo Exp $ */ +/* $XFree86: xc/lib/Xaw/Text.c,v 3.42.2.1 2001/05/25 21:44:59 paulo Exp $ */ #include #include @@ -2498,12 +2498,14 @@ int delta, line, line_from; if (left < ctx->text.old_insert) { + XawTextPosition old_insert = ctx->text.old_insert; + if (right < ctx->text.old_insert) - ctx->text.old_insert -= right - left; + old_insert -= right - left; else - ctx->text.old_insert = left; + old_insert = left; - ctx->text.insertPos = ctx->text.old_insert + block->length; + ctx->text.insertPos = old_insert + block->length; } #ifndef OLDXAW if (left <= ctx->text.lt.top) { Index: xc/lib/Xaw/Text.h diff -u xc/lib/Xaw/Text.h:1.13 xc/lib/Xaw/Text.h:1.14 --- xc/lib/Xaw/Text.h:1.13 Sun Aug 15 09:00:34 1999 +++ xc/lib/Xaw/Text.h Wed Jan 17 14:42:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: Text.h /main/46 1998/02/06 12:52:13 kaleb $ */ +/* $Xorg: Text.h,v 1.3 2000/08/17 19:45:40 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Text.h,v 1.13 1999/08/15 13:00:34 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Text.h,v 1.14 2001/01/17 19:42:34 dawes Exp $ */ #ifndef _XawText_h #define _XawText_h Index: xc/lib/Xaw/TextAction.c diff -u xc/lib/Xaw/TextAction.c:3.35.2.3 xc/lib/Xaw/TextAction.c:3.41 --- xc/lib/Xaw/TextAction.c:3.35.2.3 Fri Feb 23 16:30:07 2001 +++ xc/lib/Xaw/TextAction.c Fri Feb 23 16:25:06 2001 @@ -1,4 +1,4 @@ -/* $TOG: TextAction.c /main/55 1998/02/06 12:51:01 kaleb $ */ +/* $Xorg: TextAction.c,v 1.3 2000/08/17 19:45:40 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/TextAction.c,v 3.35.2.3 2001/02/23 21:30:07 paulo Exp $ */ +/* $XFree86: xc/lib/Xaw/TextAction.c,v 3.41 2001/02/23 21:25:06 paulo Exp $ */ #include #include Index: xc/lib/Xaw/TextP.h diff -u xc/lib/Xaw/TextP.h:3.18 xc/lib/Xaw/TextP.h:3.19 --- xc/lib/Xaw/TextP.h:3.18 Sun Jun 20 04:41:10 1999 +++ xc/lib/Xaw/TextP.h Wed Jan 17 14:42:34 2001 @@ -1,5 +1,5 @@ /* -* $TOG: TextP.h /main/55 1998/02/06 12:51:17 kaleb $ +* $Xorg: TextP.h,v 1.3 2000/08/17 19:45:40 cpqbld Exp $ */ @@ -45,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/TextP.h,v 3.18 1999/06/20 08:41:10 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TextP.h,v 3.19 2001/01/17 19:42:34 dawes Exp $ */ #ifndef _XawTextP_h #define _XawTextP_h Index: xc/lib/Xaw/TextPop.c diff -u xc/lib/Xaw/TextPop.c:1.16.2.1 xc/lib/Xaw/TextPop.c:1.18 --- xc/lib/Xaw/TextPop.c:1.16.2.1 Fri Feb 9 15:45:10 2001 +++ xc/lib/Xaw/TextPop.c Mon Feb 5 17:38:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: TextPop.c /main/34 1998/06/24 11:53:54 kaleb $ */ +/* $Xorg: TextPop.c,v 1.3 2000/08/17 19:45:41 cpqbld Exp $ */ /* @@ -22,7 +22,7 @@ */ -/* $XFree86: xc/lib/Xaw/TextPop.c,v 1.16.2.1 2001/02/09 20:45:10 paulo Exp $ */ +/* $XFree86: xc/lib/Xaw/TextPop.c,v 1.18 2001/02/05 22:38:05 paulo Exp $ */ /* * This file is broken up into three sections one dealing with Index: xc/lib/Xaw/TextSink.c diff -u xc/lib/Xaw/TextSink.c:1.17 xc/lib/Xaw/TextSink.c:1.18 --- xc/lib/Xaw/TextSink.c:1.17 Sun Oct 1 22:32:12 2000 +++ xc/lib/Xaw/TextSink.c Wed Jan 17 14:42:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: TextSink.c /main/21 1998/02/11 14:55:39 kaleb $ */ +/* $Xorg: TextSink.c,v 1.3 2000/08/17 19:45:41 cpqbld Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/TextSink.c,v 1.17 2000/10/02 02:32:12 tsi Exp $ */ +/* $XFree86: xc/lib/Xaw/TextSink.c,v 1.18 2001/01/17 19:42:34 dawes Exp $ */ /* * Author: Chris Peterson, MIT X Consortium. Index: xc/lib/Xaw/TextSink.h diff -u xc/lib/Xaw/TextSink.h:1.8 xc/lib/Xaw/TextSink.h:1.9 --- xc/lib/Xaw/TextSink.h:1.8 Sun Aug 15 09:00:36 1999 +++ xc/lib/Xaw/TextSink.h Wed Jan 17 14:42:35 2001 @@ -1,5 +1,5 @@ /* - * $TOG: TextSink.h /main/11 1998/02/06 12:51:33 kaleb $ + * $Xorg: TextSink.h,v 1.3 2000/08/17 19:45:41 cpqbld Exp $ */ /*********************************************************** @@ -44,7 +44,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/TextSink.h,v 1.8 1999/08/15 13:00:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TextSink.h,v 1.9 2001/01/17 19:42:35 dawes Exp $ */ #ifndef _XawTextSink_h #define _XawTextSink_h Index: xc/lib/Xaw/TextSinkP.h diff -u xc/lib/Xaw/TextSinkP.h:1.10 xc/lib/Xaw/TextSinkP.h:1.11 --- xc/lib/Xaw/TextSinkP.h:1.10 Mon Sep 6 09:02:17 1999 +++ xc/lib/Xaw/TextSinkP.h Wed Jan 17 14:42:35 2001 @@ -1,5 +1,5 @@ /* -* $TOG: TextSinkP.h /main/7 1998/02/06 12:51:22 kaleb $ +* $Xorg: TextSinkP.h,v 1.3 2000/08/17 19:45:41 cpqbld Exp $ */ @@ -45,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/TextSinkP.h,v 1.10 1999/09/06 13:02:17 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TextSinkP.h,v 1.11 2001/01/17 19:42:35 dawes Exp $ */ #ifndef _XawTextSinkP_h #define _XawTextSinkP_h Index: xc/lib/Xaw/TextSrc.c diff -u xc/lib/Xaw/TextSrc.c:1.25.2.1 xc/lib/Xaw/TextSrc.c:1.27 --- xc/lib/Xaw/TextSrc.c:1.25.2.1 Fri Feb 9 15:45:10 2001 +++ xc/lib/Xaw/TextSrc.c Tue Jan 30 10:03:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: TextSrc.c /main/21 1998/05/25 08:17:30 kaleb $ */ +/* $Xorg: TextSrc.c,v 1.4 2000/08/17 19:45:41 cpqbld Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group @@ -21,7 +21,7 @@ */ -/* $XFree86: xc/lib/Xaw/TextSrc.c,v 1.25.2.1 2001/02/09 20:45:10 paulo Exp $ */ +/* $XFree86: xc/lib/Xaw/TextSrc.c,v 1.27 2001/01/30 15:03:34 paulo Exp $ */ /* * Author: Chris Peterson, MIT X Consortium. Index: xc/lib/Xaw/TextSrc.h diff -u xc/lib/Xaw/TextSrc.h:1.10 xc/lib/Xaw/TextSrc.h:1.11 --- xc/lib/Xaw/TextSrc.h:1.10 Sun Aug 15 09:00:38 1999 +++ xc/lib/Xaw/TextSrc.h Wed Jan 17 14:42:35 2001 @@ -1,5 +1,5 @@ /* - * $TOG: TextSrc.h /main/12 1998/02/06 12:51:49 kaleb $ + * $Xorg: TextSrc.h,v 1.3 2000/08/17 19:45:42 cpqbld Exp $ */ /*********************************************************** @@ -44,7 +44,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/TextSrc.h,v 1.10 1999/08/15 13:00:38 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TextSrc.h,v 1.11 2001/01/17 19:42:35 dawes Exp $ */ #ifndef _XawTextSrc_h #define _XawTextSrc_h Index: xc/lib/Xaw/TextSrcP.h diff -u xc/lib/Xaw/TextSrcP.h:1.12 xc/lib/Xaw/TextSrcP.h:1.13 --- xc/lib/Xaw/TextSrcP.h:1.12 Mon Sep 27 02:29:12 1999 +++ xc/lib/Xaw/TextSrcP.h Wed Jan 17 14:42:35 2001 @@ -1,5 +1,5 @@ /* -* $TOG: TextSrcP.h /main/21 1998/02/06 12:51:38 kaleb $ +* $Xorg: TextSrcP.h,v 1.3 2000/08/17 19:45:42 cpqbld Exp $ */ @@ -45,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/TextSrcP.h,v 1.12 1999/09/27 06:29:12 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TextSrcP.h,v 1.13 2001/01/17 19:42:35 dawes Exp $ */ #ifndef _XawTextSrcP_h #define _XawTextSrcP_h Index: xc/lib/Xaw/TextTr.c diff -u xc/lib/Xaw/TextTr.c:3.14 xc/lib/Xaw/TextTr.c:3.15 --- xc/lib/Xaw/TextTr.c:3.14 Tue Jun 13 19:15:48 2000 +++ xc/lib/Xaw/TextTr.c Wed Jan 17 14:42:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: TextTr.c /main/21 1998/02/06 12:51:54 kaleb $ */ +/* $Xorg: TextTr.c,v 1.3 2000/08/17 19:45:42 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/TextTr.c,v 3.14 2000/06/13 23:15:48 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TextTr.c,v 3.15 2001/01/17 19:42:35 dawes Exp $ */ /* INTERNATIONALIZATION: Index: xc/lib/Xaw/Toggle.c diff -u xc/lib/Xaw/Toggle.c:1.6 xc/lib/Xaw/Toggle.c:1.7 --- xc/lib/Xaw/Toggle.c:1.6 Sun Jun 6 04:48:19 1999 +++ xc/lib/Xaw/Toggle.c Wed Jan 17 14:42:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: Toggle.c /main/30 1998/02/11 14:55:52 kaleb $ */ +/* $Xorg: Toggle.c,v 1.3 2000/08/17 19:45:42 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/Toggle.c,v 1.6 1999/06/06 08:48:19 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Toggle.c,v 1.7 2001/01/17 19:42:35 dawes Exp $ */ /* * Author: Chris D. Peterson Index: xc/lib/Xaw/Toggle.h diff -u xc/lib/Xaw/Toggle.h:1.4 xc/lib/Xaw/Toggle.h:1.5 --- xc/lib/Xaw/Toggle.h:1.4 Sat Oct 3 04:42:29 1998 +++ xc/lib/Xaw/Toggle.h Wed Jan 17 14:42:35 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Toggle.h /main/18 1998/02/11 14:55:57 kaleb $ + * $Xorg: Toggle.h,v 1.3 2000/08/17 19:45:42 cpqbld Exp $ * Copyright 1989, 1994, 1998 The Open Group @@ -19,7 +19,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/Toggle.h,v 1.4 1998/10/03 08:42:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Toggle.h,v 1.5 2001/01/17 19:42:35 dawes Exp $ */ /* * ToggleP.h - Private definitions for Toggle widget Index: xc/lib/Xaw/ToggleP.h diff -u xc/lib/Xaw/ToggleP.h:1.6 xc/lib/Xaw/ToggleP.h:1.7 --- xc/lib/Xaw/ToggleP.h:1.6 Sun Jun 20 04:41:11 1999 +++ xc/lib/Xaw/ToggleP.h Wed Jan 17 14:42:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: ToggleP.h /main/11 1998/02/11 14:55:48 kaleb $ */ +/* $Xorg: ToggleP.h,v 1.3 2000/08/17 19:45:42 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/ToggleP.h,v 1.6 1999/06/20 08:41:11 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/ToggleP.h,v 1.7 2001/01/17 19:42:35 dawes Exp $ */ /* * Author: Chris D. Peterson Index: xc/lib/Xaw/Tree.c diff -u xc/lib/Xaw/Tree.c:1.8 xc/lib/Xaw/Tree.c:1.9 --- xc/lib/Xaw/Tree.c:1.8 Sun Jul 4 02:38:27 1999 +++ xc/lib/Xaw/Tree.c Wed Jan 17 14:42:35 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Tree.c /main/47 1998/02/11 14:56:05 kaleb $ + * $Xorg: Tree.c,v 1.3 2000/08/17 19:45:42 cpqbld Exp $ * Copyright 1990, 1994, 1998 The Open Group @@ -44,7 +44,7 @@ * additional blank space to make the structure of the graph easier to see * as well as to support vertical trees. */ -/* $XFree86: xc/lib/Xaw/Tree.c,v 1.8 1999/07/04 06:38:27 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Tree.c,v 1.9 2001/01/17 19:42:35 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Tree.h diff -u xc/lib/Xaw/Tree.h:1.5 xc/lib/Xaw/Tree.h:1.6 --- xc/lib/Xaw/Tree.h:1.5 Sun Jun 6 04:48:20 1999 +++ xc/lib/Xaw/Tree.h Wed Jan 17 14:42:35 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Tree.h /main/15 1998/02/11 14:56:11 kaleb $ + * $Xorg: Tree.h,v 1.3 2000/08/17 19:45:43 cpqbld Exp $ * Copyright 1990, 1994, 1998 The Open Group @@ -44,7 +44,7 @@ * additional blank space to make the structure of the graph easier to see * as well as to support vertical trees. */ -/* $XFree86: xc/lib/Xaw/Tree.h,v 1.5 1999/06/06 08:48:20 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Tree.h,v 1.6 2001/01/17 19:42:35 dawes Exp $ */ #ifndef _XawTree_h Index: xc/lib/Xaw/TreeP.h diff -u xc/lib/Xaw/TreeP.h:1.5 xc/lib/Xaw/TreeP.h:1.6 --- xc/lib/Xaw/TreeP.h:1.5 Sun Jun 20 04:41:12 1999 +++ xc/lib/Xaw/TreeP.h Wed Jan 17 14:42:35 2001 @@ -1,5 +1,5 @@ /* - * $TOG: TreeP.h /main/16 1998/02/11 14:56:01 kaleb $ + * $Xorg: TreeP.h,v 1.3 2000/08/17 19:45:43 cpqbld Exp $ * Copyright 1990, 1998 The Open Group @@ -44,7 +44,7 @@ * additional blank space to make the structure of the graph easier to see * as well as to support vertical trees. */ -/* $XFree86: xc/lib/Xaw/TreeP.h,v 1.5 1999/06/20 08:41:12 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TreeP.h,v 1.6 2001/01/17 19:42:35 dawes Exp $ */ #ifndef _XawTreeP_h Index: xc/lib/Xaw/Vendor.c diff -u xc/lib/Xaw/Vendor.c:1.6 xc/lib/Xaw/Vendor.c:1.7 --- xc/lib/Xaw/Vendor.c:1.6 Sun Mar 21 02:34:32 1999 +++ xc/lib/Xaw/Vendor.c Wed Jan 17 14:42:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: Vendor.c /main/28 1998/02/06 12:52:56 kaleb $ */ +/* $Xorg: Vendor.c,v 1.3 2000/08/17 19:45:43 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Vendor.c,v 1.6 1999/03/21 07:34:32 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Vendor.c,v 1.7 2001/01/17 19:42:35 dawes Exp $ */ /* * This is a copy of Xt/Vendor.c with an additional ClassInitialize Index: xc/lib/Xaw/VendorEP.h diff -u xc/lib/Xaw/VendorEP.h:1.4 xc/lib/Xaw/VendorEP.h:1.5 --- xc/lib/Xaw/VendorEP.h:1.4 Sun Jun 20 04:41:12 1999 +++ xc/lib/Xaw/VendorEP.h Wed Jan 17 14:42:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: VendorEP.h /main/3 1998/02/06 12:52:50 kaleb $ */ +/* $Xorg: VendorEP.h,v 1.3 2000/08/17 19:45:43 cpqbld Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -47,7 +47,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/VendorEP.h,v 1.4 1999/06/20 08:41:12 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/VendorEP.h,v 1.5 2001/01/17 19:42:36 dawes Exp $ */ #ifndef _VendorEP_h #define _VendorEP_h Index: xc/lib/Xaw/Viewport.c diff -u xc/lib/Xaw/Viewport.c:1.8 xc/lib/Xaw/Viewport.c:1.9 --- xc/lib/Xaw/Viewport.c:1.8 Tue Sep 26 11:56:55 2000 +++ xc/lib/Xaw/Viewport.c Wed Jan 17 14:42:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: Viewport.c /main/72 1998/02/06 12:53:07 kaleb $ */ +/* $Xorg: Viewport.c,v 1.3 2000/08/17 19:45:43 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Viewport.c,v 1.8 2000/09/26 15:56:55 tsi Exp $ */ +/* $XFree86: xc/lib/Xaw/Viewport.c,v 1.9 2001/01/17 19:42:36 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Viewport.h diff -u xc/lib/Xaw/Viewport.h:1.5 xc/lib/Xaw/Viewport.h:1.6 --- xc/lib/Xaw/Viewport.h:1.5 Mon May 3 08:15:47 1999 +++ xc/lib/Xaw/Viewport.h Wed Jan 17 14:42:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: Viewport.h /main/24 1998/02/06 12:53:14 kaleb $ */ +/* $Xorg: Viewport.h,v 1.3 2000/08/17 19:45:44 cpqbld Exp $ */ /************************************************************ @@ -42,7 +42,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xaw/Viewport.h,v 1.5 1999/05/03 12:15:47 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Viewport.h,v 1.6 2001/01/17 19:42:36 dawes Exp $ */ #ifndef _XawViewport_h #define _XawViewport_h Index: xc/lib/Xaw/ViewportP.h diff -u xc/lib/Xaw/ViewportP.h:1.6 xc/lib/Xaw/ViewportP.h:1.7 --- xc/lib/Xaw/ViewportP.h:1.6 Sun Jun 20 04:41:12 1999 +++ xc/lib/Xaw/ViewportP.h Wed Jan 17 14:42:36 2001 @@ -1,5 +1,5 @@ /* - * $TOG: ViewportP.h /main/15 1998/02/06 12:53:02 kaleb $ + * $Xorg: ViewportP.h,v 1.3 2000/08/17 19:45:44 cpqbld Exp $ * Private declarations for ViewportWidgetClass */ @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xaw/ViewportP.h,v 1.6 1999/06/20 08:41:12 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/ViewportP.h,v 1.7 2001/01/17 19:42:36 dawes Exp $ */ #ifndef _ViewportP_h #define _ViewportP_h Index: xc/lib/Xaw/Xaw-def.cpp diff -u xc/lib/Xaw/Xaw-def.cpp:1.1.1.1 xc/lib/Xaw/Xaw-def.cpp:1.1.1.2 --- xc/lib/Xaw/Xaw-def.cpp:1.1.1.1 Sun Sep 27 03:50:42 1998 +++ xc/lib/Xaw/Xaw-def.cpp Tue Jan 16 17:18:45 2001 @@ -131,4 +131,4 @@ XawViewportSetLocation XawWidgetArray XawWidgetCount -/* $TOG: Xaw-def.cpp /main/1 1997/09/16 10:04:41 kaleb $ */ +/* $Xorg: Xaw-def.cpp,v 1.3 2000/08/17 19:45:44 cpqbld Exp $ */ Index: xc/lib/Xaw/Xaw.man diff -u xc/lib/Xaw/Xaw.man:1.4 xc/lib/Xaw/Xaw.man:1.5 --- xc/lib/Xaw/Xaw.man:1.4 Sun Jun 27 10:07:35 1999 +++ xc/lib/Xaw/Xaw.man Sat Jan 27 13:20:39 2001 @@ -26,14 +26,14 @@ .\" .\" Author: Paulo César Pereira de Andrade .\" -.\" $XFree86: xc/lib/Xaw/Xaw.man,v 1.4 1999/06/27 14:07:35 dawes Exp $ +.\" $XFree86: xc/lib/Xaw/Xaw.man,v 1.5 2001/01/27 18:20:39 dawes Exp $ .\" .de TQ .br .ns .TP \\$1 .. -.TH XAW 3 "Version 3.9" "XFree86" +.TH XAW 3 __vendorversion__ .SH NAME XAW \- X Athena Widgets Index: xc/lib/Xaw/XawI18n.c diff -u xc/lib/Xaw/XawI18n.c:1.6 xc/lib/Xaw/XawI18n.c:1.7 --- xc/lib/Xaw/XawI18n.c:1.6 Mon Jul 19 09:36:04 1999 +++ xc/lib/Xaw/XawI18n.c Wed Jan 17 14:42:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: XawI18n.c /main/7 1998/02/06 12:53:18 kaleb $ */ +/* $Xorg: XawI18n.c,v 1.3 2000/08/17 19:45:44 cpqbld Exp $ */ /* Copyright 1991 NCR Corporation - Dayton, Ohio, USA */ @@ -49,7 +49,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/XawI18n.c,v 1.6 1999/07/19 13:36:04 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/XawI18n.c,v 1.7 2001/01/17 19:42:36 dawes Exp $ */ #include #include "XawI18n.h" Index: xc/lib/Xaw/XawI18n.h diff -u xc/lib/Xaw/XawI18n.h:3.10 xc/lib/Xaw/XawI18n.h:3.11 --- xc/lib/Xaw/XawI18n.h:3.10 Sun Dec 26 19:39:23 1999 +++ xc/lib/Xaw/XawI18n.h Wed Jan 17 14:42:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: XawI18n.h /main/13 1998/02/06 12:53:23 kaleb $ */ +/* $Xorg: XawI18n.h,v 1.3 2000/08/17 19:45:44 cpqbld Exp $ */ /************************************************************ @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. ********************************************************/ -/* $XFree86: xc/lib/Xaw/XawI18n.h,v 3.10 1999/12/27 00:39:23 robin Exp $ */ +/* $XFree86: xc/lib/Xaw/XawI18n.h,v 3.11 2001/01/17 19:42:36 dawes Exp $ */ #ifdef HAS_WCTYPE_H #include Index: xc/lib/Xaw/XawIm.c diff -u xc/lib/Xaw/XawIm.c:1.11 xc/lib/Xaw/XawIm.c:1.12 --- xc/lib/Xaw/XawIm.c:1.11 Tue Sep 5 15:51:16 2000 +++ xc/lib/Xaw/XawIm.c Wed Jan 17 14:42:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: XawIm.c /main/12 1998/04/21 07:40:26 kaleb $ */ +/* $Xorg: XawIm.c,v 1.4 2000/08/17 19:45:44 cpqbld Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -48,7 +48,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/XawIm.c,v 1.11 2000/09/05 19:51:16 mvojkovi Exp $ */ +/* $XFree86: xc/lib/Xaw/XawIm.c,v 1.12 2001/01/17 19:42:36 dawes Exp $ */ #include #include Index: xc/lib/Xaw/XawImP.h diff -u xc/lib/Xaw/XawImP.h:3.7 xc/lib/Xaw/XawImP.h:3.8 --- xc/lib/Xaw/XawImP.h:3.7 Sun Mar 14 06:17:41 1999 +++ xc/lib/Xaw/XawImP.h Wed Jan 17 14:42:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: XawImP.h /main/8 1998/04/21 09:44:31 kaleb $ */ +/* $Xorg: XawImP.h,v 1.3 2000/08/17 19:45:44 cpqbld Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -47,7 +47,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/XawImP.h,v 3.7 1999/03/14 11:17:41 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/XawImP.h,v 3.8 2001/01/17 19:42:36 dawes Exp $ */ #ifndef _XawImP_h #define _XawImP_h Index: xc/lib/Xaw/XawInit.c diff -u xc/lib/Xaw/XawInit.c:1.8 xc/lib/Xaw/XawInit.c:1.9 --- xc/lib/Xaw/XawInit.c:1.8 Sun Jun 6 04:48:22 1999 +++ xc/lib/Xaw/XawInit.c Wed Jan 17 14:42:36 2001 @@ -1,5 +1,5 @@ /* - * $TOG: XawInit.c /main/4 1998/02/06 12:53:40 kaleb $ + * $Xorg: XawInit.c,v 1.3 2000/08/17 19:45:44 cpqbld Exp $ * Copyright 1989, 1998 The Open Group @@ -28,7 +28,7 @@ * call this routine from their ClassInitialize procs (this routine may be * used as the class init proc). */ -/* $XFree86: xc/lib/Xaw/XawInit.c,v 1.8 1999/06/06 08:48:22 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/XawInit.c,v 1.9 2001/01/17 19:42:36 dawes Exp $ */ #include #include Index: xc/lib/Xaw/XawInit.h diff -u xc/lib/Xaw/XawInit.h:1.11 xc/lib/Xaw/XawInit.h:1.12 --- xc/lib/Xaw/XawInit.h:1.11 Sat Aug 28 05:00:29 1999 +++ xc/lib/Xaw/XawInit.h Wed Jan 17 14:42:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: XawInit.h /main/7 1998/02/06 12:53:44 kaleb $ +/* $Xorg: XawInit.h,v 1.4 2000/08/17 19:45:44 cpqbld Exp $ * Copyright 1989, 1994, 1998 The Open Group @@ -18,7 +18,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/XawInit.h,v 1.11 1999/08/28 09:00:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/XawInit.h,v 1.12 2001/01/17 19:42:36 dawes Exp $ */ #ifndef _XawInit_h #define _XawInit_h @@ -32,6 +32,8 @@ typedef struct _XawDL XawDisplayList; #endif /* OLDXAW */ + +#include _XFUNCPROTOBEGIN Index: xc/lib/Xaw/jump_funcs diff -u xc/lib/Xaw/jump_funcs:3.2 xc/lib/Xaw/jump_funcs:3.3 --- xc/lib/Xaw/jump_funcs:3.2 Mon Feb 12 06:11:15 1996 +++ xc/lib/Xaw/jump_funcs Wed Jan 17 14:42:36 2001 @@ -1,5 +1,9 @@ -# $XConsortium: jump_funcs,v 1.2 94/12/07 10:46:47 kaleb Exp $ -# $XFree86: xc/lib/Xaw/jump_funcs,v 3.2 1996/02/12 11:11:15 dawes Exp $ +# $Xorg: jump_funcs,v 1.3 2000/08/17 19:45:44 cpqbld Exp $ +# +# +# +# +# $XFree86: xc/lib/Xaw/jump_funcs,v 3.3 2001/01/17 19:42:36 dawes Exp $ # 00000000 T _XawAsciiSourceFreeString libXaw AsciiSrc 00000000 T _XawAsciiSave libXaw AsciiSrc Index: xc/lib/Xaw/jump_ignore diff -u xc/lib/Xaw/jump_ignore:3.1 xc/lib/Xaw/jump_ignore:3.2 --- xc/lib/Xaw/jump_ignore:3.1 Sat Jan 28 10:43:32 1995 +++ xc/lib/Xaw/jump_ignore Wed Jan 17 14:42:36 2001 @@ -1,3 +1,7 @@ -# $XConsortium: jump_ignore,v 1.2 94/12/07 10:46:47 kaleb Exp $ -# $XFree86: xc/lib/Xaw/jump_ignore,v 3.1 1995/01/28 15:43:32 dawes Exp $ +# $Xorg: jump_ignore,v 1.3 2000/08/17 19:45:45 cpqbld Exp $ +# +# +# +# +# $XFree86: xc/lib/Xaw/jump_ignore,v 3.2 2001/01/17 19:42:36 dawes Exp $ # jump_ignore Index: xc/lib/Xaw/jump_vars diff -u xc/lib/Xaw/jump_vars:3.1 xc/lib/Xaw/jump_vars:3.2 --- xc/lib/Xaw/jump_vars:3.1 Sat Jan 28 10:43:33 1995 +++ xc/lib/Xaw/jump_vars Wed Jan 17 14:42:36 2001 @@ -1,5 +1,9 @@ -# $XConsortium: jump_vars,v 1.2 94/12/07 10:46:47 kaleb Exp $ -# $XFree86: xc/lib/Xaw/jump_vars,v 3.1 1995/01/28 15:43:33 dawes Exp $ +# $Xorg: jump_vars,v 1.3 2000/08/17 19:45:45 cpqbld Exp $ +# +# +# +# +# $XFree86: xc/lib/Xaw/jump_vars,v 3.2 2001/01/17 19:42:36 dawes Exp $ # 00001400 D _XawWidgetArray libXaw AllWidgets 00000004 D _XawWidgetCount libXaw AllWidgets Index: xc/lib/Xaw/sharedlib.c diff -u xc/lib/Xaw/sharedlib.c:1.1.1.2 xc/lib/Xaw/sharedlib.c:1.1.1.3 --- xc/lib/Xaw/sharedlib.c:1.1.1.2 Sun Sep 27 03:50:41 1998 +++ xc/lib/Xaw/sharedlib.c Tue Jan 16 17:18:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: sharedlib.c /main/7 1998/02/06 12:49:07 kaleb $ */ +/* $Xorg: sharedlib.c,v 1.3 2000/08/17 19:45:45 cpqbld Exp $ */ /* Copyright 1991, 1994, 1998 The Open Group Index: xc/lib/Xbsd/Berklib.c diff -u xc/lib/Xbsd/Berklib.c:3.6 xc/lib/Xbsd/Berklib.c:3.7 --- xc/lib/Xbsd/Berklib.c:3.6 Sat Oct 3 04:42:49 1998 +++ xc/lib/Xbsd/Berklib.c Wed Jan 17 14:42:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: Berklib.c /main/26 1998/02/06 14:20:17 kaleb $ */ +/* $Xorg: Berklib.c,v 1.3 2000/08/17 19:45:46 cpqbld Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/Xbsd/Berklib.c,v 3.6 1998/10/03 08:42:49 dawes Exp $ */ +/* $XFree86: xc/lib/Xbsd/Berklib.c,v 3.7 2001/01/17 19:42:42 dawes Exp $ */ /* Index: xc/lib/Xbsd/Imakefile diff -u xc/lib/Xbsd/Imakefile:3.2 xc/lib/Xbsd/Imakefile:3.3 --- xc/lib/Xbsd/Imakefile:3.2 Sat Apr 17 05:08:11 1999 +++ xc/lib/Xbsd/Imakefile Wed Jan 17 14:42:42 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile,v 1.6 94/11/21 18:24:13 kaleb Exp $ -XCOMM $XFree86: xc/lib/Xbsd/Imakefile,v 3.2 1999/04/17 09:08:11 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:45:46 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/Xbsd/Imakefile,v 3.3 2001/01/17 19:42:42 dawes Exp $ + SRCS = Berklib.c OBJS = Berklib.o Index: xc/lib/Xdmcp/A8Eq.c diff -u xc/lib/Xdmcp/A8Eq.c:1.1.1.2 xc/lib/Xdmcp/A8Eq.c:1.1.1.3 --- xc/lib/Xdmcp/A8Eq.c:1.1.1.2 Sun Sep 27 03:52:53 1998 +++ xc/lib/Xdmcp/A8Eq.c Tue Jan 16 17:19:09 2001 @@ -1,5 +1,5 @@ /* - * $TOG: A8Eq.c /main/5 1998/02/06 14:38:24 kaleb $ + * $Xorg: A8Eq.c,v 1.3 2000/08/17 19:45:46 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group Index: xc/lib/Xdmcp/AA16.c diff -u xc/lib/Xdmcp/AA16.c:1.2 xc/lib/Xdmcp/AA16.c:1.3 --- xc/lib/Xdmcp/AA16.c:1.2 Sat Oct 10 11:25:11 1998 +++ xc/lib/Xdmcp/AA16.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: AA16.c /main/4 1998/02/06 14:38:30 kaleb $ + * $Xorg: AA16.c,v 1.3 2000/08/17 19:45:47 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/AA16.c,v 1.2 1998/10/10 15:25:11 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/AA16.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/AA32.c diff -u xc/lib/Xdmcp/AA32.c:1.2 xc/lib/Xdmcp/AA32.c:1.3 --- xc/lib/Xdmcp/AA32.c:1.2 Sat Oct 10 11:25:11 1998 +++ xc/lib/Xdmcp/AA32.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: AA32.c /main/4 1998/02/06 14:38:36 kaleb $ + * $Xorg: AA32.c,v 1.3 2000/08/17 19:45:47 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/AA32.c,v 1.2 1998/10/10 15:25:11 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/AA32.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/AA8.c diff -u xc/lib/Xdmcp/AA8.c:1.2 xc/lib/Xdmcp/AA8.c:1.3 --- xc/lib/Xdmcp/AA8.c:1.2 Sat Oct 10 11:25:12 1998 +++ xc/lib/Xdmcp/AA8.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: AA8.c /main/4 1998/02/06 14:38:42 kaleb $ + * $Xorg: AA8.c,v 1.3 2000/08/17 19:45:47 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/AA8.c,v 1.2 1998/10/10 15:25:12 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/AA8.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/Alloc.c diff -u xc/lib/Xdmcp/Alloc.c:3.2 xc/lib/Xdmcp/Alloc.c:3.3 --- xc/lib/Xdmcp/Alloc.c:3.2 Sat Oct 10 11:25:13 1998 +++ xc/lib/Xdmcp/Alloc.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Alloc.c /main/3 1998/02/06 14:38:48 kaleb $ + * $Xorg: Alloc.c,v 1.3 2000/08/17 19:45:47 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/Alloc.c,v 3.2 1998/10/10 15:25:13 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/Alloc.c,v 3.3 2001/01/17 19:42:43 dawes Exp $ */ /* stubs for use when Xalloc, Xrealloc and Xfree are not defined */ Index: xc/lib/Xdmcp/AofA8.c diff -u xc/lib/Xdmcp/AofA8.c:1.2 xc/lib/Xdmcp/AofA8.c:1.3 --- xc/lib/Xdmcp/AofA8.c:1.2 Sat Oct 10 11:25:13 1998 +++ xc/lib/Xdmcp/AofA8.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: AofA8.c /main/5 1998/02/06 14:38:53 kaleb $ + * $Xorg: AofA8.c,v 1.3 2000/08/17 19:45:47 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/AofA8.c,v 1.2 1998/10/10 15:25:13 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/AofA8.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/CA8.c diff -u xc/lib/Xdmcp/CA8.c:1.1.1.2 xc/lib/Xdmcp/CA8.c:1.1.1.3 --- xc/lib/Xdmcp/CA8.c:1.1.1.2 Sun Sep 27 03:52:56 1998 +++ xc/lib/Xdmcp/CA8.c Tue Jan 16 17:19:21 2001 @@ -1,5 +1,5 @@ /* - * $TOG: CA8.c /main/6 1998/02/06 14:38:59 kaleb $ + * $Xorg: CA8.c,v 1.3 2000/08/17 19:45:47 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group Index: xc/lib/Xdmcp/CmpKey.c diff -u xc/lib/Xdmcp/CmpKey.c:1.2 xc/lib/Xdmcp/CmpKey.c:1.3 --- xc/lib/Xdmcp/CmpKey.c:1.2 Sat Oct 10 11:25:14 1998 +++ xc/lib/Xdmcp/CmpKey.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: CmpKey.c /main/4 1998/02/06 14:39:05 kaleb $ + * $Xorg: CmpKey.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/CmpKey.c,v 1.2 1998/10/10 15:25:14 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/CmpKey.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/DA16.c diff -u xc/lib/Xdmcp/DA16.c:1.4 xc/lib/Xdmcp/DA16.c:1.5 --- xc/lib/Xdmcp/DA16.c:1.4 Sat Oct 10 11:25:14 1998 +++ xc/lib/Xdmcp/DA16.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: DA16.c /main/5 1998/02/06 14:39:10 kaleb $ + * $Xorg: DA16.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/DA16.c,v 1.4 1998/10/10 15:25:14 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/DA16.c,v 1.5 2001/01/17 19:42:43 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/DA32.c diff -u xc/lib/Xdmcp/DA32.c:1.3 xc/lib/Xdmcp/DA32.c:1.4 --- xc/lib/Xdmcp/DA32.c:1.3 Sat Oct 3 04:42:50 1998 +++ xc/lib/Xdmcp/DA32.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: DA32.c /main/5 1998/02/06 14:39:15 kaleb $ + * $Xorg: DA32.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group Index: xc/lib/Xdmcp/DA8.c diff -u xc/lib/Xdmcp/DA8.c:1.3 xc/lib/Xdmcp/DA8.c:1.4 --- xc/lib/Xdmcp/DA8.c:1.3 Sat Oct 3 04:42:50 1998 +++ xc/lib/Xdmcp/DA8.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: DA8.c /main/5 1998/02/06 14:39:20 kaleb $ + * $Xorg: DA8.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group Index: xc/lib/Xdmcp/DAofA8.c diff -u xc/lib/Xdmcp/DAofA8.c:1.3 xc/lib/Xdmcp/DAofA8.c:1.4 --- xc/lib/Xdmcp/DAofA8.c:1.3 Sat Oct 3 04:42:51 1998 +++ xc/lib/Xdmcp/DAofA8.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: DAofA8.c /main/7 1998/06/25 16:26:01 kaleb $ + * $Xorg: DAofA8.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group Index: xc/lib/Xdmcp/DecKey.c diff -u xc/lib/Xdmcp/DecKey.c:1.2 xc/lib/Xdmcp/DecKey.c:1.3 --- xc/lib/Xdmcp/DecKey.c:1.2 Sat Oct 10 11:25:14 1998 +++ xc/lib/Xdmcp/DecKey.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: DecKey.c /main/4 1998/02/06 14:39:30 kaleb $ + * $Xorg: DecKey.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/DecKey.c,v 1.2 1998/10/10 15:25:14 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/DecKey.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/Fill.c diff -u xc/lib/Xdmcp/Fill.c:3.6 xc/lib/Xdmcp/Fill.c:3.7 --- xc/lib/Xdmcp/Fill.c:3.6 Thu May 11 14:14:10 2000 +++ xc/lib/Xdmcp/Fill.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Fill.c /main/12 1998/02/06 14:39:37 kaleb $ + * $Xorg: Fill.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/Fill.c,v 3.6 2000/05/11 18:14:10 tsi Exp $ */ +/* $XFree86: xc/lib/Xdmcp/Fill.c,v 3.7 2001/01/17 19:42:43 dawes Exp $ */ #ifdef WIN32 #define _WILLWINSOCK_ Index: xc/lib/Xdmcp/Flush.c diff -u xc/lib/Xdmcp/Flush.c:3.5 xc/lib/Xdmcp/Flush.c:3.6 --- xc/lib/Xdmcp/Flush.c:3.5 Sat Oct 3 04:42:51 1998 +++ xc/lib/Xdmcp/Flush.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Flush.c /main/12 1998/02/06 14:39:43 kaleb $ + * $Xorg: Flush.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/Flush.c,v 3.5 1998/10/03 08:42:51 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/Flush.c,v 3.6 2001/01/17 19:42:43 dawes Exp $ */ #ifdef WIN32 #define _WILLWINSOCK_ Index: xc/lib/Xdmcp/GenKey.c diff -u xc/lib/Xdmcp/GenKey.c:3.5 xc/lib/Xdmcp/GenKey.c:3.6 --- xc/lib/Xdmcp/GenKey.c:3.5 Tue Nov 14 13:20:33 2000 +++ xc/lib/Xdmcp/GenKey.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: GenKey.c /main/7 1998/02/06 14:39:49 kaleb $ + * $Xorg: GenKey.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/GenKey.c,v 3.5 2000/11/14 18:20:33 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/GenKey.c,v 3.6 2001/01/17 19:42:43 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/Imakefile diff -u xc/lib/Xdmcp/Imakefile:3.4 xc/lib/Xdmcp/Imakefile:3.5 --- xc/lib/Xdmcp/Imakefile:3.4 Sat Apr 17 05:08:12 1999 +++ xc/lib/Xdmcp/Imakefile Wed Jan 17 14:42:43 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/25 1996/09/28 16:43:40 rws $ -XCOMM $XFree86: xc/lib/Xdmcp/Imakefile,v 3.4 1999/04/17 09:08:12 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/Xdmcp/Imakefile,v 3.5 2001/01/17 19:42:43 dawes Exp $ + #define DoNormalLib NormalLibXdmcp #define DoSharedLib SharedLibXdmcp #define DoExtraLib SharedLibXdmcp Index: xc/lib/Xdmcp/IncKey.c diff -u xc/lib/Xdmcp/IncKey.c:1.2 xc/lib/Xdmcp/IncKey.c:1.3 --- xc/lib/Xdmcp/IncKey.c:1.2 Sat Oct 10 11:25:15 1998 +++ xc/lib/Xdmcp/IncKey.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: IncKey.c /main/4 1998/02/06 14:39:54 kaleb $ + * $Xorg: IncKey.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/IncKey.c,v 1.2 1998/10/10 15:25:15 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/IncKey.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/RA16.c diff -u xc/lib/Xdmcp/RA16.c:1.3 xc/lib/Xdmcp/RA16.c:1.4 --- xc/lib/Xdmcp/RA16.c:1.3 Sat Oct 3 04:42:52 1998 +++ xc/lib/Xdmcp/RA16.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: RA16.c /main/7 1998/06/25 16:26:16 kaleb $ + * $Xorg: RA16.c,v 1.4 2000/08/17 19:45:48 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -35,8 +35,14 @@ { int i; - if (!XdmcpReadCARD8 (buffer, &array->length)) + if (!XdmcpReadCARD8 (buffer, &array->length)) { + + /* Must set array->data to NULL to guarantee safe call of + * XdmcpDisposeARRAY*(array) (which calls Xfree(array->data)); + * see defect 7329 */ + array->data = 0; return FALSE; + } if (!array->length) { array->data = NULL; Index: xc/lib/Xdmcp/RA32.c diff -u xc/lib/Xdmcp/RA32.c:1.3 xc/lib/Xdmcp/RA32.c:1.4 --- xc/lib/Xdmcp/RA32.c:1.3 Sat Oct 3 04:42:52 1998 +++ xc/lib/Xdmcp/RA32.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: RA32.c /main/7 1998/06/25 16:26:21 kaleb $ + * $Xorg: RA32.c,v 1.4 2000/08/17 19:45:48 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -35,8 +35,14 @@ { int i; - if (!XdmcpReadCARD8 (buffer, &array->length)) + if (!XdmcpReadCARD8 (buffer, &array->length)) { + + /* Must set array->data to NULL to guarantee safe call of + * XdmcpDisposeARRAY*(array) (which calls Xfree(array->data)); + * see defect 7329 */ + array->data = 0; return FALSE; + } if (!array->length) { array->data = NULL; Index: xc/lib/Xdmcp/RA8.c diff -u xc/lib/Xdmcp/RA8.c:1.3 xc/lib/Xdmcp/RA8.c:1.4 --- xc/lib/Xdmcp/RA8.c:1.3 Sat Oct 3 04:42:52 1998 +++ xc/lib/Xdmcp/RA8.c Wed Jan 17 14:42:43 2001 @@ -1,5 +1,5 @@ /* - * $TOG: RA8.c /main/7 1998/06/25 16:26:12 kaleb $ + * $Xorg: RA8.c,v 1.4 2000/08/17 19:45:48 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -35,8 +35,14 @@ { int i; - if (!XdmcpReadCARD16 (buffer, &array->length)) + if (!XdmcpReadCARD16 (buffer, &array->length)) { + + /* Must set array->data to NULL to guarantee safe call of + * XdmcpDisposeARRAY*(array) (which calls Xfree(array->data)); + * see defect 7329 */ + array->data = 0; return FALSE; + } if (!array->length) { array->data = NULL; Index: xc/lib/Xdmcp/RAofA8.c diff -u xc/lib/Xdmcp/RAofA8.c:1.3 xc/lib/Xdmcp/RAofA8.c:1.4 --- xc/lib/Xdmcp/RAofA8.c:1.3 Sat Oct 3 04:42:52 1998 +++ xc/lib/Xdmcp/RAofA8.c Wed Jan 17 14:42:44 2001 @@ -1,5 +1,5 @@ /* - * $TOG: RAofA8.c /main/7 1998/06/25 16:26:07 kaleb $ + * $Xorg: RAofA8.c,v 1.5 2000/08/17 19:45:49 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -35,8 +35,14 @@ { int i; - if (!XdmcpReadCARD8 (buffer, &array->length)) + if (!XdmcpReadCARD8 (buffer, &array->length)) { + + /* Must set array->data to NULL to guarantee safe call of + * XdmcpDisposeARRAY*(array) (which calls Xfree(array->data)); + * see defect 7329 */ + array->data = 0; return FALSE; + } if (!array->length) { array->data = NULL; @@ -49,9 +55,12 @@ { if (!XdmcpReadARRAY8 (buffer, &array->data[i])) { - Xfree (array->data); - array->data = NULL; - array->length = 0; + + /* All arrays allocated thus far in the loop must be freed + * if there is an error in the read. + * See Defect 7328 */ + array->length = i; + XdmcpDisposeARRAYofARRAY8(array); return FALSE; } } Index: xc/lib/Xdmcp/RC16.c diff -u xc/lib/Xdmcp/RC16.c:1.1.1.2 xc/lib/Xdmcp/RC16.c:1.1.1.3 --- xc/lib/Xdmcp/RC16.c:1.1.1.2 Sun Sep 27 03:53:02 1998 +++ xc/lib/Xdmcp/RC16.c Tue Jan 16 17:19:46 2001 @@ -1,5 +1,5 @@ /* - * $TOG: RC16.c /main/4 1998/02/06 14:40:39 kaleb $ + * $Xorg: RC16.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group Index: xc/lib/Xdmcp/RC32.c diff -u xc/lib/Xdmcp/RC32.c:1.1.1.2 xc/lib/Xdmcp/RC32.c:1.1.1.3 --- xc/lib/Xdmcp/RC32.c:1.1.1.2 Sun Sep 27 03:53:02 1998 +++ xc/lib/Xdmcp/RC32.c Tue Jan 16 17:19:48 2001 @@ -1,5 +1,5 @@ /* - * $TOG: RC32.c /main/4 1998/02/06 14:40:44 kaleb $ + * $Xorg: RC32.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group Index: xc/lib/Xdmcp/RC8.c diff -u xc/lib/Xdmcp/RC8.c:1.1.1.2 xc/lib/Xdmcp/RC8.c:1.1.1.3 --- xc/lib/Xdmcp/RC8.c:1.1.1.2 Sun Sep 27 03:53:03 1998 +++ xc/lib/Xdmcp/RC8.c Tue Jan 16 17:19:48 2001 @@ -1,5 +1,5 @@ /* - * $TOG: RC8.c /main/5 1998/02/06 14:40:49 kaleb $ + * $Xorg: RC8.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group Index: xc/lib/Xdmcp/RHead.c diff -u xc/lib/Xdmcp/RHead.c:1.1.1.2 xc/lib/Xdmcp/RHead.c:1.1.1.3 --- xc/lib/Xdmcp/RHead.c:1.1.1.2 Sun Sep 27 03:53:03 1998 +++ xc/lib/Xdmcp/RHead.c Tue Jan 16 17:19:49 2001 @@ -1,5 +1,5 @@ /* - * $TOG: RHead.c /main/4 1998/02/06 14:40:55 kaleb $ + * $Xorg: RHead.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group Index: xc/lib/Xdmcp/RR.c diff -u xc/lib/Xdmcp/RR.c:1.1.1.2 xc/lib/Xdmcp/RR.c:1.1.1.3 --- xc/lib/Xdmcp/RR.c:1.1.1.2 Sun Sep 27 03:53:03 1998 +++ xc/lib/Xdmcp/RR.c Tue Jan 16 17:19:50 2001 @@ -1,5 +1,5 @@ /* - * $TOG: RR.c /main/4 1998/02/06 14:41:00 kaleb $ + * $Xorg: RR.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group Index: xc/lib/Xdmcp/RaA16.c diff -u xc/lib/Xdmcp/RaA16.c:1.2 xc/lib/Xdmcp/RaA16.c:1.3 --- xc/lib/Xdmcp/RaA16.c:1.2 Sat Oct 10 11:25:15 1998 +++ xc/lib/Xdmcp/RaA16.c Wed Jan 17 14:42:44 2001 @@ -1,5 +1,5 @@ /* - * $TOG: RaA16.c /main/4 1998/02/06 14:40:14 kaleb $ + * $Xorg: RaA16.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/RaA16.c,v 1.2 1998/10/10 15:25:15 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/RaA16.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/RaA32.c diff -u xc/lib/Xdmcp/RaA32.c:1.2 xc/lib/Xdmcp/RaA32.c:1.3 --- xc/lib/Xdmcp/RaA32.c:1.2 Sat Oct 10 11:25:16 1998 +++ xc/lib/Xdmcp/RaA32.c Wed Jan 17 14:42:44 2001 @@ -1,5 +1,5 @@ /* - * $TOG: RaA32.c /main/4 1998/02/06 14:40:18 kaleb $ + * $Xorg: RaA32.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/RaA32.c,v 1.2 1998/10/10 15:25:16 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/RaA32.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/RaA8.c diff -u xc/lib/Xdmcp/RaA8.c:1.2 xc/lib/Xdmcp/RaA8.c:1.3 --- xc/lib/Xdmcp/RaA8.c:1.2 Sat Oct 10 11:25:16 1998 +++ xc/lib/Xdmcp/RaA8.c Wed Jan 17 14:42:44 2001 @@ -1,5 +1,5 @@ /* - * $TOG: RaA8.c /main/4 1998/02/06 14:40:24 kaleb $ + * $Xorg: RaA8.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/RaA8.c,v 1.2 1998/10/10 15:25:16 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/RaA8.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/RaAoA8.c diff -u xc/lib/Xdmcp/RaAoA8.c:1.2 xc/lib/Xdmcp/RaAoA8.c:1.3 --- xc/lib/Xdmcp/RaAoA8.c:1.2 Sat Oct 10 11:25:16 1998 +++ xc/lib/Xdmcp/RaAoA8.c Wed Jan 17 14:42:44 2001 @@ -1,5 +1,5 @@ /* - * $TOG: RaAoA8.c /main/4 1998/02/06 14:40:30 kaleb $ + * $Xorg: RaAoA8.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/RaAoA8.c,v 1.2 1998/10/10 15:25:16 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/RaAoA8.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/Unwrap.c diff -u xc/lib/Xdmcp/Unwrap.c:1.2 xc/lib/Xdmcp/Unwrap.c:1.3 --- xc/lib/Xdmcp/Unwrap.c:1.2 Sat Oct 10 11:25:16 1998 +++ xc/lib/Xdmcp/Unwrap.c Wed Jan 17 14:42:44 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Unwrap.c /main/10 1998/02/06 14:41:06 kaleb $ + * $Xorg: Unwrap.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/Unwrap.c,v 1.2 1998/10/10 15:25:16 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/Unwrap.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/WA16.c diff -u xc/lib/Xdmcp/WA16.c:1.1.1.2 xc/lib/Xdmcp/WA16.c:1.1.1.3 --- xc/lib/Xdmcp/WA16.c:1.1.1.2 Sun Sep 27 03:53:06 1998 +++ xc/lib/Xdmcp/WA16.c Tue Jan 16 17:19:57 2001 @@ -1,5 +1,5 @@ /* - * $TOG: WA16.c /main/5 1998/02/06 14:41:12 kaleb $ + * $Xorg: WA16.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group Index: xc/lib/Xdmcp/WA32.c diff -u xc/lib/Xdmcp/WA32.c:1.1.1.2 xc/lib/Xdmcp/WA32.c:1.1.1.3 --- xc/lib/Xdmcp/WA32.c:1.1.1.2 Sun Sep 27 03:53:07 1998 +++ xc/lib/Xdmcp/WA32.c Tue Jan 16 17:19:58 2001 @@ -1,5 +1,5 @@ /* - * $TOG: WA32.c /main/5 1998/02/06 14:41:17 kaleb $ + * $Xorg: WA32.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group Index: xc/lib/Xdmcp/WA8.c diff -u xc/lib/Xdmcp/WA8.c:1.1.1.2 xc/lib/Xdmcp/WA8.c:1.1.1.3 --- xc/lib/Xdmcp/WA8.c:1.1.1.2 Sun Sep 27 03:53:08 1998 +++ xc/lib/Xdmcp/WA8.c Tue Jan 16 17:19:59 2001 @@ -1,5 +1,5 @@ /* - * $TOG: WA8.c /main/5 1998/02/06 14:41:21 kaleb $ + * $Xorg: WA8.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group Index: xc/lib/Xdmcp/WAofA8.c diff -u xc/lib/Xdmcp/WAofA8.c:1.1.1.2 xc/lib/Xdmcp/WAofA8.c:1.1.1.3 --- xc/lib/Xdmcp/WAofA8.c:1.1.1.2 Sun Sep 27 03:53:09 1998 +++ xc/lib/Xdmcp/WAofA8.c Tue Jan 16 17:20:01 2001 @@ -1,5 +1,5 @@ /* - * $TOG: WAofA8.c /main/6 1998/02/06 14:41:27 kaleb $ + * $Xorg: WAofA8.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group Index: xc/lib/Xdmcp/WC16.c diff -u xc/lib/Xdmcp/WC16.c:1.3 xc/lib/Xdmcp/WC16.c:1.4 --- xc/lib/Xdmcp/WC16.c:1.3 Sun Oct 25 02:11:19 1998 +++ xc/lib/Xdmcp/WC16.c Wed Jan 17 14:42:44 2001 @@ -1,5 +1,5 @@ /* - * $TOG: WC16.c /main/4 1998/02/06 14:41:31 kaleb $ + * $Xorg: WC16.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/WC16.c,v 1.3 1998/10/25 07:11:19 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/WC16.c,v 1.4 2001/01/17 19:42:44 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/WC32.c diff -u xc/lib/Xdmcp/WC32.c:1.3 xc/lib/Xdmcp/WC32.c:1.4 --- xc/lib/Xdmcp/WC32.c:1.3 Sun Oct 25 07:47:52 1998 +++ xc/lib/Xdmcp/WC32.c Wed Jan 17 14:42:44 2001 @@ -1,5 +1,5 @@ /* - * $TOG: WC32.c /main/4 1998/02/06 14:41:37 kaleb $ + * $Xorg: WC32.c,v 1.3 2000/08/17 19:45:50 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -22,7 +22,7 @@ * * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/WC32.c,v 1.3 1998/10/25 12:47:52 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/WC32.c,v 1.4 2001/01/17 19:42:44 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/WC8.c diff -u xc/lib/Xdmcp/WC8.c:1.3 xc/lib/Xdmcp/WC8.c:1.4 --- xc/lib/Xdmcp/WC8.c:1.3 Sun Oct 25 02:11:20 1998 +++ xc/lib/Xdmcp/WC8.c Wed Jan 17 14:42:44 2001 @@ -1,5 +1,5 @@ /* - * $TOG: WC8.c /main/4 1998/02/06 14:41:43 kaleb $ + * $Xorg: WC8.c,v 1.3 2000/08/17 19:45:50 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/WC8.c,v 1.3 1998/10/25 07:11:20 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/WC8.c,v 1.4 2001/01/17 19:42:44 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/Whead.c diff -u xc/lib/Xdmcp/Whead.c:1.2 xc/lib/Xdmcp/Whead.c:1.3 --- xc/lib/Xdmcp/Whead.c:1.2 Sat Oct 10 11:25:17 1998 +++ xc/lib/Xdmcp/Whead.c Wed Jan 17 14:42:44 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Whead.c /main/5 1998/02/06 14:41:48 kaleb $ + * $Xorg: Whead.c,v 1.3 2000/08/17 19:45:50 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/Whead.c,v 1.2 1998/10/10 15:25:17 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/Whead.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/Wrap.c diff -u xc/lib/Xdmcp/Wrap.c:1.2 xc/lib/Xdmcp/Wrap.c:1.3 --- xc/lib/Xdmcp/Wrap.c:1.2 Sat Oct 10 11:25:18 1998 +++ xc/lib/Xdmcp/Wrap.c Wed Jan 17 14:42:44 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Wrap.c /main/10 1998/02/06 14:41:53 kaleb $ + * $Xorg: Wrap.c,v 1.3 2000/08/17 19:45:50 cpqbld Exp $ * * Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/Wrap.c,v 1.2 1998/10/10 15:25:18 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/Wrap.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/Wrap.h diff -u xc/lib/Xdmcp/Wrap.h:1.2 xc/lib/Xdmcp/Wrap.h:1.3 --- xc/lib/Xdmcp/Wrap.h:1.2 Sat Oct 10 11:25:18 1998 +++ xc/lib/Xdmcp/Wrap.h Wed Jan 17 14:42:44 2001 @@ -1,9 +1,9 @@ -/* $XConsortium: Wrap.h,v 1.3 94/02/06 20:09:49 rws Exp $ */ +/* $Xorg: Wrap.h,v 1.3 2000/08/17 19:45:50 cpqbld Exp $ */ /* * header file for compatibility with something useful */ -/* $XFree86: xc/lib/Xdmcp/Wrap.h,v 1.2 1998/10/10 15:25:18 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/Wrap.h,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ typedef unsigned char auth_cblock[8]; /* block size */ Index: xc/lib/Xdmcp/Xdmcp.h diff -u xc/lib/Xdmcp/Xdmcp.h:3.3 xc/lib/Xdmcp/Xdmcp.h:3.4 --- xc/lib/Xdmcp/Xdmcp.h:3.3 Sun Oct 25 02:11:20 1998 +++ xc/lib/Xdmcp/Xdmcp.h Wed Jan 17 14:42:44 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: Xdmcp.h,v 1.9 95/06/07 18:30:59 gildea Exp $ */ +/* $Xorg: Xdmcp.h,v 1.6 2000/08/17 19:45:50 cpqbld Exp $ */ /* * Copyright 1989 Network Computing Devices, Inc., Mountain View, California. * @@ -13,7 +13,7 @@ * without express or implied warranty. * */ -/* $XFree86: xc/lib/Xdmcp/Xdmcp.h,v 3.3 1998/10/25 07:11:20 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/Xdmcp.h,v 3.4 2001/01/17 19:42:44 dawes Exp $ */ #ifndef _XDMCP_H_ #define _XDMCP_H_ Index: xc/lib/Xext/DPMS.c diff -u xc/lib/Xext/DPMS.c:3.3 xc/lib/Xext/DPMS.c:3.4 --- xc/lib/Xext/DPMS.c:3.3 Sun Mar 7 09:23:31 1999 +++ xc/lib/Xext/DPMS.c Wed Jan 17 14:42:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: DPMS.c /main/1 1997/11/12 14:37:05 kaleb $ */ +/* $Xorg: DPMS.c,v 1.3 2000/08/17 19:45:50 cpqbld Exp $ */ /***************************************************************** Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts. @@ -26,7 +26,7 @@ Equipment Corporation. ******************************************************************/ -/* $XFree86: xc/lib/Xext/DPMS.c,v 3.3 1999/03/07 14:23:31 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/DPMS.c,v 3.4 2001/01/17 19:42:46 dawes Exp $ */ /* * HISTORY Index: xc/lib/Xext/Imakefile diff -u xc/lib/Xext/Imakefile:1.10 xc/lib/Xext/Imakefile:1.11 --- xc/lib/Xext/Imakefile:1.10 Sun Feb 27 18:10:03 2000 +++ xc/lib/Xext/Imakefile Wed Jan 17 14:42:46 2001 @@ -1,5 +1,10 @@ -XCOMM $TOG: Imakefile /main/62 1997/11/24 16:48:16 kaleb $ -XCOMM $XFree86: xc/lib/Xext/Imakefile,v 1.10 2000/02/27 23:10:03 mvojkovi Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:45:50 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/Xext/Imakefile,v 1.11 2001/01/17 19:42:46 dawes Exp $ + #define DoNormalLib NormalLibXext #define DoSharedLib SharedLibXext #define DoExtraLib SharedLibXext Index: xc/lib/Xext/MITMisc.c diff -u xc/lib/Xext/MITMisc.c:1.1.1.2 xc/lib/Xext/MITMisc.c:1.1.1.3 --- xc/lib/Xext/MITMisc.c:1.1.1.2 Sun Sep 27 03:58:54 1998 +++ xc/lib/Xext/MITMisc.c Tue Jan 16 17:20:13 2001 @@ -1,5 +1,5 @@ /* - * $TOG: MITMisc.c /main/7 1998/02/06 14:51:08 kaleb $ + * $Xorg: MITMisc.c,v 1.3 2000/08/17 19:45:51 cpqbld Exp $ * Copyright 1989, 1998 The Open Group Index: xc/lib/Xext/XAppgroup.c diff -u xc/lib/Xext/XAppgroup.c:1.6 xc/lib/Xext/XAppgroup.c:1.7 --- xc/lib/Xext/XAppgroup.c:1.6 Mon Jul 12 01:57:21 1999 +++ xc/lib/Xext/XAppgroup.c Wed Jan 17 14:42:46 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/Xext/XAppgroup.c,v 1.6 1999/07/12 05:57:21 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XAppgroup.c,v 1.7 2001/01/17 19:42:46 dawes Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $TOG: XAppgroup.c /main/6 1998/02/06 14:51:14 kaleb $ */ +/* $Xorg: XAppgroup.c,v 1.4 2000/08/17 19:45:51 cpqbld Exp $ */ #ifdef WIN32 #define BOOL wBOOL Index: xc/lib/Xext/XEVI.c diff -u xc/lib/Xext/XEVI.c:1.5 xc/lib/Xext/XEVI.c:1.6 --- xc/lib/Xext/XEVI.c:1.5 Sat Oct 3 05:25:26 1998 +++ xc/lib/Xext/XEVI.c Wed Jan 17 14:42:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: XEVI.c /main/2 1998/01/11 08:40:32 kaleb $ */ +/* $Xorg: XEVI.c,v 1.3 2000/08/17 19:45:51 cpqbld Exp $ */ /************************************************************ Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. Permission to use, copy, modify, and distribute this Index: xc/lib/Xext/XLbx.c diff -u xc/lib/Xext/XLbx.c:1.2 xc/lib/Xext/XLbx.c:1.3 --- xc/lib/Xext/XLbx.c:1.2 Mon Jul 12 01:57:21 1999 +++ xc/lib/Xext/XLbx.c Wed Jan 17 14:42:46 2001 @@ -1,5 +1,5 @@ /* - * $XConsortium: XLbx.c /main/4 1996/12/15 21:24:20 rws $ + * $Xorg: XLbx.c,v 1.3 2000/08/17 19:45:51 cpqbld Exp $ * * Copyright 1992 Network Computing Devices * @@ -22,7 +22,7 @@ * * Author: Keith Packard, Network Computing Devices */ -/* $XFree86: xc/lib/Xext/XLbx.c,v 1.2 1999/07/12 05:57:21 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XLbx.c,v 1.3 2001/01/17 19:42:46 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES Index: xc/lib/Xext/XMultibuf.c diff -u xc/lib/Xext/XMultibuf.c:1.3 xc/lib/Xext/XMultibuf.c:1.4 --- xc/lib/Xext/XMultibuf.c:1.3 Tue Sep 26 11:56:56 2000 +++ xc/lib/Xext/XMultibuf.c Wed Jan 17 14:42:46 2001 @@ -1,5 +1,5 @@ /* - * $TOG: XMultibuf.c /main/32 1998/02/06 14:51:46 kaleb $ + * $Xorg: XMultibuf.c,v 1.5 2000/08/17 19:45:51 cpqbld Exp $ * Copyright 1989, 1998 The Open Group @@ -21,7 +21,7 @@ * * Authors: Jim Fulton, MIT X Consortium */ -/* $XFree86: xc/lib/Xext/XMultibuf.c,v 1.3 2000/09/26 15:56:56 tsi Exp $ */ +/* $XFree86: xc/lib/Xext/XMultibuf.c,v 1.4 2001/01/17 19:42:46 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES Index: xc/lib/Xext/XSecurity.c diff -u xc/lib/Xext/XSecurity.c:1.2 xc/lib/Xext/XSecurity.c:1.3 --- xc/lib/Xext/XSecurity.c:1.2 Mon Jul 12 01:57:22 1999 +++ xc/lib/Xext/XSecurity.c Wed Jan 17 14:42:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: XSecurity.c /main/6 1998/02/06 14:51:57 kaleb $ */ +/* $Xorg: XSecurity.c,v 1.5 2000/08/17 19:45:51 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xext/XSecurity.c,v 1.2 1999/07/12 05:57:22 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XSecurity.c,v 1.3 2001/01/17 19:42:46 dawes Exp $ */ #include #include Index: xc/lib/Xext/XShape.c diff -u xc/lib/Xext/XShape.c:1.1.1.2 xc/lib/Xext/XShape.c:1.1.1.3 --- xc/lib/Xext/XShape.c:1.1.1.2 Sun Sep 27 03:58:55 1998 +++ xc/lib/Xext/XShape.c Tue Jan 16 17:20:23 2001 @@ -1,5 +1,5 @@ /* - * $TOG: XShape.c /main/26 1998/02/06 14:52:03 kaleb $ + * $Xorg: XShape.c,v 1.3 2000/08/17 19:45:51 cpqbld Exp $ * Copyright 1989, 1998 The Open Group Index: xc/lib/Xext/XShm.c diff -u xc/lib/Xext/XShm.c:1.2 xc/lib/Xext/XShm.c:1.3 --- xc/lib/Xext/XShm.c:1.2 Mon Jul 12 01:57:23 1999 +++ xc/lib/Xext/XShm.c Wed Jan 17 14:42:46 2001 @@ -1,5 +1,5 @@ /* - * $TOG: XShm.c /main/19 1998/02/11 15:41:35 kaleb $ + * $Xorg: XShm.c,v 1.3 2000/08/17 19:45:52 cpqbld Exp $ * Copyright 1989, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Bob Scheifler and Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xext/XShm.c,v 1.2 1999/07/12 05:57:23 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XShm.c,v 1.3 2001/01/17 19:42:46 dawes Exp $ */ /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ Index: xc/lib/Xext/XSync.c diff -u xc/lib/Xext/XSync.c:1.3 xc/lib/Xext/XSync.c:1.4 --- xc/lib/Xext/XSync.c:1.3 Mon Jul 12 06:11:45 1999 +++ xc/lib/Xext/XSync.c Wed Jan 17 14:42:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: XSync.c /main/10 1998/02/06 14:52:15 kaleb $ */ +/* $Xorg: XSync.c,v 1.4 2000/08/17 19:45:52 cpqbld Exp $ */ /* Copyright 1991, 1993, 1998 The Open Group @@ -46,7 +46,7 @@ PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xext/XSync.c,v 1.3 1999/07/12 10:11:45 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XSync.c,v 1.4 2001/01/17 19:42:46 dawes Exp $ */ #include #define NEED_EVENTS Index: xc/lib/Xext/XTestExt1.c diff -u xc/lib/Xext/XTestExt1.c:1.2 xc/lib/Xext/XTestExt1.c:1.3 --- xc/lib/Xext/XTestExt1.c:1.2 Mon Jul 12 01:57:24 1999 +++ xc/lib/Xext/XTestExt1.c Wed Jan 17 14:42:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: XTestExt1.c /main/10 1998/02/15 16:19:21 kaleb $ */ +/* $Xorg: XTestExt1.c,v 1.3 2000/08/17 19:45:52 cpqbld Exp $ */ /* * File: xtestext1lib.c * @@ -47,7 +47,7 @@ University of California. */ -/* $XFree86: xc/lib/Xext/XTestExt1.c,v 1.2 1999/07/12 05:57:24 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XTestExt1.c,v 1.3 2001/01/17 19:42:46 dawes Exp $ */ /****************************************************************************** * include files Index: xc/lib/Xext/Xcup.c diff -u xc/lib/Xext/Xcup.c:1.4 xc/lib/Xext/Xcup.c:1.5 --- xc/lib/Xext/Xcup.c:1.4 Mon Jul 12 01:57:24 1999 +++ xc/lib/Xext/Xcup.c Wed Jan 17 14:42:46 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/Xext/Xcup.c,v 1.4 1999/07/12 05:57:24 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/Xcup.c,v 1.5 2001/01/17 19:42:46 dawes Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $TOG: Xcup.c /main/4 1998/02/06 14:51:19 kaleb $ */ +/* $Xorg: Xcup.c,v 1.4 2000/08/17 19:45:53 cpqbld Exp $ */ #ifdef WIN32 #define BOOL wBOOL Index: xc/lib/Xext/Xdbe.c diff -u xc/lib/Xext/Xdbe.c:3.2 xc/lib/Xext/Xdbe.c:3.4 --- xc/lib/Xext/Xdbe.c:3.2 Tue Sep 26 11:56:56 2000 +++ xc/lib/Xext/Xdbe.c Sun Apr 1 10:00:01 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: Xdbe.c /main/3 1995/09/22 10:20:31 dpw $ */ +/* $Xorg: Xdbe.c,v 1.4 2000/08/17 19:45:53 cpqbld Exp $ */ /****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company @@ -30,7 +30,7 @@ * Xlib DBE code * *****************************************************************************/ -/* $XFree86: xc/lib/Xext/Xdbe.c,v 3.2 2000/09/26 15:56:56 tsi Exp $ */ +/* $XFree86: xc/lib/Xext/Xdbe.c,v 3.4 2001/04/01 14:00:01 tsi Exp $ */ #define NEED_EVENTS #define NEED_REPLIES @@ -430,7 +430,7 @@ int j; long c; - _XRead32 (dpy, (long *)&c, sizeof(CARD32)); + _XRead32 (dpy, &c, sizeof(CARD32)); scrVisInfo[i].count = c; nbytes = scrVisInfo[i].count * sizeof(XdbeVisualInfo); Index: xc/lib/Xext/Xext-def.cpp diff -u xc/lib/Xext/Xext-def.cpp:1.6 xc/lib/Xext/Xext-def.cpp:1.8 --- xc/lib/Xext/Xext-def.cpp:1.6 Wed Aug 9 19:40:13 2000 +++ xc/lib/Xext/Xext-def.cpp Sun May 6 06:35:51 2001 @@ -102,8 +102,6 @@ XSecurityFreeXauth XSecurityGenerateAuthorization XSecurityRevokeAuthorization - XLbxQueryExtension - XLbxQueryVersion XagQueryVersion XagCreateAssociation XagCreateEmbeddedApplicationGroup @@ -138,5 +136,5 @@ XeviQueryExtension XeviQueryVersion XeviGetVisualInfo -/* $TOG: Xext-def.cpp /main/10 1998/01/04 12:31:45 kaleb $ */ -/* $XFree86: xc/lib/Xext/Xext-def.cpp,v 1.6 2000/08/09 23:40:13 dawes Exp $ */ +/* $Xorg: Xext-def.cpp,v 1.3 2000/08/17 19:45:53 cpqbld Exp $ */ +/* $XFree86: xc/lib/Xext/Xext-def.cpp,v 1.8 2001/05/06 10:35:51 alanh Exp $ */ Index: xc/lib/Xext/extutil.c diff -u xc/lib/Xext/extutil.c:1.1.1.3 xc/lib/Xext/extutil.c:1.1.1.4 --- xc/lib/Xext/extutil.c:1.1.1.3 Sun Sep 27 03:58:58 1998 +++ xc/lib/Xext/extutil.c Tue Jan 16 17:20:32 2001 @@ -1,5 +1,5 @@ /* - * $TOG: extutil.c /main/20 1998/02/06 14:50:55 kaleb $ + * $Xorg: extutil.c,v 1.3 2000/08/17 19:45:53 cpqbld Exp $ * Copyright 1989, 1998 The Open Group Index: xc/lib/Xext/globals.c diff -u xc/lib/Xext/globals.c:3.1 xc/lib/Xext/globals.c:3.2 --- xc/lib/Xext/globals.c:3.1 Sat Oct 3 05:06:03 1998 +++ xc/lib/Xext/globals.c Wed Jan 17 14:42:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: globals.c /main/6 1998/02/06 14:51:01 kaleb $ */ +/* $Xorg: globals.c,v 1.3 2000/08/17 19:45:53 cpqbld Exp $ */ /* Copyright 1989, 1998 The Open Group Index: xc/lib/Xft/Imakefile diff -u xc/lib/Xft/Imakefile:1.8.2.1 xc/lib/Xft/Imakefile:1.14 --- xc/lib/Xft/Imakefile:1.8.2.1 Mon Mar 12 11:03:23 2001 +++ xc/lib/Xft/Imakefile Fri Apr 27 10:55:22 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/Xft/Imakefile,v 1.8.2.1 2001/03/12 16:03:23 keithp Exp $ +XCOMM $XFree86: xc/lib/Xft/Imakefile,v 1.14 2001/04/27 14:55:22 tsi Exp $ #define DoNormalLib NormalLibXft #define DoSharedLib SharedLibXft @@ -29,25 +29,30 @@ CONFIG_DEFS=-DXFT_TYPE1_DIR=\"$(TYPE1DIR)\" INCLUDES=$(FREETYPE2INCLUDES) DEFINES=-DXFT_DEFAULT_PATH=\"$(XFTCONFIG)\" $(FREETYPE2DEFINES) $(RENDERDEFINES) -REQUIREDLIBS=$(LDPRELIBS) $(XRENDERLIB) $(XLIB) $(FREETYPE2LIB) -#if HasFreetype2 +#if UseFreetype2 +FREETYPE2REQLIB = $(FREETYPE2LIB) +#endif + +REQUIREDLIBS=$(LDPRELIBS) $(XRENDERLIB) $(XLIB) $(FREETYPE2REQLIB) + +#if UseFreetype2 FT_HEADERS = XftFreetype.h - FT_SRCS = xftdir.c xftfreetype.c xftglyphs.c xftrender.c - FT_OBJS = xftdir.o xftfreetype.o xftglyphs.o xftrender.o + FT_SRCS = xftcache.c xftdir.c xftfreetype.c xftglyphs.c xftrender.c + FT_OBJS = xftcache.o xftdir.o xftfreetype.o xftglyphs.o xftrender.o #endif HEADERS = Xft.h $(FT_HEADERS) SRCS = xftcfg.c xftcolor.c xftcore.c xftdbg.c xftdpy.c \ xftdraw.c xftextent.c xftfont.c xftfs.c xftgram.c \ - xftinit.c xftlex.c xftlist.c xftmatch.c xftname.c \ - xftpat.c xftstr.c xftxlfd.c $(FT_SRCS) + xftinit.c xftlex.c xftlist.c xftmatch.c xftmatrix.c \ + xftname.c xftpat.c xftstr.c xftxlfd.c $(FT_SRCS) OBJS = xftcfg.o xftcolor.o xftcore.o xftdbg.o xftdpy.o \ xftdraw.o xftextent.o xftfont.o xftfs.o xftgram.o \ - xftinit.o xftlex.o xftlist.o xftmatch.o xftname.o \ - xftpat.o xftstr.o xftxlfd.o $(FT_OBJS) + xftinit.o xftlex.o xftlist.o xftmatch.o xftmatrix.o \ + xftname.o xftpat.o xftstr.o xftxlfd.o $(FT_OBJS) #include @@ -58,6 +63,8 @@ SpecialCObjectRule(sharedlib,NullParameter,$(SHLIBDEF)) #endif +all:: XftConfig + CppFileTarget(XftConfig,XftConfig.cpp,$(CONFIG_DEFS),$(ICONFIGFILES)) #if InstallFSConfig @@ -65,6 +72,8 @@ #else InstallNonExecFileNoClobber(XftConfig,$(XFTLIBDIR)) #endif + +LinkConfFileLong(XftConfig,XftConfig,$(XFTLIBDIR),$(CONFDIR)) MANSUFFIX = $(LIBMANSUFFIX) InstallManPage(Xft,$(LIBMANDIR)) Index: xc/lib/Xft/Xft-def.cpp diff -u /dev/null xc/lib/Xft/Xft-def.cpp:1.2 --- /dev/null Mon Jun 4 12:38:29 2001 +++ xc/lib/Xft/Xft-def.cpp Thu Apr 5 15:29:38 2001 @@ -0,0 +1,150 @@ +LIBRARY Xft +VERSION LIBRARY_VERSION +EXPORTS + +XftConfigAddDir +XftConfigAddEdit +XftConfigGetCache +XftConfigSetCache +XftConfigSubstitute +_XftConfigCompareValue +XftColorAllocName +XftColorAllocValue +XftColorFree +XftCoreConvert16 +XftCoreConvert32 +XftCoreConvertUtf8 +XftCoreExtents16 +XftCoreExtents32 +XftCoreExtents8 +XftCoreExtentsUtf8 +XftCoreGlyphExists +XftEditPrint +XftExprPrint +XftFontSetPrint +XftOpPrint +XftPatternPrint +XftSubstPrint +XftTestPrint +XftValueListPrint +XftValuePrint +XftDefaultGetBool +XftDefaultGetDouble +XftDefaultGetInteger +XftDefaultHasRender +XftDefaultParseBool +XftDefaultSet +XftDefaultSubstitute +XftDisplayGetFontSet +XftDrawChange +XftDrawCorePrepare +XftDrawCreate +XftDrawCreateBitmap +XftDrawDestroy +XftDrawRect +XftDrawRenderPrepare +XftDrawSetClip +XftDrawString16 +XftDrawString32 +XftDrawString8 +XftDrawStringUtf8 +XftTextExtents16 +XftTextExtents32 +XftTextExtents8 +XftTextExtentsUtf8 +XftFontClose +XftFontMatch +XftFontOpen +XftFontOpenName +XftFontOpenPattern +XftFontOpenXlfd +XftGlyphExists +_XftFontDebug +XftFontSetAdd +XftFontSetCreate +XftFontSetDestroy +XftConfigSaveField +XftConfigerror +XftConfigparse +XftConfigwrap +XftEditCreate +XftEditDestroy +XftExprCreateBool +XftExprCreateDouble +XftExprCreateField +XftExprCreateInteger +XftExprCreateNil +XftExprCreateOp +XftExprCreateString +XftExprDestroy +XftTestCreate +XftInit +XftConfigLexFile +XftConfigPushInput +XftConfig_create_buffer +XftConfig_delete_buffer +XftConfig_flush_buffer +XftConfig_init_buffer +XftConfig_load_buffer_state +XftConfig_scan_buffer +XftConfig_scan_bytes +XftConfig_scan_string +XftConfig_switch_to_buffer +XftConfiglex +XftConfigrestart +XftListAppend +XftListFontSets +XftListFonts +XftListFontsPatternObjects +XftListMatch +XftListValueCompare +XftListValueListCompare +XftObjectSetAdd +XftObjectSetBuild +XftObjectSetCreate +XftObjectSetDestroy +XftObjectSetVaBuild +XftFontSetMatch +XftNameConstant +XftNameParse +XftNameUnparse +XftPatternAdd +XftPatternAddBool +XftPatternAddDouble +XftPatternAddInteger +XftPatternAddString +XftPatternBuild +XftPatternCreate +XftPatternDel +XftPatternDestroy +XftPatternDuplicate +XftPatternFind +XftPatternGet +XftPatternGetBool +XftPatternGetDouble +XftPatternGetInteger +XftPatternGetString +XftPatternVaBuild +XftValueDestroy +XftValueListDestroy +XftUtf8Len +XftUtf8ToUcs4 +_XftDownStr +_XftGetInt +_XftMatchSymbolic +_XftSaveString +_XftSplitField +_XftSplitStr +_XftSplitValue +_XftStrCmpIgnoreCase +XftCoreAddFonts +XftCoreClose +XftCoreOpen +XftXlfdParse +XftInitFtLibrary +XftConfigDirs +XftDirScan +XftDirSave + + +/* $XFree86: xc/lib/Xft/Xft-def.cpp,v 1.2 2001/04/05 19:29:38 dawes Exp $ */ Index: xc/lib/Xft/Xft.h diff -u xc/lib/Xft/Xft.h:1.13 xc/lib/Xft/Xft.h:1.19 --- xc/lib/Xft/Xft.h:1.13 Fri Dec 8 02:51:26 2000 +++ xc/lib/Xft/Xft.h Sat Apr 28 23:21:17 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/Xft.h,v 1.13 2000/12/08 07:51:26 keithp Exp $ + * $XFree86: xc/lib/Xft/Xft.h,v 1.19 2001/04/29 03:21:17 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -57,10 +57,13 @@ /* defaults from resources */ #define XFT_SCALE "scale" /* double */ #define XFT_RENDER "render" /* Bool */ +#define XFT_MINSPACE "minspace" /* Bool use minimum line spacing */ +#define XFT_DPI "dpi" /* double */ /* specific to FreeType rasterizer */ #define XFT_CHAR_WIDTH "charwidth" /* Int */ #define XFT_CHAR_HEIGHT "charheight"/* Int */ +#define XFT_MATRIX "matrix" /* XftMatrix */ #define XFT_WEIGHT_LIGHT 0 #define XFT_WEIGHT_MEDIUM 100 @@ -79,15 +82,25 @@ #define XFT_RGBA_NONE 0 #define XFT_RGBA_RGB 1 #define XFT_RGBA_BGR 2 +#define XFT_RGBA_VRGB 3 +#define XFT_RGBA_VBGR 4 typedef enum _XftType { XftTypeVoid, XftTypeInteger, XftTypeDouble, XftTypeString, - XftTypeBool + XftTypeBool, + XftTypeMatrix } XftType; +typedef struct _XftMatrix { + double xx, xy, yx, yy; +} XftMatrix; + +#define XftMatrixInit(m) ((m)->xx = (m)->yy = 1, \ + (m)->xy = (m)->yx = 0) + typedef enum _XftResult { XftResultMatch, XftResultNoMatch, XftResultTypeMismatch, XftResultNoId } XftResult; @@ -99,6 +112,7 @@ int i; Bool b; double d; + XftMatrix *m; } u; } XftValue; @@ -254,7 +268,17 @@ int y, XftChar32 *string, int len); + void +XftDrawStringUtf8 (XftDraw *d, + XftColor *color, + XftFont *font, + int x, + int y, + XftChar8 *string, + int len); + +void XftDrawRect (XftDraw *d, XftColor *color, int x, @@ -290,6 +314,13 @@ int len, XGlyphInfo *extents); +void +XftTextExtentsUtf8 (Display *dpy, + XftFont *font, + XftChar8 *string, + int len, + XGlyphInfo *extents); + /* xftfont.c */ XftPattern * XftFontMatch (Display *dpy, int screen, XftPattern *pattern, XftResult *result); @@ -375,10 +406,29 @@ XftPattern *p, XftResult *result); +/* xftmatrix.c */ +int +XftMatrixEqual (const XftMatrix *mat1, const XftMatrix *mat2); + +void +XftMatrixMultiply (XftMatrix *result, XftMatrix *a, XftMatrix *b); + +void +XftMatrixRotate (XftMatrix *m, double c, double s); + +void +XftMatrixScale (XftMatrix *m, double sx, double sy); + +void +XftMatrixShear (XftMatrix *m, double sh, double sv); + /* xftname.c */ XftPattern * XftNameParse (const char *name); +Bool +XftNameUnparse (XftPattern *pat, char *dest, int len); + /* xftpat.c */ XftPattern * XftPatternCreate (void); @@ -417,6 +467,9 @@ XftPatternAddString (XftPattern *p, const char *object, const char *s); Bool +XftPatternAddMatrix (XftPattern *p, const char *object, const XftMatrix *s); + +Bool XftPatternAddBool (XftPattern *p, const char *object, Bool b); XftResult @@ -429,6 +482,9 @@ XftPatternGetString (XftPattern *p, const char *object, int n, char **s); XftResult +XftPatternGetMatrix (XftPattern *p, const char *object, int n, XftMatrix **s); + +XftResult XftPatternGetBool (XftPattern *p, const char *object, int n, Bool *b); XftPattern * @@ -442,12 +498,26 @@ /* xftstr.c */ +int +XftUtf8ToUcs4 (XftChar8 *src_orig, + XftChar32 *dst, + int len); + +Bool +XftUtf8Len (XftChar8 *string, + int len, + int *nchar, + int *wchar); + /* xftxlfd.c */ XftPattern * XftXlfdParse (const char *xlfd_orig, Bool ignore_scalable, Bool complete); XFontStruct * XftCoreOpen (Display *dpy, XftPattern *pattern); + +void +XftCoreClose (Display *dpy, XFontStruct *font); _XFUNCPROTOEND Index: xc/lib/Xft/XftConfig.cpp diff -u xc/lib/Xft/XftConfig.cpp:1.5 xc/lib/Xft/XftConfig.cpp:1.6 --- xc/lib/Xft/XftConfig.cpp:1.5 Thu Dec 14 18:03:53 2000 +++ xc/lib/Xft/XftConfig.cpp Fri Apr 27 10:55:22 2001 @@ -1,28 +1,28 @@ -# $XFree86: xc/lib/Xft/XftConfig.cpp,v 1.5 2000/12/14 23:03:53 keithp Exp $ +XCOMM $XFree86: xc/lib/Xft/XftConfig.cpp,v 1.6 2001/04/27 14:55:22 tsi Exp $ dir XFT_TYPE1_DIR -# -# alias 'fixed' for 'mono' -# +XCOMM +XCOMM alias 'fixed' for 'mono' +XCOMM match any family == "fixed" edit family =+ "mono"; -# -# Check users config file -# +XCOMM +XCOMM Check users config file +XCOMM includeif "~/.xftconfig" -# -# Use Lucidux fonts for default faces -# +XCOMM +XCOMM Use Lucidux fonts for default faces +XCOMM match any family == "serif" edit family += "LuciduxSerif"; match any family == "sans" edit family += "LuciduxSans"; match any family == "mono" edit family += "LuciduxMono"; -# -# Alias between XLFD families and font file family name, prefer local -# fonts -# +XCOMM +XCOMM Alias between XLFD families and font file family name, prefer local +XCOMM fonts +XCOMM match any family == "charter" edit family += "bitstream charter"; match any family == "bitstream charter" edit family =+ "charter"; Index: xc/lib/Xft/XftFreetype.h diff -u xc/lib/Xft/XftFreetype.h:1.7 xc/lib/Xft/XftFreetype.h:1.15 --- xc/lib/Xft/XftFreetype.h:1.7 Fri Dec 15 12:12:52 2000 +++ xc/lib/Xft/XftFreetype.h Sat Mar 31 18:07:29 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/XftFreetype.h,v 1.7 2000/12/15 17:12:52 keithp Exp $ + * $XFree86: xc/lib/Xft/XftFreetype.h,v 1.15 2001/03/31 23:07:29 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -38,29 +38,50 @@ GlyphSet glyphset; int min_char; int max_char; - int size; + FT_F26Dot6 size; int ascent; int descent; int height; int max_advance_width; - Bool monospace; + int spacing; int rgba; Bool antialias; - Bool encoded; /* use charmap */ + int charmap; /* -1 for unencoded */ XRenderPictFormat *format; XGlyphInfo **realized; int nrealized; + Bool transform; + FT_Matrix matrix; }; _XFUNCPROTOBEGIN +/* xftdir.c */ +Bool +XftDirScan (XftFontSet *set, const char *dir, Bool force); + +Bool +XftDirSave (XftFontSet *set, const char *dir); + /* xftfreetype.c */ +XftPattern * +XftFreeTypeQuery (const char *file, int id, int *count); + +Bool +XftFreeTypeSetFace (FT_Face face, FT_F26Dot6 size, int charmap, FT_Matrix *matrix); + XftFontStruct * XftFreeTypeOpen (Display *dpy, XftPattern *pattern); void XftFreeTypeClose (Display *dpy, XftFontStruct *font); +XftFontStruct * +XftFreeTypeGet (XftFont *font); + +Bool +XftInitFtLibrary(void); + /* xftglyphs.c */ void XftGlyphLoad (Display *dpy, @@ -104,6 +125,13 @@ XftChar32 *string, int len); void +XftRenderStringUtf8 (Display *dpy, Picture src, + XftFontStruct *font, Picture dst, + int srcx, int srcy, + int x, int y, + XftChar8 *string, int len); + +void XftRenderExtents8 (Display *dpy, XftFontStruct *font, XftChar8 *string, @@ -124,8 +152,12 @@ int len, XGlyphInfo *extents); -XftFontStruct * -XftFreeTypeGet (XftFont *font); +void +XftRenderExtentsUtf8 (Display *dpy, + XftFontStruct *font, + XftChar8 *string, + int len, + XGlyphInfo *extents); _XFUNCPROTOEND Index: xc/lib/Xft/xftcache.c diff -u /dev/null xc/lib/Xft/xftcache.c:1.1 --- /dev/null Mon Jun 4 12:38:30 2001 +++ xc/lib/Xft/xftcache.c Mon Jan 1 21:46:51 2001 @@ -0,0 +1,608 @@ +/* + * $XFree86: xc/lib/Xft/xftcache.c,v 1.1 2001/01/02 02:46:51 keithp Exp $ + * + * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "xftint.h" + +typedef struct _XftFileCacheEnt { + struct _XftFileCacheEnt *next; + unsigned int hash; + char *file; + int id; + time_t time; + char *name; + Bool referenced; +} XftFileCacheEnt; + +#define HASH_SIZE 509 + +typedef struct _XftFileCache { + XftFileCacheEnt *ents[HASH_SIZE]; + Bool updated; + int entries; + int referenced; +} XftFileCache; + +static XftFileCache _XftFileCache; + +static unsigned int +_XftFileCacheHash (char *string) +{ + unsigned int h = 0; + char c; + + while ((c = *string++)) + h = (h << 1) ^ c; + return h; +} + +char * +XftFileCacheFind (char *file, int id, int *count) +{ + XftFileCache *cache; + unsigned int hash; + char *match; + XftFileCacheEnt *c, *name; + int maxid; + struct stat statb; + + cache = &_XftFileCache; + match = file; + + hash = _XftFileCacheHash (match); + name = 0; + maxid = -1; + for (c = cache->ents[hash % HASH_SIZE]; c; c = c->next) + { + if (c->hash == hash && !strcmp (match, c->file)) + { + if (c->id > maxid) + maxid = c->id; + if (c->id == id) + { + if (stat (file, &statb) < 0) + { + if (_XftFontDebug () & XFT_DBG_CACHE) + printf (" file missing\n"); + return 0; + } + if (statb.st_mtime != c->time) + { + if (_XftFontDebug () & XFT_DBG_CACHE) + printf (" timestamp mismatch (was %d is %d)\n", + (int) c->time, (int) statb.st_mtime); + return 0; + } + if (!c->referenced) + { + cache->referenced++; + c->referenced = True; + } + name = c; + } + } + } + if (!name) + return 0; + *count = maxid; + return name->name; +} + +/* + * Cache file syntax is quite simple: + * + * "file_name" id time "font_name" \n + */ + +static Bool +_XftFileCacheReadString (FILE *f, char *dest, int len) +{ + int c; + Bool escape; + + while ((c = getc (f)) != EOF) + if (c == '"') + break; + if (c == EOF) + return False; + if (len == 0) + return False; + + escape = False; + while ((c = getc (f)) != EOF) + { + if (!escape) + { + switch (c) { + case '"': + *dest++ = '\0'; + return True; + case '\\': + escape = True; + continue; + } + } + if (--len <= 1) + return False; + *dest++ = c; + escape = False; + } + return False; +} + +static Bool +_XftFileCacheReadUlong (FILE *f, unsigned long *dest) +{ + unsigned long t; + int c; + + while ((c = getc (f)) != EOF) + { + if (!isspace (c)) + break; + } + if (c == EOF) + return False; + t = 0; + for (;;) + { + if (c == EOF || isspace (c)) + break; + if (!isdigit (c)) + return False; + t = t * 10 + (c - '0'); + c = getc (f); + } + *dest = t; + return True; +} + +static Bool +_XftFileCacheReadInt (FILE *f, int *dest) +{ + unsigned long t; + Bool ret; + + ret = _XftFileCacheReadUlong (f, &t); + if (ret) + *dest = (int) t; + return ret; +} + +static Bool +_XftFileCacheReadTime (FILE *f, time_t *dest) +{ + unsigned long t; + Bool ret; + + ret = _XftFileCacheReadUlong (f, &t); + if (ret) + *dest = (time_t) t; + return ret; +} + +static Bool +_XftFileCacheAdd (XftFileCache *cache, + char *file, + int id, + time_t time, + char *name, + Bool replace) +{ + XftFileCacheEnt *c; + XftFileCacheEnt **prev, *old; + unsigned int hash; + + if (_XftFontDebug () & XFT_DBG_CACHE) + { + printf ("%s face %s/%d as %s\n", replace ? "Replace" : "Add", + file, id, name); + } + hash = _XftFileCacheHash (file); + for (prev = &cache->ents[hash % HASH_SIZE]; + (old = *prev); + prev = &(*prev)->next) + { + if (old->hash == hash && old->id == id && !strcmp (old->file, file)) + break; + } + if (*prev) + { + if (!replace) + return False; + + old = *prev; + if (old->referenced) + cache->referenced--; + *prev = old->next; + free (old); + cache->entries--; + } + + c = malloc (sizeof (XftFileCacheEnt) + + strlen (file) + 1 + + strlen (name) + 1); + if (!c) + return False; + c->next = *prev; + *prev = c; + c->hash = hash; + c->file = (char *) (c + 1); + c->id = id; + c->name = c->file + strlen (file) + 1; + strcpy (c->file, file); + c->time = time; + c->referenced = replace; + strcpy (c->name, name); + cache->entries++; + return True; +} + +void +XftFileCacheDispose (void) +{ + XftFileCache *cache; + XftFileCacheEnt *c, *next; + int h; + + cache = &_XftFileCache; + + for (h = 0; h < HASH_SIZE; h++) + { + for (c = cache->ents[h]; c; c = next) + { + next = c->next; + free (c); + } + cache->ents[h] = 0; + } + cache->entries = 0; + cache->referenced = 0; + cache->updated = False; +} + +void +XftFileCacheLoad (char *cache_file) +{ + XftFileCache *cache; + FILE *f; + char file[8192]; + int id; + time_t time; + char name[8192]; + + f = fopen (cache_file, "r"); + if (!f) + return; + + cache = &_XftFileCache; + + cache->updated = False; + while (_XftFileCacheReadString (f, file, sizeof (file)) && + _XftFileCacheReadInt (f, &id) && + _XftFileCacheReadTime (f, &time) && + _XftFileCacheReadString (f, name, sizeof (name))) + { + (void) _XftFileCacheAdd (cache, file, id, time, name, False); + } + fclose (f); +} + +Bool +XftFileCacheUpdate (char *file, int id, char *name) +{ + XftFileCache *cache; + char *match; + struct stat statb; + Bool ret; + + cache = &_XftFileCache; + match = file; + + if (stat (file, &statb) < 0) + return False; + ret = _XftFileCacheAdd (cache, match, id, + statb.st_mtime, name, True); + if (ret) + cache->updated = True; + return ret; +} + +static Bool +_XftFileCacheWriteString (FILE *f, char *string) +{ + char c; + + if (putc ('"', f) == EOF) + return False; + while ((c = *string++)) + { + switch (c) { + case '"': + case '\\': + if (putc ('\\', f) == EOF) + return False; + /* fall through */ + default: + if (putc (c, f) == EOF) + return False; + } + } + if (putc ('"', f) == EOF) + return False; + return True; +} + +static Bool +_XftFileCacheWriteUlong (FILE *f, unsigned long t) +{ + int pow; + unsigned long temp, digit; + + temp = t; + pow = 1; + while (temp >= 10) + { + temp /= 10; + pow *= 10; + } + temp = t; + while (pow) + { + digit = temp / pow; + if (putc ((char) digit + '0', f) == EOF) + return False; + temp = temp - pow * digit; + pow = pow / 10; + } + return True; +} + +static Bool +_XftFileCacheWriteInt (FILE *f, int i) +{ + return _XftFileCacheWriteUlong (f, (unsigned long) i); +} + +static Bool +_XftFileCacheWriteTime (FILE *f, time_t t) +{ + return _XftFileCacheWriteUlong (f, (unsigned long) t); +} + +Bool +XftFileCacheSave (char *cache_file) +{ + XftFileCache *cache; + char *lck; + char *tmp; + FILE *f; + int h; + XftFileCacheEnt *c; + + cache = &_XftFileCache; + + if (!cache->updated && cache->referenced == cache->entries) + return True; + + lck = malloc (strlen (cache_file)*2 + 4); + if (!lck) + goto bail0; + tmp = lck + strlen (cache_file) + 2; + strcpy (lck, cache_file); + strcat (lck, "L"); + strcpy (tmp, cache_file); + strcat (tmp, "T"); + if (link (lck, cache_file) < 0 && errno != ENOENT) + goto bail1; + if (access (tmp, F_OK) == 0) + goto bail2; + f = fopen (tmp, "w"); + if (!f) + goto bail2; + + for (h = 0; h < HASH_SIZE; h++) + { + for (c = cache->ents[h]; c; c = c->next) + { + if (!c->referenced) + continue; + if (!_XftFileCacheWriteString (f, c->file)) + goto bail4; + if (putc (' ', f) == EOF) + goto bail4; + if (!_XftFileCacheWriteInt (f, c->id)) + goto bail4; + if (putc (' ', f) == EOF) + goto bail4; + if (!_XftFileCacheWriteTime (f, c->time)) + goto bail4; + if (putc (' ', f) == EOF) + goto bail4; + if (!_XftFileCacheWriteString (f, c->name)) + goto bail4; + if (putc ('\n', f) == EOF) + goto bail4; + } + } + + if (fclose (f) == EOF) + goto bail3; + + if (rename (tmp, cache_file) < 0) + goto bail3; + + unlink (lck); + cache->updated = False; + return True; + +bail4: + fclose (f); +bail3: + unlink (tmp); +bail2: + unlink (lck); +bail1: + free (lck); +bail0: + return False; +} + +Bool +XftFileCacheReadDir (XftFontSet *set, const char *cache_file) +{ + XftPattern *font; + FILE *f; + char *path; + char *base; + char file[8192]; + int id; + char name[8192]; + Bool ret = False; + + if (_XftFontDebug () & XFT_DBG_CACHE) + { + printf ("XftFileCacheReadDir cache_file \"%s\"\n", cache_file); + } + + f = fopen (cache_file, "r"); + if (!f) + { + if (_XftFontDebug () & XFT_DBG_CACHE) + { + printf (" no cache file\n"); + } + goto bail0; + } + + base = strrchr (cache_file, '/'); + if (!base) + goto bail1; + base++; + path = malloc (base - cache_file + 8192 + 1); + if (!path) + goto bail1; + memcpy (path, cache_file, base - cache_file); + base = path + (base - cache_file); + + while (_XftFileCacheReadString (f, file, sizeof (file)) && + _XftFileCacheReadInt (f, &id) && + _XftFileCacheReadString (f, name, sizeof (name))) + { + font = XftNameParse (name); + if (font) + { + strcpy (base, file); + if (_XftFontDebug () & XFT_DBG_CACHEV) + { + printf (" dir cache file \"%s\"\n", file); + } + XftPatternAddString (font, XFT_FILE, path); + if (!XftFontSetAdd (set, font)) + goto bail2; + } + } + if (_XftFontDebug () & XFT_DBG_CACHE) + { + printf (" cache loaded\n"); + } + + ret = True; +bail2: + free (path); +bail1: + fclose (f); +bail0: + return ret; +} + +Bool +XftFileCacheWriteDir (XftFontSet *set, const char *cache_file) +{ + XftPattern *font; + FILE *f; + char name[8192]; + char *file, *base; + int n; + int id; + + if (_XftFontDebug () & XFT_DBG_CACHE) + printf ("XftFileCacheWriteDir cache_file \"%s\"\n", cache_file); + + f = fopen (cache_file, "w"); + if (!f) + { + if (_XftFontDebug () & XFT_DBG_CACHE) + printf (" can't create \"%s\"\n", cache_file); + goto bail0; + } + for (n = 0; n < set->nfont; n++) + { + font = set->fonts[n]; + if (XftPatternGetString (font, XFT_FILE, 0, &file) != XftResultMatch) + goto bail1; + base = strrchr (file, '/'); + if (base) + base = base + 1; + else + base = file; + if (XftPatternGetInteger (font, XFT_INDEX, 0, &id) != XftResultMatch) + goto bail1; + if (!XftNameUnparse (font, name, sizeof (name))) + goto bail1; + if (_XftFontDebug () & XFT_DBG_CACHEV) + printf (" write file \"%s\"\n", base); + if (!_XftFileCacheWriteString (f, base)) + goto bail1; + if (putc (' ', f) == EOF) + goto bail1; + if (!_XftFileCacheWriteInt (f, id)) + goto bail1; + if (putc (' ', f) == EOF) + goto bail1; + if (!_XftFileCacheWriteString (f, name)) + goto bail1; + if (putc ('\n', f) == EOF) + goto bail1; + } + if (fclose (f) == EOF) + goto bail0; + + if (_XftFontDebug () & XFT_DBG_CACHE) + printf (" cache written\n"); + return True; + +bail1: + fclose (f); +bail0: + unlink (cache_file); + return False; +} Index: xc/lib/Xft/xftcfg.c diff -u xc/lib/Xft/xftcfg.c:1.7 xc/lib/Xft/xftcfg.c:1.9 --- xc/lib/Xft/xftcfg.c:1.7 Sun Dec 17 04:11:37 2000 +++ xc/lib/Xft/xftcfg.c Fri Mar 30 20:57:20 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftcfg.c,v 1.7 2000/12/17 09:11:37 keithp Exp $ + * $XFree86: xc/lib/Xft/xftcfg.c,v 1.9 2001/03/31 01:57:20 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -35,8 +35,11 @@ char **XftConfigDirs = XftConfigDefaultDirs; static int XftConfigNdirs; +char XftConfigDefaultCache[] = "~/.xftcache"; +char *XftConfigCache = 0; + static XftSubst *XftSubsts; -/* #define XFT_DEBUG_EDIT */ +/* #define XFT_DEBUG_EDIT */ Bool XftConfigAddDir (char *d) @@ -51,6 +54,8 @@ if (!h) return False; dir = (char *) malloc (strlen (h) + strlen (d)); + if (!dir) + return False; strcpy (dir, h); strcat (dir, d+1); } @@ -80,6 +85,41 @@ return True; } +Bool +XftConfigSetCache (char *c) +{ + char *new; + char *h; + + if (*c == '~') + { + h = getenv ("HOME"); + if (!h) + return False; + new = (char *) malloc (strlen (h) + strlen (c)); + if (!new) + return False; + strcpy (new, h); + strcat (new, c+1); + } + else + { + new = _XftSaveString (c); + } + if (XftConfigCache) + free (XftConfigCache); + XftConfigCache = new; + return True; +} + +char * +XftConfigGetCache (void) +{ + if (!XftConfigCache) + XftConfigSetCache (XftConfigDefaultCache); + return XftConfigCache; +} + static int XftSubstsMaxObjects; Bool @@ -114,14 +154,21 @@ XftValueList *value; } XftSubState; +static XftMatrix XftIdentityMatrix = { 1, 0, 0, 1 }; + static XftValue -_XftConfigPromote (XftValue v) +_XftConfigPromote (XftValue v, XftValue u) { if (v.type == XftTypeInteger) { v.type = XftTypeDouble; v.u.d = (double) v.u.i; } + if (v.type == XftTypeVoid && u.type == XftTypeMatrix) + { + v.u.m = &XftIdentityMatrix; + v.type = XftTypeMatrix; + } return v; } @@ -134,8 +181,8 @@ if (m.type == XftTypeVoid) return True; - m = _XftConfigPromote (m); - v = _XftConfigPromote (v); + m = _XftConfigPromote (m, v); + v = _XftConfigPromote (v, m); if (m.type == v.type) { ret = False; @@ -246,6 +293,10 @@ v.type = XftTypeString; v.u.s = e->u.sval; break; + case XftOpMatrix: + v.type = XftTypeMatrix; + v.u.m = e->u.mval; + break; case XftOpBool: v.type = XftTypeBool; v.u.b = e->u.bval; @@ -281,8 +332,8 @@ case XftOpDivide: vl = _XftConfigEvaluate (p, e->u.tree.left); vr = _XftConfigEvaluate (p, e->u.tree.right); - vl = _XftConfigPromote (vl); - vr = _XftConfigPromote (vr); + vl = _XftConfigPromote (vl, vr); + vr = _XftConfigPromote (vr, vl); if (vl.type == vr.type) { switch (vl.type) { @@ -387,6 +438,26 @@ v.type = XftTypeVoid; break; } + case XftTypeMatrix: + switch (e->op) { + case XftOpEqual: + v.type = XftTypeBool; + v.u.b = XftMatrixEqual (vl.u.m, vr.u.m) == 0; + break; + case XftOpNotEqual: + v.type = XftTypeBool; + v.u.b = XftMatrixEqual (vl.u.m, vr.u.m) != 0; + break; + case XftOpTimes: + v.type = XftTypeMatrix; + v.u.m = malloc (sizeof (XftMatrix)); + XftMatrixMultiply (v.u.m, vl.u.m, vr.u.m); + break; + default: + v.type = XftTypeVoid; + break; + } + break; default: v.type = XftTypeVoid; break; Index: xc/lib/Xft/xftcolor.c diff -u xc/lib/Xft/xftcolor.c:1.1 xc/lib/Xft/xftcolor.c:1.2 --- xc/lib/Xft/xftcolor.c:1.1 Thu Nov 30 22:27:57 2000 +++ xc/lib/Xft/xftcolor.c Wed May 16 13:20:06 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftcolor.c,v 1.1 2000/12/01 03:27:57 keithp Exp $ + * $XFree86: xc/lib/Xft/xftcolor.c,v 1.2 2001/05/16 17:20:06 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -110,7 +110,7 @@ result->color.red = color->red; result->color.green = color->green; result->color.blue = color->blue; - result->color.alpha = 0xffff; + result->color.alpha = color->alpha; return True; } Index: xc/lib/Xft/xftcore.c diff -u xc/lib/Xft/xftcore.c:1.4 xc/lib/Xft/xftcore.c:1.5 --- xc/lib/Xft/xftcore.c:1.4 Fri Dec 8 02:51:27 2000 +++ xc/lib/Xft/xftcore.c Tue Dec 19 19:28:44 2000 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftcore.c,v 1.4 2000/12/08 07:51:27 keithp Exp $ + * $XFree86: xc/lib/Xft/xftcore.c,v 1.5 2000/12/20 00:28:44 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -65,6 +65,37 @@ return xc; } +XChar2b * +XftCoreConvertUtf8 (XftChar8 *string, + int len, + XChar2b xcloc[XFT_CORE_N16LOCAL], + int *nchar) +{ + XChar2b *xc; + XftChar32 c; + int i; + int n, width; + int clen; + + if (!XftUtf8Len (string, len, &n, &width)) + return 0; + + if (n < XFT_CORE_N16LOCAL) + xc = xcloc; + else + xc = (XChar2b *) malloc (n * sizeof (XChar2b)); + for (i = 0; i < n; i++) + { + clen = XftUtf8ToUcs4 (string, &c, len); + xc[i].byte1 = c & 0xff; + xc[i].byte2 = (c >> 8) & 0xff; + string += clen; + len -= clen; + } + *nchar = n; + return xc; +} + void XftCoreExtents8 (Display *dpy, XFontStruct *fs, @@ -109,6 +140,8 @@ xc = XftCoreConvert16 (string, len, xcloc); XTextExtents16 (fs, xc, len, &direction, &ascent, &descent, &overall); + if (xc != xcloc) + free (xc); if (overall.lbearing < overall.rbearing) { extents->x = overall.lbearing; @@ -140,6 +173,42 @@ xc = XftCoreConvert32 (string, len, xcloc); XTextExtents16 (fs, xc, len, &direction, &ascent, &descent, &overall); + if (xc != xcloc) + free (xc); + if (overall.lbearing < overall.rbearing) + { + extents->x = overall.lbearing; + extents->width = overall.rbearing - overall.lbearing; + } + else + { + extents->x = overall.rbearing; + extents->width = overall.lbearing - overall.rbearing; + } + extents->y = -overall.ascent; + extents->height = overall.ascent + overall.descent; + extents->xOff = overall.width; + extents->yOff = 0; +} + +void +XftCoreExtentsUtf8 (Display *dpy, + XFontStruct *fs, + XftChar8 *string, + int len, + XGlyphInfo *extents) +{ + int direction; + int ascent, descent; + XCharStruct overall; + XChar2b *xc, xcloc[XFT_CORE_N16LOCAL]; + int n; + + xc = XftCoreConvertUtf8 (string, len, xcloc, &n); + XTextExtents16 (fs, xc, n, &direction, + &ascent, &descent, &overall); + if (xc != xcloc) + free (xc); if (overall.lbearing < overall.rbearing) { extents->x = overall.lbearing; Index: xc/lib/Xft/xftdbg.c diff -u xc/lib/Xft/xftdbg.c:1.1 xc/lib/Xft/xftdbg.c:1.3 --- xc/lib/Xft/xftdbg.c:1.1 Wed Nov 29 03:39:21 2000 +++ xc/lib/Xft/xftdbg.c Fri Mar 30 20:57:20 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftdbg.c,v 1.1 2000/11/29 08:39:21 keithp Exp $ + * $XFree86: xc/lib/Xft/xftdbg.c,v 1.3 2001/03/31 01:57:20 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -44,6 +44,9 @@ case XftTypeBool: printf (" %s", v.u.b ? "True" : "False"); break; + case XftTypeMatrix: + printf (" (%f %f; %f %f)", v.u.m->xx, v.u.m->xy, v.u.m->yx, v.u.m->yy); + break; } } @@ -78,6 +81,7 @@ case XftOpInteger: printf ("Integer"); break; case XftOpDouble: printf ("Double"); break; case XftOpString: printf ("String"); break; + case XftOpMatrix: printf ("Matrix"); break; case XftOpBool: printf ("Bool"); break; case XftOpField: printf ("Field"); break; case XftOpAssign: printf ("Assign"); break; @@ -126,6 +130,11 @@ case XftOpInteger: printf ("%d", expr->u.ival); break; case XftOpDouble: printf ("%g", expr->u.dval); break; case XftOpString: printf ("\"%s\"", expr->u.sval); break; + case XftOpMatrix: printf ("[%g %g %g %g]", + expr->u.mval->xx, + expr->u.mval->xy, + expr->u.mval->yx, + expr->u.mval->yy); case XftOpBool: printf ("%s", expr->u.bval ? "true" : "false"); break; case XftOpField: printf ("%s", expr->u.field); break; case XftOpQuest: Index: xc/lib/Xft/xftdir.c diff -u xc/lib/Xft/xftdir.c:1.1 xc/lib/Xft/xftdir.c:1.3 --- xc/lib/Xft/xftdir.c:1.1 Wed Nov 29 03:39:21 2000 +++ xc/lib/Xft/xftdir.c Wed May 16 06:32:54 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftdir.c,v 1.1 2000/11/29 08:39:21 keithp Exp $ + * $XFree86: xc/lib/Xft/xftdir.c,v 1.3 2001/05/16 10:32:54 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -29,42 +29,81 @@ #include "xftint.h" Bool -XftDirScan (XftFontSet *set, const char *dir) +XftDirScan (XftFontSet *set, const char *dir, Bool force) { DIR *d; struct dirent *e; char *file; char *base; XftPattern *font; + char *name; int count; Bool ret = True; int id; - d = opendir (dir); - if (!d) - return False; file = (char *) malloc (strlen (dir) + 1 + 256 + 1); if (!file) - { - closedir (d); return False; - } + strcpy (file, dir); strcat (file, "/"); base = file + strlen (file); + if (!force) + { + strcpy (base, "XftCache"); + + if (XftFileCacheReadDir (set, file)) + { + free (file); + return True; + } + } + + d = opendir (dir); + if (!d) + { + free (file); + return False; + } while (ret && (e = readdir (d))) { if (e->d_name[0] != '.') { - strcpy (base, e->d_name); id = 0; + strcpy (base, e->d_name); do { - font = XftFreeTypeQuery (file, id, &count); + if (!force) + name = XftFileCacheFind (file, id, &count); + else + name = 0; + if (name) + { + font = XftNameParse (name); + if (font) + XftPatternAddString (font, XFT_FILE, file); + } + else + { + font = XftFreeTypeQuery (file, id, &count); + if (font && !force) + { + char unparse[8192]; + + if (XftNameUnparse (font, unparse, sizeof (unparse))) + { + (void) XftFileCacheUpdate (file, id, unparse); + } + } + } if (font) { if (!XftFontSetAdd (set, font)) + { + XftPatternDestroy (font); + font = 0; ret = False; + } } id++; } while (font && ret && id < count); @@ -74,5 +113,24 @@ closedir (d); return ret; } + +Bool +XftDirSave (XftFontSet *set, const char *dir) +{ + char *file; + char *base; + Bool ret; + + file = (char *) malloc (strlen (dir) + 1 + 256 + 1); + if (!file) + return False; + + strcpy (file, dir); + strcat (file, "/"); + base = file + strlen (file); + strcpy (base, "XftCache"); + ret = XftFileCacheWriteDir (set, file); + free (file); + return ret; +} - Index: xc/lib/Xft/xftdpy.c diff -u xc/lib/Xft/xftdpy.c:1.4 xc/lib/Xft/xftdpy.c:1.7 --- xc/lib/Xft/xftdpy.c:1.4 Sun Dec 17 03:30:45 2000 +++ xc/lib/Xft/xftdpy.c Sat Apr 28 23:21:17 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftdpy.c,v 1.4 2000/12/17 08:30:45 keithp Exp $ + * $XFree86: xc/lib/Xft/xftdpy.c,v 1.7 2001/04/29 03:21:17 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -22,6 +22,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ +#include #include #include #include @@ -81,6 +82,34 @@ info->defaults = 0; info->coreFonts = 0; info->hasRender = XRenderFindVisualFormat (dpy, DefaultVisual (dpy, DefaultScreen (dpy))) != 0; + if (_XftFontDebug () & XFT_DBG_RENDER) + { + Visual *visual = DefaultVisual (dpy, DefaultScreen (dpy)); + XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual); + + printf ("XftDisplayInfoGet Default visual 0x%x ", + (int) visual->visualid); + if (format) + { + if (format->type == PictTypeDirect) + { + printf ("format %d,%d,%d,%d\n", + format->direct.alpha, + format->direct.red, + format->direct.green, + format->direct.blue); + } + else + { + printf ("format indexed\n"); + } + } + else + printf ("No Render format for default visual\n"); + + printf ("XftDisplayInfoGet initialized, hasRender set to \"%s\"\n", + info->hasRender ? "True" : "False"); + } info->next = _XftDisplayInfo; _XftDisplayInfo = info; @@ -89,6 +118,10 @@ bail1: free (info); bail0: + if (_XftFontDebug () & XFT_DBG_RENDER) + { + printf ("XftDisplayInfoGet failed to initialize, Xft unhappy\n"); + } return 0; } @@ -203,12 +236,16 @@ goto bail1; if (!_XftDefaultInitDouble (dpy, pat, XFT_SCALE)) goto bail1; + if (!_XftDefaultInitDouble (dpy, pat, XFT_DPI)) + goto bail1; if (!_XftDefaultInitBool (dpy, pat, XFT_RENDER)) goto bail1; if (!_XftDefaultInitInteger (dpy, pat, XFT_RGBA)) goto bail1; if (!_XftDefaultInitBool (dpy, pat, XFT_ANTIALIAS)) goto bail1; + if (!_XftDefaultInitBool (dpy, pat, XFT_MINSPACE)) + goto bail1; return pat; @@ -344,9 +381,16 @@ XftDefaultGetInteger (dpy, XFT_RGBA, screen, XFT_RGBA_NONE)); } + if (XftPatternGet (pattern, XFT_MINSPACE, 0, &v) == XftResultNoMatch) + { + XftPatternAddBool (pattern, XFT_MINSPACE, + XftDefaultGetBool (dpy, XFT_MINSPACE, screen, + False)); + } if (XftPatternGet (pattern, XFT_PIXEL_SIZE, 0, &v) == XftResultNoMatch) { int pixels, mm; + double dpi; if (XftPatternGet (pattern, XFT_SIZE, 0, &v) != XftResultMatch) { @@ -369,11 +413,12 @@ } scale = XftDefaultGetDouble (dpy, XFT_SCALE, screen, 1.0); size *= scale; - pixels = DisplayHeight (dpy, DefaultScreen (dpy)); - mm = DisplayHeightMM (dpy, DefaultScreen (dpy)); - size = size / 72.0; - size = size * 25.4; - size = size * pixels / mm; + pixels = DisplayHeight (dpy, screen); + mm = DisplayHeightMM (dpy, screen); + dpi = (((double) DisplayHeight (dpy, screen) * 25.4) / + (double) DisplayHeightMM (dpy, screen)); + dpi = XftDefaultGetDouble (dpy, XFT_DPI, screen, dpi); + size = size * dpi / 72.0; XftPatternAddDouble (pattern, XFT_PIXEL_SIZE, size); } } Index: xc/lib/Xft/xftdraw.c diff -u xc/lib/Xft/xftdraw.c:1.10 xc/lib/Xft/xftdraw.c:1.15 --- xc/lib/Xft/xftdraw.c:1.10 Fri Dec 15 12:12:52 2000 +++ xc/lib/Xft/xftdraw.c Wed May 16 15:20:43 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftdraw.c,v 1.10 2000/12/15 17:12:52 keithp Exp $ + * $XFree86: xc/lib/Xft/xftdraw.c,v 1.15 2001/05/16 19:20:43 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -22,7 +22,9 @@ * PERFORMANCE OF THIS SOFTWARE. */ +#include #include +#include #include "xftint.h" #include @@ -149,11 +151,13 @@ void XftDrawDestroy (XftDraw *draw) { + int n; + if (draw->render_able) { XRenderFreePicture (draw->dpy, draw->render.pict); - XFreePixmap (draw->dpy, draw->render.fg_pix); - XRenderFreePicture (draw->dpy, draw->render.fg_pict); + for (n = 0; n < XFT_DRAW_N_SRC; n++) + XRenderFreePicture (draw->dpy, draw->render.src[n].pict); } if (draw->core_set) XFreeGC (draw->dpy, draw->core.draw_gc); @@ -165,13 +169,16 @@ Bool XftDrawRenderPrepare (XftDraw *draw, XftColor *color, - XftFont *font) + XftFont *font, + int src) { if (!draw->render_set) { XRenderPictFormat *format; XRenderPictFormat *pix_format; XRenderPictureAttributes pa; + int n; + Pixmap pix; draw->render_set = True; draw->render_able = False; @@ -183,14 +190,22 @@ draw->render.pict = XRenderCreatePicture (draw->dpy, draw->drawable, format, 0, 0); - draw->render.fg_pix = XCreatePixmap (draw->dpy, draw->drawable, - 1, 1, pix_format->depth); - pa.repeat = True; - draw->render.fg_pict = XRenderCreatePicture (draw->dpy, - draw->render.fg_pix, - pix_format, - CPRepeat, &pa); - draw->render.fg_color.red = ~color->color.red; + for (n = 0; n < XFT_DRAW_N_SRC; n++) + { + pix = XCreatePixmap (draw->dpy, draw->drawable, + 1, 1, pix_format->depth); + pa.repeat = True; + draw->render.src[n].pict = XRenderCreatePicture (draw->dpy, + pix, + pix_format, + CPRepeat, &pa); + XFreePixmap (draw->dpy, pix); + + draw->render.src[n].color = color->color; + XRenderFillRectangle (draw->dpy, PictOpSrc, + draw->render.src[n].pict, + &color->color, 0, 0, 1, 1); + } if (draw->clip) XRenderSetPictureClipRegion (draw->dpy, draw->render.pict, draw->clip); @@ -198,11 +213,21 @@ } if (!draw->render_able) return False; - if (memcmp (&color->color, &draw->render.fg_color, sizeof (XRenderColor))) + if (memcmp (&color->color, &draw->render.src[src].color, + sizeof (XRenderColor))) { - XRenderFillRectangle (draw->dpy, PictOpSrc, draw->render.fg_pict, + if (_XftFontDebug () & XFT_DBG_DRAW) + { + printf ("Switching to color %04x,%04x,%04x,%04x\n", + color->color.alpha, + color->color.red, + color->color.green, + color->color.blue); + } + XRenderFillRectangle (draw->dpy, PictOpSrc, + draw->render.src[src].pict, &color->color, 0, 0, 1, 1); - draw->render.fg_color = color->color; + draw->render.src[src].color = color->color; } return True; } @@ -255,6 +280,10 @@ XftChar8 *string, int len) { + if (_XftFontDebug () & XFT_DBG_DRAW) + { + printf ("DrawString \"%*.*s\"\n", len, len, string); + } if (font->core) { XftDrawCorePrepare (draw, color, font); @@ -262,9 +291,11 @@ (char *) string, len); } #ifdef FREETYPE2 - else if (XftDrawRenderPrepare (draw, color, font)) + else if (XftDrawRenderPrepare (draw, color, font, XFT_DRAW_SRC_TEXT)) { - XftRenderString8 (draw->dpy, draw->render.fg_pict, font->u.ft.font, + XftRenderString8 (draw->dpy, + draw->render.src[XFT_DRAW_SRC_TEXT].pict, + font->u.ft.font, draw->render.pict, 0, 0, x, y, string, len); } #endif @@ -294,9 +325,11 @@ free (xc); } #ifdef FREETYPE2 - else if (XftDrawRenderPrepare (draw, color, font)) + else if (XftDrawRenderPrepare (draw, color, font, XFT_DRAW_SRC_TEXT)) { - XftRenderString16 (draw->dpy, draw->render.fg_pict, font->u.ft.font, + XftRenderString16 (draw->dpy, + draw->render.src[XFT_DRAW_SRC_TEXT].pict, + font->u.ft.font, draw->render.pict, 0, 0, x, y, string, len); } #endif @@ -324,15 +357,54 @@ free (xc); } #ifdef FREETYPE2 - else if (XftDrawRenderPrepare (draw, color, font)) + else if (XftDrawRenderPrepare (draw, color, font, XFT_DRAW_SRC_TEXT)) { - XftRenderString32 (draw->dpy, draw->render.fg_pict, font->u.ft.font, + XftRenderString32 (draw->dpy, + draw->render.src[XFT_DRAW_SRC_TEXT].pict, + font->u.ft.font, draw->render.pict, 0, 0, x, y, string, len); } #endif } void +XftDrawStringUtf8 (XftDraw *draw, + XftColor *color, + XftFont *font, + int x, + int y, + XftChar8 *string, + int len) +{ + if (font->core) + { + XChar2b *xc; + XChar2b xcloc[XFT_CORE_N16LOCAL]; + int n; + + XftDrawCorePrepare (draw, color, font); + xc = XftCoreConvertUtf8 (string, len, xcloc, &n); + if (xc) + { + XDrawString16 (draw->dpy, draw->drawable, draw->core.draw_gc, x, y, + xc, n); + } + if (xc != xcloc) + free (xc); + } +#ifdef FREETYPE2 + else if (XftDrawRenderPrepare (draw, color, font, XFT_DRAW_SRC_TEXT)) + { + XftRenderStringUtf8 (draw->dpy, + draw->render.src[XFT_DRAW_SRC_TEXT].pict, + font->u.ft.font, + draw->render.pict, 0, 0, x, y, string, len); + } +#endif +} + + +void XftDrawRect (XftDraw *draw, XftColor *color, int x, @@ -340,9 +412,9 @@ unsigned int width, unsigned int height) { - if (XftDrawRenderPrepare (draw, color, 0)) + if (XftDrawRenderPrepare (draw, color, 0, XFT_DRAW_SRC_RECT)) { - XRenderFillRectangle (draw->dpy, PictOpSrc, draw->render.pict, + XRenderFillRectangle (draw->dpy, PictOpOver, draw->render.pict, &color->color, x, y, width, height); } else Index: xc/lib/Xft/xftextent.c diff -u xc/lib/Xft/xftextent.c:1.4 xc/lib/Xft/xftextent.c:1.6 --- xc/lib/Xft/xftextent.c:1.4 Fri Dec 15 12:12:52 2000 +++ xc/lib/Xft/xftextent.c Sun Apr 1 10:00:01 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftextent.c,v 1.4 2000/12/15 17:12:52 keithp Exp $ + * $XFree86: xc/lib/Xft/xftextent.c,v 1.6 2001/04/01 14:00:01 tsi Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -22,6 +22,8 @@ * PERFORMANCE OF THIS SOFTWARE. */ +#include +#include #include "xftint.h" void @@ -79,4 +81,110 @@ XftRenderExtents32 (dpy, font->u.ft.font, string, len, extents); } #endif +} + +void +XftTextExtentsUtf8 (Display *dpy, + XftFont *font, + XftChar8 *string, + int len, + XGlyphInfo *extents) +{ + XftChar8 *src; + XftChar32 c; + XftChar32 lbuf[4096]; + XftChar32 *dst; + XftChar8 *dst8; + XftChar16 *dst16; + XftChar32 *dst32; + int rlen, clen; + int width = 1; + int n; + + /* compute needed width */ + src = string; + rlen = len; + n = 0; + while (rlen) + { + clen = XftUtf8ToUcs4 (src, &c, rlen); + if (clen <= 0) /* malformed UTF8 string */ + { + memset (extents, 0, sizeof (XGlyphInfo)); + return; + } + if (c >= 0x10000) + width = 4; + else if (c >= 0x100) + { + if (width == 1) + width = 2; + } + src += clen; + rlen -= clen; + n++; + } + dst = lbuf; + if (n * width > sizeof (lbuf)) + { + dst = (XftChar32 *) malloc (n * width); + if (!dst) + { + memset (extents, 0, sizeof (XGlyphInfo)); + return; + } + } + + switch (width) { + case 4: + src = string; + rlen = len; + dst32 = dst; + while (rlen) + { + clen = XftUtf8ToUcs4 (src, &c, rlen); + if (clen <= 0) /* malformed UTF8 string */ + return; + *dst32++ = c; + src += clen; + rlen -= clen; + } + dst32 = dst; + XftTextExtents32 (dpy, font, dst32, n, extents); + break; + case 2: + src = string; + rlen = len; + dst16 = (XftChar16 *) dst; + while (rlen) + { + clen = XftUtf8ToUcs4 (src, &c, rlen); + if (clen <= 0) /* malformed UTF8 string */ + return; + *dst16++ = c; + src += clen; + rlen -= clen; + } + dst16 = (XftChar16 *) dst; + XftTextExtents16 (dpy, font, dst16, n, extents); + break; + case 1: + src = string; + rlen = len; + dst8 = (XftChar8 *) dst; + while (rlen) + { + clen = XftUtf8ToUcs4 (src, &c, rlen); + if (clen <= 0) /* malformed UTF8 string */ + return; + *dst8++ = c; + src += clen; + rlen -= clen; + } + dst8 = (XftChar8 *) dst; + XftTextExtents8 (dpy, font, dst8, n, extents); + break; + } + if (dst != lbuf) + free (dst); } Index: xc/lib/Xft/xftfont.c diff -u xc/lib/Xft/xftfont.c:1.7 xc/lib/Xft/xftfont.c:1.8 --- xc/lib/Xft/xftfont.c:1.7 Fri Dec 15 12:12:53 2000 +++ xc/lib/Xft/xftfont.c Tue Dec 19 19:20:48 2000 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftfont.c,v 1.7 2000/12/15 17:12:53 keithp Exp $ + * $XFree86: xc/lib/Xft/xftfont.c,v 1.8 2000/12/20 00:20:48 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -22,9 +22,9 @@ * PERFORMANCE OF THIS SOFTWARE. */ +#include #include #include "xftint.h" -#include XftPattern * XftFontMatch (Display *dpy, int screen, XftPattern *pattern, XftResult *result) @@ -43,8 +43,24 @@ new = XftPatternDuplicate (pattern); if (!new) return 0; + + if (_XftFontDebug () & XFT_DBG_OPENV) + { + printf ("XftFontMatch pattern "); + XftPatternPrint (new); + } XftConfigSubstitute (new); + if (_XftFontDebug () & XFT_DBG_OPENV) + { + printf ("XftFontMatch after XftConfig substitutions "); + XftPatternPrint (new); + } XftDefaultSubstitute (dpy, screen, new); + if (_XftFontDebug () & XFT_DBG_OPENV) + { + printf ("XftFontMatch after X resource substitutions "); + XftPatternPrint (new); + } nsets = 0; #ifdef FREETYPE2 @@ -52,6 +68,11 @@ core = True; (void) XftPatternGetBool (new, XFT_RENDER, 0, &render); (void) XftPatternGetBool (new, XFT_CORE, 0, &core); + if (_XftFontDebug () & XFT_DBG_OPENV) + { + printf ("XftFontMatch: use core fonts \"%s\", use render fonts \"%s\"\n", + core ? "True" : "False", render ? "True" : "False"); + } if (render) { @@ -133,10 +154,17 @@ if (!initialized) { + char *e; + initialized = 1; - debug = getenv ("XFT_DEBUG") != 0; - if (debug) - printf ("XFT_DEBUG found\n"); + e = getenv ("XFT_DEBUG"); + if (e) + { + printf ("XFT_DEBUG=%s\n", e); + debug = atoi (e); + if (debug <= 0) + debug = 1; + } } return debug; } @@ -155,12 +183,12 @@ va_end (va); if (!pat) { - if (_XftFontDebug ()) + if (_XftFontDebug () & XFT_DBG_OPEN) printf ("XftFontOpen: Invalid pattern argument\n"); return 0; } match = XftFontMatch (dpy, screen, pat, &result); - if (_XftFontDebug ()) + if (_XftFontDebug () & XFT_DBG_OPEN) { printf ("Pattern "); XftPatternPrint (pat); @@ -179,7 +207,7 @@ font = XftFontOpenPattern (dpy, match); if (!font) { - if (_XftFontDebug ()) + if (_XftFontDebug () & XFT_DBG_OPEN) printf ("No Font\n"); XftPatternDestroy (match); } @@ -196,7 +224,7 @@ XftFont *font; pat = XftNameParse (name); - if (_XftFontDebug ()) + if (_XftFontDebug () & XFT_DBG_OPEN) { printf ("XftFontOpenName \"%s\": ", name); if (pat) @@ -208,7 +236,7 @@ if (!pat) return 0; match = XftFontMatch (dpy, screen, pat, &result); - if (_XftFontDebug ()) + if (_XftFontDebug () & XFT_DBG_OPEN) { if (match) { @@ -238,7 +266,7 @@ XftFont *font; pat = XftXlfdParse (xlfd, False, False); - if (_XftFontDebug ()) + if (_XftFontDebug () & XFT_DBG_OPEN) { printf ("XftFontOpenXlfd \"%s\": ", xlfd); if (pat) @@ -250,7 +278,7 @@ if (!pat) return 0; match = XftFontMatch (dpy, screen, pat, &result); - if (_XftFontDebug ()) + if (_XftFontDebug () & XFT_DBG_OPEN) { if (match) { @@ -275,7 +303,7 @@ XftFontClose (Display *dpy, XftFont *font) { if (font->core) - XFreeFont (dpy, font->u.core.font); + XftCoreClose (dpy, font->u.core.font); #ifdef FREETYPE2 else XftFreeTypeClose (dpy, font->u.ft.font); Index: xc/lib/Xft/xftfreetype.c diff -u xc/lib/Xft/xftfreetype.c:1.5 xc/lib/Xft/xftfreetype.c:1.13 --- xc/lib/Xft/xftfreetype.c:1.5 Fri Dec 15 12:12:53 2000 +++ xc/lib/Xft/xftfreetype.c Wed May 16 06:32:54 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftfreetype.c,v 1.5 2000/12/15 17:12:53 keithp Exp $ + * $XFree86: xc/lib/Xft/xftfreetype.c,v 1.13 2001/05/16 10:32:54 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -23,6 +23,8 @@ */ #include +#include +#include #include "xftint.h" FT_Library _XftFTlibrary; @@ -32,15 +34,21 @@ FT_Encoding encoding; } XftFtEncoding; -XftFtEncoding xftFtEncoding[] = { +static XftFtEncoding xftFtEncoding[] = { { "iso10646-1", ft_encoding_unicode, }, { "iso8859-1", ft_encoding_unicode, }, + { "apple-roman", ft_encoding_apple_roman }, { "adobe-fontspecific", ft_encoding_symbol, }, { "glyphs-fontspecific",ft_encoding_none, }, }; #define NUM_FT_ENCODINGS (sizeof xftFtEncoding / sizeof xftFtEncoding[0]) +#define FT_Matrix_Equal(a,b) ((a)->xx == (b)->xx && \ + (a)->yy == (b)->yy && \ + (a)->xy == (b)->xy && \ + (a)->yx == (b)->yx) + XftPattern * XftFreeTypeQuery (const char *file, int id, int *count) { @@ -74,7 +82,7 @@ slant = XFT_SLANT_ROMAN; if (face->style_flags & FT_STYLE_FLAG_ITALIC) - slant = (XFT_SLANT_ITALIC + XFT_SLANT_OBLIQUE) / 2; + slant = XFT_SLANT_ITALIC; if (!XftPatternAddInteger (pat, XFT_SLANT, slant)) goto bail1; @@ -98,6 +106,12 @@ if (!XftPatternAddInteger (pat, XFT_INDEX, id)) goto bail1; +#if 0 + if ((face->face_flags & FT_FACE_FLAG_FIXED_WIDTH) != 0) + if (!XftPatternAddInteger (pat, XFT_SPACING, XFT_MONO)) + goto bail1; +#endif + if (!(face->face_flags & FT_FACE_FLAG_SCALABLE)) { for (i = 0; i < face->num_fixed_sizes; i++) @@ -130,8 +144,8 @@ if (!XftPatternAddString (pat, XFT_ENCODING, "glyphs-fontspecific")) goto bail1; - + FT_Done_Face (face); return pat; @@ -142,41 +156,199 @@ return 0; } +/* + * List of all open files (each face in a file is managed separately) + */ +typedef struct _XftFtFile { + struct _XftFtFile *next; + int ref; + + char *file; + int id; + + FT_Face face; + FT_F26Dot6 size; + FT_Matrix matrix; + int charmap; +} XftFtFile; + +static XftFtFile *_XftFtFiles; + +static XftFtFile * +_XftFreeTypeOpenFile (char *file, int id) +{ + XftFtFile *f; + FT_Face face; + + for (f = _XftFtFiles; f; f = f->next) + { + if (!strcmp (f->file, file) && f->id == id) + { + ++f->ref; + if (_XftFontDebug () & XFT_DBG_REF) + printf ("FontFile %s/%d matches existing (%d)\n", + file, id, f->ref); + return f; + } + } + if (FT_New_Face (_XftFTlibrary, file, id, &face)) + return 0; + + f = malloc (sizeof (XftFtFile) + strlen (file) + 1); + if (!f) + return 0; + + if (_XftFontDebug () & XFT_DBG_REF) + printf ("FontFile %s/%d matches new\n", + file, id); + f->next = _XftFtFiles; + _XftFtFiles = f; + f->ref = 1; + + f->file = (char *) (f+1); + strcpy (f->file, file); + f->id = id; + + f->face = face; + f->size = 0; + f->charmap = -1; + return f; +} + +Bool +XftFreeTypeSetFace (FT_Face face, FT_F26Dot6 size, int charmap, FT_Matrix *matrix) +{ + XftFtFile *f, **prev; + + for (prev = &_XftFtFiles; (f = *prev); prev = &f->next) + { + if (f->face == face) + { + /* LRU */ + if (prev != &_XftFtFiles) + { + *prev = f->next; + f->next = _XftFtFiles; + _XftFtFiles = f; + } + if (f->size != size) + { + if (_XftFontDebug() & XFT_DBG_GLYPH) + printf ("Set face size to %d (%d)\n", + (int) (size >> 6), (int) size); + if (FT_Set_Char_Size (face, size, size, 0, 0)) + return False; + f->size = size; + } + if (f->charmap != charmap && charmap != -1) + { + if (_XftFontDebug() & XFT_DBG_GLYPH) + printf ("Set face charmap to %d\n", charmap); + if (FT_Set_Charmap (face, face->charmaps[charmap])) + return False; + f->charmap = charmap; + } + if (!FT_Matrix_Equal (&f->matrix, matrix)) + { + if (_XftFontDebug() & XFT_DBG_GLYPH) + printf ("Set face matrix to (%g,%g,%g,%g)\n", + (double) matrix->xx / 0x10000, + (double) matrix->xy / 0x10000, + (double) matrix->yx / 0x10000, + (double) matrix->yy / 0x10000); + FT_Set_Transform (face, matrix, 0); + f->matrix = *matrix; + } + break; + } + } + return True; +} + +static void +_XftFreeTypeCloseFile (XftFtFile *f) +{ + XftFtFile **prev; + + if (--f->ref != 0) + return; + for (prev = &_XftFtFiles; *prev; prev = &(*prev)->next) + { + if (*prev == f) + { + *prev = f->next; + break; + } + } + FT_Done_Face (f->face); + free (f); +} + +/* + * Cache of all glyphsets + */ +typedef struct _XftFtGlyphSet { + struct _XftFtGlyphSet *next; + int ref; + + XftFtFile *file; + Bool minspace; + int char_width; + + XftFontStruct font; +} XftFtGlyphSet; + +static XftFtGlyphSet *_XftFtGlyphSets; + XftFontStruct * XftFreeTypeOpen (Display *dpy, XftPattern *pattern) { - char *file; + XftFtFile *file; + FT_Face face; + XftFtGlyphSet *gs; + char *filename; int id; - double size; + double dsize; + FT_F26Dot6 size; int rgba; int spacing; int char_width; Bool antialias; - Bool encoded; + Bool minspace; char *encoding_name; - FT_Face face; XftFontStruct *font; int j; FT_Encoding encoding; int charmap; - int error; + FT_Matrix matrix; + XftMatrix *font_matrix; - int height, ascent, descent; int extra; - int div; - + int height, ascent, descent; XRenderPictFormat pf, *format; - if (XftPatternGetString (pattern, XFT_FILE, 0, &file) != XftResultMatch) + /* + * Open the file + */ + if (XftPatternGetString (pattern, XFT_FILE, 0, &filename) != XftResultMatch) goto bail0; if (XftPatternGetInteger (pattern, XFT_INDEX, 0, &id) != XftResultMatch) goto bail0; + file = _XftFreeTypeOpenFile (filename, id); + if (!file) + goto bail0; + + face = file->face; + + /* + * Extract the glyphset information from the pattern + */ if (XftPatternGetString (pattern, XFT_ENCODING, 0, &encoding_name) != XftResultMatch) goto bail0; - if (XftPatternGetDouble (pattern, XFT_PIXEL_SIZE, 0, &size) != XftResultMatch) + if (XftPatternGetDouble (pattern, XFT_PIXEL_SIZE, 0, &dsize) != XftResultMatch) goto bail0; switch (XftPatternGetInteger (pattern, XFT_RGBA, 0, &rgba)) { @@ -188,7 +360,7 @@ default: goto bail0; } - + switch (XftPatternGetBool (pattern, XFT_ANTIALIAS, 0, &antialias)) { case XftResultNoMatch: antialias = True; @@ -199,12 +371,129 @@ goto bail0; } + switch (XftPatternGetBool (pattern, XFT_MINSPACE, 0, &minspace)) { + case XftResultNoMatch: + minspace = False; + break; + case XftResultMatch: + break; + default: + goto bail0; + } + + switch (XftPatternGetInteger (pattern, XFT_SPACING, 0, &spacing)) { + case XftResultNoMatch: + spacing = XFT_PROPORTIONAL; + break; + case XftResultMatch: + break; + default: + goto bail1; + } + + if (XftPatternGetInteger (pattern, XFT_CHAR_WIDTH, + 0, &char_width) != XftResultMatch) + { + char_width = 0; + } + else if (char_width) + spacing = XFT_MONO; + + matrix.xx = matrix.yy = 0x10000; + matrix.xy = matrix.yx = 0; + + switch (XftPatternGetMatrix (pattern, XFT_MATRIX, 0, &font_matrix)) { + case XftResultNoMatch: + break; + case XftResultMatch: + matrix.xx = 0x10000L * font_matrix->xx; + matrix.yy = 0x10000L * font_matrix->yy; + matrix.xy = 0x10000L * font_matrix->xy; + matrix.yx = 0x10000L * font_matrix->yx; + break; + default: + goto bail1; + } + + + if (XftPatternGetInteger (pattern, XFT_CHAR_WIDTH, 0, &char_width) != XftResultMatch) { char_width = 0; } + else if (char_width) + spacing = XFT_MONO; + + encoding = face->charmaps[0]->encoding; + + for (j = 0; j < NUM_FT_ENCODINGS; j++) + if (!strcmp (encoding_name, xftFtEncoding[j].name)) + { + encoding = xftFtEncoding[j].encoding; + break; + } + + size = (FT_F26Dot6) (dsize * 64.0); + if (encoding == ft_encoding_none) + charmap = -1; + else + { + for (charmap = 0; charmap < face->num_charmaps; charmap++) + if (face->charmaps[charmap]->encoding == encoding) + break; + + if (charmap == face->num_charmaps) + goto bail1; + } + + + /* + * Match an existing glyphset + */ + for (gs = _XftFtGlyphSets; gs; gs = gs->next) + { + if (gs->file == file && + gs->minspace == minspace && + gs->char_width == char_width && + gs->font.size == size && + gs->font.spacing == spacing && + gs->font.charmap == charmap && + gs->font.rgba == rgba && + gs->font.antialias == antialias && + FT_Matrix_Equal (&gs->font.matrix, &matrix)) + { + ++gs->ref; + if (_XftFontDebug () & XFT_DBG_REF) + { + printf ("Face size %g matches existing (%d)\n", + dsize, gs->ref); + } + return &gs->font; + } + } + + if (_XftFontDebug () & XFT_DBG_REF) + { + printf ("Face size %g matches new\n", + dsize); + } + /* + * No existing glyphset, create another + */ + gs = malloc (sizeof (XftFtGlyphSet)); + if (!gs) + goto bail1; + + gs->ref = 1; + + gs->file = file; + gs->minspace = minspace; + gs->char_width = char_width; + + font = &gs->font; + if (antialias) { if (rgba) @@ -261,106 +550,62 @@ } if (!format) - goto bail0; - - if (FT_New_Face (_XftFTlibrary, file, id, &face)) - goto bail0; - - font = (XftFontStruct *) malloc (sizeof (XftFontStruct)); - if (!font) - goto bail1; - - font->size = (FT_F26Dot6) (size * 64.0); + goto bail2; - if ( FT_Set_Char_Size (face, font->size, font->size, 0, 0) ) + if (!XftFreeTypeSetFace (face, size, charmap, &matrix)) goto bail2; - encoding = face->charmaps[0]->encoding; - - for (j = 0; j < NUM_FT_ENCODINGS; j++) - if (!strcmp (encoding_name, xftFtEncoding[j].name)) - { - encoding = xftFtEncoding[j].encoding; - break; - } - - if (encoding == ft_encoding_none) - encoded = False; - else + descent = -(face->size->metrics.descender >> 6); + ascent = face->size->metrics.ascender >> 6; + if (minspace) { - encoded = True; - for (charmap = 0; charmap < face->num_charmaps; charmap++) - if (face->charmaps[charmap]->encoding == encoding) - break; - - if (charmap == face->num_charmaps) - goto bail2; - - error = FT_Set_Charmap(face, - face->charmaps[charmap]); - - if (error) - goto bail2; + height = ascent + descent; } - - height = face->height; - ascent = face->ascender; - descent = face->descender; - if (descent < 0) descent = - descent; - extra = (height - (ascent + descent)); - if (extra > 0) + else { - ascent = ascent + extra / 2; - descent = height - ascent; + height = face->size->metrics.height >> 6; + extra = (height - (ascent + descent)); + if (extra > 0) + { + ascent = ascent + extra / 2; + descent = height - ascent; + } + else if (extra < 0) + height = ascent + descent; } - else if (extra < 0) - height = ascent + descent; - div = face->units_per_EM; - if (height > div * 5) - div *= 10; - - div = face->units_per_EM; - if (height > div * 5) - div *= 10; - - font->descent = descent * font->size / (64 * div); - font->ascent = ascent * font->size / (64 * div); - font->height = height * font->size / (64 * div); - font->max_advance_width = face->max_advance_width * font->size / (64 * div); + font->ascent = ascent; + font->descent = descent; + font->height = height; - font->monospace = (face->face_flags & FT_FACE_FLAG_FIXED_WIDTH) != 0; if (char_width) - { font->max_advance_width = char_width; - font->monospace = True; - } - switch (XftPatternGetInteger (pattern, XFT_SPACING, 0, &spacing)) { - case XftResultNoMatch: - break; - case XftResultMatch: - if (spacing != XFT_PROPORTIONAL) - font->monospace = True; - break; - default: - goto bail2; - } + else + font->max_advance_width = face->size->metrics.max_advance >> 6; + gs->next = _XftFtGlyphSets; + _XftFtGlyphSets = gs; + font->glyphset = XRenderCreateGlyphSet (dpy, format); + font->size = size; + font->spacing = spacing; font->format = format; font->realized =0; font->nrealized = 0; font->rgba = rgba; font->antialias = antialias; - font->encoded = encoded; + font->charmap = charmap; + font->transform = (matrix.xx != 0x10000 || matrix.xy != 0 || + matrix.yx != 0 || matrix.yy != 0x10000); + font->matrix = matrix; font->face = face; return font; bail2: - free (font); + free (gs); bail1: - FT_Done_Face (font->face); + _XftFreeTypeCloseFile (file); bail0: return 0; } @@ -368,10 +613,26 @@ void XftFreeTypeClose (Display *dpy, XftFontStruct *font) { - XRenderFreeGlyphSet (dpy, font->glyphset); - if (font->realized) - free (font->realized); - FT_Done_Face (font->face); + XftFtGlyphSet *gs, **prev; + + for (prev = &_XftFtGlyphSets; (gs = *prev); prev = &gs->next) + { + if (&gs->font == font) + { + if (--gs->ref == 0) + { + XRenderFreeGlyphSet (dpy, font->glyphset); + if (font->realized) + free (font->realized); + + _XftFreeTypeCloseFile (gs->file); + + *prev = gs->next; + free (gs); + } + break; + } + } } XftFontStruct * @@ -388,6 +649,7 @@ XftInitFtLibrary (void) { char **d; + char *cache; if (_XftFTlibrary) return True; @@ -396,16 +658,21 @@ _XftFontSet = XftFontSetCreate (); if (!_XftFontSet) return False; + cache = XftConfigGetCache (); + if (cache) + XftFileCacheLoad (cache); for (d = XftConfigDirs; d && *d; d++) { #ifdef XFT_DEBUG_FONTSET printf ("scan dir %s\n", *d); #endif - XftDirScan (_XftFontSet, *d); + XftDirScan (_XftFontSet, *d, False); } #ifdef XFT_DEBUG_FONTSET - XftPrintFontSet (_XftFontSet); + XftFontSetPrint (_XftFontSet); #endif + if (cache) + XftFileCacheSave (cache); + XftFileCacheDispose (); return True; } - Index: xc/lib/Xft/xftglyphs.c diff -u xc/lib/Xft/xftglyphs.c:1.6 xc/lib/Xft/xftglyphs.c:1.13 --- xc/lib/Xft/xftglyphs.c:1.6 Fri Dec 15 12:12:53 2000 +++ xc/lib/Xft/xftglyphs.c Wed May 16 06:32:54 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftglyphs.c,v 1.6 2000/12/15 17:12:53 keithp Exp $ + * $XFree86: xc/lib/Xft/xftglyphs.c,v 1.13 2001/05/16 10:32:54 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -22,7 +22,9 @@ * PERFORMANCE OF THIS SOFTWARE. */ +#include #include +#include #include "xftint.h" #include @@ -69,17 +71,37 @@ int height; int i; int left, right, top, bottom; - int mul = 1; + int hmul = 1; + int vmul = 1; FT_Bitmap ftbit; FT_Matrix matrix; + FT_Vector vector; + Bool subpixel = False; - if (font->antialias && font->rgba) + if (!XftFreeTypeSetFace (font->face, font->size, font->charmap, &font->matrix)) + return ; + + matrix.xx = matrix.yy = 0x10000L; + matrix.xy = matrix.yx = 0; + + if (font->antialias) { - matrix.xx = 0x30000L; - matrix.yy = 0x10000L; - matrix.xy = matrix.yx = 0; - mul = 3; + switch (font->rgba) { + case XFT_RGBA_RGB: + case XFT_RGBA_BGR: + matrix.xx *= 3; + subpixel = True; + hmul = 3; + break; + case XFT_RGBA_VRGB: + case XFT_RGBA_VBGR: + matrix.yy *= 3; + vmul = 3; + subpixel = True; + break; + } } + while (nglyph--) { charcode = (FT_ULong) *glyphs++; @@ -87,11 +109,18 @@ if (!gi) continue; - if (font->encoded) + if (font->charmap != -1) { glyphindex = FT_Get_Char_Index (font->face, charcode); +#if 0 if (!glyphindex) + { + if (_XftFontDebug() & XFT_DBG_GLYPH) + printf ("glyph (%c) %d missing\n", + (int) charcode, (int) charcode); continue; + } +#endif } else glyphindex = (FT_UInt) charcode; @@ -105,14 +134,56 @@ #define ROUND(x) (((x)+32) & -64) glyph = font->face->glyph; - - left = FLOOR( glyph->metrics.horiBearingX ); - right = CEIL( glyph->metrics.horiBearingX + glyph->metrics.width ); + + if(font->transform) + { + /* + * calculate the true width by transforming all four corners. + */ + int xc, yc; + left = right = top = bottom = 0; + for(xc = 0; xc <= 1; xc ++) { + for(yc = 0; yc <= 1; yc++) { + vector.x = glyph->metrics.horiBearingX + xc * glyph->metrics.width; + vector.y = glyph->metrics.horiBearingY - yc * glyph->metrics.height; + FT_Vector_Transform(&vector, &font->matrix); + if (_XftFontDebug() & XFT_DBG_GLYPH) + printf("Trans %d %d: %d %d\n", (int) xc, (int) yc, + (int) vector.x, (int) vector.y); + if(xc == 0 && yc == 0) { + left = right = vector.x; + top = bottom = vector.y; + } else { + if(left > vector.x) left = vector.x; + if(right < vector.x) right = vector.x; + if(bottom > vector.y) bottom = vector.y; + if(top < vector.y) top = vector.y; + } + + } + } + left = FLOOR(left); + right = CEIL(right); + bottom = FLOOR(bottom); + top = CEIL(top); + + } else { + left = FLOOR( glyph->metrics.horiBearingX ); + right = CEIL( glyph->metrics.horiBearingX + glyph->metrics.width ); + + top = CEIL( glyph->metrics.horiBearingY ); + bottom = FLOOR( glyph->metrics.horiBearingY - glyph->metrics.height ); + } + width = TRUNC(right - left); + height = TRUNC( top - bottom ); + + /* * Try to keep monospace fonts ink-inside + * XXX transformed? */ - if (font->monospace) + if (font->spacing != XFT_PROPORTIONAL && !font->transform) { if (TRUNC(right) > font->max_advance_width) { @@ -127,18 +198,14 @@ } } - top = CEIL( glyph->metrics.horiBearingY ); - bottom = FLOOR( glyph->metrics.horiBearingY - glyph->metrics.height ); - height = TRUNC( top - bottom ); - if ( glyph->format == ft_glyph_format_outline ) { if (font->antialias) - pitch = (width * mul + 3) & ~3; + pitch = (width * hmul + 3) & ~3; else pitch = ((width + 31) & ~31) >> 3; - size = pitch * height; + size = pitch * height * vmul; if (size > bufSize) { @@ -151,8 +218,8 @@ } memset (bufBitmap, 0, size); - ftbit.width = width * mul; - ftbit.rows = height; + ftbit.width = width * hmul; + ftbit.rows = height * vmul; ftbit.pitch = pitch; if (font->antialias) ftbit.pixel_mode = ft_pixel_mode_grays; @@ -161,10 +228,10 @@ ftbit.buffer = bufBitmap; - if (font->antialias && font->rgba) + if (subpixel) FT_Outline_Transform (&glyph->outline, &matrix); - FT_Outline_Translate ( &glyph->outline, -left*mul, -bottom ); + FT_Outline_Translate ( &glyph->outline, -left*hmul, -bottom*vmul ); FT_Outline_Get_Bitmap( _XftFTlibrary, &glyph->outline, &ftbit ); i = size; @@ -192,39 +259,49 @@ } } } -#if 0 + if (_XftFontDebug() & XFT_DBG_GLYPH) { - int x, y; - unsigned char *line; - - line = bufBitmap; - printf ("\nchar 0x%x (%c):\n", (int) charcode, (char) charcode); - for (y = 0; y < height; y++) + printf ("char 0x%x (%c):\n", (int) charcode, (char) charcode); + printf (" xywh (%d %d %d %d), trans (%d %d %d %d) wh (%d %d)\n", + (int) glyph->metrics.horiBearingX, + (int) glyph->metrics.horiBearingY, + (int) glyph->metrics.width, + (int) glyph->metrics.height, + left, right, top, bottom, + width, height); + if (_XftFontDebug() & XFT_DBG_GLYPHV) { - if (font->antialias) - { - static char den[] = { " .:;=+*#" }; - for (x = 0; x < pitch; x++) - printf ("%c", den[line[x] >> 5]); - } - else + int x, y; + unsigned char *line; + + line = bufBitmap; + for (y = 0; y < height * vmul; y++) { - for (x = 0; x < pitch * 8; x++) + if (font->antialias) { - printf ("%c", line[x>>3] & (1 << (x & 7)) ? '#' : ' '); + static char den[] = { " .:;=+*#" }; + for (x = 0; x < pitch; x++) + printf ("%c", den[line[x] >> 5]); } + else + { + for (x = 0; x < pitch * 8; x++) + { + printf ("%c", line[x>>3] & (1 << (x & 7)) ? '#' : ' '); + } + } + printf ("|\n"); + line += pitch; } printf ("\n"); - line += pitch; } } -#endif } else { -#if 0 - printf ("glyph (%c) %d missing\n", (int) charcode, (int) charcode); -#endif + if (_XftFontDebug() & XFT_DBG_GLYPH) + printf ("glyph (%c) %d no outline\n", + (int) charcode, (int) charcode); continue; } @@ -232,14 +309,30 @@ gi->height = height; gi->x = -TRUNC(left); gi->y = TRUNC(top); - if (font->monospace) - gi->xOff = font->max_advance_width; + if (font->spacing != XFT_PROPORTIONAL) + { + if (font->transform) + { + vector.x = font->max_advance_width; + vector.y = 0; + FT_Vector_Transform (&vector, &font->matrix); + gi->xOff = vector.x; + gi->yOff = -vector.y; + } + else + { + gi->xOff = font->max_advance_width; + gi->yOff = 0; + } + } else - gi->xOff = TRUNC(ROUND(glyph->metrics.horiAdvance)); - gi->yOff = 0; + { + gi->xOff = TRUNC(ROUND(glyph->advance.x)); + gi->yOff = -TRUNC(ROUND(glyph->advance.y)); + } g = charcode; - if (font->antialias && font->rgba != XFT_RGBA_NONE) + if (subpixel) { int x, y; unsigned char *in_line, *out_line, *in; @@ -247,18 +340,24 @@ unsigned int red, green, blue; int rf, gf, bf; int s; + int o, os; widthrgba = width; pitchrgba = (widthrgba * 4 + 3) & ~3; sizergba = pitchrgba * height; + os = 1; switch (font->rgba) { + case XFT_RGBA_VRGB: + os = pitch; case XFT_RGBA_RGB: default: rf = 0; gf = 1; bf = 2; break; + case XFT_RGBA_VBGR: + os = pitch; case XFT_RGBA_BGR: bf = 0; gf = 1; @@ -281,21 +380,23 @@ { in = in_line; out = (unsigned int *) out_line; - in_line += pitch; + in_line += pitch * vmul; out_line += pitchrgba; - for (x = 0; x < width * mul; x += 3) + for (x = 0; x < width * hmul; x += hmul) { red = green = blue = 0; + o = 0; for (s = 0; s < 3; s++) { - red += filters[rf][s]*in[x+s]; - green += filters[gf][s]*in[x+s]; - blue += filters[bf][s]*in[x+s]; + red += filters[rf][s]*in[x+o]; + green += filters[gf][s]*in[x+o]; + blue += filters[bf][s]*in[x+o]; + o += os; } red = red / 65536; green = green / 65536; blue = blue / 65536; - out[x/3] = (green << 24) | (red << 16) | (green << 8) | blue; + *out++ = (green << 24) | (red << 16) | (green << 8) | blue; } } @@ -316,6 +417,23 @@ #define STEP 256 +/* + * Return whether the given glyph generates any image on the screen, + * this means it exists or a default glyph exists + */ +static Bool +XftGlyphDrawable (Display *dpy, + XftFontStruct *font, + XftChar32 glyph) +{ + if (font->charmap != -1) + { + FT_Set_Charmap (font->face, font->face->charmaps[font->charmap]); + glyph = (XftChar32) FT_Get_Char_Index (font->face, (FT_ULong) glyph); + } + return glyph <= font->face->num_glyphs; +} + void XftGlyphCheck (Display *dpy, XftFontStruct *font, @@ -346,7 +464,7 @@ } if (font->realized[glyph] == _UntestedGlyph) { - if (XftFreeTypeGlyphExists (dpy, font, glyph)) + if (XftGlyphDrawable (dpy, font, glyph)) { font->realized[glyph] = (XGlyphInfo *) malloc (sizeof (XGlyphInfo)); n = *nmissing; @@ -368,7 +486,10 @@ XftFontStruct *font, XftChar32 glyph) { - if (font->encoded) + if (font->charmap != -1) + { + FT_Set_Charmap (font->face, font->face->charmaps[font->charmap]); glyph = (XftChar32) FT_Get_Char_Index (font->face, (FT_ULong) glyph); + } return glyph && glyph <= font->face->num_glyphs; } Index: xc/lib/Xft/xftgram.y diff -u xc/lib/Xft/xftgram.y:1.2 xc/lib/Xft/xftgram.y:1.5 --- xc/lib/Xft/xftgram.y:1.2 Thu Nov 30 18:30:00 2000 +++ xc/lib/Xft/xftgram.y Wed May 16 06:32:54 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftgram.y,v 1.2 2000/11/30 23:30:00 dawes Exp $ + * $XFree86: xc/lib/Xft/xftgram.y,v 1.5 2001/05/16 10:32:54 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -28,6 +28,8 @@ #include #include "xftint.h" +static XftMatrix matrix; + %} %union { @@ -47,8 +49,9 @@ %token DOUBLE %token STRING NAME %token ANY ALL -%token DIR INCLUDE INCLUDEIF MATCH EDIT TOK_TRUE TOK_FALSE TOK_NIL -%token EQUAL SEMI +%token DIR CACHE INCLUDE INCLUDEIF MATCH EDIT +%token TOK_TRUE TOK_FALSE TOK_NIL +%token EQUAL SEMI OS CS %type expr %type value @@ -59,6 +62,7 @@ %type qual %type compare %type tests test +%type number %right QUEST COLON %left OROR @@ -75,6 +79,8 @@ ; config : DIR STRING { XftConfigAddDir ($2); } + | CACHE STRING + { XftConfigSetCache ($2); } | INCLUDE STRING { XftConfigPushInput ($2, True); } | INCLUDEIF STRING @@ -146,7 +152,23 @@ { $$.type = XftTypeVoid; } + | matrix + { + $$.type = XftTypeMatrix; + $$.u.m = &matrix; + } ; +matrix : OS number number number number CS + { + matrix.xx = $2; + matrix.xy = $3; + matrix.yx = $4; + matrix.__REALLY_YY__ = $5; + } +number : INTEGER + { $$ = (double) $1; } + | DOUBLE + ; edits : edit edits { $1->next = $2; $$ = $1; } | @@ -174,6 +196,8 @@ { $$ = XftExprCreateBool (False); } | TOK_NIL { $$ = XftExprCreateNil (); } + | matrix + { $$ = XftExprCreateMatrix (&matrix); } | NAME { $$ = XftExprCreateField ($1); } | expr OROR expr @@ -234,10 +258,12 @@ { test->next = 0; test->qual = qual; - test->field = _XftSaveString (field); + test->field = field; /* already saved in grammar */ test->op = compare; if (value.type == XftTypeString) value.u.s = _XftSaveString (value.u.s); + else if (value.type == XftTypeMatrix) + value.u.m = _XftSaveMatrix (value.u.m); test->value = value; } return test; @@ -283,6 +309,19 @@ } XftExpr * +XftExprCreateMatrix (const XftMatrix *m) +{ + XftExpr *e = (XftExpr *) malloc (sizeof (XftExpr)); + + if (e) + { + e->op = XftOpMatrix; + e->u.mval = _XftSaveMatrix (m); + } + return e; +} + +XftExpr * XftExprCreateBool (Bool b) { XftExpr *e = (XftExpr *) malloc (sizeof (XftExpr)); @@ -345,6 +384,9 @@ case XftOpString: free (e->u.sval); break; + case XftOpMatrix: + free (e->u.mval); + break; case XftOpBool: break; case XftOpField: @@ -386,7 +428,7 @@ if (e) { e->next = 0; - e->field = _XftSaveString (field); + e->field = field; /* already saved in grammar */ e->op = op; e->expr = expr; } Index: xc/lib/Xft/xftint.h diff -u xc/lib/Xft/xftint.h:1.15 xc/lib/Xft/xftint.h:1.25 --- xc/lib/Xft/xftint.h:1.15 Fri Dec 15 12:12:53 2000 +++ xc/lib/Xft/xftint.h Fri May 18 12:03:06 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftint.h,v 1.15 2000/12/15 17:12:53 keithp Exp $ + * $XFree86: xc/lib/Xft/xftint.h,v 1.25 2001/05/18 16:03:06 tsi Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -42,6 +42,11 @@ int value; } XftSymbolic; +#define XFT_DRAW_N_SRC 2 + +#define XFT_DRAW_SRC_TEXT 0 +#define XFT_DRAW_SRC_RECT 1 + struct _XftDraw { Display *dpy; Drawable drawable; @@ -53,9 +58,10 @@ Bool render_able; struct { Picture pict; - Pixmap fg_pix; - Picture fg_pict; - XRenderColor fg_color; + struct { + Picture pict; + XRenderColor color; + } src[XFT_DRAW_N_SRC]; } render; struct { GC draw_gc; @@ -84,8 +90,20 @@ #define XFT_DEFAULT_PATH "/usr/X11R6/lib/X11/XftConfig" #endif +#define XFT_DBG_OPEN 1 +#define XFT_DBG_OPENV 2 +#define XFT_DBG_RENDER 4 +#define XFT_DBG_DRAW 8 +#define XFT_DBG_REF 16 +#define XFT_DBG_GLYPH 32 +#define XFT_DBG_GLYPHV 64 +#define XFT_DBG_CACHE 128 +#define XFT_DBG_CACHEV 256 +#define XFT_DBG_MATCH 512 +#define XFT_DBG_MATCHV 1024 + typedef enum _XftOp { - XftOpInteger, XftOpDouble, XftOpString, XftOpBool, XftOpNil, + XftOpInteger, XftOpDouble, XftOpString, XftOpMatrix, XftOpBool, XftOpNil, XftOpField, XftOpAssign, XftOpPrepend, XftOpAppend, XftOpQuest, @@ -98,11 +116,12 @@ typedef struct _XftExpr { XftOp op; union { - int ival; - double dval; - char *sval; - Bool bval; - char *field; + int ival; + double dval; + char *sval; + XftMatrix *mval; + Bool bval; + char *field; struct { struct _XftExpr *left, *right; } tree; @@ -116,7 +135,7 @@ typedef struct _XftTest { struct _XftTest *next; XftQual qual; - char *field; + const char *field; XftOp op; XftValue value; } XftTest; @@ -173,6 +192,9 @@ case XftTypeBool: \ __v__.u.b = va_arg (va, Bool); \ break; \ + case XftTypeMatrix: \ + __v__.u.m = va_arg (va, XftMatrix *); \ + break; \ } \ if (!XftPatternAdd (__p__, __o__, __v__, True)) \ goto _XftPatternVapBuild_bail1; \ @@ -191,11 +213,40 @@ } +/* xftcache.c */ + +char * +XftFileCacheFind (char *file, int id, int *count); + +void +XftFileCacheDispose (void); + +void +XftFileCacheLoad (char *cache); + +Bool +XftFileCacheUpdate (char *file, int id, char *name); + +Bool +XftFileCacheSave (char *cache); + +Bool +XftFileCacheReadDir (XftFontSet *set, const char *cache_file); + +Bool +XftFileCacheWriteDir (XftFontSet *set, const char *cache_file); + /* xftcfg.c */ Bool XftConfigAddDir (char *d); Bool +XftConfigSetCache (char *c); + +char * +XftConfigGetCache (void); + +Bool XftConfigAddEdit (XftTest *test, XftEdit *edit); Bool @@ -217,6 +268,12 @@ int len, XChar2b xcloc[XFT_CORE_N16LOCAL]); +XChar2b * +XftCoreConvertUtf8 (XftChar8 *string, + int len, + XChar2b xcloc[XFT_CORE_N16LOCAL], + int *nchar); + void XftCoreExtents8 (Display *dpy, XFontStruct *fs, @@ -238,6 +295,13 @@ int len, XGlyphInfo *extents); +void +XftCoreExtentsUtf8 (Display *dpy, + XFontStruct *fs, + XftChar8 *string, + int len, + XGlyphInfo *extents); + Bool XftCoreGlyphExists (Display *dpy, XFontStruct *fs, @@ -259,10 +323,6 @@ void XftSubstPrint (XftSubst *subst); -/* xftdir.c */ -Bool -XftDirScan (XftFontSet *set, const char *dir); - /* xftdpy.c */ int XftDefaultParseBool (char *v); @@ -283,7 +343,8 @@ Bool XftDrawRenderPrepare (XftDraw *draw, XftColor *color, - XftFont *font); + XftFont *font, + int src); Bool XftDrawCorePrepare (XftDraw *draw, @@ -295,12 +356,7 @@ int _XftFontDebug (void); -/* xftfreetype.c */ -XftPattern * -XftFreeTypeQuery (const char *file, int id, int *count); - /* xftfs.c */ -/* xftglyphs.c */ /* xftgram.y */ int XftConfigparse (void); @@ -327,6 +383,9 @@ XftExprCreateString (const char *s); XftExpr * +XftExprCreateMatrix (const XftMatrix *m); + +XftExpr * XftExprCreateBool (Bool b); XftExpr * @@ -348,8 +407,6 @@ XftEditDestroy (XftEdit *e); /* xftinit.c */ -Bool -XftInitFtLibrary (void); /* xftlex.l */ extern int XftConfigLineno; @@ -365,9 +422,6 @@ XftConfigPushInput (char *s, Bool complain); /* xftlist.c */ -XftObjectSet * -_XftObjectSetVapBuild (const char *first, va_list *vap); - Bool XftListValueCompare (XftValue v1, XftValue v2); @@ -397,6 +451,10 @@ /* xftpat.c */ /* xftrender.c */ + +/* xftmatrix.c */ +XftMatrix * +_XftSaveMatrix (const XftMatrix *mat); /* xftstr.c */ char * Index: xc/lib/Xft/xftlex.l diff -u xc/lib/Xft/xftlex.l:1.3 xc/lib/Xft/xftlex.l:1.7 --- xc/lib/Xft/xftlex.l:1.3 Fri Dec 15 17:48:39 2000 +++ xc/lib/Xft/xftlex.l Fri May 18 12:03:06 2001 @@ -1,6 +1,6 @@ %{ /* - * $XFree86: xc/lib/Xft/xftlex.l,v 1.3 2000/12/15 22:48:39 dawes Exp $ + * $XFree86: xc/lib/Xft/xftlex.l,v 1.7 2001/05/18 16:03:06 tsi Exp $ * * Copyright (c) 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -76,16 +76,20 @@ static int input (void) { char buf[1]; - int r; + static int r = EOF; - YY_INPUT(buf, r, 1); if (r == 0) return 0; + YY_INPUT(buf, r, 1); + if (r == 0) + return EOF; return buf[0]; } static void unput (char c) { + if (!c || c == EOF) + return; if (c == '\n') XftConfigLineno--; ungetc (c, XftConfigInput); @@ -97,6 +101,7 @@ "/\052" _XftConfigSkipComment(); ^# _XftConfigSkipLine(); dir return DIR; +cache return CACHE; include return INCLUDE; includeif return INCLUDEIF; match return MATCH; @@ -123,6 +128,8 @@ ">" return MORE; "!=" return NOTEQ; "?" return QUEST; +"[" return OS; +"]" return CS; \"([^\n\"]|\\\")*\" { yytext[yyleng - 1] = '\0'; yylval.sval = yytext+1; @@ -170,6 +177,7 @@ do { c = input(); } while (c != EOF && c != '\n'); + if (c == '\n') unput('\n'); } Bool @@ -247,6 +255,7 @@ if (c >= 0) return c; fclose (XftConfigInput); + XftConfigInput = 0; if (XftConfigInpt == XftConfigInStack + XFT_CONFIG_IN_DEEP) return EOF; XftConfigInput = *XftConfigInpt++; @@ -255,4 +264,12 @@ XftConfigFile = *XftConfigFileNamePt++; --XftConfigFiledeep; } +} + +void +XftConfigLexDone (void) +{ +#ifdef FLEX_SCANNER + XftConfig_delete_buffer (XftConfig_current_buffer); +#endif } Index: xc/lib/Xft/xftmatch.c diff -u xc/lib/Xft/xftmatch.c:1.3 xc/lib/Xft/xftmatch.c:1.5 --- xc/lib/Xft/xftmatch.c:1.3 Thu Dec 14 18:03:55 2000 +++ xc/lib/Xft/xftmatch.c Tue Mar 6 13:00:26 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftmatch.c,v 1.3 2000/12/14 23:03:55 keithp Exp $ + * $XFree86: xc/lib/Xft/xftmatch.c,v 1.5 2001/03/06 18:00:26 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -27,8 +27,6 @@ #include "xftint.h" #include -/* #define XFT_DEBUG_MATCH */ - static double _XftCompareInteger (char *object, XftValue value1, XftValue value2) { @@ -99,9 +97,9 @@ static XftMatcher _XftMatchers [] = { { XFT_FOUNDRY, _XftCompareString, }, { XFT_ENCODING, _XftCompareString, }, - { XFT_SPACING, _XftCompareInteger, }, { XFT_ANTIALIAS, _XftCompareBool, }, { XFT_FAMILY, _XftCompareString, }, + { XFT_SPACING, _XftCompareInteger, }, { XFT_PIXEL_SIZE, _XftCompareSize, }, { XFT_STYLE, _XftCompareString, }, { XFT_SLANT, _XftCompareInteger, }, @@ -151,9 +149,8 @@ *result = XftResultTypeMismatch; return False; } -#ifdef XFT_DEBUG_MATCH - printf (" v %g j %d ", v, j); -#endif + if (_XftFontDebug () & XFT_DBG_MATCHV) + printf (" v %g j %d ", v, j); v = v * 100 + j; if (v < best) { @@ -164,13 +161,14 @@ } j++; } -#ifdef XFT_DEBUG_MATCH - printf (" %s: %g ", object, best); - XftValueListPrint (v1orig); - printf (", "); - XftValueListPrint (v2orig); - printf ("\n"); -#endif + if (_XftFontDebug () & XFT_DBG_MATCHV) + { + printf (" %s: %g ", object, best); + XftValueListPrint (v1orig); + printf (", "); + XftValueListPrint (v2orig); + printf ("\n"); + } value[i] += best; return True; } @@ -181,22 +179,26 @@ */ static Bool -_XftCompare (XftPattern *p1, XftPattern *p2, double *value, XftResult *result) +_XftCompare (XftPattern *pat, + XftPattern *fnt, + double *value, + XftResult *result) { int i, i1, i2; for (i = 0; i < NUM_MATCHER; i++) value[i] = 0.0; - for (i1 = 0; i1 < p1->num; i1++) - for (i2 = 0; i2 < p2->num; i2++) + for (i1 = 0; i1 < pat->num; i1++) + { + for (i2 = 0; i2 < fnt->num; i2++) { - if (!_XftStrCmpIgnoreCase (p1->elts[i1].object, - p2->elts[i2].object)) + if (!_XftStrCmpIgnoreCase (pat->elts[i1].object, + fnt->elts[i2].object)) { - if (!_XftCompareValueList (p1->elts[i1].object, - p1->elts[i1].values, - p2->elts[i2].values, + if (!_XftCompareValueList (pat->elts[i1].object, + pat->elts[i1].values, + fnt->elts[i2].values, 0, value, result)) @@ -204,6 +206,25 @@ break; } } +#if 0 + /* + * Overspecified patterns are slightly penalized in + * case some other font includes the requested field + */ + if (i2 == fnt->num) + { + for (i2 = 0; i2 < NUM_MATCHER; i2++) + { + if (!_XftStrCmpIgnoreCase (_XftMatchers[i2].object, + pat->elts[i1].object)) + { + value[i2] = 1.0; + break; + } + } + } +#endif + } return True; } @@ -226,29 +247,32 @@ for (i = 0; i < NUM_MATCHER; i++) bestscore[i] = 0; best = 0; -#ifdef XFT_DEBUG_MATCH - printf ("Match "); - XftPatternPrint (p); -#endif + if (_XftFontDebug () & XFT_DBG_MATCH) + { + printf ("Match "); + XftPatternPrint (p); + } for (set = 0; set < nsets; set++) { s = sets[set]; for (f = 0; f < s->nfont; f++) { -#ifdef XFT_DEBUG_MATCH - printf ("Font %d ", f); - XftPatternPrint (s->fonts[f]); -#endif + if (_XftFontDebug () & XFT_DBG_MATCH) + { + printf ("Font %d ", f); + XftPatternPrint (s->fonts[f]); + } if (!_XftCompare (p, s->fonts[f], score, result)) return 0; -#ifdef XFT_DEBUG_MATCH - printf ("Score"); - for (i = 0; i < NUM_MATCHER; i++) + if (_XftFontDebug () & XFT_DBG_MATCH) { - printf (" %g", score[i]); + printf ("Score"); + for (i = 0; i < NUM_MATCHER; i++) + { + printf (" %g", score[i]); + } + printf ("\n"); } - printf ("\n"); -#endif for (i = 0; i < NUM_MATCHER; i++) { if (best && bestscore[i] < score[i]) @@ -263,12 +287,13 @@ } } } -#ifdef XFT_DEBUG_MATCH - printf ("Best score"); - for (i = 0; i < NUM_MATCHER; i++) - printf (" %g", bestscore[i]); - XftPatternPrint (best); -#endif + if (_XftFontDebug () & XFT_DBG_MATCH) + { + printf ("Best score"); + for (i = 0; i < NUM_MATCHER; i++) + printf (" %g", bestscore[i]); + XftPatternPrint (best); + } if (!best) { *result = XftResultNoMatch; Index: xc/lib/Xft/xftmatrix.c diff -u /dev/null xc/lib/Xft/xftmatrix.c:1.1 --- /dev/null Mon Jun 4 12:38:31 2001 +++ xc/lib/Xft/xftmatrix.c Fri Mar 30 13:50:18 2001 @@ -0,0 +1,104 @@ +/* + * $XFree86: xc/lib/Xft/xftmatrix.c,v 1.1 2001/03/30 18:50:18 keithp Exp $ + * + * Copyright © 2000 Tuomas J. Lukka + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Tuomas Lukka not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Tuomas Lukka makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * TUOMAS LUKKA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL TUOMAS LUKKA BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include +#include "xftint.h" + +XftMatrix * +_XftSaveMatrix (const XftMatrix *mat) +{ + XftMatrix *r; + if(!mat) + return 0; + r = (XftMatrix *) malloc (sizeof (*r) ); + if (!r) + return 0; + *r = *mat; + return r; +} + +int +XftMatrixEqual (const XftMatrix *mat1, const XftMatrix *mat2) +{ + if(mat1 == mat2) return True; + if(mat1 == 0 || mat2 == 0) return False; + return mat1->xx == mat2->xx && + mat1->xy == mat2->xy && + mat1->yx == mat2->yx && + mat1->yy == mat2->yy; +} + +void +XftMatrixMultiply (XftMatrix *result, XftMatrix *a, XftMatrix *b) +{ + XftMatrix r; + + r.xx = a->xx * b->xx + a->xy * b->yx; + r.xy = a->xx * b->xy + a->xy * b->yy; + r.yx = a->yx * b->xx + a->yy * b->yx; + r.yy = a->yx * b->xy + a->yy * b->yy; + *result = r; +} + +void +XftMatrixRotate (XftMatrix *m, double c, double s) +{ + XftMatrix r; + + /* + * X Coordinate system is upside down, swap to make + * rotations counterclockwise + */ + r.xx = c; + r.xy = -s; + r.yx = s; + r.yy = c; + XftMatrixMultiply (m, &r, m); +} + +void +XftMatrixScale (XftMatrix *m, double sx, double sy) +{ + XftMatrix r; + + r.xx = sx; + r.xy = 0; + r.yx = 0; + r.yy = sy; + XftMatrixMultiply (m, &r, m); +} + +void +XftMatrixShear (XftMatrix *m, double sh, double sv) +{ + XftMatrix r; + + r.xx = 1; + r.xy = sh; + r.yx = sv; + r.yy = 1; + XftMatrixMultiply (m, &r, m); +} Index: xc/lib/Xft/xftname.c diff -u xc/lib/Xft/xftname.c:1.5 xc/lib/Xft/xftname.c:1.10 --- xc/lib/Xft/xftname.c:1.5 Thu Dec 14 18:03:56 2000 +++ xc/lib/Xft/xftname.c Fri Mar 30 13:50:18 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftname.c,v 1.5 2000/12/14 23:03:56 keithp Exp $ + * $XFree86: xc/lib/Xft/xftname.c,v 1.10 2001/03/30 18:50:18 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -26,13 +26,14 @@ #include #include #include +#include typedef struct _XftObjectType { const char *object; XftType type; } XftObjectType; -const XftObjectType _XftObjectTypes[] = { +static const XftObjectType _XftObjectTypes[] = { { XFT_FAMILY, XftTypeString, }, { XFT_STYLE, XftTypeString, }, { XFT_SLANT, XftTypeInteger, }, @@ -53,6 +54,10 @@ { XFT_RGBA, XftTypeInteger, }, { XFT_SCALE, XftTypeDouble, }, { XFT_RENDER, XftTypeBool, }, + { XFT_MINSPACE, XftTypeBool, }, + { XFT_CHAR_WIDTH, XftTypeInteger }, + { XFT_CHAR_HEIGHT, XftTypeInteger }, + { XFT_MATRIX, XftTypeMatrix }, }; #define NUM_OBJECT_TYPES (sizeof _XftObjectTypes / sizeof _XftObjectTypes[0]) @@ -93,6 +98,8 @@ { "rgb", "rgba", XFT_RGBA_RGB, }, { "bgr", "rgba", XFT_RGBA_BGR, }, + { "vrgb", "rgba", XFT_RGBA_VRGB }, + { "vbgr", "rgba", XFT_RGBA_VBGR }, }; #define NUM_XFT_CONSTANTS (sizeof XftConstants/sizeof XftConstants[0]) @@ -122,7 +129,7 @@ } static XftValue -_XftNameConvert (XftType type, char *string) +_XftNameConvert (XftType type, char *string, XftMatrix *m) { XftValue v; @@ -141,6 +148,10 @@ case XftTypeDouble: v.u.d = strtod (string, 0); break; + case XftTypeMatrix: + v.u.m = m; + sscanf (string, "%lg %lg %lg %lg", &m->xx, &m->xy, &m->yx, &m->yy); + break; default: break; } @@ -152,9 +163,17 @@ { char c; - while (*cur && !strchr (delim, *cur)) + while ((c = *cur)) { - c = *cur++; + if (c == '\\') + { + ++cur; + if (!(c = *cur)) + break; + } + else if (strchr (delim, c)) + break; + ++cur; *save++ = c; } *save = 0; @@ -173,6 +192,7 @@ char *e; char delim; XftValue v; + XftMatrix m; const XftObjectType *t; XftConstant *c; @@ -211,10 +231,10 @@ } while (delim == ':') { - name = _XftNameFindNext (name, "=-:", save, &delim); + name = _XftNameFindNext (name, "=_:", save, &delim); if (save[0]) { - if (delim == '=' || delim == '-') + if (delim == '=' || delim == '_') { t = XftNameGetType (save); for (;;) @@ -222,7 +242,7 @@ name = _XftNameFindNext (name, ":,", save, &delim); if (save[0] && t) { - v = _XftNameConvert (t->type, save); + v = _XftNameConvert (t->type, save, &m); if (!XftPatternAdd (pat, t->object, v, True)) goto bail2; } @@ -250,4 +270,122 @@ free (save); bail0: return 0; +} + +static Bool +_XftNameUnparseString (const char *string, char *escape, char **destp, int *lenp) +{ + int len = *lenp; + char *dest = *destp; + char c; + + while ((c = *string++)) + { + if (escape && strchr (escape, c)) + { + if (len-- == 0) + return False; + *dest++ = escape[0]; + } + if (len-- == 0) + return False; + *dest++ = c; + } + *destp = dest; + *lenp = len; + return True; +} + +static Bool +_XftNameUnparseValue (XftValue v, char *escape, char **destp, int *lenp) +{ + char temp[1024]; + + switch (v.type) { + case XftTypeVoid: + return True; + case XftTypeInteger: + sprintf (temp, "%d", v.u.i); + return _XftNameUnparseString (temp, 0, destp, lenp); + case XftTypeDouble: + sprintf (temp, "%g", v.u.d); + return _XftNameUnparseString (temp, 0, destp, lenp); + case XftTypeString: + return _XftNameUnparseString (v.u.s, escape, destp, lenp); + case XftTypeBool: + return _XftNameUnparseString (v.u.b ? "True" : "False", 0, destp, lenp); + case XftTypeMatrix: + sprintf (temp, "%g %g %g %g", + v.u.m->xx, v.u.m->xy, v.u.m->yx, v.u.m->yy); + return _XftNameUnparseString (temp, 0, destp, lenp); + } + return False; +} + +static Bool +_XftNameUnparseValueList (XftValueList *v, char *escape, char **destp, int *lenp) +{ + while (v) + { + if (!_XftNameUnparseValue (v->value, escape, destp, lenp)) + return False; + if ((v = v->next)) + if (!_XftNameUnparseString (",", 0, destp, lenp)) + return False; + } + return True; +} + +#define XFT_ESCAPE_FIXED "\\-:," +#define XFT_ESCAPE_VARIABLE "\\=_:," + +Bool +XftNameUnparse (XftPattern *pat, char *dest, int len) +{ + int i; + XftPatternElt *e; + const XftObjectType *o; + + e = XftPatternFind (pat, XFT_FAMILY, False); + if (e) + { + if (!_XftNameUnparseValueList (e->values, XFT_ESCAPE_FIXED, + &dest, &len)) + return False; + } + e = XftPatternFind (pat, XFT_SIZE, False); + if (e) + { + if (!_XftNameUnparseString ("-", 0, &dest, &len)) + return False; + if (!_XftNameUnparseValueList (e->values, XFT_ESCAPE_FIXED, &dest, &len)) + return False; + } + for (i = 0; i < NUM_OBJECT_TYPES; i++) + { + o = &_XftObjectTypes[i]; + if (!strcmp (o->object, XFT_FAMILY) || + !strcmp (o->object, XFT_SIZE) || + !strcmp (o->object, XFT_FILE)) + continue; + + e = XftPatternFind (pat, o->object, False); + if (e) + { + if (!_XftNameUnparseString (":", 0, &dest, &len)) + return False; + if (!_XftNameUnparseString (o->object, XFT_ESCAPE_VARIABLE, + &dest, &len)) + return False; + if (!_XftNameUnparseString ("=", 0, &dest, &len)) + return False; + if (!_XftNameUnparseValueList (e->values, XFT_ESCAPE_VARIABLE, + &dest, &len)) + return False; + } + } + if (len == 0) + return False; + *dest = '\0'; + return True; } Index: xc/lib/Xft/xftpat.c diff -u xc/lib/Xft/xftpat.c:1.5 xc/lib/Xft/xftpat.c:1.6 --- xc/lib/Xft/xftpat.c:1.5 Thu Dec 14 18:03:56 2000 +++ xc/lib/Xft/xftpat.c Fri Mar 30 13:50:18 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftpat.c,v 1.5 2000/12/14 23:03:56 keithp Exp $ + * $XFree86: xc/lib/Xft/xftpat.c,v 1.6 2001/03/30 18:50:18 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -45,6 +45,8 @@ { if (v.type == XftTypeString) free (v.u.s); + if( v.type == XftTypeMatrix) + free (v.u.m); } void @@ -55,6 +57,8 @@ { if (l->value.type == XftTypeString) free (l->value.u.s); + if (l->value.type == XftTypeMatrix) + free (l->value.u.m); next = l->next; free (l); } @@ -136,6 +140,12 @@ if (!value.u.s) goto bail1; } + else if (value.type == XftTypeMatrix) + { + value.u.m = _XftSaveMatrix (value.u.m); + if (!value.u.m) + goto bail1; + } new->value = value; new->next = 0; @@ -160,6 +170,8 @@ bail2: if (value.type == XftTypeString) free (value.u.s); + else if (value.type == XftTypeMatrix) + free (value.u.m); bail1: free (new); bail0: @@ -220,6 +232,16 @@ return XftPatternAdd (p, object, v, True); } +Bool +XftPatternAddMatrix (XftPattern *p, const char *object, const XftMatrix *s) +{ + XftValue v; + + v.type = XftTypeMatrix; + v.u.m = (XftMatrix *) s; + return XftPatternAdd (p, object, v, True); +} + Bool XftPatternAddBool (XftPattern *p, const char *object, Bool b) @@ -310,6 +332,22 @@ *s = v.u.s; return XftResultMatch; } + +XftResult +XftPatternGetMatrix (XftPattern *p, const char *object, int id, XftMatrix **m) +{ + XftValue v; + XftResult r; + + r = XftPatternGet (p, object, id, &v); + if (r != XftResultMatch) + return r; + if (v.type != XftTypeMatrix) + return XftResultTypeMismatch; + *m = v.u.m; + return XftResultMatch; +} + XftResult XftPatternGetBool (XftPattern *p, const char *object, int id, Bool *b) Index: xc/lib/Xft/xftrender.c diff -u xc/lib/Xft/xftrender.c:1.5 xc/lib/Xft/xftrender.c:1.7 --- xc/lib/Xft/xftrender.c:1.5 Fri Dec 8 02:51:28 2000 +++ xc/lib/Xft/xftrender.c Sat Apr 21 12:58:02 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftrender.c,v 1.5 2000/12/08 07:51:28 keithp Exp $ + * $XFree86: xc/lib/Xft/xftrender.c,v 1.7 2001/04/21 16:58:02 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -22,6 +22,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ +#include #include "xftint.h" void @@ -97,6 +98,93 @@ } void +XftRenderStringUtf8 (Display *dpy, Picture src, + XftFontStruct *font, Picture dst, + int srcx, int srcy, + int x, int y, + XftChar8 *string, int len) +{ + XftChar8 *s; + XftChar32 c; + XftChar32 lbuf[4096]; + XftChar32 *d; + XftChar8 *dst8; + XftChar16 *dst16; + XftChar32 *dst32; + int rlen, clen; + int width = 1; + int n; + + /* compute needed width */ + if (!XftUtf8Len (string, len, &n, &width)) + return; + + d = lbuf; + if (n * width > sizeof (lbuf)) + { + d = (XftChar32 *) malloc (n * width); + if (!d) + return; + } + + switch (width) { + case 4: + s = string; + rlen = len; + dst32 = d; + while (rlen) + { + clen = XftUtf8ToUcs4 (s, &c, rlen); + if (clen <= 0) /* malformed UTF8 string */ + return; + *dst32++ = c; + s += clen; + rlen -= clen; + } + dst32 = d; + XftRenderString32 (dpy, src, font, dst, srcx, srcy, x, y, + dst32, n); + break; + case 2: + s = string; + rlen = len; + dst16 = (XftChar16 *) d; + while (rlen) + { + clen = XftUtf8ToUcs4 (s, &c, rlen); + if (clen <= 0) /* malformed UTF8 string */ + return; + *dst16++ = c; + s += clen; + rlen -= clen; + } + dst16 = (XftChar16 *) d; + XftRenderString16 (dpy, src, font, dst, srcx, srcy, x, y, + dst16, n); + break; + case 1: + s = string; + rlen = len; + dst8 = (XftChar8 *) d; + while (rlen) + { + clen = XftUtf8ToUcs4 (s, &c, rlen); + if (clen <= 0) /* malformed UTF8 string */ + return; + *dst8++ = c; + s += clen; + rlen -= clen; + } + dst8 = (XftChar8 *) d; + XftRenderString8 (dpy, src, font, dst, srcx, srcy, x, y, + dst8, n); + break; + } + if (d != lbuf) + free (d); +} + +void XftRenderExtents8 (Display *dpy, XftFontStruct *font, XftChar8 *string, @@ -109,6 +197,9 @@ int l; XGlyphInfo *gi; int x, y; + int left, right, top, bottom; + int overall_left, overall_right; + int overall_top, overall_bottom; s = string; l = len; @@ -137,26 +228,39 @@ extents->xOff = 0; return; } - *extents = *gi; - x = gi->xOff; - y = gi->yOff; + x = 0; + y = 0; + overall_left = x - gi->x; + overall_top = y - gi->y; + overall_right = overall_left + (int) gi->width; + overall_bottom = overall_top + (int) gi->height; + x += gi->xOff; + y += gi->yOff; while (len--) { c = *string++; gi = c < font->nrealized ? font->realized[c] : 0; if (!gi) continue; - if (gi->x + x < extents->x) - extents->x = gi->x + x; - if (gi->y + y < extents->y) - extents->y = gi->y + y; - if (gi->width + x > extents->width) - extents->width = gi->width + x; - if (gi->height + y > extents->height) - extents->height = gi->height + y; + left = x - gi->x; + top = y - gi->y; + right = left + (int) gi->width; + bottom = top + (int) gi->height; + if (left < overall_left) + overall_left = left; + if (top < overall_top) + overall_top = top; + if (right > overall_right) + overall_right = right; + if (bottom > overall_bottom) + overall_bottom = bottom; x += gi->xOff; y += gi->yOff; } + extents->x = -overall_left; + extents->y = -overall_top; + extents->width = overall_right - overall_left; + extents->height = overall_bottom - overall_top; extents->xOff = x; extents->yOff = y; } @@ -273,6 +377,89 @@ while (len--) { c = *string++; + gi = c < font->nrealized ? font->realized[c] : 0; + if (!gi) + continue; + if (gi->x + x < extents->x) + extents->x = gi->x + x; + if (gi->y + y < extents->y) + extents->y = gi->y + y; + if (gi->width + x > extents->width) + extents->width = gi->width + x; + if (gi->height + y > extents->height) + extents->height = gi->height + y; + x += gi->xOff; + y += gi->yOff; + } + extents->xOff = x; + extents->yOff = y; +} + +void +XftRenderExtentsUtf8 (Display *dpy, + XftFontStruct *font, + XftChar8 *string, + int len, + XGlyphInfo *extents) +{ + unsigned int missing[XFT_NMISSING]; + int nmissing; + XftChar8 *s; + XftChar32 c; + int l, clen; + XGlyphInfo *gi; + int x, y; + + s = string; + l = len; + nmissing = 0; + while (l) + { + clen = XftUtf8ToUcs4 (s, &c, l); + if (clen < 0) + break; + XftGlyphCheck (dpy, font, c, missing, &nmissing); + s += clen; + l -= clen; + } + if (nmissing) + XftGlyphLoad (dpy, font, missing, nmissing); + + gi = 0; + while (len) + { + clen = XftUtf8ToUcs4 (string, &c, len); + if (clen < 0) + { + len = 0; + break; + } + len -= clen; + string += clen; + gi = c < font->nrealized ? font->realized[c] : 0; + if (gi) + break; + } + if (len == 0 && !gi) + { + extents->width = 0; + extents->height = 0; + extents->x = 0; + extents->y = 0; + extents->yOff = 0; + extents->xOff = 0; + return; + } + *extents = *gi; + x = gi->xOff; + y = gi->yOff; + while (len) + { + clen = XftUtf8ToUcs4 (string, &c, len); + if (clen < 0) + break; + len -= clen; + string += clen; gi = c < font->nrealized ? font->realized[c] : 0; if (!gi) continue; Index: xc/lib/Xft/xftstr.c diff -u xc/lib/Xft/xftstr.c:1.2 xc/lib/Xft/xftstr.c:1.6 --- xc/lib/Xft/xftstr.c:1.2 Thu Dec 14 18:03:57 2000 +++ xc/lib/Xft/xftstr.c Sun Apr 1 10:00:01 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftstr.c,v 1.2 2000/12/14 23:03:57 keithp Exp $ + * $XFree86: xc/lib/Xft/xftstr.c,v 1.6 2001/04/01 14:00:01 tsi Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -24,6 +24,7 @@ #include #include +#include #include "xftint.h" char * @@ -31,6 +32,8 @@ { char *r; + if (!s) + return 0; r = (char *) malloc (strlen (s) + 1); if (!r) return 0; @@ -149,4 +152,108 @@ break; } return (int) c2 - (int) c1; +} + +int +XftUtf8ToUcs4 (XftChar8 *src_orig, + XftChar32 *dst, + int len) +{ + XftChar8 *src = src_orig; + XftChar8 s; + int extra; + XftChar32 result; + + if (len == 0) + return 0; + + s = *src++; + len--; + + if (!(s & 0x80)) + { + result = s; + extra = 0; + } + else if (!(s & 0x40)) + { + return -1; + } + else if (!(s & 0x20)) + { + result = s & 0x1f; + extra = 1; + } + else if (!(s & 0x10)) + { + result = s & 0xf; + extra = 2; + } + else if (!(s & 0x08)) + { + result = s & 0x07; + extra = 3; + } + else if (!(s & 0x04)) + { + result = s & 0x03; + extra = 4; + } + else if ( ! (s & 0x02)) + { + result = s & 0x01; + extra = 5; + } + else + { + return -1; + } + if (extra > len) + return -1; + + while (extra--) + { + result <<= 6; + s = *src++; + + if ((s & 0xc0) != 0x80) + return -1; + + result |= s & 0x3f; + } + *dst = result; + return src - src_orig; +} + +Bool +XftUtf8Len (XftChar8 *string, + int len, + int *nchar, + int *wchar) +{ + int n; + int clen; + int width = 1; + XftChar32 c; + + n = 0; + while (len) + { + clen = XftUtf8ToUcs4 (string, &c, len); + if (clen <= 0) /* malformed UTF8 string */ + return False; + if (c >= 0x10000) + width = 4; + else if (c >= 0x100) + { + if (width == 1) + width = 2; + } + string += clen; + len -= clen; + n++; + } + *nchar = n; + *wchar = width; + return True; } Index: xc/lib/Xft/xftxlfd.c diff -u xc/lib/Xft/xftxlfd.c:1.5 xc/lib/Xft/xftxlfd.c:1.7 --- xc/lib/Xft/xftxlfd.c:1.5 Thu Dec 14 18:03:57 2000 +++ xc/lib/Xft/xftxlfd.c Fri Dec 22 00:05:16 2000 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftxlfd.c,v 1.5 2000/12/14 23:03:57 keithp Exp $ + * $XFree86: xc/lib/Xft/xftxlfd.c,v 1.7 2000/12/22 05:05:16 tsi Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -208,9 +208,21 @@ return ret; } -XFontStruct * +typedef struct _XftCoreFont { + struct _XftCoreFont *next; + int ref; + + XFontStruct *font; + Display *display; + char *xlfd; +} XftCoreFont; + +static XftCoreFont *_XftCoreFonts; + +XFontStruct* XftCoreOpen (Display *dpy, XftPattern *pattern) { + XftCoreFont *cf; char *xlfd; char *xlfd_pixel = 0; char *i, *o; @@ -257,10 +269,67 @@ #endif xlfd = xlfd_pixel; } + } + for (cf = _XftCoreFonts; cf; cf = cf->next) + { + if (cf->display == dpy && + !_XftStrCmpIgnoreCase (cf->xlfd, xlfd)) + { + cf->ref++; + if (_XftFontDebug () & XFT_DBG_REF) + { + printf ("Xlfd \"%s\" matches existing font (%d)\n", + xlfd, cf->ref); + } + break; + } + } + if (!cf) + { + ret = XLoadQueryFont (dpy, xlfd); + if (!ret) + return 0; + + cf = (XftCoreFont *) malloc (sizeof (XftCoreFont) + + strlen (xlfd) + 1); + if (!cf) + { + XFreeFont (dpy, ret); + return 0; + } + + if (_XftFontDebug () & XFT_DBG_REF) + printf ("Xlfd \"%s\" matches new font\n", xlfd); + + cf->next = _XftCoreFonts; + _XftCoreFonts = cf; + cf->ref = 1; + + cf->font = ret; + cf->xlfd = (char *) (cf + 1); + strcpy (cf->xlfd, xlfd); } - ret = XLoadQueryFont (dpy, xlfd); if (xlfd_pixel) free (xlfd_pixel); - return ret; + return cf->font; } +void +XftCoreClose (Display *dpy, XFontStruct *font) +{ + XftCoreFont *cf, **prev; + + for (prev = &_XftCoreFonts; (cf = *prev); prev = &cf->next) + { + if (cf->display == dpy && cf->font == font) + { + if (--cf->ref == 0) + { + XFreeFont (dpy, cf->font); + *prev = cf->next; + free (cf); + } + break; + } + } +} Index: xc/lib/Xi/Imakefile diff -u xc/lib/Xi/Imakefile:1.3 xc/lib/Xi/Imakefile:1.4 --- xc/lib/Xi/Imakefile:1.3 Sun Dec 20 17:18:56 1998 +++ xc/lib/Xi/Imakefile Wed Jan 17 14:42:47 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile,v 1.17 94/03/27 15:54:53 rws Exp $ -XCOMM $XFree86: xc/lib/Xi/Imakefile,v 1.3 1998/12/20 22:18:56 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:45:53 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/Xi/Imakefile,v 1.4 2001/01/17 19:42:47 dawes Exp $ + #define DoNormalLib NormalLibXi #define DoSharedLib SharedLibXi #define DoExtraLib SharedLibXi Index: xc/lib/Xi/XAllowDv.c diff -u xc/lib/Xi/XAllowDv.c:3.1 xc/lib/Xi/XAllowDv.c:3.2 --- xc/lib/Xi/XAllowDv.c:3.1 Sat Oct 3 05:06:04 1998 +++ xc/lib/Xi/XAllowDv.c Wed Jan 17 14:42:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: XAllowDv.c /main/6 1998/02/06 15:01:54 kaleb $ */ +/* $Xorg: XAllowDv.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XAllowDv.c,v 3.1 1998/10/03 09:06:04 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XAllowDv.c,v 3.2 2001/01/17 19:42:47 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XChgDCtl.c diff -u xc/lib/Xi/XChgDCtl.c:3.1 xc/lib/Xi/XChgDCtl.c:3.2 --- xc/lib/Xi/XChgDCtl.c:3.1 Sat Oct 3 05:06:04 1998 +++ xc/lib/Xi/XChgDCtl.c Wed Jan 17 14:42:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: XChgDCtl.c /main/5 1998/02/06 15:02:00 kaleb $ */ +/* $Xorg: XChgDCtl.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgDCtl.c,v 3.1 1998/10/03 09:06:04 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgDCtl.c,v 3.2 2001/01/17 19:42:47 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XChgFCtl.c diff -u xc/lib/Xi/XChgFCtl.c:3.1 xc/lib/Xi/XChgFCtl.c:3.2 --- xc/lib/Xi/XChgFCtl.c:3.1 Sat Oct 3 05:06:05 1998 +++ xc/lib/Xi/XChgFCtl.c Wed Jan 17 14:42:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: XChgFCtl.c /main/8 1998/02/06 15:02:05 kaleb $ */ +/* $Xorg: XChgFCtl.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgFCtl.c,v 3.1 1998/10/03 09:06:05 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgFCtl.c,v 3.2 2001/01/17 19:42:47 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XChgKMap.c diff -u xc/lib/Xi/XChgKMap.c:3.1 xc/lib/Xi/XChgKMap.c:3.2 --- xc/lib/Xi/XChgKMap.c:3.1 Sat Oct 3 05:06:05 1998 +++ xc/lib/Xi/XChgKMap.c Wed Jan 17 14:42:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: XChgKMap.c /main/5 1998/02/06 15:02:16 kaleb $ */ +/* $Xorg: XChgKMap.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgKMap.c,v 3.1 1998/10/03 09:06:05 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgKMap.c,v 3.2 2001/01/17 19:42:47 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XChgKbd.c diff -u xc/lib/Xi/XChgKbd.c:3.1 xc/lib/Xi/XChgKbd.c:3.2 --- xc/lib/Xi/XChgKbd.c:3.1 Sat Oct 3 05:06:05 1998 +++ xc/lib/Xi/XChgKbd.c Wed Jan 17 14:42:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: XChgKbd.c /main/7 1998/02/06 15:02:11 kaleb $ */ +/* $Xorg: XChgKbd.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgKbd.c,v 3.1 1998/10/03 09:06:05 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgKbd.c,v 3.2 2001/01/17 19:42:47 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XChgPnt.c diff -u xc/lib/Xi/XChgPnt.c:3.1 xc/lib/Xi/XChgPnt.c:3.2 --- xc/lib/Xi/XChgPnt.c:3.1 Sat Oct 3 05:06:05 1998 +++ xc/lib/Xi/XChgPnt.c Wed Jan 17 14:42:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: XChgPnt.c /main/7 1998/02/06 15:02:22 kaleb $ */ +/* $Xorg: XChgPnt.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgPnt.c,v 3.1 1998/10/03 09:06:05 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgPnt.c,v 3.2 2001/01/17 19:42:47 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XChgProp.c diff -u xc/lib/Xi/XChgProp.c:3.1 xc/lib/Xi/XChgProp.c:3.2 --- xc/lib/Xi/XChgProp.c:3.1 Sat Oct 3 05:06:06 1998 +++ xc/lib/Xi/XChgProp.c Wed Jan 17 14:42:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: XChgProp.c /main/7 1998/02/06 15:02:27 kaleb $ */ +/* $Xorg: XChgProp.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgProp.c,v 3.1 1998/10/03 09:06:06 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgProp.c,v 3.2 2001/01/17 19:42:47 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XCloseDev.c diff -u xc/lib/Xi/XCloseDev.c:3.1 xc/lib/Xi/XCloseDev.c:3.2 --- xc/lib/Xi/XCloseDev.c:3.1 Sat Oct 3 05:06:06 1998 +++ xc/lib/Xi/XCloseDev.c Wed Jan 17 14:42:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: XCloseDev.c /main/6 1998/02/06 15:02:33 kaleb $ */ +/* $Xorg: XCloseDev.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XCloseDev.c,v 3.1 1998/10/03 09:06:06 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XCloseDev.c,v 3.2 2001/01/17 19:42:48 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XDevBell.c diff -u xc/lib/Xi/XDevBell.c:3.1 xc/lib/Xi/XDevBell.c:3.2 --- xc/lib/Xi/XDevBell.c:3.1 Sat Oct 3 05:06:06 1998 +++ xc/lib/Xi/XDevBell.c Wed Jan 17 14:42:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: XDevBell.c /main/6 1998/02/06 15:02:38 kaleb $ */ +/* $Xorg: XDevBell.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XDevBell.c,v 3.1 1998/10/03 09:06:06 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XDevBell.c,v 3.2 2001/01/17 19:42:48 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XExtInt.c diff -u xc/lib/Xi/XExtInt.c:3.3 xc/lib/Xi/XExtInt.c:3.4 --- xc/lib/Xi/XExtInt.c:3.3 Sat Oct 3 05:06:07 1998 +++ xc/lib/Xi/XExtInt.c Wed Jan 17 14:42:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: XExtInt.c /main/34 1998/04/30 15:52:09 kaleb $ */ +/* $Xorg: XExtInt.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XExtInt.c,v 3.3 1998/10/03 09:06:07 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XExtInt.c,v 3.4 2001/01/17 19:42:48 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XExtToWire.c diff -u xc/lib/Xi/XExtToWire.c:3.1 xc/lib/Xi/XExtToWire.c:3.2 --- xc/lib/Xi/XExtToWire.c:3.1 Sat Oct 3 05:06:07 1998 +++ xc/lib/Xi/XExtToWire.c Wed Jan 17 14:42:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: XExtToWire.c /main/17 1998/02/06 15:02:48 kaleb $ */ +/* $Xorg: XExtToWire.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XExtToWire.c,v 3.1 1998/10/03 09:06:07 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XExtToWire.c,v 3.2 2001/01/17 19:42:49 dawes Exp $ */ /**************************************************************** * Index: xc/lib/Xi/XFreeLst.c diff -u xc/lib/Xi/XFreeLst.c:1.1.1.2 xc/lib/Xi/XFreeLst.c:1.1.1.3 --- xc/lib/Xi/XFreeLst.c:1.1.1.2 Sun Sep 27 03:54:37 1998 +++ xc/lib/Xi/XFreeLst.c Tue Jan 16 17:20:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: XFreeLst.c /main/3 1998/02/06 15:02:54 kaleb $ */ +/* $Xorg: XFreeLst.c,v 1.3 2000/08/17 19:45:55 cpqbld Exp $ */ /************************************************************ Index: xc/lib/Xi/XGMotion.c diff -u xc/lib/Xi/XGMotion.c:3.1 xc/lib/Xi/XGMotion.c:3.2 --- xc/lib/Xi/XGMotion.c:3.1 Sat Oct 3 05:06:07 1998 +++ xc/lib/Xi/XGMotion.c Wed Jan 17 14:42:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: XGMotion.c /main/15 1998/04/30 15:52:14 kaleb $ */ +/* $Xorg: XGMotion.c,v 1.3 2000/08/17 19:45:55 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGMotion.c,v 3.1 1998/10/03 09:06:07 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGMotion.c,v 3.2 2001/01/17 19:42:49 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGetBMap.c diff -u xc/lib/Xi/XGetBMap.c:3.1 xc/lib/Xi/XGetBMap.c:3.2 --- xc/lib/Xi/XGetBMap.c:3.1 Sat Oct 3 05:06:07 1998 +++ xc/lib/Xi/XGetBMap.c Wed Jan 17 14:42:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: XGetBMap.c /main/6 1998/02/06 15:03:00 kaleb $ */ +/* $Xorg: XGetBMap.c,v 1.3 2000/08/17 19:45:55 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetBMap.c,v 3.1 1998/10/03 09:06:07 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetBMap.c,v 3.2 2001/01/17 19:42:49 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGetDCtl.c diff -u xc/lib/Xi/XGetDCtl.c:3.1 xc/lib/Xi/XGetDCtl.c:3.2 --- xc/lib/Xi/XGetDCtl.c:3.1 Sat Oct 3 05:06:08 1998 +++ xc/lib/Xi/XGetDCtl.c Wed Jan 17 14:42:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: XGetDCtl.c /main/6 1998/04/30 15:52:19 kaleb $ */ +/* $Xorg: XGetDCtl.c,v 1.3 2000/08/17 19:45:55 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetDCtl.c,v 3.1 1998/10/03 09:06:08 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetDCtl.c,v 3.2 2001/01/17 19:42:49 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGetFCtl.c diff -u xc/lib/Xi/XGetFCtl.c:3.1 xc/lib/Xi/XGetFCtl.c:3.2 --- xc/lib/Xi/XGetFCtl.c:3.1 Sat Oct 3 05:06:08 1998 +++ xc/lib/Xi/XGetFCtl.c Wed Jan 17 14:42:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: XGetFCtl.c /main/15 1998/04/30 15:52:23 kaleb $ */ +/* $Xorg: XGetFCtl.c,v 1.3 2000/08/17 19:45:55 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetFCtl.c,v 3.1 1998/10/03 09:06:08 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetFCtl.c,v 3.2 2001/01/17 19:42:49 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGetKMap.c diff -u xc/lib/Xi/XGetKMap.c:3.1 xc/lib/Xi/XGetKMap.c:3.2 --- xc/lib/Xi/XGetKMap.c:3.1 Sat Oct 3 05:06:08 1998 +++ xc/lib/Xi/XGetKMap.c Wed Jan 17 14:42:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: XGetKMap.c /main/7 1998/02/06 15:03:16 kaleb $ */ +/* $Xorg: XGetKMap.c,v 1.3 2000/08/17 19:45:55 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetKMap.c,v 3.1 1998/10/03 09:06:08 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetKMap.c,v 3.2 2001/01/17 19:42:49 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGetMMap.c diff -u xc/lib/Xi/XGetMMap.c:3.1 xc/lib/Xi/XGetMMap.c:3.2 --- xc/lib/Xi/XGetMMap.c:3.1 Sat Oct 3 05:06:09 1998 +++ xc/lib/Xi/XGetMMap.c Wed Jan 17 14:42:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: XGetMMap.c /main/6 1998/02/06 15:03:21 kaleb $ */ +/* $Xorg: XGetMMap.c,v 1.3 2000/08/17 19:45:55 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetMMap.c,v 3.1 1998/10/03 09:06:09 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetMMap.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGetProp.c diff -u xc/lib/Xi/XGetProp.c:3.1 xc/lib/Xi/XGetProp.c:3.2 --- xc/lib/Xi/XGetProp.c:3.1 Sat Oct 3 05:06:09 1998 +++ xc/lib/Xi/XGetProp.c Wed Jan 17 14:42:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: XGetProp.c /main/9 1998/02/06 15:03:26 kaleb $ */ +/* $Xorg: XGetProp.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetProp.c,v 3.1 1998/10/03 09:06:09 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetProp.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGetVers.c diff -u xc/lib/Xi/XGetVers.c:3.1 xc/lib/Xi/XGetVers.c:3.2 --- xc/lib/Xi/XGetVers.c:3.1 Sat Oct 3 05:06:09 1998 +++ xc/lib/Xi/XGetVers.c Wed Jan 17 14:42:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: XGetVers.c /main/8 1998/02/06 15:03:32 kaleb $ */ +/* $Xorg: XGetVers.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetVers.c,v 3.1 1998/10/03 09:06:09 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetVers.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGrDvBut.c diff -u xc/lib/Xi/XGrDvBut.c:3.2 xc/lib/Xi/XGrDvBut.c:3.3 --- xc/lib/Xi/XGrDvBut.c:3.2 Sat Oct 3 05:06:09 1998 +++ xc/lib/Xi/XGrDvBut.c Wed Jan 17 14:42:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: XGrDvBut.c /main/8 1998/02/06 15:03:55 kaleb $ */ +/* $Xorg: XGrDvBut.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGrDvBut.c,v 3.2 1998/10/03 09:06:09 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGrDvBut.c,v 3.3 2001/01/17 19:42:50 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGrDvKey.c diff -u xc/lib/Xi/XGrDvKey.c:3.1 xc/lib/Xi/XGrDvKey.c:3.2 --- xc/lib/Xi/XGrDvKey.c:3.1 Sat Oct 3 05:06:10 1998 +++ xc/lib/Xi/XGrDvKey.c Wed Jan 17 14:42:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: XGrDvKey.c /main/9 1998/02/06 15:04:00 kaleb $ */ +/* $Xorg: XGrDvKey.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGrDvKey.c,v 3.1 1998/10/03 09:06:10 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGrDvKey.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGrabDev.c diff -u xc/lib/Xi/XGrabDev.c:3.1 xc/lib/Xi/XGrabDev.c:3.2 --- xc/lib/Xi/XGrabDev.c:3.1 Sat Oct 3 05:06:10 1998 +++ xc/lib/Xi/XGrabDev.c Wed Jan 17 14:42:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: XGrabDev.c /main/7 1998/02/06 15:03:50 kaleb $ */ +/* $Xorg: XGrabDev.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGrabDev.c,v 3.1 1998/10/03 09:06:10 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGrabDev.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGtFocus.c diff -u xc/lib/Xi/XGtFocus.c:3.1 xc/lib/Xi/XGtFocus.c:3.2 --- xc/lib/Xi/XGtFocus.c:3.1 Sat Oct 3 05:06:10 1998 +++ xc/lib/Xi/XGtFocus.c Wed Jan 17 14:42:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: XGtFocus.c /main/6 1998/02/06 15:04:06 kaleb $ */ +/* $Xorg: XGtFocus.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGtFocus.c,v 3.1 1998/10/03 09:06:10 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGtFocus.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGtSelect.c diff -u xc/lib/Xi/XGtSelect.c:3.1 xc/lib/Xi/XGtSelect.c:3.2 --- xc/lib/Xi/XGtSelect.c:3.1 Sat Oct 3 05:06:11 1998 +++ xc/lib/Xi/XGtSelect.c Wed Jan 17 14:42:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: XGtSelect.c /main/11 1998/02/06 15:04:11 kaleb $ */ +/* $Xorg: XGtSelect.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGtSelect.c,v 3.1 1998/10/03 09:06:11 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGtSelect.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XListDev.c diff -u xc/lib/Xi/XListDev.c:3.1 xc/lib/Xi/XListDev.c:3.2 --- xc/lib/Xi/XListDev.c:3.1 Sat Oct 3 05:06:11 1998 +++ xc/lib/Xi/XListDev.c Wed Jan 17 14:42:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: XListDev.c /main/22 1998/04/30 15:52:28 kaleb $ */ +/* $Xorg: XListDev.c,v 1.4 2000/08/17 19:45:56 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XListDev.c,v 3.1 1998/10/03 09:06:11 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XListDev.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ /*********************************************************************** * @@ -92,7 +92,7 @@ return (XDeviceInfo *) NULL; } - if (*ndevices = rep.ndevices) /* at least 1 input device */ + if ((*ndevices = rep.ndevices)) /* at least 1 input device */ { size = *ndevices * sizeof (XDeviceInfo); rlen = rep.length << 2; /* multiply length by 4 */ Index: xc/lib/Xi/XOpenDev.c diff -u xc/lib/Xi/XOpenDev.c:3.1 xc/lib/Xi/XOpenDev.c:3.2 --- xc/lib/Xi/XOpenDev.c:3.1 Sat Oct 3 05:06:11 1998 +++ xc/lib/Xi/XOpenDev.c Wed Jan 17 14:42:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: XOpenDev.c /main/11 1998/02/06 15:04:22 kaleb $ */ +/* $Xorg: XOpenDev.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XOpenDev.c,v 3.1 1998/10/03 09:06:11 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XOpenDev.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XQueryDv.c diff -u xc/lib/Xi/XQueryDv.c:3.1 xc/lib/Xi/XQueryDv.c:3.2 --- xc/lib/Xi/XQueryDv.c:3.1 Sat Oct 3 05:06:12 1998 +++ xc/lib/Xi/XQueryDv.c Wed Jan 17 14:42:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: XQueryDv.c /main/13 1998/04/30 15:52:32 kaleb $ */ +/* $Xorg: XQueryDv.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XQueryDv.c,v 3.1 1998/10/03 09:06:12 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XQueryDv.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XSelect.c diff -u xc/lib/Xi/XSelect.c:3.1 xc/lib/Xi/XSelect.c:3.2 --- xc/lib/Xi/XSelect.c:3.1 Sat Oct 3 05:06:12 1998 +++ xc/lib/Xi/XSelect.c Wed Jan 17 14:42:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: XSelect.c /main/6 1998/02/06 15:04:33 kaleb $ */ +/* $Xorg: XSelect.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSelect.c,v 3.1 1998/10/03 09:06:12 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSelect.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XSetBMap.c diff -u xc/lib/Xi/XSetBMap.c:3.1 xc/lib/Xi/XSetBMap.c:3.2 --- xc/lib/Xi/XSetBMap.c:3.1 Sat Oct 3 05:06:12 1998 +++ xc/lib/Xi/XSetBMap.c Wed Jan 17 14:42:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: XSetBMap.c /main/5 1998/02/06 15:04:40 kaleb $ */ +/* $Xorg: XSetBMap.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSetBMap.c,v 3.1 1998/10/03 09:06:12 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSetBMap.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XSetDVal.c diff -u xc/lib/Xi/XSetDVal.c:3.1 xc/lib/Xi/XSetDVal.c:3.2 --- xc/lib/Xi/XSetDVal.c:3.1 Sat Oct 3 05:06:14 1998 +++ xc/lib/Xi/XSetDVal.c Wed Jan 17 14:42:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: XSetDVal.c /main/4 1998/02/06 15:04:46 kaleb $ */ +/* $Xorg: XSetDVal.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSetDVal.c,v 3.1 1998/10/03 09:06:14 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSetDVal.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XSetMMap.c diff -u xc/lib/Xi/XSetMMap.c:3.1 xc/lib/Xi/XSetMMap.c:3.2 --- xc/lib/Xi/XSetMMap.c:3.1 Sat Oct 3 05:06:14 1998 +++ xc/lib/Xi/XSetMMap.c Wed Jan 17 14:42:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: XSetMMap.c /main/7 1998/02/06 15:04:51 kaleb $ */ +/* $Xorg: XSetMMap.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSetMMap.c,v 3.1 1998/10/03 09:06:14 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSetMMap.c,v 3.2 2001/01/17 19:42:51 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XSetMode.c diff -u xc/lib/Xi/XSetMode.c:3.1 xc/lib/Xi/XSetMode.c:3.2 --- xc/lib/Xi/XSetMode.c:3.1 Sat Oct 3 05:06:14 1998 +++ xc/lib/Xi/XSetMode.c Wed Jan 17 14:42:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: XSetMode.c /main/8 1998/02/06 15:04:57 kaleb $ */ +/* $Xorg: XSetMode.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSetMode.c,v 3.1 1998/10/03 09:06:14 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSetMode.c,v 3.2 2001/01/17 19:42:51 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XSndExEv.c diff -u xc/lib/Xi/XSndExEv.c:3.1 xc/lib/Xi/XSndExEv.c:3.2 --- xc/lib/Xi/XSndExEv.c:3.1 Sat Oct 3 05:06:14 1998 +++ xc/lib/Xi/XSndExEv.c Wed Jan 17 14:42:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: XSndExEv.c /main/8 1998/02/06 15:05:03 kaleb $ */ +/* $Xorg: XSndExEv.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSndExEv.c,v 3.1 1998/10/03 09:06:14 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSndExEv.c,v 3.2 2001/01/17 19:42:51 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XStFocus.c diff -u xc/lib/Xi/XStFocus.c:3.1 xc/lib/Xi/XStFocus.c:3.2 --- xc/lib/Xi/XStFocus.c:3.1 Sat Oct 3 05:06:15 1998 +++ xc/lib/Xi/XStFocus.c Wed Jan 17 14:42:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: XStFocus.c /main/4 1998/02/06 15:05:09 kaleb $ */ +/* $Xorg: XStFocus.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XStFocus.c,v 3.1 1998/10/03 09:06:15 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XStFocus.c,v 3.2 2001/01/17 19:42:51 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XUngrDev.c diff -u xc/lib/Xi/XUngrDev.c:3.1 xc/lib/Xi/XUngrDev.c:3.2 --- xc/lib/Xi/XUngrDev.c:3.1 Sat Oct 3 05:06:15 1998 +++ xc/lib/Xi/XUngrDev.c Wed Jan 17 14:42:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: XUngrDev.c /main/5 1998/02/06 15:05:14 kaleb $ */ +/* $Xorg: XUngrDev.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XUngrDev.c,v 3.1 1998/10/03 09:06:15 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XUngrDev.c,v 3.2 2001/01/17 19:42:51 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XUngrDvB.c diff -u xc/lib/Xi/XUngrDvB.c:3.1 xc/lib/Xi/XUngrDvB.c:3.2 --- xc/lib/Xi/XUngrDvB.c:3.1 Sat Oct 3 05:06:15 1998 +++ xc/lib/Xi/XUngrDvB.c Wed Jan 17 14:42:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: XUngrDvB.c /main/7 1998/02/06 15:05:19 kaleb $ */ +/* $Xorg: XUngrDvB.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XUngrDvB.c,v 3.1 1998/10/03 09:06:15 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XUngrDvB.c,v 3.2 2001/01/17 19:42:51 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XUngrDvK.c diff -u xc/lib/Xi/XUngrDvK.c:3.1 xc/lib/Xi/XUngrDvK.c:3.2 --- xc/lib/Xi/XUngrDvK.c:3.1 Sat Oct 3 05:06:16 1998 +++ xc/lib/Xi/XUngrDvK.c Wed Jan 17 14:42:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: XUngrDvK.c /main/7 1998/02/06 15:05:24 kaleb $ */ +/* $Xorg: XUngrDvK.c,v 1.3 2000/08/17 19:45:58 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XUngrDvK.c,v 3.1 1998/10/03 09:06:16 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XUngrDvK.c,v 3.2 2001/01/17 19:42:51 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/Xi-def.cpp diff -u xc/lib/Xi/Xi-def.cpp:1.1.1.2 xc/lib/Xi/Xi-def.cpp:1.1.1.3 --- xc/lib/Xi/Xi-def.cpp:1.1.1.2 Sat Dec 21 22:22:57 1996 +++ xc/lib/Xi/Xi-def.cpp Tue Jan 16 17:21:19 2001 @@ -46,4 +46,4 @@ _xibadevent _xibadmode _xidevicebusy -/* $XConsortium: Xi-def.cpp /main/3 1996/05/07 13:15:35 kaleb $ */ +/* $Xorg: Xi-def.cpp,v 1.3 2000/08/17 19:45:58 cpqbld Exp $ */ Index: xc/lib/Xmu/AllCmap.c diff -u xc/lib/Xmu/AllCmap.c:1.6 xc/lib/Xmu/AllCmap.c:1.7 --- xc/lib/Xmu/AllCmap.c:1.6 Sun Mar 21 02:34:35 1999 +++ xc/lib/Xmu/AllCmap.c Wed Jan 17 14:42:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: AllCmap.c /main/8 1998/02/06 15:40:57 kaleb $ */ +/* $Xorg: AllCmap.c,v 1.3 2000/08/17 19:45:58 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/AllCmap.c,v 1.6 1999/03/21 07:34:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/AllCmap.c,v 1.7 2001/01/17 19:42:53 dawes Exp $ */ #include #include Index: xc/lib/Xmu/Atoms.c diff -u xc/lib/Xmu/Atoms.c:3.5 xc/lib/Xmu/Atoms.c:3.6 --- xc/lib/Xmu/Atoms.c:3.5 Tue Nov 28 13:50:07 2000 +++ xc/lib/Xmu/Atoms.c Wed Jan 17 14:42:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: Atoms.c /main/20 1998/02/06 15:41:04 kaleb $ */ +/* $Xorg: Atoms.c,v 1.3 2000/08/17 19:45:58 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Atoms.c,v 3.5 2000/11/28 18:50:07 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Atoms.c,v 3.6 2001/01/17 19:42:53 dawes Exp $ */ /* * This file contains routines to cache atoms, avoiding multiple Index: xc/lib/Xmu/Atoms.h diff -u xc/lib/Xmu/Atoms.h:1.5 xc/lib/Xmu/Atoms.h:1.6 --- xc/lib/Xmu/Atoms.h:1.5 Tue Nov 28 13:50:09 2000 +++ xc/lib/Xmu/Atoms.h Wed Jan 17 14:42:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: Atoms.h /main/10 1998/02/06 15:41:11 kaleb $ */ +/* $Xorg: Atoms.h,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Atoms.h,v 1.5 2000/11/28 18:50:09 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Atoms.h,v 1.6 2001/01/17 19:42:53 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities Index: xc/lib/Xmu/CharSet.h diff -u xc/lib/Xmu/CharSet.h:1.6 xc/lib/Xmu/CharSet.h:1.7 --- xc/lib/Xmu/CharSet.h:1.6 Sat Oct 3 05:06:21 1998 +++ xc/lib/Xmu/CharSet.h Wed Jan 17 14:42:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: CharSet.h /main/6 1998/02/06 15:41:16 kaleb $ */ +/* $Xorg: CharSet.h,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ /* @@ -22,7 +22,7 @@ */ -/* $XFree86: xc/lib/Xmu/CharSet.h,v 1.6 1998/10/03 09:06:21 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CharSet.h,v 1.7 2001/01/17 19:42:53 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities Index: xc/lib/Xmu/ClientWin.c diff -u xc/lib/Xmu/ClientWin.c:1.5 xc/lib/Xmu/ClientWin.c:1.6 --- xc/lib/Xmu/ClientWin.c:1.5 Sun Mar 21 02:34:35 1999 +++ xc/lib/Xmu/ClientWin.c Wed Jan 17 14:42:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: ClientWin.c /main/5 1998/02/06 15:41:21 kaleb $ */ +/* $Xorg: ClientWin.c,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/ClientWin.c,v 1.5 1999/03/21 07:34:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/ClientWin.c,v 1.6 2001/01/17 19:42:53 dawes Exp $ */ #include #include Index: xc/lib/Xmu/CloseHook.c diff -u xc/lib/Xmu/CloseHook.c:3.3 xc/lib/Xmu/CloseHook.c:3.4 --- xc/lib/Xmu/CloseHook.c:3.3 Sat Oct 3 05:06:22 1998 +++ xc/lib/Xmu/CloseHook.c Wed Jan 17 14:42:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: CloseHook.c /main/10 1998/02/06 15:41:26 kaleb $ */ +/* $Xorg: CloseHook.c,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ /* Copyright 1989, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CloseHook.c,v 3.3 1998/10/03 09:06:22 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CloseHook.c,v 3.4 2001/01/17 19:42:53 dawes Exp $ */ /* * CloseDisplayHook package - provide callback on XCloseDisplay Index: xc/lib/Xmu/CloseHook.h diff -u xc/lib/Xmu/CloseHook.h:1.5 xc/lib/Xmu/CloseHook.h:1.6 --- xc/lib/Xmu/CloseHook.h:1.5 Sat Oct 3 05:06:22 1998 +++ xc/lib/Xmu/CloseHook.h Wed Jan 17 14:42:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: CloseHook.h /main/8 1998/02/06 15:41:32 kaleb $ */ +/* $Xorg: CloseHook.h,v 1.4 2000/08/17 19:45:59 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CloseHook.h,v 1.5 1998/10/03 09:06:22 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CloseHook.h,v 1.6 2001/01/17 19:42:53 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities @@ -31,6 +31,7 @@ #ifndef _XMU_CLOSEHOOK_H_ #define _XMU_CLOSEHOOK_H_ +#include #include #include Index: xc/lib/Xmu/CmapAlloc.c diff -u xc/lib/Xmu/CmapAlloc.c:1.5 xc/lib/Xmu/CmapAlloc.c:1.6 --- xc/lib/Xmu/CmapAlloc.c:1.5 Sat Oct 3 05:06:22 1998 +++ xc/lib/Xmu/CmapAlloc.c Wed Jan 17 14:42:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: CmapAlloc.c /main/10 1998/02/06 15:41:38 kaleb $ */ +/* $Xorg: CmapAlloc.c,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CmapAlloc.c,v 1.5 1998/10/03 09:06:22 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CmapAlloc.c,v 1.6 2001/01/17 19:42:53 dawes Exp $ */ /* * Author: Donna Converse, MIT X Consortium Index: xc/lib/Xmu/Converters.h diff -u xc/lib/Xmu/Converters.h:1.4 xc/lib/Xmu/Converters.h:1.5 --- xc/lib/Xmu/Converters.h:1.4 Sat Oct 3 05:06:22 1998 +++ xc/lib/Xmu/Converters.h Wed Jan 17 14:42:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: Converters.h /main/17 1998/02/06 15:41:45 kaleb $ */ +/* $Xorg: Converters.h,v 1.4 2000/08/17 19:45:59 cpqbld Exp $ */ /* @@ -22,7 +22,7 @@ */ -/* $XFree86: xc/lib/Xmu/Converters.h,v 1.4 1998/10/03 09:06:22 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Converters.h,v 1.5 2001/01/17 19:42:53 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities @@ -32,6 +32,7 @@ #ifndef _XMU_STRCONVERT_H_ #define _XMU_STRCONVERT_H_ +#include #include _XFUNCPROTOBEGIN Index: xc/lib/Xmu/CrCmap.c diff -u xc/lib/Xmu/CrCmap.c:3.5 xc/lib/Xmu/CrCmap.c:3.6 --- xc/lib/Xmu/CrCmap.c:3.5 Sun Mar 21 02:34:35 1999 +++ xc/lib/Xmu/CrCmap.c Wed Jan 17 14:42:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: CrCmap.c /main/7 1998/02/06 15:41:49 kaleb $ */ +/* $Xorg: CrCmap.c,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CrCmap.c,v 3.5 1999/03/21 07:34:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CrCmap.c,v 3.6 2001/01/17 19:42:53 dawes Exp $ */ /* * Author: Donna Converse, MIT X Consortium Index: xc/lib/Xmu/CrPixFBit.c diff -u xc/lib/Xmu/CrPixFBit.c:1.5 xc/lib/Xmu/CrPixFBit.c:1.6 --- xc/lib/Xmu/CrPixFBit.c:1.5 Sat Oct 3 05:06:23 1998 +++ xc/lib/Xmu/CrPixFBit.c Wed Jan 17 14:42:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: CrPixFBit.c /main/5 1998/02/06 15:41:55 kaleb $ */ +/* $Xorg: CrPixFBit.c,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CrPixFBit.c,v 1.5 1998/10/03 09:06:23 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CrPixFBit.c,v 1.6 2001/01/17 19:42:53 dawes Exp $ */ /* * This file contains miscellaneous utility routines and is not part of the Index: xc/lib/Xmu/CurUtil.h diff -u xc/lib/Xmu/CurUtil.h:1.4 xc/lib/Xmu/CurUtil.h:1.5 --- xc/lib/Xmu/CurUtil.h:1.4 Sat Oct 3 05:06:23 1998 +++ xc/lib/Xmu/CurUtil.h Wed Jan 17 14:42:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: CurUtil.h /main/5 1998/02/06 15:42:08 kaleb $ */ +/* $Xorg: CurUtil.h,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CurUtil.h,v 1.4 1998/10/03 09:06:23 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CurUtil.h,v 1.5 2001/01/17 19:42:54 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities Index: xc/lib/Xmu/CursorName.c diff -u xc/lib/Xmu/CursorName.c:3.4 xc/lib/Xmu/CursorName.c:3.6 --- xc/lib/Xmu/CursorName.c:3.4 Sun Mar 21 02:34:35 1999 +++ xc/lib/Xmu/CursorName.c Thu Mar 29 21:15:19 2001 @@ -1,4 +1,4 @@ -/* $TOG: CursorName.c /main/10 1998/02/06 15:42:01 kaleb $ */ +/* $Xorg: CursorName.c,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ /* @@ -21,9 +21,8 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CursorName.c,v 3.4 1999/03/21 07:34:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CursorName.c,v 3.6 2001/03/30 02:15:19 keithp Exp $ */ -#include #include #include #include @@ -113,14 +112,15 @@ {"watch", XC_watch}, {"xterm", XC_xterm}, }; +#define NUM_CURSOR_NAMES (sizeof (cursor_names) / sizeof (cursor_names[0])) register _Xconst struct _CursorName *table; - register Cardinal i; + register int i; char tmp[40]; if (strlen (name) >= sizeof tmp) return -1; XmuCopyISOLatin1Lowered (tmp, name); - for (i=0, table=cursor_names; i < XtNumber(cursor_names); i++, table++ ) { + for (i=0, table=cursor_names; i < NUM_CURSOR_NAMES; i++, table++ ) { if (strcmp(tmp, table->name) == 0) return table->shape; } Index: xc/lib/Xmu/CvtCache.c diff -u xc/lib/Xmu/CvtCache.c:3.3 xc/lib/Xmu/CvtCache.c:3.4 --- xc/lib/Xmu/CvtCache.c:3.3 Sat Oct 3 05:06:24 1998 +++ xc/lib/Xmu/CvtCache.c Wed Jan 17 14:42:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: CvtCache.c /main/9 1998/02/06 15:42:13 kaleb $ */ +/* $Xorg: CvtCache.c,v 1.4 2000/08/17 19:46:00 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CvtCache.c,v 3.3 1998/10/03 09:06:24 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CvtCache.c,v 3.4 2001/01/17 19:42:54 dawes Exp $ */ /* * Author: Jim Fulton, MIT X Consortium Index: xc/lib/Xmu/CvtCache.h diff -u xc/lib/Xmu/CvtCache.h:1.5 xc/lib/Xmu/CvtCache.h:1.6 --- xc/lib/Xmu/CvtCache.h:1.5 Sun Mar 21 02:34:36 1999 +++ xc/lib/Xmu/CvtCache.h Wed Jan 17 14:42:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: CvtCache.h /main/8 1998/02/06 15:42:17 kaleb $ */ +/* $Xorg: CvtCache.h,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CvtCache.h,v 1.5 1999/03/21 07:34:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CvtCache.h,v 1.6 2001/01/17 19:42:54 dawes Exp $ */ /* * Public Interfaces Index: xc/lib/Xmu/CvtStdSel.c diff -u xc/lib/Xmu/CvtStdSel.c:3.14 xc/lib/Xmu/CvtStdSel.c:3.15 --- xc/lib/Xmu/CvtStdSel.c:3.14 Mon Nov 6 14:24:02 2000 +++ xc/lib/Xmu/CvtStdSel.c Wed Jan 17 14:42:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: CvtStdSel.c /main/43 1998/02/06 15:42:23 kaleb $ */ +/* $Xorg: CvtStdSel.c,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CvtStdSel.c,v 3.14 2000/11/06 19:24:02 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CvtStdSel.c,v 3.15 2001/01/17 19:42:54 dawes Exp $ */ /* * This file contains routines to handle common selection targets. Index: xc/lib/Xmu/DefErrMsg.c diff -u xc/lib/Xmu/DefErrMsg.c:1.6 xc/lib/Xmu/DefErrMsg.c:1.7 --- xc/lib/Xmu/DefErrMsg.c:1.6 Sat Oct 3 05:06:25 1998 +++ xc/lib/Xmu/DefErrMsg.c Wed Jan 17 14:42:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: DefErrMsg.c /main/11 1998/02/06 15:42:28 kaleb $ */ +/* $Xorg: DefErrMsg.c,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/DefErrMsg.c,v 1.6 1998/10/03 09:06:25 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/DefErrMsg.c,v 1.7 2001/01/17 19:42:54 dawes Exp $ */ #include #define NEED_EVENTS Index: xc/lib/Xmu/DelCmap.c diff -u xc/lib/Xmu/DelCmap.c:1.5 xc/lib/Xmu/DelCmap.c:1.6 --- xc/lib/Xmu/DelCmap.c:1.5 Sat Oct 3 05:06:25 1998 +++ xc/lib/Xmu/DelCmap.c Wed Jan 17 14:42:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: DelCmap.c /main/3 1998/02/06 15:42:34 kaleb $ */ +/* $Xorg: DelCmap.c,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/DelCmap.c,v 1.5 1998/10/03 09:06:25 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/DelCmap.c,v 1.6 2001/01/17 19:42:54 dawes Exp $ */ /* * Author: Donna Converse, MIT X Consortium Index: xc/lib/Xmu/DisplayQue.c diff -u xc/lib/Xmu/DisplayQue.c:3.2 xc/lib/Xmu/DisplayQue.c:3.3 --- xc/lib/Xmu/DisplayQue.c:3.2 Sat Oct 3 05:06:25 1998 +++ xc/lib/Xmu/DisplayQue.c Wed Jan 17 14:42:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: DisplayQue.c /main/7 1998/02/06 15:42:40 kaleb $ */ +/* $Xorg: DisplayQue.c,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/DisplayQue.c,v 3.2 1998/10/03 09:06:25 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/DisplayQue.c,v 3.3 2001/01/17 19:42:54 dawes Exp $ */ /* * Author: Jim Fulton, MIT X Consortium Index: xc/lib/Xmu/DisplayQue.h diff -u xc/lib/Xmu/DisplayQue.h:1.4 xc/lib/Xmu/DisplayQue.h:1.5 --- xc/lib/Xmu/DisplayQue.h:1.4 Sat Oct 3 05:06:26 1998 +++ xc/lib/Xmu/DisplayQue.h Wed Jan 17 14:42:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: DisplayQue.h /main/8 1998/02/06 15:42:45 kaleb $ */ +/* $Xorg: DisplayQue.h,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/DisplayQue.h,v 1.4 1998/10/03 09:06:26 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/DisplayQue.h,v 1.5 2001/01/17 19:42:54 dawes Exp $ */ #ifndef _XMU_DISPLAYQUE_H_ #define _XMU_DISPLAYQUE_H_ Index: xc/lib/Xmu/Distinct.c diff -u xc/lib/Xmu/Distinct.c:3.3 xc/lib/Xmu/Distinct.c:3.4 --- xc/lib/Xmu/Distinct.c:3.3 Sat Oct 3 05:06:26 1998 +++ xc/lib/Xmu/Distinct.c Wed Jan 17 14:42:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: Distinct.c /main/6 1998/02/06 15:42:50 kaleb $ */ +/* $Xorg: Distinct.c,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Distinct.c,v 3.3 1998/10/03 09:06:26 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Distinct.c,v 3.4 2001/01/17 19:42:54 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/Xmu/DrRndRect.c diff -u xc/lib/Xmu/DrRndRect.c:1.5 xc/lib/Xmu/DrRndRect.c:1.6 --- xc/lib/Xmu/DrRndRect.c:1.5 Sat Oct 3 05:06:26 1998 +++ xc/lib/Xmu/DrRndRect.c Wed Jan 17 14:42:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: DrRndRect.c /main/5 1998/02/06 15:43:08 kaleb $ */ +/* $Xorg: DrRndRect.c,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/DrRndRect.c,v 1.5 1998/10/03 09:06:26 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/DrRndRect.c,v 1.6 2001/01/17 19:42:54 dawes Exp $ */ /* * XmuDrawRoundedRectangle, XmuFillRoundedRectangle Index: xc/lib/Xmu/DrawLogo.c diff -u xc/lib/Xmu/DrawLogo.c:1.6 xc/lib/Xmu/DrawLogo.c:1.7 --- xc/lib/Xmu/DrawLogo.c:1.6 Sat Oct 3 05:06:27 1998 +++ xc/lib/Xmu/DrawLogo.c Wed Jan 17 14:42:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: DrawLogo.c /main/6 1998/02/06 15:43:02 kaleb $ */ +/* $Xorg: DrawLogo.c,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/DrawLogo.c,v 1.6 1998/10/03 09:06:27 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/DrawLogo.c,v 1.7 2001/01/17 19:42:54 dawes Exp $ */ #include #include Index: xc/lib/Xmu/Drawing.h diff -u xc/lib/Xmu/Drawing.h:1.4 xc/lib/Xmu/Drawing.h:1.5 --- xc/lib/Xmu/Drawing.h:1.4 Sat Oct 3 05:06:27 1998 +++ xc/lib/Xmu/Drawing.h Wed Jan 17 14:42:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: Drawing.h /main/12 1998/02/06 15:42:56 kaleb $ */ +/* $Xorg: Drawing.h,v 1.4 2000/08/17 19:46:01 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Drawing.h,v 1.4 1998/10/03 09:06:27 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Drawing.h,v 1.5 2001/01/17 19:42:54 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities @@ -31,6 +31,7 @@ #ifndef _XMU_DRAWING_H_ #define _XMU_DRAWING_H_ +#include #include #if NeedFunctionPrototypes Index: xc/lib/Xmu/Editres.h diff -u xc/lib/Xmu/Editres.h:1.4 xc/lib/Xmu/Editres.h:1.5 --- xc/lib/Xmu/Editres.h:1.4 Sat Oct 3 05:06:27 1998 +++ xc/lib/Xmu/Editres.h Wed Jan 17 14:42:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: Editres.h /main/4 1998/02/06 15:43:27 kaleb $ */ +/* $Xorg: Editres.h,v 1.3 2000/08/17 19:46:01 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Editres.h,v 1.4 1998/10/03 09:06:27 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Editres.h,v 1.5 2001/01/17 19:42:55 dawes Exp $ */ #include Index: xc/lib/Xmu/EditresCom.c diff -u xc/lib/Xmu/EditresCom.c:1.14 xc/lib/Xmu/EditresCom.c:1.15 --- xc/lib/Xmu/EditresCom.c:1.14 Sun Oct 1 22:32:13 2000 +++ xc/lib/Xmu/EditresCom.c Wed Jan 17 14:42:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: EditresCom.c /main/37 1998/06/23 11:50:49 kaleb $ */ +/* $Xorg: EditresCom.c,v 1.3 2000/08/17 19:46:01 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/EditresCom.c,v 1.14 2000/10/02 02:32:13 tsi Exp $ */ +/* $XFree86: xc/lib/Xmu/EditresCom.c,v 1.15 2001/01/17 19:42:55 dawes Exp $ */ /* * Author: Chris D. Peterson, Dave Sternlicht, MIT X Consortium Index: xc/lib/Xmu/EditresP.h diff -u xc/lib/Xmu/EditresP.h:1.4 xc/lib/Xmu/EditresP.h:1.5 --- xc/lib/Xmu/EditresP.h:1.4 Sat Oct 3 05:06:28 1998 +++ xc/lib/Xmu/EditresP.h Wed Jan 17 14:42:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: EditresP.h /main/14 1998/02/06 15:43:22 kaleb $ */ +/* $Xorg: EditresP.h,v 1.3 2000/08/17 19:46:01 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/EditresP.h,v 1.4 1998/10/03 09:06:28 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/EditresP.h,v 1.5 2001/01/17 19:42:55 dawes Exp $ */ /* * Author: Chris D. Peterson, MIT X Consortium Index: xc/lib/Xmu/Error.h diff -u xc/lib/Xmu/Error.h:1.4 xc/lib/Xmu/Error.h:1.5 --- xc/lib/Xmu/Error.h:1.4 Sat Oct 3 05:06:28 1998 +++ xc/lib/Xmu/Error.h Wed Jan 17 14:42:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: Error.h /main/6 1998/02/06 15:43:33 kaleb $ */ +/* $Xorg: Error.h,v 1.4 2000/08/17 19:46:01 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Error.h,v 1.4 1998/10/03 09:06:28 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Error.h,v 1.5 2001/01/17 19:42:55 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities @@ -31,6 +31,8 @@ #ifndef _XMU_ERROR_H_ #define _XMU_ERROR_H_ +#include +#include #include _XFUNCPROTOBEGIN Index: xc/lib/Xmu/ExtAgent.c diff -u xc/lib/Xmu/ExtAgent.c:1.5 xc/lib/Xmu/ExtAgent.c:1.6 --- xc/lib/Xmu/ExtAgent.c:1.5 Sat Oct 3 05:06:29 1998 +++ xc/lib/Xmu/ExtAgent.c Wed Jan 17 14:42:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: ExtAgent.c /main/2 1998/02/06 15:43:39 kaleb $ */ +/* $Xorg: ExtAgent.c,v 1.3 2000/08/17 19:46:01 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/ExtAgent.c,v 1.5 1998/10/03 09:06:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/ExtAgent.c,v 1.6 2001/01/17 19:42:55 dawes Exp $ */ #include #include Index: xc/lib/Xmu/ExtAgent.h diff -u xc/lib/Xmu/ExtAgent.h:1.4 xc/lib/Xmu/ExtAgent.h:1.5 --- xc/lib/Xmu/ExtAgent.h:1.4 Sat Oct 3 05:06:29 1998 +++ xc/lib/Xmu/ExtAgent.h Wed Jan 17 14:42:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: ExtAgent.h /main/2 1998/02/06 15:43:44 kaleb $ */ +/* $Xorg: ExtAgent.h,v 1.4 2000/08/17 19:46:01 cpqbld Exp $ */ /* @@ -21,8 +21,9 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/ExtAgent.h,v 1.4 1998/10/03 09:06:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/ExtAgent.h,v 1.5 2001/01/17 19:42:55 dawes Exp $ */ +#include #include _XFUNCPROTOBEGIN Index: xc/lib/Xmu/FToCback.c diff -u xc/lib/Xmu/FToCback.c:1.5 xc/lib/Xmu/FToCback.c:1.6 --- xc/lib/Xmu/FToCback.c:1.5 Sat Oct 3 05:06:29 1998 +++ xc/lib/Xmu/FToCback.c Wed Jan 17 14:42:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: FToCback.c /main/6 1998/02/06 15:43:49 kaleb $ */ +/* $Xorg: FToCback.c,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/FToCback.c,v 1.5 1998/10/03 09:06:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/FToCback.c,v 1.6 2001/01/17 19:42:55 dawes Exp $ */ #include #include Index: xc/lib/Xmu/GetHost.c diff -u xc/lib/Xmu/GetHost.c:3.5 xc/lib/Xmu/GetHost.c:3.6 --- xc/lib/Xmu/GetHost.c:3.5 Sat Oct 3 05:06:29 1998 +++ xc/lib/Xmu/GetHost.c Wed Jan 17 14:42:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetHost.c /main/9 1998/02/06 15:43:54 kaleb $ */ +/* $Xorg: GetHost.c,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/GetHost.c,v 3.5 1998/10/03 09:06:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/GetHost.c,v 3.6 2001/01/17 19:42:55 dawes Exp $ */ /* * Author: Jim Fulton, MIT X Consortium Index: xc/lib/Xmu/GrayPixmap.c diff -u xc/lib/Xmu/GrayPixmap.c:1.4 xc/lib/Xmu/GrayPixmap.c:1.5 --- xc/lib/Xmu/GrayPixmap.c:1.4 Sat Oct 3 05:06:30 1998 +++ xc/lib/Xmu/GrayPixmap.c Wed Jan 17 14:42:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: GrayPixmap.c /main/9 1998/02/06 15:43:59 kaleb $ */ +/* $Xorg: GrayPixmap.c,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ /* @@ -45,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xmu/GrayPixmap.c,v 1.4 1998/10/03 09:06:30 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/GrayPixmap.c,v 1.5 2001/01/17 19:42:55 dawes Exp $ */ #include #include Index: xc/lib/Xmu/Imakefile diff -u xc/lib/Xmu/Imakefile:1.7 xc/lib/Xmu/Imakefile:1.8 --- xc/lib/Xmu/Imakefile:1.7 Wed Apr 28 11:04:50 1999 +++ xc/lib/Xmu/Imakefile Wed Jan 17 14:42:55 2001 @@ -1,5 +1,9 @@ -XCOMM $XConsortium: Imakefile /main/82 1996/09/28 16:43:59 rws $ -XCOMM $XFree86: xc/lib/Xmu/Imakefile,v 1.7 1999/04/28 15:04:50 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/Xmu/Imakefile,v 1.8 2001/01/17 19:42:55 dawes Exp $ #define DoNormalLib NormalLibXmu #define DoSharedLib SharedLibXmu Index: xc/lib/Xmu/Initer.c diff -u xc/lib/Xmu/Initer.c:1.5 xc/lib/Xmu/Initer.c:1.6 --- xc/lib/Xmu/Initer.c:1.5 Sun Mar 21 02:34:37 1999 +++ xc/lib/Xmu/Initer.c Wed Jan 17 14:42:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: Initer.c /main/10 1998/02/06 15:44:04 kaleb $ */ +/* $Xorg: Initer.c,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Initer.c,v 1.5 1999/03/21 07:34:37 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Initer.c,v 1.6 2001/01/17 19:42:56 dawes Exp $ */ /* Created By: Chris D. Peterson * MIT X Consortium Index: xc/lib/Xmu/Initer.h diff -u xc/lib/Xmu/Initer.h:1.4 xc/lib/Xmu/Initer.h:1.5 --- xc/lib/Xmu/Initer.h:1.4 Sat Oct 3 05:06:30 1998 +++ xc/lib/Xmu/Initer.h Wed Jan 17 14:42:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: Initer.h /main/7 1998/02/06 15:44:09 kaleb $ */ +/* $Xorg: Initer.h,v 1.4 2000/08/17 19:46:02 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Initer.h,v 1.4 1998/10/03 09:06:30 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Initer.h,v 1.5 2001/01/17 19:42:56 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities @@ -31,6 +31,7 @@ #ifndef _XMU_INITER_H_ #define _XMU_INITER_H_ +#include #include typedef void (*XmuInitializerProc)(XtAppContext app_context, XPointer data); Index: xc/lib/Xmu/LocBitmap.c diff -u xc/lib/Xmu/LocBitmap.c:3.5 xc/lib/Xmu/LocBitmap.c:3.6 --- xc/lib/Xmu/LocBitmap.c:3.5 Sat Oct 3 05:06:31 1998 +++ xc/lib/Xmu/LocBitmap.c Wed Jan 17 14:42:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: LocBitmap.c /main/22 1998/06/24 10:18:20 kaleb $ */ +/* $Xorg: LocBitmap.c,v 1.6 2000/08/17 19:46:02 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/LocBitmap.c,v 3.5 1998/10/03 09:06:31 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/LocBitmap.c,v 3.6 2001/01/17 19:42:56 dawes Exp $ */ /* * Author: Jim Fulton, MIT X Consortium Index: xc/lib/Xmu/Lookup.c diff -u xc/lib/Xmu/Lookup.c:3.6 xc/lib/Xmu/Lookup.c:3.7 --- xc/lib/Xmu/Lookup.c:3.6 Sun Mar 21 02:34:37 1999 +++ xc/lib/Xmu/Lookup.c Wed Jan 17 14:42:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: Lookup.c /main/17 1998/02/06 15:44:26 kaleb $ */ +/* $Xorg: Lookup.c,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Lookup.c,v 3.6 1999/03/21 07:34:37 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Lookup.c,v 3.7 2001/01/17 19:42:56 dawes Exp $ */ #include Index: xc/lib/Xmu/LookupCmap.c diff -u xc/lib/Xmu/LookupCmap.c:1.5 xc/lib/Xmu/LookupCmap.c:1.6 --- xc/lib/Xmu/LookupCmap.c:1.5 Sat Oct 3 05:06:31 1998 +++ xc/lib/Xmu/LookupCmap.c Wed Jan 17 14:42:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: LookupCmap.c /main/11 1998/02/06 15:44:20 kaleb $ */ +/* $Xorg: LookupCmap.c,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/LookupCmap.c,v 1.5 1998/10/03 09:06:31 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/LookupCmap.c,v 1.6 2001/01/17 19:42:56 dawes Exp $ */ /* * Author: Donna Converse, MIT X Consortium Index: xc/lib/Xmu/Lower.c diff -u xc/lib/Xmu/Lower.c:1.9 xc/lib/Xmu/Lower.c:1.10 --- xc/lib/Xmu/Lower.c:1.9 Sun Jul 11 04:49:17 1999 +++ xc/lib/Xmu/Lower.c Wed Jan 17 14:42:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: Lower.c /main/9 1998/02/06 15:44:31 kaleb $ */ +/* $Xorg: Lower.c,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ /* @@ -22,7 +22,7 @@ */ -/* $XFree86: xc/lib/Xmu/Lower.c,v 1.9 1999/07/11 08:49:17 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Lower.c,v 1.10 2001/01/17 19:42:56 dawes Exp $ */ #define XK_LATIN1 #include Index: xc/lib/Xmu/Misc.h diff -u xc/lib/Xmu/Misc.h:1.1.1.2 xc/lib/Xmu/Misc.h:1.1.1.3 --- xc/lib/Xmu/Misc.h:1.1.1.2 Sun Sep 27 03:52:39 1998 +++ xc/lib/Xmu/Misc.h Tue Jan 16 17:22:15 2001 @@ -1,4 +1,4 @@ -/* $TOG: Misc.h /main/3 1998/02/06 15:44:36 kaleb $ */ +/* $Xorg: Misc.h,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ /* Index: xc/lib/Xmu/RdBitF.c diff -u xc/lib/Xmu/RdBitF.c:3.10 xc/lib/Xmu/RdBitF.c:3.11 --- xc/lib/Xmu/RdBitF.c:3.10 Sun Jan 31 07:21:20 1999 +++ xc/lib/Xmu/RdBitF.c Wed Jan 17 14:42:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: RdBitF.c /main/13 1998/02/06 15:44:42 kaleb $ */ +/* $Xorg: RdBitF.c,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/RdBitF.c,v 3.10 1999/01/31 12:21:20 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/RdBitF.c,v 3.11 2001/01/17 19:42:56 dawes Exp $ */ /* * This file contains miscellaneous utility routines and is not part of the Index: xc/lib/Xmu/ScrOfWin.c diff -u xc/lib/Xmu/ScrOfWin.c:1.5 xc/lib/Xmu/ScrOfWin.c:1.6 --- xc/lib/Xmu/ScrOfWin.c:1.5 Sat Oct 3 05:06:32 1998 +++ xc/lib/Xmu/ScrOfWin.c Wed Jan 17 14:42:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: ScrOfWin.c /main/4 1998/02/06 15:44:48 kaleb $ */ +/* $Xorg: ScrOfWin.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/ScrOfWin.c,v 1.5 1998/10/03 09:06:32 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/ScrOfWin.c,v 1.6 2001/01/17 19:42:56 dawes Exp $ */ /* * Author: Jim Fulton, MIT X Consortium Index: xc/lib/Xmu/ShapeWidg.c diff -u xc/lib/Xmu/ShapeWidg.c:1.6 xc/lib/Xmu/ShapeWidg.c:1.7 --- xc/lib/Xmu/ShapeWidg.c:1.6 Sat Oct 3 05:06:32 1998 +++ xc/lib/Xmu/ShapeWidg.c Wed Jan 17 14:42:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: ShapeWidg.c /main/7 1998/02/06 15:44:53 kaleb $ */ +/* $Xorg: ShapeWidg.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/ShapeWidg.c,v 1.6 1998/10/03 09:06:32 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/ShapeWidg.c,v 1.7 2001/01/17 19:42:56 dawes Exp $ */ #include #include Index: xc/lib/Xmu/StdCmap.c diff -u xc/lib/Xmu/StdCmap.c:1.4 xc/lib/Xmu/StdCmap.c:1.5 --- xc/lib/Xmu/StdCmap.c:1.4 Sat Oct 3 05:06:33 1998 +++ xc/lib/Xmu/StdCmap.c Wed Jan 17 14:42:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: StdCmap.c /main/15 1998/02/06 15:45:04 kaleb $ */ +/* $Xorg: StdCmap.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/StdCmap.c,v 1.4 1998/10/03 09:06:33 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StdCmap.c,v 1.5 2001/01/17 19:42:56 dawes Exp $ */ /* * Author: Donna Converse, MIT X Consortium Index: xc/lib/Xmu/StdCmap.h diff -u xc/lib/Xmu/StdCmap.h:1.6 xc/lib/Xmu/StdCmap.h:1.8 --- xc/lib/Xmu/StdCmap.h:1.6 Sun Mar 21 02:34:38 1999 +++ xc/lib/Xmu/StdCmap.h Tue Jan 23 12:38:14 2001 @@ -1,4 +1,4 @@ -/* $TOG: StdCmap.h /main/5 1998/02/06 15:45:10 kaleb $ */ +/* $Xorg: StdCmap.h,v 1.4 2000/08/17 19:46:03 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/StdCmap.h,v 1.6 1999/03/21 07:34:38 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StdCmap.h,v 1.8 2001/01/23 17:38:14 keithp Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities Index: xc/lib/Xmu/StdSel.h diff -u xc/lib/Xmu/StdSel.h:1.6 xc/lib/Xmu/StdSel.h:1.7 --- xc/lib/Xmu/StdSel.h:1.6 Sun Jun 6 04:48:36 1999 +++ xc/lib/Xmu/StdSel.h Wed Jan 17 14:42:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: StdSel.h /main/6 1998/02/06 15:45:15 kaleb $ */ +/* $Xorg: StdSel.h,v 1.4 2000/08/17 19:46:03 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/StdSel.h,v 1.6 1999/06/06 08:48:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StdSel.h,v 1.7 2001/01/17 19:42:56 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities @@ -31,6 +31,7 @@ #ifndef _XMU_SELECTION_H_ #define _XMU_SELECTION_H_ +#include #include _XFUNCPROTOBEGIN Index: xc/lib/Xmu/StrToBS.c diff -u xc/lib/Xmu/StrToBS.c:1.5 xc/lib/Xmu/StrToBS.c:1.6 --- xc/lib/Xmu/StrToBS.c:1.5 Sat Oct 3 05:06:34 1998 +++ xc/lib/Xmu/StrToBS.c Wed Jan 17 14:42:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: StrToBS.c /main/7 1998/05/14 14:56:19 kaleb $ */ +/* $Xorg: StrToBS.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ /* @@ -22,7 +22,7 @@ */ -/* $XFree86: xc/lib/Xmu/StrToBS.c,v 1.5 1998/10/03 09:06:34 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToBS.c,v 1.6 2001/01/17 19:42:56 dawes Exp $ */ #include #include "Converters.h" Index: xc/lib/Xmu/StrToBmap.c diff -u xc/lib/Xmu/StrToBmap.c:1.4 xc/lib/Xmu/StrToBmap.c:1.5 --- xc/lib/Xmu/StrToBmap.c:1.4 Sat Oct 3 05:06:34 1998 +++ xc/lib/Xmu/StrToBmap.c Wed Jan 17 14:42:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: StrToBmap.c /main/14 1998/02/06 15:45:20 kaleb $ */ +/* $Xorg: StrToBmap.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ /* @@ -45,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xmu/StrToBmap.c,v 1.4 1998/10/03 09:06:34 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToBmap.c,v 1.5 2001/01/17 19:42:57 dawes Exp $ */ #include #include Index: xc/lib/Xmu/StrToCurs.c diff -u xc/lib/Xmu/StrToCurs.c:1.6 xc/lib/Xmu/StrToCurs.c:1.7 --- xc/lib/Xmu/StrToCurs.c:1.6 Sat Oct 3 05:06:34 1998 +++ xc/lib/Xmu/StrToCurs.c Wed Jan 17 14:42:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: StrToCurs.c /main/23 1998/06/24 15:07:36 kaleb $ */ +/* $Xorg: StrToCurs.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ /* @@ -46,7 +46,7 @@ ******************************************************************/ -/* $XFree86: xc/lib/Xmu/StrToCurs.c,v 1.6 1998/10/03 09:06:34 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToCurs.c,v 1.7 2001/01/17 19:42:57 dawes Exp $ */ #include #include Index: xc/lib/Xmu/StrToGrav.c diff -u xc/lib/Xmu/StrToGrav.c:1.5 xc/lib/Xmu/StrToGrav.c:1.6 --- xc/lib/Xmu/StrToGrav.c:1.5 Sat Oct 3 05:06:35 1998 +++ xc/lib/Xmu/StrToGrav.c Wed Jan 17 14:42:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: StrToGrav.c /main/7 1998/02/06 15:45:38 kaleb $ */ +/* $Xorg: StrToGrav.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/StrToGrav.c,v 1.5 1998/10/03 09:06:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToGrav.c,v 1.6 2001/01/17 19:42:57 dawes Exp $ */ #include #include Index: xc/lib/Xmu/StrToJust.c diff -u xc/lib/Xmu/StrToJust.c:1.5 xc/lib/Xmu/StrToJust.c:1.6 --- xc/lib/Xmu/StrToJust.c:1.5 Sat Oct 3 05:06:35 1998 +++ xc/lib/Xmu/StrToJust.c Wed Jan 17 14:42:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: StrToJust.c /main/11 1998/05/14 14:56:23 kaleb $ */ +/* $Xorg: StrToJust.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ /* @@ -22,7 +22,7 @@ */ -/* $XFree86: xc/lib/Xmu/StrToJust.c,v 1.5 1998/10/03 09:06:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToJust.c,v 1.6 2001/01/17 19:42:57 dawes Exp $ */ #include #include Index: xc/lib/Xmu/StrToLong.c diff -u xc/lib/Xmu/StrToLong.c:1.6 xc/lib/Xmu/StrToLong.c:1.7 --- xc/lib/Xmu/StrToLong.c:1.6 Sun Mar 21 02:34:38 1999 +++ xc/lib/Xmu/StrToLong.c Wed Jan 17 14:42:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: StrToLong.c /main/6 1998/02/06 15:45:51 kaleb $ */ +/* $Xorg: StrToLong.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/StrToLong.c,v 1.6 1999/03/21 07:34:38 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToLong.c,v 1.7 2001/01/17 19:42:57 dawes Exp $ */ #include #include Index: xc/lib/Xmu/StrToOrnt.c diff -u xc/lib/Xmu/StrToOrnt.c:1.5 xc/lib/Xmu/StrToOrnt.c:1.6 --- xc/lib/Xmu/StrToOrnt.c:1.5 Sat Oct 3 05:06:35 1998 +++ xc/lib/Xmu/StrToOrnt.c Wed Jan 17 14:42:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: StrToOrnt.c /main/11 1998/05/14 14:56:27 kaleb $ */ +/* $Xorg: StrToOrnt.c,v 1.3 2000/08/17 19:46:04 cpqbld Exp $ */ /* @@ -22,7 +22,7 @@ */ -/* $XFree86: xc/lib/Xmu/StrToOrnt.c,v 1.5 1998/10/03 09:06:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToOrnt.c,v 1.6 2001/01/17 19:42:57 dawes Exp $ */ #include #include Index: xc/lib/Xmu/StrToShap.c diff -u xc/lib/Xmu/StrToShap.c:1.5 xc/lib/Xmu/StrToShap.c:1.6 --- xc/lib/Xmu/StrToShap.c:1.5 Sat Oct 3 05:06:36 1998 +++ xc/lib/Xmu/StrToShap.c Wed Jan 17 14:42:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: StrToShap.c /main/6 1998/02/06 15:46:01 kaleb $ */ +/* $Xorg: StrToShap.c,v 1.4 2000/08/17 19:46:04 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/StrToShap.c,v 1.5 1998/10/03 09:06:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToShap.c,v 1.6 2001/01/17 19:42:57 dawes Exp $ */ #include #include Index: xc/lib/Xmu/StrToWidg.c diff -u xc/lib/Xmu/StrToWidg.c:1.5 xc/lib/Xmu/StrToWidg.c:1.6 --- xc/lib/Xmu/StrToWidg.c:1.5 Sat Oct 3 05:06:36 1998 +++ xc/lib/Xmu/StrToWidg.c Wed Jan 17 14:42:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: StrToWidg.c /main/11 1998/02/06 15:46:07 kaleb $ */ +/* $Xorg: StrToWidg.c,v 1.3 2000/08/17 19:46:04 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/StrToWidg.c,v 1.5 1998/10/03 09:06:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToWidg.c,v 1.6 2001/01/17 19:42:57 dawes Exp $ */ /* * XmuCvtStringToWidget Index: xc/lib/Xmu/SysUtil.h diff -u xc/lib/Xmu/SysUtil.h:1.6 xc/lib/Xmu/SysUtil.h:1.7 --- xc/lib/Xmu/SysUtil.h:1.6 Sat Oct 3 05:06:36 1998 +++ xc/lib/Xmu/SysUtil.h Wed Jan 17 14:42:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: SysUtil.h /main/5 1998/02/06 15:46:12 kaleb $ */ +/* $Xorg: SysUtil.h,v 1.3 2000/08/17 19:46:04 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/SysUtil.h,v 1.6 1998/10/03 09:06:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/SysUtil.h,v 1.7 2001/01/17 19:42:57 dawes Exp $ */ #ifndef _SYSUTIL_H_ #define _SYSUTIL_H_ Index: xc/lib/Xmu/UpdMapHint.c diff -u xc/lib/Xmu/UpdMapHint.c:1.5 xc/lib/Xmu/UpdMapHint.c:1.6 --- xc/lib/Xmu/UpdMapHint.c:1.5 Sat Oct 3 05:06:37 1998 +++ xc/lib/Xmu/UpdMapHint.c Wed Jan 17 14:42:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: UpdMapHint.c /main/3 1998/02/06 15:46:18 kaleb $ */ +/* $Xorg: UpdMapHint.c,v 1.3 2000/08/17 19:46:04 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/UpdMapHint.c,v 1.5 1998/10/03 09:06:37 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/UpdMapHint.c,v 1.6 2001/01/17 19:42:57 dawes Exp $ */ /* * Author: Jim Fulton, MIT X Consortium Index: xc/lib/Xmu/VisCmap.c diff -u xc/lib/Xmu/VisCmap.c:1.5 xc/lib/Xmu/VisCmap.c:1.6 --- xc/lib/Xmu/VisCmap.c:1.5 Sat Oct 3 05:06:37 1998 +++ xc/lib/Xmu/VisCmap.c Wed Jan 17 14:42:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: VisCmap.c /main/12 1998/02/06 15:46:23 kaleb $ */ +/* $Xorg: VisCmap.c,v 1.3 2000/08/17 19:46:04 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/VisCmap.c,v 1.5 1998/10/03 09:06:37 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/VisCmap.c,v 1.6 2001/01/17 19:42:57 dawes Exp $ */ /* * Author: Donna Converse, MIT X Consortium Index: xc/lib/Xmu/WhitePoint.h diff -u xc/lib/Xmu/WhitePoint.h:1.1.1.2 xc/lib/Xmu/WhitePoint.h:1.1.1.3 --- xc/lib/Xmu/WhitePoint.h:1.1.1.2 Sun Sep 27 03:52:50 1998 +++ xc/lib/Xmu/WhitePoint.h Tue Jan 16 17:22:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: WhitePoint.h /main/5 1998/02/06 15:46:29 kaleb $ */ +/* $Xorg: WhitePoint.h,v 1.3 2000/08/17 19:46:04 cpqbld Exp $ */ /* Index: xc/lib/Xmu/WidgetNode.c diff -u xc/lib/Xmu/WidgetNode.c:1.7 xc/lib/Xmu/WidgetNode.c:1.9 --- xc/lib/Xmu/WidgetNode.c:1.7 Sun Dec 26 19:39:24 1999 +++ xc/lib/Xmu/WidgetNode.c Sun Apr 1 10:00:01 2001 @@ -1,4 +1,4 @@ -/* $TOG: WidgetNode.c /main/7 1998/06/23 11:51:04 kaleb $ */ +/* $Xorg: WidgetNode.c,v 1.4 2000/08/17 19:46:04 cpqbld Exp $ */ /* @@ -22,7 +22,7 @@ */ -/* $XFree86: xc/lib/Xmu/WidgetNode.c,v 1.7 1999/12/27 00:39:24 robin Exp $ */ +/* $XFree86: xc/lib/Xmu/WidgetNode.c,v 1.9 2001/04/01 14:00:01 tsi Exp $ */ /* * Author: Jim Fulton, MIT X Consortium @@ -31,6 +31,7 @@ #include +#include #include #include #include Index: xc/lib/Xmu/WidgetNode.h diff -u xc/lib/Xmu/WidgetNode.h:1.4 xc/lib/Xmu/WidgetNode.h:1.5 --- xc/lib/Xmu/WidgetNode.h:1.4 Sat Oct 3 05:06:37 1998 +++ xc/lib/Xmu/WidgetNode.h Wed Jan 17 14:42:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: WidgetNode.h /main/9 1998/02/06 15:46:39 kaleb $ */ +/* $Xorg: WidgetNode.h,v 1.4 2000/08/17 19:46:04 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/WidgetNode.h,v 1.4 1998/10/03 09:06:37 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/WidgetNode.h,v 1.5 2001/01/17 19:42:57 dawes Exp $ */ /* * Author: Jim Fulton, MIT X Consortium @@ -30,6 +30,7 @@ #ifndef _XmuWidgetNode_h #define _XmuWidgetNode_h +#include #include /* Index: xc/lib/Xmu/WinUtil.h diff -u xc/lib/Xmu/WinUtil.h:1.5 xc/lib/Xmu/WinUtil.h:1.6 --- xc/lib/Xmu/WinUtil.h:1.5 Sat Oct 3 05:06:38 1998 +++ xc/lib/Xmu/WinUtil.h Wed Jan 17 14:42:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: WinUtil.h /main/8 1998/02/06 15:46:44 kaleb $ */ +/* $Xorg: WinUtil.h,v 1.3 2000/08/17 19:46:05 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/WinUtil.h,v 1.5 1998/10/03 09:06:38 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/WinUtil.h,v 1.6 2001/01/17 19:42:57 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities Index: xc/lib/Xmu/Xct.c diff -u xc/lib/Xmu/Xct.c:1.6 xc/lib/Xmu/Xct.c:1.7 --- xc/lib/Xmu/Xct.c:1.6 Sun Mar 21 02:34:39 1999 +++ xc/lib/Xmu/Xct.c Wed Jan 17 14:42:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xct.c /main/21 1998/02/06 15:46:50 kaleb $ */ +/* $Xorg: Xct.c,v 1.3 2000/08/17 19:46:05 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Xct.c,v 1.6 1999/03/21 07:34:39 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Xct.c,v 1.7 2001/01/17 19:42:58 dawes Exp $ */ #include #include "Xct.h" Index: xc/lib/Xmu/Xct.h diff -u xc/lib/Xmu/Xct.h:1.5 xc/lib/Xmu/Xct.h:1.6 --- xc/lib/Xmu/Xct.h:1.5 Sun Mar 21 02:34:39 1999 +++ xc/lib/Xmu/Xct.h Wed Jan 17 14:42:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xct.h /main/9 1998/02/06 15:46:55 kaleb $ */ +/* $Xorg: Xct.h,v 1.3 2000/08/17 19:46:05 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Xct.h,v 1.5 1999/03/21 07:34:39 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Xct.h,v 1.6 2001/01/17 19:42:58 dawes Exp $ */ #ifndef _Xct_h #define _Xct_h Index: xc/lib/Xmu/Xmu.h diff -u xc/lib/Xmu/Xmu.h:1.5 xc/lib/Xmu/Xmu.h:1.6 --- xc/lib/Xmu/Xmu.h:1.5 Sat Oct 3 05:06:39 1998 +++ xc/lib/Xmu/Xmu.h Wed Jan 17 14:42:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xmu.h /main/28 1998/02/06 15:47:00 kaleb $ */ +/* $Xorg: Xmu.h,v 1.3 2000/08/17 19:46:05 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Xmu.h,v 1.5 1998/10/03 09:06:39 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Xmu.h,v 1.6 2001/01/17 19:42:58 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities Index: xc/lib/Xmu/sharedlib.c diff -u xc/lib/Xmu/sharedlib.c:3.2 xc/lib/Xmu/sharedlib.c:3.3 --- xc/lib/Xmu/sharedlib.c:3.2 Tue Nov 28 13:50:10 2000 +++ xc/lib/Xmu/sharedlib.c Wed Jan 17 14:42:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: sharedlib.c /main/10 1998/02/06 15:44:59 kaleb $ */ +/* $Xorg: sharedlib.c,v 1.3 2000/08/17 19:46:05 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/sharedlib.c,v 3.2 2000/11/28 18:50:10 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/sharedlib.c,v 3.3 2001/01/17 19:42:58 dawes Exp $ */ #if defined(SUNSHLIB) && !defined(SHAREDCODE) Index: xc/lib/Xmuu/Imakefile diff -u /dev/null xc/lib/Xmuu/Imakefile:1.2 --- /dev/null Mon Jun 4 12:38:37 2001 +++ xc/lib/Xmuu/Imakefile Fri May 11 04:16:54 2001 @@ -0,0 +1,67 @@ +XCOMM $XFree86: xc/lib/Xmuu/Imakefile,v 1.2 2001/05/11 08:16:54 alanh Exp $ +XCOMM Mini Xmu library: pull out just those things that are used by apps +XCOMM that do not use Xt and Xaw in the core applications +XCOMM +XCOMM Feel free to include additional code into this library, please +XCOMM be careful not to use anything which requires libraries other +XCOMM other than Xlib and the system C library + +#define DoNormalLib NormalLibXmuu +#define DoSharedLib SharedLibXmuu +#define DoExtraLib SharedLibXmuuc +#define DoDebugLib DebugLibXmuu +#define DoProfileLib ProfileLibXmuu +#define LibName Xmuu +#define SoRev SOXMUUREV +#define LibHeaders NO + +#ifdef SharedXmuuReqs +REQUIREDLIBS = SharedXmuuReqs +#endif + LINTLIBS = $(LINTXLIB) + +#if HasSnprintf + MISC_DEFINES = -DHAS_SNPRINTF +#else + MISC_INCLUDES = -I$(LIBSRC)/misc +#endif + + DEFINES = $(MISC_DEFINES) + INCLUDES = $(MISC_INCLUDES) + +#ifdef OsNameDefines +OS_NAME_DEFINES = OsNameDefines +#endif + CSSDEFS = $(OS_NAME_DEFINES) $(CONNECTION_FLAGS) + + +SRCS = ClientWin.c\ + CursorName.c\ + DefErrMsg.c\ + GetHost.c\ + Lower.c + +OBJS = ClientWin.o\ + CursorName.o\ + DefErrMsg.o\ + GetHost.o\ + Lower.o + +### Commented out following line... +### INCLUDES = -I$(XMUSRC) +### ... it breaks Lower.c (which needs -I../../lib/misc to find snprintf.c) +### + +#include + +#if DoSharedLib +SpecialCObjectRule(sharedlib,NullParameter,$(SHLIBDEF)) +#endif + +LinkSourceFile(ClientWin.c,$(XMUSRC)) +LinkSourceFile(CursorName.c,$(XMUSRC)) +LinkSourceFile(DefErrMsg.c,$(XMUSRC)) +LinkSourceFile(GetHost.c,$(XMUSRC)) +LinkSourceFile(Lower.c,$(XMUSRC)) + +DependTarget() Index: xc/lib/Xmuu/Xmuu-def.cpp diff -u /dev/null xc/lib/Xmuu/Xmuu-def.cpp:1.1 --- /dev/null Mon Jun 4 12:38:37 2001 +++ xc/lib/Xmuu/Xmuu-def.cpp Wed Apr 18 13:14:00 2001 @@ -0,0 +1,20 @@ +LIBRARY libXmuu +VERSION LIBRARY_VERSION +EXPORTS + + XmuClientWindow + XmuCursorNameToIndex + XmuPrintDefaultErrorMessage + XmuSimpleErrorHandler + XmuGetHostname + XmuCompareISOLatin1 + XmuCopyISOLatin1Lowered + XmuCopyISOLatin1Uppered + XmuNCopyISOLatin1Lowered + XmuNCopyISOLatin1Uppered + XmuSnprintf + _cygwin_dll_entry@12 + _cygwin_noncygwin_dll_entry@12 + dll_main@12 + +/* $XFree86: xc/lib/Xmuu/Xmuu-def.cpp,v 1.1 2001/04/18 17:14:00 dawes Exp $ */ Index: xc/lib/Xp/Imakefile diff -u xc/lib/Xp/Imakefile:1.2 xc/lib/Xp/Imakefile:1.3 --- xc/lib/Xp/Imakefile:1.2 Sun Dec 20 06:57:06 1998 +++ xc/lib/Xp/Imakefile Wed Jan 17 14:43:01 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: Imakefile /main/2 1996/11/16 15:20:42 rws $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:05 cpqbld Exp $ /****************************************************************************** ****************************************************************************** ** @@ -36,7 +36,7 @@ ** ****************************************************************************** *****************************************************************************/ -XCOMM $XFree86: xc/lib/Xp/Imakefile,v 1.2 1998/12/20 11:57:06 dawes Exp $ +XCOMM $XFree86: xc/lib/Xp/Imakefile,v 1.3 2001/01/17 19:43:01 dawes Exp $ #define DoNormalLib NormalLibXp Index: xc/lib/Xp/Xp-def.cpp diff -u xc/lib/Xp/Xp-def.cpp:1.2 xc/lib/Xp/Xp-def.cpp:1.3 --- xc/lib/Xp/Xp-def.cpp:1.2 Wed Aug 9 19:40:13 2000 +++ xc/lib/Xp/Xp-def.cpp Wed Jan 17 14:43:01 2001 @@ -38,5 +38,5 @@ XpStartDoc XpStartJob XpStartPage -/* $XConsortium: Xp-def.cpp /main/1 1996/11/13 14:44:46 lehors $ */ -/* $XFree86: xc/lib/Xp/Xp-def.cpp,v 1.2 2000/08/09 23:40:13 dawes Exp $ */ +/* $Xorg: Xp-def.cpp,v 1.3 2000/08/17 19:46:05 cpqbld Exp $ */ +/* $XFree86: xc/lib/Xp/Xp-def.cpp,v 1.3 2001/01/17 19:43:01 dawes Exp $ */ Index: xc/lib/Xp/XpAttr.c diff -u xc/lib/Xp/XpAttr.c:1.5 xc/lib/Xp/XpAttr.c:1.6 --- xc/lib/Xp/XpAttr.c:1.5 Tue Sep 26 11:56:57 2000 +++ xc/lib/Xp/XpAttr.c Wed Jan 17 14:43:01 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XpAttr.c /main/3 1996/12/27 16:21:50 kaleb $ */ +/* $Xorg: XpAttr.c,v 1.4 2000/08/17 19:46:05 cpqbld Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpAttr.c,v 1.5 2000/09/26 15:56:57 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpAttr.c,v 1.6 2001/01/17 19:43:01 dawes Exp $ */ #define NEED_REPLIES @@ -109,7 +109,6 @@ char *attribute_name ) { - int buflen = 0; char *buf; xPrintGetOneAttributeReq *req; @@ -173,8 +172,6 @@ XPAttrReplacement replacement_rule ) { - int i; - xPrintSetAttributesReq *req; XExtDisplayInfo *info = (XExtDisplayInfo *) xp_find_display (dpy); Index: xc/lib/Xp/XpContext.c diff -u xc/lib/Xp/XpContext.c:1.4 xc/lib/Xp/XpContext.c:1.5 --- xc/lib/Xp/XpContext.c:1.4 Tue Sep 26 11:56:57 2000 +++ xc/lib/Xp/XpContext.c Wed Jan 17 14:43:01 2001 @@ -1,4 +1,4 @@ -/* $TOG: XpContext.c /main/3 1997/05/28 11:41:13 kaleb $ */ +/* $Xorg: XpContext.c,v 1.4 2000/08/17 19:46:05 cpqbld Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpContext.c,v 1.4 2000/09/26 15:56:57 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpContext.c,v 1.5 2001/01/17 19:43:01 dawes Exp $ */ #define NEED_REPLIES @@ -202,7 +202,6 @@ int i; Screen *checkScr; - Screen *screen; int ok; Index: xc/lib/Xp/XpDoc.c diff -u xc/lib/Xp/XpDoc.c:1.2 xc/lib/Xp/XpDoc.c:1.3 --- xc/lib/Xp/XpDoc.c:1.2 Tue Sep 26 11:56:57 2000 +++ xc/lib/Xp/XpDoc.c Wed Jan 17 14:43:01 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XpDoc.c /main/2 1996/11/16 15:20:59 rws $ */ +/* $Xorg: XpDoc.c,v 1.3 2000/08/17 19:46:06 cpqbld Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpDoc.c,v 1.2 2000/09/26 15:56:57 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpDoc.c,v 1.3 2001/01/17 19:43:01 dawes Exp $ */ #include "Printstr.h" #include "Xlibint.h" Index: xc/lib/Xp/XpExtUtil.c diff -u xc/lib/Xp/XpExtUtil.c:1.3 xc/lib/Xp/XpExtUtil.c:1.4 --- xc/lib/Xp/XpExtUtil.c:1.3 Tue Sep 26 11:56:57 2000 +++ xc/lib/Xp/XpExtUtil.c Wed Jan 17 14:43:01 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XpExtUtil.c /main/3 1996/11/16 15:21:05 rws $ */ +/* $Xorg: XpExtUtil.c,v 1.3 2000/08/17 19:46:06 cpqbld Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpExtUtil.c,v 1.3 2000/09/26 15:56:57 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpExtUtil.c,v 1.4 2001/01/17 19:43:01 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES Index: xc/lib/Xp/XpExtVer.c diff -u xc/lib/Xp/XpExtVer.c:1.3 xc/lib/Xp/XpExtVer.c:1.4 --- xc/lib/Xp/XpExtVer.c:1.3 Tue Sep 26 11:56:57 2000 +++ xc/lib/Xp/XpExtVer.c Wed Jan 17 14:43:01 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XpExtVer.c /main/2 1996/11/16 15:21:11 rws $ */ +/* $Xorg: XpExtVer.c,v 1.4 2000/08/17 19:46:07 cpqbld Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpExtVer.c,v 1.3 2000/09/26 15:56:57 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpExtVer.c,v 1.4 2001/01/17 19:43:01 dawes Exp $ */ #define NEED_REPLIES Index: xc/lib/Xp/XpGetData.c diff -u xc/lib/Xp/XpGetData.c:1.3 xc/lib/Xp/XpGetData.c:1.4 --- xc/lib/Xp/XpGetData.c:1.3 Tue Sep 26 11:56:57 2000 +++ xc/lib/Xp/XpGetData.c Wed Jan 17 14:43:02 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XpGetData.c /main/2 1996/11/16 15:21:15 rws $ */ +/* $Xorg: XpGetData.c,v 1.4 2000/08/17 19:46:07 cpqbld Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpGetData.c,v 1.3 2000/09/26 15:56:57 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpGetData.c,v 1.4 2001/01/17 19:43:02 dawes Exp $ */ #define NEED_REPLIES Index: xc/lib/Xp/XpImageRes.c diff -u xc/lib/Xp/XpImageRes.c:1.3 xc/lib/Xp/XpImageRes.c:1.4 --- xc/lib/Xp/XpImageRes.c:1.3 Tue Sep 26 11:56:57 2000 +++ xc/lib/Xp/XpImageRes.c Wed Jan 17 14:43:02 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XpImageRes.c /main/1 1996/11/16 15:21:21 rws $ */ +/* $Xorg: XpImageRes.c,v 1.4 2000/08/17 19:46:07 cpqbld Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpImageRes.c,v 1.3 2000/09/26 15:56:57 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpImageRes.c,v 1.4 2001/01/17 19:43:02 dawes Exp $ */ #define NEED_REPLIES Index: xc/lib/Xp/XpInput.c diff -u xc/lib/Xp/XpInput.c:1.3 xc/lib/Xp/XpInput.c:1.4 --- xc/lib/Xp/XpInput.c:1.3 Tue Sep 26 11:56:57 2000 +++ xc/lib/Xp/XpInput.c Wed Jan 17 14:43:02 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XpInput.c /main/2 1996/11/16 15:21:25 rws $ */ +/* $Xorg: XpInput.c,v 1.4 2000/08/17 19:46:07 cpqbld Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpInput.c,v 1.3 2000/09/26 15:56:57 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpInput.c,v 1.4 2001/01/17 19:43:02 dawes Exp $ */ #define NEED_REPLIES Index: xc/lib/Xp/XpJob.c diff -u xc/lib/Xp/XpJob.c:1.3 xc/lib/Xp/XpJob.c:1.4 --- xc/lib/Xp/XpJob.c:1.3 Tue Sep 26 11:56:57 2000 +++ xc/lib/Xp/XpJob.c Wed Jan 17 14:43:02 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XpJob.c /main/4 1996/12/04 10:24:31 lehors $ */ +/* $Xorg: XpJob.c,v 1.4 2000/08/17 19:46:07 cpqbld Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpJob.c,v 1.3 2000/09/26 15:56:57 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpJob.c,v 1.4 2001/01/17 19:43:02 dawes Exp $ */ #if defined(sun) && defined(i386) && defined(SVR4) #define __EXTENSIONS__ @@ -110,7 +110,7 @@ if ((PwName = getenv("USERNAME"))) { #endif joa = (char *) Xmalloc( strlen( PwName ) + 20 ); - sprintf( joa, "job-owner: %s", PwName ); + sprintf( joa, "*job-owner: %s", PwName ); context = XpGetContext( dpy ); XpSetAttributes( dpy, context, XPJobAttr, joa, XPAttrMerge ); Index: xc/lib/Xp/XpLocale.c diff -u xc/lib/Xp/XpLocale.c:1.3 xc/lib/Xp/XpLocale.c:1.4 --- xc/lib/Xp/XpLocale.c:1.3 Tue Sep 26 11:56:58 2000 +++ xc/lib/Xp/XpLocale.c Wed Jan 17 14:43:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: XpLocale.c /main/3 1997/05/28 11:41:34 kaleb $ */ +/* $Xorg: XpLocale.c,v 1.3 2000/08/17 19:46:07 cpqbld Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpLocale.c,v 1.3 2000/09/26 15:56:58 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpLocale.c,v 1.4 2001/01/17 19:43:02 dawes Exp $ */ #include "Printstr.h" #include "Xlibint.h" Index: xc/lib/Xp/XpNotifyPdm.c diff -u xc/lib/Xp/XpNotifyPdm.c:1.3 xc/lib/Xp/XpNotifyPdm.c:1.4 --- xc/lib/Xp/XpNotifyPdm.c:1.3 Sat Oct 3 05:06:48 1998 +++ xc/lib/Xp/XpNotifyPdm.c Wed Jan 17 14:43:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: XpNotifyPdm.c /main/5 1997/07/24 15:47:13 kaleb $ */ +/* $Xorg: XpNotifyPdm.c,v 1.4 2000/08/17 19:46:07 cpqbld Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -131,16 +131,16 @@ /* * remove ".scr" portion from "host:disp.scr" strings. */ - if ( tstrptr = strchr( tstr1, ':' ) ) - if ( tstrptr = strchr( tstrptr, '.' ) ) + if (( tstrptr = strchr( tstr1, ':' ) )) + if (( tstrptr = strchr( tstrptr, '.' ) )) *tstrptr = '\0'; - if ( tstrptr = strchr( tstr2, ':' ) ) - if ( tstrptr = strchr( tstrptr, '.' ) ) + if (( tstrptr = strchr( tstr2, ':' ) )) + if (( tstrptr = strchr( tstrptr, '.' ) )) *tstrptr = '\0'; - if ( tstrptr = strchr( tstr3, ':' ) ) - if ( tstrptr = strchr( tstrptr, '.' ) ) + if (( tstrptr = strchr( tstr3, ':' ) )) + if (( tstrptr = strchr( tstrptr, '.' ) )) *tstrptr = '\0'; if ( !strcmp( tstr1, tstr2 ) ) { Index: xc/lib/Xp/XpPage.c diff -u xc/lib/Xp/XpPage.c:1.2 xc/lib/Xp/XpPage.c:1.3 --- xc/lib/Xp/XpPage.c:1.2 Tue Sep 26 11:56:58 2000 +++ xc/lib/Xp/XpPage.c Wed Jan 17 14:43:02 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XpPage.c /main/2 1996/11/16 15:21:49 rws $ */ +/* $Xorg: XpPage.c,v 1.3 2000/08/17 19:46:07 cpqbld Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpPage.c,v 1.2 2000/09/26 15:56:58 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpPage.c,v 1.3 2001/01/17 19:43:02 dawes Exp $ */ #include "Printstr.h" #include "Xlibint.h" Index: xc/lib/Xp/XpPageDim.c diff -u xc/lib/Xp/XpPageDim.c:1.3 xc/lib/Xp/XpPageDim.c:1.4 --- xc/lib/Xp/XpPageDim.c:1.3 Tue Sep 26 11:56:58 2000 +++ xc/lib/Xp/XpPageDim.c Wed Jan 17 14:43:02 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XpPageDim.c /main/2 1996/11/16 15:21:53 rws $ */ +/* $Xorg: XpPageDim.c,v 1.4 2000/08/17 19:46:07 cpqbld Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpPageDim.c,v 1.3 2000/09/26 15:56:58 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpPageDim.c,v 1.4 2001/01/17 19:43:02 dawes Exp $ */ #define NEED_REPLIES Index: xc/lib/Xp/XpPrinter.c diff -u xc/lib/Xp/XpPrinter.c:1.6 xc/lib/Xp/XpPrinter.c:1.8 --- xc/lib/Xp/XpPrinter.c:1.6 Tue Sep 26 11:56:58 2000 +++ xc/lib/Xp/XpPrinter.c Sun Apr 1 10:00:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: XpPrinter.c /main/4 1997/05/28 11:41:47 kaleb $ */ +/* $Xorg: XpPrinter.c,v 1.4 2000/08/17 19:46:07 cpqbld Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpPrinter.c,v 1.6 2000/09/26 15:56:58 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpPrinter.c,v 1.8 2001/04/01 14:00:02 tsi Exp $ */ #define NEED_REPLIES @@ -58,7 +58,7 @@ char *locale; /* For decoding the variable portion of Reply */ - CARD32 dataLenVR; + long dataLenVR; CARD8 *dataVR; /* aka STRING8 */ XPPrinterList ptr_list; @@ -66,8 +66,7 @@ XExtDisplayInfo *info = (XExtDisplayInfo *) xp_find_display (dpy); /* For converting root winID to corresponding ScreenPtr */ - Screen *checkScr; - int i,j; + int i; if (XpCheckExtInit(dpy, XP_DONT_CHECK) == -1) @@ -147,7 +146,7 @@ /* * Pull printer length and then name. */ - _XRead32 (dpy, (long *) &dataLenVR, (long) sizeof(dataLenVR) ); + _XRead32 (dpy, &dataLenVR, (long) sizeof(CARD32) ); if (dataLenVR) { dataVR = (CARD8 *) Xmalloc( (unsigned) dataLenVR + 1 ); @@ -169,7 +168,7 @@ /* * Pull localized description length and then description. */ - _XRead32 (dpy, (long *) &dataLenVR, (long) sizeof(dataLenVR) ); + _XRead32 (dpy, &dataLenVR, (long) sizeof(CARD32) ); if (dataLenVR) { dataVR = (CARD8 *) Xmalloc( (unsigned) dataLenVR + 1 ); Index: xc/lib/Xp/XpPutData.c diff -u xc/lib/Xp/XpPutData.c:1.2 xc/lib/Xp/XpPutData.c:1.3 --- xc/lib/Xp/XpPutData.c:1.2 Tue Sep 26 11:56:58 2000 +++ xc/lib/Xp/XpPutData.c Wed Jan 17 14:43:02 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XpPutData.c /main/2 1996/11/16 15:22:03 rws $ */ +/* $Xorg: XpPutData.c,v 1.3 2000/08/17 19:46:07 cpqbld Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpPutData.c,v 1.2 2000/09/26 15:56:58 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpPutData.c,v 1.3 2001/01/17 19:43:02 dawes Exp $ */ #include "Printstr.h" #include "Xlibint.h" Index: xc/lib/Xp/XpScreens.c diff -u xc/lib/Xp/XpScreens.c:1.3 xc/lib/Xp/XpScreens.c:1.5 --- xc/lib/Xp/XpScreens.c:1.3 Tue Sep 26 11:56:58 2000 +++ xc/lib/Xp/XpScreens.c Sun Apr 1 10:00:02 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XpScreens.c /main/2 1996/11/16 15:22:09 rws $ */ +/* $Xorg: XpScreens.c,v 1.5 2000/08/17 19:46:08 cpqbld Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpScreens.c,v 1.3 2000/09/26 15:56:58 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpScreens.c,v 1.5 2001/04/01 14:00:02 tsi Exp $ */ #define NEED_REPLIES @@ -53,7 +53,7 @@ xPrintQueryScreensReply rep; /* For decoding the variable portion of Reply */ - CARD32 rootWindow; + long rootWindow; /* For converting root winID to corresponding ScreenPtr */ Screen **scr_list; @@ -89,13 +89,13 @@ SyncHandle(); return ( (Screen **) NULL ); /* malloc error */ } - - for ( i = 0; i < *list_count; i++ ) { + i = 0; + while(i < *list_count){ /* * Pull printer length and then name. */ - _XRead32 (dpy, (long *) &rootWindow, (long) sizeof(rootWindow) ); - + _XRead32 (dpy, &rootWindow, (long) sizeof(CARD32) ); + scr_list[i] = NULL; for ( j = 0; j < XScreenCount(dpy); j++ ) { checkScr = XScreenOfDisplay(dpy, j); if ( XRootWindowOfScreen(checkScr) == (Window) rootWindow ) { @@ -103,6 +103,14 @@ break; } } + if(scr_list[i] == NULL) + (*list_count)--; + else + i++; + } + if(!(*list_count)) { + Xfree(scr_list); + scr_list = (Screen **) NULL; } } else { Index: xc/lib/Xrender/Xrender-def.cpp diff -u xc/lib/Xrender/Xrender-def.cpp:1.2 xc/lib/Xrender/Xrender-def.cpp:1.3 --- xc/lib/Xrender/Xrender-def.cpp:1.2 Mon Dec 4 16:01:00 2000 +++ xc/lib/Xrender/Xrender-def.cpp Tue Feb 13 14:19:12 2001 @@ -15,14 +15,15 @@ XRenderChangePicture XRenderCreatePicture XRenderFreePicture - _XRenderProcessPictureAttributes +; _XRenderProcessPictureAttributes XRenderFindDisplay XRenderFindFormat XRenderFindVisualFormat XRenderQueryExtension XRenderQueryFormats XRenderQueryVersion - _XRenderFindFormat - _XRenderFindVisual +; _XRenderFindFormat +; _XRenderFindVisual + XRenderSetPictureClipRegion -/* $XFree86: xc/lib/Xrender/Xrender-def.cpp,v 1.2 2000/12/04 21:01:00 dawes Exp $ */ +/* $XFree86: xc/lib/Xrender/Xrender-def.cpp,v 1.3 2001/02/13 19:19:12 dawes Exp $ */ Index: xc/lib/Xrender/Xrender.c diff -u xc/lib/Xrender/Xrender.c:1.3 xc/lib/Xrender/Xrender.c:1.4 --- xc/lib/Xrender/Xrender.c:1.3 Fri Dec 1 16:32:00 2000 +++ xc/lib/Xrender/Xrender.c Wed May 16 06:33:16 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xrender/Xrender.c,v 1.3 2000/12/01 21:32:00 keithp Exp $ + * $XFree86: xc/lib/Xrender/Xrender.c,v 1.4 2001/05/16 10:33:16 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -160,6 +160,7 @@ xPictScreen *xScreen; xPictDepth *xDepth; xPictVisual *xVisual; + void *xData; int nf, ns, nd, nv; int rlength; @@ -190,19 +191,20 @@ rep.numScreens * sizeof (xPictScreen) + rep.numDepths * sizeof (xPictDepth) + rep.numVisuals * sizeof (xPictVisual)); - xFormat = (xPictFormInfo *) Xmalloc (rlength); + xData = (void *) Xmalloc (rlength); if (!xri || !xFormat) { if (xri) Xfree (xri); - if (xFormat) Xfree (xFormat); + if (xData) Xfree (xData); _XEatData (dpy, rlength); UnlockDisplay (dpy); SyncHandle (); return 0; } - _XRead (dpy, (char *) xFormat, rlength); + _XRead (dpy, (char *) xData, rlength); format = xri->format; + xFormat = (xPictFormInfo *) xData; for (nf = 0; nf < rep.numFormats; nf++) { format->id = xFormat->id; @@ -248,6 +250,7 @@ } xScreen = (xPictScreen *) xDepth; } + Xfree (xData); info->data = (XPointer) xri; return 1; } Index: xc/lib/Xt/ActionHook.c diff -u xc/lib/Xt/ActionHook.c:1.1.1.3 xc/lib/Xt/ActionHook.c:1.1.1.4 --- xc/lib/Xt/ActionHook.c:1.1.1.3 Sun Sep 27 03:50:42 1998 +++ xc/lib/Xt/ActionHook.c Tue Jan 16 17:23:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: ActionHook.c /main/10 1998/02/06 13:19:33 kaleb $ */ +/* $Xorg: ActionHook.c,v 1.3 2000/08/17 19:46:08 cpqbld Exp $ */ /*LINTLIBRARY*/ Index: xc/lib/Xt/Alloc.c diff -u xc/lib/Xt/Alloc.c:1.4 xc/lib/Xt/Alloc.c:1.5 --- xc/lib/Xt/Alloc.c:1.4 Sat Oct 3 05:06:49 1998 +++ xc/lib/Xt/Alloc.c Wed Jan 17 14:43:03 2001 @@ -1,4 +1,4 @@ -/* $TOG: Alloc.c /main/48 1998/02/06 13:19:39 kaleb $ */ +/* $Xorg: Alloc.c,v 1.3 2000/08/17 19:46:08 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, Index: xc/lib/Xt/ArgList.c diff -u xc/lib/Xt/ArgList.c:1.3 xc/lib/Xt/ArgList.c:1.4 --- xc/lib/Xt/ArgList.c:1.3 Sat Oct 3 05:06:49 1998 +++ xc/lib/Xt/ArgList.c Wed Jan 17 14:43:03 2001 @@ -1,4 +1,4 @@ -/* $TOG: ArgList.c /main/18 1998/02/06 13:19:45 kaleb $ */ +/* $Xorg: ArgList.c,v 1.3 2000/08/17 19:46:08 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/Xt/Callback.c diff -u xc/lib/Xt/Callback.c:1.5 xc/lib/Xt/Callback.c:1.6 --- xc/lib/Xt/Callback.c:1.5 Sun Dec 20 17:18:57 1998 +++ xc/lib/Xt/Callback.c Wed Jan 17 14:43:03 2001 @@ -1,4 +1,4 @@ -/* $TOG: Callback.c /main/47 1998/02/06 13:19:54 kaleb $ */ +/* $Xorg: Callback.c,v 1.3 2000/08/17 19:46:08 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -54,7 +54,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xt/Callback.c,v 1.5 1998/12/20 22:18:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Callback.c,v 1.6 2001/01/17 19:43:03 dawes Exp $ */ #include "IntrinsicI.h" Index: xc/lib/Xt/CallbackI.h diff -u xc/lib/Xt/CallbackI.h:1.1.1.2 xc/lib/Xt/CallbackI.h:1.1.1.3 --- xc/lib/Xt/CallbackI.h:1.1.1.2 Sun Sep 27 03:50:44 1998 +++ xc/lib/Xt/CallbackI.h Tue Jan 16 17:23:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: CallbackI.h /main/19 1998/02/06 13:19:49 kaleb $ */ +/* $Xorg: CallbackI.h,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group Index: xc/lib/Xt/ClickTime.c diff -u xc/lib/Xt/ClickTime.c:1.1.1.2 xc/lib/Xt/ClickTime.c:1.1.1.3 --- xc/lib/Xt/ClickTime.c:1.1.1.2 Sun Sep 27 03:50:44 1998 +++ xc/lib/Xt/ClickTime.c Tue Jan 16 17:23:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: ClickTime.c /main/6 1998/02/06 13:19:59 kaleb $ */ +/* $Xorg: ClickTime.c,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts Index: xc/lib/Xt/Composite.c diff -u xc/lib/Xt/Composite.c:1.3 xc/lib/Xt/Composite.c:1.4 --- xc/lib/Xt/Composite.c:1.3 Sat Oct 3 05:06:49 1998 +++ xc/lib/Xt/Composite.c Wed Jan 17 14:43:03 2001 @@ -1,4 +1,4 @@ -/* $TOG: Composite.c /main/25 1998/02/06 13:20:09 kaleb $ */ +/* $Xorg: Composite.c,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts Index: xc/lib/Xt/Composite.h diff -u xc/lib/Xt/Composite.h:1.1.1.2 xc/lib/Xt/Composite.h:1.1.1.3 --- xc/lib/Xt/Composite.h:1.1.1.2 Sun Sep 27 03:50:47 1998 +++ xc/lib/Xt/Composite.h Tue Jan 16 17:23:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: Composite.h /main/17 1998/02/06 13:20:14 kaleb $ */ +/* $Xorg: Composite.h,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/Xt/CompositeP.h diff -u xc/lib/Xt/CompositeP.h:1.1.1.2 xc/lib/Xt/CompositeP.h:1.1.1.3 --- xc/lib/Xt/CompositeP.h:1.1.1.2 Sun Sep 27 03:50:48 1998 +++ xc/lib/Xt/CompositeP.h Tue Jan 16 17:23:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: CompositeP.h /main/18 1998/02/06 13:20:04 kaleb $ */ +/* $Xorg: CompositeP.h,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/Xt/ConstrainP.h diff -u xc/lib/Xt/ConstrainP.h:1.1.1.2 xc/lib/Xt/ConstrainP.h:1.1.1.3 --- xc/lib/Xt/ConstrainP.h:1.1.1.2 Sun Sep 27 03:50:48 1998 +++ xc/lib/Xt/ConstrainP.h Tue Jan 16 17:23:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: ConstrainP.h /main/16 1998/02/06 13:20:19 kaleb $ */ +/* $Xorg: ConstrainP.h,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ /* $oHeader: ConstrainP.h,v 1.2 88/08/18 15:54:15 asente Exp $ */ /*********************************************************** Index: xc/lib/Xt/Constraint.c diff -u xc/lib/Xt/Constraint.c:1.1.1.2 xc/lib/Xt/Constraint.c:1.1.1.3 --- xc/lib/Xt/Constraint.c:1.1.1.2 Sun Sep 27 03:50:49 1998 +++ xc/lib/Xt/Constraint.c Tue Jan 16 17:23:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: Constraint.c /main/16 1998/02/06 13:20:24 kaleb $ */ +/* $Xorg: Constraint.c,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts Index: xc/lib/Xt/Constraint.h diff -u xc/lib/Xt/Constraint.h:1.1.1.2 xc/lib/Xt/Constraint.h:1.1.1.3 --- xc/lib/Xt/Constraint.h:1.1.1.2 Sun Sep 27 03:50:49 1998 +++ xc/lib/Xt/Constraint.h Tue Jan 16 17:23:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: Constraint.h /main/11 1998/02/06 13:20:29 kaleb $ */ +/* $Xorg: Constraint.h,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ /* $oHeader: Constraint.h,v 1.2 88/08/18 15:54:18 asente Exp $ */ /*********************************************************** Index: xc/lib/Xt/Convert.c diff -u xc/lib/Xt/Convert.c:3.4 xc/lib/Xt/Convert.c:3.5 --- xc/lib/Xt/Convert.c:3.4 Sun Dec 20 06:57:07 1998 +++ xc/lib/Xt/Convert.c Wed Jan 17 14:43:03 2001 @@ -1,4 +1,4 @@ -/* $TOG: Convert.c /main/77 1998/02/06 13:20:48 kaleb $ */ +/* $Xorg: Convert.c,v 1.4 2000/08/17 19:46:09 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Convert.c,v 3.4 1998/12/20 11:57:07 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Convert.c,v 3.5 2001/01/17 19:43:03 dawes Exp $ */ /* @@ -499,7 +499,7 @@ register int i; if (!p->from_is_value) XtFree(p->from.addr); - if (i = p->num_args) { + if ((i = p->num_args)) { XrmValue *pargs = CARGS(p); while (i--) XtFree(pargs[i].addr); @@ -524,7 +524,7 @@ LOCK_PROCESS; for (i = CACHEHASHSIZE; --i >= 0;) { prev = &cacheHashTable[i]; - while (rec = *prev) { + while ((rec = *prev)) { if (rec->tag == tag) FreeCacheRec(app, rec, prev); else @@ -703,7 +703,7 @@ XtMemcmp(&p->from.addr, from->addr, from->size) : memcmp((char *)p->from.addr, (char *)from->addr, from->size)) && (p->num_args == num_args)) { - if (i = num_args) { + if ((i = num_args)) { XrmValue *pargs = CARGS(p); /* Are all args the same data ? */ while (i) { @@ -802,7 +802,7 @@ XtMemcmp(&p->from.addr, from->addr, from->size) : memcmp((char *)p->from.addr, (char *)from->addr, from->size)) && (p->num_args == num_args)) { - if (i = num_args) { + if ((i = num_args)) { XrmValue *pargs = CARGS(p); /* Are all args the same data ? */ while (i) { @@ -1133,7 +1133,7 @@ LOCK_APP(app); LOCK_PROCESS; - for (r = (CachePtr*)refs; p = *r; r++) { + for (r = (CachePtr*)refs; (p = *r); r++) { if (p->is_refcounted && --(CEXT(p)->ref_count) == 0) { FreeCacheRec(app, p, NULL); } Index: xc/lib/Xt/ConvertI.h diff -u xc/lib/Xt/ConvertI.h:1.1.1.2 xc/lib/Xt/ConvertI.h:1.1.1.3 --- xc/lib/Xt/ConvertI.h:1.1.1.2 Sun Sep 27 03:50:50 1998 +++ xc/lib/Xt/ConvertI.h Tue Jan 16 17:23:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: ConvertI.h /main/18 1998/02/06 13:20:44 kaleb $ */ +/* $Xorg: ConvertI.h,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/Xt/Converters.c diff -u xc/lib/Xt/Converters.c:3.7 xc/lib/Xt/Converters.c:3.8 --- xc/lib/Xt/Converters.c:3.7 Sun Mar 28 10:31:34 1999 +++ xc/lib/Xt/Converters.c Wed Jan 17 14:43:04 2001 @@ -1,4 +1,4 @@ -/* $TOG: Converters.c /main/107 1998/02/06 13:20:35 kaleb $ */ +/* $Xorg: Converters.c,v 1.4 2000/08/17 19:46:09 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Converters.c,v 3.7 1999/03/28 15:31:34 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Converters.c,v 3.8 2001/01/17 19:43:04 dawes Exp $ */ /* @@ -281,7 +281,7 @@ #else while ((ch = *string) == ' ' || ch == '\t' || ch == '\r') string++; #endif - while (ch = *string++) { + while ((ch = *string++)) { if (ch >= '0' && ch <= '9') { val *= 10; val += ch - '0'; @@ -291,7 +291,7 @@ if (IsWhitespace(ch)) { if (!foundDigit) return False; /* make sure only trailing whitespace */ - while (ch = *string++) { + while ((ch = *string++)) { if (!IsWhitespace(ch)) return False; } @@ -1015,6 +1015,7 @@ if (XrmQGetResource(XtDatabase(display), xrm_name, xrm_class, &rep_type, &value)) { if (rep_type == _XtQString) { + f = XCreateFontSet(display, (char *)value.addr, &missing_charset_list, &missing_charset_count, &def_string); @@ -1042,6 +1043,7 @@ /* Should really do XListFonts, but most servers support this */ f = XCreateFontSet(display, "-*-*-*-R-*-*-*-120-*-*-*-*", &missing_charset_list, &missing_charset_count, &def_string); + /* Free any returned missing charset list */ if (missing_charset_count) { XtAppWarningMsg(XtDisplayToApplicationContext(dpy), Index: xc/lib/Xt/Core.c diff -u xc/lib/Xt/Core.c:1.1.1.2 xc/lib/Xt/Core.c:1.1.1.3 --- xc/lib/Xt/Core.c:1.1.1.2 Sun Sep 27 03:50:51 1998 +++ xc/lib/Xt/Core.c Tue Jan 16 17:24:01 2001 @@ -1,4 +1,4 @@ -/* $TOG: Core.c /main/63 1998/02/06 13:21:00 kaleb $ */ +/* $Xorg: Core.c,v 1.3 2000/08/17 19:46:10 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, Index: xc/lib/Xt/Core.h diff -u xc/lib/Xt/Core.h:1.1.1.2 xc/lib/Xt/Core.h:1.1.1.3 --- xc/lib/Xt/Core.h:1.1.1.2 Sun Sep 27 03:50:52 1998 +++ xc/lib/Xt/Core.h Tue Jan 16 17:24:03 2001 @@ -1,5 +1,5 @@ /* -* $TOG: Core.h /main/12 1998/02/06 13:21:07 kaleb $ +* $Xorg: Core.h,v 1.3 2000/08/17 19:46:10 cpqbld Exp $ * $oHeader: Core.h,v 1.2 88/08/18 15:54:32 asente Exp $ */ Index: xc/lib/Xt/CoreP.h diff -u xc/lib/Xt/CoreP.h:1.1.1.2 xc/lib/Xt/CoreP.h:1.1.1.3 --- xc/lib/Xt/CoreP.h:1.1.1.2 Sun Sep 27 03:50:52 1998 +++ xc/lib/Xt/CoreP.h Tue Jan 16 17:24:06 2001 @@ -1,5 +1,5 @@ /* -* $TOG: CoreP.h /main/18 1998/02/06 13:20:55 kaleb $ +* $Xorg: CoreP.h,v 1.3 2000/08/17 19:46:10 cpqbld Exp $ * $oHeader: CoreP.h,v 1.2 88/08/18 15:54:37 asente Exp $ */ Index: xc/lib/Xt/Create.c diff -u xc/lib/Xt/Create.c:3.6 xc/lib/Xt/Create.c:3.7 --- xc/lib/Xt/Create.c:3.6 Sun Dec 20 06:57:08 1998 +++ xc/lib/Xt/Create.c Wed Jan 17 14:43:04 2001 @@ -1,4 +1,4 @@ -/* $TOG: Create.c /main/83 1998/02/06 13:21:11 kaleb $ */ +/* $Xorg: Create.c,v 1.3 2000/08/17 19:46:10 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Create.c,v 3.6 1998/12/20 11:57:08 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Create.c,v 3.7 2001/01/17 19:43:04 dawes Exp $ */ /* Index: xc/lib/Xt/Destroy.c diff -u xc/lib/Xt/Destroy.c:1.1.1.3 xc/lib/Xt/Destroy.c:1.1.1.4 --- xc/lib/Xt/Destroy.c:1.1.1.3 Sun Sep 27 03:50:54 1998 +++ xc/lib/Xt/Destroy.c Tue Jan 16 17:24:09 2001 @@ -1,4 +1,4 @@ -/* $TOG: Destroy.c /main/49 1998/02/06 13:21:18 kaleb $ */ +/* $Xorg: Destroy.c,v 1.3 2000/08/17 19:46:10 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts Index: xc/lib/Xt/Display.c diff -u xc/lib/Xt/Display.c:3.9 xc/lib/Xt/Display.c:3.10 --- xc/lib/Xt/Display.c:3.9 Wed Nov 1 21:51:10 2000 +++ xc/lib/Xt/Display.c Wed Jan 17 14:43:04 2001 @@ -1,4 +1,4 @@ -/* $TOG: Display.c /main/116 1998/02/06 13:21:23 kaleb $ */ +/* $Xorg: Display.c,v 1.4 2000/08/17 19:46:10 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Display.c,v 3.9 2000/11/02 02:51:10 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Display.c,v 3.10 2001/01/17 19:43:04 dawes Exp $ */ /* @@ -694,7 +694,7 @@ XrmDestroyDatabase(db); } XtFree((char *)xtpd->per_screen_db); - if (db = XrmGetDatabase(dpy)) + if ((db = XrmGetDatabase(dpy))) XrmDestroyDatabase(db); if (xtpd->cmd_db) XrmDestroyDatabase(xtpd->cmd_db); Index: xc/lib/Xt/Error.c diff -u xc/lib/Xt/Error.c:3.9 xc/lib/Xt/Error.c:3.11 --- xc/lib/Xt/Error.c:3.9 Sat Oct 3 05:06:51 1998 +++ xc/lib/Xt/Error.c Sun Apr 1 10:00:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: Error.c /main/43 1998/02/06 13:21:30 kaleb $ */ +/* $Xorg: Error.c,v 1.4 2000/08/17 19:46:11 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Error.c,v 3.9 1998/10/03 09:06:51 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Error.c,v 3.11 2001/04/01 14:00:02 tsi Exp $ */ /* @@ -58,6 +58,7 @@ #include "IntrinsicI.h" #include +#include /* The error handlers in the application context aren't used since we can't come up with a uniform way of using them. If you can, define Index: xc/lib/Xt/Event.c diff -u xc/lib/Xt/Event.c:3.5 xc/lib/Xt/Event.c:3.6 --- xc/lib/Xt/Event.c:3.5 Sat Oct 3 05:06:52 1998 +++ xc/lib/Xt/Event.c Wed Jan 17 14:43:04 2001 @@ -1,4 +1,4 @@ -/* $TOG: Event.c /main/153 1998/02/06 13:21:46 kaleb $ */ +/* $Xorg: Event.c,v 1.4 2000/08/17 19:46:11 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -663,7 +663,7 @@ return; } idx = WWHASH(tab, window); - if (entry = tab->entries[idx]) { + if ((entry = tab->entries[idx])) { if (entry != widget) { rehash = WWREHASHVAL(tab, window); do { @@ -1435,7 +1435,7 @@ if ((grabList == NULL ||_XtOnGrabList(dspWidget, grabList)) && XtIsSensitive(dspWidget)) { - if (was_filtered = XFilterEvent(event, XtWindow(dspWidget))) { + if ((was_filtered = XFilterEvent(event, XtWindow(dspWidget)))) { /* If this event activated a device grab, release it. */ _XtUngrabBadGrabs(event, widget, mask, pdi); was_dispatched = True; Index: xc/lib/Xt/EventI.h diff -u xc/lib/Xt/EventI.h:1.1.1.2 xc/lib/Xt/EventI.h:1.1.1.3 --- xc/lib/Xt/EventI.h:1.1.1.2 Sun Sep 27 03:50:56 1998 +++ xc/lib/Xt/EventI.h Tue Jan 16 17:24:15 2001 @@ -1,4 +1,4 @@ -/* $TOG: EventI.h /main/23 1998/02/06 13:21:35 kaleb $ */ +/* $Xorg: EventI.h,v 1.3 2000/08/17 19:46:11 cpqbld Exp $ */ /* $oHeader: EventI.h,v 1.3 88/08/24 09:21:11 asente Exp $ */ /*********************************************************** Index: xc/lib/Xt/EventUtil.c diff -u xc/lib/Xt/EventUtil.c:1.3 xc/lib/Xt/EventUtil.c:1.4 --- xc/lib/Xt/EventUtil.c:1.3 Sat Oct 3 05:06:52 1998 +++ xc/lib/Xt/EventUtil.c Wed Jan 17 14:43:04 2001 @@ -1,4 +1,4 @@ -/* $TOG: EventUtil.c /main/14 1998/02/06 13:21:41 kaleb $ */ +/* $Xorg: EventUtil.c,v 1.3 2000/08/17 19:46:11 cpqbld Exp $ */ /******************************************************** Index: xc/lib/Xt/Functions.c diff -u xc/lib/Xt/Functions.c:1.3 xc/lib/Xt/Functions.c:1.4 --- xc/lib/Xt/Functions.c:1.3 Sat Oct 3 05:06:52 1998 +++ xc/lib/Xt/Functions.c Wed Jan 17 14:43:04 2001 @@ -1,4 +1,4 @@ -/* $TOG: Functions.c /main/14 1998/02/06 13:21:55 kaleb $ */ +/* $Xorg: Functions.c,v 1.3 2000/08/17 19:46:11 cpqbld Exp $ */ /* Index: xc/lib/Xt/GCManager.c diff -u xc/lib/Xt/GCManager.c:1.3 xc/lib/Xt/GCManager.c:1.4 --- xc/lib/Xt/GCManager.c:1.3 Sat Oct 3 05:06:52 1998 +++ xc/lib/Xt/GCManager.c Wed Jan 17 14:43:04 2001 @@ -1,4 +1,4 @@ -/* $TOG: GCManager.c /main/40 1998/02/06 13:22:01 kaleb $ */ +/* $Xorg: GCManager.c,v 1.4 2000/08/17 19:46:11 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988, 1990 by Digital Equipment Corporation, Maynard, Massachusetts @@ -201,7 +201,7 @@ readOnlyMask = ~(dynamicMask | unusedMask); /* Search for existing GC that matches exactly */ - for (prev = &pd->GClist; cur = *prev; prev = &cur->next) { + for (prev = &pd->GClist; (cur = *prev); prev = &cur->next) { if (cur->depth == depth && ScreenOfDisplay(dpy, cur->screen) == screen && Matches(dpy, cur, valueMask, values, readOnlyMask, dynamicMask)) { @@ -295,7 +295,7 @@ dpy = XtDisplayOfObject(widget); pd = _XtGetPerDisplay(dpy); - for (prev = &pd->GClist; cur = *prev; prev = &cur->next) { + for (prev = &pd->GClist; (cur = *prev); prev = &cur->next) { if (cur->gc == gc) { if (--(cur->ref_count) == 0) { *prev = cur->next; @@ -329,7 +329,7 @@ for (i = app->count; i ;) { Display *dpy = app->list[--i]; XtPerDisplay pd = _XtGetPerDisplay(dpy); - for (prev = &pd->GClist; cur = *prev; prev = &cur->next) { + for (prev = &pd->GClist; (cur = *prev); prev = &cur->next) { if (cur->gc == gc) { if (--(cur->ref_count) == 0) { *prev = cur->next; Index: xc/lib/Xt/Geometry.c diff -u xc/lib/Xt/Geometry.c:1.8 xc/lib/Xt/Geometry.c:1.9 --- xc/lib/Xt/Geometry.c:1.8 Fri Oct 20 23:16:16 2000 +++ xc/lib/Xt/Geometry.c Wed Jan 17 14:43:04 2001 @@ -1,4 +1,4 @@ -/* $TOG: Geometry.c /main/69 1998/02/06 13:22:07 kaleb $ CHECKEDOUT */ +/* $Xorg: Geometry.c,v 1.4 2000/08/17 19:46:11 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -54,7 +54,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xt/Geometry.c,v 1.8 2000/10/21 03:16:16 keithp Exp $ */ +/* $XFree86: xc/lib/Xt/Geometry.c,v 1.9 2001/01/17 19:43:04 dawes Exp $ */ #include "IntrinsicI.h" #include "ShellP.h" @@ -554,7 +554,6 @@ LOCK_APP(app); if (XtIsRealized(w)) { - XWindowChanges changes; req.changes.width = w->core.width; req.changes.height = w->core.height; req.changes.border_width = w->core.border_width; Index: xc/lib/Xt/GetActKey.c diff -u xc/lib/Xt/GetActKey.c:1.1.1.2 xc/lib/Xt/GetActKey.c:1.1.1.3 --- xc/lib/Xt/GetActKey.c:1.1.1.2 Sun Sep 27 03:50:59 1998 +++ xc/lib/Xt/GetActKey.c Tue Jan 16 17:24:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetActKey.c /main/8 1998/02/06 13:22:14 kaleb $ */ +/* $Xorg: GetActKey.c,v 1.3 2000/08/17 19:46:12 cpqbld Exp $ */ /*LINTLIBRARY*/ Index: xc/lib/Xt/GetResList.c diff -u xc/lib/Xt/GetResList.c:3.3 xc/lib/Xt/GetResList.c:3.4 --- xc/lib/Xt/GetResList.c:3.3 Sun Dec 20 06:57:08 1998 +++ xc/lib/Xt/GetResList.c Wed Jan 17 14:43:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetResList.c /main/9 1998/02/06 13:22:18 kaleb $ */ +/* $Xorg: GetResList.c,v 1.3 2000/08/17 19:46:12 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/GetResList.c,v 3.3 1998/12/20 11:57:08 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/GetResList.c,v 3.4 2001/01/17 19:43:05 dawes Exp $ */ /* Index: xc/lib/Xt/GetValues.c diff -u xc/lib/Xt/GetValues.c:1.1.1.3 xc/lib/Xt/GetValues.c:1.1.1.4 --- xc/lib/Xt/GetValues.c:1.1.1.3 Sun Sep 27 03:51:00 1998 +++ xc/lib/Xt/GetValues.c Tue Jan 16 17:24:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: GetValues.c /main/15 1998/02/06 13:22:23 kaleb $ */ +/* $Xorg: GetValues.c,v 1.3 2000/08/17 19:46:12 cpqbld Exp $ */ /*LINTLIBRARY*/ /*********************************************************** Index: xc/lib/Xt/HookObj.c diff -u xc/lib/Xt/HookObj.c:1.1.1.2 xc/lib/Xt/HookObj.c:1.1.1.3 --- xc/lib/Xt/HookObj.c:1.1.1.2 Sun Sep 27 03:51:00 1998 +++ xc/lib/Xt/HookObj.c Tue Jan 16 17:24:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: HookObj.c /main/4 1998/02/06 13:22:33 kaleb $ */ +/* $Xorg: HookObj.c,v 1.3 2000/08/17 19:46:12 cpqbld Exp $ */ /* Index: xc/lib/Xt/HookObjI.h diff -u xc/lib/Xt/HookObjI.h:1.1.1.2 xc/lib/Xt/HookObjI.h:1.1.1.3 --- xc/lib/Xt/HookObjI.h:1.1.1.2 Sun Sep 27 03:51:01 1998 +++ xc/lib/Xt/HookObjI.h Tue Jan 16 17:24:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: HookObjI.h /main/3 1998/02/06 13:22:28 kaleb $ */ +/* $Xorg: HookObjI.h,v 1.3 2000/08/17 19:46:12 cpqbld Exp $ */ /* Index: xc/lib/Xt/Hooks.c diff -u xc/lib/Xt/Hooks.c:1.1.1.2 xc/lib/Xt/Hooks.c:1.1.1.3 --- xc/lib/Xt/Hooks.c:1.1.1.2 Sun Sep 27 03:51:01 1998 +++ xc/lib/Xt/Hooks.c Tue Jan 16 17:24:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: Hooks.c /main/9 1998/02/06 13:22:38 kaleb $ */ +/* $Xorg: Hooks.c,v 1.3 2000/08/17 19:46:12 cpqbld Exp $ */ /* Index: xc/lib/Xt/Imakefile diff -u xc/lib/Xt/Imakefile:3.14 xc/lib/Xt/Imakefile:3.15 --- xc/lib/Xt/Imakefile:3.14 Wed Dec 29 22:56:17 1999 +++ xc/lib/Xt/Imakefile Wed Jan 17 14:43:05 2001 @@ -1,9 +1,10 @@ -XCOMM $TOG: Imakefile /main/121 1998/05/11 14:35:32 barstow $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:12 cpqbld Exp $ -XCOMM $XFree86: xc/lib/Xt/Imakefile,v 3.14 1999/12/30 03:56:17 robin Exp $ +XCOMM $XFree86: xc/lib/Xt/Imakefile,v 3.15 2001/01/17 19:43:05 dawes Exp $ + #define DoNormalLib NormalLibXt #define DoSharedLib SharedLibXt #define DoExtraLib SharedLibXt Index: xc/lib/Xt/InitialI.h diff -u xc/lib/Xt/InitialI.h:3.6 xc/lib/Xt/InitialI.h:3.7 --- xc/lib/Xt/InitialI.h:3.6 Sat Oct 3 05:06:54 1998 +++ xc/lib/Xt/InitialI.h Wed Jan 17 14:43:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: InitialI.h /main/87 1998/02/06 13:22:56 kaleb $ */ +/* $Xorg: InitialI.h,v 1.3 2000/08/17 19:46:12 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/Xt/Initialize.c diff -u xc/lib/Xt/Initialize.c:3.15 xc/lib/Xt/Initialize.c:3.16 --- xc/lib/Xt/Initialize.c:3.15 Sat Oct 3 05:06:54 1998 +++ xc/lib/Xt/Initialize.c Wed Jan 17 14:43:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: Initialize.c /main/214 1998/06/19 14:27:36 kaleb $ */ +/* $Xorg: Initialize.c,v 1.7 2000/08/17 19:46:12 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Initialize.c,v 3.15 1998/10/03 09:06:54 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Initialize.c,v 3.16 2001/01/17 19:43:05 dawes Exp $ */ /* @@ -204,6 +204,7 @@ void XtToolkitInitialize() { extern void _XtResourceListInitialize(); + extern Boolean XtAppPeekEvent_SkipTimer; static Boolean initialized = False; LOCK_PROCESS; @@ -221,6 +222,12 @@ _XtConvertInitialize(); _XtEventInitialize(); _XtTranslateInitialize(); + + /* Some apps rely on old (broken) XtAppPeekEvent behavior */ + if(getenv("XTAPPPEEKEVENT_SKIPTIMER")) + XtAppPeekEvent_SkipTimer = True; + else + XtAppPeekEvent_SkipTimer = False; } @@ -290,7 +297,7 @@ (void) strncpy (dest, ptr, len-1); dest[len-1] = '\0'; } else { - if (ptr = getenv("USER")) + if ((ptr = getenv("USER"))) pw = _XGetpwnam(ptr,pwparams); else pw = _XGetpwuid(getuid(),pwparams); @@ -476,7 +483,7 @@ doing_def = False; } pd = _XtGetPerDisplay(dpy); - if (db = pd->per_screen_db[scrno]) { + if ((db = pd->per_screen_db[scrno])) { UNLOCK_PROCESS; UNLOCK_APP(app); return (doing_def ? XrmGetDatabase(dpy) : db); @@ -529,8 +536,8 @@ { /* System app-defaults */ char *filename; - if (filename = XtResolvePathname(dpy, "app-defaults", - NULL, NULL, NULL, NULL, 0, NULL)) { + if ((filename = XtResolvePathname(dpy, "app-defaults", + NULL, NULL, NULL, NULL, 0, NULL))) { do_fallback = !XrmCombineFileDatabase(filename, &db, False); XtFree(filename); } Index: xc/lib/Xt/Intrinsic.c diff -u xc/lib/Xt/Intrinsic.c:3.16 xc/lib/Xt/Intrinsic.c:3.17 --- xc/lib/Xt/Intrinsic.c:3.16 Wed Sep 27 14:49:59 2000 +++ xc/lib/Xt/Intrinsic.c Wed Jan 17 14:43:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: Intrinsic.c /main/158 1998/06/17 13:26:39 kaleb $ */ +/* $Xorg: Intrinsic.c,v 1.3 2000/08/17 19:46:13 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Intrinsic.c,v 3.16 2000/09/27 18:49:59 keithp Exp $ */ +/* $XFree86: xc/lib/Xt/Intrinsic.c,v 3.17 2001/01/17 19:43:05 dawes Exp $ */ /* Index: xc/lib/Xt/Intrinsic.h diff -u xc/lib/Xt/Intrinsic.h:3.5 xc/lib/Xt/Intrinsic.h:3.6 --- xc/lib/Xt/Intrinsic.h:3.5 Fri Dec 15 17:48:39 2000 +++ xc/lib/Xt/Intrinsic.h Wed Jan 17 14:43:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: Intrinsic.h /main/178 1998/02/06 13:23:20 kaleb $ */ +/* $Xorg: Intrinsic.h,v 1.3 2000/08/17 19:46:13 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -44,7 +44,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xt/Intrinsic.h,v 3.5 2000/12/15 22:48:39 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Intrinsic.h,v 3.6 2001/01/17 19:43:05 dawes Exp $ */ #ifndef _XtIntrinsic_h #define _XtIntrinsic_h Index: xc/lib/Xt/IntrinsicI.h diff -u xc/lib/Xt/IntrinsicI.h:3.4 xc/lib/Xt/IntrinsicI.h:3.5 --- xc/lib/Xt/IntrinsicI.h:3.4 Sat Oct 3 05:06:55 1998 +++ xc/lib/Xt/IntrinsicI.h Wed Jan 17 14:43:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: IntrinsicI.h /main/48 1998/02/06 13:23:00 kaleb $ */ +/* $Xorg: IntrinsicI.h,v 1.3 2000/08/17 19:46:13 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/IntrinsicI.h,v 3.4 1998/10/03 09:06:55 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/IntrinsicI.h,v 3.5 2001/01/17 19:43:05 dawes Exp $ */ #ifndef _XtintrinsicI_h #define _XtintrinsicI_h Index: xc/lib/Xt/IntrinsicP.h diff -u xc/lib/Xt/IntrinsicP.h:1.1.1.2 xc/lib/Xt/IntrinsicP.h:1.1.1.3 --- xc/lib/Xt/IntrinsicP.h:1.1.1.2 Sun Sep 27 03:51:05 1998 +++ xc/lib/Xt/IntrinsicP.h Tue Jan 16 17:24:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: IntrinsicP.h /main/52 1998/02/06 13:23:06 kaleb $ */ +/* $Xorg: IntrinsicP.h,v 1.3 2000/08/17 19:46:13 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/Xt/Keyboard.c diff -u xc/lib/Xt/Keyboard.c:3.1 xc/lib/Xt/Keyboard.c:3.2 --- xc/lib/Xt/Keyboard.c:3.1 Sat Oct 3 05:06:55 1998 +++ xc/lib/Xt/Keyboard.c Wed Jan 17 14:43:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: Keyboard.c /main/37 1998/02/06 13:23:52 kaleb $ */ +/* $Xorg: Keyboard.c,v 1.4 2000/08/17 19:46:13 cpqbld Exp $ */ /******************************************************** @@ -92,7 +92,7 @@ for (i = traceDepth; i > 0; i--) { - if (grab = _XtCheckServerGrabsOnWidget(event, trace[i-1], KEYBOARD)) + if ((grab = _XtCheckServerGrabsOnWidget(event, trace[i-1], KEYBOARD))) return (grab); } return (XtServerGrabPtr)0; @@ -159,7 +159,7 @@ /* first check the trace list till done or we go to branch */ for (src = traceDepth-1, dst = widget; src > 0;) { - if (pwi = _XtGetPerWidgetInput(trace[src], FALSE)) + if ((pwi = _XtGetPerWidgetInput(trace[src], FALSE))) { if (pwi->focusKid) { @@ -352,9 +352,9 @@ /* ignore lca */ pseudoTraceDepth--; } - if (grab = CheckServerGrabs((XEvent*)event, + if ((grab = CheckServerGrabs((XEvent*)event, pseudoTrace, - pseudoTraceDepth)) + pseudoTraceDepth))) { XtDevice device = &pdi->keyboard; Index: xc/lib/Xt/Manage.c diff -u xc/lib/Xt/Manage.c:3.5 xc/lib/Xt/Manage.c:3.6 --- xc/lib/Xt/Manage.c:3.5 Sat Oct 3 05:06:56 1998 +++ xc/lib/Xt/Manage.c Wed Jan 17 14:43:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: Manage.c /main/37 1998/02/06 13:24:03 kaleb $ */ +/* $Xorg: Manage.c,v 1.3 2000/08/17 19:46:13 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Manage.c,v 3.5 1998/10/03 09:06:56 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Manage.c,v 3.6 2001/01/17 19:43:05 dawes Exp $ */ /* Index: xc/lib/Xt/NextEvent.c diff -u xc/lib/Xt/NextEvent.c:3.15 xc/lib/Xt/NextEvent.c:3.18 --- xc/lib/Xt/NextEvent.c:3.15 Sat Mar 13 22:21:15 1999 +++ xc/lib/Xt/NextEvent.c Sat Feb 10 23:41:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: NextEvent.c /main/138 1998/04/30 11:52:29 barstow $ */ +/* $Xorg: NextEvent.c,v 1.6 2000/08/17 19:46:14 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -54,7 +54,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xt/NextEvent.c,v 3.15 1999/03/14 03:21:15 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/NextEvent.c,v 3.18 2001/02/11 04:41:28 keithp Exp $ */ #include "IntrinsicI.h" #include @@ -479,8 +479,16 @@ if (condition) { for (ep = app->input_list[ii]; ep; ep = ep->ie_next) if (condition & ep->ie_condition) { - ep->ie_oq = app->outstandingQueue; - app->outstandingQueue = ep; + /* make sure this input isn't already marked outstanding */ + InputEvent *oq; + for (oq = app->outstandingQueue; oq; oq = oq->ie_oq) + if (oq == ep) + break; + if (!oq) + { + ep->ie_oq = app->outstandingQueue; + app->outstandingQueue = ep; + } } *found_input = True; } @@ -526,8 +534,16 @@ *found_input = True; for (ep = app->input_list[fdlp->fd]; ep; ep = ep->ie_next) if (condition & ep->ie_condition) { - ep->ie_oq = app->outstandingQueue; - app->outstandingQueue = ep; + InputEvent *oq; + /* make sure this input isn't already marked outstanding */ + for (oq = app->outstandingQueue; oq; oq = oq->ie_oq) + if (oq == ep) + break; + if (!oq) + { + ep->ie_oq = app->outstandingQueue; + app->outstandingQueue = ep; + } } } } @@ -1597,6 +1613,8 @@ return XtAppPeekEvent(_XtDefaultAppContext(), event); } +Boolean XtAppPeekEvent_SkipTimer; + Boolean XtAppPeekEvent(app, event) XtAppContext app; XEvent *event; @@ -1624,25 +1642,80 @@ UNLOCK_APP(app); return FALSE; } - - d = _XtWaitForSomething (app, - FALSE, FALSE, FALSE, FALSE, - TRUE, -#ifdef XTHREADS - TRUE, + + while (1) { + d = _XtWaitForSomething (app, + FALSE, FALSE, FALSE, FALSE, + TRUE, +#ifdef XTHREADS + TRUE, +#endif + (unsigned long *) NULL); + + if (d != -1) { /* event */ + GotEvent: + XPeekEvent(app->list[d], event); + app->last = (d == 0 ? app->count : d) - 1; + UNLOCK_APP(app); + return TRUE; + } + else { /* input or timer or signal */ + /* + * Check to see why a -1 was returned, if a timer expired, + * call it and block some more + */ + if ((app->timerQueue != NULL) && ! XtAppPeekEvent_SkipTimer) { /* timer */ + struct timeval cur_time; + Bool did_timer = False; + + X_GETTIMEOFDAY (&cur_time); + FIXUP_TIMEVAL(cur_time); + while (IS_AT_OR_AFTER(app->timerQueue->te_timer_value, cur_time)) { + TimerEventRec *te_ptr = app->timerQueue; + app->timerQueue = app->timerQueue->te_next; + te_ptr->te_next = NULL; + if (te_ptr->te_proc != NULL) + TeCallProc(te_ptr); + LOCK_PROCESS; + did_timer = True; + te_ptr->te_next = freeTimerRecs; + freeTimerRecs = te_ptr; + UNLOCK_PROCESS; + if (app->timerQueue == NULL) break; + } + if (did_timer) + { + for (d = 0; d < app->count; d++) + /* the timer's procedure may have caused an event */ + if (XEventsQueued(app->list[d], QueuedAfterFlush)) { + goto GotEvent; + } + continue; /* keep blocking */ + } + } + /* + * spec is vague here; we'll assume signals also return FALSE, + * of course to determine whether a signal is pending requires + * walking the signalQueue looking for se_notice flags which + * this code doesn't do. + */ +#if 0 + if (app->signalQueue != NULL) { /* signal */ + event->xany.type = 0; + event->xany.display = NULL; + event->xany.window = 0; + UNLOCK_APP(app); + return FALSE; + } + else #endif - (unsigned long *) NULL); - - if (d != -1) { - GotEvent: - XPeekEvent(app->list[d], event); - app->last = (d == 0 ? app->count : d) - 1; - UNLOCK_APP(app); - return TRUE; - } - event->xany.type = 0; /* Something else must be ready */ - event->xany.display = NULL; - event->xany.window = 0; - UNLOCK_APP(app); - return FALSE; + { /* input */ + event->xany.type = 0; + event->xany.display = NULL; + event->xany.window = 0; + UNLOCK_APP(app); + return FALSE; + } + } + } /* end while */ } Index: xc/lib/Xt/Object.c diff -u xc/lib/Xt/Object.c:1.4 xc/lib/Xt/Object.c:1.5 --- xc/lib/Xt/Object.c:1.4 Sun Dec 20 06:57:09 1998 +++ xc/lib/Xt/Object.c Wed Jan 17 14:43:06 2001 @@ -1,4 +1,4 @@ -/* $TOG: Object.c /main/27 1998/02/06 13:24:22 kaleb $ */ +/* $Xorg: Object.c,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -54,7 +54,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xt/Object.c,v 1.4 1998/12/20 11:57:09 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Object.c,v 1.5 2001/01/17 19:43:06 dawes Exp $ */ #define OBJECT #include "IntrinsicI.h" Index: xc/lib/Xt/Object.h diff -u xc/lib/Xt/Object.h:1.1.1.2 xc/lib/Xt/Object.h:1.1.1.3 --- xc/lib/Xt/Object.h:1.1.1.2 Sun Sep 27 03:51:08 1998 +++ xc/lib/Xt/Object.h Tue Jan 16 17:24:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: Object.h /main/10 1998/02/06 13:24:28 kaleb $ */ +/* $Xorg: Object.h,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ /* $oHeader: Object.h,v 1.2 88/08/18 15:55:32 asente Exp $ */ /*********************************************************** Index: xc/lib/Xt/ObjectP.h diff -u xc/lib/Xt/ObjectP.h:1.1.1.2 xc/lib/Xt/ObjectP.h:1.1.1.3 --- xc/lib/Xt/ObjectP.h:1.1.1.2 Sun Sep 27 03:51:09 1998 +++ xc/lib/Xt/ObjectP.h Tue Jan 16 17:24:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: ObjectP.h /main/15 1998/02/06 13:24:17 kaleb $ */ +/* $Xorg: ObjectP.h,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/Xt/PassivGraI.h diff -u xc/lib/Xt/PassivGraI.h:1.1.1.2 xc/lib/Xt/PassivGraI.h:1.1.1.3 --- xc/lib/Xt/PassivGraI.h:1.1.1.2 Sun Sep 27 03:51:10 1998 +++ xc/lib/Xt/PassivGraI.h Tue Jan 16 17:24:49 2001 @@ -1,5 +1,5 @@ /* -* $TOG: PassivGraI.h /main/13 1998/02/06 13:24:39 kaleb $ +* $Xorg: PassivGraI.h,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ /******************************************************** Index: xc/lib/Xt/PassivGrab.c diff -u xc/lib/Xt/PassivGrab.c:3.3 xc/lib/Xt/PassivGrab.c:3.4 --- xc/lib/Xt/PassivGrab.c:3.3 Sat Oct 3 05:06:57 1998 +++ xc/lib/Xt/PassivGrab.c Wed Jan 17 14:43:06 2001 @@ -1,4 +1,4 @@ -/* $TOG: PassivGrab.c /main/31 1998/02/06 13:24:33 kaleb $ */ +/* $Xorg: PassivGrab.c,v 1.4 2000/08/17 19:46:15 cpqbld Exp $ */ /******************************************************** @@ -365,7 +365,7 @@ register XtServerGrabPtr grab; register XtServerGrabExtPtr ext; - for (next = passiveListPtr; grab = *next; ) + for (next = passiveListPtr; (grab = *next); ) { if (GrabMatchesSecond(grab, pMinuendGrab) && (pDisplay(grab) == pDisplay(pMinuendGrab))) Index: xc/lib/Xt/Pointer.c diff -u xc/lib/Xt/Pointer.c:1.1.1.2 xc/lib/Xt/Pointer.c:1.1.1.3 --- xc/lib/Xt/Pointer.c:1.1.1.2 Sun Sep 27 03:51:09 1998 +++ xc/lib/Xt/Pointer.c Tue Jan 16 17:24:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: Pointer.c /main/6 1998/02/06 13:24:44 kaleb $ */ +/* $Xorg: Pointer.c,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ /******************************************************** Index: xc/lib/Xt/Popup.c diff -u xc/lib/Xt/Popup.c:1.1.1.3 xc/lib/Xt/Popup.c:1.1.1.4 --- xc/lib/Xt/Popup.c:1.1.1.3 Sun Sep 27 07:05:37 1998 +++ xc/lib/Xt/Popup.c Tue Jan 16 17:24:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: Popup.c /main/29 1998/05/11 14:35:39 barstow $ */ +/* $Xorg: Popup.c,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/Xt/PopupCB.c diff -u xc/lib/Xt/PopupCB.c:1.1.1.2 xc/lib/Xt/PopupCB.c:1.1.1.3 --- xc/lib/Xt/PopupCB.c:1.1.1.2 Sun Sep 27 03:51:11 1998 +++ xc/lib/Xt/PopupCB.c Tue Jan 16 17:24:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: PopupCB.c /main/4 1998/02/06 13:24:49 kaleb $ */ +/* $Xorg: PopupCB.c,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/Xt/RectObj.c diff -u xc/lib/Xt/RectObj.c:1.1.1.2 xc/lib/Xt/RectObj.c:1.1.1.3 --- xc/lib/Xt/RectObj.c:1.1.1.2 Sun Sep 27 03:51:12 1998 +++ xc/lib/Xt/RectObj.c Tue Jan 16 17:24:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: RectObj.c /main/16 1998/02/06 13:25:04 kaleb $ */ +/* $Xorg: RectObj.c,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/Xt/RectObj.h diff -u xc/lib/Xt/RectObj.h:1.1.1.2 xc/lib/Xt/RectObj.h:1.1.1.3 --- xc/lib/Xt/RectObj.h:1.1.1.2 Sun Sep 27 03:51:12 1998 +++ xc/lib/Xt/RectObj.h Tue Jan 16 17:24:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: RectObj.h /main/10 1998/02/06 13:25:09 kaleb $ */ +/* $Xorg: RectObj.h,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ /* $oHeader: RectObj.h,v 1.2 88/08/18 17:39:17 asente Exp $ */ /*********************************************************** Index: xc/lib/Xt/RectObjP.h diff -u xc/lib/Xt/RectObjP.h:1.1.1.2 xc/lib/Xt/RectObjP.h:1.1.1.3 --- xc/lib/Xt/RectObjP.h:1.1.1.2 Sun Sep 27 03:51:13 1998 +++ xc/lib/Xt/RectObjP.h Tue Jan 16 17:24:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: RectObjP.h /main/14 1998/02/06 13:24:59 kaleb $ */ +/* $Xorg: RectObjP.h,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ /* $oHeader: RectObjP.h,v 1.2 88/08/18 15:55:52 asente Exp $ */ /*********************************************************** Index: xc/lib/Xt/ResConfig.c diff -u xc/lib/Xt/ResConfig.c:3.4 xc/lib/Xt/ResConfig.c:3.5 --- xc/lib/Xt/ResConfig.c:3.4 Sat Oct 3 05:27:27 1998 +++ xc/lib/Xt/ResConfig.c Wed Jan 17 14:43:06 2001 @@ -1,4 +1,4 @@ -/* $TOG: ResConfig.c /main/5 1998/02/06 13:25:19 kaleb $ */ +/* $Xorg: ResConfig.c,v 1.4 2000/08/17 19:46:16 cpqbld Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group @@ -20,28 +20,34 @@ in this Software without prior written authorization from The Open Group. */ -/* - * 1.1 src/gos/2d/XTOP/lib/Xt/custom_proto.c, xtoolkit, gos42G 6/2/92 11:17:42 - * - * COMPONENT_NAME: XTOOLKIT - * - * FUNCTIONS: - * _XtResourceConfiguationEH - * _search_widget_tree, _search_child, _locate_children, - * _get_part, _get_last_part, _match_resource_to_widget, - * _set_and_search, _apply_values_to_children, _set_resource_values, - * - * ORIGINS: 27 - * - * IBM CONFIDENTIAL -- (IBM Confidential Restricted when - * combined with the aggregated modules for this product) - * OBJECT CODE ONLY SOURCE MATERIALS - * (C) COPYRIGHT International Business Machines Corp. 1992 - * All Rights Reserved - * - * US Government Users Restricted Rights - Use, duplication or - * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. - */ +/***************************************************************** + +(C) COPYRIGHT International Business Machines Corp. 1992,1997 + All Rights Reserved + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE IBM CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the IBM Corporation shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from the IBM +Corporation. + +******************************************************************/ #include "Intrinsic.h" #include "IntrinsicI.h" Index: xc/lib/Xt/ResConfigP.h diff -u xc/lib/Xt/ResConfigP.h:3.3 xc/lib/Xt/ResConfigP.h:3.4 --- xc/lib/Xt/ResConfigP.h:3.3 Sat Oct 3 05:27:28 1998 +++ xc/lib/Xt/ResConfigP.h Wed Jan 17 14:43:07 2001 @@ -1,4 +1,4 @@ -/* $TOG: ResConfigP.h /main/2 1998/02/06 13:25:14 kaleb $ */ +/* $Xorg: ResConfigP.h,v 1.4 2000/08/17 19:46:16 cpqbld Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group @@ -20,24 +20,34 @@ in this Software without prior written authorization from The Open Group. */ -/* - * 1.2 src/gos/2d/XTOP/lib/Xt/custom_proto.h, xtoolkit, gos42G 8/12/93 10:35:50 - * - * COMPONENT_NAME: XTOOLKIT - * - * FUNCTIONS: - * - * ORIGINS: 27 - * - * IBM CONFIDENTIAL -- (IBM Confidential Restricted when - * combined with the aggregated modules for this product) - * OBJECT CODE ONLY SOURCE MATERIALS - * (C) COPYRIGHT International Business Machines Corp. 1992 - * All Rights Reserved - * - * US Government Users Restricted Rights - Use, duplication or - * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. - */ +/***************************************************************** + +(C) COPYRIGHT International Business Machines Corp. 1992,1997 + All Rights Reserved + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE IBM CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the IBM Corporation shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from the IBM +Corporation. + +******************************************************************/ #ifndef _RESCONFIGP_H #define _RESCONFIGP_H Index: xc/lib/Xt/ResourceI.h diff -u xc/lib/Xt/ResourceI.h:1.1.1.2 xc/lib/Xt/ResourceI.h:1.1.1.3 --- xc/lib/Xt/ResourceI.h:1.1.1.2 Sun Sep 27 03:51:13 1998 +++ xc/lib/Xt/ResourceI.h Tue Jan 16 17:24:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: ResourceI.h /main/11 1998/02/06 13:25:25 kaleb $ */ +/* $Xorg: ResourceI.h,v 1.3 2000/08/17 19:46:16 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/Xt/Resources.c diff -u xc/lib/Xt/Resources.c:1.6 xc/lib/Xt/Resources.c:1.7 --- xc/lib/Xt/Resources.c:1.6 Sun Dec 20 06:57:09 1998 +++ xc/lib/Xt/Resources.c Wed Jan 17 14:43:07 2001 @@ -1,4 +1,4 @@ -/* $TOG: Resources.c /main/115 1998/06/19 11:08:11 kaleb $ */ +/* $Xorg: Resources.c,v 1.3 2000/08/17 19:46:16 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -55,7 +55,7 @@ */ -/* $XFree86: xc/lib/Xt/Resources.c,v 1.6 1998/12/20 11:57:09 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Resources.c,v 1.7 2001/01/17 19:43:07 dawes Exp $ */ /*LINTLIBRARY*/ #include "IntrinsicI.h" Index: xc/lib/Xt/Selection.c diff -u xc/lib/Xt/Selection.c:3.5 xc/lib/Xt/Selection.c:3.6 --- xc/lib/Xt/Selection.c:3.5 Sat Oct 3 05:06:57 1998 +++ xc/lib/Xt/Selection.c Wed Jan 17 14:43:08 2001 @@ -1,4 +1,4 @@ -/* $TOG: Selection.c /main/99 1998/02/06 13:25:43 kaleb $ */ +/* $Xorg: Selection.c,v 1.3 2000/08/17 19:46:16 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, Index: xc/lib/Xt/SelectionI.h diff -u xc/lib/Xt/SelectionI.h:1.1.1.2 xc/lib/Xt/SelectionI.h:1.1.1.3 --- xc/lib/Xt/SelectionI.h:1.1.1.2 Sun Sep 27 03:51:17 1998 +++ xc/lib/Xt/SelectionI.h Tue Jan 16 17:25:01 2001 @@ -1,4 +1,4 @@ -/* $TOG: SelectionI.h /main/38 1998/02/06 13:25:38 kaleb $ */ +/* $Xorg: SelectionI.h,v 1.3 2000/08/17 19:46:17 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/Xt/SetSens.c diff -u xc/lib/Xt/SetSens.c:1.1.1.2 xc/lib/Xt/SetSens.c:1.1.1.3 --- xc/lib/Xt/SetSens.c:1.1.1.2 Sun Sep 27 03:51:18 1998 +++ xc/lib/Xt/SetSens.c Tue Jan 16 17:25:01 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetSens.c /main/7 1998/02/06 13:25:53 kaleb $ */ +/* $Xorg: SetSens.c,v 1.3 2000/08/17 19:46:17 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts Index: xc/lib/Xt/SetValues.c diff -u xc/lib/Xt/SetValues.c:1.1.1.4 xc/lib/Xt/SetValues.c:1.1.1.5 --- xc/lib/Xt/SetValues.c:1.1.1.4 Sun Sep 27 03:51:18 1998 +++ xc/lib/Xt/SetValues.c Tue Jan 16 17:25:03 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetValues.c /main/24 1998/02/06 13:25:58 kaleb $ */ +/* $Xorg: SetValues.c,v 1.3 2000/08/17 19:46:17 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts Index: xc/lib/Xt/SetWMCW.c diff -u xc/lib/Xt/SetWMCW.c:1.3 xc/lib/Xt/SetWMCW.c:1.4 --- xc/lib/Xt/SetWMCW.c:1.3 Sat Oct 3 05:06:58 1998 +++ xc/lib/Xt/SetWMCW.c Wed Jan 17 14:43:08 2001 @@ -1,4 +1,4 @@ -/* $TOG: SetWMCW.c /main/11 1998/02/06 13:26:04 kaleb $ */ +/* $Xorg: SetWMCW.c,v 1.3 2000/08/17 19:46:17 cpqbld Exp $ */ /* * Copyright 1993 by Sun Microsystems, Inc. Mountain View, CA. Index: xc/lib/Xt/Shell.c diff -u xc/lib/Xt/Shell.c:3.8 xc/lib/Xt/Shell.c:3.9 --- xc/lib/Xt/Shell.c:3.8 Sat Oct 3 05:06:58 1998 +++ xc/lib/Xt/Shell.c Wed Jan 17 14:43:09 2001 @@ -1,4 +1,4 @@ -/* $TOG: Shell.c /main/178 1998/02/06 13:26:20 kaleb $ */ +/* $Xorg: Shell.c,v 1.3 2000/08/17 19:46:17 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Shell.c,v 3.8 1998/10/03 09:06:58 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Shell.c,v 3.9 2001/01/17 19:43:09 dawes Exp $ */ /* Index: xc/lib/Xt/ShellP.h diff -u xc/lib/Xt/ShellP.h:1.1.1.2 xc/lib/Xt/ShellP.h:1.1.1.3 --- xc/lib/Xt/ShellP.h:1.1.1.2 Sun Sep 27 03:51:20 1998 +++ xc/lib/Xt/ShellP.h Tue Jan 16 17:25:08 2001 @@ -1,4 +1,4 @@ -/* $TOG: ShellP.h /main/34 1998/02/06 13:26:15 kaleb $ */ +/* $Xorg: ShellP.h,v 1.3 2000/08/17 19:46:18 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/Xt/TMaction.c diff -u xc/lib/Xt/TMaction.c:3.4 xc/lib/Xt/TMaction.c:3.5 --- xc/lib/Xt/TMaction.c:3.4 Sat Oct 3 05:06:59 1998 +++ xc/lib/Xt/TMaction.c Wed Jan 17 14:43:09 2001 @@ -1,4 +1,4 @@ -/* $TOG: TMaction.c /main/30 1998/05/12 11:19:24 kaleb $ */ +/* $Xorg: TMaction.c,v 1.4 2000/08/17 19:46:18 cpqbld Exp $ */ /*LINTLIBRARY*/ /*********************************************************** @@ -151,7 +151,6 @@ register Cardinal num_chars = 0; register Cardinal i, j; XtActionProc *procs; - char* msg_prefix = "Actions not found: "; for (i=0; i < xlations->numStateTrees; i++) { if (bindData->simple.isComplex) Index: xc/lib/Xt/TMgrab.c diff -u xc/lib/Xt/TMgrab.c:1.1.1.2 xc/lib/Xt/TMgrab.c:1.1.1.3 --- xc/lib/Xt/TMgrab.c:1.1.1.2 Sun Sep 27 03:51:21 1998 +++ xc/lib/Xt/TMgrab.c Tue Jan 16 17:25:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: TMgrab.c /main/13 1998/02/06 13:26:51 kaleb $ */ +/* $Xorg: TMgrab.c,v 1.3 2000/08/17 19:46:18 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts Index: xc/lib/Xt/TMkey.c diff -u xc/lib/Xt/TMkey.c:3.5 xc/lib/Xt/TMkey.c:3.6 --- xc/lib/Xt/TMkey.c:3.5 Sat Oct 3 05:06:59 1998 +++ xc/lib/Xt/TMkey.c Wed Jan 17 14:43:10 2001 @@ -1,4 +1,4 @@ -/* $TOG: TMkey.c /main/34 1998/02/06 13:26:56 kaleb $ */ +/* $Xorg: TMkey.c,v 1.3 2000/08/17 19:46:18 cpqbld Exp $ */ /*LINTLIBRARY*/ /*********************************************************** Index: xc/lib/Xt/TMparse.c diff -u xc/lib/Xt/TMparse.c:3.4 xc/lib/Xt/TMparse.c:3.5 --- xc/lib/Xt/TMparse.c:3.4 Sat Oct 3 05:07:00 1998 +++ xc/lib/Xt/TMparse.c Wed Jan 17 14:43:10 2001 @@ -1,4 +1,4 @@ -/* $TOG: TMparse.c /main/123 1998/05/12 11:19:31 kaleb $ */ +/* $Xorg: TMparse.c,v 1.5 2000/08/17 19:46:18 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/TMparse.c,v 3.4 1998/10/03 09:07:00 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/TMparse.c,v 3.5 2001/01/17 19:43:10 dawes Exp $ */ /* @@ -474,7 +474,6 @@ static void Syntax(str0,str1) String str0,str1; { - Cardinal numChars; Cardinal num_params = 2; String params[2]; @@ -781,7 +780,7 @@ register char c; register unsigned long val = 0; - while (c = *str) { + while ((c = *str)) { if ('0' <= c && c <= '9') val = val*16+c-'0'; else if ('a' <= c && c <= 'z') val = val*16+c-'a'+10; else if ('A' <= c && c <= 'Z') val = val*16+c-'A'+10; @@ -798,7 +797,7 @@ register char c; register unsigned long val = 0; - while (c = *str) { + while ((c = *str)) { if ('0' <= c && c <= '7') val = val*8+c-'0'; else return 0; str++; } @@ -818,7 +817,7 @@ else return StrToOct(str); } - while (c = *str) { + while ((c = *str)) { if ('0' <= c && c <= '9') val = val*10+c-'0'; else return 0; str++; Index: xc/lib/Xt/TMprint.c diff -u xc/lib/Xt/TMprint.c:1.3 xc/lib/Xt/TMprint.c:1.4 --- xc/lib/Xt/TMprint.c:1.3 Sat Oct 3 05:07:00 1998 +++ xc/lib/Xt/TMprint.c Wed Jan 17 14:43:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: TMprint.c /main/16 1998/02/06 13:27:12 kaleb $ */ +/* $Xorg: TMprint.c,v 1.3 2000/08/17 19:46:19 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts Index: xc/lib/Xt/TMstate.c diff -u xc/lib/Xt/TMstate.c:1.4 xc/lib/Xt/TMstate.c:1.5 --- xc/lib/Xt/TMstate.c:1.4 Sun Dec 20 06:57:10 1998 +++ xc/lib/Xt/TMstate.c Wed Jan 17 14:43:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: TMstate.c /main/155 1998/04/23 10:49:36 barstow $ */ +/* $Xorg: TMstate.c,v 1.4 2000/08/17 19:46:19 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/TMstate.c,v 1.4 1998/12/20 11:57:10 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/TMstate.c,v 1.5 2001/01/17 19:43:11 dawes Exp $ */ /* @@ -1348,7 +1348,7 @@ _XtUninstallTranslations(widget); - if (cBindData = (TMComplexBindData)widget->core.tm.proc_table) { + if ((cBindData = (TMComplexBindData)widget->core.tm.proc_table)) { if (cBindData->isComplex) { ATranslations aXlations, nXlations; Index: xc/lib/Xt/Threads.c diff -u xc/lib/Xt/Threads.c:3.3 xc/lib/Xt/Threads.c:3.4 --- xc/lib/Xt/Threads.c:3.3 Sat Oct 3 05:07:01 1998 +++ xc/lib/Xt/Threads.c Wed Jan 17 14:43:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: Threads.c /main/19 1998/02/06 13:26:39 kaleb $ */ +/* $Xorg: Threads.c,v 1.3 2000/08/17 19:46:19 cpqbld Exp $ */ /************************************************************ Copyright 1993 by Sun Microsystems, Inc. Mountain View, CA. Index: xc/lib/Xt/ThreadsI.h diff -u xc/lib/Xt/ThreadsI.h:3.1 xc/lib/Xt/ThreadsI.h:3.2 --- xc/lib/Xt/ThreadsI.h:3.1 Sat Oct 3 05:07:01 1998 +++ xc/lib/Xt/ThreadsI.h Wed Jan 17 14:43:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: ThreadsI.h /main/11 1998/02/06 13:26:34 kaleb $ */ +/* $Xorg: ThreadsI.h,v 1.3 2000/08/17 19:46:19 cpqbld Exp $ */ /************************************************************ Copyright 1993 by Sun Microsystems, Inc. Mountain View, CA. Index: xc/lib/Xt/TranslateI.h diff -u xc/lib/Xt/TranslateI.h:1.1.1.2 xc/lib/Xt/TranslateI.h:1.1.1.3 --- xc/lib/Xt/TranslateI.h:1.1.1.2 Sun Sep 27 03:51:26 1998 +++ xc/lib/Xt/TranslateI.h Tue Jan 16 17:25:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: TranslateI.h /main/49 1998/02/06 13:27:28 kaleb $ */ +/* $Xorg: TranslateI.h,v 1.3 2000/08/17 19:46:19 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/Xt/VarCreate.c diff -u xc/lib/Xt/VarCreate.c:3.2 xc/lib/Xt/VarCreate.c:3.3 --- xc/lib/Xt/VarCreate.c:3.2 Sat Oct 3 05:07:01 1998 +++ xc/lib/Xt/VarCreate.c Wed Jan 17 14:43:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: VarCreate.c /main/34 1998/02/06 13:27:44 kaleb $ */ +/* $Xorg: VarCreate.c,v 1.3 2000/08/17 19:46:20 cpqbld Exp $ */ /* Index: xc/lib/Xt/VarGet.c diff -u xc/lib/Xt/VarGet.c:1.4 xc/lib/Xt/VarGet.c:1.5 --- xc/lib/Xt/VarGet.c:1.4 Sat Oct 3 05:07:02 1998 +++ xc/lib/Xt/VarGet.c Wed Jan 17 14:43:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: VarGet.c /main/23 1998/02/06 13:27:49 kaleb $ */ +/* $Xorg: VarGet.c,v 1.3 2000/08/17 19:46:20 cpqbld Exp $ */ /* Copyright 1993 by Sun Microsystems, Inc. Mountain View, CA. Index: xc/lib/Xt/Varargs.c diff -u xc/lib/Xt/Varargs.c:3.5 xc/lib/Xt/Varargs.c:3.6 --- xc/lib/Xt/Varargs.c:3.5 Sat Oct 3 05:07:02 1998 +++ xc/lib/Xt/Varargs.c Wed Jan 17 14:43:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: Varargs.c /main/35 1998/02/06 13:27:38 kaleb $ */ +/* $Xorg: Varargs.c,v 1.3 2000/08/17 19:46:20 cpqbld Exp $ */ /* Index: xc/lib/Xt/VarargsI.h diff -u xc/lib/Xt/VarargsI.h:3.2 xc/lib/Xt/VarargsI.h:3.3 --- xc/lib/Xt/VarargsI.h:3.2 Sat Oct 3 05:07:02 1998 +++ xc/lib/Xt/VarargsI.h Wed Jan 17 14:43:13 2001 @@ -1,4 +1,4 @@ -/* $TOG: VarargsI.h /main/19 1998/02/06 13:27:34 kaleb $ */ +/* $Xorg: VarargsI.h,v 1.3 2000/08/17 19:46:20 cpqbld Exp $ */ /* Index: xc/lib/Xt/Vendor.c diff -u xc/lib/Xt/Vendor.c:1.4 xc/lib/Xt/Vendor.c:1.5 --- xc/lib/Xt/Vendor.c:1.4 Sat Oct 3 05:07:02 1998 +++ xc/lib/Xt/Vendor.c Wed Jan 17 14:43:13 2001 @@ -1,4 +1,4 @@ -/* $TOG: Vendor.c /main/21 1998/02/06 13:28:00 kaleb $ */ +/* $Xorg: Vendor.c,v 1.3 2000/08/17 19:46:20 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Vendor.c,v 1.4 1998/10/03 09:07:02 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Vendor.c,v 1.5 2001/01/17 19:43:13 dawes Exp $ */ /* Make sure all wm properties can make it out of the resource manager */ Index: xc/lib/Xt/Vendor.h diff -u xc/lib/Xt/Vendor.h:1.1.1.2 xc/lib/Xt/Vendor.h:1.1.1.3 --- xc/lib/Xt/Vendor.h:1.1.1.2 Sun Sep 27 03:51:32 1998 +++ xc/lib/Xt/Vendor.h Tue Jan 16 17:25:27 2001 @@ -1,5 +1,5 @@ /* -* $TOG: Vendor.h /main/9 1998/02/06 13:28:06 kaleb $ +* $Xorg: Vendor.h,v 1.4 2000/08/17 19:46:20 cpqbld Exp $ * $oHeader: Vendor.h,v 1.2 88/08/18 15:56:44 asente Exp $ */ @@ -48,6 +48,8 @@ #ifndef _XtVendor_h #define _XtVendor_h + +#include /*********************************************************************** * Index: xc/lib/Xt/VendorP.h diff -u xc/lib/Xt/VendorP.h:1.1.1.2 xc/lib/Xt/VendorP.h:1.1.1.3 --- xc/lib/Xt/VendorP.h:1.1.1.2 Sun Sep 27 03:51:33 1998 +++ xc/lib/Xt/VendorP.h Tue Jan 16 17:25:28 2001 @@ -1,5 +1,5 @@ /* -* $TOG: VendorP.h /main/12 1998/02/06 13:27:55 kaleb $ +* $Xorg: VendorP.h,v 1.3 2000/08/17 19:46:20 cpqbld Exp $ * $oHeader: VendorP.h,v 1.2 88/08/18 15:56:48 asente Exp $ */ Index: xc/lib/Xt/Xt-def.cpp diff -u xc/lib/Xt/Xt-def.cpp:1.1.1.1 xc/lib/Xt/Xt-def.cpp:1.1.1.2 --- xc/lib/Xt/Xt-def.cpp:1.1.1.1 Sun Sep 27 03:51:36 1998 +++ xc/lib/Xt/Xt-def.cpp Tue Jan 16 17:25:29 2001 @@ -338,4 +338,4 @@ XtWindow XtWindowOfObject XtWindowToWidget -/* $TOG: Xt-def.cpp /main/1 1997/09/16 10:02:29 kaleb $ */ +/* $Xorg: Xt-def.cpp,v 1.3 2000/08/17 19:46:20 cpqbld Exp $ */ Index: xc/lib/Xt/Xtos.h diff -u xc/lib/Xt/Xtos.h:3.4 xc/lib/Xt/Xtos.h:3.5 --- xc/lib/Xt/Xtos.h:3.4 Wed Aug 23 18:10:03 2000 +++ xc/lib/Xt/Xtos.h Wed Jan 17 14:43:13 2001 @@ -1,5 +1,5 @@ /* -* $TOG: Xtos.h /main/20 1998/02/06 13:28:11 kaleb $ +* $Xorg: Xtos.h,v 1.3 2000/08/17 19:46:20 cpqbld Exp $ */ /*********************************************************** @@ -44,7 +44,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Xtos.h,v 3.4 2000/08/23 22:10:03 tsi Exp $ */ +/* $XFree86: xc/lib/Xt/Xtos.h,v 3.5 2001/01/17 19:43:13 dawes Exp $ */ #ifndef _Xtos_h #define _Xtos_h Index: xc/lib/Xt/jump_funcs diff -u xc/lib/Xt/jump_funcs:3.5 xc/lib/Xt/jump_funcs:3.6 --- xc/lib/Xt/jump_funcs:3.5 Mon Dec 30 08:58:31 1996 +++ xc/lib/Xt/jump_funcs Wed Jan 17 14:43:13 2001 @@ -1,5 +1,9 @@ -# $XConsortium: jump_funcs,v 1.4 95/06/30 18:48:53 kaleb Exp $ -# $XFree86: xc/lib/Xt/jump_funcs,v 3.5 1996/12/30 13:58:31 dawes Exp $ +# $Xorg: jump_funcs,v 1.3 2000/08/17 19:46:20 cpqbld Exp $ +# +# +# +# +# $XFree86: xc/lib/Xt/jump_funcs,v 3.6 2001/01/17 19:43:13 dawes Exp $ # 00000000 T _XtAppAddActionHook libXt ActionHook 00000000 T _XtRemoveActionHook libXt ActionHook Index: xc/lib/Xt/jump_ignore diff -u xc/lib/Xt/jump_ignore:3.7 xc/lib/Xt/jump_ignore:3.8 --- xc/lib/Xt/jump_ignore:3.7 Mon Dec 30 08:58:32 1996 +++ xc/lib/Xt/jump_ignore Wed Jan 17 14:43:13 2001 @@ -1,5 +1,9 @@ -# $XConsortium: jump_ignore,v 1.3 95/06/30 18:48:53 kaleb Exp $ -# $XFree86: xc/lib/Xt/jump_ignore,v 3.7 1996/12/30 13:58:32 dawes Exp $ +# $Xorg: jump_ignore,v 1.3 2000/08/17 19:46:21 cpqbld Exp $ +# +# +# +# +# $XFree86: xc/lib/Xt/jump_ignore,v 3.8 2001/01/17 19:43:13 dawes Exp $ # jump_ignore 00000000 T __XtFreeArgList libXt Varargs 00000000 T __XtClearAncestorCache libXt Keyboard Index: xc/lib/Xt/jump_vars diff -u xc/lib/Xt/jump_vars:3.2 xc/lib/Xt/jump_vars:3.3 --- xc/lib/Xt/jump_vars:3.2 Sat Jan 28 10:44:05 1995 +++ xc/lib/Xt/jump_vars Wed Jan 17 14:43:13 2001 @@ -1,5 +1,9 @@ -# $XConsortium: jump_vars,v 1.2 94/12/07 10:45:51 kaleb Exp $ -# $XFree86: xc/lib/Xt/jump_vars,v 3.2 1995/01/28 15:44:05 dawes Exp $ +# $Xorg: jump_vars,v 1.3 2000/08/17 19:46:21 cpqbld Exp $ +# +# +# +# +# $XFree86: xc/lib/Xt/jump_vars,v 3.3 2001/01/17 19:43:13 dawes Exp $ # 00000100 D _compositeClassRec libXt Composite 00000004 D _compositeWidgetClass libXt Composite Index: xc/lib/Xt/libXt.elist diff -u xc/lib/Xt/libXt.elist:1.1.1.1 xc/lib/Xt/libXt.elist:1.1.1.2 --- xc/lib/Xt/libXt.elist:1.1.1.1 Sat Dec 21 22:19:35 1996 +++ xc/lib/Xt/libXt.elist Tue Jan 16 17:25:32 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: libXt.elist /main/1 1996/09/28 16:47:19 rws $ */ +/* $Xorg: libXt.elist,v 1.3 2000/08/17 19:46:21 cpqbld Exp $ */ /************************************************************************* * Export list for libXt Index: xc/lib/Xt/sharedlib.c diff -u xc/lib/Xt/sharedlib.c:3.2 xc/lib/Xt/sharedlib.c:3.3 --- xc/lib/Xt/sharedlib.c:3.2 Sat Oct 3 05:07:03 1998 +++ xc/lib/Xt/sharedlib.c Wed Jan 17 14:43:13 2001 @@ -1,4 +1,4 @@ -/* $TOG: sharedlib.c /main/19 1998/02/06 13:26:09 kaleb $ */ +/* $Xorg: sharedlib.c,v 1.3 2000/08/17 19:46:21 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xt/sharedlib.c,v 3.2 1998/10/03 09:07:03 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/sharedlib.c,v 3.3 2001/01/17 19:43:13 dawes Exp $ */ #if (defined(SUNSHLIB) || defined(AIXSHLIB)) && !defined(SHAREDCODE) #include "IntrinsicI.h" Index: xc/lib/Xt/util/Shell.ht diff -u xc/lib/Xt/util/Shell.ht:3.1 xc/lib/Xt/util/Shell.ht:3.2 --- xc/lib/Xt/util/Shell.ht:3.1 Sat Oct 3 05:07:09 1998 +++ xc/lib/Xt/util/Shell.ht Wed Jan 17 14:43:15 2001 @@ -1,4 +1,4 @@ -/* $TOG: Shell.ht /main/27 1998/02/06 13:33:40 kaleb $ */ +/* $Xorg: Shell.ht,v 1.4 2000/08/17 19:46:22 cpqbld Exp $ */ /*********************************************************** @@ -47,6 +47,7 @@ #define _XtShell_h #include +#include /*********************************************************************** * Index: xc/lib/Xt/util/StrDefs.ct diff -u xc/lib/Xt/util/StrDefs.ct:3.1 xc/lib/Xt/util/StrDefs.ct:3.2 --- xc/lib/Xt/util/StrDefs.ct:3.1 Sat Oct 3 05:07:09 1998 +++ xc/lib/Xt/util/StrDefs.ct Wed Jan 17 14:43:16 2001 @@ -1,4 +1,4 @@ -/* $TOG: StrDefs.ct /main/3 1998/02/06 13:33:46 kaleb $ */ +/* $Xorg: StrDefs.ct,v 1.3 2000/08/17 19:46:22 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/Xt/util/StrDefs.ht diff -u xc/lib/Xt/util/StrDefs.ht:3.1 xc/lib/Xt/util/StrDefs.ht:3.2 --- xc/lib/Xt/util/StrDefs.ht:3.1 Sat Oct 3 05:07:10 1998 +++ xc/lib/Xt/util/StrDefs.ht Wed Jan 17 14:43:16 2001 @@ -1,4 +1,4 @@ -/* $TOG: StrDefs.ht /main/4 1998/02/06 13:33:51 kaleb $ */ +/* $Xorg: StrDefs.ht,v 1.3 2000/08/17 19:46:22 cpqbld Exp $ */ /*********************************************************** Index: xc/lib/Xt/util/string.list diff -u xc/lib/Xt/util/string.list:3.0 xc/lib/Xt/util/string.list:3.1 --- xc/lib/Xt/util/string.list:3.0 Wed Jun 14 03:14:07 1995 +++ xc/lib/Xt/util/string.list Wed Jan 17 14:43:16 2001 @@ -1,4 +1,4 @@ -! $XConsortium: string.list,v 1.12 95/05/11 22:32:57 kaleb Exp $ +! $Xorg: string.list,v 1.3 2000/08/17 19:46:22 cpqbld Exp $ ! NOTE: To maintain binary compatibility, you can only APPEND items within ! a given list!!!! ! Index: xc/lib/Xtst/Imakefile diff -u xc/lib/Xtst/Imakefile:1.2 xc/lib/Xtst/Imakefile:1.3 --- xc/lib/Xtst/Imakefile:1.2 Sun Dec 20 06:57:12 1998 +++ xc/lib/Xtst/Imakefile Wed Jan 17 14:43:16 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/11 1995/12/08 11:56:32 dpw $ -XCOMM $XFree86: xc/lib/Xtst/Imakefile,v 1.2 1998/12/20 11:57:12 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:23 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/Xtst/Imakefile,v 1.3 2001/01/17 19:43:16 dawes Exp $ + #define DoNormalLib NormalLibXtst #define DoSharedLib SharedLibXtst #define DoExtraLib SharedLibXtst Index: xc/lib/Xtst/XRecord.c diff -u xc/lib/Xtst/XRecord.c:1.1.1.4 xc/lib/Xtst/XRecord.c:1.1.1.5 --- xc/lib/Xtst/XRecord.c:1.1.1.4 Sun Sep 27 07:05:39 1998 +++ xc/lib/Xtst/XRecord.c Tue Jan 16 17:25:40 2001 @@ -1,5 +1,5 @@ /* -$TOG: XRecord.c /main/7 1998/05/01 10:37:53 kaleb $ +$Xorg: XRecord.c,v 1.3 2000/08/17 19:46:23 cpqbld Exp $ XRecord.c - client-side library for RECORD extension Index: xc/lib/Xtst/XTest.c diff -u xc/lib/Xtst/XTest.c:1.2 xc/lib/Xtst/XTest.c:1.3 --- xc/lib/Xtst/XTest.c:1.2 Sun Dec 20 06:57:12 1998 +++ xc/lib/Xtst/XTest.c Wed Jan 17 14:43:16 2001 @@ -1,4 +1,4 @@ -/* $TOG: XTest.c /main/16 1998/02/06 15:58:41 kaleb $ */ +/* $Xorg: XTest.c,v 1.4 2000/08/17 19:46:23 cpqbld Exp $ */ /* Copyright 1990, 1991 by UniSoft Group Limited */ @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/Xtst/XTest.c,v 1.2 1998/12/20 11:57:12 dawes Exp $ */ +/* $XFree86: xc/lib/Xtst/XTest.c,v 1.3 2001/01/17 19:43:16 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" @@ -471,7 +471,7 @@ register char *ptr; LockDisplay(dpy); - if (something = (dpy->bufptr != dpy->buffer)) { + if ((something = (dpy->bufptr != dpy->buffer))) { for (ptr = dpy->buffer; ptr < dpy->bufptr; ptr += (((xReq *)ptr)->length << 2)) Index: xc/lib/Xtst/Xtst-def.cpp diff -u xc/lib/Xtst/Xtst-def.cpp:1.1.1.3 xc/lib/Xtst/Xtst-def.cpp:1.1.1.4 --- xc/lib/Xtst/Xtst-def.cpp:1.1.1.3 Sat Dec 21 22:22:36 1996 +++ xc/lib/Xtst/Xtst-def.cpp Tue Jan 16 17:25:40 2001 @@ -29,4 +29,4 @@ XRecordFreeData XRecordDisableContext XRecordFreeContext -/* $XConsortium: Xtst-def.cpp /main/4 1996/05/07 13:15:38 kaleb $ */ +/* $Xorg: Xtst-def.cpp,v 1.3 2000/08/17 19:46:23 cpqbld Exp $ */ Index: xc/lib/Xv/Xv.c diff -u xc/lib/Xv/Xv.c:1.14 xc/lib/Xv/Xv.c:1.15 --- xc/lib/Xv/Xv.c:1.14 Thu May 25 16:47:39 2000 +++ xc/lib/Xv/Xv.c Fri May 11 04:23:22 2001 @@ -21,7 +21,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xv/Xv.c,v 1.14 2000/05/25 20:47:39 mvojkovi Exp $ */ +/* $XFree86: xc/lib/Xv/Xv.c,v 1.15 2001/05/11 08:23:22 alanh Exp $ */ /* ** File: ** @@ -189,12 +189,16 @@ /* GET INPUT ADAPTORS */ - size = rep.num_adaptors*sizeof(XvAdaptorInfo); - if ((pas=(XvAdaptorInfo *)Xmalloc(size))==NULL) { - Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadAlloc); + if (rep.num_adaptors == 0) { + pas = NULL; + } else { + size = rep.num_adaptors*sizeof(XvAdaptorInfo); + if ((pas=(XvAdaptorInfo *)Xmalloc(size))==NULL) { + Xfree(buffer); + UnlockDisplay(dpy); + SyncHandle(); + return(XvBadAlloc); + } } /* INIT ADAPTOR FIELDS */ @@ -204,6 +208,7 @@ pa->num_adaptors = 0; pa->name = (char *)NULL; pa->formats = (XvFormat *)NULL; + pa++; } pa = pas; Index: xc/lib/XvMC/Imakefile diff -u /dev/null xc/lib/XvMC/Imakefile:1.2 --- /dev/null Mon Jun 4 12:38:46 2001 +++ xc/lib/XvMC/Imakefile Sun Apr 1 10:00:02 2001 @@ -0,0 +1,29 @@ +XCOMM $XFree86: xc/lib/XvMC/Imakefile,v 1.2 2001/04/01 14:00:02 tsi Exp $ + +#define DoNormalLib NormalLibXvMC +#define DoSharedLib SharedLibXvMC +#define DoDebugLib DebugLibXvMC +#define DoProfileLib ProfileLibXvMC +#define LibName XvMC +#define SoRev SOXVMCREV +#define LibHeaders NO + +#include + +#ifdef SharedXvMCReqs +REQUIREDLIBS = SharedXvMCReqs +#endif + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + + DEFINES = $(ALLOC_DEFINES) + INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) + SRCS = XvMC.c + OBJS = XvMC.o + LINTLIBS = $(LINTXLIB) + +#include + +DependTarget() Index: xc/lib/XvMC/XvMC.c diff -u /dev/null xc/lib/XvMC/XvMC.c:1.3 --- /dev/null Mon Jun 4 12:38:46 2001 +++ xc/lib/XvMC/XvMC.c Sun Apr 1 10:00:02 2001 @@ -0,0 +1,468 @@ +/* $XFree86: xc/lib/XvMC/XvMC.c,v 1.3 2001/04/01 14:00:02 tsi Exp $ */ + +#define NEED_REPLIES + +#include +#include "XvMClibint.h" +#include "Xext.h" +#include "extutil.h" + +static XExtensionInfo _xvmc_info_data; +static XExtensionInfo *xvmc_info = &_xvmc_info_data; +static char *xvmc_extension_name = XvMCName; + +static char *xvmc_error_list[] = +{ + "BadContext", + "BadSurface", + "BadSubpicture" +}; + +static XEXT_GENERATE_CLOSE_DISPLAY (xvmc_close_display, xvmc_info) + + +static XEXT_GENERATE_ERROR_STRING (xvmc_error_string, xvmc_extension_name, + XvMCNumErrors, xvmc_error_list) + + +static XExtensionHooks xvmc_extension_hooks = { + NULL, /* create_gc */ + NULL, /* copy_gc */ + NULL, /* flush_gc */ + NULL, /* free_gc */ + NULL, /* create_font */ + NULL, /* free_font */ + xvmc_close_display, /* close_display */ + NULL, /* wire_to_event */ + NULL, /* event_to_wire */ + NULL, /* error */ + xvmc_error_string /* error_string */ +}; + +static XEXT_GENERATE_FIND_DISPLAY (xvmc_find_display, xvmc_info, + xvmc_extension_name, + &xvmc_extension_hooks, + XvMCNumEvents, NULL) + +Bool XvMCQueryExtension (Display *dpy, int *event_basep, int *error_basep) +{ + XExtDisplayInfo *info = xvmc_find_display(dpy); + + if (XextHasExtension(info)) { + *event_basep = info->codes->first_event; + *error_basep = info->codes->first_error; + return True; + } else { + return False; + } +} + +Status XvMCQueryVersion (Display *dpy, int *major, int *minor) +{ + XExtDisplayInfo *info = xvmc_find_display(dpy); + xvmcQueryVersionReply rep; + xvmcQueryVersionReq *req; + + XvMCCheckExtension (dpy, info, BadImplementation); + + LockDisplay (dpy); + XvMCGetReq (QueryVersion, req); + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return BadImplementation; + } + *major = rep.major; + *minor = rep.minor; + UnlockDisplay (dpy); + SyncHandle (); + return Success; +} + + +XvMCSurfaceInfo * XvMCListSurfaceTypes(Display *dpy, XvPortID port, int *num) +{ + XExtDisplayInfo *info = xvmc_find_display(dpy); + xvmcListSurfaceTypesReply rep; + xvmcListSurfaceTypesReq *req; + XvMCSurfaceInfo *surface_info = NULL; + + *num = 0; + + XvMCCheckExtension (dpy, info, NULL); + + LockDisplay (dpy); + XvMCGetReq (ListSurfaceTypes, req); + req->port = port; + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { + UnlockDisplay (dpy); + SyncHandle (); + return NULL; + } + + if(rep.num > 0) { + surface_info = + (XvMCSurfaceInfo*)Xmalloc(rep.num * sizeof(XvMCSurfaceInfo)); + + if(surface_info) { + xvmcSurfaceInfo sinfo; + int i; + + *num = rep.num; + + for(i = 0; i < rep.num; i++) { + _XRead(dpy, (char*)&sinfo, sizeof(xvmcSurfaceInfo)); + surface_info[i].surface_type_id = sinfo.surface_type_id; + surface_info[i].chroma_format = sinfo.chroma_format; + surface_info[i].color_description = sinfo.color_description; + surface_info[i].max_width = sinfo.max_width; + surface_info[i].max_height = sinfo.max_height; + surface_info[i].subpicture_max_width = + sinfo.subpicture_max_width; + surface_info[i].subpicture_max_height = + sinfo.subpicture_max_height; + surface_info[i].mc_type = sinfo.mc_type; + surface_info[i].flags = sinfo.flags; + } + } else + _XEatData(dpy, rep.length << 2); + } + + UnlockDisplay (dpy); + SyncHandle (); + return surface_info; +} + + +XvImageFormatValues * XvMCListSubpictureTypes ( + Display * dpy, + XvPortID port, + int surface_type_id, + int *count_return +) +{ + XExtDisplayInfo *info = xvmc_find_display(dpy); + xvmcListSubpictureTypesReply rep; + xvmcListSubpictureTypesReq *req; + XvImageFormatValues *ret = NULL; + + + *count_return = 0; + + XvMCCheckExtension (dpy, info, NULL); + + + LockDisplay (dpy); + XvMCGetReq (ListSubpictureTypes, req); + req->port = port; + req->surface_type_id = surface_type_id; + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { + UnlockDisplay (dpy); + SyncHandle (); + return NULL; + } + + if(rep.num > 0) { + ret = + (XvImageFormatValues*)Xmalloc(rep.num * sizeof(XvImageFormatValues)); + + if(ret) { + xvImageFormatInfo Info; + int i; + + *count_return = rep.num; + + for(i = 0; i < rep.num; i++) { + _XRead(dpy, (char*)(&Info), sz_xvImageFormatInfo); + ret[i].id = Info.id; + ret[i].type = Info.type; + ret[i].byte_order = Info.byte_order; + memcpy(&(ret[i].guid[0]), &(Info.guid[0]), 16); + ret[i].bits_per_pixel = Info.bpp; + ret[i].format = Info.format; + ret[i].num_planes = Info.num_planes; + ret[i].depth = Info.depth; + ret[i].red_mask = Info.red_mask; + ret[i].green_mask = Info.green_mask; + ret[i].blue_mask = Info.blue_mask; + ret[i].y_sample_bits = Info.y_sample_bits; + ret[i].u_sample_bits = Info.u_sample_bits; + ret[i].v_sample_bits = Info.v_sample_bits; + ret[i].horz_y_period = Info.horz_y_period; + ret[i].horz_u_period = Info.horz_u_period; + ret[i].horz_v_period = Info.horz_v_period; + ret[i].vert_y_period = Info.vert_y_period; + ret[i].vert_u_period = Info.vert_u_period; + ret[i].vert_v_period = Info.vert_v_period; + memcpy(&(ret[i].component_order[0]), &(Info.comp_order[0]), 32); + ret[i].scanline_order = Info.scanline_order; + } + } else + _XEatData(dpy, rep.length << 2); + } + + UnlockDisplay (dpy); + SyncHandle (); + return ret; +} + + +/****************************************************************** + These are intended as a protocol interface to be used by direct + rendering libraries. They are not intended to be client viewable + functions. These will stay in place until we have a mechanism in + place similar to that of OpenGL with an libXvMCcore library. +*******************************************************************/ + +/* + _xvmc_create_context - + + Pass in the context with the surface_type_id, width, height, + port and flags filled out. This function will fill out the + context_id and update the width, height and flags field. + The server may return implementation-specific information + back in the priv_data. The size of that information will + an array of priv_count CARD32s. This data is allocated by + this function. If returned, the caller is responsible for + freeing it! Generally, such information is only returned if + an XVMC_DIRECT context was specified. +*/ + + +Status _xvmc_create_context ( + Display *dpy, + XvMCContext *context, + int *priv_count, + CARD32 **priv_data +) +{ + XExtDisplayInfo *info = xvmc_find_display(dpy); + xvmcCreateContextReply rep; + xvmcCreateContextReq *req; + + *priv_count = 0; + *priv_data = NULL; + + XvMCCheckExtension (dpy, info, BadImplementation); + + LockDisplay (dpy); + XvMCGetReq (CreateContext, req); + context->context_id = XAllocID(dpy); + req->context_id = context->context_id; + req->port = context->port; + req->surface_type_id = context->surface_type_id; + req->width = context->width; + req->height = context->height; + req->flags = context->flags; + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { + UnlockDisplay (dpy); + SyncHandle (); + return BadImplementation; + } + context->width = rep.width_actual; + context->height = rep.height_actual; + context->flags = rep.flags_return; + + if(rep.length) { + *priv_data = Xmalloc(rep.length << 2); + if(*priv_data) { + _XRead(dpy, (char*)(*priv_data), rep.length << 2); + *priv_count = rep.length; + } else + _XEatData(dpy, rep.length << 2); + } + + UnlockDisplay (dpy); + SyncHandle (); + return Success; +} + +Status _xvmc_destroy_context ( + Display *dpy, + XvMCContext *context +) +{ + XExtDisplayInfo *info = xvmc_find_display(dpy); + xvmcDestroyContextReq *req; + + XvMCCheckExtension (dpy, info, BadImplementation); + + LockDisplay (dpy); + XvMCGetReq (DestroyContext, req); + req->context_id = context->context_id; + UnlockDisplay (dpy); + SyncHandle (); + return Success; +} + + +/* + _xvmc_create_surface - + + Pass the context and this function will fill out all the + information in the surface. + The server may return implementation-specific information + back in the priv_data. The size of that information will + an array of priv_count CARD32s. This data is allocated by + this function. If returned, the caller is responsible for + freeing it! Generally, such information is returned only if + the context was a direct context. + +*/ + +Status _xvmc_create_surface ( + Display *dpy, + XvMCContext *context, + XvMCSurface *surface, + int *priv_count, + CARD32 **priv_data +) +{ + XExtDisplayInfo *info = xvmc_find_display(dpy); + xvmcCreateSurfaceReply rep; + xvmcCreateSurfaceReq *req; + + *priv_count = 0; + *priv_data = NULL; + + XvMCCheckExtension (dpy, info, BadImplementation); + + LockDisplay (dpy); + XvMCGetReq (CreateSurface, req); + + surface->surface_id = XAllocID(dpy); + surface->context_id = context->context_id; + surface->surface_type_id = context->surface_type_id; + surface->width = context->width; + surface->height = context->height; + + req->surface_id = surface->surface_id; + req->context_id = surface->context_id; + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { + UnlockDisplay (dpy); + SyncHandle (); + return BadImplementation; + } + + if(rep.length) { + *priv_data = Xmalloc(rep.length << 2); + if(*priv_data) { + _XRead(dpy, (char*)(*priv_data), rep.length << 2); + *priv_count = rep.length; + } else + _XEatData(dpy, rep.length << 2); + } + + UnlockDisplay (dpy); + SyncHandle (); + return Success; +} + +Status _xvmc_destroy_surface ( + Display *dpy, + XvMCSurface *surface +) +{ + XExtDisplayInfo *info = xvmc_find_display(dpy); + xvmcDestroySurfaceReq *req; + + XvMCCheckExtension (dpy, info, BadImplementation); + + LockDisplay (dpy); + XvMCGetReq (DestroySurface, req); + req->surface_id = surface->surface_id; + UnlockDisplay (dpy); + SyncHandle (); + return Success; +} + +/* + _xvmc_create_subpicture - + + Pass the subpicture with the width, height and xvimage_id filled + out and this function will fill out everything else in the + subpicture as well as adjust the width and height if needed. + The server may return implementation-specific information + back in the priv_data. The size of that information will + an array of priv_count CARD32s. This data is allocated by + this function. If returned, the caller is responsible for + freeing it! Generally, such information is returned only if + the context was a direct context. + +*/ + +Status _xvmc_create_subpicture ( + Display *dpy, + XvMCContext *context, + XvMCSubpicture *subpicture, + int *priv_count, + CARD32 **priv_data +) +{ + XExtDisplayInfo *info = xvmc_find_display(dpy); + xvmcCreateSubpictureReply rep; + xvmcCreateSubpictureReq *req; + + *priv_count = 0; + *priv_data = NULL; + + XvMCCheckExtension (dpy, info, BadImplementation); + + LockDisplay (dpy); + XvMCGetReq (CreateSubpicture, req); + + subpicture->subpicture_id = XAllocID(dpy); + subpicture->context_id = context->context_id; + + req->subpicture_id = subpicture->subpicture_id; + req->context_id = subpicture->context_id; + req->xvimage_id = subpicture->xvimage_id; + req->width = subpicture->width; + req->height = subpicture->height; + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { + UnlockDisplay (dpy); + SyncHandle (); + return BadImplementation; + } + + subpicture->width = rep.width_actual; + subpicture->height = rep.height_actual; + subpicture->num_palette_entries = rep.num_palette_entries; + subpicture->entry_bytes = rep.entry_bytes; + subpicture->component_order[0] = rep.component_order[0]; + subpicture->component_order[1] = rep.component_order[1]; + subpicture->component_order[2] = rep.component_order[2]; + subpicture->component_order[3] = rep.component_order[3]; + + if(rep.length) { + *priv_data = Xmalloc(rep.length << 2); + if(*priv_data) { + _XRead(dpy, (char*)(*priv_data), rep.length << 2); + *priv_count = rep.length; + } else + _XEatData(dpy, rep.length << 2); + } + + UnlockDisplay (dpy); + SyncHandle (); + return Success; +} + +Status _xvmc_destroy_subpicture( + Display *dpy, + XvMCSubpicture *subpicture +) +{ + XExtDisplayInfo *info = xvmc_find_display(dpy); + xvmcDestroySubpictureReq *req; + + XvMCCheckExtension (dpy, info, BadImplementation); + + LockDisplay (dpy); + XvMCGetReq (DestroySubpicture, req); + req->subpicture_id = subpicture->subpicture_id; + UnlockDisplay (dpy); + SyncHandle (); + return Success; +} + Index: xc/lib/XvMC/XvMClibint.h diff -u /dev/null xc/lib/XvMC/XvMClibint.h:1.3 --- /dev/null Mon Jun 4 12:38:46 2001 +++ xc/lib/XvMC/XvMClibint.h Sun Apr 1 10:00:02 2001 @@ -0,0 +1,40 @@ +/* $XFree86: xc/lib/XvMC/XvMClibint.h,v 1.3 2001/04/01 14:00:02 tsi Exp $ */ + +#ifndef _XVMCLIBINT_H +#define _XVMCLIBINT_H +#define NEED_REPLIES + +#include "Xlibint.h" +#include "Xvproto.h" +#include "XvMCproto.h" +#include "XvMClib.h" + +#define XvMCCheckExtension(dpy, i, val) \ + XextCheckExtension(dpy, i, xvmc_extension_name, val) + + +#if defined(__STDC__) && !defined(UNIXCPP) +#define XvMCGetReq(name, req) \ + WORD64ALIGN\ + if ((dpy->bufptr + sizeof(xvmc##name##Req)) > dpy->bufmax)\ + _XFlush(dpy);\ + req = (xvmc##name##Req *)(dpy->last_req = dpy->bufptr);\ + req->reqType = info->codes->major_opcode;\ + req->xvmcReqType = xvmc_##name; \ + req->length = sizeof(xvmc##name##Req)>>2;\ + dpy->bufptr += sizeof(xvmc##name##Req);\ + dpy->request++ +#else +#define XvMCGetReq(name, req) \ + WORD64ALIGN\ + if ((dpy->bufptr + sizeof(xvmc/**/name/**/Req)) > dpy->bufmax)\ + _XFlush(dpy);\ + req = (xvmc/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\ + req->reqType = info->codes->major_opcode;\ + req->xvmcReqType = xvmc_/**/name;\ + req->length = sizeof(xvmc/**/name/**/Req)>>2;\ + dpy->bufptr += sizeof(xvmc/**/name/**/Req);\ + dpy->request++ +#endif + +#endif /* XVMCLIBINT_H */ Index: xc/lib/Xxf86dga/XF86DGA2.c diff -u xc/lib/Xxf86dga/XF86DGA2.c:1.16 xc/lib/Xxf86dga/XF86DGA2.c:1.17 --- xc/lib/Xxf86dga/XF86DGA2.c:1.16 Thu Sep 28 20:53:57 2000 +++ xc/lib/Xxf86dga/XF86DGA2.c Fri Jan 12 19:04:18 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/Xxf86dga/XF86DGA2.c,v 1.16 2000/09/29 00:53:57 keithp Exp $ */ +/* $XFree86: xc/lib/Xxf86dga/XF86DGA2.c,v 1.17 2001/01/13 00:04:18 mvojkovi Exp $ */ /* Copyright (c) 1995 Jon Tombs @@ -864,6 +864,8 @@ ULONG action; HFILE hfd; #endif + + base += offset; pMap->screen = screen; pMap->physical = base; Index: xc/lib/Xxf86vm/XF86VMode.c diff -u xc/lib/Xxf86vm/XF86VMode.c:3.29 xc/lib/Xxf86vm/XF86VMode.c:3.31 --- xc/lib/Xxf86vm/XF86VMode.c:3.29 Tue Aug 22 12:14:47 2000 +++ xc/lib/Xxf86vm/XF86VMode.c Mon May 7 16:11:13 2001 @@ -1,5 +1,5 @@ /* $XConsortium: XF86VMode.c /main/2 1995/11/14 18:17:58 kaleb $ */ -/* $XFree86: xc/lib/Xxf86vm/XF86VMode.c,v 3.29 2000/08/22 16:14:47 alanh Exp $ */ +/* $XFree86: xc/lib/Xxf86vm/XF86VMode.c,v 3.31 2001/05/07 20:11:13 mvojkovi Exp $ */ /* Copyright (c) 1995 Kaleb S. KEITHLEY @@ -1104,6 +1104,105 @@ dotclocks[i] = dotclk; } *clocksPtr = dotclocks; + UnlockDisplay(dpy); + SyncHandle(); + return True; +} + +Bool +XF86VidModeSetGammaRamp ( + Display *dpy, + int screen, + int size, + unsigned short *red, + unsigned short *green, + unsigned short *blue +) +{ + int length = (size + 1) & ~1; + XExtDisplayInfo *info = find_display (dpy); + xXF86VidModeSetGammaRampReq *req; + + XF86VidModeCheckExtension (dpy, info, False); + LockDisplay(dpy); + GetReq(XF86VidModeSetGammaRamp, req); + req->reqType = info->codes->major_opcode; + req->xf86vidmodeReqType = X_XF86VidModeSetGammaRamp; + req->screen = screen; + req->length += (length >> 1) * 3; + req->size = size; + _XSend(dpy, (char*)red, size * 2); + _XSend(dpy, (char*)green, size * 2); + _XSend(dpy, (char*)blue, size * 2); + UnlockDisplay(dpy); + SyncHandle(); + return True; +} + + +Bool +XF86VidModeGetGammaRamp ( + Display *dpy, + int screen, + int size, + unsigned short *red, + unsigned short *green, + unsigned short *blue +) +{ + XExtDisplayInfo *info = find_display (dpy); + xXF86VidModeGetGammaRampReq *req; + xXF86VidModeGetGammaRampReply rep; + + XF86VidModeCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(XF86VidModeGetGammaRamp, req); + req->reqType = info->codes->major_opcode; + req->xf86vidmodeReqType = X_XF86VidModeGetGammaRamp; + req->screen = screen; + req->size = size; + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { + UnlockDisplay (dpy); + SyncHandle (); + return False; + } + if(rep.size) { + _XRead(dpy, (char*)red, rep.size << 1); + _XRead(dpy, (char*)green, rep.size << 1); + _XRead(dpy, (char*)blue, rep.size << 1); + } + + UnlockDisplay(dpy); + SyncHandle(); + return True; +} + +Bool XF86VidModeGetGammaRampSize( + Display *dpy, + int screen, + int *size +) +{ + XExtDisplayInfo *info = find_display (dpy); + xXF86VidModeGetGammaRampSizeReq *req; + xXF86VidModeGetGammaRampSizeReply rep; + + *size = 0; + + XF86VidModeCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(XF86VidModeGetGammaRampSize, req); + req->reqType = info->codes->major_opcode; + req->xf86vidmodeReqType = X_XF86VidModeGetGammaRampSize; + req->screen = screen; + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return False; + } + *size = rep.size; UnlockDisplay(dpy); SyncHandle(); return True; Index: xc/lib/dps/Imakefile diff -u xc/lib/dps/Imakefile:1.12 xc/lib/dps/Imakefile:1.13 --- xc/lib/dps/Imakefile:1.12 Tue May 23 15:32:52 2000 +++ xc/lib/dps/Imakefile Sat Apr 7 15:41:50 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/dps/Imakefile,v 1.12 2000/05/23 19:32:52 dawes Exp $ +XCOMM $XFree86: xc/lib/dps/Imakefile,v 1.13 2001/04/07 19:41:50 alanh Exp $ #define DoNormalLib NormalLibDps #define DoSharedLib SharedLibDps @@ -231,7 +231,7 @@ HEADERS = psops.h dpsops.h -depend :: $(HEADERS) +includes :: $(HEADERS) depend :: $(DPSOPSCFILES) $(PSOPSCFILES) #ifndef OS2Architecture Index: xc/lib/dps/csconndi.c diff -u xc/lib/dps/csconndi.c:1.5 xc/lib/dps/csconndi.c:1.6 --- xc/lib/dps/csconndi.c:1.5 Wed Aug 23 17:06:19 2000 +++ xc/lib/dps/csconndi.c Mon Apr 16 16:33:08 2001 @@ -47,7 +47,7 @@ * * Author: Adobe Systems Incorporated and MIT X Consortium */ -/* $XFree86: xc/lib/dps/csconndi.c,v 1.5 2000/08/23 21:06:19 dawes Exp $ */ +/* $XFree86: xc/lib/dps/csconndi.c,v 1.6 2001/04/16 20:33:08 tsi Exp $ */ #if defined(sun) && !defined(SVR4) #define memmove(t,f,c) bcopy(f,t,c) @@ -482,7 +482,7 @@ #ifdef UNIXCONN -#ifndef __CYGWIN__ /* causes conflicts with cygwin headers */ +#ifndef X_NO_SYS_UN #include #endif Index: xc/lib/dps/dpsXpriv.c diff -u xc/lib/dps/dpsXpriv.c:1.3 xc/lib/dps/dpsXpriv.c:1.4 --- xc/lib/dps/dpsXpriv.c:1.3 Thu May 18 19:46:13 2000 +++ xc/lib/dps/dpsXpriv.c Sun Apr 1 10:00:03 2001 @@ -35,11 +35,12 @@ * * Author: Adobe Systems Incorporated */ -/* $XFree86: xc/lib/dps/dpsXpriv.c,v 1.3 2000/05/18 23:46:13 dawes Exp $ */ +/* $XFree86: xc/lib/dps/dpsXpriv.c,v 1.4 2001/04/01 14:00:03 tsi Exp $ */ #include #include #include +#include #ifdef GC #undef GC Index: xc/lib/dps/dpsabbrev.c diff -u xc/lib/dps/dpsabbrev.c:1.2 xc/lib/dps/dpsabbrev.c:1.3 --- xc/lib/dps/dpsabbrev.c:1.2 Thu May 18 19:46:13 2000 +++ xc/lib/dps/dpsabbrev.c Sun Apr 1 10:00:03 2001 @@ -35,7 +35,9 @@ * * Author: Adobe Systems Incorporated */ +/* $XFree86: xc/lib/dps/dpsabbrev.c,v 1.3 2001/04/01 14:00:03 tsi Exp $ */ +#include #include "publictypes.h" #include "DPS/dpsclient.h" #include "dpsprivate.h" Index: xc/lib/font/Imakefile diff -u xc/lib/font/Imakefile:3.30 xc/lib/font/Imakefile:3.32 --- xc/lib/font/Imakefile:3.30 Tue Sep 19 08:46:06 2000 +++ xc/lib/font/Imakefile Wed Jan 17 14:43:16 2001 @@ -1,5 +1,10 @@ -XCOMM $TOG: Imakefile /main/14 1998/06/16 15:23:15 msr $ -XCOMM $XFree86: xc/lib/font/Imakefile,v 3.30 2000/09/19 12:46:06 eich Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:24 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/font/Imakefile,v 3.32 2001/01/17 19:43:16 dawes Exp $ + #include #define IHaveSubdirs @@ -129,12 +134,12 @@ #endif /* SharedLibFont */ #if DebugLibFont -DebuggedDepLibraryTarget(Xfont,$(SUBDIRS) $(DONES),$(DEBUG_OBJS)) +DebuggedDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(DEBUG_OBJS)) InstallLibrary($(LIBNAME)_d,$(USRLIBDIR)) #endif /* DebugLibFont */ #if ProfileLibFont -ProfiledDepLibraryTarget(Xfont,$(SUBDIRS) $(DONES),$(PROFILE_OBJS)) +ProfiledDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(PROFILE_OBJS)) InstallLibrary($(LIBNAME)_p,$(USRLIBDIR)) #endif /* ProfileLibFont */ Index: xc/lib/font/FreeType/ftfuncs.c diff -u xc/lib/font/FreeType/ftfuncs.c:1.16.2.1 xc/lib/font/FreeType/ftfuncs.c:1.18 --- xc/lib/font/FreeType/ftfuncs.c:1.16.2.1 Wed Feb 28 15:15:43 2001 +++ xc/lib/font/FreeType/ftfuncs.c Wed May 16 04:32:33 2001 @@ -21,7 +21,7 @@ THE SOFTWARE. */ -/* $XFree86: xc/lib/font/FreeType/ftfuncs.c,v 1.16.2.1 2001/02/28 20:15:43 dawes Exp $ */ +/* $XFree86: xc/lib/font/FreeType/ftfuncs.c,v 1.18 2001/05/16 08:32:33 alanh Exp $ */ #ifndef FONT_MODULE #include @@ -739,7 +739,7 @@ int rawAverageWidth) { int i, j, maxprops; - char *sp, *ep, val[256]; + char *sp, *ep, val[MAXFONTNAMELEN]; TT_Instance_Metrics imetrics; int upm; /* units per em */ TTFFace *face; Index: xc/lib/font/FreeType/module/ftmodule.c diff -u xc/lib/font/FreeType/module/ftmodule.c:1.8.2.1 xc/lib/font/FreeType/module/ftmodule.c:1.9 --- xc/lib/font/FreeType/module/ftmodule.c:1.8.2.1 Wed Feb 28 15:15:44 2001 +++ xc/lib/font/FreeType/module/ftmodule.c Tue Feb 13 16:15:15 2001 @@ -23,7 +23,7 @@ * dealings in this Software without prior written authorization from the * XFree86 Project. */ -/* $XFree86: xc/lib/font/FreeType/module/ftmodule.c,v 1.8.2.1 2001/02/28 20:15:44 dawes Exp $ */ +/* $XFree86: xc/lib/font/FreeType/module/ftmodule.c,v 1.9 2001/02/13 21:15:15 dawes Exp $ */ #include "misc.h" Index: xc/lib/font/Speedo/Imakefile diff -u xc/lib/font/Speedo/Imakefile:1.8 xc/lib/font/Speedo/Imakefile:1.10 --- xc/lib/font/Speedo/Imakefile:1.8 Tue Sep 19 08:46:07 2000 +++ xc/lib/font/Speedo/Imakefile Fri Jan 19 03:13:29 2001 @@ -1,5 +1,9 @@ -XCOMM $XConsortium: Imakefile,v 1.10 93/09/04 16:42:59 rws Exp $ -XCOMM $XFree86: xc/lib/font/Speedo/Imakefile,v 1.8 2000/09/19 12:46:07 eich Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:24 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/font/Speedo/Imakefile,v 1.10 2001/01/19 08:13:29 dawes Exp $ #if BuildServer && DoLoadableServer #define IHaveSubdirs Index: xc/lib/font/Speedo/adobe-iso.h diff -u xc/lib/font/Speedo/adobe-iso.h:1.1.1.1 xc/lib/font/Speedo/adobe-iso.h:1.1.1.2 --- xc/lib/font/Speedo/adobe-iso.h:1.1.1.1 Wed Apr 27 03:10:21 1994 +++ xc/lib/font/Speedo/adobe-iso.h Tue Jan 16 17:25:43 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: adobe-iso.h,v 1.2 91/05/11 09:39:04 rws Exp $ */ +/* $Xorg: adobe-iso.h,v 1.3 2000/08/17 19:46:24 cpqbld Exp $ */ /* * Latin 1 format from masterset format 11 (ps) Index: xc/lib/font/Speedo/bics-iso.h diff -u xc/lib/font/Speedo/bics-iso.h:1.5 xc/lib/font/Speedo/bics-iso.h:1.6 --- xc/lib/font/Speedo/bics-iso.h:1.5 Sat Jan 30 23:59:25 1999 +++ xc/lib/font/Speedo/bics-iso.h Wed Jan 17 14:43:17 2001 @@ -1,4 +1,4 @@ -/* $TOG: bics-iso.h /main/6 1998/02/09 10:49:34 kaleb $ */ +/* $Xorg: bics-iso.h,v 1.3 2000/08/17 19:46:24 cpqbld Exp $ */ /* Copyright 1993, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/bics-iso.h,v 1.5 1999/01/31 04:59:25 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/bics-iso.h,v 1.6 2001/01/17 19:43:17 dawes Exp $ */ int sp_bics_map[] = { 32, 0, Index: xc/lib/font/Speedo/do_char.c diff -u xc/lib/font/Speedo/do_char.c:1.2 xc/lib/font/Speedo/do_char.c:1.3 --- xc/lib/font/Speedo/do_char.c:1.2 Sun Feb 7 01:18:14 1999 +++ xc/lib/font/Speedo/do_char.c Wed Jan 17 14:43:17 2001 @@ -1,4 +1,4 @@ -/* $TOG: do_char.c /main/7 1998/05/07 14:44:22 kaleb $ */ +/* $Xorg: do_char.c,v 1.3 2000/08/17 19:46:24 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/do_char.c,v 1.2 1999/02/07 06:18:14 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/do_char.c,v 1.3 2001/01/17 19:43:17 dawes Exp $ */ /***************************** D O - C H A R . C ***************************** * * Index: xc/lib/font/Speedo/do_trns.c diff -u xc/lib/font/Speedo/do_trns.c:1.2 xc/lib/font/Speedo/do_trns.c:1.3 --- xc/lib/font/Speedo/do_trns.c:1.2 Sun Feb 7 01:18:15 1999 +++ xc/lib/font/Speedo/do_trns.c Wed Jan 17 14:43:17 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: do_trns.c,v 1.4 94/04/17 20:17:43 gildea Exp $ */ +/* $Xorg: do_trns.c,v 1.3 2000/08/17 19:46:25 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/do_trns.c,v 1.2 1999/02/07 06:18:15 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/do_trns.c,v 1.3 2001/01/17 19:43:17 dawes Exp $ */ /**************************** D O _ T R N S . C ****************************** * * Index: xc/lib/font/Speedo/htest.c diff -u xc/lib/font/Speedo/htest.c:1.1.1.1 xc/lib/font/Speedo/htest.c:1.1.1.2 --- xc/lib/font/Speedo/htest.c:1.1.1.1 Wed Apr 27 03:10:14 1994 +++ xc/lib/font/Speedo/htest.c Tue Jan 16 17:25:46 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: htest.c,v 1.2 91/05/11 09:48:58 rws Exp $ */ +/* $Xorg: htest.c,v 1.3 2000/08/17 19:46:25 cpqbld Exp $ */ /* Index: xc/lib/font/Speedo/iface.c diff -u xc/lib/font/Speedo/iface.c:1.2 xc/lib/font/Speedo/iface.c:1.3 --- xc/lib/font/Speedo/iface.c:1.2 Sat Jul 25 02:56:53 1998 +++ xc/lib/font/Speedo/iface.c Wed Jan 17 14:43:17 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: iface.c,v 1.3 94/04/17 20:17:44 rws Exp $ */ +/* $Xorg: iface.c,v 1.3 2000/08/17 19:46:25 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/iface.c,v 1.2 1998/07/25 06:56:53 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/iface.c,v 1.3 2001/01/17 19:43:17 dawes Exp $ */ /***************************** I F A C E . C ********************************* * * Index: xc/lib/font/Speedo/keys.h diff -u xc/lib/font/Speedo/keys.h:1.1.1.1 xc/lib/font/Speedo/keys.h:1.1.1.2 --- xc/lib/font/Speedo/keys.h:1.1.1.1 Wed Apr 27 03:10:15 1994 +++ xc/lib/font/Speedo/keys.h Tue Jan 16 17:25:47 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: keys.h,v 1.3 93/10/28 15:27:11 gildea Exp $ */ +/* $Xorg: keys.h,v 1.3 2000/08/17 19:46:25 cpqbld Exp $ */ /* Index: xc/lib/font/Speedo/nsample.c diff -u xc/lib/font/Speedo/nsample.c:1.1.1.1 xc/lib/font/Speedo/nsample.c:1.1.1.2 --- xc/lib/font/Speedo/nsample.c:1.1.1.1 Wed Apr 27 03:10:15 1994 +++ xc/lib/font/Speedo/nsample.c Tue Jan 16 17:25:48 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: nsample.c,v 1.3 93/10/28 15:27:12 gildea Exp $ */ +/* $Xorg: nsample.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ /* Index: xc/lib/font/Speedo/out_bl2d.c diff -u xc/lib/font/Speedo/out_bl2d.c:1.3 xc/lib/font/Speedo/out_bl2d.c:1.4 --- xc/lib/font/Speedo/out_bl2d.c:1.3 Sun Feb 7 06:47:14 1999 +++ xc/lib/font/Speedo/out_bl2d.c Wed Jan 17 14:43:17 2001 @@ -1,4 +1,4 @@ -/* $TOG: out_bl2d.c /main/7 1998/05/07 14:43:36 kaleb $ */ +/* $Xorg: out_bl2d.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/out_bl2d.c,v 1.3 1999/02/07 11:47:14 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/out_bl2d.c,v 1.4 2001/01/17 19:43:17 dawes Exp $ */ /*************************** O U T _ B L 2 D . C ***************************** * * Index: xc/lib/font/Speedo/out_blk.c diff -u xc/lib/font/Speedo/out_blk.c:1.2 xc/lib/font/Speedo/out_blk.c:1.3 --- xc/lib/font/Speedo/out_blk.c:1.2 Sun Feb 7 01:18:16 1999 +++ xc/lib/font/Speedo/out_blk.c Wed Jan 17 14:43:17 2001 @@ -1,4 +1,4 @@ -/* $TOG: out_blk.c /main/6 1998/05/07 14:42:10 kaleb $ */ +/* $Xorg: out_blk.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/out_blk.c,v 1.2 1999/02/07 06:18:16 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/out_blk.c,v 1.3 2001/01/17 19:43:17 dawes Exp $ */ /*************************** O U T _ B L K . C ********************************* Index: xc/lib/font/Speedo/out_outl.c diff -u xc/lib/font/Speedo/out_outl.c:1.1.1.1 xc/lib/font/Speedo/out_outl.c:1.1.1.2 --- xc/lib/font/Speedo/out_outl.c:1.1.1.1 Wed Apr 27 03:10:17 1994 +++ xc/lib/font/Speedo/out_outl.c Tue Jan 16 17:25:49 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: out_outl.c,v 1.2 91/05/11 09:52:48 rws Exp $ */ +/* $Xorg: out_outl.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ /* Index: xc/lib/font/Speedo/out_scrn.c diff -u xc/lib/font/Speedo/out_scrn.c:1.4 xc/lib/font/Speedo/out_scrn.c:1.5 --- xc/lib/font/Speedo/out_scrn.c:1.4 Sun Dec 26 19:39:25 1999 +++ xc/lib/font/Speedo/out_scrn.c Wed Jan 17 14:43:17 2001 @@ -1,4 +1,4 @@ -/* $TOG: out_scrn.c /main/7 1998/05/07 14:40:50 kaleb $ */ +/* $Xorg: out_scrn.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/out_scrn.c,v 1.4 1999/12/27 00:39:25 robin Exp $ */ +/* $XFree86: xc/lib/font/Speedo/out_scrn.c,v 1.5 2001/01/17 19:43:17 dawes Exp $ */ /*************************** O U T _ S C R N . C ***************************** Index: xc/lib/font/Speedo/out_util.c diff -u xc/lib/font/Speedo/out_util.c:1.2 xc/lib/font/Speedo/out_util.c:1.3 --- xc/lib/font/Speedo/out_util.c:1.2 Sun Feb 7 01:18:17 1999 +++ xc/lib/font/Speedo/out_util.c Wed Jan 17 14:43:17 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: out_util.c,v 1.2 91/05/11 09:53:35 rws Exp $ */ +/* $Xorg: out_util.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/out_util.c,v 1.2 1999/02/07 06:18:17 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/out_util.c,v 1.3 2001/01/17 19:43:17 dawes Exp $ */ #define DEBUG 0 Index: xc/lib/font/Speedo/reset.c diff -u xc/lib/font/Speedo/reset.c:1.2 xc/lib/font/Speedo/reset.c:1.3 --- xc/lib/font/Speedo/reset.c:1.2 Sun Feb 7 01:18:17 1999 +++ xc/lib/font/Speedo/reset.c Wed Jan 17 14:43:17 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: reset.c,v 1.2 91/05/11 09:53:59 rws Exp $ */ +/* $Xorg: reset.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/reset.c,v 1.2 1999/02/07 06:18:17 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/reset.c,v 1.3 2001/01/17 19:43:17 dawes Exp $ */ Index: xc/lib/font/Speedo/set_spcs.c diff -u xc/lib/font/Speedo/set_spcs.c:1.2 xc/lib/font/Speedo/set_spcs.c:1.3 --- xc/lib/font/Speedo/set_spcs.c:1.2 Sun Feb 7 01:18:18 1999 +++ xc/lib/font/Speedo/set_spcs.c Wed Jan 17 14:43:17 2001 @@ -1,4 +1,4 @@ -/* $TOG: set_spcs.c /main/8 1998/05/07 15:14:25 kaleb $ */ +/* $Xorg: set_spcs.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/set_spcs.c,v 1.2 1999/02/07 06:18:18 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/set_spcs.c,v 1.3 2001/01/17 19:43:17 dawes Exp $ */ /*************************** S E T _ S P C S . C ***************************** Index: xc/lib/font/Speedo/set_trns.c diff -u xc/lib/font/Speedo/set_trns.c:1.2 xc/lib/font/Speedo/set_trns.c:1.3 --- xc/lib/font/Speedo/set_trns.c:1.2 Sun Feb 7 01:18:18 1999 +++ xc/lib/font/Speedo/set_trns.c Wed Jan 17 14:43:18 2001 @@ -1,4 +1,4 @@ -/* $TOG: set_trns.c /main/8 1998/05/07 15:13:53 kaleb $ */ +/* $Xorg: set_trns.c,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/set_trns.c,v 1.2 1999/02/07 06:18:18 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/set_trns.c,v 1.3 2001/01/17 19:43:18 dawes Exp $ */ Index: xc/lib/font/Speedo/spdo_prv.h diff -u xc/lib/font/Speedo/spdo_prv.h:1.4 xc/lib/font/Speedo/spdo_prv.h:1.5 --- xc/lib/font/Speedo/spdo_prv.h:1.4 Sat Mar 13 22:21:17 1999 +++ xc/lib/font/Speedo/spdo_prv.h Wed Jan 17 14:43:18 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: spdo_prv.h,v 1.4 94/02/10 11:06:01 gildea Exp $ */ +/* $Xorg: spdo_prv.h,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/spdo_prv.h,v 1.4 1999/03/14 03:21:17 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/spdo_prv.h,v 1.5 2001/01/17 19:43:18 dawes Exp $ */ Index: xc/lib/font/Speedo/speedo.h diff -u xc/lib/font/Speedo/speedo.h:3.4 xc/lib/font/Speedo/speedo.h:3.5 --- xc/lib/font/Speedo/speedo.h:3.4 Sat Mar 13 22:21:17 1999 +++ xc/lib/font/Speedo/speedo.h Wed Jan 17 14:43:18 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: speedo.h,v 1.7 95/06/08 23:20:39 gildea Exp $ */ +/* $Xorg: speedo.h,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/speedo.h,v 3.4 1999/03/14 03:21:17 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/speedo.h,v 3.5 2001/01/17 19:43:18 dawes Exp $ */ #ifndef _SPEEDO_H_ #define _SPEEDO_H_ Index: xc/lib/font/Speedo/spencode.c diff -u xc/lib/font/Speedo/spencode.c:1.5 xc/lib/font/Speedo/spencode.c:1.6 --- xc/lib/font/Speedo/spencode.c:1.5 Sat Jan 30 23:59:26 1999 +++ xc/lib/font/Speedo/spencode.c Wed Jan 17 14:43:18 2001 @@ -1,4 +1,4 @@ -/* $TOG: spencode.c /main/7 1998/02/09 10:50:54 kaleb $ */ +/* $Xorg: spencode.c,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -43,7 +43,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/spencode.c,v 1.5 1999/01/31 04:59:26 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/spencode.c,v 1.6 2001/01/17 19:43:18 dawes Exp $ */ #include "spint.h" Index: xc/lib/font/Speedo/sperr.c diff -u xc/lib/font/Speedo/sperr.c:1.3 xc/lib/font/Speedo/sperr.c:1.4 --- xc/lib/font/Speedo/sperr.c:1.3 Wed Apr 5 14:13:24 2000 +++ xc/lib/font/Speedo/sperr.c Wed Jan 17 14:43:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: sperr.c /main/7 1998/02/09 10:50:58 kaleb $ */ +/* $Xorg: sperr.c,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -48,7 +48,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/sperr.c,v 1.3 2000/04/05 18:13:24 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/sperr.c,v 1.4 2001/01/17 19:43:20 dawes Exp $ */ #include "spint.h" Index: xc/lib/font/Speedo/spfile.c diff -u xc/lib/font/Speedo/spfile.c:1.11 xc/lib/font/Speedo/spfile.c:1.12 --- xc/lib/font/Speedo/spfile.c:1.11 Sun Apr 25 06:01:40 1999 +++ xc/lib/font/Speedo/spfile.c Wed Jan 17 14:43:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: spfile.c /main/14 1998/02/09 10:51:02 kaleb $ */ +/* $Xorg: spfile.c,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -45,7 +45,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/spfile.c,v 1.11 1999/04/25 10:01:40 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/spfile.c,v 1.12 2001/01/17 19:43:20 dawes Exp $ */ #include "fntfilst.h" #include "fontenc.h" Index: xc/lib/font/Speedo/spfont.c diff -u xc/lib/font/Speedo/spfont.c:3.9 xc/lib/font/Speedo/spfont.c:3.10 --- xc/lib/font/Speedo/spfont.c:3.9 Sun Jun 13 09:47:29 1999 +++ xc/lib/font/Speedo/spfont.c Wed Jan 17 14:43:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: spfont.c /main/26 1998/05/07 14:45:21 kaleb $ */ +/* $Xorg: spfont.c,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -21,7 +21,7 @@ * * Author: Dave Lemke, Network Computing Devices Inc */ -/* $XFree86: xc/lib/font/Speedo/spfont.c,v 3.9 1999/06/13 13:47:29 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/spfont.c,v 3.10 2001/01/17 19:43:20 dawes Exp $ */ /* Index: xc/lib/font/Speedo/spfuncs.c diff -u xc/lib/font/Speedo/spfuncs.c:1.5 xc/lib/font/Speedo/spfuncs.c:1.6 --- xc/lib/font/Speedo/spfuncs.c:1.5 Sun Mar 14 06:17:43 1999 +++ xc/lib/font/Speedo/spfuncs.c Wed Jan 17 14:43:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: spfuncs.c /main/15 1998/05/07 14:48:01 kaleb $ */ +/* $Xorg: spfuncs.c,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -45,7 +45,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/spfuncs.c,v 1.5 1999/03/14 11:17:43 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/spfuncs.c,v 1.6 2001/01/17 19:43:20 dawes Exp $ */ #ifndef FONTMODULE #include Index: xc/lib/font/Speedo/spglyph.c diff -u xc/lib/font/Speedo/spglyph.c:1.5 xc/lib/font/Speedo/spglyph.c:1.6 --- xc/lib/font/Speedo/spglyph.c:1.5 Sun Mar 14 06:17:43 1999 +++ xc/lib/font/Speedo/spglyph.c Wed Jan 17 14:43:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: spglyph.c /main/18 1998/02/09 10:51:16 kaleb $ */ +/* $Xorg: spglyph.c,v 1.3 2000/08/17 19:46:28 cpqbld Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -45,7 +45,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/spglyph.c,v 1.5 1999/03/14 11:17:43 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/spglyph.c,v 1.6 2001/01/17 19:43:20 dawes Exp $ */ #include /* for bit order #defines */ #include "spint.h" Index: xc/lib/font/Speedo/spinfo.c diff -u xc/lib/font/Speedo/spinfo.c:1.9 xc/lib/font/Speedo/spinfo.c:1.10 --- xc/lib/font/Speedo/spinfo.c:1.9 Fri Feb 25 13:28:00 2000 +++ xc/lib/font/Speedo/spinfo.c Wed Jan 17 14:43:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: spinfo.c /main/20 1998/05/07 14:46:42 kaleb $ */ +/* $Xorg: spinfo.c,v 1.3 2000/08/17 19:46:28 cpqbld Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -45,7 +45,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/spinfo.c,v 1.9 2000/02/25 18:28:00 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/spinfo.c,v 1.10 2001/01/17 19:43:20 dawes Exp $ */ #include "fntfilst.h" #include "fontutil.h" Index: xc/lib/font/Speedo/spint.h diff -u xc/lib/font/Speedo/spint.h:1.8 xc/lib/font/Speedo/spint.h:1.9 --- xc/lib/font/Speedo/spint.h:1.8 Sun Feb 7 01:18:21 1999 +++ xc/lib/font/Speedo/spint.h Wed Jan 17 14:43:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: spint.h /main/13 1998/02/09 10:51:26 kaleb $ */ +/* $Xorg: spint.h,v 1.3 2000/08/17 19:46:28 cpqbld Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -43,7 +43,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/spint.h,v 1.8 1999/02/07 06:18:21 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/spint.h,v 1.9 2001/01/17 19:43:20 dawes Exp $ */ #ifndef _SPINT_H_ #define _SPINT_H_ Index: xc/lib/font/Speedo/sptobdf.c diff -u xc/lib/font/Speedo/sptobdf.c:1.1.1.2 xc/lib/font/Speedo/sptobdf.c:1.1.1.3 --- xc/lib/font/Speedo/sptobdf.c:1.1.1.2 Sun Sep 27 03:54:29 1998 +++ xc/lib/font/Speedo/sptobdf.c Tue Jan 16 17:25:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: sptobdf.c /main/6 1998/02/09 10:51:30 kaleb $ */ +/* $Xorg: sptobdf.c,v 1.3 2000/08/17 19:46:28 cpqbld Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation Index: xc/lib/font/Speedo/useropt.h diff -u xc/lib/font/Speedo/useropt.h:1.1.1.2 xc/lib/font/Speedo/useropt.h:1.1.1.3 --- xc/lib/font/Speedo/useropt.h:1.1.1.2 Sun Sep 27 03:54:29 1998 +++ xc/lib/font/Speedo/useropt.h Tue Jan 16 17:25:59 2001 @@ -1,4 +1,4 @@ -/* $TOG: useropt.h /main/5 1998/02/09 10:51:35 kaleb $ */ +/* $Xorg: useropt.h,v 1.3 2000/08/17 19:46:28 cpqbld Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group Index: xc/lib/font/Type1/Imakefile diff -u xc/lib/font/Type1/Imakefile:1.9 xc/lib/font/Type1/Imakefile:1.10 --- xc/lib/font/Type1/Imakefile:1.9 Tue Sep 19 08:46:07 2000 +++ xc/lib/font/Type1/Imakefile Wed Jan 17 14:43:21 2001 @@ -1,5 +1,9 @@ -XCOMM $XConsortium: Imakefile,v 1.5 93/09/04 16:43:32 rws Exp $ -XCOMM $XFree86: xc/lib/font/Type1/Imakefile,v 1.9 2000/09/19 12:46:07 eich Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:28 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/font/Type1/Imakefile,v 1.10 2001/01/17 19:43:21 dawes Exp $ #if BuildServer && DoLoadableServer #define IHaveSubdirs Index: xc/lib/font/Type1/arith.c diff -u xc/lib/font/Type1/arith.c:1.4 xc/lib/font/Type1/arith.c:1.5 --- xc/lib/font/Type1/arith.c:1.4 Sun Aug 22 04:58:49 1999 +++ xc/lib/font/Type1/arith.c Wed Jan 17 14:43:21 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: arith.c,v 1.4 94/03/22 19:08:54 gildea Exp $ */ +/* $Xorg: arith.c,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/arith.c,v 1.4 1999/08/22 08:58:49 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/arith.c,v 1.5 2001/01/17 19:43:21 dawes Exp $ */ /* ARITH CWEB V0006 ******** */ /* Index: xc/lib/font/Type1/arith.h diff -u xc/lib/font/Type1/arith.h:1.4 xc/lib/font/Type1/arith.h:1.5 --- xc/lib/font/Type1/arith.h:1.4 Sat Aug 21 09:47:39 1999 +++ xc/lib/font/Type1/arith.h Wed Jan 17 14:43:22 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: arith.h,v 1.3 94/03/22 19:08:56 gildea Exp $ */ +/* $Xorg: arith.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/arith.h,v 1.4 1999/08/21 13:47:39 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/arith.h,v 1.5 2001/01/17 19:43:22 dawes Exp $ */ /*SHARED*/ Index: xc/lib/font/Type1/blues.h diff -u xc/lib/font/Type1/blues.h:1.3 xc/lib/font/Type1/blues.h:1.4 --- xc/lib/font/Type1/blues.h:1.3 Sun Aug 22 04:58:49 1999 +++ xc/lib/font/Type1/blues.h Wed Jan 17 14:43:22 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: blues.h,v 1.2 91/10/10 11:17:52 rws Exp $ */ +/* $Xorg: blues.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -28,7 +28,7 @@ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/blues.h,v 1.3 1999/08/22 08:58:49 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/blues.h,v 1.4 2001/01/17 19:43:22 dawes Exp $ */ extern psobj *GetType1CharString ( psfont *fontP, unsigned char code ); Index: xc/lib/font/Type1/cluts.h diff -u xc/lib/font/Type1/cluts.h:1.1.1.1 xc/lib/font/Type1/cluts.h:1.1.1.2 --- xc/lib/font/Type1/cluts.h:1.1.1.1 Wed Apr 27 03:09:59 1994 +++ xc/lib/font/Type1/cluts.h Tue Jan 16 17:26:02 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: cluts.h,v 1.2 91/10/10 11:17:54 rws Exp $ */ +/* $Xorg: cluts.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * Index: xc/lib/font/Type1/curves.c diff -u xc/lib/font/Type1/curves.c:1.5 xc/lib/font/Type1/curves.c:1.6 --- xc/lib/font/Type1/curves.c:1.5 Sat Sep 4 05:14:10 1999 +++ xc/lib/font/Type1/curves.c Wed Jan 17 14:43:22 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: curves.c,v 1.4 92/07/07 17:14:55 gildea Exp $ */ +/* $Xorg: curves.c,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 */ /* All Rights Reserved */ @@ -29,7 +29,7 @@ /* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT */ /* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS */ /* SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/curves.c,v 1.5 1999/09/04 09:14:10 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/curves.c,v 1.6 2001/01/17 19:43:22 dawes Exp $ */ /* :h1.CURVES Module - Stepping Beziers Index: xc/lib/font/Type1/curves.h diff -u xc/lib/font/Type1/curves.h:1.3 xc/lib/font/Type1/curves.h:1.4 --- xc/lib/font/Type1/curves.h:1.3 Sun Aug 22 04:58:50 1999 +++ xc/lib/font/Type1/curves.h Wed Jan 17 14:43:22 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: curves.h,v 1.2 91/10/10 11:17:59 rws Exp $ */ +/* $Xorg: curves.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/curves.h,v 1.3 1999/08/22 08:58:50 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/curves.h,v 1.4 2001/01/17 19:43:22 dawes Exp $ */ /*SHARED*/ Index: xc/lib/font/Type1/digit.h diff -u xc/lib/font/Type1/digit.h:1.1.1.1 xc/lib/font/Type1/digit.h:1.1.1.2 --- xc/lib/font/Type1/digit.h:1.1.1.1 Wed Apr 27 03:09:59 1994 +++ xc/lib/font/Type1/digit.h Tue Jan 16 17:26:03 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: digit.h,v 1.2 91/10/10 11:18:01 rws Exp $ */ +/* $Xorg: digit.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * Index: xc/lib/font/Type1/fontfcn.c diff -u xc/lib/font/Type1/fontfcn.c:1.8 xc/lib/font/Type1/fontfcn.c:1.10 --- xc/lib/font/Type1/fontfcn.c:1.8 Sat Aug 21 09:47:41 1999 +++ xc/lib/font/Type1/fontfcn.c Thu Apr 5 13:42:27 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: fontfcn.c,v 1.10 94/02/06 16:07:23 gildea Exp $ */ +/* $Xorg: fontfcn.c,v 1.4 2000/08/17 19:46:30 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -45,7 +45,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/fontfcn.c,v 1.8 1999/08/21 13:47:41 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/fontfcn.c,v 1.10 2001/04/05 17:42:27 dawes Exp $ */ #ifndef FONTMODULE #include @@ -61,6 +61,7 @@ #include "range.h" #include "Xdefs.h" #endif +#include "fntfilst.h" #include "fontfcn.h" extern struct segment *Type1Char ( char *env, XYspace S, Index: xc/lib/font/Type1/fontfcn.h diff -u xc/lib/font/Type1/fontfcn.h:1.4 xc/lib/font/Type1/fontfcn.h:1.5 --- xc/lib/font/Type1/fontfcn.h:1.4 Sun Aug 22 04:58:50 1999 +++ xc/lib/font/Type1/fontfcn.h Wed Jan 17 14:43:22 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: fontfcn.h,v 1.3 92/03/26 16:42:23 eswu Exp $ */ +/* $Xorg: fontfcn.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -44,7 +44,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/fontfcn.h,v 1.4 1999/08/22 08:58:50 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/fontfcn.h,v 1.5 2001/01/17 19:43:22 dawes Exp $ */ #ifdef BUILDCID Index: xc/lib/font/Type1/fonts.h diff -u xc/lib/font/Type1/fonts.h:1.1.1.1 xc/lib/font/Type1/fonts.h:1.1.1.2 --- xc/lib/font/Type1/fonts.h:1.1.1.1 Wed Apr 27 03:09:59 1994 +++ xc/lib/font/Type1/fonts.h Tue Jan 16 17:26:05 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: fonts.h,v 1.3 94/04/17 20:17:19 rws Exp $ */ +/* $Xorg: fonts.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * Index: xc/lib/font/Type1/hdigit.h diff -u xc/lib/font/Type1/hdigit.h:1.1.1.1 xc/lib/font/Type1/hdigit.h:1.1.1.2 --- xc/lib/font/Type1/hdigit.h:1.1.1.1 Wed Apr 27 03:10:00 1994 +++ xc/lib/font/Type1/hdigit.h Tue Jan 16 17:26:05 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: hdigit.h,v 1.2 91/10/10 11:18:11 rws Exp $ */ +/* $Xorg: hdigit.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * Index: xc/lib/font/Type1/hints.c diff -u xc/lib/font/Type1/hints.c:1.4 xc/lib/font/Type1/hints.c:1.5 --- xc/lib/font/Type1/hints.c:1.4 Sun Aug 22 04:58:51 1999 +++ xc/lib/font/Type1/hints.c Wed Jan 17 14:43:22 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: hints.c,v 1.4 91/10/10 11:18:13 rws Exp $ */ +/* $Xorg: hints.c,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/hints.c,v 1.4 1999/08/22 08:58:51 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/hints.c,v 1.5 2001/01/17 19:43:22 dawes Exp $ */ /* HINTS CWEB V0006 ******** */ /* Index: xc/lib/font/Type1/hints.h diff -u xc/lib/font/Type1/hints.h:1.3 xc/lib/font/Type1/hints.h:1.4 --- xc/lib/font/Type1/hints.h:1.3 Sun Aug 22 04:58:51 1999 +++ xc/lib/font/Type1/hints.h Wed Jan 17 14:43:22 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: hints.h,v 1.2 91/10/10 11:18:19 rws Exp $ */ +/* $Xorg: hints.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/hints.h,v 1.3 1999/08/22 08:58:51 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/hints.h,v 1.4 2001/01/17 19:43:22 dawes Exp $ */ /*SHARED*/ Index: xc/lib/font/Type1/lines.c diff -u xc/lib/font/Type1/lines.c:1.3 xc/lib/font/Type1/lines.c:1.4 --- xc/lib/font/Type1/lines.c:1.3 Sun Aug 22 04:58:51 1999 +++ xc/lib/font/Type1/lines.c Wed Jan 17 14:43:22 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lines.c,v 1.2 91/10/10 11:18:21 rws Exp $ */ +/* $Xorg: lines.c,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/lines.c,v 1.3 1999/08/22 08:58:51 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/lines.c,v 1.4 2001/01/17 19:43:22 dawes Exp $ */ /* LINES CWEB V0003 ******** */ /* Index: xc/lib/font/Type1/lines.h diff -u xc/lib/font/Type1/lines.h:1.3 xc/lib/font/Type1/lines.h:1.4 --- xc/lib/font/Type1/lines.h:1.3 Sun Aug 22 04:58:52 1999 +++ xc/lib/font/Type1/lines.h Wed Jan 17 14:43:22 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lines.h,v 1.2 91/10/10 11:18:23 rws Exp $ */ +/* $Xorg: lines.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/lines.h,v 1.3 1999/08/22 08:58:52 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/lines.h,v 1.4 2001/01/17 19:43:22 dawes Exp $ */ /*SHARED*/ Index: xc/lib/font/Type1/minimain.c diff -u xc/lib/font/Type1/minimain.c:1.1.1.2 xc/lib/font/Type1/minimain.c:1.1.1.3 --- xc/lib/font/Type1/minimain.c:1.1.1.2 Sun Sep 27 03:53:57 1998 +++ xc/lib/font/Type1/minimain.c Tue Jan 16 17:26:10 2001 @@ -1,4 +1,4 @@ -/* $TOG: minimain.c /main/5 1998/02/09 10:52:44 kaleb $ */ +/* $Xorg: minimain.c,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ /* Index: xc/lib/font/Type1/objects.c diff -u xc/lib/font/Type1/objects.c:1.8 xc/lib/font/Type1/objects.c:1.9 --- xc/lib/font/Type1/objects.c:1.8 Sat Sep 25 10:36:38 1999 +++ xc/lib/font/Type1/objects.c Wed Jan 17 14:43:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: objects.c /main/14 1998/06/16 13:50:14 barstow $ */ +/* $Xorg: objects.c,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/objects.c,v 1.8 1999/09/25 14:36:38 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/objects.c,v 1.9 2001/01/17 19:43:22 dawes Exp $ */ /* OBJECTS CWEB V0025 ******** */ /* :h1.OBJECTS Module - TYPE1IMAGER Objects Common Routines Index: xc/lib/font/Type1/objects.h diff -u xc/lib/font/Type1/objects.h:1.7 xc/lib/font/Type1/objects.h:1.8 --- xc/lib/font/Type1/objects.h:1.7 Sun Aug 22 01:35:42 1999 +++ xc/lib/font/Type1/objects.h Wed Jan 17 14:43:22 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: objects.h,v 1.8 94/03/22 19:08:58 gildea Exp $ */ +/* $Xorg: objects.h,v 1.3 2000/08/17 19:46:31 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -43,7 +43,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/objects.h,v 1.7 1999/08/22 05:35:42 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/objects.h,v 1.8 2001/01/17 19:43:22 dawes Exp $ */ /*SHARED*/ /*END SHARED*/ Index: xc/lib/font/Type1/paths.c diff -u xc/lib/font/Type1/paths.c:1.4 xc/lib/font/Type1/paths.c:1.5 --- xc/lib/font/Type1/paths.c:1.4 Sun Aug 22 04:58:52 1999 +++ xc/lib/font/Type1/paths.c Wed Jan 17 14:43:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: paths.c /main/6 1998/05/01 16:41:54 kaleb $ */ +/* $Xorg: paths.c,v 1.3 2000/08/17 19:46:31 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/paths.c,v 1.4 1999/08/22 08:58:52 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/paths.c,v 1.5 2001/01/17 19:43:22 dawes Exp $ */ /* PATHS CWEB V0021 ******** */ /* Index: xc/lib/font/Type1/paths.h diff -u xc/lib/font/Type1/paths.h:1.3 xc/lib/font/Type1/paths.h:1.4 --- xc/lib/font/Type1/paths.h:1.3 Sun Aug 22 04:58:53 1999 +++ xc/lib/font/Type1/paths.h Wed Jan 17 14:43:22 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: paths.h,v 1.2 91/10/10 11:18:50 rws Exp $ */ +/* $Xorg: paths.h,v 1.3 2000/08/17 19:46:31 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/paths.h,v 1.3 1999/08/22 08:58:53 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/paths.h,v 1.4 2001/01/17 19:43:22 dawes Exp $ */ /*SHARED*/ Index: xc/lib/font/Type1/pictures.h diff -u xc/lib/font/Type1/pictures.h:1.3 xc/lib/font/Type1/pictures.h:1.4 --- xc/lib/font/Type1/pictures.h:1.3 Sun Aug 22 04:58:53 1999 +++ xc/lib/font/Type1/pictures.h Wed Jan 17 14:43:23 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: pictures.h,v 1.2 91/10/10 11:18:53 rws Exp $ */ +/* $Xorg: pictures.h,v 1.3 2000/08/17 19:46:31 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -27,7 +27,7 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/pictures.h,v 1.3 1999/08/22 08:58:53 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/pictures.h,v 1.4 2001/01/17 19:43:23 dawes Exp $ */ /* STUB */ Index: xc/lib/font/Type1/regions.c diff -u xc/lib/font/Type1/regions.c:3.4 xc/lib/font/Type1/regions.c:3.5 --- xc/lib/font/Type1/regions.c:3.4 Fri Apr 28 14:19:20 2000 +++ xc/lib/font/Type1/regions.c Wed Jan 17 14:43:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: regions.c /main/8 1998/05/01 16:41:57 kaleb $ */ +/* $Xorg: regions.c,v 1.3 2000/08/17 19:46:31 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/regions.c,v 3.4 2000/04/28 18:19:20 eich Exp $ */ +/* $XFree86: xc/lib/font/Type1/regions.c,v 3.5 2001/01/17 19:43:23 dawes Exp $ */ /* REGIONS CWEB V0023 LOTS */ /* :h1 id=regions.REGIONS Module - Regions Operator Handler Index: xc/lib/font/Type1/regions.h diff -u xc/lib/font/Type1/regions.h:1.6 xc/lib/font/Type1/regions.h:1.7 --- xc/lib/font/Type1/regions.h:1.6 Wed Aug 9 19:40:15 2000 +++ xc/lib/font/Type1/regions.h Wed Jan 17 14:43:23 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: regions.h,v 1.6 94/04/02 15:49:51 rws Exp $ */ +/* $Xorg: regions.h,v 1.3 2000/08/17 19:46:32 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/regions.h,v 1.6 2000/08/09 23:40:15 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/regions.h,v 1.7 2001/01/17 19:43:23 dawes Exp $ */ /*SHARED*/ #define Interior(p,rule) t1_Interior(p,rule) Index: xc/lib/font/Type1/scanfont.c diff -u xc/lib/font/Type1/scanfont.c:1.13 xc/lib/font/Type1/scanfont.c:1.14 --- xc/lib/font/Type1/scanfont.c:1.13 Sat Aug 21 09:47:46 1999 +++ xc/lib/font/Type1/scanfont.c Wed Jan 17 14:43:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: scanfont.c /main/12 1998/05/08 08:45:46 kaleb $ */ +/* $Xorg: scanfont.c,v 1.3 2000/08/17 19:46:32 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -45,7 +45,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/scanfont.c,v 1.13 1999/08/21 13:47:46 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/scanfont.c,v 1.14 2001/01/17 19:43:23 dawes Exp $ */ #ifndef FONTMODULE #include Index: xc/lib/font/Type1/spaces.c diff -u xc/lib/font/Type1/spaces.c:3.7 xc/lib/font/Type1/spaces.c:3.8 --- xc/lib/font/Type1/spaces.c:3.7 Sat Sep 25 10:36:38 1999 +++ xc/lib/font/Type1/spaces.c Wed Jan 17 14:43:23 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: spaces.c,v 1.8 95/06/08 23:20:39 gildea Exp $ */ +/* $Xorg: spaces.c,v 1.4 2000/08/17 19:46:32 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/spaces.c,v 3.7 1999/09/25 14:36:38 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/spaces.c,v 3.8 2001/01/17 19:43:23 dawes Exp $ */ /* SPACES CWEB V0021 ******** */ /* :h1 id=spaces.SPACES Module - Handles Coordinate Spaces Index: xc/lib/font/Type1/spaces.h diff -u xc/lib/font/Type1/spaces.h:3.3 xc/lib/font/Type1/spaces.h:3.4 --- xc/lib/font/Type1/spaces.h:3.3 Sun Aug 22 04:58:53 1999 +++ xc/lib/font/Type1/spaces.h Wed Jan 17 14:43:23 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: spaces.h,v 1.4 94/02/06 16:27:06 gildea Exp $ */ +/* $Xorg: spaces.h,v 1.3 2000/08/17 19:46:32 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/spaces.h,v 3.3 1999/08/22 08:58:53 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/spaces.h,v 3.4 2001/01/17 19:43:23 dawes Exp $ */ /*SHARED*/ Index: xc/lib/font/Type1/strokes.h diff -u xc/lib/font/Type1/strokes.h:1.1.1.1 xc/lib/font/Type1/strokes.h:1.1.1.2 --- xc/lib/font/Type1/strokes.h:1.1.1.1 Wed Apr 27 03:10:01 1994 +++ xc/lib/font/Type1/strokes.h Tue Jan 16 17:26:16 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: strokes.h,v 1.2 91/10/10 11:19:25 rws Exp $ */ +/* $Xorg: strokes.h,v 1.3 2000/08/17 19:46:32 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * Index: xc/lib/font/Type1/t1funcs.c diff -u xc/lib/font/Type1/t1funcs.c:3.22 xc/lib/font/Type1/t1funcs.c:3.23 --- xc/lib/font/Type1/t1funcs.c:3.22 Tue Sep 26 11:57:00 2000 +++ xc/lib/font/Type1/t1funcs.c Wed Jan 17 14:43:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: t1funcs.c /main/25 1998/05/01 16:42:00 kaleb $ */ +/* $Xorg: t1funcs.c,v 1.4 2000/08/17 19:46:33 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -71,7 +71,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/t1funcs.c,v 3.22 2000/09/26 15:57:00 tsi Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1funcs.c,v 3.23 2001/01/17 19:43:23 dawes Exp $ */ /* Index: xc/lib/font/Type1/t1hdigit.h diff -u xc/lib/font/Type1/t1hdigit.h:1.1.1.1 xc/lib/font/Type1/t1hdigit.h:1.1.1.2 --- xc/lib/font/Type1/t1hdigit.h:1.1.1.1 Wed Apr 27 03:10:01 1994 +++ xc/lib/font/Type1/t1hdigit.h Tue Jan 16 17:26:17 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: t1hdigit.h,v 1.2 91/10/10 11:19:31 rws Exp $ */ +/* $Xorg: t1hdigit.h,v 1.3 2000/08/17 19:46:33 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * Index: xc/lib/font/Type1/t1imager.h diff -u xc/lib/font/Type1/t1imager.h:1.3 xc/lib/font/Type1/t1imager.h:1.4 --- xc/lib/font/Type1/t1imager.h:1.3 Sun Aug 22 04:58:53 1999 +++ xc/lib/font/Type1/t1imager.h Wed Jan 17 14:43:23 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: t1imager.h,v 1.5 92/03/20 14:36:05 keith Exp $ */ +/* $Xorg: t1imager.h,v 1.3 2000/08/17 19:46:33 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -27,7 +27,7 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/t1imager.h,v 1.3 1999/08/22 08:58:53 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1imager.h,v 1.4 2001/01/17 19:43:23 dawes Exp $ */ #include "objects.h" Index: xc/lib/font/Type1/t1info.c diff -u xc/lib/font/Type1/t1info.c:1.14 xc/lib/font/Type1/t1info.c:1.15 --- xc/lib/font/Type1/t1info.c:1.14 Fri Feb 25 13:28:00 2000 +++ xc/lib/font/Type1/t1info.c Wed Jan 17 14:43:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: t1info.c /main/22 1998/05/01 16:42:02 kaleb $ */ +/* $Xorg: t1info.c,v 1.3 2000/08/17 19:46:33 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -95,7 +95,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/t1info.c,v 1.14 2000/02/25 18:28:00 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1info.c,v 1.15 2001/01/17 19:43:23 dawes Exp $ */ #include "fntfilst.h" #include "fontutil.h" Index: xc/lib/font/Type1/t1intf.h diff -u xc/lib/font/Type1/t1intf.h:1.5 xc/lib/font/Type1/t1intf.h:1.6 --- xc/lib/font/Type1/t1intf.h:1.5 Sat Aug 21 09:47:49 1999 +++ xc/lib/font/Type1/t1intf.h Wed Jan 17 14:43:23 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: t1intf.h,v 1.2 91/10/10 11:19:39 rws Exp $ */ +/* $Xorg: t1intf.h,v 1.3 2000/08/17 19:46:33 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -44,7 +44,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/t1intf.h,v 1.5 1999/08/21 13:47:49 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1intf.h,v 1.6 2001/01/17 19:43:23 dawes Exp $ */ #ifdef BUILDCID #include "AFM.h" Index: xc/lib/font/Type1/t1io.c diff -u xc/lib/font/Type1/t1io.c:3.7 xc/lib/font/Type1/t1io.c:3.8 --- xc/lib/font/Type1/t1io.c:3.7 Sat Aug 21 09:47:49 1999 +++ xc/lib/font/Type1/t1io.c Wed Jan 17 14:43:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: t1io.c /main/12 1998/05/08 08:45:53 kaleb $ */ +/* $Xorg: t1io.c,v 1.3 2000/08/17 19:46:33 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -45,7 +45,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/t1io.c,v 3.7 1999/08/21 13:47:49 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1io.c,v 3.8 2001/01/17 19:43:23 dawes Exp $ */ /******************************************************************* * I/O package for Type 1 font reading ********************************************************************/ Index: xc/lib/font/Type1/t1malloc.c diff -u xc/lib/font/Type1/t1malloc.c:1.8 xc/lib/font/Type1/t1malloc.c:1.9 --- xc/lib/font/Type1/t1malloc.c:1.8 Sat Sep 25 10:36:39 1999 +++ xc/lib/font/Type1/t1malloc.c Wed Jan 17 14:43:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: t1malloc.c /main/8 1998/05/07 15:31:25 kaleb $ */ +/* $Xorg: t1malloc.c,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/t1malloc.c,v 1.8 1999/09/25 14:36:39 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1malloc.c,v 1.9 2001/01/17 19:43:24 dawes Exp $ */ /* MALLOC CWEB V0004 LOTS */ /* :h1.MALLOC - Fast Memory Allocation Index: xc/lib/font/Type1/t1snap.c diff -u xc/lib/font/Type1/t1snap.c:1.3 xc/lib/font/Type1/t1snap.c:1.4 --- xc/lib/font/Type1/t1snap.c:1.3 Sun Aug 22 04:58:54 1999 +++ xc/lib/font/Type1/t1snap.c Wed Jan 17 14:43:24 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: t1snap.c,v 1.3 91/10/10 11:19:47 rws Exp $ */ +/* $Xorg: t1snap.c,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -27,7 +27,7 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/t1snap.c,v 1.3 1999/08/22 08:58:54 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1snap.c,v 1.4 2001/01/17 19:43:24 dawes Exp $ */ #include "objects.h" Index: xc/lib/font/Type1/t1stdio.h diff -u xc/lib/font/Type1/t1stdio.h:1.8 xc/lib/font/Type1/t1stdio.h:1.9 --- xc/lib/font/Type1/t1stdio.h:1.8 Sat Aug 21 09:47:50 1999 +++ xc/lib/font/Type1/t1stdio.h Wed Jan 17 14:43:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: t1stdio.h /main/6 1998/05/08 08:45:57 kaleb $ */ +/* $Xorg: t1stdio.h,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -27,7 +27,7 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/t1stdio.h,v 1.8 1999/08/21 13:47:50 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1stdio.h,v 1.9 2001/01/17 19:43:24 dawes Exp $ */ /* T1IO FILE structure and related stuff */ #ifdef XFree86LOADER #undef FILE Index: xc/lib/font/Type1/t1stub.c diff -u xc/lib/font/Type1/t1stub.c:1.7 xc/lib/font/Type1/t1stub.c:1.8 --- xc/lib/font/Type1/t1stub.c:1.7 Sat Sep 25 10:36:40 1999 +++ xc/lib/font/Type1/t1stub.c Wed Jan 17 14:43:24 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: t1stub.c,v 1.3 92/03/20 15:58:40 eswu Exp $ */ +/* $Xorg: t1stub.c,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -27,7 +27,7 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/t1stub.c,v 1.7 1999/09/25 14:36:40 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1stub.c,v 1.8 2001/01/17 19:43:24 dawes Exp $ */ #ifdef FONTMODULE #include "Xdefs.h" /* Bool declaration */ Index: xc/lib/font/Type1/t1test.c diff -u xc/lib/font/Type1/t1test.c:1.1.1.2 xc/lib/font/Type1/t1test.c:1.1.1.3 --- xc/lib/font/Type1/t1test.c:1.1.1.2 Sat Dec 21 22:21:59 1996 +++ xc/lib/font/Type1/t1test.c Tue Jan 16 17:26:22 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: t1test.c /main/4 1996/09/28 16:47:53 rws $ */ +/* $Xorg: t1test.c,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * Index: xc/lib/font/Type1/token.c diff -u xc/lib/font/Type1/token.c:1.4 xc/lib/font/Type1/token.c:1.5 --- xc/lib/font/Type1/token.c:1.4 Sat Aug 21 09:47:51 1999 +++ xc/lib/font/Type1/token.c Wed Jan 17 14:43:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: token.c /main/5 1998/05/08 08:46:01 kaleb $ */ +/* $Xorg: token.c,v 1.4 2000/08/17 19:46:34 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -27,7 +27,7 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/token.c,v 1.4 1999/08/21 13:47:51 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/token.c,v 1.5 2001/01/17 19:43:24 dawes Exp $ */ /* Authors: Sig Nin & Carol Thompson IBM Almaden Research Laboratory */ #include "t1stdio.h" #include "util.h" @@ -106,7 +106,8 @@ if (exponent < 0) { power = 0.1; value = (exponent & 1 ? power : 1.0); - exponent = -((exponent + 1) >> 1); + exponent++; + exponent = -(exponent >> 1); /* portable C for -(exponent/2) */ } else { power = 10.0; Index: xc/lib/font/Type1/token.h diff -u xc/lib/font/Type1/token.h:1.3 xc/lib/font/Type1/token.h:1.4 --- xc/lib/font/Type1/token.h:1.3 Sun Aug 22 04:58:54 1999 +++ xc/lib/font/Type1/token.h Wed Jan 17 14:43:24 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: token.h,v 1.2 91/10/10 11:19:58 rws Exp $ */ +/* $Xorg: token.h,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -27,7 +27,7 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/token.h,v 1.3 1999/08/22 08:58:54 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/token.h,v 1.4 2001/01/17 19:43:24 dawes Exp $ */ #ifndef TOKEN_H #define TOKEN_H Index: xc/lib/font/Type1/tokst.h diff -u xc/lib/font/Type1/tokst.h:1.3 xc/lib/font/Type1/tokst.h:1.4 --- xc/lib/font/Type1/tokst.h:1.3 Sun Aug 22 04:58:54 1999 +++ xc/lib/font/Type1/tokst.h Wed Jan 17 14:43:24 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: tokst.h,v 1.2 91/10/10 11:20:00 rws Exp $ */ +/* $Xorg: tokst.h,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -27,7 +27,7 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/tokst.h,v 1.3 1999/08/22 08:58:54 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/tokst.h,v 1.4 2001/01/17 19:43:24 dawes Exp $ */ /* -------------------------------------- */ /* --- MACHINE GENERATED, DO NOT EDIT --- */ Index: xc/lib/font/Type1/trig.h diff -u xc/lib/font/Type1/trig.h:1.2 xc/lib/font/Type1/trig.h:1.3 --- xc/lib/font/Type1/trig.h:1.2 Sat Jul 25 02:57:00 1998 +++ xc/lib/font/Type1/trig.h Wed Jan 17 14:43:24 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: trig.h,v 1.2 91/10/10 11:20:04 rws Exp $ */ +/* $Xorg: trig.h,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -29,7 +29,7 @@ */ /*SHARED*/ -/* $XFree86: xc/lib/font/Type1/trig.h,v 1.2 1998/07/25 06:57:00 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/trig.h,v 1.3 2001/01/17 19:43:24 dawes Exp $ */ #undef DegreeCos #undef DegreeSin Index: xc/lib/font/Type1/type1.c diff -u xc/lib/font/Type1/type1.c:1.8 xc/lib/font/Type1/type1.c:1.9 --- xc/lib/font/Type1/type1.c:1.8 Sat Aug 21 09:47:52 1999 +++ xc/lib/font/Type1/type1.c Wed Jan 17 14:43:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: type1.c /main/9 1998/05/01 16:42:05 kaleb $ */ +/* $Xorg: type1.c,v 1.4 2000/08/17 19:46:34 cpqbld Exp $ */ /* Copyright International Business Machines, Corp. 1991 * All Rights Reserved * Copyright Lexmark International, Inc. 1991 @@ -45,7 +45,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/type1.c,v 1.8 1999/08/21 13:47:52 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/type1.c,v 1.9 2001/01/17 19:43:24 dawes Exp $ */ /*********************************************************************/ /* */ @@ -1620,7 +1620,8 @@ if (erode) cy -= 0.5; ey = cy + dY; - ey = CEIL(ey) - ey + FLOOR(ey); + ey = CEIL(ey) - ey; + ey = ey + FLOOR(cy + dY); if (erode) ey += 0.5; @@ -1670,7 +1671,8 @@ if (erode) cx -= 0.5; ex = cx + dX; - ex = CEIL(ex) - ex + FLOOR(ex); + ex = CEIL(ex) - ex; + ex = ex + FLOOR(cx + dX); if (erode) ex += 0.5; Index: xc/lib/font/Type1/util.c diff -u xc/lib/font/Type1/util.c:1.5 xc/lib/font/Type1/util.c:1.6 --- xc/lib/font/Type1/util.c:1.5 Sat Aug 21 09:47:53 1999 +++ xc/lib/font/Type1/util.c Wed Jan 17 14:43:24 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: util.c,v 1.7 94/01/27 15:21:15 gildea Exp $ */ +/* $Xorg: util.c,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -44,7 +44,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/util.c,v 1.5 1999/08/21 13:47:53 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/util.c,v 1.6 2001/01/17 19:43:24 dawes Exp $ */ /* Author: Katherine A. Hitchcock IBM Almaden Research Laboratory */ #ifndef FONTMODULE Index: xc/lib/font/Type1/util.h diff -u xc/lib/font/Type1/util.h:1.4 xc/lib/font/Type1/util.h:1.5 --- xc/lib/font/Type1/util.h:1.4 Sun Aug 22 04:58:55 1999 +++ xc/lib/font/Type1/util.h Wed Jan 17 14:43:24 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: util.h,v 1.3 92/03/26 16:42:29 eswu Exp $ */ +/* $Xorg: util.h,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -44,7 +44,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/util.h,v 1.4 1999/08/22 08:58:55 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/util.h,v 1.5 2001/01/17 19:43:24 dawes Exp $ */ #ifndef UTIL_H #define UTIL_H Index: xc/lib/font/X-TrueType/Imakefile.inc diff -u xc/lib/font/X-TrueType/Imakefile.inc:1.3 xc/lib/font/X-TrueType/Imakefile.inc:1.5 --- xc/lib/font/X-TrueType/Imakefile.inc:1.3 Mon Feb 14 14:20:24 2000 +++ xc/lib/font/X-TrueType/Imakefile.inc Tue Mar 6 13:54:43 2001 @@ -1,15 +1,15 @@ -XCOMM $XFree86: xc/lib/font/X-TrueType/Imakefile.inc,v 1.3 2000/02/14 19:20:24 dawes Exp $ +XCOMM $XFree86: xc/lib/font/X-TrueType/Imakefile.inc,v 1.5 2001/03/06 18:54:43 dawes Exp $ /* -*- Makefile -*- */ DEFAULT_CCONV_SUBDIR = ISO8859.1 #if XTrueTypeUseOptEncodings XTT_USE_OPT_ENC_DEFINES = -DOPT_ENCODINGS -CCONV_SUBDIRS = BIG5 GB2312 JISX0201 JISX0208 JISX0212 \ +CCONV_SUBDIRS = BIG5 BIG5HKSCS GB2312 GBK JISX0201 JISX0208 JISX0212 \ KSC5601 KSCJOHAB GEORGIAN \ - ISO8859.2 ISO8859.3 ISO8859.4 ISO8859.5 ISO8859.6 \ - ISO8859.7 ISO8859.8 ISO8859.9 ISO8859.10 ISO8859.11 \ - ISO8859.14 ISO8859.15 KOI8 VISCII TCVN \ - ARMSCII8 ARABIC MULEENCODING DOSENCODING + ISO8859.2 ISO8859.3 ISO8859.4 ISO8859.5 ISO8859.6 \ + ISO8859.7 ISO8859.8 ISO8859.9 ISO8859.10 ISO8859.11 \ + ISO8859.14 ISO8859.15 KOI8 VISCII TCVN \ + ARMSCII8 ARABIC MULEENCODING DOSENCODING #endif SUBDIRS = $(MODULE_SUBDIRS) $(DEFAULT_CCONV_SUBDIR) $(CCONV_SUBDIRS) Index: xc/lib/font/X-TrueType/BIG5HKSCS/Imakefile diff -u /dev/null xc/lib/font/X-TrueType/BIG5HKSCS/Imakefile:1.1 --- /dev/null Mon Jun 4 12:39:00 2001 +++ xc/lib/font/X-TrueType/BIG5HKSCS/Imakefile Tue Mar 6 13:54:43 2001 @@ -0,0 +1,4 @@ +XCOMM X-TrueType Server - TrueType rasterizer for X +XCOMM $XFree86: xc/lib/font/X-TrueType/BIG5HKSCS/Imakefile,v 1.1 2001/03/06 18:54:43 dawes Exp $ +/*#include "Imakefile.obj"*/ +#include Index: xc/lib/font/X-TrueType/BIG5HKSCS/Imakefile.inc diff -u /dev/null xc/lib/font/X-TrueType/BIG5HKSCS/Imakefile.inc:1.1 --- /dev/null Mon Jun 4 12:39:00 2001 +++ xc/lib/font/X-TrueType/BIG5HKSCS/Imakefile.inc Tue Mar 6 13:54:44 2001 @@ -0,0 +1,12 @@ +XCOMM $XFree86: xc/lib/font/X-TrueType/BIG5HKSCS/Imakefile.inc,v 1.1 2001/03/06 18:54:44 dawes Exp $ + +#define ModuleName BIG5HKSCS +MODULENAME = ModuleName +MODULESRCDIR = $(XTTSOURCEDIR)/$(MODULENAME) + +SRCS = main.c BIG5HKSCStoUCS2.c +OBJS = main.o BIG5HKSCStoUCS2.o + +LinkSourceFile(main.c,$(MODULESRCDIR)) +LinkSourceFile(BIG5HKSCStoUCS2.c,$(MODULESRCDIR)) + Index: xc/lib/font/X-TrueType/BIG5HKSCS/module/Imakefile diff -u /dev/null xc/lib/font/X-TrueType/BIG5HKSCS/module/Imakefile:1.1 --- /dev/null Mon Jun 4 12:39:00 2001 +++ xc/lib/font/X-TrueType/BIG5HKSCS/module/Imakefile Tue Mar 6 13:54:44 2001 @@ -0,0 +1,5 @@ +XCOMM X-TrueType Server - TrueType rasterizer for X +XCOMM $XFree86: xc/lib/font/X-TrueType/BIG5HKSCS/module/Imakefile,v 1.1 2001/03/06 18:54:44 dawes Exp $ +#define IHaveModules +#include "../Imakefile.inc" +#include Index: xc/lib/font/X-TrueType/GBK/Imakefile diff -u /dev/null xc/lib/font/X-TrueType/GBK/Imakefile:1.1 --- /dev/null Mon Jun 4 12:39:00 2001 +++ xc/lib/font/X-TrueType/GBK/Imakefile Tue Mar 6 13:03:16 2001 @@ -0,0 +1,4 @@ +XCOMM X-TrueType Server - TrueType rasterizer for X +XCOMM $XFree86: xc/lib/font/X-TrueType/GBK/Imakefile,v 1.1 2001/03/06 18:03:16 dawes Exp $ +/*#include "Imakefile.inc"*/ +#include Index: xc/lib/font/X-TrueType/GBK/Imakefile.inc diff -u /dev/null xc/lib/font/X-TrueType/GBK/Imakefile.inc:1.1 --- /dev/null Mon Jun 4 12:39:00 2001 +++ xc/lib/font/X-TrueType/GBK/Imakefile.inc Tue Mar 6 13:03:16 2001 @@ -0,0 +1,11 @@ +XCOMM $XFree86: xc/lib/font/X-TrueType/GBK/Imakefile.inc,v 1.1 2001/03/06 18:03:16 dawes Exp $ + +#define ModuleName GBK +MODULENAME = ModuleName +MODULESRCDIR = $(XTTSOURCEDIR)/$(MODULENAME) + +SRCS = main.c GBKtoUCS2.c +OBJS = main.o GBKtoUCS2.o + +LinkSourceFile(main.c,$(MODULESRCDIR)) +LinkSourceFile(GBKtoUCS2.c,$(MODULESRCDIR)) Index: xc/lib/font/X-TrueType/GBK/module/Imakefile diff -u /dev/null xc/lib/font/X-TrueType/GBK/module/Imakefile:1.1 --- /dev/null Mon Jun 4 12:39:00 2001 +++ xc/lib/font/X-TrueType/GBK/module/Imakefile Tue Mar 6 13:24:19 2001 @@ -0,0 +1,5 @@ +XCOMM X-TrueType Server - TrueType rasterizer for X +XCOMM $XFree86: xc/lib/font/X-TrueType/GBK/module/Imakefile,v 1.1 2001/03/06 18:24:19 dawes Exp $ +#define IHaveModules +#include "../Imakefile.inc" +#include Index: xc/lib/font/bitmap/Imakefile diff -u xc/lib/font/bitmap/Imakefile:1.9 xc/lib/font/bitmap/Imakefile:1.11 --- xc/lib/font/bitmap/Imakefile:1.9 Tue Sep 19 08:46:07 2000 +++ xc/lib/font/bitmap/Imakefile Tue Apr 3 13:51:59 2001 @@ -1,6 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/9 1996/11/03 19:31:58 kaleb $ -XCOMM $XFree86: xc/lib/font/bitmap/Imakefile,v 1.9 2000/09/19 12:46:07 eich Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ + + + +XCOMM $XFree86: xc/lib/font/bitmap/Imakefile,v 1.11 2001/04/03 17:51:59 paulo Exp $ + #if BuildServer && DoLoadableServer #define IHaveSubdirs #define NoLibSubdirs @@ -49,6 +53,8 @@ LibraryObjectRule() SpecialCLibObjectRule(bitmapfunc,$(ICONFIGFILES),$(GZIP_DEFS)) +SpecialCLibObjectRule(bitscale,$(ICONFIGFILES),$(GZIP_DEFS)) + SubdirLibraryRule($(OBJS)) NormalLintTarget($(SRCS)) Index: xc/lib/font/bitmap/bdfint.h diff -u xc/lib/font/bitmap/bdfint.h:1.3 xc/lib/font/bitmap/bdfint.h:1.4 --- xc/lib/font/bitmap/bdfint.h:1.3 Sat Jul 17 04:55:10 1999 +++ xc/lib/font/bitmap/bdfint.h Wed Jan 17 14:43:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: bdfint.h /main/5 1998/05/01 16:42:08 kaleb $ */ +/* $Xorg: bdfint.h,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bdfint.h,v 1.3 1999/07/17 08:55:10 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bdfint.h,v 1.4 2001/01/17 19:43:26 dawes Exp $ */ #ifndef BDFINT_H #define BDFINT_H Index: xc/lib/font/bitmap/bdfread.c diff -u xc/lib/font/bitmap/bdfread.c:1.8 xc/lib/font/bitmap/bdfread.c:1.9 --- xc/lib/font/bitmap/bdfread.c:1.8 Sun Aug 1 03:56:53 1999 +++ xc/lib/font/bitmap/bdfread.c Wed Jan 17 14:43:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: bdfread.c /main/26 1998/05/01 16:46:08 kaleb $ */ +/* $Xorg: bdfread.c,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ /************************************************************************ Copyright 1989 by Digital Equipment Corporation, Maynard, Massachusetts. @@ -46,7 +46,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bdfread.c,v 1.8 1999/08/01 07:56:53 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bdfread.c,v 1.9 2001/01/17 19:43:26 dawes Exp $ */ #ifndef FONTMODULE #include Index: xc/lib/font/bitmap/bdfutils.c diff -u xc/lib/font/bitmap/bdfutils.c:1.6 xc/lib/font/bitmap/bdfutils.c:1.7 --- xc/lib/font/bitmap/bdfutils.c:1.6 Wed Apr 5 14:13:25 2000 +++ xc/lib/font/bitmap/bdfutils.c Wed Jan 17 14:43:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: bdfutils.c /main/14 1998/05/01 17:52:09 kaleb $ */ +/* $Xorg: bdfutils.c,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ /************************************************************************ Copyright 1989 by Digital Equipment Corporation, Maynard, Massachusetts. @@ -45,7 +45,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bdfutils.c,v 1.6 2000/04/05 18:13:25 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bdfutils.c,v 1.7 2001/01/17 19:43:27 dawes Exp $ */ #ifndef FONTMODULE #include Index: xc/lib/font/bitmap/bitmap.c diff -u xc/lib/font/bitmap/bitmap.c:1.5 xc/lib/font/bitmap/bitmap.c:1.6 --- xc/lib/font/bitmap/bitmap.c:1.5 Sun Aug 1 03:56:54 1999 +++ xc/lib/font/bitmap/bitmap.c Wed Jan 17 14:43:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: bitmap.c /main/6 1998/02/09 10:46:40 kaleb $ */ +/* $Xorg: bitmap.c,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bitmap.c,v 1.5 1999/08/01 07:56:54 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bitmap.c,v 1.6 2001/01/17 19:43:27 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/bitmap/bitmapfunc.c diff -u xc/lib/font/bitmap/bitmapfunc.c:3.9 xc/lib/font/bitmap/bitmapfunc.c:3.12 --- xc/lib/font/bitmap/bitmapfunc.c:3.9 Fri Nov 19 08:53:28 1999 +++ xc/lib/font/bitmap/bitmapfunc.c Tue Apr 3 20:34:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: bitmapfunc.c /main/14 1998/05/07 15:23:26 kaleb $ */ +/* $Xorg: bitmapfunc.c,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ /* @@ -22,7 +22,7 @@ */ -/* $XFree86: xc/lib/font/bitmap/bitmapfunc.c,v 3.9 1999/11/19 13:53:28 hohndel Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bitmapfunc.c,v 3.12 2001/04/04 00:34:28 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -83,6 +83,7 @@ #define CAPABILITIES (CAP_MATRIX | CAP_CHARSUBSETTING) static FontRendererRec renderers[] = { +#ifdef PCFFORMAT { ".pcf", 4, BitmapOpenBitmap, BitmapOpenScalable, BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, CAPABILITIES }, @@ -101,6 +102,8 @@ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, CAPABILITIES }, #endif +#endif +#ifdef SNFFORMAT { ".snf", 4, BitmapOpenBitmap, BitmapOpenScalable, BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, CAPABILITIES }, @@ -112,6 +115,8 @@ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, CAPABILITIES }, #endif +#endif +#ifdef BDFFORMAT { ".bdf", 4, BitmapOpenBitmap, BitmapOpenScalable, BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, CAPABILITIES }, @@ -123,9 +128,12 @@ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, CAPABILITIES }, #endif +#endif +#ifdef PCFFORMAT { ".pmf", 4, BitmapOpenBitmap, BitmapOpenScalable, BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, CAPABILITIES } +#endif }; int @@ -163,10 +171,11 @@ ret = (*readers[i].ReadFont) (pFont, file, bit, byte, glyph, scan); FontFileClose (file); - if (ret != Successful) + if (ret != Successful) { xfree(pFont); - else + } else { *ppFont = pFont; + } return ret; } Index: xc/lib/font/bitmap/bitmaputil.c diff -u xc/lib/font/bitmap/bitmaputil.c:1.4 xc/lib/font/bitmap/bitmaputil.c:1.5 --- xc/lib/font/bitmap/bitmaputil.c:1.4 Sat Aug 21 09:47:59 1999 +++ xc/lib/font/bitmap/bitmaputil.c Wed Jan 17 14:43:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: bitmaputil.c /main/7 1998/02/09 10:46:36 kaleb $ */ +/* $Xorg: bitmaputil.c,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bitmaputil.c,v 1.4 1999/08/21 13:47:59 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bitmaputil.c,v 1.5 2001/01/17 19:43:27 dawes Exp $ */ #include "fntfilst.h" #include "bitmap.h" Index: xc/lib/font/bitmap/bitscale.c diff -u xc/lib/font/bitmap/bitscale.c:3.16 xc/lib/font/bitmap/bitscale.c:3.19 --- xc/lib/font/bitmap/bitscale.c:3.16 Fri Nov 19 08:53:28 1999 +++ xc/lib/font/bitmap/bitscale.c Thu Apr 5 13:42:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: bitscale.c /main/36 1998/05/07 15:27:04 kaleb $ */ +/* $Xorg: bitscale.c,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bitscale.c,v 3.16 1999/11/19 13:53:28 hohndel Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bitscale.c,v 3.19 2001/04/05 17:42:27 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -46,6 +46,8 @@ #define MAX(a,b) (((a)>(b)) ? a : b) #endif +/* Should get this from elsewhere */ +extern int serverGeneration; static void bitmapUnloadScalable (FontPtr pFont); static void ScaleBitmap ( FontPtr pFont, CharInfoPtr opci, @@ -80,6 +82,7 @@ /* These next two arrays must be kept in step with the renderer array */ ScaleFunc scale[] = { +#ifdef PCFFORMAT BitmapScaleBitmaps, BitmapScaleBitmaps, #ifdef X_GZIP_FONT_COMPRESSION @@ -88,17 +91,24 @@ #ifdef __EMX__ BitmapScaleBitmaps, #endif +#endif +#ifdef SNFFORMAT BitmapScaleBitmaps, BitmapScaleBitmaps, #ifdef X_GZIP_FONT_COMPRESSION BitmapScaleBitmaps, #endif +#endif +#ifdef BDFFORMAT BitmapScaleBitmaps, BitmapScaleBitmaps, #ifdef X_GZIP_FONT_COMPRESSION BitmapScaleBitmaps, #endif +#endif +#ifdef PCFFORMAT PrinterScaleBitmaps, +#endif }; static FontEntryPtr FindBestToScale ( FontPathElementPtr fpe, @@ -714,7 +724,6 @@ char *ptr3; FontPropPtr fp; fontProp *fpt; - extern int serverGeneration; char *isStringProp; int nProps; Index: xc/lib/font/bitmap/fontink.c diff -u xc/lib/font/bitmap/fontink.c:1.5 xc/lib/font/bitmap/fontink.c:1.6 --- xc/lib/font/bitmap/fontink.c:1.5 Fri Nov 19 08:53:29 1999 +++ xc/lib/font/bitmap/fontink.c Wed Jan 17 14:43:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: fontink.c /main/6 1998/05/01 16:42:21 kaleb $ */ +/* $Xorg: fontink.c,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/fontink.c,v 1.5 1999/11/19 13:53:29 hohndel Exp $ */ +/* $XFree86: xc/lib/font/bitmap/fontink.c,v 1.6 2001/01/17 19:43:27 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/bitmap/pcf.h diff -u xc/lib/font/bitmap/pcf.h:1.2 xc/lib/font/bitmap/pcf.h:1.3 --- xc/lib/font/bitmap/pcf.h:1.2 Sat Jul 17 01:30:32 1999 +++ xc/lib/font/bitmap/pcf.h Wed Jan 17 14:43:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: pcf.h /main/3 1998/02/09 10:47:04 kaleb $ */ +/* $Xorg: pcf.h,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/pcf.h,v 1.2 1999/07/17 05:30:32 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/pcf.h,v 1.3 2001/01/17 19:43:27 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/bitmap/pcfread.c diff -u xc/lib/font/bitmap/pcfread.c:1.13 xc/lib/font/bitmap/pcfread.c:1.16 --- xc/lib/font/bitmap/pcfread.c:1.13 Tue Sep 19 08:46:07 2000 +++ xc/lib/font/bitmap/pcfread.c Tue Apr 3 20:34:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: pcfread.c /main/21 1998/05/07 15:20:43 kaleb $ */ +/* $Xorg: pcfread.c,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/pcfread.c,v 1.13 2000/09/19 12:46:07 eich Exp $ */ +/* $XFree86: xc/lib/font/bitmap/pcfread.c,v 1.16 2001/04/04 00:34:28 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -863,7 +863,7 @@ if (encodingOffset == 0xFFFF) { pFont->info.allExist = FALSE; encoding[i] = 0; - } else + } else { if(!encoding[SEGMENT_MAJOR(i)]) { encoding[SEGMENT_MAJOR(i)]= (CharInfoPtr*)xcalloc(BITMAP_FONT_SEGMENT_SIZE, @@ -872,6 +872,7 @@ goto Bail; } ACCESSENCODINGL(encoding, i) = metrics + encodingOffset; + } } if (IS_EOF(file)) goto Bail; Index: xc/lib/font/bitmap/pcfwrite.c diff -u xc/lib/font/bitmap/pcfwrite.c:1.4 xc/lib/font/bitmap/pcfwrite.c:1.6 --- xc/lib/font/bitmap/pcfwrite.c:1.4 Fri Nov 19 08:53:29 1999 +++ xc/lib/font/bitmap/pcfwrite.c Thu Apr 5 13:42:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: pcfwrite.c /main/8 1998/05/01 16:42:26 kaleb $ */ +/* $Xorg: pcfwrite.c,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/pcfwrite.c,v 1.4 1999/11/19 13:53:29 hohndel Exp $ */ +/* $XFree86: xc/lib/font/bitmap/pcfwrite.c,v 1.6 2001/04/05 17:42:27 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -36,7 +36,7 @@ /* Write PCF font files */ -static int current_position; +static CARD32 current_position; static int pcfWrite(FontFilePtr file, char *b, int c) @@ -216,7 +216,7 @@ int prop_pad = 0; char *atom_name; int glyph; - int offset; + CARD32 offset; bitmapFont = (BitmapFontPtr) pFont->fontPrivate; if (bitmapFont->bitmapExtra) { @@ -349,7 +349,7 @@ cur_table++, table++) { if (current_position > table->offset) { printf("can't go backwards... %d > %d\n", - current_position, table->offset); + (int)current_position, (int)table->offset); return BadFontName; } while (current_position < table->offset) Index: xc/lib/font/bitmap/snfread.c diff -u xc/lib/font/bitmap/snfread.c:1.7 xc/lib/font/bitmap/snfread.c:1.8 --- xc/lib/font/bitmap/snfread.c:1.7 Sun Aug 1 03:56:56 1999 +++ xc/lib/font/bitmap/snfread.c Wed Jan 17 14:43:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: snfread.c /main/19 1998/05/01 16:42:29 kaleb $ */ +/* $Xorg: snfread.c,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ /************************************************************************ Copyright 1989 by Digital Equipment Corporation, Maynard, Massachusetts. @@ -45,7 +45,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/snfread.c,v 1.7 1999/08/01 07:56:56 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/snfread.c,v 1.8 2001/01/17 19:43:27 dawes Exp $ */ #ifndef FONTMODULE #include Index: xc/lib/font/bitmap/snfstr.h diff -u xc/lib/font/bitmap/snfstr.h:1.2 xc/lib/font/bitmap/snfstr.h:1.3 --- xc/lib/font/bitmap/snfstr.h:1.2 Sat Jul 17 01:30:33 1999 +++ xc/lib/font/bitmap/snfstr.h Wed Jan 17 14:43:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: snfstr.h /main/6 1998/02/09 10:47:12 kaleb $ */ +/* $Xorg: snfstr.h,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ /*********************************************************** Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. @@ -45,7 +45,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/snfstr.h,v 1.2 1999/07/17 05:30:33 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/snfstr.h,v 1.3 2001/01/17 19:43:27 dawes Exp $ */ #ifndef SNFSTR_H #define SNFSTR_H 1 Index: xc/lib/font/fc/Imakefile diff -u xc/lib/font/fc/Imakefile:1.4 xc/lib/font/fc/Imakefile:1.5 --- xc/lib/font/fc/Imakefile:1.4 Sun Dec 12 21:52:50 1999 +++ xc/lib/font/fc/Imakefile Wed Jan 17 14:43:28 2001 @@ -1,8 +1,8 @@ -XCOMM $XConsortium: Imakefile /main/20 1995/12/13 18:07:57 kaleb $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ XCOMM XCOMM Make file for font handling routines XCOMM -XCOMM $XFree86: xc/lib/font/fc/Imakefile,v 1.4 1999/12/13 02:52:50 robin Exp $ +XCOMM $XFree86: xc/lib/font/fc/Imakefile,v 1.5 2001/01/17 19:43:28 dawes Exp $ #include INCLUDES = -I$(FONTINCSRC) -I../include $(TRANS_INCLUDES) Index: xc/lib/font/fc/fsconvert.c diff -u xc/lib/font/fc/fsconvert.c:1.9 xc/lib/font/fc/fsconvert.c:1.10 --- xc/lib/font/fc/fsconvert.c:1.9 Sun Dec 26 20:14:09 1999 +++ xc/lib/font/fc/fsconvert.c Wed Jan 17 14:43:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: fsconvert.c /main/20 1998/05/07 14:52:42 kaleb $ */ +/* $Xorg: fsconvert.c,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices * @@ -22,7 +22,7 @@ * * Author: Dave Lemke, Network Computing Devices, Inc */ -/* $XFree86: xc/lib/font/fc/fsconvert.c,v 1.9 1999/12/27 01:14:09 robin Exp $ */ +/* $XFree86: xc/lib/font/fc/fsconvert.c,v 1.10 2001/01/17 19:43:28 dawes Exp $ */ /* * FS data conversion */ Index: xc/lib/font/fc/fserve.c diff -u xc/lib/font/fc/fserve.c:3.17 xc/lib/font/fc/fserve.c:3.19 --- xc/lib/font/fc/fserve.c:3.17 Thu Jan 20 20:11:52 2000 +++ xc/lib/font/fc/fserve.c Thu Apr 5 13:42:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: fserve.c /main/52 1998/05/01 16:42:36 kaleb $ */ +/* $Xorg: fserve.c,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ /* Copyright 1990, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fc/fserve.c,v 3.17 2000/01/21 01:11:52 dawes Exp $ */ +/* $XFree86: xc/lib/font/fc/fserve.c,v 3.19 2001/04/05 17:42:27 dawes Exp $ */ /* * Copyright 1990 Network Computing Devices @@ -91,8 +91,6 @@ (pci)->descent || \ (pci)->characterWidth) - -extern FontPtr find_old_font(FSID id); static int fs_read_glyphs ( FontPathElementPtr fpe, FSBlockDataPtr blockrec ); static int fs_read_list ( FontPathElementPtr fpe, FSBlockDataPtr blockrec ); Index: xc/lib/font/fc/fserve.h diff -u xc/lib/font/fc/fserve.h:1.3 xc/lib/font/fc/fserve.h:1.5 --- xc/lib/font/fc/fserve.h:1.3 Sun Dec 12 21:52:52 1999 +++ xc/lib/font/fc/fserve.h Thu Apr 5 13:42:28 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: fserve.h,v 1.7 93/08/24 18:49:12 gildea Exp $ */ +/* $Xorg: fserve.h,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices * @@ -24,7 +24,7 @@ * Author: Dave Lemke, Network Computing Devices, Inc * */ -/* $XFree86: xc/lib/font/fc/fserve.h,v 1.3 1999/12/13 02:52:52 robin Exp $ */ +/* $XFree86: xc/lib/font/fc/fserve.h,v 1.5 2001/04/05 17:42:28 dawes Exp $ */ #ifndef _FSERVE_H_ #define _FSERVE_H_ @@ -83,8 +83,6 @@ extern int _fs_load_glyphs ( pointer client, FontPtr pfont, Bool range_flag, unsigned int nchars, int item_size, unsigned char *data ); -extern void fs_register_fpe_functions ( void ); -extern void check_fs_register_fpe_functions ( void ); /* * These should be declared elsewhere, but I'm concerned that moving them Index: xc/lib/font/fc/fservestr.h diff -u xc/lib/font/fc/fservestr.h:3.2 xc/lib/font/fc/fservestr.h:3.3 --- xc/lib/font/fc/fservestr.h:3.2 Sun Dec 12 21:52:52 1999 +++ xc/lib/font/fc/fservestr.h Wed Jan 17 14:43:29 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: fservestr.h,v 1.13 95/06/09 22:16:29 gildea Exp $ */ +/* $Xorg: fservestr.h,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices * @@ -23,7 +23,7 @@ * * Author: Dave Lemke, Network Computing Devices, Inc */ -/* $XFree86: xc/lib/font/fc/fservestr.h,v 3.2 1999/12/13 02:52:52 robin Exp $ */ +/* $XFree86: xc/lib/font/fc/fservestr.h,v 3.3 2001/01/17 19:43:29 dawes Exp $ */ #ifndef _FSERVESTR_H_ #define _FSERVESTR_H_ Index: xc/lib/font/fc/fsio.c diff -u xc/lib/font/fc/fsio.c:3.12 xc/lib/font/fc/fsio.c:3.13 --- xc/lib/font/fc/fsio.c:3.12 Tue Nov 28 12:25:09 2000 +++ xc/lib/font/fc/fsio.c Wed Jan 17 14:43:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: fsio.c /main/41 1998/05/07 15:15:52 kaleb $ */ +/* $Xorg: fsio.c,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices * @@ -23,7 +23,7 @@ * * Author: Dave Lemke, Network Computing Devices, Inc */ -/* $XFree86: xc/lib/font/fc/fsio.c,v 3.12 2000/11/28 17:25:09 dawes Exp $ */ +/* $XFree86: xc/lib/font/fc/fsio.c,v 3.13 2001/01/17 19:43:29 dawes Exp $ */ /* * font server i/o routines */ Index: xc/lib/font/fc/fsio.h diff -u xc/lib/font/fc/fsio.h:1.5 xc/lib/font/fc/fsio.h:1.6 --- xc/lib/font/fc/fsio.h:1.5 Wed Dec 29 21:39:06 1999 +++ xc/lib/font/fc/fsio.h Wed Jan 17 14:43:29 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: fsio.h,v 1.12 94/01/31 12:02:17 mor Exp $ */ +/* $Xorg: fsio.h,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices * @@ -23,7 +23,7 @@ * * Author: Dave Lemke, Network Computing Devices, Inc */ -/* $XFree86: xc/lib/font/fc/fsio.h,v 1.5 1999/12/30 02:39:06 robin Exp $ */ +/* $XFree86: xc/lib/font/fc/fsio.h,v 1.6 2001/01/17 19:43:29 dawes Exp $ */ #ifndef _FSIO_H_ #define _FSIO_H_ Index: xc/lib/font/fc/fslibos.h diff -u xc/lib/font/fc/fslibos.h:3.4 xc/lib/font/fc/fslibos.h:3.5 --- xc/lib/font/fc/fslibos.h:3.4 Sat Oct 3 05:07:25 1998 +++ xc/lib/font/fc/fslibos.h Wed Jan 17 14:43:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: fslibos.h /main/17 1998/02/09 10:47:46 kaleb $ */ +/* $Xorg: fslibos.h,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ /* * Copyright 1990 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -27,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/fc/fslibos.h,v 3.4 1998/10/03 09:07:25 dawes Exp $ */ +/* $XFree86: xc/lib/font/fc/fslibos.h,v 3.5 2001/01/17 19:43:29 dawes Exp $ */ /* * FSlib networking & os include file Index: xc/lib/font/fontcache/fontcache.c diff -u xc/lib/font/fontcache/fontcache.c:1.3 xc/lib/font/fontcache/fontcache.c:1.4 --- xc/lib/font/fontcache/fontcache.c:1.3 Tue Sep 26 11:57:01 2000 +++ xc/lib/font/fontcache/fontcache.c Thu Apr 5 13:42:28 2001 @@ -26,7 +26,7 @@ * * Id: fontcache.c,v 1.19 1999/01/31 13:06:00 akiyama Exp $ */ -/* $XFree86: xc/lib/font/fontcache/fontcache.c,v 1.3 2000/09/26 15:57:01 tsi Exp $ */ +/* $XFree86: xc/lib/font/fontcache/fontcache.c,v 1.4 2001/04/05 17:42:28 dawes Exp $ */ #include #include @@ -61,15 +61,22 @@ static int NeedPurgeCache; static FontCacheStatistics CacheStatistics; -static void fc_assign_cache(); -static int fc_assign_entry(); -static void fc_flush_cache(); +static void fc_assign_cache(void); +static int fc_assign_entry(void); +static void fc_flush_cache(void); static int fc_get_bitmap_area(FontCacheEntryPtr, int); static void fc_free_bitmap_area(FontCacheBitmapPtr); static int fc_check_size(int); -static void fc_purge_cache(); -static void fc_purge_bitmap(); +static void fc_purge_cache(void); +static void fc_purge_bitmap(void); +static void fc_flush_cache_bitmap(void); +static void fc_flush_cache_inuse(void); +static void fc_flush_cache_free(void); +static void fc_purge_cache_entry(void); +static void fc_purge_cache_entry_pool(void); +static void fc_purge_bitmap_pool(void); + /* * FontCacheInitialize() * @@ -87,7 +94,7 @@ * first time initialization */ #if defined(HASH_DEBUG) || defined(DEBUG) -fprintf(stderr, "FontCacheInitialize: initializing cache\n"); + fprintf(stderr, "FontCacheInitialize: initializing cache\n"); #endif InUseQueue = &InUseQueueHead; TAILQ_INIT(InUseQueue); @@ -111,8 +118,10 @@ AllocSize.allocated = AllocSize.used = 0; fc_assign_cache(); fc_assign_entry(); -fprintf(stderr, "FontCacheInitialize: hi=%d, lo=%d, bal=%d\n", - CacheHiMark, CacheLowMark, CacheBalance); +#if defined(DEBUG) + fprintf(stderr, "FontCacheInitialize: hi=%ld, lo=%ld, bal=%d\n", + CacheHiMark, CacheLowMark, CacheBalance); +#endif CacheInitialized = 1; } else { @@ -121,7 +130,7 @@ * flush and reassign cache. */ #if defined(HASH_DEBUG) || defined(DEBUG) -fprintf(stderr, "FontCacheInitialize: initializing cache, again\n"); + fprintf(stderr, "FontCacheInitialize: initializing cache, again\n"); #endif } @@ -228,7 +237,7 @@ int size, mask; int i; - static sizes[] = { 16, 32, 64, 128, 0 }; + static int sizes[] = { 16, 32, 64, 128, 0 }; if (!CacheInitialized) { FontCacheInitialize(); Index: xc/lib/font/fontcache/fontcache.h diff -u xc/lib/font/fontcache/fontcache.h:1.2 xc/lib/font/fontcache/fontcache.h:1.4 --- xc/lib/font/fontcache/fontcache.h:1.2 Wed Feb 23 15:29:38 2000 +++ xc/lib/font/fontcache/fontcache.h Fri Apr 6 13:44:58 2001 @@ -26,6 +26,7 @@ * * Id: fontcache.h,v 1.12 1999/01/09 06:24:30 akiyama Exp $ */ +/* $XFree86: xc/lib/font/fontcache/fontcache.h,v 1.4 2001/04/06 17:44:58 dawes Exp $ */ #ifndef _FONTCACHE_H_ #define _FONTCACHE_H_ @@ -127,10 +128,10 @@ /* Function prototypes */ -int FontCacheInitialize(); +int FontCacheInitialize(void); FCCBPtr FontCacheOpenCache(void * /* arg */); void FontCacheCloseCache(FCCBPtr /* this */); -FontCacheEntryPtr FontCacheGetEntry(); +FontCacheEntryPtr FontCacheGetEntry(void); int FontCacheSearchEntry(FCCBPtr /* this */, int /* key */, FontCacheEntryPtr * /* value */); int FontCacheInsertEntry(FCCBPtr /* this */, int /* key */, Index: xc/lib/font/fontfile/Imakefile diff -u xc/lib/font/fontfile/Imakefile:3.17 xc/lib/font/fontfile/Imakefile:3.18 --- xc/lib/font/fontfile/Imakefile:3.17 Tue Sep 19 08:46:08 2000 +++ xc/lib/font/fontfile/Imakefile Wed Jan 17 14:43:29 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/14 1996/11/03 19:58:41 kaleb $ -XCOMM $XFree86: xc/lib/font/fontfile/Imakefile,v 3.17 2000/09/19 12:46:08 eich Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/font/fontfile/Imakefile,v 3.18 2001/01/17 19:43:29 dawes Exp $ + #include #if BuildServer && DoLoadableServer Index: xc/lib/font/fontfile/bitsource.c diff -u xc/lib/font/fontfile/bitsource.c:1.2 xc/lib/font/fontfile/bitsource.c:1.3 --- xc/lib/font/fontfile/bitsource.c:1.2 Sat Jul 17 01:30:39 1999 +++ xc/lib/font/fontfile/bitsource.c Wed Jan 17 14:43:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: bitsource.c /main/11 1998/05/07 15:00:06 kaleb $ */ +/* $Xorg: bitsource.c,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/bitsource.c,v 1.2 1999/07/17 05:30:39 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/bitsource.c,v 1.3 2001/01/17 19:43:29 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/fontfile/bufio.c diff -u xc/lib/font/fontfile/bufio.c:3.6 xc/lib/font/fontfile/bufio.c:3.7 --- xc/lib/font/fontfile/bufio.c:3.6 Tue Sep 19 08:46:08 2000 +++ xc/lib/font/fontfile/bufio.c Wed Jan 17 14:43:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: bufio.c /main/12 1998/05/07 13:44:12 kaleb $ */ +/* $Xorg: bufio.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/bufio.c,v 3.6 2000/09/19 12:46:08 eich Exp $ */ +/* $XFree86: xc/lib/font/fontfile/bufio.c,v 3.7 2001/01/17 19:43:29 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/fontfile/decompress.c diff -u xc/lib/font/fontfile/decompress.c:1.3 xc/lib/font/fontfile/decompress.c:1.4 --- xc/lib/font/fontfile/decompress.c:1.3 Tue Sep 19 08:46:08 2000 +++ xc/lib/font/fontfile/decompress.c Wed Jan 17 14:43:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: decompress.c /main/9 1998/04/24 09:26:33 barstow $ */ +/* $Xorg: decompress.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ /* * Copyright 1985, 1986 The Regents of the University of California. * All rights reserved. @@ -41,7 +41,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/decompress.c,v 1.3 2000/09/19 12:46:08 eich Exp $ */ +/* $XFree86: xc/lib/font/fontfile/decompress.c,v 1.4 2001/01/17 19:43:29 dawes Exp $ */ /* * decompress - cat a compressed file */ Index: xc/lib/font/fontfile/defaults.c diff -u xc/lib/font/fontfile/defaults.c:1.6 xc/lib/font/fontfile/defaults.c:1.7 --- xc/lib/font/fontfile/defaults.c:1.6 Sat Aug 21 09:48:02 1999 +++ xc/lib/font/fontfile/defaults.c Wed Jan 17 14:43:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: defaults.c /main/4 1998/02/09 10:48:02 kaleb $ */ +/* $Xorg: defaults.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/defaults.c,v 1.6 1999/08/21 13:48:02 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/defaults.c,v 1.7 2001/01/17 19:43:29 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/fontfile/dirfile.c diff -u xc/lib/font/fontfile/dirfile.c:3.10 xc/lib/font/fontfile/dirfile.c:3.11 --- xc/lib/font/fontfile/dirfile.c:3.10 Sat Sep 4 05:14:11 1999 +++ xc/lib/font/fontfile/dirfile.c Wed Jan 17 14:43:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: dirfile.c /main/15 1998/06/25 16:57:32 kaleb $ */ +/* $Xorg: dirfile.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/dirfile.c,v 3.10 1999/09/04 09:14:11 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/dirfile.c,v 3.11 2001/01/17 19:43:30 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/fontfile/ffcheck.c diff -u xc/lib/font/fontfile/ffcheck.c:1.13 xc/lib/font/fontfile/ffcheck.c:1.14 --- xc/lib/font/fontfile/ffcheck.c:1.13 Sun Feb 13 01:15:28 2000 +++ xc/lib/font/fontfile/ffcheck.c Wed Jan 17 14:43:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: ffcheck.c /main/7 1998/05/07 14:59:15 kaleb $ */ +/* $Xorg: ffcheck.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ /* @@ -21,12 +21,12 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/ffcheck.c,v 1.13 2000/02/13 06:15:28 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/ffcheck.c,v 1.14 2001/01/17 19:43:30 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium */ -/* $NCDId: @(#)fontfile.c,v 1.6 1991/07/02 17:00:46 lemke Exp $ */ +/* $NCDXorg: @(#)fontfile.c,v 1.6 1991/07/02 17:00:46 lemke Exp $ */ #include "fntfilst.h" #include "bitmap.h" Index: xc/lib/font/fontfile/fileio.c diff -u xc/lib/font/fontfile/fileio.c:3.7 xc/lib/font/fontfile/fileio.c:3.8 --- xc/lib/font/fontfile/fileio.c:3.7 Sat Aug 21 09:48:02 1999 +++ xc/lib/font/fontfile/fileio.c Wed Jan 17 14:43:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: fileio.c /main/7 1998/05/01 16:42:56 kaleb $ */ +/* $Xorg: fileio.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/fileio.c,v 3.7 1999/08/21 13:48:02 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fileio.c,v 3.8 2001/01/17 19:43:30 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/fontfile/filewr.c diff -u xc/lib/font/fontfile/filewr.c:3.4 xc/lib/font/fontfile/filewr.c:3.5 --- xc/lib/font/fontfile/filewr.c:3.4 Wed Aug 9 19:40:15 2000 +++ xc/lib/font/fontfile/filewr.c Wed Jan 17 14:43:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: filewr.c /main/5 1998/02/09 10:48:21 kaleb $ */ +/* $Xorg: filewr.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/filewr.c,v 3.4 2000/08/09 23:40:15 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/filewr.c,v 3.5 2001/01/17 19:43:30 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/fontfile/fontdir.c diff -u xc/lib/font/fontfile/fontdir.c:3.12 xc/lib/font/fontfile/fontdir.c:3.17 --- xc/lib/font/fontfile/fontdir.c:3.12 Sat Jul 17 01:30:41 1999 +++ xc/lib/font/fontfile/fontdir.c Mon May 14 20:05:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: fontdir.c /main/29 1998/06/25 16:53:52 kaleb $ */ +/* $Xorg: fontdir.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/fontdir.c,v 3.12 1999/07/17 05:30:41 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fontdir.c,v 3.17 2001/05/15 00:05:32 keithp Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -55,6 +55,7 @@ if (entry->name.name) xfree(entry->name.name); + entry->name.name = NULL; switch (entry->type) { @@ -69,9 +70,11 @@ break; case FONT_ENTRY_BITMAP: xfree (entry->u.bitmap.fileName); + entry->u.bitmap.fileName = NULL; break; case FONT_ENTRY_ALIAS: xfree (entry->u.alias.resolved); + entry->u.alias.resolved = NULL; break; #ifdef NOTYET case FONT_ENTRY_BC: @@ -199,13 +202,52 @@ return entry; } +/* + * Compare two strings just like strcmp, but preserve decimal integer + * sorting order, i.e. "2" < "10" or "iso8859-2" < "iso8859-10" < + * "iso10646-1". Strings are sorted as if sequences of digits were + * prefixed by a length indicator (i.e., does not ignore leading zeroes). + * + * Markus Kuhn + */ +#define Xisdigit(c) ('\060' <= (c) && (c) <= '\071') + +static int strcmpn(const char *s1, const char *s2) +{ + int digits, predigits = 0; + const char *ss1, *ss2; + + while (1) { + if (*s1 == 0 && *s2 == 0) + return 0; + digits = Xisdigit(*s1) && Xisdigit(*s2); + if (digits && !predigits) { + ss1 = s1; + ss2 = s2; + while (Xisdigit(*ss1) && Xisdigit(*ss2)) + ss1++, ss2++; + if (!Xisdigit(*ss1) && Xisdigit(*ss2)) + return -1; + if (Xisdigit(*ss1) && !Xisdigit(*ss2)) + return 1; + } + if ((unsigned char)*s1 < (unsigned char)*s2) + return -1; + if ((unsigned char)*s1 > (unsigned char)*s2) + return 1; + predigits = digits; + s1++, s2++; + } +} + + static int FontFileNameCompare(const void* a, const void* b) { FontEntryPtr a_name = (FontEntryPtr) a, b_name = (FontEntryPtr) b; - return strcmp(a_name->name.name, b_name->name.name); + return strcmpn(a_name->name.name, b_name->name.name); } void @@ -241,6 +283,7 @@ */ #define isWild(c) ((c) == XK_asterisk || (c) == XK_question) +#define isDigit(c) (XK_0 <= (c) && (c) <= XK_9) static int SetupWildMatch(FontTablePtr table, FontNamePtr pat, @@ -250,6 +293,7 @@ char c; char *t; char *firstWild; + char *firstDigit; int first; int center, left, @@ -260,12 +304,17 @@ name = pat->name; nDashes = pat->ndashes; firstWild = 0; + firstDigit = 0; t = name; while ((c = *t++)) { if (isWild(c)) { if (!firstWild) firstWild = t - 1; } + if (isDigit(c)) { + if (!firstDigit) + firstDigit = t - 1; + } } left = 0; right = table->used; @@ -278,7 +327,10 @@ *rightp = right; return -1; } else if (firstWild) { - first = firstWild - name; + if (firstDigit && firstDigit < firstWild) + first = firstDigit - name; + else + first = firstWild - name; while (left < right) { center = (left + right) / 2; result = strncmp(name, table->entries[center].name.name, first); @@ -295,7 +347,7 @@ } else { while (left < right) { center = (left + right) / 2; - result = strcmp(name, table->entries[center].name.name); + result = strcmpn(name, table->entries[center].name.name); if (result == 0) return center; if (result < 0) @@ -571,7 +623,7 @@ FontRendererPtr renderer; FontEntryPtr existing; FontScalableExtraPtr extra; - FontEntryPtr bitmap, scalable; + FontEntryPtr bitmap = 0, scalable; Bool isscale; renderer = FontFileMatchRenderer (fileName); Index: xc/lib/font/fontfile/fontenc.c diff -u xc/lib/font/fontfile/fontenc.c:1.10 xc/lib/font/fontfile/fontenc.c:1.11 --- xc/lib/font/fontfile/fontenc.c:1.10 Tue Nov 14 11:54:45 2000 +++ xc/lib/font/fontfile/fontenc.c Wed Apr 18 12:13:18 2001 @@ -20,7 +20,7 @@ THE SOFTWARE. */ -/* $XFree86: xc/lib/font/fontfile/fontenc.c,v 1.10 2000/11/14 16:54:45 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fontenc.c,v 1.11 2001/04/18 16:13:18 dawes Exp $ */ /* Backend-independent encoding code */ @@ -697,11 +697,12 @@ if(strcasecmp(encoding->name, encoding_name) == 0) { found = 1; } else { - for(alias=encoding->aliases; *alias; alias++) - if(!strcasecmp(*alias, encoding_name)) { - found = 1; - break; - } + if(encoding->aliases) + for(alias=encoding->aliases; *alias; alias++) + if(!strcasecmp(*alias, encoding_name)) { + found = 1; + break; + } } if(!found) { @@ -711,21 +712,24 @@ char *new_name; int numaliases = 0; - new_name = xalloc(strlen(encoding_name + 1)); + new_name = xalloc(strlen(encoding_name) + 1); if(new_name == NULL) return NULL; strcpy(new_name, encoding_name); - for(alias = encoding->aliases; *alias; alias++) - numaliases++; + if(encoding->aliases) + for(alias = encoding->aliases; *alias; alias++) + numaliases++; new_aliases = (char**)xalloc((numaliases+2)*sizeof(char*)); if(new_aliases == NULL) { xfree(new_name); return NULL; } - memcpy(new_aliases, encoding->aliases, numaliases*sizeof(char*)); + if(numaliases) + memcpy(new_aliases, encoding->aliases, numaliases*sizeof(char*)); new_aliases[numaliases] = new_name; new_aliases[numaliases+1] = NULL; - xfree(encoding->aliases); + if(encoding->aliases) + xfree(encoding->aliases); encoding->aliases = new_aliases; } Index: xc/lib/font/fontfile/fontfile.c diff -u xc/lib/font/fontfile/fontfile.c:3.13 xc/lib/font/fontfile/fontfile.c:3.14 --- xc/lib/font/fontfile/fontfile.c:3.13 Sat Aug 21 09:48:03 1999 +++ xc/lib/font/fontfile/fontfile.c Wed Jan 17 14:43:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: fontfile.c /main/33 1998/05/07 15:04:47 kaleb $ */ +/* $Xorg: fontfile.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ /* @@ -21,12 +21,12 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/fontfile.c,v 3.13 1999/08/21 13:48:03 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fontfile.c,v 3.14 2001/01/17 19:43:30 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium */ -/* $NCDId: @(#)fontfile.c,v 1.6 1991/07/02 17:00:46 lemke Exp $ */ +/* $NCDXorg: @(#)fontfile.c,v 1.6 1991/07/02 17:00:46 lemke Exp $ */ #include "fntfilst.h" Index: xc/lib/font/fontfile/fontscale.c diff -u xc/lib/font/fontfile/fontscale.c:3.7 xc/lib/font/fontfile/fontscale.c:3.8 --- xc/lib/font/fontfile/fontscale.c:3.7 Sun Dec 12 22:00:51 1999 +++ xc/lib/font/fontfile/fontscale.c Wed Jan 17 14:43:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: fontscale.c /main/17 1998/05/07 15:01:58 kaleb $ */ +/* $Xorg: fontscale.c,v 1.4 2000/08/17 19:46:37 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/fontscale.c,v 3.7 1999/12/13 03:00:51 robin Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fontscale.c,v 3.8 2001/01/17 19:43:30 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/fontfile/gunzip.c diff -u xc/lib/font/fontfile/gunzip.c:1.4 xc/lib/font/fontfile/gunzip.c:1.5 --- xc/lib/font/fontfile/gunzip.c:1.4 Tue Sep 19 08:46:08 2000 +++ xc/lib/font/fontfile/gunzip.c Wed Jan 17 14:43:30 2001 @@ -1,8 +1,8 @@ -/* $XConsortium: gunzip.c /main/1 1996/11/03 19:33:23 kaleb $ */ +/* $Xorg: gunzip.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ /* lib/font/fontfile/gunzip.c written by Mark Eichin September 1996. intended for inclusion in X11 public releases. */ -/* $XFree86: xc/lib/font/fontfile/gunzip.c,v 1.4 2000/09/19 12:46:08 eich Exp $ */ +/* $XFree86: xc/lib/font/fontfile/gunzip.c,v 1.5 2001/01/17 19:43:30 dawes Exp $ */ #include "fontmisc.h" #include Index: xc/lib/font/fontfile/printerfont.c diff -u xc/lib/font/fontfile/printerfont.c:1.3 xc/lib/font/fontfile/printerfont.c:1.4 --- xc/lib/font/fontfile/printerfont.c:1.3 Sat Aug 21 09:48:04 1999 +++ xc/lib/font/fontfile/printerfont.c Wed Jan 17 14:43:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: printerfont.c /main/4 1998/05/07 15:16:56 kaleb $ */ +/* $Xorg: printerfont.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ /* @@ -21,12 +21,12 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/printerfont.c,v 1.3 1999/08/21 13:48:04 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/printerfont.c,v 1.4 2001/01/17 19:43:30 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium */ -/* $NCDId: @(#)fontfile.c,v 1.6 1991/07/02 17:00:46 lemke Exp $ */ +/* $NCDXorg: @(#)fontfile.c,v 1.6 1991/07/02 17:00:46 lemke Exp $ */ #include "fntfilst.h" Index: xc/lib/font/fontfile/register.c diff -u xc/lib/font/fontfile/register.c:1.13 xc/lib/font/fontfile/register.c:1.14 --- xc/lib/font/fontfile/register.c:1.13 Sun Feb 13 01:15:28 2000 +++ xc/lib/font/fontfile/register.c Wed Jan 17 14:43:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: register.c /main/6 1998/05/01 16:43:32 kaleb $ */ +/* $Xorg: register.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/register.c,v 1.13 2000/02/13 06:15:28 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/register.c,v 1.14 2001/01/17 19:43:30 dawes Exp $ */ /* * This is in a separate source file so that small programs Index: xc/lib/font/fontfile/renderers.c diff -u xc/lib/font/fontfile/renderers.c:1.2 xc/lib/font/fontfile/renderers.c:1.3 --- xc/lib/font/fontfile/renderers.c:1.2 Sat Jul 17 01:30:43 1999 +++ xc/lib/font/fontfile/renderers.c Wed Jan 17 14:43:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: renderers.c /main/6 1998/02/09 10:48:53 kaleb $ */ +/* $Xorg: renderers.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/renderers.c,v 1.2 1999/07/17 05:30:43 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/renderers.c,v 1.3 2001/01/17 19:43:30 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/include/bitmap.h diff -u xc/lib/font/include/bitmap.h:1.8 xc/lib/font/include/bitmap.h:1.9 --- xc/lib/font/include/bitmap.h:1.8 Tue Oct 24 18:45:02 2000 +++ xc/lib/font/include/bitmap.h Wed Jan 17 14:43:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: bitmap.h /main/6 1998/02/09 10:48:57 kaleb $ */ +/* $Xorg: bitmap.h,v 1.3 2000/08/17 19:46:38 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/include/bitmap.h,v 1.8 2000/10/24 22:45:02 dawes Exp $ */ +/* $XFree86: xc/lib/font/include/bitmap.h,v 1.9 2001/01/17 19:43:31 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/include/bufio.h diff -u xc/lib/font/include/bufio.h:1.4 xc/lib/font/include/bufio.h:1.5 --- xc/lib/font/include/bufio.h:1.4 Tue Sep 19 08:46:08 2000 +++ xc/lib/font/include/bufio.h Wed Jan 17 14:43:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: bufio.h /main/8 1998/05/07 13:44:07 kaleb $ */ +/* $Xorg: bufio.h,v 1.3 2000/08/17 19:46:38 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/include/bufio.h,v 1.4 2000/09/19 12:46:08 eich Exp $ */ +/* $XFree86: xc/lib/font/include/bufio.h,v 1.5 2001/01/17 19:43:31 dawes Exp $ */ #ifndef ___BUFIO_H___ #define ___BUFIO_H___ 1 Index: xc/lib/font/include/fntfil.h diff -u xc/lib/font/include/fntfil.h:1.5 xc/lib/font/include/fntfil.h:1.7 --- xc/lib/font/include/fntfil.h:1.5 Sat Aug 21 09:48:06 1999 +++ xc/lib/font/include/fntfil.h Thu Apr 5 13:42:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: fntfil.h /main/6 1998/02/09 10:49:13 kaleb $ */ +/* $Xorg: fntfil.h,v 1.3 2000/08/17 19:46:38 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/include/fntfil.h,v 1.5 1999/08/21 13:48:06 dawes Exp $ */ +/* $XFree86: xc/lib/font/include/fntfil.h,v 1.7 2001/04/05 17:42:28 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -165,11 +165,5 @@ extern int FontFileReadDirectory ( char *directory, FontDirectoryPtr *pdir ); extern Bool FontFileDirectoryChanged ( FontDirectoryPtr dir ); - -extern void FontFileCheckRegisterFpeFunctions ( void ); - -extern void PrinterFontRegisterFpeFunctions ( void ); - -extern void FontFileRegisterFpeFunctions ( void ); #endif /* _FONTFILE_H_ */ Index: xc/lib/font/include/fntfilio.h diff -u xc/lib/font/include/fntfilio.h:1.3 xc/lib/font/include/fntfilio.h:1.4 --- xc/lib/font/include/fntfilio.h:1.3 Sat Aug 21 09:48:06 1999 +++ xc/lib/font/include/fntfilio.h Wed Jan 17 14:43:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: fntfilio.h /main/4 1998/02/09 10:49:05 kaleb $ */ +/* $Xorg: fntfilio.h,v 1.3 2000/08/17 19:46:38 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/include/fntfilio.h,v 1.3 1999/08/21 13:48:06 dawes Exp $ */ +/* $XFree86: xc/lib/font/include/fntfilio.h,v 1.4 2001/01/17 19:43:32 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/include/fntfilst.h diff -u xc/lib/font/include/fntfilst.h:3.5 xc/lib/font/include/fntfilst.h:3.6 --- xc/lib/font/include/fntfilst.h:3.5 Sat Jul 17 01:30:47 1999 +++ xc/lib/font/include/fntfilst.h Wed Jan 17 14:43:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: fntfilst.h /main/9 1998/02/09 10:49:09 kaleb $ */ +/* $Xorg: fntfilst.h,v 1.4 2000/08/17 19:46:38 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/include/fntfilst.h,v 3.5 1999/07/17 05:30:47 dawes Exp $ */ +/* $XFree86: xc/lib/font/include/fntfilst.h,v 3.6 2001/01/17 19:43:32 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -33,7 +33,9 @@ #ifndef FONTMODULE #include #endif +#ifndef XP_PSTEXT #include "fontmisc.h" +#endif #include "fontstruct.h" #include "fontxlfd.h" #include "fntfil.h" Index: xc/lib/font/include/fontmisc.h diff -u xc/lib/font/include/fontmisc.h:3.12 xc/lib/font/include/fontmisc.h:3.13 --- xc/lib/font/include/fontmisc.h:3.12 Sat Sep 4 05:14:12 1999 +++ xc/lib/font/include/fontmisc.h Wed Jan 17 14:43:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: fontmisc.h /main/11 1998/05/07 14:12:58 kaleb $ */ +/* $Xorg: fontmisc.h,v 1.3 2000/08/17 19:46:38 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/include/fontmisc.h,v 3.12 1999/09/04 09:14:12 dawes Exp $ */ +/* $XFree86: xc/lib/font/include/fontmisc.h,v 3.13 2001/01/17 19:43:32 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/include/fontshow.h diff -u xc/lib/font/include/fontshow.h:1.1.1.2 xc/lib/font/include/fontshow.h:1.1.1.3 --- xc/lib/font/include/fontshow.h:1.1.1.2 Sun Sep 27 03:54:08 1998 +++ xc/lib/font/include/fontshow.h Tue Jan 16 17:27:04 2001 @@ -1,4 +1,4 @@ -/* $TOG: fontshow.h /main/3 1998/02/09 10:49:22 kaleb $ */ +/* $Xorg: fontshow.h,v 1.3 2000/08/17 19:46:38 cpqbld Exp $ */ /* Index: xc/lib/font/include/fontxlfd.h diff -u xc/lib/font/include/fontxlfd.h:1.4 xc/lib/font/include/fontxlfd.h:1.5 --- xc/lib/font/include/fontxlfd.h:1.4 Sat Jul 17 01:30:48 1999 +++ xc/lib/font/include/fontxlfd.h Wed Jan 17 14:43:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: fontxlfd.h /main/7 1998/02/09 10:49:25 kaleb $ */ +/* $Xorg: fontxlfd.h,v 1.3 2000/08/17 19:46:38 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/include/fontxlfd.h,v 1.4 1999/07/17 05:30:48 dawes Exp $ */ +/* $XFree86: xc/lib/font/include/fontxlfd.h,v 1.5 2001/01/17 19:43:32 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/util/Imakefile diff -u xc/lib/font/util/Imakefile:1.6 xc/lib/font/util/Imakefile:1.7 --- xc/lib/font/util/Imakefile:1.6 Thu Dec 7 11:40:30 2000 +++ xc/lib/font/util/Imakefile Wed Jan 17 14:43:32 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile,v 1.11 94/02/07 16:07:31 gildea Exp $ -XCOMM $XFree86: xc/lib/font/util/Imakefile,v 1.6 2000/12/07 16:40:30 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/font/util/Imakefile,v 1.7 2001/01/17 19:43:32 dawes Exp $ + #include INCLUDES = -I$(FONTINCSRC) -I../include Index: xc/lib/font/util/atom.c diff -u xc/lib/font/util/atom.c:1.3 xc/lib/font/util/atom.c:1.4 --- xc/lib/font/util/atom.c:1.3 Sun Aug 22 04:58:57 1999 +++ xc/lib/font/util/atom.c Wed Jan 17 14:43:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: atom.c /main/8 1998/05/11 12:24:07 kaleb $ */ +/* $Xorg: atom.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/util/atom.c,v 1.3 1999/08/22 08:58:57 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/atom.c,v 1.4 2001/01/17 19:43:33 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/util/fontaccel.c diff -u xc/lib/font/util/fontaccel.c:1.5 xc/lib/font/util/fontaccel.c:1.6 --- xc/lib/font/util/fontaccel.c:1.5 Sun Aug 22 04:58:58 1999 +++ xc/lib/font/util/fontaccel.c Wed Jan 17 14:43:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: fontaccel.c /main/6 1998/05/07 13:57:34 kaleb $ */ +/* $Xorg: fontaccel.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/util/fontaccel.c,v 1.5 1999/08/22 08:58:58 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/fontaccel.c,v 1.6 2001/01/17 19:43:33 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/util/fontnames.c diff -u xc/lib/font/util/fontnames.c:1.3 xc/lib/font/util/fontnames.c:1.4 --- xc/lib/font/util/fontnames.c:1.3 Sun Aug 22 04:58:58 1999 +++ xc/lib/font/util/fontnames.c Wed Jan 17 14:43:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: fontnames.c /main/3 1998/02/09 10:55:16 kaleb $ */ +/* $Xorg: fontnames.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/util/fontnames.c,v 1.3 1999/08/22 08:58:58 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/fontnames.c,v 1.4 2001/01/17 19:43:33 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/util/fontutil.c diff -u xc/lib/font/util/fontutil.c:3.4 xc/lib/font/util/fontutil.c:3.5 --- xc/lib/font/util/fontutil.c:3.4 Sat Aug 21 09:48:09 1999 +++ xc/lib/font/util/fontutil.c Wed Jan 17 14:43:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: fontutil.c /main/14 1998/05/07 14:27:41 kaleb $ */ +/* $Xorg: fontutil.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/util/fontutil.c,v 3.4 1999/08/21 13:48:09 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/fontutil.c,v 3.5 2001/01/17 19:43:33 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/util/fontxlfd.c diff -u xc/lib/font/util/fontxlfd.c:3.9 xc/lib/font/util/fontxlfd.c:3.10 --- xc/lib/font/util/fontxlfd.c:3.9 Thu Aug 31 15:03:55 2000 +++ xc/lib/font/util/fontxlfd.c Wed Jan 17 14:43:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: fontxlfd.c /main/22 1998/05/07 14:25:20 kaleb $ */ +/* $Xorg: fontxlfd.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/util/fontxlfd.c,v 3.9 2000/08/31 19:03:55 tsi Exp $ */ +/* $XFree86: xc/lib/font/util/fontxlfd.c,v 3.10 2001/01/17 19:43:33 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/util/format.c diff -u xc/lib/font/util/format.c:1.3 xc/lib/font/util/format.c:1.4 --- xc/lib/font/util/format.c:1.3 Sun Aug 22 04:58:58 1999 +++ xc/lib/font/util/format.c Wed Jan 17 14:43:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: format.c /main/6 1998/02/09 10:55:29 kaleb $ */ +/* $Xorg: format.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -46,7 +46,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/util/format.c,v 1.3 1999/08/22 08:58:58 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/format.c,v 1.4 2001/01/17 19:43:33 dawes Exp $ */ #include "FSproto.h" #include "font.h" Index: xc/lib/font/util/miscutil.c diff -u xc/lib/font/util/miscutil.c:1.5 xc/lib/font/util/miscutil.c:1.6 --- xc/lib/font/util/miscutil.c:1.5 Sat Sep 4 05:14:12 1999 +++ xc/lib/font/util/miscutil.c Wed Jan 17 14:43:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: miscutil.c /main/6 1998/05/01 16:43:52 kaleb $ */ +/* $Xorg: miscutil.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/util/miscutil.c,v 1.5 1999/09/04 09:14:12 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/miscutil.c,v 1.6 2001/01/17 19:43:33 dawes Exp $ */ #include #ifndef X_NOT_STDC_ENV Index: xc/lib/font/util/patcache.c diff -u xc/lib/font/util/patcache.c:3.3 xc/lib/font/util/patcache.c:3.4 --- xc/lib/font/util/patcache.c:3.3 Sat Aug 21 09:48:10 1999 +++ xc/lib/font/util/patcache.c Wed Jan 17 14:43:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: patcache.c /main/11 1998/05/07 13:54:55 kaleb $ */ +/* $Xorg: patcache.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/util/patcache.c,v 3.3 1999/08/21 13:48:10 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/patcache.c,v 3.4 2001/01/17 19:43:33 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/util/private.c diff -u xc/lib/font/util/private.c:1.6 xc/lib/font/util/private.c:1.7 --- xc/lib/font/util/private.c:1.6 Wed Oct 13 01:27:10 1999 +++ xc/lib/font/util/private.c Wed Jan 17 14:43:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: private.c /main/5 1998/02/09 10:55:41 kaleb $ */ +/* $Xorg: private.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/util/private.c,v 1.6 1999/10/13 05:27:10 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/private.c,v 1.7 2001/01/17 19:43:33 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/util/utilbitmap.c diff -u xc/lib/font/util/utilbitmap.c:1.3 xc/lib/font/util/utilbitmap.c:1.4 --- xc/lib/font/util/utilbitmap.c:1.3 Sun Aug 22 04:58:58 1999 +++ xc/lib/font/util/utilbitmap.c Wed Jan 17 14:43:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: utilbitmap.c /main/4 1998/02/09 10:55:46 kaleb $ */ +/* $Xorg: utilbitmap.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ /* @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/util/utilbitmap.c,v 1.3 1999/08/22 08:58:58 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/utilbitmap.c,v 1.4 2001/01/17 19:43:34 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/freetype2/Imakefile diff -u xc/lib/freetype2/Imakefile:1.2.2.1 xc/lib/freetype2/Imakefile:1.4 --- xc/lib/freetype2/Imakefile:1.2.2.1 Mon Mar 12 11:03:23 2001 +++ xc/lib/freetype2/Imakefile Tue May 15 23:57:27 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/freetype2/Imakefile,v 1.2.2.1 2001/03/12 16:03:23 keithp Exp $ +XCOMM $XFree86: xc/lib/freetype2/Imakefile,v 1.4 2001/05/16 03:57:27 keithp Exp $ #define IHaveSubdirs #define PassCDebugFlags @@ -19,15 +19,46 @@ FREETYPESRC = $(FREETYPETOP)/src FREETYPEINC = $(FREETYPETOP)/include/freetype -INCLUDES = $(FREETYPE2INCLUDES) -I$(FREETYPETOP)/src +INCLUDES = -I. $(FREETYPE2INCLUDES)\ + -I$(FREETYPESRC)\ + -I$(FREETYPESRC)/base\ + -I$(FREETYPESRC)/autohint\ + -I$(FREETYPESRC)/sfnt\ + -I$(FREETYPESRC)/cff\ + -I$(FREETYPESRC)/psnames\ + -I$(FREETYPESRC)/psaux\ + -I$(FREETYPESRC)/truetype\ + -I$(FREETYPESRC)/type1\ + -I$(FREETYPESRC)/cid\ + -I$(FREETYPESRC)/raster\ + -I$(FREETYPESRC)/smooth\ + -I$(FREETYPESRC)/winfonts\ + -I$(FREETYPESRC)/pcf SUBDIRS=freetype +HEADERS=ft2build.h +SRCS_BASE = ftbase.c \ + ftbbox.c \ + ftdebug.c \ + ftextend.c \ + ftglyph.c \ + ftinit.c \ + ftmm.c \ + ftsynth.c \ + ftsystem.c + +OBJS_BASE = ftbase.o \ + ftbbox.o \ + ftdebug.o \ + ftextend.o \ + ftglyph.o \ + ftinit.o \ + ftmm.o \ + ftsynth.o \ + ftsystem.o -SRCS_BASE = ftsystem.c ftinit.c ftdebug.c ftbase.c ftglyph.c ftbbox.c ftmm.c -OBJS_BASE = ftsystem.o ftinit.o ftdebug.o ftbase.o ftglyph.o ftbbox.o ftmm.o - SRCS_AUTOHINT = autohint.c OBJS_AUTOHINT = autohint.o @@ -61,14 +92,18 @@ SRCS_WINFONTS = winfnt.c OBJS_WINFONTS = winfnt.o +SRCS_PCF = pcf.c +OBJS_PCF = pcf.o SRCS = $(SRCS_BASE) $(SRCS_AUTOHINT) $(SRCS_SFNT) $(SRCS_CFF) \ $(SRCS_PSNAMES) $(SRCS_PSAUX) $(SRCS_TRUETYPE) $(SRCS_TYPE1) \ - $(SRCS_CID) $(SRCS_RASTER) $(SRCS_SMOOTH) $(SRCS_WINFONTS) + $(SRCS_CID) $(SRCS_RASTER) $(SRCS_SMOOTH) $(SRCS_WINFONTS) \ + $(SRCS_PCF) OBJS = $(OBJS_BASE) $(OBJS_AUTOHINT) $(OBJS_SFNT) $(OBJS_CFF) \ $(OBJS_PSNAMES) $(OBJS_PSAUX) $(OBJS_TRUETYPE) $(OBJS_TYPE1) \ - $(OBJS_CID) $(OBJS_RASTER) $(OBJS_SMOOTH) $(OBJS_WINFONTS) + $(OBJS_CID) $(OBJS_RASTER) $(OBJS_SMOOTH) $(OBJS_WINFONTS) \ + $(OBJS_PCF) #include @@ -81,14 +116,22 @@ InstallManPage(Freetype,$(LIBMANDIR)) #endif +BuildIncludes($(HEADERS),freetype2,..) +InstallMultipleFlags($(HEADERS),$(INCDIR)/freetype2,$(INSTINCFLAGS)) -LinkSourceFile(ftsystem.c,$(FREETYPESRC)/base) -LinkSourceFile(ftinit.c,$(FREETYPESRC)/base) -LinkSourceFile(ftdebug.c,$(FREETYPESRC)/base) +LinkSourceFile(ft2build.h,$(FREETYPETOP)/include) + LinkSourceFile(ftbase.c,$(FREETYPESRC)/base) -LinkSourceFile(ftglyph.c,$(FREETYPESRC)/base) LinkSourceFile(ftbbox.c,$(FREETYPESRC)/base) +LinkSourceFile(ftdebug.c,$(FREETYPESRC)/base) +LinkSourceFile(ftextend.c,$(FREETYPESRC)/base) +LinkSourceFile(ftglyph.c,$(FREETYPESRC)/base) +LinkSourceFile(ftinit.c,$(FREETYPESRC)/base) +LinkSourceFile(ftlist.c,$(FREETYPESRC)/base) LinkSourceFile(ftmm.c,$(FREETYPESRC)/base) +LinkSourceFile(ftsynth.c,$(FREETYPESRC)/base) +LinkSourceFile(ftsystem.c,$(FREETYPESRC)/base) + LinkSourceFile(autohint.c,$(FREETYPESRC)/autohint) LinkSourceFile(sfnt.c,$(FREETYPESRC)/sfnt) LinkSourceFile(cff.c,$(FREETYPESRC)/cff) @@ -100,6 +143,8 @@ LinkSourceFile(raster.c,$(FREETYPESRC)/raster) LinkSourceFile(smooth.c,$(FREETYPESRC)/smooth) LinkSourceFile(winfnt.c,$(FREETYPESRC)/winfonts) - +LinkSourceFile(pcf.c,$(FREETYPESRC)/pcf) DependTarget() + +DependSubdirs($(SUBDIRS)) Index: xc/lib/freetype2/freetype-def.cpp diff -u /dev/null xc/lib/freetype2/freetype-def.cpp:1.1 --- /dev/null Mon Jun 4 12:39:17 2001 +++ xc/lib/freetype2/freetype-def.cpp Thu Apr 5 15:29:38 2001 @@ -0,0 +1,160 @@ +LIBRARY libfreetype +VERSION LIBRARY_VERSION + +EXPORTS +ah_arctan +autohint_module_class +autohinter_interface +cff_driver_class +FT_Access_Frame +FT_Add64 +FT_Add_Module +FT_Alloc +FT_Attach_File +FT_Attach_Stream +FT_Create_Extensions +FT_Destroy_Extensions +FT_Div64by32 +FT_DivFix +FT_Done_Extensions +FT_Done_Face +FT_Done_GlyphSlot +FT_Done_Library +FT_Done_Size +FT_Done_Stream +FT_Extract_Frame +FT_Forget_Frame +FT_Free +FT_Get_Char +FT_Get_Char_Index +FT_Get_Extension +FT_Get_Glyph_Name +FT_Get_Kerning +FT_Get_Long +FT_Get_LongLE +FT_Get_Module +FT_Get_Module_Interface +FT_Get_Offset +FT_Get_Renderer +FT_Get_Sfnt_Name +FT_Get_Sfnt_Name_Count +FT_Get_Sfnt_Table +FT_Get_Short +FT_Get_ShortLE +FT_GlyphLoader_Add +FT_GlyphLoader_Check_Points +FT_GlyphLoader_Check_Subglyphs +FT_GlyphLoader_Copy_Points +FT_GlyphLoader_Create_Extra +FT_GlyphLoader_Done +FT_GlyphLoader_New +FT_GlyphLoader_Prepare +FT_GlyphLoader_Reset +FT_GlyphLoader_Rewind +FT_Init_Extensions +FT_List_Add +FT_List_Finalize +FT_List_Find +FT_List_Insert +FT_List_Iterate +FT_List_Remove +FT_List_Up +FT_Load_Char +FT_Load_Glyph +FT_Lookup_Renderer +FT_MulDiv +FT_MulFix +FT_MulTo64 +FT_New_Face +FT_New_GlyphSlot +FT_New_Library +FT_New_Memory_Face +FT_New_Memory_Stream +FT_New_Size +FT_Open_Face +FT_Outline_Copy +FT_Outline_Decompose +FT_Outline_Done +FT_Outline_Done_Internal +FT_Outline_Get_Bitmap +FT_Outline_Get_CBox +FT_Outline_New +FT_Outline_New_Internal +FT_Outline_Render +FT_Outline_Reverse +FT_Outline_Transform +FT_Outline_Translate +FT_Read_Char +FT_Read_Fields +FT_Read_Long +FT_Read_LongLE +FT_Read_Offset +FT_Read_Short +FT_Read_ShortLE +FT_Read_Stream +FT_Read_Stream_At +FT_Realloc +FT_Register_Extension +FT_Release_Frame +FT_Remove_Module +FT_Render_Glyph +FT_Render_Glyph_Internal +FT_Seek_Stream +FT_Select_Charmap +FT_Set_Char_Size +FT_Set_Charmap +FT_Set_Debug_Hook +FT_Set_Pixel_Sizes +FT_Set_Renderer +FT_Set_Transform +FT_Skip_Stream +FT_Sqrt64 +FT_SqrtFixed +FT_Stream_Pos +FT_Vector_Transform +FT_Outline_Get_BBox +FT_Done_Glyph +FT_Get_Glyph +FT_Glyph_Copy +FT_Glyph_Get_CBox +FT_Glyph_To_Bitmap +FT_Glyph_Transform +FT_Matrix_Invert +FT_Matrix_Multiply +ft_bitmap_glyph_class +ft_outline_glyph_class +FT_Add_Default_Modules +FT_Done_FreeType +FT_Init_FreeType +FT_Get_Multi_Master +FT_Set_MM_Blend_Coordinates +FT_Set_MM_Design_Coordinates +FT_Done_Memory +FT_New_Memory +FT_New_Stream +_cygwin_dll_entry@12 +_cygwin_noncygwin_dll_entry@12 +dll_main@12 +ps_table_funcs +psaux_module_class +t1_builder_funcs +t1_decoder_funcs +t1_parser_funcs +psnames_module_class +ft_raster1_renderer_class +ft_raster5_renderer_class +ft_standard_raster +sbit_metrics_fields +sfnt_module_class +ft_grays_raster +ft_smooth_renderer_class +grays_raster_render +TT_New_Context +TT_RunIns +tt_default_graphics_state +tt_driver_class +t1_driver_class +t1cid_driver_class +winfnt_driver_class + +/* $XFree86: xc/lib/freetype2/freetype-def.cpp,v 1.1 2001/04/05 19:29:38 dawes Exp $ */ Index: xc/lib/freetype2/freetype/Imakefile diff -u xc/lib/freetype2/freetype/Imakefile:1.2.2.1 xc/lib/freetype2/freetype/Imakefile:1.4 --- xc/lib/freetype2/freetype/Imakefile:1.2.2.1 Mon Mar 12 11:03:23 2001 +++ xc/lib/freetype2/freetype/Imakefile Tue May 15 23:57:27 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/freetype2/freetype/Imakefile,v 1.2.2.1 2001/03/12 16:03:23 keithp Exp $ +XCOMM $XFree86: xc/lib/freetype2/freetype/Imakefile,v 1.4 2001/05/16 03:57:27 keithp Exp $ #define IHaveSubdirs #define PassCDebugFlags @@ -20,9 +20,9 @@ ftmac.h \ ftmm.h \ ftmodule.h \ - ftnames.h \ ftoutln.h \ ftrender.h \ + ftsnames.h \ ftsynth.h \ ftsystem.h \ fttypes.h \ @@ -44,9 +44,9 @@ LinkSourceFile(ftmac.h,$(FREETYPEINC)) LinkSourceFile(ftmm.h,$(FREETYPEINC)) LinkSourceFile(ftmodule.h,$(FREETYPEINC)) -LinkSourceFile(ftnames.h,$(FREETYPEINC)) LinkSourceFile(ftoutln.h,$(FREETYPEINC)) LinkSourceFile(ftrender.h,$(FREETYPEINC)) +LinkSourceFile(ftsnames.h,$(FREETYPEINC)) LinkSourceFile(ftsynth.h,$(FREETYPEINC)) LinkSourceFile(ftsystem.h,$(FREETYPEINC)) LinkSourceFile(fttypes.h,$(FREETYPEINC)) @@ -54,3 +54,5 @@ LinkSourceFile(ttnameid.h,$(FREETYPEINC)) LinkSourceFile(tttables.h,$(FREETYPEINC)) LinkSourceFile(tttags.h,$(FREETYPEINC)) + +DependSubdirs($(SUBDIRS)) Index: xc/lib/freetype2/freetype/cache/Imakefile diff -u xc/lib/freetype2/freetype/cache/Imakefile:1.1.2.1 xc/lib/freetype2/freetype/cache/Imakefile:1.1 --- xc/lib/freetype2/freetype/cache/Imakefile:1.1.2.1 Mon Mar 12 11:03:23 2001 +++ xc/lib/freetype2/freetype/cache/Imakefile Wed Feb 7 19:55:41 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/freetype2/freetype/cache/Imakefile,v 1.1.2.1 2001/03/12 16:03:23 keithp Exp $ +XCOMM $XFree86: xc/lib/freetype2/freetype/cache/Imakefile,v 1.1 2001/02/08 00:55:41 keithp Exp $ FREETYPETOP = $(TOP)/extras/freetype2 FREETYPESRC = $(FREETYPETOP)/src Index: xc/lib/freetype2/freetype/config/Imakefile diff -u xc/lib/freetype2/freetype/config/Imakefile:1.1.2.1 xc/lib/freetype2/freetype/config/Imakefile:1.2 --- xc/lib/freetype2/freetype/config/Imakefile:1.1.2.1 Mon Mar 12 11:03:24 2001 +++ xc/lib/freetype2/freetype/config/Imakefile Tue May 15 23:57:28 2001 @@ -1,19 +1,19 @@ -XCOMM $XFree86: xc/lib/freetype2/freetype/config/Imakefile,v 1.1.2.1 2001/03/12 16:03:24 keithp Exp $ +XCOMM $XFree86: xc/lib/freetype2/freetype/config/Imakefile,v 1.2 2001/05/16 03:57:28 keithp Exp $ FREETYPETOP = $(TOP)/extras/freetype2 FREETYPESRC = $(FREETYPETOP)/src FREETYPEINC = $(FREETYPETOP)/include/freetype HEADERS= \ - ftbuild.h \ ftconfig.h \ + ftheader.h \ ftmodule.h \ ftoption.h BuildIncludes($(HEADERS),freetype2/freetype/config,../../..) InstallMultipleFlags($(HEADERS),$(INCDIR)/freetype2/freetype/config,$(INSTINCFLAGS)) -LinkSourceFile(ftbuild.h,$(FREETYPEINC)/config) LinkSourceFile(ftconfig.h,$(FREETYPEINC)/config) +LinkSourceFile(ftheader.h,$(FREETYPEINC)/config) LinkSourceFile(ftmodule.h,$(FREETYPEINC)/config) LinkSourceFile(ftoption.h,$(FREETYPEINC)/config) Index: xc/lib/freetype2/freetype/internal/Imakefile diff -u xc/lib/freetype2/freetype/internal/Imakefile:1.1.2.1 xc/lib/freetype2/freetype/internal/Imakefile:1.2 --- xc/lib/freetype2/freetype/internal/Imakefile:1.1.2.1 Mon Mar 12 11:03:24 2001 +++ xc/lib/freetype2/freetype/internal/Imakefile Tue May 15 23:57:28 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/freetype2/freetype/internal/Imakefile,v 1.1.2.1 2001/03/12 16:03:24 keithp Exp $ +XCOMM $XFree86: xc/lib/freetype2/freetype/internal/Imakefile,v 1.2 2001/05/16 03:57:28 keithp Exp $ FREETYPETOP = $(TOP)/extras/freetype2 FREETYPESRC = $(FREETYPETOP)/src @@ -6,6 +6,8 @@ HEADERS= \ autohint.h \ + cfferrs.h \ + cfftypes.h \ fnttypes.h \ ftcalc.h \ ftdebug.h \ @@ -15,13 +17,12 @@ ftobjs.h \ ftstream.h \ internal.h \ + pcftypes.h \ psaux.h \ psnames.h \ sfnt.h \ t1errors.h \ t1types.h \ - t2errors.h \ - t2types.h \ tterrors.h \ tttypes.h @@ -29,6 +30,8 @@ InstallMultipleFlags($(HEADERS),$(INCDIR)/freetype2/freetype/internal,$(INSTINCFLAGS)) LinkSourceFile(autohint.h,$(FREETYPEINC)/internal) +LinkSourceFile(cfferrs.h,$(FREETYPEINC)/internal) +LinkSourceFile(cfftypes.h,$(FREETYPEINC)/internal) LinkSourceFile(fnttypes.h,$(FREETYPEINC)/internal) LinkSourceFile(ftcalc.h,$(FREETYPEINC)/internal) LinkSourceFile(ftdebug.h,$(FREETYPEINC)/internal) @@ -38,12 +41,11 @@ LinkSourceFile(ftobjs.h,$(FREETYPEINC)/internal) LinkSourceFile(ftstream.h,$(FREETYPEINC)/internal) LinkSourceFile(internal.h,$(FREETYPEINC)/internal) +LinkSourceFile(pcftypes.h,$(FREETYPEINC)/internal) LinkSourceFile(psaux.h,$(FREETYPEINC)/internal) LinkSourceFile(psnames.h,$(FREETYPEINC)/internal) LinkSourceFile(sfnt.h,$(FREETYPEINC)/internal) LinkSourceFile(t1errors.h,$(FREETYPEINC)/internal) LinkSourceFile(t1types.h,$(FREETYPEINC)/internal) -LinkSourceFile(t2errors.h,$(FREETYPEINC)/internal) -LinkSourceFile(t2types.h,$(FREETYPEINC)/internal) LinkSourceFile(tterrors.h,$(FREETYPEINC)/internal) LinkSourceFile(tttypes.h,$(FREETYPEINC)/internal) Index: xc/lib/lbxutil/Imakefile diff -u xc/lib/lbxutil/Imakefile:1.7 xc/lib/lbxutil/Imakefile:1.8 --- xc/lib/lbxutil/Imakefile:1.7 Sat Apr 17 05:08:13 1999 +++ xc/lib/lbxutil/Imakefile Wed Jan 17 14:43:34 2001 @@ -1,10 +1,11 @@ -XCOMM $XConsortium: Imakefile /main/8 1996/11/03 19:32:12 kaleb $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:40 cpqbld Exp $ -XCOMM $XFree86: xc/lib/lbxutil/Imakefile,v 1.7 1999/04/17 09:08:13 dawes Exp $ +XCOMM $XFree86: xc/lib/lbxutil/Imakefile,v 1.8 2001/01/17 19:43:34 dawes Exp $ + #include #define IHaveSubdirs Index: xc/lib/lbxutil/delta/Imakefile diff -u xc/lib/lbxutil/delta/Imakefile:1.1.1.1 xc/lib/lbxutil/delta/Imakefile:1.1.1.2 --- xc/lib/lbxutil/delta/Imakefile:1.1.1.1 Sat Dec 21 22:29:26 1996 +++ xc/lib/lbxutil/delta/Imakefile Tue Jan 16 17:27:13 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: Imakefile /main/4 1996/12/04 10:23:49 lehors $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:40 cpqbld Exp $ #define IncSubdir X11 #include Index: xc/lib/lbxutil/delta/lbxdelta.c diff -u xc/lib/lbxutil/delta/lbxdelta.c:1.5 xc/lib/lbxutil/delta/lbxdelta.c:1.6 --- xc/lib/lbxutil/delta/lbxdelta.c:1.5 Wed Jun 7 18:03:02 2000 +++ xc/lib/lbxutil/delta/lbxdelta.c Wed Jan 17 14:43:34 2001 @@ -1,6 +1,6 @@ /* - * $NCDId: @(#)lbxdelta.c,v 1.2 1994/01/22 02:23:40 dct Exp $ - * $XConsortium: lbxdelta.c /main/7 1996/02/27 14:49:46 mor $ + * $NCDXorg: @(#)lbxdelta.c,v 1.2 1994/01/22 02:23:40 dct Exp $ + * $Xorg: lbxdelta.c,v 1.5 2000/08/17 19:46:40 cpqbld Exp $ * Copyright 1993 Network Computing Devices * * Permission to use, copy, modify, distribute, and sell this software and its @@ -22,7 +22,7 @@ * * Author: Dale Tonogai, Network Computing Devices */ -/* $XFree86: xc/lib/lbxutil/delta/lbxdelta.c,v 1.5 2000/06/07 22:03:02 tsi Exp $ */ +/* $XFree86: xc/lib/lbxutil/delta/lbxdelta.c,v 1.6 2001/01/17 19:43:34 dawes Exp $ */ #include "X.h" #include "Xproto.h" Index: xc/lib/lbxutil/image/Imakefile diff -u xc/lib/lbxutil/image/Imakefile:1.2 xc/lib/lbxutil/image/Imakefile:1.3 --- xc/lib/lbxutil/image/Imakefile:1.2 Sun Jan 5 06:52:20 1997 +++ xc/lib/lbxutil/image/Imakefile Wed Jan 17 14:43:35 2001 @@ -1,9 +1,9 @@ -XCOMM $XConsortium: Imakefile /main/5 1996/12/04 10:23:58 lehors $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:40 cpqbld Exp $ -XCOMM $XFree86: xc/lib/lbxutil/image/Imakefile,v 1.2 1997/01/05 11:52:20 dawes Exp $ +XCOMM $XFree86: xc/lib/lbxutil/image/Imakefile,v 1.3 2001/01/17 19:43:35 dawes Exp $ #define IncSubdir X11 #include Index: xc/lib/lbxutil/image/dfaxg42d.c diff -u xc/lib/lbxutil/image/dfaxg42d.c:1.4 xc/lib/lbxutil/image/dfaxg42d.c:1.6 --- xc/lib/lbxutil/image/dfaxg42d.c:1.4 Thu May 18 19:46:16 2000 +++ xc/lib/lbxutil/image/dfaxg42d.c Mon Apr 23 16:31:05 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: dfaxg42d.c /main/6 1996/11/04 16:50:55 rws $ */ +/* $Xorg: dfaxg42d.c,v 1.3 2000/08/17 19:46:40 cpqbld Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1992 Sam Leffler * Copyright (c) 1991, 1992 Silicon Graphics, Inc. @@ -22,11 +22,12 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ -/* $XFree86: xc/lib/lbxutil/image/dfaxg42d.c,v 1.4 2000/05/18 23:46:16 dawes Exp $ */ +/* $XFree86: xc/lib/lbxutil/image/dfaxg42d.c,v 1.6 2001/04/23 20:31:05 dawes Exp $ */ #include #include #include +#include #include "g3states.h" #include "lbxfax.h" #include "lbximage.h" Index: xc/lib/lbxutil/image/dpackbits.c diff -u xc/lib/lbxutil/image/dpackbits.c:1.3 xc/lib/lbxutil/image/dpackbits.c:1.4 --- xc/lib/lbxutil/image/dpackbits.c:1.3 Thu May 18 19:46:16 2000 +++ xc/lib/lbxutil/image/dpackbits.c Wed Jan 17 14:43:35 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: dpackbits.c /main/2 1995/10/18 16:45:17 mor $ */ +/* $Xorg: dpackbits.c,v 1.4 2000/08/17 19:46:40 cpqbld Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1992 Sam Leffler * Copyright (c) 1991, 1992 Silicon Graphics, Inc. @@ -22,7 +22,7 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ -/* $XFree86: xc/lib/lbxutil/image/dpackbits.c,v 1.3 2000/05/18 23:46:16 dawes Exp $ */ +/* $XFree86: xc/lib/lbxutil/image/dpackbits.c,v 1.4 2001/01/17 19:43:35 dawes Exp $ */ #include #include Index: xc/lib/lbxutil/image/efaxg42d.c diff -u xc/lib/lbxutil/image/efaxg42d.c:1.3 xc/lib/lbxutil/image/efaxg42d.c:1.5 --- xc/lib/lbxutil/image/efaxg42d.c:1.3 Thu May 18 19:46:16 2000 +++ xc/lib/lbxutil/image/efaxg42d.c Mon Apr 23 16:31:05 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: efaxg42d.c /main/6 1996/11/04 16:50:00 rws $ */ +/* $Xorg: efaxg42d.c,v 1.3 2000/08/17 19:46:41 cpqbld Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1992 Sam Leffler * Copyright (c) 1991, 1992 Silicon Graphics, Inc. @@ -22,10 +22,11 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ -/* $XFree86: xc/lib/lbxutil/image/efaxg42d.c,v 1.3 2000/05/18 23:46:16 dawes Exp $ */ +/* $XFree86: xc/lib/lbxutil/image/efaxg42d.c,v 1.5 2001/04/23 20:31:05 dawes Exp $ */ #include #include +#include #include "lbxfax.h" #include "lbximage.h" #include "lbxbwcodes.h" Index: xc/lib/lbxutil/image/epackbits.c diff -u xc/lib/lbxutil/image/epackbits.c:1.2 xc/lib/lbxutil/image/epackbits.c:1.3 --- xc/lib/lbxutil/image/epackbits.c:1.2 Thu May 18 19:46:16 2000 +++ xc/lib/lbxutil/image/epackbits.c Wed Jan 17 14:43:35 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: epackbits.c /main/2 1995/10/18 16:46:01 mor $ */ +/* $Xorg: epackbits.c,v 1.4 2000/08/17 19:46:41 cpqbld Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1992 Sam Leffler * Copyright (c) 1991, 1992 Silicon Graphics, Inc. Index: xc/lib/lbxutil/image/lbxbwcodes.h diff -u xc/lib/lbxutil/image/lbxbwcodes.h:1.1.1.1 xc/lib/lbxutil/image/lbxbwcodes.h:1.3 --- xc/lib/lbxutil/image/lbxbwcodes.h:1.1.1.1 Sat Dec 21 22:29:25 1996 +++ xc/lib/lbxutil/image/lbxbwcodes.h Sun Mar 4 20:05:12 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lbxbwcodes.h,v 1.1 95/01/17 18:17:40 mor Exp $ */ +/* $Xorg: lbxbwcodes.h,v 1.3 2000/08/17 19:46:41 cpqbld Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1992 Sam Leffler @@ -23,6 +23,7 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ +/* $XFree86: xc/lib/lbxutil/image/lbxbwcodes.h,v 1.3 2001/03/05 01:05:12 tsi Exp $ */ /* * Note that these tables are ordered such that the @@ -33,6 +34,11 @@ * during state generation (see mkg3states.c). */ +#ifdef __DARWIN__ +#ifndef TIFFaxWhiteCodes +#define TIFFFaxWhiteCodes Darwin_X_TIFFFaxWhiteCodes +#endif +#endif tableentry TIFFFaxWhiteCodes[] = { { 8, 0x35, 0 }, /* 0011 0101 */ { 6, 0x7, 1 }, /* 0001 11 */ @@ -145,6 +151,11 @@ { 12, 0x0, G3CODE_INVALID }, /* 0000 0000 0000 */ }; +#ifdef __DARWIN__ +#ifndef TIFFaxBlackCodes +#define TIFFFaxBlackCodes Darwin_X_TIFFFaxBlackCodes +#endif +#endif tableentry TIFFFaxBlackCodes[] = { { 10, 0x37, 0 }, /* 0000 1101 11 */ { 3, 0x2, 1 }, /* 010 */ Index: xc/lib/lbxutil/image/lbxfax.h diff -u xc/lib/lbxutil/image/lbxfax.h:1.2 xc/lib/lbxutil/image/lbxfax.h:1.5 --- xc/lib/lbxutil/image/lbxfax.h:1.2 Thu May 18 19:46:16 2000 +++ xc/lib/lbxutil/image/lbxfax.h Sun Mar 4 20:05:12 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: lbxfax.h /main/3 1996/11/04 16:49:07 rws $ */ +/* $Xorg: lbxfax.h,v 1.3 2000/08/17 19:46:41 cpqbld Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1992 Sam Leffler * Copyright (c) 1991, 1992 Silicon Graphics, Inc. @@ -22,6 +22,7 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ +/* $XFree86: xc/lib/lbxutil/image/lbxfax.h,v 1.5 2001/03/05 01:05:12 tsi Exp $ */ /* * This header file contains various constants and tables needed @@ -45,6 +46,12 @@ #define ROUNDUP8(x) ((x + 7) >> 3) +#ifdef __DARWIN__ +#ifndef TIFFaxWhiteCodes +#define TIFFFaxWhiteCodes Darwin_X_TIFFFaxWhiteCodes +#define TIFFFaxBlackCodes Darwin_X_TIFFFaxBlackCodes +#endif +#endif extern tableentry TIFFFaxWhiteCodes[]; extern tableentry TIFFFaxBlackCodes[]; Index: xc/lib/lbxutil/image/misc.c diff -u xc/lib/lbxutil/image/misc.c:1.2 xc/lib/lbxutil/image/misc.c:1.3 --- xc/lib/lbxutil/image/misc.c:1.2 Thu May 18 19:46:16 2000 +++ xc/lib/lbxutil/image/misc.c Wed Jan 17 14:43:35 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: misc.c,v 1.2 94/11/22 22:24:46 mor Exp $ */ +/* $Xorg: misc.c,v 1.3 2000/08/17 19:46:41 cpqbld Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1992 Sam Leffler * Copyright (c) 1991, 1992 Silicon Graphics, Inc. Index: xc/lib/lbxutil/image/mkg3states.c diff -u xc/lib/lbxutil/image/mkg3states.c:1.3 xc/lib/lbxutil/image/mkg3states.c:1.4 --- xc/lib/lbxutil/image/mkg3states.c:1.3 Mon Feb 1 06:55:49 1999 +++ xc/lib/lbxutil/image/mkg3states.c Wed Jan 17 14:43:35 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: mkg3states.c,v 1.2 95/01/17 20:29:41 mor Exp $ */ +/* $Xorg: mkg3states.c,v 1.3 2000/08/17 19:46:41 cpqbld Exp $ */ /* * Copyright (c) 1991, 1992 Sam Leffler * Copyright (c) 1991, 1992 Silicon Graphics, Inc. @@ -22,7 +22,7 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ -/* $XFree86: xc/lib/lbxutil/image/mkg3states.c,v 1.3 1999/02/01 11:55:49 dawes Exp $ */ +/* $XFree86: xc/lib/lbxutil/image/mkg3states.c,v 1.4 2001/01/17 19:43:35 dawes Exp $ */ /* * Program to construct Group 3 & Group 4 decoding tables. Index: xc/lib/lbxutil/lbx_zlib/Imakefile diff -u xc/lib/lbxutil/lbx_zlib/Imakefile:1.1.1.1 xc/lib/lbxutil/lbx_zlib/Imakefile:1.1.1.2 --- xc/lib/lbxutil/lbx_zlib/Imakefile:1.1.1.1 Sat Dec 21 22:29:28 1996 +++ xc/lib/lbxutil/lbx_zlib/Imakefile Tue Jan 16 17:27:21 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: Imakefile /main/4 1996/11/03 19:32:10 kaleb $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:41 cpqbld Exp $ #include Index: xc/lib/lbxutil/lbx_zlib/lbx_zlib.c diff -u xc/lib/lbxutil/lbx_zlib/lbx_zlib.c:1.6 xc/lib/lbxutil/lbx_zlib/lbx_zlib.c:1.7 --- xc/lib/lbxutil/lbx_zlib/lbx_zlib.c:1.6 Thu May 18 19:46:17 2000 +++ xc/lib/lbxutil/lbx_zlib/lbx_zlib.c Wed Jan 17 14:43:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: lbx_zlib.c /main/9 1998/02/09 10:23:12 kaleb $ */ +/* $Xorg: lbx_zlib.c,v 1.5 2000/08/17 19:46:41 cpqbld Exp $ */ /* @@ -46,7 +46,7 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/lib/lbxutil/lbx_zlib/lbx_zlib.c,v 1.6 2000/05/18 23:46:17 dawes Exp $ */ +/* $XFree86: xc/lib/lbxutil/lbx_zlib/lbx_zlib.c,v 1.7 2001/01/17 19:43:36 dawes Exp $ */ #ifdef WIN32 #define _WILLWINSOCK_ Index: xc/lib/lbxutil/lbx_zlib/lbx_zlib.h diff -u xc/lib/lbxutil/lbx_zlib/lbx_zlib.h:1.7 xc/lib/lbxutil/lbx_zlib/lbx_zlib.h:1.8 --- xc/lib/lbxutil/lbx_zlib/lbx_zlib.h:1.7 Wed Jun 7 18:03:02 2000 +++ xc/lib/lbxutil/lbx_zlib/lbx_zlib.h Wed Jan 17 14:43:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: lbx_zlib.h /main/4 1998/02/09 10:23:18 kaleb $ */ +/* $Xorg: lbx_zlib.h,v 1.3 2000/08/17 19:46:41 cpqbld Exp $ */ /* @@ -46,7 +46,7 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/lib/lbxutil/lbx_zlib/lbx_zlib.h,v 1.7 2000/06/07 22:03:02 tsi Exp $ */ +/* $XFree86: xc/lib/lbxutil/lbx_zlib/lbx_zlib.h,v 1.8 2001/01/17 19:43:36 dawes Exp $ */ #include "zlib.h" #include "Xfuncproto.h" Index: xc/lib/lbxutil/lbx_zlib/lbx_zlib_io.c diff -u xc/lib/lbxutil/lbx_zlib/lbx_zlib_io.c:1.10 xc/lib/lbxutil/lbx_zlib/lbx_zlib_io.c:1.11 --- xc/lib/lbxutil/lbx_zlib/lbx_zlib_io.c:1.10 Wed Jun 7 18:03:02 2000 +++ xc/lib/lbxutil/lbx_zlib/lbx_zlib_io.c Wed Jan 17 14:43:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: lbx_zlib_io.c /main/5 1997/08/17 23:00:20 kaleb $ */ +/* $Xorg: lbx_zlib_io.c,v 1.3 2000/08/17 19:46:41 cpqbld Exp $ */ /* * Copyright 1993 Network Computing Devices @@ -22,7 +22,7 @@ * * Author: Dale Tonogai, Network Computing Devices */ -/* $XFree86: xc/lib/lbxutil/lbx_zlib/lbx_zlib_io.c,v 1.10 2000/06/07 22:03:02 tsi Exp $ */ +/* $XFree86: xc/lib/lbxutil/lbx_zlib/lbx_zlib_io.c,v 1.11 2001/01/17 19:43:36 dawes Exp $ */ #ifdef WIN32 #define _WILLWINSOCK_ Index: xc/lib/lbxutil/lbx_zlib/reqstats.c diff -u xc/lib/lbxutil/lbx_zlib/reqstats.c:1.3 xc/lib/lbxutil/lbx_zlib/reqstats.c:1.4 --- xc/lib/lbxutil/lbx_zlib/reqstats.c:1.3 Tue Jun 27 17:26:33 2000 +++ xc/lib/lbxutil/lbx_zlib/reqstats.c Wed Jan 17 14:43:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: reqstats.c /main/11 1998/02/09 10:23:25 kaleb $ */ +/* $Xorg: reqstats.c,v 1.3 2000/08/17 19:46:41 cpqbld Exp $ */ /* @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/lbxutil/lbx_zlib/reqstats.c,v 1.3 2000/06/27 21:26:33 tsi Exp $ */ +/* $XFree86: xc/lib/lbxutil/lbx_zlib/reqstats.c,v 1.4 2001/01/17 19:43:36 dawes Exp $ */ #ifdef LBXREQSTATS Index: xc/lib/lbxutil/lbx_zlib/reqstats.h diff -u xc/lib/lbxutil/lbx_zlib/reqstats.h:1.1.1.2 xc/lib/lbxutil/lbx_zlib/reqstats.h:1.1.1.3 --- xc/lib/lbxutil/lbx_zlib/reqstats.h:1.1.1.2 Sun Sep 27 03:59:25 1998 +++ xc/lib/lbxutil/lbx_zlib/reqstats.h Tue Jan 16 17:27:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: reqstats.h /main/2 1998/02/09 10:23:30 kaleb $ */ +/* $Xorg: reqstats.h,v 1.3 2000/08/17 19:46:41 cpqbld Exp $ */ /* Index: xc/lib/oldX/Imakefile diff -u xc/lib/oldX/Imakefile:1.2 xc/lib/oldX/Imakefile:1.3 --- xc/lib/oldX/Imakefile:1.2 Sun Dec 20 06:57:19 1998 +++ xc/lib/oldX/Imakefile Wed Jan 17 14:43:37 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/28 1996/09/28 16:49:50 rws $ -XCOMM $XFree86: xc/lib/oldX/Imakefile,v 1.2 1998/12/20 11:57:19 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/oldX/Imakefile,v 1.3 2001/01/17 19:43:37 dawes Exp $ + #define DoNormalLib NormalOldX #define DoSharedLib SharedOldX #define DoExtraLib SharedOldX Index: xc/lib/oldX/X10.h diff -u xc/lib/oldX/X10.h:1.1.1.2 xc/lib/oldX/X10.h:1.1.1.3 --- xc/lib/oldX/X10.h:1.1.1.2 Sun Sep 27 03:49:32 1998 +++ xc/lib/oldX/X10.h Tue Jan 16 17:27:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: X10.h /main/6 1998/02/06 16:14:20 kaleb $ */ +/* $Xorg: X10.h,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ /* * Copyright 1985, 1986, 1987, 1998 The Open Group Index: xc/lib/oldX/XCrAssoc.c diff -u xc/lib/oldX/XCrAssoc.c:1.1.1.2 xc/lib/oldX/XCrAssoc.c:1.1.1.3 --- xc/lib/oldX/XCrAssoc.c:1.1.1.2 Sun Sep 27 03:49:33 1998 +++ xc/lib/oldX/XCrAssoc.c Tue Jan 16 17:27:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: XCrAssoc.c /main/6 1998/02/06 16:14:26 kaleb $ */ +/* $Xorg: XCrAssoc.c,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ /* Copyright 1985, 1998 The Open Group. Index: xc/lib/oldX/XDelAssoc.c diff -u xc/lib/oldX/XDelAssoc.c:1.2 xc/lib/oldX/XDelAssoc.c:1.3 --- xc/lib/oldX/XDelAssoc.c:1.2 Sun May 23 02:33:34 1999 +++ xc/lib/oldX/XDelAssoc.c Wed Jan 17 14:43:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: XDelAssoc.c /main/7 1998/02/06 16:14:31 kaleb $ */ +/* $Xorg: XDelAssoc.c,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ /* Copyright 1985, 1998 The Open Group. @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/oldX/XDelAssoc.c,v 1.2 1999/05/23 06:33:34 dawes Exp $ */ +/* $XFree86: xc/lib/oldX/XDelAssoc.c,v 1.3 2001/01/17 19:43:37 dawes Exp $ */ #include "Xlibint.h" #include "X10.h" Index: xc/lib/oldX/XDestAssoc.c diff -u xc/lib/oldX/XDestAssoc.c:1.2 xc/lib/oldX/XDestAssoc.c:1.3 --- xc/lib/oldX/XDestAssoc.c:1.2 Sun May 23 02:33:34 1999 +++ xc/lib/oldX/XDestAssoc.c Wed Jan 17 14:43:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: XDestAssoc.c /main/6 1998/02/06 16:14:37 kaleb $ */ +/* $Xorg: XDestAssoc.c,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ /* Copyright 1985, 1998 The Open Group. @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/oldX/XDestAssoc.c,v 1.2 1999/05/23 06:33:34 dawes Exp $ */ +/* $XFree86: xc/lib/oldX/XDestAssoc.c,v 1.3 2001/01/17 19:43:38 dawes Exp $ */ #include "Xlibint.h" #include "X10.h" Index: xc/lib/oldX/XDraw.c diff -u xc/lib/oldX/XDraw.c:1.2 xc/lib/oldX/XDraw.c:1.3 --- xc/lib/oldX/XDraw.c:1.2 Sun May 23 02:33:35 1999 +++ xc/lib/oldX/XDraw.c Wed Jan 17 14:43:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: XDraw.c /main/13 1998/02/06 16:14:41 kaleb $ */ +/* $Xorg: XDraw.c,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ /* @@ -26,7 +26,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/oldX/XDraw.c,v 1.2 1999/05/23 06:33:35 dawes Exp $ */ +/* $XFree86: xc/lib/oldX/XDraw.c,v 1.3 2001/01/17 19:43:38 dawes Exp $ */ #include "Xlibint.h" #include "Xlib.h" Index: xc/lib/oldX/XLookAssoc.c diff -u xc/lib/oldX/XLookAssoc.c:1.1.1.2 xc/lib/oldX/XLookAssoc.c:1.1.1.3 --- xc/lib/oldX/XLookAssoc.c:1.1.1.2 Sun Sep 27 03:49:37 1998 +++ xc/lib/oldX/XLookAssoc.c Tue Jan 16 17:27:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: XLookAssoc.c /main/7 1998/02/06 16:14:47 kaleb $ */ +/* $Xorg: XLookAssoc.c,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ /* Copyright 1985, 1998 The Open Group Index: xc/lib/oldX/XMakeAssoc.c diff -u xc/lib/oldX/XMakeAssoc.c:1.2 xc/lib/oldX/XMakeAssoc.c:1.3 --- xc/lib/oldX/XMakeAssoc.c:1.2 Sun May 23 02:33:35 1999 +++ xc/lib/oldX/XMakeAssoc.c Wed Jan 17 14:43:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: XMakeAssoc.c /main/9 1998/02/06 16:14:52 kaleb $ */ +/* $Xorg: XMakeAssoc.c,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ /* Copyright 1985, 1998 The Open Group. @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/oldX/XMakeAssoc.c,v 1.2 1999/05/23 06:33:35 dawes Exp $ */ +/* $XFree86: xc/lib/oldX/XMakeAssoc.c,v 1.3 2001/01/17 19:43:38 dawes Exp $ */ #include "Xlibint.h" #include "X10.h" Index: xc/lib/oldX/oldX-def.cpp diff -u xc/lib/oldX/oldX-def.cpp:1.1.1.2 xc/lib/oldX/oldX-def.cpp:1.1.1.3 --- xc/lib/oldX/oldX-def.cpp:1.1.1.2 Sat Dec 21 22:17:37 1996 +++ xc/lib/oldX/oldX-def.cpp Tue Jan 16 17:27:30 2001 @@ -8,4 +8,4 @@ XDestroyAssocTable XLookUpAssoc XMakeAssoc -/* $XConsortium: oldX-def.cpp /main/2 1996/05/07 13:15:41 kaleb $ */ +/* $Xorg: oldX-def.cpp,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ Index: xc/lib/xkbfile/Imakefile diff -u xc/lib/xkbfile/Imakefile:3.2 xc/lib/xkbfile/Imakefile:3.3 --- xc/lib/xkbfile/Imakefile:3.2 Sun Dec 20 06:57:20 1998 +++ xc/lib/xkbfile/Imakefile Wed Jan 17 14:43:39 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/5 1996/09/28 16:49:56 rws $ -XCOMM $XFree86: xc/lib/xkbfile/Imakefile,v 3.2 1998/12/20 11:57:20 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/lib/xkbfile/Imakefile,v 3.3 2001/01/17 19:43:39 dawes Exp $ + #define DoNormalLib YES #define DoSharedLib NO #define DoExtraLib NO Index: xc/lib/xkbfile/XKBbells.h diff -u xc/lib/xkbfile/XKBbells.h:3.1 xc/lib/xkbfile/XKBbells.h:3.2 --- xc/lib/xkbfile/XKBbells.h:3.1 Mon Dec 23 01:03:56 1996 +++ xc/lib/xkbfile/XKBbells.h Wed Jan 17 14:43:39 2001 @@ -1,7 +1,7 @@ #ifndef _XKBBELLS_H_ #define _XKBBELLS_H_ 1 -/* $XConsortium: XKBbells.h /main/4 1996/08/31 12:44:47 kaleb $ */ +/* $Xorg: XKBbells.h,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ /************************************************************ Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc. Index: xc/lib/xkbfile/XKBconfig.h diff -u xc/lib/xkbfile/XKBconfig.h:3.4 xc/lib/xkbfile/XKBconfig.h:3.5 --- xc/lib/xkbfile/XKBconfig.h:3.4 Mon Jun 19 11:00:44 2000 +++ xc/lib/xkbfile/XKBconfig.h Wed Jan 17 14:43:39 2001 @@ -1,7 +1,7 @@ #ifndef _XKBCONFIG_H_ #define _XKBCONFIG_H_ 1 -/* $XConsortium: XKBconfig.h /main/4 1996/08/31 12:44:53 kaleb $ */ +/* $Xorg: XKBconfig.h,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ /************************************************************ Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc. @@ -27,7 +27,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/XKBconfig.h,v 3.4 2000/06/19 15:00:44 tsi Exp $ */ +/* $XFree86: xc/lib/xkbfile/XKBconfig.h,v 3.5 2001/01/17 19:43:39 dawes Exp $ */ typedef struct _XkbConfigRtrn *XkbConfigRtrnPtr; Index: xc/lib/xkbfile/XKBfile.h diff -u xc/lib/xkbfile/XKBfile.h:3.2 xc/lib/xkbfile/XKBfile.h:3.3 --- xc/lib/xkbfile/XKBfile.h:3.2 Mon Dec 23 01:03:58 1996 +++ xc/lib/xkbfile/XKBfile.h Wed Jan 17 14:43:40 2001 @@ -1,7 +1,7 @@ #ifndef _XKBFILE_H_ #define _XKBFILE_H_ 1 -/* $XConsortium: XKBfile.h /main/6 1996/08/31 12:44:58 kaleb $ */ +/* $Xorg: XKBfile.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ /************************************************************ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. Index: xc/lib/xkbfile/XKBfileInt.h diff -u xc/lib/xkbfile/XKBfileInt.h:3.2 xc/lib/xkbfile/XKBfileInt.h:3.3 --- xc/lib/xkbfile/XKBfileInt.h:3.2 Mon Dec 23 01:03:59 1996 +++ xc/lib/xkbfile/XKBfileInt.h Wed Jan 17 14:43:40 2001 @@ -1,7 +1,7 @@ #ifndef _XKBFILEINT_H_ #define _XKBFILEINT_H_ 1 -/* $XConsortium: XKBfileInt.h /main/3 1996/08/31 12:45:04 kaleb $ */ +/* $Xorg: XKBfileInt.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ /************************************************************ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. Index: xc/lib/xkbfile/XKBrules.h diff -u xc/lib/xkbfile/XKBrules.h:3.1 xc/lib/xkbfile/XKBrules.h:3.2 --- xc/lib/xkbfile/XKBrules.h:3.1 Fri Dec 27 01:50:57 1996 +++ xc/lib/xkbfile/XKBrules.h Wed Jan 17 14:43:40 2001 @@ -1,7 +1,7 @@ #ifndef _XKBRULES_H_ #define _XKBRULES_H_ 1 -/* $XConsortium: XKBrules.h /main/1 1996/08/31 12:45:06 kaleb $ */ +/* $Xorg: XKBrules.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ /************************************************************ Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc. Index: xc/lib/xkbfile/XKM.h diff -u xc/lib/xkbfile/XKM.h:1.1.1.1 xc/lib/xkbfile/XKM.h:1.1.1.2 --- xc/lib/xkbfile/XKM.h:1.1.1.1 Wed Jan 3 02:00:19 1996 +++ xc/lib/xkbfile/XKM.h Tue Jan 16 17:27:37 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKM.h /main/2 1995/12/07 21:18:26 kaleb $ */ +/* $Xorg: XKM.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ /************************************************************ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. Index: xc/lib/xkbfile/XKMformat.h diff -u xc/lib/xkbfile/XKMformat.h:1.1.1.1 xc/lib/xkbfile/XKMformat.h:1.1.1.2 --- xc/lib/xkbfile/XKMformat.h:1.1.1.1 Wed Jan 3 02:00:19 1996 +++ xc/lib/xkbfile/XKMformat.h Tue Jan 16 17:27:38 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XKMformat.h /main/2 1995/12/07 21:18:30 kaleb $ */ +/* $Xorg: XKMformat.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ /************************************************************ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. Index: xc/lib/xkbfile/cout.c diff -u xc/lib/xkbfile/cout.c:3.4 xc/lib/xkbfile/cout.c:3.5 --- xc/lib/xkbfile/cout.c:3.4 Sun Oct 26 08:24:56 1997 +++ xc/lib/xkbfile/cout.c Wed Jan 17 14:43:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: cout.c /main/6 1997/08/17 23:01:29 kaleb $ */ +/* $Xorg: cout.c,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ /************************************************************ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/cout.c,v 3.4 1997/10/26 13:24:56 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/cout.c,v 3.5 2001/01/17 19:43:40 dawes Exp $ */ #include #include Index: xc/lib/xkbfile/magic diff -u xc/lib/xkbfile/magic:1.1.1.2 xc/lib/xkbfile/magic:1.1.1.3 --- xc/lib/xkbfile/magic:1.1.1.2 Sun Sep 27 03:59:11 1998 +++ xc/lib/xkbfile/magic Tue Jan 16 17:27:40 2001 @@ -1,4 +1,4 @@ -# $TOG: magic /main/3 1998/02/06 15:24:51 kaleb $ +# $Xorg: magic,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ # Here are some lines you can add to /etc/magic # to identify XKM (compiled X keymap) files # and determine their version and the byte ordering Index: xc/lib/xkbfile/maprules.c diff -u xc/lib/xkbfile/maprules.c:3.11 xc/lib/xkbfile/maprules.c:3.12 --- xc/lib/xkbfile/maprules.c:3.11 Sun Oct 26 08:24:56 1997 +++ xc/lib/xkbfile/maprules.c Wed Jan 17 14:43:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: maprules.c /main/13 1997/08/17 23:06:24 kaleb $ */ +/* $Xorg: maprules.c,v 1.4 2000/08/17 19:46:43 cpqbld Exp $ */ /************************************************************ Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/maprules.c,v 3.11 1997/10/26 13:24:56 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/maprules.c,v 3.12 2001/01/17 19:43:41 dawes Exp $ */ #include #include @@ -1251,7 +1251,7 @@ #endif { Atom rules_atom,actual_type; -int fmt,len; +int fmt; unsigned long nitems,bytes_after; char *data,*out; Status rtrn; Index: xc/lib/xkbfile/srvmisc.c diff -u xc/lib/xkbfile/srvmisc.c:3.0 xc/lib/xkbfile/srvmisc.c:3.1 --- xc/lib/xkbfile/srvmisc.c:3.0 Sun Mar 3 23:20:38 1996 +++ xc/lib/xkbfile/srvmisc.c Wed Jan 17 14:43:41 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: srvmisc.c /main/4 1996/03/01 14:30:31 kaleb $ */ +/* $Xorg: srvmisc.c,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ /************************************************************ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. Index: xc/lib/xkbfile/xkbatom.c diff -u xc/lib/xkbfile/xkbatom.c:3.5 xc/lib/xkbfile/xkbatom.c:3.6 --- xc/lib/xkbfile/xkbatom.c:3.5 Sat Oct 3 05:07:33 1998 +++ xc/lib/xkbfile/xkbatom.c Wed Jan 17 14:43:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: xkbatom.c /main/5 1998/02/06 15:21:40 kaleb $ */ +/* $Xorg: xkbatom.c,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -67,7 +67,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkbatom.c,v 3.5 1998/10/03 09:07:33 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkbatom.c,v 3.6 2001/01/17 19:43:42 dawes Exp $ */ #include #include Index: xc/lib/xkbfile/xkbbells.c diff -u xc/lib/xkbfile/xkbbells.c:1.1.1.3 xc/lib/xkbfile/xkbbells.c:1.1.1.4 --- xc/lib/xkbfile/xkbbells.c:1.1.1.3 Mon Jan 15 01:55:13 1996 +++ xc/lib/xkbfile/xkbbells.c Tue Jan 16 17:27:43 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: xkbbells.c /main/3 1996/01/14 16:44:18 kaleb $ */ +/* $Xorg: xkbbells.c,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ /************************************************************ Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc. Index: xc/lib/xkbfile/xkbconfig.c diff -u xc/lib/xkbfile/xkbconfig.c:3.4 xc/lib/xkbfile/xkbconfig.c:3.5 --- xc/lib/xkbfile/xkbconfig.c:3.4 Wed Jun 14 14:20:33 2000 +++ xc/lib/xkbfile/xkbconfig.c Wed Jan 17 14:43:42 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: xkbconfig.c /main/5 1996/12/27 20:52:56 kaleb $ */ +/* $Xorg: xkbconfig.c,v 1.4 2000/08/17 19:46:43 cpqbld Exp $ */ /************************************************************ Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkbconfig.c,v 3.4 2000/06/14 18:20:33 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkbconfig.c,v 3.5 2001/01/17 19:43:42 dawes Exp $ */ #include #include @@ -354,7 +354,7 @@ else if (_XkbStrCaseCmp(name,"slowkeysreject")==0) *opts_rtrn= XkbAX_SKRejectFBMask; else if (_XkbStrCaseCmp(name,"bouncekeysreject")==0) - *opts_rtrn= XkbAX_SKRejectFBMask; + *opts_rtrn= XkbAX_BKRejectFBMask; else if (_XkbStrCaseCmp(name,"dumbbell")==0) *opts_rtrn= XkbAX_DumbBellFBMask; else { Index: xc/lib/xkbfile/xkbdraw.c diff -u xc/lib/xkbfile/xkbdraw.c:1.1.1.1 xc/lib/xkbfile/xkbdraw.c:1.1.1.2 --- xc/lib/xkbfile/xkbdraw.c:1.1.1.1 Sun Feb 4 02:45:47 1996 +++ xc/lib/xkbfile/xkbdraw.c Tue Jan 16 17:27:44 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: xkbdraw.c /main/1 1996/02/02 14:13:11 kaleb $ */ +/* $Xorg: xkbdraw.c,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ /************************************************************ Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc. Index: xc/lib/xkbfile/xkberrs.c diff -u xc/lib/xkbfile/xkberrs.c:3.1 xc/lib/xkbfile/xkberrs.c:3.2 --- xc/lib/xkbfile/xkberrs.c:3.1 Mon Dec 23 01:04:05 1996 +++ xc/lib/xkbfile/xkberrs.c Wed Jan 17 14:43:42 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: xkberrs.c /main/2 1996/08/31 12:45:31 kaleb $ */ +/* $Xorg: xkberrs.c,v 1.3 2000/08/17 19:46:44 cpqbld Exp $ */ /************************************************************ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. Index: xc/lib/xkbfile/xkbmisc.c diff -u xc/lib/xkbfile/xkbmisc.c:1.1.1.6 xc/lib/xkbfile/xkbmisc.c:1.1.1.7 --- xc/lib/xkbfile/xkbmisc.c:1.1.1.6 Sun Dec 29 05:18:09 1996 +++ xc/lib/xkbfile/xkbmisc.c Tue Jan 16 17:27:45 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: xkbmisc.c /main/7 1996/12/27 20:53:10 kaleb $ */ +/* $Xorg: xkbmisc.c,v 1.4 2000/08/17 19:46:44 cpqbld Exp $ */ /************************************************************ Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc. @@ -105,7 +105,7 @@ char c, *s; register int n; - for (n=0, s = buf1; c = *str1++; n++) { + for (n=0, s = buf1; (c = *str1++); n++) { if (isupper(c)) c = tolower(c); if (n>510) @@ -113,7 +113,7 @@ *s++ = c; } *s = '\0'; - for (n=0, s = buf2; c = *str2++; n++) { + for (n=0, s = buf2; (c = *str2++); n++) { if (isupper(c)) c = tolower(c); if (n>510) Index: xc/lib/xkbfile/xkbout.c diff -u xc/lib/xkbfile/xkbout.c:3.6 xc/lib/xkbfile/xkbout.c:3.7 --- xc/lib/xkbfile/xkbout.c:3.6 Tue Oct 24 18:45:02 2000 +++ xc/lib/xkbfile/xkbout.c Wed Jan 17 14:43:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: xkbout.c /main/8 1997/06/13 05:59:04 kaleb $ */ +/* $Xorg: xkbout.c,v 1.3 2000/08/17 19:46:44 cpqbld Exp $ */ /************************************************************ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkbout.c,v 3.6 2000/10/24 22:45:02 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkbout.c,v 3.7 2001/01/17 19:43:42 dawes Exp $ */ #include #include Index: xc/lib/xkbfile/xkbtext.c diff -u xc/lib/xkbfile/xkbtext.c:3.7 xc/lib/xkbfile/xkbtext.c:3.8 --- xc/lib/xkbfile/xkbtext.c:3.7 Tue Oct 24 18:45:02 2000 +++ xc/lib/xkbfile/xkbtext.c Wed Jan 17 14:43:43 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: xkbtext.c /main/7 1996/12/28 05:39:31 kaleb $ */ +/* $Xorg: xkbtext.c,v 1.3 2000/08/17 19:46:44 cpqbld Exp $ */ /************************************************************ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkbtext.c,v 3.7 2000/10/24 22:45:02 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkbtext.c,v 3.8 2001/01/17 19:43:43 dawes Exp $ */ #include #include Index: xc/lib/xkbfile/xkmout.c diff -u xc/lib/xkbfile/xkmout.c:1.3 xc/lib/xkbfile/xkmout.c:1.4 --- xc/lib/xkbfile/xkmout.c:1.3 Fri Oct 27 20:34:01 2000 +++ xc/lib/xkbfile/xkmout.c Wed Jan 17 14:43:43 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: xkmout.c /main/5 1996/01/23 10:11:10 kaleb $ */ +/* $Xorg: xkmout.c,v 1.3 2000/08/17 19:46:44 cpqbld Exp $ */ /************************************************************ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkmout.c,v 1.3 2000/10/28 00:34:01 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkmout.c,v 1.4 2001/01/17 19:43:43 dawes Exp $ */ #include #include Index: xc/lib/xkbfile/xkmread.c diff -u xc/lib/xkbfile/xkmread.c:1.3 xc/lib/xkbfile/xkmread.c:1.4 --- xc/lib/xkbfile/xkmread.c:1.3 Fri Oct 27 20:34:02 2000 +++ xc/lib/xkbfile/xkmread.c Wed Jan 17 14:43:43 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: xkmread.c /main/4 1996/01/14 16:44:36 kaleb $ */ +/* $Xorg: xkmread.c,v 1.3 2000/08/17 19:46:44 cpqbld Exp $ */ /************************************************************ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkmread.c,v 1.3 2000/10/28 00:34:02 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkmread.c,v 1.4 2001/01/17 19:43:43 dawes Exp $ */ #include Index: xc/lib/xtrans/Imakefile diff -u xc/lib/xtrans/Imakefile:1.1.1.2 xc/lib/xtrans/Imakefile:1.1.1.3 --- xc/lib/xtrans/Imakefile:1.1.1.2 Sat Dec 21 22:28:56 1996 +++ xc/lib/xtrans/Imakefile Tue Jan 16 17:27:48 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: Imakefile /main/12 1996/09/28 16:50:08 rws $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:44 cpqbld Exp $ #define IncSubdir X11 Index: xc/lib/xtrans/Xtrans.c diff -u xc/lib/xtrans/Xtrans.c:3.23 xc/lib/xtrans/Xtrans.c:3.24 --- xc/lib/xtrans/Xtrans.c:3.23 Tue Oct 24 18:45:02 2000 +++ xc/lib/xtrans/Xtrans.c Wed Jan 17 14:43:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xtrans.c /main/34 1998/02/06 15:55:15 kaleb $ */ +/* $Xorg: Xtrans.c,v 1.3 2000/08/17 19:46:45 cpqbld Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtrans.c,v 3.23 2000/10/24 22:45:02 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtrans.c,v 3.24 2001/01/17 19:43:45 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * Index: xc/lib/xtrans/Xtrans.h diff -u xc/lib/xtrans/Xtrans.h:3.14 xc/lib/xtrans/Xtrans.h:3.15 --- xc/lib/xtrans/Xtrans.h:3.14 Sun Dec 12 21:52:54 1999 +++ xc/lib/xtrans/Xtrans.h Wed Jan 17 14:43:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xtrans.h /main/31 1998/02/06 15:55:22 kaleb $ */ +/* $Xorg: Xtrans.h,v 1.3 2000/08/17 19:46:45 cpqbld Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtrans.h,v 3.14 1999/12/13 02:52:54 robin Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtrans.h,v 3.15 2001/01/17 19:43:45 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * Index: xc/lib/xtrans/Xtransam.c diff -u xc/lib/xtrans/Xtransam.c:3.2 xc/lib/xtrans/Xtransam.c:3.3 --- xc/lib/xtrans/Xtransam.c:3.2 Sat Oct 3 05:07:34 1998 +++ xc/lib/xtrans/Xtransam.c Wed Jan 17 14:43:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xtransam.c /main/5 1998/02/06 15:54:26 kaleb $ */ +/* $Xorg: Xtransam.c,v 1.3 2000/08/17 19:46:45 cpqbld Exp $ */ /* Copyright 1994, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtransam.c,v 3.2 1998/10/03 09:07:34 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtransam.c,v 3.3 2001/01/17 19:43:46 dawes Exp $ */ /* Copyright 1994 Vrije Universiteit Amsterdam, Netherlands * Index: xc/lib/xtrans/Xtransdnet.c diff -u xc/lib/xtrans/Xtransdnet.c:3.4 xc/lib/xtrans/Xtransdnet.c:3.5 --- xc/lib/xtrans/Xtransdnet.c:3.4 Sun Jun 20 04:41:21 1999 +++ xc/lib/xtrans/Xtransdnet.c Wed Jan 17 14:43:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xtransdnet.c /main/17 1998/02/06 15:54:33 kaleb $ */ +/* $Xorg: Xtransdnet.c,v 1.3 2000/08/17 19:46:45 cpqbld Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtransdnet.c,v 3.4 1999/06/20 08:41:21 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtransdnet.c,v 3.5 2001/01/17 19:43:46 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * Index: xc/lib/xtrans/Xtransint.h diff -u xc/lib/xtrans/Xtransint.h:3.27 xc/lib/xtrans/Xtransint.h:3.28 --- xc/lib/xtrans/Xtransint.h:3.27 Sun Dec 26 19:39:28 1999 +++ xc/lib/xtrans/Xtransint.h Wed Jan 17 14:43:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xtransint.h /main/27 1998/02/06 15:54:39 kaleb $ */ +/* $Xorg: Xtransint.h,v 1.3 2000/08/17 19:46:46 cpqbld Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtransint.h,v 3.27 1999/12/27 00:39:28 robin Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtransint.h,v 3.28 2001/01/17 19:43:46 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * Index: xc/lib/xtrans/Xtranslcl.c diff -u xc/lib/xtrans/Xtranslcl.c:3.33 xc/lib/xtrans/Xtranslcl.c:3.34 --- xc/lib/xtrans/Xtranslcl.c:3.33 Sun Jun 20 04:41:22 1999 +++ xc/lib/xtrans/Xtranslcl.c Wed Jan 17 14:43:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xtranslcl.c /main/37 1998/04/29 07:18:40 barstow $ */ +/* $Xorg: Xtranslcl.c,v 1.3 2000/08/17 19:46:46 cpqbld Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtranslcl.c,v 3.33 1999/06/20 08:41:22 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtranslcl.c,v 3.34 2001/01/17 19:43:47 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * Index: xc/lib/xtrans/Xtranssock.c diff -u xc/lib/xtrans/Xtranssock.c:3.47 xc/lib/xtrans/Xtranssock.c:3.49 --- xc/lib/xtrans/Xtranssock.c:3.47 Thu May 11 14:14:10 2000 +++ xc/lib/xtrans/Xtranssock.c Fri Jan 19 01:41:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xtranssock.c /main/61 1998/02/06 15:54:53 kaleb $ */ +/* $Xorg: Xtranssock.c,v 1.8 2000/08/17 19:46:46 cpqbld Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtranssock.c,v 3.47 2000/05/11 18:14:10 tsi Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtranssock.c,v 3.49 2001/01/19 06:41:02 keithp Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * @@ -51,6 +51,7 @@ #ifdef XTHREADS #include #endif + #ifndef WIN32 #if defined(TCPCONN) || defined(UNIXCONN) @@ -60,6 +61,7 @@ #include #endif #endif + #if defined(TCPCONN) || defined(UNIXCONN) #define X_INCLUDE_NETDB_H #define XOS_USE_NO_LOCKING @@ -77,14 +79,10 @@ #include #endif -#if defined(hpux) || defined(__EMX__) -#define NO_TCP_H -#endif /* hpux */ -#ifdef MOTOROLA -#ifdef SYSV +#if defined(hpux) || defined(__EMX__) || (defined(MOTOROLA) && defined(SYSV)) #define NO_TCP_H -#endif /* SYSV */ -#endif /* MOTOROLA */ +#endif + #ifndef NO_TCP_H #ifdef __osf__ #include @@ -94,18 +92,19 @@ #endif /* __NetBSD__ || __OpenBSD__ || __FreeBSD__ */ #include #endif /* !NO_TCP_H */ + #include -#if defined(SVR4) && !defined(SCO325) && !defined(DGUX) +#if defined(SVR4) && !defined(SCO325) && !defined(DGUX) && !defined(_SEQUENT_) #include #endif -#if (defined(i386) && defined(SYSV)) || defined(_SEQUENT_) -#if !defined(_SEQUENT_) && !defined(ESIX) && !defined(sco) + +#if (defined(i386) && defined(SYSV)) && !defined(ESIX) && !defined(sco) #include -#endif /* _SEQUENT_ || ESIX || SCO */ -#if !defined(ISC) || !defined(I_NREAD) || defined(SCO325) +#endif + +#if (defined(i386) && defined(SYSV)) && (!defined(ISC) || !defined(I_NREAD) || defined(SCO325)) || defined(_SEQUENT_) #include -#endif -#endif /* i386 && SYSV || _SEQUENT_ */ +#endif #else /* !WIN32 */ @@ -1374,6 +1373,23 @@ ntohs(sockname.sin_port), 0, 0); /* + * Turn on socket keepalive so the client process will eventually + * be notified with a SIGPIPE signal if the display server fails + * to respond to a periodic transmission of messages + * on the connected socket. + * This is useful to avoid hung application processes when the + * processes are not spawned from the xdm session and + * the display server terminates abnormally. + * (Someone turned off the power switch.) + */ + + { + int tmp = 1; + setsockopt (ciptr->fd, SOL_SOCKET, SO_KEEPALIVE, + (char *) &tmp, sizeof (int)); + } + + /* * Do the connect() */ @@ -1695,7 +1711,7 @@ #ifdef WIN32 return ioctlsocket ((SOCKET) ciptr->fd, FIONREAD, (u_long *) pend); #else -#if (defined(i386) && defined(SYSV)) || defined(_SEQUENT_) +#if (defined(i386) && defined(SYSV) && !defined(sco)) || (defined(_SEQUENT_) && _SOCKET_VERSION == 1) return ioctl (ciptr->fd, I_NREAD, (char *) pend); #else #if defined(__EMX__) @@ -1703,7 +1719,7 @@ #else return ioctl (ciptr->fd, FIONREAD, (char *) pend); #endif /* __EMX__ */ -#endif /* i386 && SYSV && !SCO || _SEQUENT_ */ +#endif /* i386 && SYSV || _SEQUENT_ && _SOCKET_VERSION == 1 */ #endif /* WIN32 */ } Index: xc/lib/xtrans/Xtranstli.c diff -u xc/lib/xtrans/Xtranstli.c:3.8 xc/lib/xtrans/Xtranstli.c:3.9 --- xc/lib/xtrans/Xtranstli.c:3.8 Sun Jun 20 04:41:23 1999 +++ xc/lib/xtrans/Xtranstli.c Wed Jan 17 14:43:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xtranstli.c /main/29 1998/04/22 16:31:16 barstow $ */ +/* $Xorg: Xtranstli.c,v 1.3 2000/08/17 19:46:46 cpqbld Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtranstli.c,v 3.8 1999/06/20 08:41:23 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtranstli.c,v 3.9 2001/01/17 19:43:48 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * Index: xc/lib/xtrans/Xtransutil.c diff -u xc/lib/xtrans/Xtransutil.c:3.16 xc/lib/xtrans/Xtransutil.c:3.17 --- xc/lib/xtrans/Xtransutil.c:3.16 Wed Aug 9 19:40:15 2000 +++ xc/lib/xtrans/Xtransutil.c Wed Jan 17 14:43:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: Xtransutil.c /main/33 1998/02/06 15:55:10 kaleb $ */ +/* $Xorg: Xtransutil.c,v 1.3 2000/08/17 19:46:46 cpqbld Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtransutil.c,v 3.16 2000/08/09 23:40:15 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtransutil.c,v 3.17 2001/01/17 19:43:49 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * Index: xc/lib/xtrans/transport.c diff -u xc/lib/xtrans/transport.c:3.4 xc/lib/xtrans/transport.c:3.5 --- xc/lib/xtrans/transport.c:3.4 Sat Oct 3 05:07:37 1998 +++ xc/lib/xtrans/transport.c Wed Jan 17 14:43:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: transport.c /main/7 1998/02/06 15:54:19 kaleb $ */ +/* $Xorg: transport.c,v 1.3 2000/08/17 19:46:46 cpqbld Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/transport.c,v 3.4 1998/10/03 09:07:37 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/transport.c,v 3.5 2001/01/17 19:43:49 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * Index: xc/lib/zlib/Imakefile diff -u xc/lib/zlib/Imakefile:1.7 xc/lib/zlib/Imakefile:1.8 --- xc/lib/zlib/Imakefile:1.7 Wed Aug 9 19:40:16 2000 +++ xc/lib/zlib/Imakefile Wed Jan 17 14:43:50 2001 @@ -1,10 +1,10 @@ -XCOMM $TOG: Imakefile /main/4 1998/02/04 14:32:56 kaleb $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:46 cpqbld Exp $ -XCOMM $XFree86: xc/lib/zlib/Imakefile,v 1.7 2000/08/09 23:40:16 dawes Exp $ +XCOMM $XFree86: xc/lib/zlib/Imakefile,v 1.8 2001/01/17 19:43:50 dawes Exp $ #ifndef cygwinArchitecture #define DoNormalLib YES Index: xc/lib/zlib/README diff -u xc/lib/zlib/README:1.3 xc/lib/zlib/README:1.4 --- xc/lib/zlib/README:1.3 Sat Oct 3 05:07:39 1998 +++ xc/lib/zlib/README Wed Jan 17 14:43:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: README /main/4 1998/02/04 14:33:02 kaleb $ */ +/* $Xorg: README,v 1.3 2000/08/17 19:46:46 cpqbld Exp $ */ zlib 1.0.8 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library Index: xc/lib/zlib/adler32.c diff -u xc/lib/zlib/adler32.c:1.4 xc/lib/zlib/adler32.c:1.5 --- xc/lib/zlib/adler32.c:1.4 Sat Oct 3 05:07:39 1998 +++ xc/lib/zlib/adler32.c Wed Jan 17 14:43:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: adler32.c /main/4 1998/02/04 14:33:06 kaleb $ */ +/* $Xorg: adler32.c,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* adler32.c -- compute the Adler-32 checksum of a data stream * Copyright (C) 1995-1996 Mark Adler Index: xc/lib/zlib/compress.c diff -u xc/lib/zlib/compress.c:1.1.1.1 xc/lib/zlib/compress.c:1.1.1.2 --- xc/lib/zlib/compress.c:1.1.1.1 Sun Sep 27 03:59:43 1998 +++ xc/lib/zlib/compress.c Tue Jan 16 17:28:03 2001 @@ -1,4 +1,4 @@ -/* $TOG: compress.c /main/1 1998/02/04 14:33:10 kaleb $ */ +/* $Xorg: compress.c,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* compress.c -- compress a memory buffer * Copyright (C) 1995-1998 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h Index: xc/lib/zlib/crc32.c diff -u xc/lib/zlib/crc32.c:1.3 xc/lib/zlib/crc32.c:1.4 --- xc/lib/zlib/crc32.c:1.3 Sat Oct 3 05:07:39 1998 +++ xc/lib/zlib/crc32.c Wed Jan 17 14:43:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: crc32.c /main/3 1998/02/04 14:33:14 kaleb $ */ +/* $Xorg: crc32.c,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* crc32.c -- compute the CRC-32 of a data stream * Copyright (C) 1995-1996 Mark Adler Index: xc/lib/zlib/deflate.c diff -u xc/lib/zlib/deflate.c:1.4 xc/lib/zlib/deflate.c:1.5 --- xc/lib/zlib/deflate.c:1.4 Sat Oct 3 05:07:39 1998 +++ xc/lib/zlib/deflate.c Wed Jan 17 14:43:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: deflate.c /main/4 1998/02/04 14:33:18 kaleb $ */ +/* $Xorg: deflate.c,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* deflate.c -- compress data using the deflation algorithm * Copyright (C) 1995-1998 Jean-loup Gailly. Index: xc/lib/zlib/deflate.h diff -u xc/lib/zlib/deflate.h:1.4 xc/lib/zlib/deflate.h:1.5 --- xc/lib/zlib/deflate.h:1.4 Sat Oct 3 05:07:40 1998 +++ xc/lib/zlib/deflate.h Wed Jan 17 14:43:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: deflate.h /main/4 1998/02/04 14:33:24 kaleb $ */ +/* $Xorg: deflate.h,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* deflate.h -- internal compression state * Copyright (C) 1995-1998 Jean-loup Gailly Index: xc/lib/zlib/gzio.c diff -u xc/lib/zlib/gzio.c:1.1.1.1 xc/lib/zlib/gzio.c:1.1.1.2 --- xc/lib/zlib/gzio.c:1.1.1.1 Sun Sep 27 03:59:43 1998 +++ xc/lib/zlib/gzio.c Tue Jan 16 17:28:07 2001 @@ -1,4 +1,4 @@ -/* $TOG: gzio.c /main/1 1998/02/04 14:33:29 kaleb $ */ +/* $Xorg: gzio.c,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* gzio.c -- IO on .gz files * Copyright (C) 1995-1998 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h Index: xc/lib/zlib/infblock.c diff -u xc/lib/zlib/infblock.c:1.3 xc/lib/zlib/infblock.c:1.4 --- xc/lib/zlib/infblock.c:1.3 Sat Oct 3 05:07:40 1998 +++ xc/lib/zlib/infblock.c Wed Jan 17 14:43:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: infblock.c /main/4 1998/02/04 14:33:33 kaleb $ */ +/* $Xorg: infblock.c,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* infblock.c -- interpret and process block types to last block * Copyright (C) 1995-1998 Mark Adler Index: xc/lib/zlib/infblock.h diff -u xc/lib/zlib/infblock.h:1.3 xc/lib/zlib/infblock.h:1.4 --- xc/lib/zlib/infblock.h:1.3 Sat Oct 3 05:07:40 1998 +++ xc/lib/zlib/infblock.h Wed Jan 17 14:43:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: infblock.h /main/4 1998/02/04 14:33:37 kaleb $ */ +/* $Xorg: infblock.h,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* infblock.h -- header to use infblock.c * Copyright (C) 1995-1998 Mark Adler Index: xc/lib/zlib/infcodes.c diff -u xc/lib/zlib/infcodes.c:1.3 xc/lib/zlib/infcodes.c:1.4 --- xc/lib/zlib/infcodes.c:1.3 Sat Oct 3 05:07:41 1998 +++ xc/lib/zlib/infcodes.c Wed Jan 17 14:43:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: infcodes.c /main/4 1998/02/04 14:33:41 kaleb $ */ +/* $Xorg: infcodes.c,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* infcodes.c -- process literals and length/distance pairs * Copyright (C) 1995-1998 Mark Adler Index: xc/lib/zlib/infcodes.h diff -u xc/lib/zlib/infcodes.h:1.3 xc/lib/zlib/infcodes.h:1.4 --- xc/lib/zlib/infcodes.h:1.3 Sat Oct 3 05:07:41 1998 +++ xc/lib/zlib/infcodes.h Wed Jan 17 14:43:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: infcodes.h /main/4 1998/02/04 14:33:46 kaleb $ */ +/* $Xorg: infcodes.h,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* infcodes.h -- header to use infcodes.c * Copyright (C) 1995-1998 Mark Adler Index: xc/lib/zlib/inffast.c diff -u xc/lib/zlib/inffast.c:1.3 xc/lib/zlib/inffast.c:1.4 --- xc/lib/zlib/inffast.c:1.3 Sat Oct 3 05:07:41 1998 +++ xc/lib/zlib/inffast.c Wed Jan 17 14:43:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: inffast.c /main/4 1998/02/04 14:33:49 kaleb $ */ +/* $Xorg: inffast.c,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* inffast.c -- process literals and length/distance pairs fast * Copyright (C) 1995-1998 Mark Adler Index: xc/lib/zlib/inffast.h diff -u xc/lib/zlib/inffast.h:1.3 xc/lib/zlib/inffast.h:1.4 --- xc/lib/zlib/inffast.h:1.3 Sat Oct 3 05:07:41 1998 +++ xc/lib/zlib/inffast.h Wed Jan 17 14:43:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: inffast.h /main/4 1998/02/04 14:33:53 kaleb $ */ +/* $Xorg: inffast.h,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* inffast.h -- header to use inffast.c * Copyright (C) 1995-1998 Mark Adler Index: xc/lib/zlib/inflate.c diff -u xc/lib/zlib/inflate.c:1.3 xc/lib/zlib/inflate.c:1.4 --- xc/lib/zlib/inflate.c:1.3 Sat Oct 3 05:07:42 1998 +++ xc/lib/zlib/inflate.c Wed Jan 17 14:43:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: inflate.c /main/4 1998/02/04 14:33:57 kaleb $ */ +/* $Xorg: inflate.c,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* inflate.c -- zlib interface to inflate modules * Copyright (C) 1995-1998 Mark Adler Index: xc/lib/zlib/inftrees.c diff -u xc/lib/zlib/inftrees.c:1.3 xc/lib/zlib/inftrees.c:1.4 --- xc/lib/zlib/inftrees.c:1.3 Sat Oct 3 05:07:42 1998 +++ xc/lib/zlib/inftrees.c Wed Jan 17 14:43:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: inftrees.c /main/4 1998/02/04 14:34:01 kaleb $ */ +/* $Xorg: inftrees.c,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* inftrees.c -- generate Huffman trees for efficient decoding * Copyright (C) 1995-1998 Mark Adler Index: xc/lib/zlib/inftrees.h diff -u xc/lib/zlib/inftrees.h:1.3 xc/lib/zlib/inftrees.h:1.4 --- xc/lib/zlib/inftrees.h:1.3 Sat Oct 3 05:07:42 1998 +++ xc/lib/zlib/inftrees.h Wed Jan 17 14:43:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: inftrees.h /main/5 1998/02/04 14:34:06 kaleb $ */ +/* $Xorg: inftrees.h,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* inftrees.h -- header to use inftrees.c * Copyright (C) 1995-1998 Mark Adler Index: xc/lib/zlib/infutil.c diff -u xc/lib/zlib/infutil.c:1.3 xc/lib/zlib/infutil.c:1.4 --- xc/lib/zlib/infutil.c:1.3 Sat Oct 3 05:07:42 1998 +++ xc/lib/zlib/infutil.c Wed Jan 17 14:43:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: infutil.c /main/4 1998/02/04 14:34:09 kaleb $ */ +/* $Xorg: infutil.c,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* inflate_util.c -- data and routines common to blocks and codes * Copyright (C) 1995-1998 Mark Adler Index: xc/lib/zlib/infutil.h diff -u xc/lib/zlib/infutil.h:1.3 xc/lib/zlib/infutil.h:1.4 --- xc/lib/zlib/infutil.h:1.3 Sat Oct 3 05:07:43 1998 +++ xc/lib/zlib/infutil.h Wed Jan 17 14:43:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: infutil.h /main/4 1998/02/04 14:34:13 kaleb $ */ +/* $Xorg: infutil.h,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* infutil.h -- types and macros common to blocks and codes * Copyright (C) 1995-1998 Mark Adler Index: xc/lib/zlib/trees.c diff -u xc/lib/zlib/trees.c:1.4 xc/lib/zlib/trees.c:1.5 --- xc/lib/zlib/trees.c:1.4 Sat Oct 3 05:07:43 1998 +++ xc/lib/zlib/trees.c Wed Jan 17 14:43:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: trees.c /main/4 1998/02/04 14:34:17 kaleb $ */ +/* $Xorg: trees.c,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ /* trees.c -- output deflated data using Huffman coding * Copyright (C) 1995-1998 Jean-loup Gailly Index: xc/lib/zlib/trees.h diff -u xc/lib/zlib/trees.h:1.1.1.1 xc/lib/zlib/trees.h:1.1.1.2 --- xc/lib/zlib/trees.h:1.1.1.1 Sun Sep 27 03:59:43 1998 +++ xc/lib/zlib/trees.h Tue Jan 16 17:28:16 2001 @@ -1,4 +1,4 @@ -/* $TOG: trees.h /main/1 1998/02/04 14:34:22 kaleb $ */ +/* $Xorg: trees.h,v 1.3 2000/08/17 19:46:48 cpqbld Exp $ */ /* header created automatically with -DGEN_TREES_H */ local const ct_data static_ltree[L_CODES+2] = { Index: xc/lib/zlib/uncompr.c diff -u xc/lib/zlib/uncompr.c:1.1.1.1 xc/lib/zlib/uncompr.c:1.1.1.2 --- xc/lib/zlib/uncompr.c:1.1.1.1 Sun Sep 27 03:59:43 1998 +++ xc/lib/zlib/uncompr.c Tue Jan 16 17:28:17 2001 @@ -1,4 +1,4 @@ -/* $TOG: uncompr.c /main/1 1998/02/04 14:34:26 kaleb $ */ +/* $Xorg: uncompr.c,v 1.3 2000/08/17 19:46:48 cpqbld Exp $ */ /* uncompr.c -- decompress a memory buffer * Copyright (C) 1995-1998 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h Index: xc/lib/zlib/zconf.h diff -u xc/lib/zlib/zconf.h:1.6 xc/lib/zlib/zconf.h:1.7 --- xc/lib/zlib/zconf.h:1.6 Wed Aug 9 19:40:16 2000 +++ xc/lib/zlib/zconf.h Wed Jan 17 14:43:55 2001 @@ -1,11 +1,11 @@ -/* $TOG: zconf.h /main/5 1998/02/04 14:51:21 kaleb $ */ +/* $Xorg: zconf.h,v 1.3 2000/08/17 19:46:48 cpqbld Exp $ */ /* zconf.h -- configuration of the zlib compression library * Copyright (C) 1995-1996 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ -/* $XFree86: xc/lib/zlib/zconf.h,v 1.6 2000/08/09 23:40:16 dawes Exp $ */ +/* $XFree86: xc/lib/zlib/zconf.h,v 1.7 2001/01/17 19:43:55 dawes Exp $ */ #ifndef _ZCONF_H #define _ZCONF_H Index: xc/lib/zlib/zlib.h diff -u xc/lib/zlib/zlib.h:1.3 xc/lib/zlib/zlib.h:1.4 --- xc/lib/zlib/zlib.h:1.3 Sat Oct 3 05:07:46 1998 +++ xc/lib/zlib/zlib.h Wed Jan 17 14:43:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: zlib.h /main/4 1998/02/04 14:34:35 kaleb $ */ +/* $Xorg: zlib.h,v 1.3 2000/08/17 19:46:48 cpqbld Exp $ */ /* zlib.h -- interface of the 'zlib' general purpose compression library version 1.0.8, Jan 27th, 1998 Index: xc/lib/zlib/zutil.c diff -u xc/lib/zlib/zutil.c:1.4 xc/lib/zlib/zutil.c:1.5 --- xc/lib/zlib/zutil.c:1.4 Sat Oct 3 05:07:47 1998 +++ xc/lib/zlib/zutil.c Wed Jan 17 14:43:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: zutil.c /main/4 1998/02/04 14:34:40 kaleb $ */ +/* $Xorg: zutil.c,v 1.3 2000/08/17 19:46:48 cpqbld Exp $ */ /* zutil.c -- target dependent utility functions for the compression library * Copyright (C) 1995-1998 Jean-loup Gailly. Index: xc/lib/zlib/zutil.h diff -u xc/lib/zlib/zutil.h:1.5 xc/lib/zlib/zutil.h:1.6 --- xc/lib/zlib/zutil.h:1.5 Sat Oct 3 05:07:47 1998 +++ xc/lib/zlib/zutil.h Wed Jan 17 14:43:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: zutil.h /main/4 1998/02/04 14:34:44 kaleb $ */ +/* $Xorg: zutil.h,v 1.4 2000/08/17 19:46:48 cpqbld Exp $ */ /* zutil.h -- internal interface and configuration of the compression library * Copyright (C) 1995-1998 Jean-loup Gailly. @@ -15,15 +15,15 @@ #include "zlib.h" +#if defined(MSDOS)||defined(VMS)||defined(CRAY)||defined(WIN32)||defined(RISCOS)||defined(__EMX__)||defined(STDC) +# include +# include +#else + extern int errno; +#endif #ifdef STDC -# include # include # include -#endif -#ifdef NO_ERRNO_H - extern int errno; -#else -# include #endif #ifndef local Index: xc/nls/Imakefile diff -u xc/nls/Imakefile:1.5 xc/nls/Imakefile:1.6 --- xc/nls/Imakefile:1.5 Fri Dec 1 20:16:04 2000 +++ xc/nls/Imakefile Wed Jan 17 14:37:04 2001 @@ -1,9 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/5 1996/11/13 14:45:33 lehors $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:48 cpqbld Exp $ -XCOMM $XFree86: xc/nls/Imakefile,v 1.5 2000/12/02 01:16:04 dawes Exp $ +XCOMM $XFree86: xc/nls/Imakefile,v 1.6 2001/01/17 19:37:04 dawes Exp $ + #define IHaveSubdirs #define PassCDebugFlags Index: xc/nls/compose.dir diff -u xc/nls/compose.dir:1.12 xc/nls/compose.dir:1.16 --- xc/nls/compose.dir:1.12 Wed Dec 6 17:00:42 2000 +++ xc/nls/compose.dir Fri Apr 6 14:16:27 2001 @@ -1,10 +1,10 @@ -XCOMM $TOG: compose.dir /main/9 1998/05/26 13:51:43 kaleb $ +XCOMM $Xorg: compose.dir,v 1.3 2000/08/17 19:46:48 cpqbld Exp $ XCOMM XCOMM This file contains compose table file name. XCOMM The first word is the compose table file name and XCOMM the second word is full locale name. XCOMM -XCOMM $XFree86: xc/nls/compose.dir,v 1.12 2000/12/06 22:00:42 dawes Exp $ +XCOMM $XFree86: xc/nls/compose.dir,v 1.16 2001/04/06 18:16:27 dawes Exp $ XCOMM #ifdef R63_COMPAT XCOMM These entries are in the old format (no ':') @@ -196,7 +196,6 @@ tscii-0/Compose ta_IN.TSCII-0 koi8-c/Compose tg_TJ.KOI8-C iso8859-1/Compose tl_PH.ISO8859-1 -th_TH.TACTIS/Compose th_TH.TACTIS iso8859-9/Compose tr_TR.ISO8859-9 tatar-cyr/Compose tt_RU.TATAR-CYR koi8-c/Compose tt_RU.KOI8-C @@ -208,6 +207,7 @@ microsoft-cp1255/Compose yi_US.CP1255 zh/Compose zh_CN.eucCN zh/Compose zh_CN.GB2312 +zh_CN.gbk/Compose zh_CN.GBK zh_TW.big5/Compose zh_TW.big5 zh_TW.big5/Compose zh_TW.Big5 zh_TW/Compose zh_TW.eucTW @@ -402,7 +402,6 @@ tscii-0/Compose: ta_IN.TSCII-0 koi8-c/Compose: tg_TJ.KOI8-C iso8859-1/Compose: tl_PH.ISO8859-1 -th_TH.TACTIS/Compose: th_TH.TACTIS iso8859-9/Compose: tr_TR.ISO8859-9 tatar-cyr/Compose: tt_RU.TATAR-CYR koi8-c/Compose: tt_RU.KOI8-C @@ -411,9 +410,10 @@ vi_VN.viscii/Compose: vi_VN.VISCII vi_VN.tcvn/Compose: vi_VN.TCVN iso8859-1/Compose: wa_BE.ISO8859-1 +microsoft-cp1255/Compose: yi_US.CP1256 zh/Compose: zh_CN.eucCN zh/Compose: zh_CN.GB2312 -microsoft-cp1255/Compose: yi_US.CP1256 +zh_CN.gbk/Compose: zh_CN.GBK zh_TW.big5/Compose: zh_TW.big5 zh_TW.big5/Compose: zh_TW.Big5 zh_TW/Compose: zh_TW.eucTW Index: xc/nls/locale.alias diff -u xc/nls/locale.alias:1.34 xc/nls/locale.alias:1.38.2.1 --- xc/nls/locale.alias:1.34 Wed Dec 6 17:00:42 2000 +++ xc/nls/locale.alias Wed May 23 14:32:14 2001 @@ -1,11 +1,11 @@ -XCOMM $TOG: locale.alias /main/33 1998/05/26 13:41:50 kaleb $ +XCOMM $Xorg: locale.alias,v 1.3 2000/08/17 19:46:48 cpqbld Exp $ XCOMM XCOMM This file contains alias name of locale. XCOMM Each alias name is described within one line. XCOMM The first word is the alias name (simplified locale name) XCOMM the second word is full locale name. XCOMM -XCOMM $XFree86: xc/nls/locale.alias,v 1.34 2000/12/06 22:00:42 dawes Exp $ +XCOMM $XFree86: xc/nls/locale.alias,v 1.38.2.1 2001/05/23 18:32:14 dawes Exp $ XCOMM #ifdef R63_COMPAT XCOMM These entries are in the old format (no ':') @@ -35,10 +35,12 @@ br_FR.iso88591 br_FR.ISO8859-1 br_FR.iso885914 br_FR.ISO8859-14 br_FR.iso885915 br_FR.ISO8859-15 +br_FR@euro br_FR.ISO8859-15 ca ca_ES.ISO8859-1 ca_ES ca_ES.ISO8859-1 ca_ES.iso88591 ca_ES.ISO8859-1 ca_ES.iso885915 ca_ES.ISO8859-15 +ca_ES@euro ca_ES.ISO8859-15 cs cs_CZ.ISO8859-2 cs_CS cs_CZ.ISO8859-2 cs_CS.ISO8859-2 cs_CZ.ISO8859-2 @@ -65,6 +67,12 @@ de_AT.iso88591 de_AT.ISO8859-1 de_AT.ISO_8859-1 de_AT.ISO8859-1 de_AT.iso885915 de_AT.ISO8859-15 +de_AT@euro de_AT.ISO8859-15 +de_BE de_BE.ISO8859-1 +de_BE.iso88591 de_BE.ISO8859-1 +de_BE.ISO_8859-1 de_BE.ISO8859-1 +de_BE.iso885915 de_BE.ISO8859-15 +de_BE@euro de_BE.ISO8859-15 de_CH de_CH.ISO8859-1 de_CH.iso88591 de_CH.ISO8859-1 de_CH.ISO_8859-1 de_CH.ISO8859-1 @@ -75,6 +83,12 @@ de_DE.iso88591 de_DE.ISO8859-1 de_DE.ISO_8859-1 de_DE.ISO8859-1 de_DE.iso885915 de_DE.ISO8859-15 +de_DE@euro de_DE.ISO8859-15 +de_LU de_LU.ISO8859-1 +de_LU.iso88591 de_LU.ISO8859-1 +de_LU.ISO_8859-1 de_LU.ISO8859-1 +de_LU.iso885915 de_LU.ISO8859-15 +de_LU@euro de_LU.ISO8859-15 GER_DE.8859 de_DE.ISO8859-1 GER_DE.8859.in de_DE.ISO8859-1 ee ee_EE.ISO8859-4 @@ -83,6 +97,7 @@ el el_GR.ISO8859-7 el_GR el_GR.ISO8859-7 el_GR.iso88597 el_GR.ISO8859-7 +el_GR@euro el_GR.ISO8859-15 en en_US.ISO8859-1 en_AU en_AU.ISO8859-1 en_AU.iso88591 en_AU.ISO8859-1 @@ -100,6 +115,7 @@ ENG_GB.8859.in en_GB.ISO8859-1 en_IE en_IE.ISO8859-1 en_IE.iso88591 en_IE.ISO8859-1 +en_IE@euro en_IE.ISO8859-15 en_NZ en_NZ.ISO8859-1 en_NZ.iso88591 en_NZ.ISO8859-1 en_US en_US.ISO8859-1 @@ -133,6 +149,7 @@ es_ES.iso88591 es_ES.ISO8859-1 es_ES.ISO_8859-1 es_ES.ISO8859-1 es_ES.iso885915 es_ES.ISO8859-15 +es_ES@euro es_ES.ISO8859-15 es_GT es_GT.ISO8859-1 es_GT.iso88591 es_GT.ISO8859-1 es_MX es_MX.ISO8859-1 @@ -171,6 +188,7 @@ eu_ES eu_ES.ISO8859-1 eu_ES.iso88591 eu_ES.ISO8859-1 eu_ES.iso885915 eu_ES.ISO8859-15 +eu_ES@euro eu_ES.ISO8859-15 fi fi_FI.ISO8859-1 fi_FI fi_FI.ISO8859-1 fi_FI.88591 fi_FI.ISO8859-1 @@ -178,6 +196,7 @@ fi_FI.iso88591 fi_FI.ISO8859-1 fi_FI.ISO_8859-1 fi_FI.ISO8859-1 fi_FI.iso885915 fi_FI.ISO8859-15 +fi_FI@euro fi_FI.ISO8859-15 fo fo_FO.ISO8859-1 fo_FO fo_FO.ISO8859-1 fo_FO.iso88591 fo_FO.ISO8859-1 @@ -188,6 +207,7 @@ fr_BE.88591.en fr_BE.ISO8859-1 fr_BE.ISO_8859-1 fr_BE.ISO8859-1 fr_BE.iso885915 fr_BE.ISO8859-15 +fr_BE@euro fr_BE.ISO8859-15 fr_CA fr_CA.ISO8859-1 fr_CA.88591 fr_CA.ISO8859-1 fr_CA.88591.en fr_CA.ISO8859-1 @@ -205,6 +225,14 @@ fr_FR.iso88591 fr_FR.ISO8859-1 fr_FR.ISO_8859-1 fr_FR.ISO8859-1 fr_FR.iso885915 fr_FR.ISO8859-15 +fr_FR@euro fr_FR.ISO8859-15 +fr_LU fr_LU.ISO8859-1 +fr_LU.88591 fr_LU.ISO8859-1 +fr_LU.88591.en fr_LU.ISO8859-1 +fr_LU.iso88591 fr_LU.ISO8859-1 +fr_LU.ISO_8859-1 fr_LU.ISO8859-1 +fr_LU.iso885915 fr_LU.ISO8859-15 +fr_LU@euro fr_LU.ISO8859-15 FRE_FR.8859 fr_FR.ISO8859-1 FRE_FR.8859.in fr_FR.ISO8859-1 ga ga_IE.ISO8859-1 @@ -212,6 +240,7 @@ ga_IE.iso88591 ga_IE.ISO8859-1 ga_IE.iso885914 ga_IE.ISO8859-14 ga_IE.iso885915 ga_IE.ISO8859-15 +ga_IE@euro ga_IE.ISO8859-15 gd gd_GB.ISO8859-1 gd_GB gd_GB.ISO8859-1 gd_GB.iso88591 gd_GB.ISO8859-1 @@ -221,6 +250,7 @@ gl_ES gl_ES.ISO8859-1 gl_ES.iso88591 gl_ES.ISO8859-1 gl_ES.iso885915 gl_ES.ISO8859-15 +gl_ES@euro gl_ES.ISO8859-15 gv gv_GB.ISO8859-1 gv_GB gv_GB.ISO8859-1 gv_GB.iso88591 gv_GB.ISO8859-1 @@ -262,6 +292,7 @@ it_IT.iso88591 it_IT.ISO8859-1 it_IT.ISO_8859-1 it_IT.ISO8859-1 it_IT.iso885915 it_IT.ISO8859-15 +it_IT@euro it_IT.ISO8859-15 iu iu_CA.NUNACOM-8 iu_CA iu_CA.NUNACOM-8 iu_CA.nunacom8 iu_CA.NUNACOM-8 @@ -344,24 +375,38 @@ nl_BE.iso88591 nl_BE.ISO8859-1 nl_BE.ISO_8859-1 nl_BE.ISO8859-1 nl_BE.iso885915 nl_BE.ISO8859-15 +nl_BE@euro nl_BE.ISO8859-15 nl_NL nl_NL.ISO8859-1 nl_NL.88591 nl_NL.ISO8859-1 nl_NL.88591.en nl_NL.ISO8859-1 nl_NL.iso88591 nl_NL.ISO8859-1 nl_NL.ISO_8859-1 nl_NL.ISO8859-1 nl_NL.iso885915 nl_NL.ISO8859-15 +nl_NL@euro nl_NL.ISO8859-15 no no_NO.ISO8859-1 +nb nb_NO.ISO8859-1 +ny ny_NO.ISO8859-1 no_NO no_NO.ISO8859-1 +nb_NO nb_NO.ISO8859-1 +ny_NO ny_NO.ISO8859-1 no_NO.88591 no_NO.ISO8859-1 +nb_NO.88591 nb_NO.ISO8859-1 +ny_NO.88591 ny_NO.ISO8859-1 no_NO.88591.en no_NO.ISO8859-1 no_NO.iso88591 no_NO.ISO8859-1 -no_NO.ISO_8859-1 no_NO.ISO8859-1 +no_NO.ISO-8859-1 no_NO.ISO8859-1 +nb_NO.ISO-8859-1 nb_NO.ISO8859-1 +ny_NO.ISO_8859-1 ny_NO.ISO8859-1 no_NO.iso885915 no_NO.ISO8859-15 -no@nynorsk no_NO.ISO8859-1 +nb_NO.iso885915 nb_NO.ISO8859-15 +ny_NO.iso885915 ny_NO.ISO8859-15 +no@nynorsk nn_NO.ISO8859-1 +nynorsk nn_NO.ISO8859-1 oc oc_FR.ISO8859-1 oc_FR oc_FR.ISO8859-1 oc_FR.iso88591 oc_FR.ISO8859-1 oc_FR.iso885915 oc_FR.ISO8859-15 +oc_FR@euro oc_FR.ISO8859-15 pl pl_PL.ISO8859-2 pl_PL pl_PL.ISO8859-2 pl_PL.iso88592 pl_PL.ISO8859-2 @@ -375,6 +420,7 @@ pt_PT.iso88591 pt_PT.ISO8859-1 pt_PT.ISO_8859-1 pt_PT.ISO8859-1 pt_PT.iso885915 pt_PT.ISO8859-1 +pt_PT@euro pt_PT.ISO8859-1 ro ro_RO.ISO8859-2 ro_RO ro_RO.ISO8859-2 ro_RO.iso88592 ro_RO.ISO8859-2 @@ -398,7 +444,6 @@ sk_SK sk_SK.ISO8859-2 sk_SK.iso88592 sk_SK.ISO8859-2 sl sl_SI.ISO8859-2 -sl_CS sl_CS.ISO8859-2 sl_SI sl_SI.ISO8859-2 sl_SI.iso88592 sl_SI.ISO8859-2 sp sp_YU.ISO8859-5 @@ -415,15 +460,18 @@ sv_FI sv_FI.ISO8859-1 sv_FI.iso88591 sv_FI.ISO8859-1 sv_FI.iso885915 sv_FI.ISO8859-15 +sv_FI@euro sv_FI.ISO8859-15 sv_SE sv_SE.ISO8859-1 sv_SE.88591 sv_SE.ISO8859-1 sv_SE.88591.en sv_SE.ISO8859-1 sv_SE.iso88591 sv_SE.ISO8859-1 sv_SE.ISO_8859-1 sv_SE.ISO8859-1 sv_SE.iso885915 sv_SE.ISO8859-15 -th th_TH.TACTIS -th_TH th_TH.TACTIS -th_TH.tis620 th_TH.TACTIS +sv_SE@euro sv_SE.ISO8859-15 +th th_TH.TIS620 +th_TH th_TH.TIS620 +th_TH.tis620 th_TH.TIS620 +th_TH.TACTIS th_TH.TIS620 tr tr_TR.ISO8859-9 tr_TR tr_TR.ISO8859-9 tr_TR.iso88599 tr_TR.ISO8859-9 @@ -441,6 +489,7 @@ wa_BE wa_BE.ISO8859-1 wa_BE.iso88591 wa_BE.ISO8859-1 wa_BE.iso885915 wa_BE.ISO8859-15 +wa_BE@euro wa_BE.ISO8859-15 zh zh_CN.eucCN zh_CN zh_CN.eucCN zh_CN.big5 zh_TW.big5 @@ -448,6 +497,7 @@ zh_CN.EUC zh_CN.eucCN zh_CN.euc zh_CN.eucCN zh_CN.gb2312 zh_CN.eucCN +zh_CN.gbk zh_CN.GBK zh_TW zh_TW.big5 zh_TW.EUC zh_TW.eucTW zh_TW.euc zh_TW.eucTW @@ -463,22 +513,42 @@ XCOMM The following locale names are used in HPUX 9.x american.iso88591 en_US.ISO8859-1 arabic.iso88596 ar_AA.ISO8859-6 +bokmal nb_NO.ISO8859-1 +bokmål nb_NO.ISO8859-1 bulgarian bg_BG.ISO8859-5 c-french.iso88591 fr_CA.ISO8859-1 +catalan ca_ES.ISO8859-1 chinese-s zh_CN.eucCN chinese-t zh_TW.eucTW croatian hr_HR.ISO8859-2 czech cs_CZ.ISO8859-2 +danish da_DK.ISO8859-1 +dansk da_DK.ISO8859-1 danish.iso88591 da_DK.ISO8859-1 +deutsch de_DE.ISO8859-1 +dutch nl_NL.ISO8859-1 dutch.iso88591 nl_BE.ISO8859-1 +eesti et_EE.ISO8859-1 english.iso88591 en_EN.ISO8859-1 +estonian et_EE.ISO8859-1 +finnish fi_FI.ISO8859-1 finnish.iso88591 fi_FI.ISO8859-1 +français fr_FR.ISO8859-1 +french fr_FR.ISO8859-1 french.iso88591 fr_CH.ISO8859-1 +galego gl_ES.ISO8859-1 +galician gl_ES.ISO8859-1 +german de_DE.ISO8859-1 german.iso88591 de_CH.ISO8859-1 +greek el_GR.ISO8859-7 greek.iso88597 el_GR.ISO8859-7 +hebrew iw_IL.ISO8859-8 hebrew.iso88598 iw_IL.ISO8859-8 +hrvatski hr_HR.ISO8859-2 hungarian hu_HU.ISO8859-2 icelandic.iso88591 is_IS.ISO8859-1 +icelandic is_IS.ISO8859-1 +italian it_IT.ISO8859-1 italian.iso88591 it_IT.ISO8859-1 #if ! (defined(SVR4) && defined(sun)) japanese ja_JP.SJIS @@ -486,18 +556,29 @@ japanese ja_JP.eucJP #endif japanese.euc ja_JP.eucJP +japanese.sjis ja_JP.SJIS korean ko_KR.eucKR +korean.euc ko_KR.eucKR +lithuanian lt_LT.ISO8859-13 +norwegian no_NO.ISO8859-1 norwegian.iso88591 no_NO.ISO8859-1 polish pl_PL.ISO8859-2 +portuguese pt_PT.ISO8859-1 portuguese.iso88591 pt_PT.ISO8859-1 +romanian ro_RO.ISO8859-2 rumanian ro_RO.ISO8859-2 russian ru_RU.ISO8859-5 serbocroatian sh_YU.ISO8859-2 slovak sk_SK.ISO8859-2 -slovene sl_CS.ISO8859-2 +slovenian sl_SI.ISO8859-2 +slovene sl_SI.ISO8859-2 +spanish es_ES.ISO8859-1 spanish.iso88591 es_ES.ISO8859-1 +swedish sv_SE.ISO8859-1 swedish.iso88591 sv_SE.ISO8859-1 +turkish tr_TR.ISO8859-9 turkish.iso88599 tr_TR.ISO8859-9 +thai th_TH.tis620 univ.utf8 en_US.UTF-8 XCOMM Digital Unix utf universal.utf8@ucs4 en_US.UTF-8 @@ -556,15 +637,19 @@ br_FR.iso88591: br_FR.ISO8859-1 br_FR.iso885914: br_FR.ISO8859-14 br_FR.iso885915: br_FR.ISO8859-15 +br_FR@euro: br_FR.ISO8859-15 ca: ca_ES.ISO8859-1 ca_ES: ca_ES.ISO8859-1 ca_ES.iso88591: ca_ES.ISO8859-1 +ca_ES.ISO-8859-1: ca_ES.ISO8859-1 ca_ES.iso885915: ca_ES.ISO8859-15 +ca_ES@euro: ca_ES.ISO8859-15 cs: cs_CZ.ISO8859-2 cs_CS: cs_CZ.ISO8859-2 cs_CS.ISO8859-2: cs_CZ.ISO8859-2 cs_CZ: cs_CZ.ISO8859-2 cs_CZ.iso88592: cs_CZ.ISO8859-2 +cs_CZ.ISO-8859-2: cs_CZ.ISO8859-2 cs_CZ.ISO_8859-2: cs_CZ.ISO8859-2 XCOMM cz is old name for cs, should be deleted in the future: cz: cs_CZ.ISO8859-2 @@ -579,13 +664,20 @@ da_DK.88591: da_DK.ISO8859-1 da_DK.88591.en: da_DK.ISO8859-1 da_DK.iso88591: da_DK.ISO8859-1 -da_DK.ISO_8859-1: da_DK.ISO8859-1 da_DK.iso885915: da_DK.ISO8859-15 +da_DK.ISO-8859-1: da_DK.ISO8859-1 +da_DK.ISO_8859-1: da_DK.ISO8859-1 de: de_DE.ISO8859-1 de_AT: de_AT.ISO8859-1 de_AT.iso88591: de_AT.ISO8859-1 de_AT.ISO_8859-1: de_AT.ISO8859-1 de_AT.iso885915: de_AT.ISO8859-15 +de_AT@euro: de_AT.ISO8859-15 +de_BE: de_BE.ISO8859-1 +de_BE.iso88591: de_BE.ISO8859-1 +de_BE.ISO_8859-1: de_BE.ISO8859-1 +de_BE.iso885915: de_BE.ISO8859-15 +de_BE@euro: de_BE.ISO8859-15 de_CH: de_CH.ISO8859-1 de_CH.iso88591: de_CH.ISO8859-1 de_CH.ISO_8859-1: de_CH.ISO8859-1 @@ -594,8 +686,15 @@ de_DE.88591: de_DE.ISO8859-1 de_DE.88591.en: de_DE.ISO8859-1 de_DE.iso88591: de_DE.ISO8859-1 +de_DE.ISO-8859-1: de_DE.ISO8859-1 de_DE.ISO_8859-1: de_DE.ISO8859-1 de_DE.iso885915: de_DE.ISO8859-15 +de_DE@euro: de_DE.ISO8859-15 +de_LU: de_LU.ISO8859-1 +de_LU.iso88591: de_LU.ISO8859-1 +de_LU.ISO_8859-1: de_LU.ISO8859-1 +de_LU.iso885915: de_LU.ISO8859-15 +de_LU@euro: de_LU.ISO8859-15 GER_DE.8859: de_DE.ISO8859-1 GER_DE.8859.in: de_DE.ISO8859-1 ee: ee_EE.ISO8859-4 @@ -604,6 +703,8 @@ el: el_GR.ISO8859-7 el_GR: el_GR.ISO8859-7 el_GR.iso88597: el_GR.ISO8859-7 +el_GR.ISO-8859-7: el_GR.ISO8859-7 +el_GR@euro: el_GR.ISO8859-15 en: en_US.ISO8859-1 en_AU: en_AU.ISO8859-1 en_AU.iso88591: en_AU.ISO8859-1 @@ -621,6 +722,7 @@ ENG_GB.8859.in: en_GB.ISO8859-1 en_IE: en_IE.ISO8859-1 en_IE.iso88591: en_IE.ISO8859-1 +en_IE@euro: en_IE.ISO8859-15 en_NZ: en_NZ.ISO8859-1 en_NZ.iso88591: en_NZ.ISO8859-1 en_US: en_US.ISO8859-1 @@ -651,7 +753,9 @@ es_ES.88591: es_ES.ISO8859-1 es_ES.88591.en: es_ES.ISO8859-1 es_ES.iso88591: es_ES.ISO8859-1 +es_ES.ISO-8859-1: es_ES.ISO8859-1 es_ES.ISO_8859-1: es_ES.ISO8859-1 +es_ES@euro: es_ES.ISO8859-15 es_GT: es_GT.ISO8859-1 es_GT.iso88591: es_GT.ISO8859-1 es_MX: es_MX.ISO8859-1 @@ -685,6 +789,7 @@ et: et_EE.ISO8859-15 et_EE: et_EE.ISO8859-15 et_EE.iso88591: et_EE.ISO8859-1 +et_EE.ISO-8859-1: et_EE.ISO8859-1 et_EE.iso88594: et_EE.ISO8859-4 et_EE.iso885913: et_EE.ISO8859-13 et_EE.iso885915: et_EE.ISO8859-15 @@ -692,6 +797,7 @@ eu_ES: eu_ES.ISO8859-1 eu_ES.iso88591: eu_ES.ISO8859-1 eu_ES.iso885915: eu_ES.ISO8859-15 +eu_ES@euro: eu_ES.ISO8859-15 fa: fa_IR.ISIRI-3342 fa_IR: fa_IR.ISIRI-3342 fa_IR.isiri3342: fa_IR.ISIRI-3342 @@ -700,8 +806,10 @@ fi_FI.88591: fi_FI.ISO8859-1 fi_FI.88591.en: fi_FI.ISO8859-1 fi_FI.iso88591: fi_FI.ISO8859-1 +fi_FI.ISO-8859-1: fi_FI.ISO8859-1 fi_FI.ISO_8859-1: fi_FI.ISO8859-1 fi_FI.iso885915: fi_FI.ISO8859-15 +fi_FI@euro: fi_FI.ISO8859-15 fo: fo_FO.ISO8859-1 fo_FO: fo_FO.ISO8859-1 fo_FO.iso88591: fo_FO.ISO8859-1 @@ -712,6 +820,7 @@ fr_BE.88591.en: fr_BE.ISO8859-1 fr_BE.ISO_8859-1: fr_BE.ISO8859-1 fr_BE.iso885915: fr_BE.ISO8859-15 +fr_BE@euro: fr_BE.ISO8859-15 fr_CA: fr_CA.ISO8859-1 fr_CA.88591: fr_CA.ISO8859-1 fr_CA.88591.en: fr_CA.ISO8859-1 @@ -727,8 +836,18 @@ fr_FR.88591: fr_FR.ISO8859-1 fr_FR.88591.en: fr_FR.ISO8859-1 fr_FR.iso88591: fr_FR.ISO8859-1 +fr_FR.ISO-8859-1: fr_FR.ISO8859-1 fr_FR.ISO_8859-1: fr_FR.ISO8859-1 fr_FR.iso885915: fr_FR.ISO8859-15 +fr_FR@euro: fr_FR.ISO8859-15 +fr_LU: fr_LU.ISO8859-1 +fr_LU.88591: fr_LU.ISO8859-1 +fr_LU.88591.en: fr_LU.ISO8859-1 +fr_LU.iso88591: fr_LU.ISO8859-1 +fr_LU.ISO-8859-1: fr_LU.ISO8859-1 +fr_LU.ISO_8859-1: fr_LU.ISO8859-1 +fr_LU.iso885915: fr_LU.ISO8859-15 +fr_LU@euro: fr_LU.ISO8859-15 FRE_FR.8859: fr_FR.ISO8859-1 FRE_FR.8859.in: fr_FR.ISO8859-1 ga: ga_IE.ISO8859-1 @@ -736,6 +855,7 @@ ga_IE.iso88591: ga_IE.ISO8859-1 ga_IE.iso885914: ga_IE.ISO8859-14 ga_IE.iso885915: ga_IE.ISO8859-15 +ga_IE@euro: ga_IE.ISO8859-15 gd: gd_GB.ISO8859-1 gd_GB: gd_GB.ISO8859-1 gd_GB.iso88591: gd_GB.ISO8859-1 @@ -744,7 +864,9 @@ gl: gl_ES.ISO8859-1 gl_ES: gl_ES.ISO8859-1 gl_ES.iso88591: gl_ES.ISO8859-1 +gl_ES.ISO-8859-1: gl_ES.ISO8859-1 gl_ES.iso885915: gl_ES.ISO8859-15 +gl_ES@euro: gl_ES.ISO8859-15 he: he_IL.ISO8859-8 he_IL: he_IL.ISO8859-8 he_IL.iso88598: he_IL.ISO8859-8 @@ -758,10 +880,12 @@ hr: hr_HR.ISO8859-2 hr_HR: hr_HR.ISO8859-2 hr_HR.iso88592: hr_HR.ISO8859-2 +hr_HR.ISO-8859-2: hr_HR.ISO8859-2 hr_HR.ISO_8859-2: hr_HR.ISO8859-2 hu: hu_HU.ISO8859-2 hu_HU: hu_HU.ISO8859-2 hu_HU.iso88592: hu_HU.ISO8859-2 +hu_HU.ISO-8859-2: hu_HU.ISO8859-2 hy: hy_AM.ARMSCII-8 hy_AM: hy_AM.ARMSCII-8 hy_AM.armscii8: hy_AM.ARMSCII-8 @@ -775,6 +899,7 @@ is: is_IS.ISO8859-1 is_IS: is_IS.ISO8859-1 is_IS.iso88591: is_IS.ISO8859-1 +is_IS.ISO-8859-1: is_IS.ISO8859-1 is_IS.ISO_8859-1: is_IS.ISO8859-1 is_IS.iso885915: is_IS.ISO8859-15 it: it_IT.ISO8859-1 @@ -786,8 +911,10 @@ it_IT.88591: it_IT.ISO8859-1 it_IT.88591.en: it_IT.ISO8859-1 it_IT.iso88591: it_IT.ISO8859-1 +it_IT.ISO-8859-1: it_IT.ISO8859-1 it_IT.ISO_8859-1: it_IT.ISO8859-1 it_IT.iso885915: it_IT.ISO8859-15 +it_IT@euro: it_IT.ISO8859-15 iu: iu_CA.NUNACOM-8 iu_CA: iu_CA.NUNACOM-8 iu_CA.nunacom8: iu_CA.NUNACOM-8 @@ -796,6 +923,7 @@ iw: he_IL.ISO8859-8 iw_IL: he_IL.ISO8859-8 iw_IL.iso88598: he_IL.ISO8859-8 +iw_IL.ISO-8859-8: iw_IL.ISO8859-8 #ifndef __uxp__ ja_JP: ja_JP.eucJP #else /* __uxp__ */ @@ -850,6 +978,7 @@ lt_LT.iso88594: lt_LT.ISO8859-4 lt_LT.ISO_8859-4: lt_LT.ISO8859-4 lt_LT.iso885913: lt_LT.ISO8859-13 +lt_LT.ISO-8859-13: lt_LT.ISO8859-13 lt_LT.ISO_8859-13: lt_LT.ISO8859-13 lv: lv_LV.ISO8859-13 lv_LV: lv_LV.ISO8859-13 @@ -876,12 +1005,15 @@ nl_BE.iso88591: nl_BE.ISO8859-1 nl_BE.ISO_8859-1: nl_BE.ISO8859-1 nl_BE.iso885915: nl_BE.ISO8859-15 +nl_BE@euro: nl_BE.ISO8859-15 nl_NL: nl_NL.ISO8859-1 nl_NL.88591: nl_NL.ISO8859-1 nl_NL.88591.en: nl_NL.ISO8859-1 nl_NL.iso88591: nl_NL.ISO8859-1 +nl_NL.ISO-8859-1: nl_NL.ISO8859-1 nl_NL.ISO_8859-1: nl_NL.ISO8859-1 nl_NL.iso885915: nl_NL.ISO8859-15 +nl_NL@euro: nl_NL.ISO8859-15 no: no_NO.ISO8859-1 nb: nb_NO.ISO8859-1 ny: ny_NO.ISO8859-1 @@ -893,15 +1025,19 @@ ny_NO.88591: ny_NO.ISO8859-1 no_NO.88591.en: no_NO.ISO8859-1 no_NO.iso88591: no_NO.ISO8859-1 -no_NO.ISO_8859-1: no_NO.ISO8859-1 +no_NO.ISO-8859-1: no_NO.ISO8859-1 +nb_NO.ISO-8859-1: nb_NO.ISO8859-1 +ny_NO.ISO_8859-1: ny_NO.ISO8859-1 no_NO.iso885915: no_NO.ISO8859-15 nb_NO.iso885915: nb_NO.ISO8859-15 ny_NO.iso885915: ny_NO.ISO8859-15 no@nynorsk: ny_NO.ISO8859-1 +nynorsk: nn_NO.ISO8859-1 oc: oc_FR.ISO8859-1 oc_FR: oc_FR.ISO8859-1 oc_FR.iso88591: oc_FR.ISO8859-1 oc_FR.iso885915: oc_FR.ISO8859-15 +oc_FR@euro: oc_FR.ISO8859-15 pd: pd_US.ISO8859-1 pd_DE: pd_DE.ISO8859-1 pd_US: pd_US.ISO8859-1 @@ -915,6 +1051,7 @@ pl: pl_PL.ISO8859-2 pl_PL: pl_PL.ISO8859-2 pl_PL.iso88592: pl_PL.ISO8859-2 +pl_PL.ISO-8859-2: pl_PL.ISO8859-2 pp: pp_AN.ISO8859-1 pp_AN: pp_AN.ISO8859-1 pp_AN.iso88591: pp_AN.ISO8859-1 @@ -926,14 +1063,18 @@ pt_PT.88591: pt_PT.ISO8859-1 pt_PT.88591.en: pt_PT.ISO8859-1 pt_PT.iso88591: pt_PT.ISO8859-1 +pt_PT.ISO-8859-1: pt_PT.ISO8859-1 pt_PT.ISO_8859-1: pt_PT.ISO8859-1 -pt_PT.iso885915: pt_PT.ISO8859-1 +pt_PT.iso885915: pt_PT.ISO8859-15 +pt_PT@euro: pt_PT.ISO8859-15 ro: ro_RO.ISO8859-2 ro_RO: ro_RO.ISO8859-2 ro_RO.iso88592: ro_RO.ISO8859-2 +ro_RO.ISO-8859-2: ro_RO.ISO8859-2 ru: ru_RU.KOI8-R ru_RU: ru_RU.KOI8-R ru_RU.iso88595: ru_RU.ISO8859-5 +ru_RU.ISO-8859-5: ru_RU.ISO8859-5 ru_RU.koi8r: ru_RU.KOI8-R ru_RU.cp1251: ru_RU.CP1251 ru_RU.microsoftcp1251: ru_RU.CP1251 @@ -958,10 +1099,11 @@ sk: sk_SK.ISO8859-2 sk_SK: sk_SK.ISO8859-2 sk_SK.iso88592: sk_SK.ISO8859-2 +sk_SK.ISO-8859-2: sk_SK.ISO8859-2 sl: sl_SI.ISO8859-2 -sl_CS: sl_CS.ISO8859-2 sl_SI: sl_SI.ISO8859-2 sl_SI.iso88592: sl_SI.ISO8859-2 +sl_SI.ISO-8859-2: sl_SI.ISO8859-2 sp: sp_YU.ISO8859-5 sp_YU: sp_YU.ISO8859-5 sq: sq_AL.ISO8859-2 @@ -976,12 +1118,15 @@ sv_FI: sv_FI.ISO8859-1 sv_FI.iso88591: sv_FI.ISO8859-1 sv_FI.iso885915: sv_FI.ISO8859-15 +sv_FI@euro: sv_FI.ISO8859-15 sv_SE: sv_SE.ISO8859-1 sv_SE.88591: sv_SE.ISO8859-1 sv_SE.88591.en: sv_SE.ISO8859-1 sv_SE.iso88591: sv_SE.ISO8859-1 +sv_SE.ISO-8859-1: sv_SE.ISO8859-1 sv_SE.ISO_8859-1: sv_SE.ISO8859-1 sv_SE.iso885915: sv_SE.ISO8859-15 +sv_SE@euro: sv_SE.ISO8859-15 ta: ta_IN.TSCII-0 ta_IN: ta_IN.TSCII-0 ta_IN.tscii: ta_IN.TSCII-0 @@ -989,15 +1134,17 @@ tg: tg_TJ.KOI8-C tg_TJ: tg_TJ.KOI8-C tg_TJ.koi8c: tg_TJ.KOI8-C -th: th_TH.TACTIS -th_TH: th_TH.TACTIS -th_TH.tis620: th_TH.TACTIS +th: th_TH.TIS620 +th_TH: th_TH.TIS620 +th_TH.tis620: th_TH.TIS620 +th_TH.TACTIS: th_TH.TIS620 tl: tl_PH.ISO8859-1 tl_PH: tl_PH.ISO8859-1 tl_PH.iso88591: tl_PH.ISO8859-1 tr: tr_TR.ISO8859-9 tr_TR: tr_TR.ISO8859-9 tr_TR.iso88599: tr_TR.ISO8859-9 +tr_TR.ISO-8859-9: tr_TR.ISO8859-9 tt: tt_RU.TATAR-CYR tt_RU: tt_RU.TATAR-CYR tt_RU.tatarcyr: tt_RU.TATAR-CYR @@ -1026,6 +1173,7 @@ wa_BE: wa_BE.ISO8859-1 wa_BE.iso88591: wa_BE.ISO8859-1 wa_BE.iso885915: wa_BE.ISO8859-15 +wa_BE@euro: wa_BE.ISO8859-15 yi: yi_US.CP1255 yi_US: yi_US.CP1255 yi_US.cp1255: yi_US.CP1255 @@ -1039,6 +1187,7 @@ zh_CN.EUC: zh_CN.eucCN zh_CN.euc: zh_CN.eucCN zh_CN.gb2312: zh_CN.eucCN +zh_CN.gbk: zh_CN.GBK zh_TW: zh_TW.big5 zh_TW.EUC: zh_TW.eucTW zh_TW.euc: zh_TW.eucTW @@ -1055,22 +1204,42 @@ XCOMM The following locale names are used in HPUX 9.x american.iso88591: en_US.ISO8859-1 arabic.iso88596: ar_AA.ISO8859-6 +bokmal: nb_NO.ISO8859-1 +bokmål: nb_NO.ISO8859-1 bulgarian: bg_BG.ISO8859-5 c-french.iso88591: fr_CA.ISO8859-1 +catalan: ca_ES.ISO8859-1 chinese-s: zh_CN.eucCN chinese-t: zh_TW.eucTW croatian: hr_HR.ISO8859-2 czech: cs_CZ.ISO8859-2 +danish: da_DK.ISO8859-1 +dansk: da_DK.ISO8859-1 danish.iso88591: da_DK.ISO8859-1 +deutsch: de_DE.ISO8859-1 +dutch: nl_NL.ISO8859-1 dutch.iso88591: nl_BE.ISO8859-1 +eesti: et_EE.ISO8859-1 english.iso88591: en_EN.ISO8859-1 +estonian: et_EE.ISO8859-1 +finnish: fi_FI.ISO8859-1 finnish.iso88591: fi_FI.ISO8859-1 +français: fr_FR.ISO8859-1 +french: fr_FR.ISO8859-1 french.iso88591: fr_CH.ISO8859-1 +galego: gl_ES.ISO8859-1 +galician: gl_ES.ISO8859-1 +german: de_DE.ISO8859-1 german.iso88591: de_CH.ISO8859-1 +greek: el_GR.ISO8859-7 greek.iso88597: el_GR.ISO8859-7 +hebrew: iw_IL.ISO8859-8 hebrew.iso88598: iw_IL.ISO8859-8 +hrvatski: hr_HR.ISO8859-2 hungarian: hu_HU.ISO8859-2 icelandic.iso88591: is_IS.ISO8859-1 +icelandic: is_IS.ISO8859-1 +italian: it_IT.ISO8859-1 italian.iso88591: it_IT.ISO8859-1 #if ! (defined(SVR4) && defined(sun)) japanese: ja_JP.SJIS @@ -1078,18 +1247,28 @@ japanese: ja_JP.eucJP #endif japanese.euc: ja_JP.eucJP +japanese.sjis: ja_JP.SJIS korean: ko_KR.eucKR +korean.euc: ko_KR.eucKR +lithuanian: lt_LT.ISO8859-13 +norwegian: no_NO.ISO8859-1 norwegian.iso88591: no_NO.ISO8859-1 polish: pl_PL.ISO8859-2 +portuguese: pt_PT.ISO8859-1 portuguese.iso88591: pt_PT.ISO8859-1 +romanian: ro_RO.ISO8859-2 rumanian: ro_RO.ISO8859-2 russian: ru_RU.ISO8859-5 serbocroatian: sh_YU.ISO8859-2 slovak: sk_SK.ISO8859-2 -slovene: sl_CS.ISO8859-2 +slovene: sl_SI.ISO8859-2 +slovenian: sl_SI.ISO8859-2 +spanish: es_ES.ISO8859-1 spanish.iso88591: es_ES.ISO8859-1 swedish.iso88591: sv_SE.ISO8859-1 +turkish: tr_TR.ISO8859-9 turkish.iso88599: tr_TR.ISO8859-9 +thai: th_TH.tis620 univ.utf8: en_US.UTF-8 XCOMM Digital Unix utf universal.utf8@ucs4: en_US.UTF-8 Index: xc/nls/locale.dir diff -u xc/nls/locale.dir:1.19 xc/nls/locale.dir:1.25.2.1 --- xc/nls/locale.dir:1.19 Wed Dec 6 17:00:42 2000 +++ xc/nls/locale.dir Wed May 23 14:32:14 2001 @@ -1,10 +1,10 @@ -XCOMM $TOG: locale.dir /main/13 1998/05/26 10:38:09 kaleb $ +XCOMM $Xorg: locale.dir,v 1.3 2000/08/17 19:46:48 cpqbld Exp $ XCOMM XCOMM This file contains locale database file name XCOMM The first word is the locale database file name and XCOMM the second word is full locale name. XCOMM -XCOMM $XFree86: xc/nls/locale.dir,v 1.19 2000/12/06 22:00:42 dawes Exp $ +XCOMM $XFree86: xc/nls/locale.dir,v 1.25.2.1 2001/05/23 18:32:14 dawes Exp $ XCOMM #ifdef R63_COMPAT XCOMM These entries are in the old format (no ':') @@ -42,17 +42,23 @@ iso8859-1/XLC_LOCALE da_DK.ISO8859-1 iso8859-15/XLC_LOCALE da_DK.ISO8859-15 iso8859-1/XLC_LOCALE de_AT.ISO8859-1 +iso8859-15/XLC_LOCALE de_AT.ISO8859-15 iso8859-1/XLC_LOCALE de_CH.ISO8859-1 +iso8859-15/XLC_LOCALE de_CH.ISO8859-15 iso8859-1/XLC_LOCALE de_DE.ISO8859-1 +iso8859-15/XLC_LOCALE de_DE.ISO8859-15 iso8859-1/XLC_LOCALE de_LI.ISO8859-1 iso8859-1/XLC_LOCALE de_LU.ISO8859-1 -iso8859-7/XLC_LOCALE el_GR.ISO8859-7 +iso8859-15/XLC_LOCALE de_LU.ISO8859-15 +iso8859-7/XLC_LOCALE el_GR.ISO8859-7 +iso8859-15/XLC_LOCALE el_GR.ISO8859-15 iso8859-1/XLC_LOCALE en_AU.ISO8859-1 iso8859-1/XLC_LOCALE en_BZ.ISO8859-1 iso8859-1/XLC_LOCALE en_CA.ISO8859-1 iso8859-1/XLC_LOCALE en_GB.ISO8859-1 iso8859-15/XLC_LOCALE en_GB.ISO8859-15 iso8859-1/XLC_LOCALE en_IE.ISO8859-1 +iso8859-15/XLC_LOCALE en_IE.ISO8859-15 iso8859-1/XLC_LOCALE en_JM.ISO8859-1 iso8859-1/XLC_LOCALE en_NZ.ISO8859-1 iso8859-1/XLC_LOCALE en_TT.ISO8859-1 @@ -123,6 +129,7 @@ iso8859-15/XLC_LOCALE is_IS.ISO8859-15 iso8859-1/XLC_LOCALE it_CH.ISO8859-1 iso8859-1/XLC_LOCALE it_IT.ISO8859-1 +iso8859-15/XLC_LOCALE it_IT.ISO8859-15 ja/XLC_LOCALE ja_JP.eucJP ja.SJIS/XLC_LOCALE ja_JP.SJIS ja.JIS/XLC_LOCALE ja_JP.JIS7 @@ -145,7 +152,9 @@ microsoft-cp1251/XLC_LOCALE mk_MK.CP1251 iso8859-1/XLC_LOCALE ms_MY.ISO8859-1 iso8859-1/XLC_LOCALE nl_BE.ISO8859-1 +iso8859-15/XLC_LOCALE nl_BE.ISO8859-15 iso8859-1/XLC_LOCALE nl_NL.ISO8859-1 +iso8859-15/XLC_LOCALE nl_NL.ISO8859-15 iso8859-1/XLC_LOCALE no_NO.ISO8859-1 iso8859-1/XLC_LOCALE no_NO.ISO8859-15 iso8859-1/XLC_LOCALE nb_NO.ISO8859-1 @@ -169,7 +178,6 @@ koi8-u/XLC_LOCALE ru_UA.KOI8-U iso8859-2/XLC_LOCALE sh_YU.ISO8859-2 iso8859-2/XLC_LOCALE sk_SK.ISO8859-2 -iso8859-2/XLC_LOCALE sl_CS.ISO8859-2 iso8859-2/XLC_LOCALE sl_SI.ISO8859-2 iso8859-5/XLC_LOCALE sp_YU.ISO8859-5 iso8859-2/XLC_LOCALE sq_AL.ISO8859-2 @@ -182,7 +190,7 @@ iso8859-15/XLC_LOCALE sv_SE.ISO8859-15 tscii-0/XLC_LOCALE ta_IN.TSCII-0 koi8-c/XLC_LOCALE tg_TJ.KOI8-C -th_TH.TACTIS/XLC_LOCALE th_TH.TACTIS +th_TH/XLC_LOCALE th_TH.TIS620 iso8859-1/XLC_LOCALE tl_PH.ISO8859-1 iso8859-9/XLC_LOCALE tr_TR.ISO8859-9 tatar-cyr/XLC_LOCALE tt_RU.TATAR-CYR @@ -198,6 +206,8 @@ microsoft-cp1255/XLC_LOCALE yi_US.CP1255 zh/XLC_LOCALE zh_CN.eucCN zh/XLC_LOCALE zh_CN.GB2312 +zh_CN.gbk/XLC_LOCALE zh_CN.GBK +zh_HK.big5hkscs/XLC_LOCALE zh_HK.big5hkscs zh_TW.big5/XLC_LOCALE zh_TW.big5 zh_TW.big5/XLC_LOCALE zh_TW.Big5 zh_TW/XLC_LOCALE zh_TW.eucTW @@ -377,17 +387,25 @@ iso8859-1/XLC_LOCALE: da_DK.ISO8859-1 iso8859-15/XLC_LOCALE: da_DK.ISO8859-15 iso8859-1/XLC_LOCALE: de_AT.ISO8859-1 +iso8859-15/XLC_LOCALE: de_AT.ISO8859-15 +iso8859-1/XLC_LOCALE: de_BE.ISO8859-1 +iso8859-15/XLC_LOCALE: de_BE.ISO8859-15 iso8859-1/XLC_LOCALE: de_CH.ISO8859-1 +iso8859-15/XLC_LOCALE: de_CH.ISO8859-15 iso8859-1/XLC_LOCALE: de_DE.ISO8859-1 +iso8859-15/XLC_LOCALE: de_DE.ISO8859-15 iso8859-1/XLC_LOCALE: de_LI.ISO8859-1 iso8859-1/XLC_LOCALE: de_LU.ISO8859-1 +iso8859-15/XLC_LOCALE: de_LU.ISO8859-15 iso8859-7/XLC_LOCALE: el_GR.ISO8859-7 +iso8859-15/XLC_LOCALE: el_GR.ISO8859-15 iso8859-1/XLC_LOCALE: en_AU.ISO8859-1 iso8859-1/XLC_LOCALE: en_BZ.ISO8859-1 iso8859-1/XLC_LOCALE: en_CA.ISO8859-1 iso8859-1/XLC_LOCALE: en_GB.ISO8859-1 iso8859-15/XLC_LOCALE: en_GB.ISO8859-15 iso8859-1/XLC_LOCALE: en_IE.ISO8859-1 +iso8859-15/XLC_LOCALE: en_IE.ISO8859-15 iso8859-1/XLC_LOCALE: en_JM.ISO8859-1 iso8859-1/XLC_LOCALE: en_NZ.ISO8859-1 iso8859-1/XLC_LOCALE: en_TT.ISO8859-1 @@ -458,6 +476,7 @@ iso8859-15/XLC_LOCALE: is_IS.ISO8859-15 iso8859-1/XLC_LOCALE: it_CH.ISO8859-1 iso8859-1/XLC_LOCALE: it_IT.ISO8859-1 +iso8859-15/XLC_LOCALE: it_IT.ISO8859-15 ja/XLC_LOCALE: ja_JP.eucJP ja.SJIS/XLC_LOCALE: ja_JP.SJIS ja.JIS/XLC_LOCALE: ja_JP.JIS7 @@ -479,7 +498,9 @@ miscrosoft-cp1251/XLC_LOCALE: mk_MK.CP1251 iso8859-1/XLC_LOCALE: ms_MY.ISO8859-1 iso8859-1/XLC_LOCALE: nl_BE.ISO8859-1 +iso8859-15/XLC_LOCALE: nl_BE.ISO8859-15 iso8859-1/XLC_LOCALE: nl_NL.ISO8859-1 +iso8859-15/XLC_LOCALE: nl_NL.ISO8859-15 iso8859-1/XLC_LOCALE: no_NO.ISO8859-1 iso8859-1/XLC_LOCALE: no_NO.ISO8859-15 iso8859-1/XLC_LOCALE: nb_NO.ISO8859-1 @@ -503,7 +524,6 @@ koi8-u/XLC_LOCALE: ru_UA.KOI8-U iso8859-2/XLC_LOCALE: sh_YU.ISO8859-2 iso8859-2/XLC_LOCALE: sk_SK.ISO8859-2 -iso8859-2/XLC_LOCALE: sl_CS.ISO8859-2 iso8859-2/XLC_LOCALE: sl_SI.ISO8859-2 iso8859-5/XLC_LOCALE: sp_YU.ISO8859-5 iso8859-2/XLC_LOCALE: sq_AL.ISO8859-2 @@ -516,7 +536,7 @@ iso8859-15/XLC_LOCALE: sv_SE.ISO8859-15 tscii-0/XLC_LOCALE: ta_IN.TSCII-0 koi8-c/XLC_LOCALE: tg_TJ.KOI8-C -th_TH.TACTIS/XLC_LOCALE: th_TH.TACTIS +th_TH/XLC_LOCALE: th_TH.TIS620 iso8859-1/XLC_LOCALE: tl_PH.ISO8859-1 iso8859-9/XLC_LOCALE: tr_TR.ISO8859-9 tatar-cyr/XLC_LOCALE: tt_RU.TATAR-CYR @@ -532,6 +552,8 @@ microsoft-cp1255/XLC_LOCALE: yi_US.CP1255 zh/XLC_LOCALE: zh_CN.eucCN zh/XLC_LOCALE: zh_CN.GB2312 +zh_CN.gbk/XLC_LOCALE: zh_CN.GBK +zh_HK.big5hkscs/XLC_LOCALE: zh_HK.big5hkscs zh_TW.big5/XLC_LOCALE: zh_TW.big5 zh_TW.big5/XLC_LOCALE: zh_TW.Big5 zh_TW/XLC_LOCALE: zh_TW.eucTW Index: xc/nls/Compose/Imakefile diff -u xc/nls/Compose/Imakefile:1.12 xc/nls/Compose/Imakefile:1.17 --- xc/nls/Compose/Imakefile:1.12 Wed Dec 6 17:00:43 2000 +++ xc/nls/Compose/Imakefile Thu Apr 26 17:09:40 2001 @@ -1,29 +1,41 @@ -XCOMM $TOG: Imakefile /main/9 1998/06/29 09:17:20 kaleb $ -XCOMM $XFree86: xc/nls/Compose/Imakefile,v 1.12 2000/12/06 22:00:43 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:48 cpqbld Exp $ + + + +XCOMM $XFree86: xc/nls/Compose/Imakefile,v 1.17 2001/04/26 21:09:40 dawes Exp $ + #ifndef Win32Architecture #ifndef OS2Architecture # define ComposeTarget(name) @@\ -all:: name @@\ +all:: name.ct @@\ MakeDir($(BUILDLIBDIR)/locale/name) @@\ RemoveFile($(BUILDLIBDIR)/locale/name/Compose) @@\ - cd $(BUILDLIBDIR)/locale/name && $(LN) $(BUILDLIBTOP)/../../$(CURRENT_DIR)/name Compose @@\ -InstallNamedNonExec(name,Compose,$(XLOCALEDIR)/name) + cd $(BUILDLIBDIR)/locale/name && $(LN) $(BUILDLIBTOP)/../../$(CURRENT_DIR)/name.ct Compose @@\ + @@\ +CppFileTarget(name.ct,name,$(DEFINES),NullParameter) @@\ + @@\ +InstallNamedNonExec(name.ct,Compose,$(XLOCALEDIR)/name) #else # define ComposeTarget(name) @@\ -all:: name @@\ +all:: name.ct @@\ MakeDir($(BUILDLIBDIR)/locale/name) @@\ - LinkFileSpecial($(BUILDLIBDIR)/locale/name,XLC_LOCALE,$(BUILDLIBTOP)/../../$(CURRENT_DIR)/name) @@\ + LinkFileSpecial($(BUILDLIBDIR)/locale/name,XLC_LOCALE,$(BUILDLIBTOP)/../../$(CURRENT_DIR)/name.ct) @@\ + @@\ +CppFileTarget(name.ct,name,$(DEFINES),NullParameter) @@\ @@\ -InstallNamedNonExec(name,Compose,$(XLOCALEDIR)/name) +InstallNamedNonExec(name.ct,Compose,$(XLOCALEDIR)/name) #endif #else # define ComposeTarget(name) @@\ all:: name @@\ MakeDir(Concat($(BUILDLIBDIR:/=\)\locale\,name)) @@\ RemoveFile(Concat($(BUILDLIBDIR:/=\)\locale\,name\Compose)) @@\ - cd Concat($(BUILDLIBDIR:/=\)\locale\,name) && $(LN) Concat($(BUILDLIBTOP:/=\)\..\..\$(CURRENT_DIR:/=\)\,name) Compose @@\ -InstallNamedNonExec(name,Compose,$(XLOCALEDIR)/name) + cd Concat($(BUILDLIBDIR:/=\)\locale\,name) && $(LN) Concat($(BUILDLIBTOP:/=\)\..\..\$(CURRENT_DIR:/=\)\,name.ct) Compose @@\ + @@\ +CppFileTarget(name.ct,name,$(DEFINES),NullParameter) @@\ + @@\ +InstallNamedNonExec(name.ct,Compose,$(XLOCALEDIR)/name) #endif ComposeTarget(armscii-8) @@ -53,10 +65,10 @@ ComposeTarget(koi8-c) ComposeTarget(mk_MK.UTF-8) ComposeTarget(mulelao-1) -ComposeTarget(th_TH.TACTIS) ComposeTarget(vi_VN.tcvn) ComposeTarget(vi_VN.viscii) ComposeTarget(zh) +ComposeTarget(zh_CN.gbk) ComposeTarget(zh_TW) ComposeTarget(zh_TW.big5) Index: xc/nls/Compose/armscii-8 diff -u xc/nls/Compose/armscii-8:1.1 xc/nls/Compose/armscii-8:1.2 --- xc/nls/Compose/armscii-8:1.1 Sat Aug 28 05:00:33 1999 +++ xc/nls/Compose/armscii-8 Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# ARMSCII-8 Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/armscii-8,v 1.1 1999/08/28 09:00:33 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM ARMSCII-8 Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/armscii-8,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/georgian-academy diff -u xc/nls/Compose/georgian-academy:1.1 xc/nls/Compose/georgian-academy:1.2 --- xc/nls/Compose/georgian-academy:1.1 Sat Aug 28 05:00:34 1999 +++ xc/nls/Compose/georgian-academy Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# georgian-academy Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/georgian-academy,v 1.1 1999/08/28 09:00:34 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM georgian-academy Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/georgian-academy,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/georgian-ps diff -u xc/nls/Compose/georgian-ps:1.1 xc/nls/Compose/georgian-ps:1.2 --- xc/nls/Compose/georgian-ps:1.1 Sat Aug 28 05:00:34 1999 +++ xc/nls/Compose/georgian-ps Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# georgian-ps Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/georgian-ps,v 1.1 1999/08/28 09:00:34 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM georgian-ps Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/georgian-ps,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/ibm-cp1133 diff -u xc/nls/Compose/ibm-cp1133:1.1 xc/nls/Compose/ibm-cp1133:1.2 --- xc/nls/Compose/ibm-cp1133:1.1 Sat Aug 28 05:00:34 1999 +++ xc/nls/Compose/ibm-cp1133 Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# ibm-cp1133 Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/ibm-cp1133,v 1.1 1999/08/28 09:00:34 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM ibm-cp1133 Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/ibm-cp1133,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/iso8859-1 diff -u xc/nls/Compose/iso8859-1:1.5 xc/nls/Compose/iso8859-1:1.7 --- xc/nls/Compose/iso8859-1:1.5 Fri Oct 27 14:30:50 2000 +++ xc/nls/Compose/iso8859-1 Thu Apr 26 17:09:40 2001 @@ -1,14 +1,14 @@ -# $TOG: iso8859-1 /main/7 1998/05/20 15:33:23 kaleb $ -# -# ISO 8859-1 (Latin1) Compose Sequence -# -# -# $XFree86: xc/nls/Compose/iso8859-1,v 1.5 2000/10/27 18:30:50 dawes Exp $ -# -# Sequence Definition -# -# Means -# Special Character +XCOMM $Xorg: iso8859-1,v 1.3 2000/08/17 19:46:59 cpqbld Exp $ +XCOMM +XCOMM ISO 8859-1 (Latin1) Compose Sequence +XCOMM +XCOMM +XCOMM $XFree86: xc/nls/Compose/iso8859-1,v 1.7 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM Means +XCOMM Special Character : "#" numbersign : "'" apostrophe : "'" apostrophe @@ -174,7 +174,7 @@ : "\264" acute : "\270" cedilla : "\250" diaeresis -# Accented Alphabet +XCOMM Accented Alphabet : "\300" Agrave : "\300" Agrave : "\301" Aacute @@ -378,10 +378,10 @@ : "\377" ydiaeresis : "\377" ydiaeresis : "\377" ydiaeresis -# -# -# dead key accent keysyms -# Special Character +XCOMM +XCOMM +XCOMM dead key accent keysyms +XCOMM Special Character : "|" bar : "`" grave : "'" apostrophe @@ -405,7 +405,7 @@ : "\264" acute : "\270" cedilla : "\250" diaeresis -# Accented Alphabet +XCOMM Accented Alphabet : "\305" Aring : "\300" Agrave : "\301" Aacute @@ -461,19 +461,20 @@ : "\335" Yacute : "\375" yacute : "\377" ydiaeresis -# Useful for portuguese language +XCOMM Useful for portuguese language : "\307" Ccedilla : "\347" ccedilla : "'" apostrophe : "`" grave -# These are for us_intl, that does not has diaeresis, etc +XCOMM These are for us_intl, that does not has diaeresis, etc : "\"" quotedbl : "\"" quotedbl : "~" asciitilde : "^" asciicircum -# -# Ctrl Means -# Special Character +XCOMM +#ifdef USE_CTRL_SHIFT_T_SEQS +XCOMM Ctrl Means +XCOMM Special Character Ctrl : "#" numbersign Ctrl : "'" apostrophe Ctrl : "'" apostrophe @@ -637,7 +638,7 @@ Ctrl : "\264" acute Ctrl : "\270" cedilla Ctrl : "\250" diaeresis -# Accented Alphabet +XCOMM Accented Alphabet Ctrl : "\300" Agrave Ctrl : "\300" Agrave Ctrl : "\301" Aacute @@ -839,4 +840,5 @@ Ctrl : "\377" ydiaeresis Ctrl : "\377" ydiaeresis Ctrl : "\377" ydiaeresis -# End of Sequence Definition +#endif /* USE_CTRL_SHIFT_T_SEQS */ +XCOMM End of Sequence Definition Index: xc/nls/Compose/iso8859-10 diff -u xc/nls/Compose/iso8859-10:1.1 xc/nls/Compose/iso8859-10:1.2 --- xc/nls/Compose/iso8859-10:1.1 Sat Aug 28 05:00:35 1999 +++ xc/nls/Compose/iso8859-10 Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# ISO 8859-10 Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/iso8859-10,v 1.1 1999/08/28 09:00:35 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM ISO 8859-10 Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/iso8859-10,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/iso8859-13 diff -u xc/nls/Compose/iso8859-13:1.1 xc/nls/Compose/iso8859-13:1.2 --- xc/nls/Compose/iso8859-13:1.1 Fri Oct 27 14:30:50 2000 +++ xc/nls/Compose/iso8859-13 Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# $XFree86: xc/nls/Compose/iso8859-13,v 1.1 2000/10/27 18:30:50 dawes Exp $ -# -# ISO 8859-13 (Latin7) Compose Sequence -# -# Sequence Definition -# -# Means -# Special Character -# Right-hand side (Accented Alphabet) -# These compose sequences are pure supposition on my part. -# It would be nice to know what the real cultural conventions -# are for compose sequences. +XCOMM $XFree86: xc/nls/Compose/iso8859-13,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM ISO 8859-13 (Latin7) Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM Means +XCOMM Special Character +XCOMM Right-hand side (Accented Alphabet) +XCOMM These compose sequences are pure supposition on my part. +XCOMM It would be nice to know what the real cultural conventions +XCOMM are for compose sequences. : "#" numbersign : "'" apostrophe : "'" apostrophe @@ -158,7 +158,7 @@ : "\367" division : "\367" division : "\327" multiply -# Accented Alphabet +XCOMM Accented Alphabet : "\300" Aogonek : "\300" Aogonek : "\300" Aogonek @@ -430,4 +430,4 @@ : "~" asciitilde : "~" asciitilde -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/iso8859-14 diff -u xc/nls/Compose/iso8859-14:1.3 xc/nls/Compose/iso8859-14:1.4 --- xc/nls/Compose/iso8859-14:1.3 Fri Oct 27 14:30:51 2000 +++ xc/nls/Compose/iso8859-14 Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# Alastair McKinstry, -# Extensions to allow ISO-8859-14 (Celtic) composing -# -# ISO 8859-14 (Latin-8) Compose Sequence -# -# $XFree86: xc/nls/Compose/iso8859-14,v 1.3 2000/10/27 18:30:51 dawes Exp $ -# -# The following is from the Latin-1 definitions -# Sequence Definition -# -# Means -# Special Character +XCOMM Alastair McKinstry, +XCOMM Extensions to allow ISO-8859-14 (Celtic) composing +XCOMM +XCOMM ISO 8859-14 (Latin-8) Compose Sequence +XCOMM +XCOMM $XFree86: xc/nls/Compose/iso8859-14,v 1.4 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM The following is from the Latin-1 definitions +XCOMM Sequence Definition +XCOMM +XCOMM Means +XCOMM Special Character : "#" numbersign : "'" apostrophe : "'" apostrophe @@ -153,7 +153,7 @@ : "\264" acute : "\270" cedilla : "\250" diaeresis -# Accented Alphabet +XCOMM Accented Alphabet : "\300" Agrave : "\300" Agrave : "\301" Aacute @@ -361,9 +361,9 @@ : "\264" Zcaron : "\270" zcaron : "\270" zcaron -# -# dead key accent keysyms -# Special Character +XCOMM +XCOMM dead key accent keysyms +XCOMM Special Character : "|" bar : "`" grave : "'" apostrophe @@ -383,7 +383,7 @@ : "\264" acute : "\270" cedilla : "\250" diaeresis -# Accented Alphabet +XCOMM Accented Alphabet : "\300" Agrave : "\301" Aacute : "\302" Acircumflex @@ -440,8 +440,8 @@ : "\264" Zcaron : "\270" zcaron -# The following is Celtic character support -# +XCOMM The following is Celtic character support +XCOMM : "¢" bdotabove : "¡" Bdotabove @@ -585,4 +585,4 @@ : "¨" Wgrave : "¸" wgrave -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/iso8859-15 diff -u xc/nls/Compose/iso8859-15:1.3 xc/nls/Compose/iso8859-15:1.4 --- xc/nls/Compose/iso8859-15:1.3 Fri Oct 27 14:30:51 2000 +++ xc/nls/Compose/iso8859-15 Thu Apr 26 17:09:40 2001 @@ -1,13 +1,13 @@ -# $TOG: fcd8859-15 /main/2 1998/06/17 15:53:45 kaleb $ -# -# ISO 8859-15 (Latin1) Compose Sequence -# -# $XFree86: xc/nls/Compose/iso8859-15,v 1.3 2000/10/27 18:30:51 dawes Exp $ -# -# Sequence Definition -# -# Means -# Special Character +XCOMM $TOG: fcd8859-15 /main/2 1998/06/17 15:53:45 kaleb $ +XCOMM +XCOMM ISO 8859-15 (Latin1) Compose Sequence +XCOMM +XCOMM $XFree86: xc/nls/Compose/iso8859-15,v 1.4 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM Means +XCOMM Special Character : "#" numbersign : "'" apostrophe : "'" apostrophe @@ -156,7 +156,7 @@ : "\264" acute : "\270" cedilla : "\250" diaeresis -# Accented Alphabet +XCOMM Accented Alphabet : "\300" Agrave : "\300" Agrave : "\301" Aacute @@ -374,9 +374,9 @@ : "\264" Zcaron : "\270" zcaron : "\270" zcaron -# -# dead key accent keysyms -# Special Character +XCOMM +XCOMM dead key accent keysyms +XCOMM Special Character : "|" bar : "`" grave : "'" apostrophe @@ -396,7 +396,7 @@ : "\264" acute : "\270" cedilla : "\250" diaeresis -# Accented Alphabet +XCOMM Accented Alphabet : "\305" Aring : "\300" Agrave : "\301" Aacute @@ -459,9 +459,9 @@ : "\270" zcaron : "\264" Zcaron : "\270" zcaron -# Useful for portuguese language +XCOMM Useful for portuguese language : "\307" Ccedilla : "\347" ccedilla : "'" apostrophe : "`" grave -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/iso8859-2 diff -u xc/nls/Compose/iso8859-2:1.3 xc/nls/Compose/iso8859-2:1.6 --- xc/nls/Compose/iso8859-2:1.3 Fri Oct 27 20:34:02 2000 +++ xc/nls/Compose/iso8859-2 Fri May 18 19:35:29 2001 @@ -1,13 +1,13 @@ -# $TOG: iso8859-2 /main/2 1998/05/20 15:33:30 kaleb $ -# -# ISO 8859-2 (Latin2) Compose Sequence -# -# $XFree86: xc/nls/Compose/iso8859-2,v 1.3 2000/10/28 00:34:02 dawes Exp $ -# -# Sequence Definition -# -# Means -# Special Character +XCOMM $Xorg: iso8859-2,v 1.3 2000/08/17 19:46:59 cpqbld Exp $ +XCOMM +XCOMM ISO 8859-2 (Latin2) Compose Sequence +XCOMM +XCOMM $XFree86: xc/nls/Compose/iso8859-2,v 1.6 2001/05/18 23:35:29 dawes Exp $ +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM Means +XCOMM Special Character : "#" numbersign : "'" apostrophe : "'" apostrophe @@ -53,10 +53,10 @@

: "\266" paragraph

: "\266" paragraph

: "\266" paragraph -# Right-hand side (Accented Alphabet) -# These compose sequences are pure supposition on my part. -# It would be nice to know what the real cultural conventions -# are for compose sequences. +XCOMM Right-hand side (Accented Alphabet) +XCOMM These compose sequences are pure supposition on my part. +XCOMM It would be nice to know what the real cultural conventions +XCOMM are for compose sequences. : "\241" Aogonek : "\241" Aogonek : "\241" Aogonek @@ -449,9 +449,120 @@ : "\312" Eogonek : "\261" aogonek : "\352" eogonek -# those are for ease of use +XCOMM those are for ease of use : "\331" Uring : "\371" uring : "\331" Uring : "\371" uring -# End of Sequence Definition +XCOMM traditional sequences + : "\274" OE + : "\275" oe + : "\305" Aring + : "\345" aring + : "\260" degree + : "\260" degree + : "\260" degree + : "\260" degree + : "\245" Itilde + : "\265" itilde + : "\303" Atilde + : "\325" Otilde + : "\335" Utilde + : "\343" atilde + : "\365" otilde + : "\375" utilde + : "\321" Ntilde + : "\361" ntilde + : "~" asciitilde + : "~" asciitilde + : "~" asciitilde + : "~" asciitilde + : "\267" caron + : "\267" caron + : "\267" caron + : "\267" caron + : "\302" Acircumflex + : "\316" Icircumflex + : "\324" Ocircumflex + : "\333" Ucircumflex + : "\342" acircumflex + : "\356" icircumflex + : "\364" ocircumflex + : "\373" ucircumflex + : "\373" ucircumflex + : "\136" asciicircum + : "\136" asciicircum + : "\136" asciicircum + : "\136" asciicircum + : "\253" Gbreve + : "\273" gbreve + : "\335" Ubreve + : "\375" ubreve + : "\242" breve + : "\242" breve + : "\242" breve + : "\242" breve + : "\241" Aogonek + : "\261" aogonek + : "\262" ogonek + : "\262" ogonek + : "\307" Iogonek + : "\312" Eogonek + : "\331" Uogonek + : "\347" iogonek + : "\352" eogonek + : "\371" uogonek + : "\662" ogonek + : "\662" ogonek + : "\662" ogonek + : "\662" ogonek + : "\300" Agrave + : "\340" agrave + : "\310" Egrave + : "\350" egrave + : "\314" Igrave + : "\354" igrave + : "\322" Ograve + : "\362" ograve + : "\331" Ugrave + : "\371" ugrave + : "`" grave + : "`" grave + : "`" grave + : "`" grave + : "\305" Cabovedot + : "\345" cabovedot + : "\251" Iabovedot + : "\271" idotless + : "\257" Zabovedot + : "\277" zabovedot + : "\314" Eabovedot + : "\354" eabovedot + : "\377" abovedot + : "\377" abovedot + : "\377" abovedot + : "\377" abovedot + : "\264" acute + : "\264" acute + : "\264" acute + : "\264" acute + : "\675" doubleacute + : "\675" doubleacute + : "\675" doubleacute + : "\675" doubleacute + : "\317" Idiaeresis + : "\357" idiaeresis + : "\377" ydiaeresis + : "\250" diaeresis + : "\250" diaeresis + : "\250" diaeresis + : "\250" diaeresis + : "\270" cedilla + : "\270" cedilla + : "\270" cedilla + : "\270" cedilla + : "\257" macron + : "\257" macron + : "\257" macron + : "\257" macron +XCOMM End of Sequence Definition Index: xc/nls/Compose/iso8859-3 diff -u xc/nls/Compose/iso8859-3:1.1 xc/nls/Compose/iso8859-3:1.2 --- xc/nls/Compose/iso8859-3:1.1 Sun Jun 6 10:05:57 1999 +++ xc/nls/Compose/iso8859-3 Thu Apr 26 17:09:40 2001 @@ -1,13 +1,13 @@ -# $TOG: fcd8859-15 /main/2 1998/06/17 15:53:45 kaleb $ -# -# ISO 8859-3 (Latin3) Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/iso8859-3,v 1.1 1999/06/06 14:05:57 dawes Exp $ -# -# Means -# Special Character +XCOMM $TOG: fcd8859-15 /main/2 1998/06/17 15:53:45 kaleb $ +XCOMM +XCOMM ISO 8859-3 (Latin3) Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/iso8859-3,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM Means +XCOMM Special Character : "#" numbersign : "'" apostrophe : "'" apostrophe @@ -103,7 +103,7 @@ : "\264" acute : "\270" cedilla : "\250" diaeresis -# Accented Alphabet +XCOMM Accented Alphabet : "\300" Agrave : "\300" Agrave : "\301" Aacute @@ -373,9 +373,9 @@ : "\257" Zabovedot : "\277" zabovedot : "\277" zabovedot -# -# dead key accent keysyms -# Special Character +XCOMM +XCOMM dead key accent keysyms +XCOMM Special Character : "|" bar : "`" grave : "'" apostrophe @@ -395,7 +395,7 @@ : "\264" acute : "\270" cedilla : "\250" diaeresis -# Accented Alphabet +XCOMM Accented Alphabet : "\305" Aring : "\345" aring : "\300" Agrave @@ -476,4 +476,4 @@ : "\257" Zabovedot : "\270" zcaron : "\277" zabovedot -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/iso8859-4 diff -u xc/nls/Compose/iso8859-4:1.2 xc/nls/Compose/iso8859-4:1.3 --- xc/nls/Compose/iso8859-4:1.2 Fri Oct 27 14:30:51 2000 +++ xc/nls/Compose/iso8859-4 Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# $XFree86: xc/nls/Compose/iso8859-4,v 1.2 2000/10/27 18:30:51 dawes Exp $ -# -# ISO 8859-4 (Latin4) Compose Sequence -# -# Sequence Definition -# -# Means -# Special Character -# Right-hand side (Accented Alphabet) -# These compose sequences are pure supposition on my part. -# It would be nice to know what the real cultural conventions -# are for compose sequences. +XCOMM $XFree86: xc/nls/Compose/iso8859-4,v 1.3 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM ISO 8859-4 (Latin4) Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM Means +XCOMM Special Character +XCOMM Right-hand side (Accented Alphabet) +XCOMM These compose sequences are pure supposition on my part. +XCOMM It would be nice to know what the real cultural conventions +XCOMM are for compose sequences. : "\241" Aogonek : "\241" Aogonek : "\242" kra @@ -353,4 +353,4 @@ : "\375" utilde : "~" asciitilde : "~" asciitilde -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/iso8859-5 diff -u xc/nls/Compose/iso8859-5:1.1 xc/nls/Compose/iso8859-5:1.2 --- xc/nls/Compose/iso8859-5:1.1 Sat Aug 28 05:00:36 1999 +++ xc/nls/Compose/iso8859-5 Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# ISO 8859-5 Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/iso8859-5,v 1.1 1999/08/28 09:00:36 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM ISO 8859-5 Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/iso8859-5,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/iso8859-6 diff -u xc/nls/Compose/iso8859-6:1.1 xc/nls/Compose/iso8859-6:1.2 --- xc/nls/Compose/iso8859-6:1.1 Sat Aug 28 05:00:36 1999 +++ xc/nls/Compose/iso8859-6 Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# ISO 8859-6 Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/iso8859-6,v 1.1 1999/08/28 09:00:36 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM ISO 8859-6 Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/iso8859-6,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/iso8859-7 diff -u xc/nls/Compose/iso8859-7:1.2 xc/nls/Compose/iso8859-7:1.4 --- xc/nls/Compose/iso8859-7:1.2 Fri Oct 27 14:30:51 2000 +++ xc/nls/Compose/iso8859-7 Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# $TOG: iso8859-7 /main/7 1998/05/20 15:33:23 kaleb $ -# -# ISO 8859-7 (Greek) Compose Sequence -# -# -# $XFree86: xc/nls/Compose/iso8859-7,v 1.2 2000/10/27 18:30:51 dawes Exp $ -# -# Sequence Definition -# -# Means -# Special Character - : "#" numbersign +XCOMM $TOG: iso8859-7 /main/7 1998/05/20 15:33:23 kaleb $ +XCOMM +XCOMM ISO 8859-7 (Greek) Compose Sequence +XCOMM +XCOMM +XCOMM $XFree86: xc/nls/Compose/iso8859-7,v 1.4 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM Means +XCOMM Special Character + : "#" numbersign : "'" apostrophe : "'" apostrophe : "@" at @@ -47,14 +47,6 @@ : "\243" sterling : "\243" sterling : "\243" sterling - : "\245" yen - : "\245" yen - : "\245" yen - : "\245" yen - : "\245" yen - : "\245" yen - : "\245" yen - : "\245" yen : "\247" section : "\247" section : "\247" section @@ -67,18 +59,6 @@ <0> : "\247" section <0> : "\247" section <0> : "\247" section - : "\244" currency - : "\244" currency - : "\244" currency - : "\244" currency - : "\244" currency - : "\244" currency - : "\244" currency - : "\244" currency - <0> : "\244" currency - <0> : "\244" currency - <0> : "\244" currency - <0> : "\244" currency : "\251" copyright : "\251" copyright : "\251" copyright @@ -92,10 +72,6 @@ <0> : "\251" copyright <0> : "\251" copyright : "\251" copyright - : "\252" ordfeminine - : "\252" ordfeminine - : "\252" ordfeminine - : "\252" ordfeminine : "\253" guillemotleft : "\273" guillemotright <0> : "\260" degree @@ -136,12 +112,12 @@ : "\257" macron : "\257" macron : "\257" macron -# should be Greek tonos but not defined in X11 +XCOMM should be Greek tonos but not defined in X11 : "\264" acute -# should be Greek dialitika but not defined in X11 +XCOMM should be Greek dialytika but not defined in X11 : "\250" diaeresis -# Accented Alphabet +XCOMM Accented Alphabet : "\266" Greek_ALPHAaccent : "\266" Greek_ALPHAaccent : "\270" Greek_EPSILONaccent @@ -182,15 +158,10 @@ : "\373" Greek_upsilondieresis : "\373" Greek_upsilondieresis - : "\300" Greek_iotaaccentdieresis - : "\300" Greek_iotaaccentdieresis - : "\340" Greek_upsilonaccentdieresis - : "\340" Greek_upsilonaccentdieresis - -# -# -# dead key accent keysyms -# Special Character +XCOMM +XCOMM +XCOMM dead key accent keysyms +XCOMM Special Character : "|" bar : "`" grave : "'" apostrophe @@ -214,34 +185,42 @@ : "\264" acute : "\250" diaeresis -# Accented Alphabet - : "\266" Greek_ALPHAaccent - : "\270" Greek_EPSILONaccent - : "\271" Greek_ETAaccent - : "\272" Greek_IOTAaccent - : "\274" Greek_OMICRONaccent - : "\276" Greek_UPSILONaccent - : "\277" Greek_OMEGAaccent - : "\332" Greek_IOTAdiaeresis - : "\332" Greek_IOTAdieresis - : "\333" Greek_UPSILONdieresis - - : "\334" Greek_alphaaccent - : "\335" Greek_epsilonaccent - : "\336" Greek_etaaccent - : "\337" Greek_iotaaccent - : "\374" Greek_omicronaccent - : "\375" Greek_upsilonaccent - : "\376" Greek_omegaaccent - : "\372" Greek_iotadieresis - : "\373" Greek_upsilondieresis - - : "\300" Greek_iotaaccentdieresis - : "\340" Greek_upsilonaccentdieresis - - : "\300" Greek_iotaaccentdieresis - : "\340" Greek_upsilonaccentdieresis - - : "\362" Greek_finalsmallsigma - : "\362" Greek_finalsmallsigma - +XCOMM Accented Alphabet (plus some more symbols) + : "\334" Greek_alphaaccent + : "\335" Greek_epsilonaccent + : "\336" Greek_etaaccent + : "\337" Greek_iotaaccent + : "\374" Greek_omicronaccent + : "\375" Greek_upsilonaccent + : "\376" Greek_omegaaccent + : "\266" Greek_ALPHAaccent + : "\270" Greek_EPSILONaccent + : "\271" Greek_ETAaccent + : "\272" Greek_IOTAaccent + : "\274" Greek_OMICRONaccent + : "\276" Greek_UPSILONaccent + : "\277" Greek_OMEGAaccent + : "\264" acute + : "\264" acute + : "\267" periodcentered + : "\253" guillemotleft + : "\273" guillemotright + + : "\372" Greek_iotadieresis + : "\373" Greek_upsilondieresis + : "\332" Greek_IOTAdiaeresis + : "\332" Greek_IOTAdieresis + : "\333" Greek_UPSILONdieresis + : "\250" diaeresis + : "\250" diaeresis + : "\267" periodcentered + : "\253" guillemotleft + : "\273" guillemotright + + : "\300" Greek_iotaaccentdieresis + : "\340" Greek_upsilonaccentdieresis + : "\265" Greek_accentdieresis + + : "\300" Greek_iotaaccentdieresis + : "\340" Greek_upsilonaccentdieresis + : "\265" Greek_accentdieresis Index: xc/nls/Compose/iso8859-8 diff -u xc/nls/Compose/iso8859-8:1.1 xc/nls/Compose/iso8859-8:1.2 --- xc/nls/Compose/iso8859-8:1.1 Sat Aug 28 05:00:36 1999 +++ xc/nls/Compose/iso8859-8 Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# ISO 8859-8 Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/iso8859-8,v 1.1 1999/08/28 09:00:36 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM ISO 8859-8 Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/iso8859-8,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/iso8859-9 diff -u xc/nls/Compose/iso8859-9:1.1 xc/nls/Compose/iso8859-9:1.2 --- xc/nls/Compose/iso8859-9:1.1 Sun Jun 6 10:05:57 1999 +++ xc/nls/Compose/iso8859-9 Thu Apr 26 17:09:40 2001 @@ -1,13 +1,13 @@ -# $TOG: fcd8859-15 /main/2 1998/06/17 15:53:45 kaleb $ -# -# ISO 8859-9 (Latin5) Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/iso8859-9,v 1.1 1999/06/06 14:05:57 dawes Exp $ -# -# Means -# Special Character +XCOMM $TOG: fcd8859-15 /main/2 1998/06/17 15:53:45 kaleb $ +XCOMM +XCOMM ISO 8859-9 (Latin5) Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/iso8859-9,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM Means +XCOMM Special Character : "#" numbersign : "'" apostrophe : "'" apostrophe @@ -155,7 +155,7 @@ : "\264" acute : "\270" cedilla : "\250" diaeresis -# Accented Alphabet +XCOMM Accented Alphabet : "\300" Agrave : "\300" Agrave : "\301" Aacute @@ -388,9 +388,9 @@ : "\270" zcaron : "\264" Zcaron : "\270" zcaron -# -# dead key accent keysyms -# Special Character +XCOMM +XCOMM dead key accent keysyms +XCOMM Special Character : "|" bar : "`" grave : "'" apostrophe @@ -410,7 +410,7 @@ : "\264" acute : "\270" cedilla : "\250" diaeresis -# Accented Alphabet +XCOMM Accented Alphabet : "\305" Aring : "\345" aring : "\300" Agrave @@ -475,4 +475,4 @@ : "\377" ydiaeresis : "\264" Zcaron : "\270" zcaron -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/iso8859-9e diff -u xc/nls/Compose/iso8859-9e:1.1 xc/nls/Compose/iso8859-9e:1.2 --- xc/nls/Compose/iso8859-9e:1.1 Fri Oct 27 14:30:51 2000 +++ xc/nls/Compose/iso8859-9e Thu Apr 26 17:09:40 2001 @@ -1,12 +1,12 @@ -# -# ISO 8859-9e (Latin??) Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/iso8859-9e,v 1.1 2000/10/27 18:30:51 dawes Exp $ -# -# Means -# Special Character +XCOMM +XCOMM ISO 8859-9e (Latin??) Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/iso8859-9e,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM Means +XCOMM Special Character : "#" numbersign : "'" apostrophe : "'" apostrophe @@ -154,7 +154,7 @@ : "\264" acute : "\270" cedilla : "\250" diaeresis -# Accented Alphabet +XCOMM Accented Alphabet : "\300" Agrave : "\300" Agrave : "\301" Aacute @@ -399,9 +399,9 @@ : "\275" ocaron : "\264" Ocaron : "\275" ocaron -# -# dead key accent keysyms -# Special Character +XCOMM +XCOMM dead key accent keysyms +XCOMM Special Character : "|" bar : "`" grave : "'" apostrophe @@ -421,7 +421,7 @@ : "\264" acute : "\270" cedilla : "\250" diaeresis -# Accented Alphabet +XCOMM Accented Alphabet : "\305" Aring : "\345" aring : "\300" Agrave @@ -486,4 +486,4 @@ : "\261" zcaron : "\252" Gcaron : "\272" gcaron -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/ja diff -u xc/nls/Compose/ja:1.1 xc/nls/Compose/ja:1.2 --- xc/nls/Compose/ja:1.1 Sat Aug 28 05:00:37 1999 +++ xc/nls/Compose/ja Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# ja Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/ja,v 1.1 1999/08/28 09:00:37 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM ja Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/ja,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/ja.JIS diff -u xc/nls/Compose/ja.JIS:1.1 xc/nls/Compose/ja.JIS:1.2 --- xc/nls/Compose/ja.JIS:1.1 Sat Aug 28 05:00:37 1999 +++ xc/nls/Compose/ja.JIS Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# ja.JIS Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/ja.JIS,v 1.1 1999/08/28 09:00:37 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM ja.JIS Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/ja.JIS,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/ja.SJIS diff -u xc/nls/Compose/ja.SJIS:1.1 xc/nls/Compose/ja.SJIS:1.2 --- xc/nls/Compose/ja.SJIS:1.1 Sat Aug 28 05:00:37 1999 +++ xc/nls/Compose/ja.SJIS Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# ja.SJIS Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/ja.SJIS,v 1.1 1999/08/28 09:00:37 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM ja.SJIS Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/ja.SJIS,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/ko diff -u xc/nls/Compose/ko:1.1 xc/nls/Compose/ko:1.2 --- xc/nls/Compose/ko:1.1 Sat Aug 28 05:00:38 1999 +++ xc/nls/Compose/ko Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# ko Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/ko,v 1.1 1999/08/28 09:00:38 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM ko Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/ko,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/koi8-c diff -u xc/nls/Compose/koi8-c:1.1 xc/nls/Compose/koi8-c:1.2 --- xc/nls/Compose/koi8-c:1.1 Fri Oct 27 14:30:52 2000 +++ xc/nls/Compose/koi8-c Thu Apr 26 17:09:40 2001 @@ -1,13 +1,13 @@ -# -# koi8-c Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/koi8-c,v 1.1 2000/10/27 18:30:52 dawes Exp $ -# +XCOMM +XCOMM koi8-c Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/koi8-c,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM -# Means -# Special Character +XCOMM Means +XCOMM Special Character : "#" numbersign : "'" apostrophe : "'" apostrophe @@ -120,4 +120,4 @@ -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/koi8-r diff -u xc/nls/Compose/koi8-r:1.1 xc/nls/Compose/koi8-r:1.2 --- xc/nls/Compose/koi8-r:1.1 Sat Aug 28 05:00:38 1999 +++ xc/nls/Compose/koi8-r Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# koi8-r Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/koi8-r,v 1.1 1999/08/28 09:00:38 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM koi8-r Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/koi8-r,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/koi8-u diff -u xc/nls/Compose/koi8-u:1.1 xc/nls/Compose/koi8-u:1.2 --- xc/nls/Compose/koi8-u:1.1 Sat Aug 28 05:00:38 1999 +++ xc/nls/Compose/koi8-u Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# koi8-u Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/koi8-u,v 1.1 1999/08/28 09:00:38 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM koi8-u Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/koi8-u,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/mk_MK.UTF-8 diff -u xc/nls/Compose/mk_MK.UTF-8:1.1 xc/nls/Compose/mk_MK.UTF-8:1.2 --- xc/nls/Compose/mk_MK.UTF-8:1.1 Wed Dec 6 17:00:43 2000 +++ xc/nls/Compose/mk_MK.UTF-8 Thu Apr 26 17:09:40 2001 @@ -1,4 +1,4 @@ -# $XFree86: xc/nls/Compose/mk_MK.UTF-8,v 1.1 2000/12/06 22:00:43 dawes Exp $ +XCOMM $XFree86: xc/nls/Compose/mk_MK.UTF-8,v 1.2 2001/04/26 21:09:40 dawes Exp $ : 'Ñ' 0x01000450 # Cyrillic_ie_grave : 'Ѐ' 0x01000400 # Cyrillic_IE_grave : 'Ñ' 0x0100045D # Cyrillic_i_grave Index: xc/nls/Compose/mulelao-1 diff -u xc/nls/Compose/mulelao-1:1.1 xc/nls/Compose/mulelao-1:1.2 --- xc/nls/Compose/mulelao-1:1.1 Sat Aug 28 05:00:38 1999 +++ xc/nls/Compose/mulelao-1 Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# mulelao-1 Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/mulelao-1,v 1.1 1999/08/28 09:00:38 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM mulelao-1 Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/mulelao-1,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/th_TH.TACTIS diff -u xc/nls/Compose/th_TH.TACTIS:1.1 xc/nls/Compose/th_TH.TACTIS:removed --- xc/nls/Compose/th_TH.TACTIS:1.1 Sat Aug 28 05:00:39 1999 +++ xc/nls/Compose/th_TH.TACTIS Mon Jun 4 12:39:27 2001 @@ -1,15 +0,0 @@ -# -# th_TH.TACTIS Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/th_TH.TACTIS,v 1.1 1999/08/28 09:00:39 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character - -# End of Sequence Definition Index: xc/nls/Compose/vi_VN.tcvn diff -u xc/nls/Compose/vi_VN.tcvn:1.2 xc/nls/Compose/vi_VN.tcvn:1.3 --- xc/nls/Compose/vi_VN.tcvn:1.2 Fri Oct 27 14:30:52 2000 +++ xc/nls/Compose/vi_VN.tcvn Thu Apr 26 17:09:40 2001 @@ -1,13 +1,13 @@ -# $XConsortium: iso8859-1 /main/6 1995/11/08 07:24:10 kaleb $ -# $XFree86: xc/nls/Compose/vi_VN.tcvn,v 1.2 2000/10/27 18:30:52 dawes Exp $ -# 1998/12/18 Le Hong Boi $ -# -# TCVN 5712-2 Compose Sequences -# -# Sequence Definition -# -# dead key accent keysyms -# Special Character +XCOMM $XConsortium: iso8859-1 /main/6 1995/11/08 07:24:10 kaleb $ +XCOMM $XFree86: xc/nls/Compose/vi_VN.tcvn,v 1.3 2001/04/26 21:09:40 dawes Exp $ +XCOMM 1998/12/18 Le Hong Boi $ +XCOMM +XCOMM TCVN 5712-2 Compose Sequences +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM dead key accent keysyms +XCOMM Special Character : "`" grave : "'" apostrophe : " " space @@ -15,7 +15,7 @@ : "`" grave : "'" apostrophe : "\264" acute -# Accented Alphabet +XCOMM Accented Alphabet : "\200" Agrave : "\265" agrave : "\266" Ahook @@ -136,4 +136,4 @@ : "\375" yacute : "\376" Ybelowdot : "\376" ybelowdot -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/vi_VN.viscii diff -u xc/nls/Compose/vi_VN.viscii:1.2 xc/nls/Compose/vi_VN.viscii:1.3 --- xc/nls/Compose/vi_VN.viscii:1.2 Fri Oct 27 14:30:52 2000 +++ xc/nls/Compose/vi_VN.viscii Thu Apr 26 17:09:40 2001 @@ -1,13 +1,13 @@ -# $XConsortium: iso8859-1 /main/6 1995/11/08 07:24:10 kaleb $ -# $XFree86: xc/nls/Compose/vi_VN.viscii,v 1.2 2000/10/27 18:30:52 dawes Exp $ -# 1998/12/18 Le Hong Boi $ -# -# TCVN 5712-2 Compose Sequences -# -# Sequence Definition -# -# dead key accent keysyms -# Special Character +XCOMM $XConsortium: iso8859-1 /main/6 1995/11/08 07:24:10 kaleb $ +XCOMM $XFree86: xc/nls/Compose/vi_VN.viscii,v 1.3 2001/04/26 21:09:40 dawes Exp $ +XCOMM 1998/12/18 Le Hong Boi $ +XCOMM +XCOMM TCVN 5712-2 Compose Sequences +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM dead key accent keysyms +XCOMM Special Character : "`" grave : "'" apostrophe : " " space @@ -15,7 +15,7 @@ : "`" grave : "'" apostrophe : "\264" acute -# Accented Alphabet +XCOMM Accented Alphabet : "\300" Agrave : "\340" agrave : "\304" Ahook @@ -136,4 +136,4 @@ : "\375" yacute : "\036" Ybelowdot : "\334" ybelowdot -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/zh diff -u xc/nls/Compose/zh:1.1 xc/nls/Compose/zh:1.2 --- xc/nls/Compose/zh:1.1 Sat Aug 28 05:00:40 1999 +++ xc/nls/Compose/zh Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# zh Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/zh,v 1.1 1999/08/28 09:00:40 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM zh Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/zh,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/zh_CN.gbk diff -u /dev/null xc/nls/Compose/zh_CN.gbk:1.2 --- /dev/null Mon Jun 4 12:39:28 2001 +++ xc/nls/Compose/zh_CN.gbk Thu Apr 26 17:09:40 2001 @@ -0,0 +1,15 @@ +XCOMM +XCOMM zh_CN.GBK Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/zh_CN.gbk,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character + +XCOMM End of Sequence Definition Index: xc/nls/Compose/zh_TW diff -u xc/nls/Compose/zh_TW:1.1 xc/nls/Compose/zh_TW:1.2 --- xc/nls/Compose/zh_TW:1.1 Sat Aug 28 05:00:40 1999 +++ xc/nls/Compose/zh_TW Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# zh_TW Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/zh_TW,v 1.1 1999/08/28 09:00:40 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM zh_TW Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/zh_TW,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/Compose/zh_TW.big5 diff -u xc/nls/Compose/zh_TW.big5:1.1 xc/nls/Compose/zh_TW.big5:1.2 --- xc/nls/Compose/zh_TW.big5:1.1 Sat Aug 28 05:00:40 1999 +++ xc/nls/Compose/zh_TW.big5 Thu Apr 26 17:09:40 2001 @@ -1,15 +1,15 @@ -# -# zh_TW.big5 Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/zh_TW.big5,v 1.1 1999/08/28 09:00:40 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# Means -# Special Character +XCOMM +XCOMM zh_TW.big5 Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/zh_TW.big5,v 1.2 2001/04/26 21:09:40 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character -# End of Sequence Definition +XCOMM End of Sequence Definition Index: xc/nls/XLC_LOCALE/C diff -u xc/nls/XLC_LOCALE/C:1.3 xc/nls/XLC_LOCALE/C:1.4 --- xc/nls/XLC_LOCALE/C:1.3 Fri Feb 25 16:02:32 2000 +++ xc/nls/XLC_LOCALE/C Wed Jan 17 14:37:05 2001 @@ -1,6 +1,6 @@ -XCOMM $XConsortium: C /main/8 1996/09/28 16:50:43 rws $ +XCOMM $Xorg: C,v 1.3 2000/08/17 19:46:59 cpqbld Exp $ XCOMM XLocale Database Sample for C. -XCOMM $XFree86: xc/nls/XLC_LOCALE/C,v 1.3 2000/02/25 21:02:32 dawes Exp $ +XCOMM $XFree86: xc/nls/XLC_LOCALE/C,v 1.4 2001/01/17 19:37:05 dawes Exp $ XCOMM XCOMM Index: xc/nls/XLC_LOCALE/Imakefile diff -u xc/nls/XLC_LOCALE/Imakefile:1.15 xc/nls/XLC_LOCALE/Imakefile:1.19 --- xc/nls/XLC_LOCALE/Imakefile:1.15 Fri Oct 27 14:30:53 2000 +++ xc/nls/XLC_LOCALE/Imakefile Tue Mar 6 13:54:45 2001 @@ -1,8 +1,8 @@ -XCOMM $TOG: Imakefile /main/17 1998/05/21 07:51:40 kaleb $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:59 cpqbld Exp $ -XCOMM $XFree86: xc/nls/XLC_LOCALE/Imakefile,v 1.15 2000/10/27 18:30:53 dawes Exp $ +XCOMM $XFree86: xc/nls/XLC_LOCALE/Imakefile,v 1.19 2001/03/06 18:54:45 dawes Exp $ WCHAR32 = HasWChar32 @@ -85,9 +85,11 @@ LTarget(vi_VN.tcvn) LTarget(vi_VN.viscii) LTarget(zh) +LTarget(zh_CN.gbk) +LTarget(zh_HK.big5hkscs) LTarget(zh_TW) LTarget(zh_TW.big5) -LTarget(th_TH.TACTIS) +LTarget(th_TH) LTarget(en_US.UTF-8) #ifdef UXPArchitecture LTarget(ja.U90) Index: xc/nls/XLC_LOCALE/iso8859-1 diff -u xc/nls/XLC_LOCALE/iso8859-1:1.1.1.1 xc/nls/XLC_LOCALE/iso8859-1:1.1.1.2 --- xc/nls/XLC_LOCALE/iso8859-1:1.1.1.1 Sat Dec 21 22:29:35 1996 +++ xc/nls/XLC_LOCALE/iso8859-1 Tue Jan 16 17:28:45 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: iso8859-1 /main/7 1996/09/28 16:51:00 rws $ +XCOMM $Xorg: iso8859-1,v 1.3 2000/08/17 19:46:59 cpqbld Exp $ XCOMM XLocale Database Sample for iso8859-1. XCOMM Index: xc/nls/XLC_LOCALE/iso8859-10 diff -u xc/nls/XLC_LOCALE/iso8859-10:1.1 xc/nls/XLC_LOCALE/iso8859-10:1.2 --- xc/nls/XLC_LOCALE/iso8859-10:1.1 Sun Sep 27 07:06:15 1998 +++ xc/nls/XLC_LOCALE/iso8859-10 Wed Jan 17 14:37:05 2001 @@ -1,4 +1,4 @@ -XCOMM $TOG: iso8859-10 /main/1 1998/05/20 14:49:21 kaleb $ +XCOMM $Xorg: iso8859-10,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ XCOMM XLocale Database Sample for iso8859-4. XCOMM Index: xc/nls/XLC_LOCALE/iso8859-2 diff -u xc/nls/XLC_LOCALE/iso8859-2:1.1.1.1 xc/nls/XLC_LOCALE/iso8859-2:1.1.1.2 --- xc/nls/XLC_LOCALE/iso8859-2:1.1.1.1 Sat Dec 21 22:29:35 1996 +++ xc/nls/XLC_LOCALE/iso8859-2 Tue Jan 16 17:28:47 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: iso8859-2 /main/7 1996/09/28 16:51:05 rws $ +XCOMM $Xorg: iso8859-2,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ XCOMM XLocale Database Sample for iso8859-2. XCOMM Index: xc/nls/XLC_LOCALE/iso8859-3 diff -u xc/nls/XLC_LOCALE/iso8859-3:1.1.1.1 xc/nls/XLC_LOCALE/iso8859-3:1.1.1.2 --- xc/nls/XLC_LOCALE/iso8859-3:1.1.1.1 Sat Dec 21 22:29:35 1996 +++ xc/nls/XLC_LOCALE/iso8859-3 Tue Jan 16 17:28:49 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: iso8859-3 /main/7 1996/09/28 16:51:11 rws $ +XCOMM $Xorg: iso8859-3,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ XCOMM XLocale Database Sample for iso8859-3. XCOMM Index: xc/nls/XLC_LOCALE/iso8859-4 diff -u xc/nls/XLC_LOCALE/iso8859-4:1.1.1.1 xc/nls/XLC_LOCALE/iso8859-4:1.1.1.2 --- xc/nls/XLC_LOCALE/iso8859-4:1.1.1.1 Sat Dec 21 22:29:35 1996 +++ xc/nls/XLC_LOCALE/iso8859-4 Tue Jan 16 17:28:50 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: iso8859-4 /main/7 1996/09/28 16:51:17 rws $ +XCOMM $Xorg: iso8859-4,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ XCOMM XLocale Database Sample for iso8859-4. XCOMM Index: xc/nls/XLC_LOCALE/iso8859-5 diff -u xc/nls/XLC_LOCALE/iso8859-5:1.1.1.1 xc/nls/XLC_LOCALE/iso8859-5:1.1.1.2 --- xc/nls/XLC_LOCALE/iso8859-5:1.1.1.1 Sat Dec 21 22:29:35 1996 +++ xc/nls/XLC_LOCALE/iso8859-5 Tue Jan 16 17:28:51 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: iso8859-5 /main/7 1996/09/28 16:51:24 rws $ +XCOMM $Xorg: iso8859-5,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ XCOMM XLocale Database Sample for iso8859-5. XCOMM Index: xc/nls/XLC_LOCALE/iso8859-6 diff -u xc/nls/XLC_LOCALE/iso8859-6:1.1.1.1 xc/nls/XLC_LOCALE/iso8859-6:1.1.1.2 --- xc/nls/XLC_LOCALE/iso8859-6:1.1.1.1 Sat Dec 21 22:29:35 1996 +++ xc/nls/XLC_LOCALE/iso8859-6 Tue Jan 16 17:28:52 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: iso8859-6 /main/7 1996/09/28 16:51:29 rws $ +XCOMM $Xorg: iso8859-6,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ XCOMM XLocale Database Sample for iso8859-6. XCOMM Index: xc/nls/XLC_LOCALE/iso8859-7 diff -u xc/nls/XLC_LOCALE/iso8859-7:1.1.1.1 xc/nls/XLC_LOCALE/iso8859-7:1.1.1.2 --- xc/nls/XLC_LOCALE/iso8859-7:1.1.1.1 Sat Dec 21 22:29:36 1996 +++ xc/nls/XLC_LOCALE/iso8859-7 Tue Jan 16 17:28:53 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: iso8859-7 /main/7 1996/09/28 16:51:37 rws $ +XCOMM $Xorg: iso8859-7,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ XCOMM XLocale Database Sample for iso8859-7. XCOMM Index: xc/nls/XLC_LOCALE/iso8859-8 diff -u xc/nls/XLC_LOCALE/iso8859-8:1.1.1.1 xc/nls/XLC_LOCALE/iso8859-8:1.1.1.2 --- xc/nls/XLC_LOCALE/iso8859-8:1.1.1.1 Sat Dec 21 22:29:36 1996 +++ xc/nls/XLC_LOCALE/iso8859-8 Tue Jan 16 17:28:54 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: iso8859-8 /main/7 1996/09/28 16:51:44 rws $ +XCOMM $Xorg: iso8859-8,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ XCOMM XLocale Database Sample for iso8859-8. XCOMM Index: xc/nls/XLC_LOCALE/iso8859-9 diff -u xc/nls/XLC_LOCALE/iso8859-9:1.1.1.1 xc/nls/XLC_LOCALE/iso8859-9:1.1.1.2 --- xc/nls/XLC_LOCALE/iso8859-9:1.1.1.1 Sat Dec 21 22:29:36 1996 +++ xc/nls/XLC_LOCALE/iso8859-9 Tue Jan 16 17:28:54 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: iso8859-9 /main/7 1996/09/28 16:51:50 rws $ +XCOMM $Xorg: iso8859-9,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ XCOMM XLocale Database Sample for iso8859-9. XCOMM Index: xc/nls/XLC_LOCALE/ja diff -u xc/nls/XLC_LOCALE/ja:1.3 xc/nls/XLC_LOCALE/ja:1.4 --- xc/nls/XLC_LOCALE/ja:1.3 Tue Aug 26 07:57:22 1997 +++ xc/nls/XLC_LOCALE/ja Wed Jan 17 14:37:05 2001 @@ -1,7 +1,9 @@ -XCOMM $XFree86: xc/nls/XLC_LOCALE/ja,v 1.3 1997/08/26 11:57:22 hohndel Exp $ +XCOMM $XFree86: xc/nls/XLC_LOCALE/ja,v 1.4 2001/01/17 19:37:05 dawes Exp $ XCOMM XCOMM -XCOMM $XConsortium: ja /main/7 1996/09/28 16:51:56 rws $ +XCOMM +XCOMM $Xorg: ja,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ +XCOMM XCOMM XLocale Database Sample for ja_JP.euc XCOMM Index: xc/nls/XLC_LOCALE/ja.JIS diff -u xc/nls/XLC_LOCALE/ja.JIS:1.3 xc/nls/XLC_LOCALE/ja.JIS:1.4 --- xc/nls/XLC_LOCALE/ja.JIS:1.3 Tue Aug 26 07:57:23 1997 +++ xc/nls/XLC_LOCALE/ja.JIS Wed Jan 17 14:37:05 2001 @@ -1,7 +1,9 @@ -XCOMM $XFree86: xc/nls/XLC_LOCALE/ja.JIS,v 1.3 1997/08/26 11:57:23 hohndel Exp $ +XCOMM $XFree86: xc/nls/XLC_LOCALE/ja.JIS,v 1.4 2001/01/17 19:37:05 dawes Exp $ XCOMM XCOMM -XCOMM $XConsortium: ja.JIS /main/8 1996/09/28 16:52:05 rws $ +XCOMM +XCOMM $Xorg: ja.JIS,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ +XCOMM XCOMM XLocale Database Sample for ja_JP.jis XCOMM Index: xc/nls/XLC_LOCALE/ja.S90 diff -u xc/nls/XLC_LOCALE/ja.S90:1.1.1.1 xc/nls/XLC_LOCALE/ja.S90:1.1.1.2 --- xc/nls/XLC_LOCALE/ja.S90:1.1.1.1 Sat Dec 21 22:29:38 1996 +++ xc/nls/XLC_LOCALE/ja.S90 Tue Jan 16 17:29:00 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: ja.S90 /main/1 1996/10/23 07:16:25 kaleb $ +XCOMM $Xorg: ja.S90,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ XCOMM Copyright 1995 by FUJITSU LIMITED XCOMM This is source code modified by FUJITSU LIMITED under the Joint XCOMM Development Agreement for the CDEnext PST. Index: xc/nls/XLC_LOCALE/ja.SJIS diff -u xc/nls/XLC_LOCALE/ja.SJIS:1.3 xc/nls/XLC_LOCALE/ja.SJIS:1.4 --- xc/nls/XLC_LOCALE/ja.SJIS:1.3 Tue Aug 26 07:57:23 1997 +++ xc/nls/XLC_LOCALE/ja.SJIS Wed Jan 17 14:37:05 2001 @@ -1,7 +1,9 @@ -XCOMM $XFree86: xc/nls/XLC_LOCALE/ja.SJIS,v 1.3 1997/08/26 11:57:23 hohndel Exp $ +XCOMM $XFree86: xc/nls/XLC_LOCALE/ja.SJIS,v 1.4 2001/01/17 19:37:05 dawes Exp $ XCOMM XCOMM -XCOMM $XConsortium: ja.SJIS /main/8 1996/10/23 07:16:28 kaleb $ +XCOMM +XCOMM $Xorg: ja.SJIS,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ +XCOMM XCOMM XLocale Database Sample for ja_JP.sjis XCOMM Index: xc/nls/XLC_LOCALE/ja.U90 diff -u xc/nls/XLC_LOCALE/ja.U90:1.1.1.1 xc/nls/XLC_LOCALE/ja.U90:1.1.1.2 --- xc/nls/XLC_LOCALE/ja.U90:1.1.1.1 Sat Dec 21 22:29:38 1996 +++ xc/nls/XLC_LOCALE/ja.U90 Tue Jan 16 17:29:07 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: ja.U90 /main/1 1996/10/23 07:16:31 kaleb $ +XCOMM $Xorg: ja.U90,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ XCOMM Copyright 1995 by FUJITSU LIMITED XCOMM This is source code modified by FUJITSU LIMITED under the Joint XCOMM Development Agreement for the CDEnext PST. Index: xc/nls/XLC_LOCALE/ko diff -u xc/nls/XLC_LOCALE/ko:1.1.1.1 xc/nls/XLC_LOCALE/ko:1.3 --- xc/nls/XLC_LOCALE/ko:1.1.1.1 Sat Dec 21 22:29:37 1996 +++ xc/nls/XLC_LOCALE/ko Thu Apr 26 14:11:13 2001 @@ -1,6 +1,7 @@ -XCOMM $XConsortium: ko /main/7 1996/09/28 16:52:27 rws $ +XCOMM $Xorg: ko,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ XCOMM XLocale Database Sample for ko. XCOMM +XCOMM $XFree86: xc/nls/XLC_LOCALE/ko,v 1.3 2001/04/26 18:11:13 tsi Exp $ XCOMM XCOMM XLC_FONTSET category @@ -22,7 +23,8 @@ name KSC5601.1987-0:GL } font { - primary KSC5601.1987-0:GL + primary KSC5601.1987-0:GL + substitute KSC5601.1987-0:GL } } END XLC_FONTSET Index: xc/nls/XLC_LOCALE/koi8-r diff -u xc/nls/XLC_LOCALE/koi8-r:3.3 xc/nls/XLC_LOCALE/koi8-r:3.4 --- xc/nls/XLC_LOCALE/koi8-r:3.3 Fri Dec 1 12:43:03 2000 +++ xc/nls/XLC_LOCALE/koi8-r Wed Jan 17 14:37:05 2001 @@ -1,8 +1,8 @@ -XCOMM $TOG: koi8-r /main/2 1997/09/29 13:14:37 kaleb $ +XCOMM $Xorg: koi8-r,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ XCOMM XLocale Database Sample for koi8-r. XCOMM XCOMM -XCOMM $XFree86: xc/nls/XLC_LOCALE/koi8-r,v 3.3 2000/12/01 17:43:03 dawes Exp $ +XCOMM $XFree86: xc/nls/XLC_LOCALE/koi8-r,v 3.4 2001/01/17 19:37:05 dawes Exp $ XCOMM XCOMM XLC_FONTSET category Index: xc/nls/XLC_LOCALE/th_TH diff -u /dev/null xc/nls/XLC_LOCALE/th_TH:1.1 --- /dev/null Mon Jun 4 12:39:31 2001 +++ xc/nls/XLC_LOCALE/th_TH Thu Feb 8 19:02:55 2001 @@ -0,0 +1,67 @@ +XCOMM $XConsortium: th_TH$ +XCOMM XLocale Database Sample for th_TH +XCOMM +XCOMM $XFree86: xc/nls/XLC_LOCALE/th_TH,v 1.1 2001/02/09 00:02:55 dawes Exp $ +XCOMM +XCOMM Modified from origial th_TH.TACTIS + +XCOMM +XCOMM XLC_FONTSET category +XCOMM +XLC_FONTSET +XCOMM fs0 class (7 bit ASCII) +fs0 { + charset ISO8859-1:GL + font ISO8859-1:GL +} +XCOMM fs1 class (Thai) +fs1 { + charset TIS620-0:GR + font TIS620-0:GR +} +END XLC_FONTSET + +XCOMM +XCOMM XLC_XLOCALE category +XCOMM +XLC_XLOCALE + +encoding_name TIS620 +mb_cur_max 1 +state_depend_encoding False + +#if WCHAR32 +wc_encoding_mask \x30000000 +wc_shift_bits 7 +#else +wc_encoding_mask \x00008080 +wc_shift_bits 8 +#endif + +#ifndef X_LOCALE +use_stdc_env True +force_convert_to_mb True +#endif + +XCOMM cs0 class +cs0 { + side GL:Default + length 1 + wc_encoding \x00000000 + ct_encoding ISO8859-1:GL +} + + +XCOMM cs1 class +cs1 { + side GR:Default + length 1 +#if WCHAR32 + wc_encoding \x30000000 +#else + wc_encoding \x00008080 +#endif + ct_encoding TIS620-0:GR +} + +END XLC_XLOCALE Index: xc/nls/XLC_LOCALE/th_TH.TACTIS diff -u xc/nls/XLC_LOCALE/th_TH.TACTIS:1.2 xc/nls/XLC_LOCALE/th_TH.TACTIS:removed --- xc/nls/XLC_LOCALE/th_TH.TACTIS:1.2 Sun Jun 6 10:06:02 1999 +++ xc/nls/XLC_LOCALE/th_TH.TACTIS Mon Jun 4 12:39:31 2001 @@ -1,66 +0,0 @@ -XCOMM $XConsortium: th_TH.TACTIS /main/7 1996/09/28 16:52:32 rws $ -XCOMM XLocale Database Sample for th_TH.TACTIS -XCOMM -XCOMM $XFree86: xc/nls/XLC_LOCALE/th_TH.TACTIS,v 1.2 1999/06/06 14:06:02 dawes Exp $ -XCOMM - -XCOMM -XCOMM XLC_FONTSET category -XCOMM -XLC_FONTSET -XCOMM fs0 class (7 bit ASCII) -fs0 { - charset ISO8859-1:GL - font ISO8859-1:GL -} -XCOMM fs1 class (Thai) -fs1 { - charset TIS620.2533-1:GR - font TIS620.2533-1:GR -} -END XLC_FONTSET - -XCOMM -XCOMM XLC_XLOCALE category -XCOMM -XLC_XLOCALE - -encoding_name TACTIS -mb_cur_max 1 -state_depend_encoding False - -#if WCHAR32 -wc_encoding_mask \x30000000 -wc_shift_bits 7 -#else -wc_encoding_mask \x00008080 -wc_shift_bits 8 -#endif - -#ifndef X_LOCALE -use_stdc_env True -force_convert_to_mb True -#endif - -XCOMM cs0 class -cs0 { - side GL:Default - length 1 - wc_encoding \x00000000 - ct_encoding ISO8859-1:GL -} - - -XCOMM cs1 class -cs1 { - side GR:Default - length 1 -#if WCHAR32 - wc_encoding \x30000000 -#else - wc_encoding \x00008080 -#endif - ct_encoding TIS620.2533-1:GR -} - -END XLC_XLOCALE Index: xc/nls/XLC_LOCALE/zh diff -u xc/nls/XLC_LOCALE/zh:1.1.1.1 xc/nls/XLC_LOCALE/zh:1.2 --- xc/nls/XLC_LOCALE/zh:1.1.1.1 Sat Dec 21 22:29:38 1996 +++ xc/nls/XLC_LOCALE/zh Mon Apr 23 17:41:43 2001 @@ -1,6 +1,7 @@ -XCOMM $XConsortium: zh /main/7 1996/09/28 16:52:38 rws $ +XCOMM $Xorg: zh,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ XCOMM XLocale Database Sample for zh. XCOMM +XCOMM $XFree86: xc/nls/XLC_LOCALE/zh,v 1.2 2001/04/23 21:41:43 dawes Exp $ XCOMM XCOMM XLC_FONTSET category @@ -23,6 +24,7 @@ } font { primary GB2312.1980-0:GL + substitute GB2312.1980-0:GLGR } } END XLC_FONTSET Index: xc/nls/XLC_LOCALE/zh_CN.gbk diff -u /dev/null xc/nls/XLC_LOCALE/zh_CN.gbk:1.1 --- /dev/null Mon Jun 4 12:39:32 2001 +++ xc/nls/XLC_LOCALE/zh_CN.gbk Tue Mar 6 13:03:18 2001 @@ -0,0 +1,71 @@ +XCOMM +XCOMM X11R6 L10N for Chinese GBK Encoding. +XCOMM modified from xc/nls/XLC_LOCALE/zh_TW.Big5 +XCOMM by Sean Chen +XCOMM +XCOMM $XFree86: xc/nls/XLC_LOCALE/zh_CN.gbk,v 1.1 2001/03/06 18:03:18 dawes Exp $ + +XCOMM +XCOMM XLC_FONTSET category +XCOMM +XLC_FONTSET +XCOMM fs0 class (7 bit ASCII) +fs0 { + charset { + name ISO8859-1:GL + } + font { + primary ISO8859-1:GL + vertical_rotate all + } +} +XCOMM fs1 class +fs1 { + charset { + name GBK-0:GLGR + } + font { + primary GBK-0:GLGR + substitute GB13000.1993-1:GLGR + } +} +END XLC_FONTSET + +XCOMM +XCOMM XLC_XLOCALE category +XCOMM +XLC_XLOCALE + +encoding_name zh_CN.GBK +mb_cur_max 2 +state_depend_encoding False + +wc_encoding_mask \x00008000 +wc_shift_bits 8 + +use_stdc_env True +force_convert_to_mb True + +XCOMM cs0 class +cs0 { + side GL:Default + length 1 + wc_encoding \x00000000 + ct_encoding ISO8859-1:GL +} + +XCOMM cs1 class +cs1 { + side none + length 2 + byte1 \x81,\xfe + byte2 \x40,\x7e;\x80,\xfe + + wc_encoding \x00008000 + ct_encoding GBK-0:GLGR:\x1b\x25\x2f\x32\x80\x88\x47\x42\x4b\x2d\x30\x02 + + mb_conversion [\x8140,\xfefe]->\x0140 + ct_conversion [\x0140,\x7efe]->\x8140 +} + +END XLC_XLOCALE Index: xc/nls/XLC_LOCALE/zh_HK.big5hkscs diff -u /dev/null xc/nls/XLC_LOCALE/zh_HK.big5hkscs:1.1 --- /dev/null Mon Jun 4 12:39:32 2001 +++ xc/nls/XLC_LOCALE/zh_HK.big5hkscs Tue Mar 6 13:54:46 2001 @@ -0,0 +1,71 @@ +XCOMM +XCOMM (c) 1996, X11R6 L10N for Taiwan and Big5 Encoding Project +XCOMM +XCOMM modified for X11R6.3 by Hung-Chi Chu 1998/01/10 +XCOMM modified for Big5HKSCS by Roger So +XCOMM +XCOMM $XFree86: xc/nls/XLC_LOCALE/zh_HK.big5hkscs,v 1.1 2001/03/06 18:54:46 dawes Exp $ +XCOMM +XCOMM XLC_FONTSET category +XCOMM +XLC_FONTSET +XCOMM fs0 class (7 bit ASCII) +fs0 { + charset { + name ISO8859-1:GL + } + font { + primary ISO8859-1:GL + vertical_rotate all + } +} +XCOMM fs1 class +fs1 { + charset { + name BIG5HKSCS-0:GLGR + } + font { + primary BIG5HKSCS-0:GLGR + substitute BIG5HKSCS-0:GLGR + } +} +END XLC_FONTSET + +XCOMM +XCOMM XLC_XLOCALE category +XCOMM +XLC_XLOCALE + +encoding_name zh_HK.big5hkscs +mb_cur_max 2 +state_depend_encoding False + +wc_encoding_mask \x00008000 +wc_shift_bits 8 + +use_stdc_env True +force_convert_to_mb True + +XCOMM cs0 class +cs0 { + side GL:Default + length 1 + wc_encoding \x00000000 + ct_encoding ISO8859-1:GL +} + +XCOMM cs1 class +cs1 { + side none + length 2 + byte1 \x85,\xfe + byte2 \x40,\x7e;\xa1,\xfe + + wc_encoding \x00008000 + ct_encoding BIG5HKSCS-0:GLGR:\x1b\x25\x2f\x32\x80\x8c\x42\x49\x47\x35\x48\x4b\x53\x43\x53\x2d\x30\x02 + + mb_conversion [\x8540,\xfefe]->\x0540 + ct_conversion [\x0540,\x7efe]->\x8540 +} + +END XLC_XLOCALE Index: xc/nls/XLC_LOCALE/zh_TW diff -u xc/nls/XLC_LOCALE/zh_TW:1.2 xc/nls/XLC_LOCALE/zh_TW:1.3 --- xc/nls/XLC_LOCALE/zh_TW:1.2 Sat May 3 05:15:17 1997 +++ xc/nls/XLC_LOCALE/zh_TW Wed Jan 17 14:37:05 2001 @@ -1,4 +1,4 @@ -XCOMM $TOG: zh_TW /main/8 1997/04/18 07:51:12 barstow $ +XCOMM $Xorg: zh_TW,v 1.3 2000/08/17 19:47:01 cpqbld Exp $ XCOMM XLocale Database Sample for zh_TW XCOMM XCOMM Note: In lib/X11/lcCT.c, charset names for CNS11643 coded character Index: xc/programs/Imakefile diff -u xc/programs/Imakefile:3.31 xc/programs/Imakefile:3.45 --- xc/programs/Imakefile:3.31 Fri Sep 22 07:35:41 2000 +++ xc/programs/Imakefile Tue May 1 13:23:26 2001 @@ -1,13 +1,16 @@ -XCOMM $TOG: Imakefile /main/85 1998/02/26 17:14:44 kaleb $ -XCOMM -XCOMM -XCOMM -XCOMM $XFree86: xc/programs/Imakefile,v 3.31 2000/09/22 11:35:41 alanh Exp $ +XCOMM $Xorg: Imakefile,v 1.4 2000/08/17 19:47:01 cpqbld Exp $ + + + +XCOMM $XFree86: xc/programs/Imakefile,v 3.45 2001/05/01 17:23:26 alanh Exp $ + #define IHaveSubdirs #define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" -#if BuildServer +#if BuildServer || UseRgbTxt RGBSRCDIR = rgb +#endif +#if BuildServer XSSRCDIR = Xserver #endif #ifndef Win32Architecture @@ -18,15 +21,15 @@ XFSSRCDIR = xfs #endif #if BuildXKBlib - XKBSRCDIRS = xkbcomp xkbevd xkbprint xkbutils + XKBSRCDIRS = setxkbmap xkbcomp xkbevd xkbprint xkbutils #endif -#if BuildScreenSaverExt +#if BuildScreenSaverLibrary SCREENSAVESRCDIR = beforelight #endif -#if BuildXF86VidModeExt +#if BuildXF86VidModeLibrary XVIDTUNESRCDIR = xvidtune #endif -#if BuildXF86DGA +#if BuildXF86DGALibrary XF86DGASRCDIR = xf86dga #endif #if BuildXAServer @@ -43,10 +46,10 @@ XDMSRCDIR = xdm XFINDPROXYSRCDIR = xfindproxy XFWPSRCDIR = xfwp -#if BuildXF86VidModeExt +#if BuildXF86VidModeLibrary XGAMMASRCDIR = xgamma #endif -#if BuildXvExt +#if BuildXvLibrary XVINFOSRCDIR = xvinfo #endif XHOSTSRCDIR = xhost @@ -61,35 +64,62 @@ MKCFMSRCDIR = mkcfm #endif +#if BuildXIElib + XIECLIENTDIRS = xieperf +#endif + +#if BuildXInputLib +XINPUTCLIENTDIRS = xsetmode xsetpointer +#endif + +/* makepsres should be considered as part of the DPS libraries */ #if BuildDPSLibraries MAKEPSRESDIR = makepsres #endif +/* on the other hand, the following are independent clients */ +#if BuildDPSClients + DPSCLIENTDIRS = dpsinfo dpsexec texteroids +#endif + XPMCLIENTDIRS = cxpm sxpm +#if UseFreetype2 + XFTCACHEDIR = xftcache +#endif + +#if BuildGLXLibrary && BuildGLULibrary + GLXCLIENTDIRS = glxinfo glxgears +#endif + +#ifndef cygwinArchitecture + XLOADDIR = xload +#endif -#if BuildServersOnly +#if BuildServersOnly || !BuildClients SUBDIRS = $(XSSRCDIR) #else SUBDIRS = \ appres bdftopcf bitmap \ - $(SCREENSAVESRCDIR) editres fsinfo fslsfonts fstobdf iceauth \ + $(SCREENSAVESRCDIR) editres fslsfonts fstobdf iceauth \ ico listres \ - $(MAKEPSRESDIR) $(MKCFMSRCDIR) \ + $(MAKEPSRESDIR) $(DPSCLIENTDIRS) \ + $(MKCFMSRCDIR) \ mkfontdir oclock $(PROXYMGRSRCDIR) $(RGBSRCDIR) $(RSTARTSRCDIR) \ - setxkbmap showfont \ + showfont \ $(SMPROXYSRCDIR) $(TWMSRCDIR) viewres x11perf xauth xbiff xcalc \ xclipboard xclock \ xcmsdb $(XCONSOLESRCDIR) xditview $(XDMSRCDIR) xdpyinfo \ - $(XF86DGASRCDIR) xedit xev xeyes xfd xfontsel $(XFSSRCDIR) \ + $(XF86DGASRCDIR) xedit xev xeyes xfd xfontsel $(XFSSRCDIR) xfsinfo \ $(XFINDPROXYSRCDIR) $(XFWPSRCDIR) $(XGAMMASRCDIR) xgc $(XHOSTSRCDIR) \ - xieperf $(XINITSRCDIR) $(XKBSRCDIRS) xkill xload xlogo xlsatoms \ - xlsclients xlsfonts xmag xman xmessage xmodmap xprop xrdb \ + $(XIECLIENTDIRS) $(XINITSRCDIR) $(XKBSRCDIRS) xkill $(XLOADDIR) xlogo \ + xlsatoms \ + xlsclients xlsfonts xmag xman xmessage xmh xmodmap xprop xrdb \ xrefresh $(XRXSRCDIR) xset \ - xsetroot $(XSMSRCDIR) xstdcmap xsetmode xsetpointer \ + xsetroot $(XSMSRCDIR) xstdcmap $(XINPUTCLIENTDIRS) \ $(XTERMSRCDIR) $(XVIDTUNESRCDIR) xwd xwininfo xwud \ $(XPMCLIENTDIRS) $(XVINFOSRCDIR) \ $(XSSRCDIR) $(XASSRCDIR) $(LBXPROXYSRCDIR) $(SCRIPTSDIR) \ - glxinfo + $(GLXCLIENTDIRS) $(XFTCACHEDIR) #endif MakeSubdirs($(SUBDIRS)) Index: xc/programs/Xserver/Imakefile diff -u xc/programs/Xserver/Imakefile:3.205 xc/programs/Xserver/Imakefile:3.229 --- xc/programs/Xserver/Imakefile:3.205 Mon Dec 11 15:29:31 2000 +++ xc/programs/Xserver/Imakefile Fri May 18 13:48:30 2001 @@ -1,8 +1,8 @@ -XCOMM $TOG: Imakefile /main/249 1997/12/11 11:18:14 kaleb $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:01 cpqbld Exp $ /* * Server Master Makefile */ -XCOMM $XFree86: xc/programs/Xserver/Imakefile,v 3.205 2000/12/11 20:29:31 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/Imakefile,v 3.229 2001/05/18 17:48:30 torrey Exp $ #ifndef InstallXserverSetUID #define InstallXserverSetUID NO @@ -21,7 +21,7 @@ #define BarePostFbLibs $(MFB) $(XPFBLIBS) $(MI) #define PostFbLibs BarePostFbLibs $(EXTENSIONS) #define NoMfbBarePostFbLibs $(XPFBLIBS) $(MI) -#ifndef BuildXinerama +#if !BuildXinerama #define NoMfbPostFbLibs NoMfbBarePostFbLibs $(EXTENSIONS) #else #define NoMfbPostFbLibs $(EXTENSIONS) NoMfbBarePostFbLibs $(EXTENSIONS) @@ -104,7 +104,8 @@ XIDIR = Xi #endif #if BuildXIE - XIEEXT = XIE/dixie/ModuleLibraryTargetName(dixie) XIE/mixie/ModuleLibraryTargetName(mixie) + XIEEXT = XIE/dixie/ModuleLibraryTargetName(dixie) \ + XIE/mixie/ModuleLibraryTargetName(mixie) #endif #if BuildXIE || BuildXIElib XIEDIR = XIE @@ -173,7 +174,8 @@ XPPSLIB = Xprint/ps/LibraryTargetName(ps) #endif -XPDDXLIBS = Xprint/LibraryTargetName(printer) $(XPRASTLIB) $(XPPCLLIB) $(XPMPCLLIB) $(XPPSLIB) +XPDDXLIBS = Xprint/LibraryTargetName(printer) \ + $(XPRASTLIB) $(XPPCLLIB) $(XPMPCLLIB) $(XPPSLIB) XPDDXFBLIBS = $(MFB) $(CFB32) #if !PrintOnlyServer XPFBLIBS = $(XPDDXFBLIBS) @@ -230,13 +232,19 @@ #else MFB = mfb/LibraryTargetName(mfb) FB = fb/LibraryTargetName(fb) - CFB = cfb/LibraryTargetName(cfb) cfb16/LibraryTargetName(cfb16) \ - cfb24/LibraryTargetName(cfb24) cfb32/LibraryTargetName(cfb32) + CFB = cfb/LibraryTargetName(cfb) \ + cfb16/LibraryTargetName(cfb16) \ + cfb24/LibraryTargetName(cfb24) \ + cfb32/LibraryTargetName(cfb32) CFB8 = cfb/LibraryTargetName(cfb) - CFB4 = cfb/LibraryTargetName(cfb) cfb4/LibraryTargetName(cfb4) - CFB16 = cfb/LibraryTargetName(cfb) cfb16/LibraryTargetName(cfb16) - CFB24 = cfb/LibraryTargetName(cfb) cfb24/LibraryTargetName(cfb24) - CFB32 = cfb/LibraryTargetName(cfb) cfb32/LibraryTargetName(cfb32) + CFB4 = cfb/LibraryTargetName(cfb) \ + cfb4/LibraryTargetName(cfb4) + CFB16 = cfb/LibraryTargetName(cfb) \ + cfb16/LibraryTargetName(cfb16) + CFB24 = cfb/LibraryTargetName(cfb) \ + cfb24/LibraryTargetName(cfb24) + CFB32 = cfb/LibraryTargetName(cfb) \ + cfb32/LibraryTargetName(cfb32) SHADOW = miext/shadow/LibraryTargetName(shadow) #endif #if BuildLowMem @@ -270,7 +278,7 @@ DBMLIBS = DBMLibrary #endif SYSLIBS = $(ZLIB) MathLibrary Krb5Libraries $(DBMLIBS) $(USB) \ - $(PAMLIBS) $(EXTRASYSLIBS) + $(PAMLIBS) $(EXTRASYSLIBS) CBRT = mi/LibraryTargetName(cbrt) STDDIRS = include dix os mi $(XPDDXDIR) $(EXTDIRS) @@ -331,7 +339,8 @@ #else DECLIBS = hw/dec/ws/LibraryTargetName(dec) CFB8Libs #endif -ServerTarget(Xdec,$(DECDIRS),$(DECOBJS),$(DECLIBS),$(FONTLIBS) $(SYSLIBS)) +ServerTarget(Xdec,$(DECDIRS),$(DECOBJS), \ + $(DECLIBS),$(FONTLIBS) $(SYSLIBS)) #ifndef ServerToInstall #define ServerToInstall Xdec #endif @@ -349,10 +358,13 @@ CFB24DIR = cfb24 CFB32DIR = cfb32 DDXDIR1 = hw/dec/ws -DECDIRS1 = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) $(DDXDIR1) $(DEPDIRS) +DECDIRS1 = $(STDDIRS) $(MFBDIR) \ + $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) \ + $(DDXDIR1) $(DEPDIRS) DECOBJS1 = hw/dec/ws/init.o hw/dec/ws/mdepthinit.o DECLIBS1 = hw/dec/ws/LibraryTargetName(dec) CFBLibs -ServerTarget(Xdec_md,$(DECDIRS1),$(DECOBJS1),$(DECLIBS1),$(FONTLIBS) $(SYSLIBS)) +ServerTarget(Xdec_md,$(DECDIRS1),$(DECOBJS1), \ + $(DECLIBS1),$(FONTLIBS) $(SYSLIBS)) #ifndef ServerToInstall #define ServerToInstall Xdec_md #endif @@ -379,7 +391,8 @@ SUNLIBS = hw/sun/LibraryTargetName(sun) CFB8Libs #endif SUNSYSLIBS = $(FONTLIBS) $(WIDECHARSYSLIB) $(SYSLIBS) -SetUIDServerTarget(Xsun,$(SUNDIRS),$(SUNOBJS),$(SUNLIBS),$(SUNSYSLIBS)) +SetUIDServerTarget(Xsun,$(SUNDIRS),$(SUNOBJS), \ + $(SUNLIBS),$(SUNSYSLIBS)) #ifndef ServerToInstall #define ServerToInstall Xsun #endif @@ -396,10 +409,13 @@ CFB24DIR = cfb24 CFB32DIR = cfb32 DDXDIR1 = hw/sun -SUN24DIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) $(DDXDIR1) $(DEPDIRS) +SUN24DIRS = $(STDDIRS) $(MFBDIR) \ + $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) \ + $(DDXDIR1) $(DEPDIRS) SUN24OBJS = hw/sun/sunInitMulti.o SUN24LIBS = hw/sun/LibraryTargetName(sun) CFBLibs -SetUIDServerTarget(Xsun24,$(SUN24DIRS),$(SUN24OBJS),$(SUN24LIBS),$(FONTLIBS) $(SYSLIBS)) +SetUIDServerTarget(Xsun24,$(SUN24DIRS),$(SUN24OBJS), \ + $(SUN24LIBS),$(FONTLIBS) $(SYSLIBS)) #ifndef ServerToInstall #define ServerToInstall Xsun24 #endif @@ -414,8 +430,9 @@ DDXDIR1 = hw/sun SUNMDIRS = $(STDDIRS) $(MFBDIR) $(DDXDIR1) $(DEPDIRS) SUNMOBJS = hw/sun/sunInitMono.o hw/sun/sunInExMono.o -SUNMLIBS = hw/sun/LibraryTargetName(sun) MFBBareLibs $(OTHEREXTS) -SetUIDServerTarget(XsunMono,$(SUNMDIRS),$(SUNMOBJS),$(SUNMLIBS),$(FONTLIBS) $(SYSLIBS)) +SUNMLIBS = hw/sun/LibraryTargetName(sun) MFBBareLibs $(EXTENSIONS) +SetUIDServerTarget(XsunMono,$(SUNMDIRS),$(SUNMOBJS), \ + $(SUNMLIBS),$(FONTLIBS) $(SYSLIBS)) #ifndef ServerToInstall #define ServerToInstall XsunMono #endif @@ -432,7 +449,8 @@ SUNDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(DDXDIR1) $(DEPDIRS) SUNOBJS = hw/sunAmoeba/sunInitColor.o SUNLIBS = hw/sunAmoeba/LibraryTargetName(sun) CFB8Libs -ServerTarget(Xsun,$(SUNDIRS),$(SUNOBJS),$(SUNLIBS),$(FONTLIBS) $(SYSLIBS)) +ServerTarget(Xsun,$(SUNDIRS),$(SUNOBJS), \ + $(SUNLIBS),$(FONTLIBS) $(SYSLIBS)) #ifndef ServerToInstall #define ServerToInstall Xsun #endif @@ -448,7 +466,8 @@ SUNMDIRS = $(STDDIRS) $(MFBDIR) $(DDXDIR1) $(DEPDIRS) SUNMOBJS = hw/sunAmoeba/sunInitMono.o hw/sunAmoeba/sunInExMono.o SUNMLIBS = hw/sunAmoeba/LibraryTargetName(sun) MFBBareLibs $(OTHEREXTS) -ServerTarget(XsunMono,$(SUNMDIRS),$(SUNMOBJS),$(SUNMLIBS),$(FONTLIBS) $(SYSLIBS)) +ServerTarget(XsunMono,$(SUNMDIRS),$(SUNMOBJS), \ + $(SUNMLIBS),$(FONTLIBS) $(SYSLIBS)) #ifndef ServerToInstall #define ServerToInstall XsunMono #endif @@ -465,7 +484,8 @@ SUNDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(DDXDIR1) $(DEPDIRS) SUNOBJS = hw/sunLynx/sunLyInit.o SUNLIBS = hw/sunLynx/libsun.a CFB8Libs -ServerTarget(Xsun,$(SUNDIRS),$(SUNOBJS),$(SUNLIBS),$(FONTLIBS) $(SYSLIBS)) +ServerTarget(Xsun,$(SUNDIRS),$(SUNOBJS), \ + $(SUNLIBS),$(FONTLIBS) $(SYSLIBS)) #ifndef ServerToInstall #define ServerToInstall Xsun #endif @@ -481,35 +501,14 @@ SUNMDIRS = $(STDDIRS) $(MFBDIR) $(DDXDIR1) $(DEPDIRS) SUNMOBJS = hw/sunLynx/sunInitMono.o hw/sunLynx/sunInExMono.o SUNMLIBS = hw/sunLynx/libsun.a MFBBareLibs $(OTHEREXTS) -ServerTarget(XsunMono,$(SUNMDIRS),$(SUNMOBJS),$(SUNMLIBS),$(FONTLIBS) $(SYSLIBS)) +ServerTarget(XsunMono,$(SUNMDIRS),$(SUNMOBJS), \ + $(SUNMLIBS),$(FONTLIBS) $(SYSLIBS)) #ifndef ServerToInstall #define ServerToInstall XsunMono #endif #endif /* XsunLynxMonoServer */ -#if XibmServer -XCOMM -XCOMM IBM server -XCOMM -#if SpecialMalloc -IBMALLOCLIB = hw/ibm/common/LibraryTargetName(ibmalloc) -#else -IBMALLOCLIB = -#endif -MFBDIR = mfb -CFB8DIR = cfb -DDXDIR1 = hw/ibm -IBMDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(DDXDIR1) $(DEPDIRS) -IBMOBJS = hw/ibm/common/ibmcomm.o hw/ibm/common/ibmDate.o -IBMLIBS = hw/ibm/AIX/hft.o hw/ibm/LibraryTargetName(ibm) $(IBMALLOCLIB) CFB8Libs -ServerTarget(Xibm,$(IBMDIRS),$(IBMOBJS),$(IBMLIBS),$(FONTLIBS) $(SYSLIBS)) -#ifndef ServerToInstall -#define ServerToInstall Xibm -#endif -#endif /* XibmServer */ - - #if XhpServer XCOMM XCOMM Hewlett Packard CFB Server @@ -527,7 +526,8 @@ HPLIBS = CFB32Libs #endif HPSYSLIBS = $(FONTLIBS) $(CBRT) $(SYSLIBS) -ServerTarget(Xhp,$(HPSUBDIRS),$(HPOBJS),$(HPLIBS),$(HPSYSLIBS)) +ServerTarget(Xhp,$(HPSUBDIRS),$(HPOBJS), \ + $(HPLIBS),$(HPSYSLIBS)) #ifndef ServerToInstall #define ServerToInstall Xhp #endif @@ -575,7 +575,9 @@ AFBDIR = afb #endif DDXDIR1 = hw/xfree86 -XF86SERVERSUBDIRS = $(STDDIRS) $(MFBDIR) $(FBDIR) $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) $(AFBDIR) $(SHADOWDIR) $(DDXDIR1) $(DEPDIRS) +XF86SERVERSUBDIRS = $(STDDIRS) $(MFBDIR) $(FBDIR) $(AFBDIR) \ + $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) \ + $(SHADOWDIR) $(DDXDIR1) $(DEPDIRS) XF86INIT = $(XF86COMSRC)/xf86Init.o $(XF86COMSRC)/xf86IniExt.o XF86COMLIB = $(XF86COMSRC)/LibraryTargetName(xf86) XF86PARSLIB= $(XF86PARSERSRC)/LibraryTargetName(xf86config) @@ -635,6 +637,9 @@ #else XF86INT10LIB = $(XF86SRC)/int10/LibraryTargetName(int10) #endif +#if UseMemLeak +MEMDEBUGLIB = $(TOP)/util/memleak/LibraryTargetName(memleak) +#endif XF86IDRIVERLIB = $(XF86SRC)/input/LibraryTargetName(idriver) #if !DoLoadableServer XF86DRVOBJS = $(XF86SRC)/drivers/drvConf.o @@ -646,14 +651,16 @@ XF86IDRVOBJS = $(XF86SRC)/input/drvConf.o XF86IDRVLIBS = $(XF86IDRIVERLIB) XF86SCANLIB = $(XF86SRC)/scanpci/LibraryTargetName(scanpci) -XF86LIBS = $(XF86INIT) $(XF86COMLIB) $(XF86RACLIB) $(XF86PARSLIB) \ - $(XF86OSLIB) $(XF86INT10LIB) +XF86LIBS = $(MEMDEBUGLIB) $(XF86INIT) $(XF86COMLIB) $(XF86RACLIB) \ + $(XF86PARSLIB) $(XF86OSLIB) $(XF86INT10LIB) #else -XF86LIBS = $(XF86INIT) $(XF86COMLIB) $(XF86PARSLIB) $(XF86OSLIB) +XF86LIBS = $(MEMDEBUGLIB) $(XF86INIT) $(XF86COMLIB) \ + $(XF86PARSLIB) $(XF86OSLIB) #endif #if DoLoadableServer XF86LOADERLIB = $(XF86SRC)/loader/LibraryTargetName(loader) -XF86MAINLIBS = MiExtLibs PreFbLibsNoFont $(FONTBASE) $(OTHEREXTS) $(XF86COMLIB) \ +XF86MAINLIBS = MiExtLibs PreFbLibsNoFont \ + $(FONTBASE) $(OTHEREXTS) $(XF86COMLIB) \ NoMfbPostFbLibs XF86SERVERSYSLIBS = $(SYSLIBS) $(LIBDL) $(LIBREGEX) #else @@ -662,7 +669,8 @@ #endif XF86SERVEROBJS = $(XF86DRVOBJS) $(XF86IDRVOBJS) XF86SERVERLIBS = $(XF86DRVLIBS) $(XF86IDRVLIBS) $(XF86LIBS) $(XF86LOADERLIB) \ - $(XF86COMLIB) $(XF86MAINLIBS) $(XF86SCANLIB) $(XF86OSLIB) + $(XF86COMLIB) $(XF86MAINLIBS) $(XF86SCANLIB) $(XF86OSLIB) \ + $(XF86DDCLIB) #if HasParallelMake MakeMutex($(XF86SERVERSUBDIRS) $(XF86SERVERLIBS) $(XF86SERVERSYSLIBS)) #endif @@ -670,7 +678,8 @@ $(XF86SERVERLIBS) $(XF86SERVERSYSLIBS):: $(XF86SERVERSUBDIRS) @if [ -f $@ ]; then touch $@; fi #endif -SetUIDServerTarget(XFree86,$(XF86SERVERSUBDIRS),$(XF86SERVEROBJS),$(XF86SERVERLIBS),$(XF86SERVERSYSLIBS)) +SetUIDServerTarget(XFree86,$(XF86SERVERSUBDIRS),$(XF86SERVEROBJS), \ + $(XF86SERVERLIBS),$(XF86SERVERSYSLIBS)) #if DoLoadableServer ServerDriverSDKTarget(XFree86) #endif @@ -732,8 +741,9 @@ $(FBDEVOBJS) $(XFBDEV) $(FBDEVLIBS) $(FBDEVSYSLIBS):: $(FBDEVDIRS) @if [ -f $@ ]; then touch $@; fi #endif -ServerTarget(Xfbdev,$(FBDEVDIRS),$(FBDEVOBJS),$(FBDEVLIBS),$(FBDEVSYSLIBS)) -#endif /* XFBDEVServer */ +ServerTarget(Xfbdev,$(FBDEVDIRS),$(FBDEVOBJS), \ + $(FBDEVLIBS),$(FBDEVSYSLIBS)) +#endif /* XfbdevServer */ #if XSavageServer XCOMM @@ -757,8 +767,9 @@ $(SAVAGEOBJS) $(XSAVAGE) $(SAVAGELIBS) $(SAVAGESYSLIBS):: $(SAVAGEDIRS) @if [ -f $@ ]; then touch $@; fi #endif -ServerTarget(Xsavage,$(SAVAGEDIRS),$(SAVAGEOBJS),$(SAVAGELIBS),$(SAVAGESYSLIBS)) -#endif /* XSAVAGEServer */ +ServerTarget(Xsavage,$(SAVAGEDIRS),$(SAVAGEOBJS), \ + $(SAVAGELIBS),$(SAVAGESYSLIBS)) +#endif /* XSavageServer */ #if XIgsServer XCOMM @@ -782,8 +793,9 @@ $(IGSOBJS) $(XIGS) $(IGSLIBS) $(IGSSYSLIBS):: $(IGSDIRS) @if [ -f $@ ]; then touch $@; fi #endif -ServerTarget(Xigs,$(IGSDIRS),$(IGSOBJS),$(IGSLIBS),$(IGSSYSLIBS)) -#endif /* XIGSServer */ +ServerTarget(Xigs,$(IGSDIRS),$(IGSOBJS), \ + $(IGSLIBS),$(IGSSYSLIBS)) +#endif /* XIgsServer */ #if XTridentServer XCOMM @@ -800,7 +812,8 @@ KDDIRS = StdKdDirs - TRIDENTDIRS = $(STDDIRS) $(KDDIRS) $(FBDEVDIR) $(VESADIR) $(SHADOWDIR) $(TRIDENTDIR) + TRIDENTDIRS = $(STDDIRS) $(KDDIRS) \ + $(FBDEVDIR) $(VESADIR) $(SHADOWDIR) $(TRIDENTDIR) TRIDENTLIBS = PreFbLibs $(TRIDENT) $(FBDEV) $(VESA) KdLibs FbPostFbLibs TRIDENTSYSLIBS = StdKdSysLibs @@ -811,9 +824,42 @@ #if ForceServerRemake $(TRIDENTOBJS) $(TRIDENTLIBS) $(TRIDENTSYSLIBS):: $(TRIDENTDIRS) @if [ -f $@ ]; then touch $@; fi +#endif +ServerTarget(Xtrident,$(TRIDENTDIRS),$(TRIDENTOBJS), \ + $(TRIDENTLIBS),$(TRIDENTSYSLIBS)) +#endif /* XTridentServer */ + +#if Xi810Server +XCOMM +XCOMM server with Intel i810 driver +XCOMM + + FBDEVDIR = $(KDRIVE)/fbdev + FBDEV = $(FBDEVDIR)/LibraryTargetName(fbdev) + VESADIR = $(KDRIVE)/vesa + VESA = $(VESADIR)/LibraryTargetName(vesa) + SHADOWDIR = miext/shadow + I810DIR = $(KDRIVE)/i810 + I810 = $(I810DIR)/LibraryTargetName(i810) + + KDDIRS = StdKdDirs + + I810DIRS = $(STDDIRS) $(KDDIRS) $(SHADOWDIR) $(I810DIR) + + I810LIBS = PreFbLibs $(I810) KdLibs FbPostFbLibs + I810SYSLIBS = StdKdSysLibs + +#if HasParallelMake +MakeMutex($(I810DIRS) $(I810LIBS) $(I810SYSLIBS)) +#endif +#if ForceServerRemake +$(I810OBJS) $(I810LIBS) $(I810SYSLIBS):: $(I810DIRS) + @if [ -f $@ ]; then touch $@; fi #endif -ServerTarget(Xtrident,$(TRIDENTDIRS),$(TRIDENTOBJS),$(TRIDENTLIBS),$(TRIDENTSYSLIBS)) -#endif /* XTRIDENTServer */ +ServerTarget(Xi810,$(I810DIRS),$(I810OBJS), \ + $(I810LIBS),$(I810SYSLIBS)) +#endif /* Xi810Server */ + #if XSis530Server XCOMM @@ -837,8 +883,9 @@ $(SIS530OBJS) $(SIS530LIBS) $(SIS530SYSLIBS):: $(SIS530DIRS) @if [ -f $@ ]; then touch $@; fi #endif -ServerTarget(Xsis530,$(SIS530DIRS),$(SIS530OBJS),$(SIS530LIBS),$(SIS530SYSLIBS)) -#endif /* XSIS530Server */ +ServerTarget(Xsis530,$(SIS530DIRS),$(SIS530OBJS), \ + $(SIS530LIBS),$(SIS530SYSLIBS)) +#endif /* XSis530Server */ #if XTrioServer XCOMM @@ -862,8 +909,9 @@ $(TRIOOBJS) $(TRIOLIBS) $(TRIOSYSLIBS):: $(TRIODIRS) @if [ -f $@ ]; then touch $@; fi #endif -ServerTarget(Xtrio,$(TRIODIRS),$(TRIOOBJS),$(TRIOLIBS),$(TRIOSYSLIBS)) -#endif /* XTRIOServer */ +ServerTarget(Xtrio,$(TRIODIRS),$(TRIOOBJS), \ + $(TRIOLIBS),$(TRIOSYSLIBS)) +#endif /* XTrioServer */ #if XTS300Server XCOMM @@ -893,7 +941,8 @@ $(TS300OBJS) $(TS300LIBS) $(TS300SYSLIBS):: $(TS300DIRS) @if [ -f $@ ]; then touch $@; fi #endif -ServerTarget(Xts300,$(TS300DIRS),$(TS300OBJS),$(TS300LIBS),$(TS300SYSLIBS)) +ServerTarget(Xts300,$(TS300DIRS),$(TS300OBJS), \ + $(TS300LIBS),$(TS300SYSLIBS)) #endif /* XTS300Server */ #if XItsyServer @@ -917,7 +966,8 @@ $(ITSYOBJS) $(ITSYLIBS) $(ITSYSYSLIBS):: $(ITSYDIRS) @if [ -f $@ ]; then touch $@; fi #endif -ServerTarget(Xitsy,$(ITSYDIRS),$(ITSYOBJS),$(ITSYLIBS),$(ITSYSYSLIBS)) +ServerTarget(Xitsy,$(ITSYDIRS),$(ITSYOBJS), \ + $(ITSYLIBS),$(ITSYSYSLIBS)) #endif /* XItsyServer */ #if XvesaServer @@ -944,11 +994,12 @@ $(VESAOBJS) $(XVESA) $(VESALIBS) $(VESASYSLIBS):: $(VESADIRS) @if [ -f $@ ]; then touch $@; fi #endif -ServerTarget(Xvesa,$(VESADIRS),$(VESAOBJS),$(VESALIBS),$(VESASYSLIBS)) +ServerTarget(Xvesa,$(VESADIRS),$(VESAOBJS), \ + $(VESALIBS),$(VESASYSLIBS)) #endif /* XvesaServer */ -KDRIVEDIRS=$(KDDIRS) $(FBDEVDIR) $(SAVAGEDIR) $(TRIDENTDIR) $(SIS530DIR) \ - $(TRIODIR) $(TS300DIR) $(ITSYDIR) $(IGSDIR) $(VESADIR) +KDRIVEDIRS=$(KDDIRS) $(FBDEVDIR) $(SAVAGEDIR) $(TRIDENTDIR) $(I810DIR) \ + $(SIS530DIR) $(TRIODIR) $(TS300DIR) $(ITSYDIR) $(IGSDIR) $(VESADIR) #endif /* KDriveXServer */ #if XprtServer @@ -969,7 +1020,8 @@ XPOBJS = Xprint/ddxInit.o XPLIBS = PreFbLibs PostFbLibs #endif -#if (defined(SunArchitecture) || defined(SparcArchitecture)) && defined(SVR4Architecture) +#if (defined(SunArchitecture) || defined(SparcArchitecture)) && \ + defined(SVR4Architecture) XPSYSLIBS = $(FONTLIBS) $(CBRT) $(SYSLIBS) -lw #else XPSYSLIBS = $(FONTLIBS) $(CBRT) $(SYSLIBS) @@ -981,7 +1033,8 @@ $(XPOBJS) $(XPLIBS) $(XPSYSLIBS):: $(XPSUBDIRS) @if [ -f $@ ]; then touch $@; fi #endif -ServerTarget(Xprt,$(XPSUBDIRS),$(XPOBJS),$(XPLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER),$(XPSYSLIBS)) +ServerTarget(Xprt,$(XPSUBDIRS),$(XPOBJS), \ + $(XPLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER),$(XPSYSLIBS)) #endif /* XprtServer */ #if XnestServer @@ -994,17 +1047,15 @@ XNESTDDXDIR = hw #endif XNESTDIRS = $(STDDIRS) $(XNESTDDXDIR) $(DEPDIRS) -#if !defined(LynxOSArchitecture) && !defined(Win32Architecture) && !defined(QNX4Architecture) +#if !defined(LynxOSArchitecture) && \ + !defined(Win32Architecture) && \ + !defined(QNX4Architecture) XNESTOBJS = hw/xnest/miinitext.o #else XNESTOBJS = hw/xnest/miinitext.o dix/main.o #endif XNEST = hw/xnest/LibraryTargetName(xnest) -#if DoLoadableServer XNESTLIBS = PreFbLibs $(XNEST) NoMfbPostFbLibs $(XNEST) -#else -XNESTLIBS = PreFbLibs $(XNEST) NoMfbPostFbLibs $(XF86OSLIB) $(XNEST) -#endif XNESTSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XLIB) $(SYSLIBS) #if HasParallelMake MakeMutex($(XNESTDIRS) $(XNESTOBJS) $(XNESTLIBS) $(XNESTSYSLIBS)) @@ -1037,7 +1088,7 @@ XCOMM XCOMM server with Virtual (malloced) framebuffer XCOMM -MFBDIR = mfb +MFBDIR = mfb FBDIR = fb #if defined(Win32Architecture) XVFBDDXDIR = hw @@ -1054,11 +1105,7 @@ XVFBOBJS = dix/main.o hw/vfb/stubs.o hw/vfb/miinitext.o #endif XVFB = $(XVFBDDXDIR)/LibraryTargetName(vfb) -#if DoLoadableServer XVFBLIBS = PreFbLibs $(XVFB) $(FB) PostFbLibs $(MI) -#else -XVFBLIBS = PreFbLibs $(XVFB) $(FB) PostFbLibs $(XF86OSLIB) $(MI) -#endif XVFBSYSLIBS = $(FONTLIBS) $(SYSLIBS) #if HasParallelMake MakeMutex($(XVFBDIRS) $(XVFBOBJS) $(XVFB) $(XVFBLIBS) $(XVFBSYSLIBS)) @@ -1074,57 +1121,101 @@ #if XWinServer XCOMM -XCOMM server with DirectX framebuffer for Windows +XCOMM X Server for MS Windows XCOMM -MFBDIR = mfb -CFB8DIR = cfb -CFB16DIR = cfb16 -CFB24DIR = cfb24 -CFB32DIR = cfb32 -XWINDDXDIR = hw/xwin -DDXDIR2 = $(XWINDDXDIR) -XWINDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) $(XWINDDXDIR) $(DEPDIRS) +FBDIR = fb +SHADOWDIR = miext/shadow +XWINDIR = hw/xwin +XWIN = $(XWINDIR)/LibraryTargetName(Xwin) +XWINGDI32 = -lgdi32 +XWINDDRAW = -lddraw +DDXDIR1 = $(XWINDIR) +XWINDIRS = $(STDDIRS) $(FBDIR) $(SHADOWDIR) $(XWINDIR) $(DEPDIRS) + +XWINOBJSA = $(XWINDIR)/stubs.o + #if BuildDPMS -XWINOBJS = hw/xwin/InitInput.o hw/xwin/InitOutput.o hw/xwin/stubs.o hw/xwin/directx.o hw/xwin/dpmsstubs.o dix/main.o -#else -XWINOBJS = hw/xwin/InitInput.o hw/xwin/InitOutput.o hw/xwin/stubs.o hw/xwin/directx.o dix/main.o +XWINOBJSB = $(XWINDIR)/dpmsstubs.o #endif -XWIN = hw/xwin/LibraryTargetName(XWin) -XWINLIBS = PreFbLibs $(XWIN) $(CFB) PostFbLibs $(MI) $(SURFLIB) -XWINSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XLIB) $(SYSLIBS) + +XWINOBJS = $(XWINOBJSA) $(XWINOBJSB) + +XWINLIBS = PreFbLibs $(XWIN) FbPostFbLibs $(SHADOW) + +XWINSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XLIB) $(SYSLIBS) \ + $(XWINGDI32) $(XWINDDRAW) + #if HasParallelMake MakeMutex($(XWINDIRS) $(XWINOBJS) $(XWIN) $(XWINLIBS) $(XWINSYSLIBS)) #endif + #if ForceServerRemake $(XWINOBJS) $(XWIN) $(XWINLIBS) $(XWINSYSLIBS):: $(XWINDIRS) @if [ -f $@ ]; then touch $@; fi #endif + ServerTarget(XWin,$(XWINDIRS),$(XWINOBJS), \ - $(XWINLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER),$(XWINSYSLIBS)) + $(XWINLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER),$(XWINSYSLIBS)) #ifndef ServerToInstall #define ServerToInstall XWin #endif + #endif /* XWinServer */ + -#if XDarwinServer +#if XDarwinServer XCOMM XCOMM X Darwin server for Mac OS X / Darwin XCOMM -MFBDIR = mfb /* mfb is needed for font stuff, even though we don't support a 1bpp screen */ -CFB8DIR = cfb -CFB16DIR = cfb16 -CFB32DIR = cfb32 -DDXDIR1 = hw/darwin -DARWINDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB16DIR) $(CFB32DIR) $(DDXDIR1) $(DEPDIRS) -DARWINOBJS = -DARWINLIBS = PreFbLibs hw/darwin/libdarwin.a $(CFB16) $(CFB32) $(CFB8) PostFbLibs ../../lib/font/libXfont.a ../../lib/font/stubs/libfntstubs.a - -XCOMM we need extra link flags for IOKit stuff -EXTRA_LOAD_FLAGS = -framework IOKit -SetUIDServerTarget(Xdarwin,$(DARWINDIRS),$(DARWINOBJS),$(DARWINLIBS),$(SYSLIBS)) +FBDIR = fb +DDXDIR1 = hw/darwin +DDXDIR2 = hw/darwin/bundle +DARWINDIRS = $(STDDIRS) $(FBDIR) $(DDXDIR1) $(DEPDIRS) +DARWINOBJS = $(DDXDIR1)/xfIOKitStartup.o +DARWINLIBS = PreFbLibs $(DDXDIR1)/LibraryTargetName(darwin) FbPostFbLibs +DARWINSYSLIBS = $(FONTLIBS) $(SYSLIBS) -framework IOKit + +/* + * IOKit X server + */ +SetUIDServerTarget(XDarwin,$(DARWINDIRS),$(DARWINOBJS), \ + $(DARWINLIBS),$(DARWINSYSLIBS)) + +#if DarwinQuartzSupport + +/* + * We need the IOKit framework. For Quartz support, we also need + * CoreGraphics in ApplicationServices, HIToolbox in Carbon, CoreAudio + * and Cocoa. + */ +QUARTZSYSLIBS = -framework ApplicationServices -framework Cocoa \ + -framework CoreAudio -framework Carbon -ObjC +QUARTZOBJS = $(DDXDIR2)/quartzStartup.o +#if NothingOutsideProjectRoot +XDARWINAPPDIR = $(BINDIR)/XDarwin.app/Contents/MacOS +#else +XDARWINAPPDIR = /Applications/XDarwin.app/Contents/MacOS +#endif + +/* + * Quartz X server (installed in its application bundle) + */ +SetUIDServerTarget(XDarwinApp,$(DARWINDIRS),$(QUARTZOBJS), \ + $(DARWINLIBS) $(DDXDIR2)/LibraryTargetName(XQuartz), \ + $(DARWINSYSLIBS) $(QUARTZSYSLIBS)) + +install:: + mkdir -p $(DESTDIR)$(XDARWINAPPDIR) + mv $(DESTDIR)$(BINDIR)/XDarwinApp $(DESTDIR)$(XDARWINAPPDIR)/XDarwin + -(cd $(DESTDIR)$(BINDIR); $(RM) XDarwinQuartz; \ + $(LN) $(XDARWINAPPDIR)/XDarwin XDarwinQuartz) + +#else /* !DarwinQuartzSupport */ + +#define ServerToInstall XDarwin -#define ServerToInstall Xdarwin +#endif /* DarwinQuartzSupport */ #endif /* XDarwinServer */ @@ -1136,7 +1227,9 @@ SUBDIRS = $(STDDIRS) $(MFBDIR) $(CFBDIRS) $(IPLANDIRS) $(ILBMDIR) $(AFBDIR) \ $(LMFCFBDIR) $(DDXDIRS) $(FBDIR) $(KDRIVEDIRS) $(MIEXTDIRS) -#if defined(ServerToInstall) && !defined(OS2Architecture) && !defined(QNX4Architecture) +#if defined(ServerToInstall) && \ + !defined(OS2Architecture) && \ + !defined(QNX4Architecture) install:: -(cd $(DESTDIR)$(BINDIR); $(RM) X; $(LN) ServerToInstall X) #endif @@ -1149,5 +1242,4 @@ ForceSubdirs($(DEPDIRS) $(SUBDIRS)) -CppManTarget(Xserver,) InstallManPage(Xserver,$(MANDIR)) Index: xc/programs/Xserver/Xserver.cpp diff -u xc/programs/Xserver/Xserver.cpp:1.1 xc/programs/Xserver/Xserver.cpp:removed --- xc/programs/Xserver/Xserver.cpp:1.1 Mon Dec 11 15:29:32 2000 +++ xc/programs/Xserver/Xserver.cpp Mon Jun 4 12:39:32 2001 @@ -1,698 +0,0 @@ -.\" $TOG: Xserver.man /main/68 1998/02/09 14:12:35 kaleb $ -.\" Copyright 1984 - 1991, 1993, 1994, 1998 The Open Group -.\" -.\" All Rights Reserved. -.\" -.\" The above copyright notice and this permission notice shall be included -.\" in all copies or substantial portions of the Software. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -.\" OTHER DEALINGS IN THE SOFTWARE. -.\" -.\" Except as contained in this notice, the name of The Open Group shall -.\" not be used in advertising or otherwise to promote the sale, use or -.\" other dealings in this Software without prior written authorization -.\" from The Open Group. -.\" $XFree86: xc/programs/Xserver/Xserver.cpp,v 1.1 2000/12/11 20:29:32 dawes Exp $ -.TH XSERVER 1 "Release 6.4" "X Version 11" -.SH NAME -Xserver \- X Window System display server -.SH SYNOPSIS -.B X -[option ...] -.SH DESCRIPTION -.I X -is the generic name for the X Window System display server. It is -frequently a link or a copy of the appropriate server binary for -driving the most frequently used server on a given machine. -.SH "STARTING THE SERVER" -The X server is usually started from the X Display Manager program \fIxdm(1)\fP. -This utility is run from the system boot files and takes care of keeping -the server running, prompting for usernames and passwords, and starting up -the user sessions. -.PP -Installations that run more than one window system may need to use the -\fIxinit(1)\fP utility instead of \fIxdm\fP. However, \fIxinit\fP is -to be considered a tool for building startup scripts and is not -intended for use by end users. Site administrators are \fBstrongly\fP -urged to use \fIxdm\fP, or build other interfaces for novice users. -.PP -The X server may also be started directly by the user, though this -method is usually reserved for testing and is not recommended for -normal operation. On some platforms, the user must have special -permission to start the X server, often because access to certain -devices (e.g. /dev/mouse) is restricted. -.PP -When the X server starts up, it typically takes over the display. If -you are running on a workstation whose console is the display, you may -not be able to log into the console while the server is running. -.SH OPTIONS -All of the X servers accept the following command line options: -.TP 8 -.B :\fIdisplaynumber\fP -the X server runs as the given \fIdisplaynumber\fP, which by default is 0. -If multiple X servers are to run simultaneously on a host, each must have -a unique display number. See the DISPLAY -NAMES section of the \fIX(1)\fP manual page to learn how to specify -which display number clients should try to use. -.TP 8 -.B \-a \fInumber\fP -sets pointer acceleration (i.e. the ratio of how much is reported to how much -the user actually moved the pointer). -.TP 8 -.B \-ac -disables host-based access control mechanisms. Enables access by any host, -and permits any host to modify the access control list. -Use with extreme caution. -This option exists primarily for running test suites remotely. -.TP 8 -.B \-audit \fIlevel\fP -Sets the audit trail level. The default level is 1, meaning only connection -rejections are reported. Level 2 additionally reports all successful -connections and disconnects. Level 4 enables messages from the -SECURITY extension, if present, including generation and revocation of -authorizations and violations of the security policy. -Level 0 turns off the audit trail. -Audit lines are sent as standard error output. -.TP 8 -.B \-auth \fIauthorization-file\fP -Specifies a file which contains a collection of authorization records used -to authenticate access. See also the \fIxdm\fP and \fIXsecurity\fP manual -pages. -.TP 8 -.B bc -disables certain kinds of error checking, for bug compatibility with -previous releases (e.g., to work around bugs in R2 and R3 xterms and toolkits). -Deprecated. -.TP 8 -.B \-bs -disables backing store support on all screens. -.TP 8 -.B \-c -turns off key-click. -.TP 8 -.B c \fIvolume\fP -sets key-click volume (allowable range: 0-100). -.TP 8 -.B \-cc \fIclass\fP -sets the visual class for the root window of color screens. -The class numbers are as specified in the X protocol. -Not obeyed by all servers. -.TP 8 -.B \-co \fIfilename\fP -sets name of RGB color database. The default is /lib/X11/rgb, -where refers to the root of the X11 install tree. -.ig -.TP 8 -.B \-config \fIfilename\fP -reads more options from the given file. Options in the file may be separated -by newlines if desired. If a '#' character appears on a line, all characters -between it and the next newline are ignored, providing a simple commenting -facility. The \fB\-config\fP option itself may appear in the file. -.BR NOTE : -This option is disabled when the Xserver is run with an effective uid -different from the user's real uid. -.. -.TP 8 -.B \-core -causes the server to generate a core dump on fatal errors. -.TP 8 -.B \-dpi \fIresolution\fP -sets the resolution of the screen, in dots per inch. -To be used when the server cannot determine the screen size from the hardware. -.TP 8 -.B \-deferglyphs \fIwhichfonts\fP -specifies the types of fonts for which the server should attempt to use -deferred glyph loading. \fIwhichfonts\fP can be all (all fonts), -none (no fonts), or 16 (16 bit fonts only). -.TP 8 -.B \-f \fIvolume\fP -sets feep (bell) volume (allowable range: 0-100). -.TP 8 -.B \-fc \fIcursorFont\fP -sets default cursor font. -.TP 8 -.B \-fn \fIfont\fP -sets the default font. -.TP 8 -.B \-fp \fIfontPath\fP -sets the search path for fonts. This path is a comma separated list -of directories which the X server searches for font databases. -.TP 8 -.B \-help -prints a usage message. -.TP 8 -.B \-I -causes all remaining command line arguments to be ignored. -.TP 8 -.B \-kb -disables the XKEYBOARD extension if present. -.TP 8 -.B \-nolisten \fItrans-type\fP -Disable a transport type. For example, TCP/IP connections can be disabled -with -.B \-nolisten tcp -.TP 8 -.B \-noreset -prevents a server reset when the last client connection is closed. This -overrides a previous -.B \-terminate -command line option. -.TP 8 -.B \-p \fIminutes\fP -sets screen-saver pattern cycle time in minutes. -.TP 8 -.B \-pn -permits the server to continue running if it fails to establish all of -its well-known sockets (connection points for clients), but -establishes at least one. -.TP 8 -.B \-r -turns off auto-repeat. -.TP 8 -.B r -turns on auto-repeat. -.TP 8 -.B \-s \fIminutes\fP -sets screen-saver timeout time in minutes. -.TP 8 -.B \-su -disables save under support on all screens. -.TP 8 -.B \-t \fInumber\fP -sets pointer acceleration threshold in pixels (i.e. after how many pixels -pointer acceleration should take effect). -.TP 8 -.B \-terminate -causes the server to terminate at server reset, instead of continuing to run. -This overrides a previous -.B \-noreset -command line option. -.TP 8 -.B \-to \fIseconds\fP -sets default connection timeout in seconds. -.TP 8 -.B \-tst -disables all testing extensions (e.g., XTEST, XTrap, XTestExtension1, RECORD). -.TP 8 -.B tty\fIxx\fP -ignored, for servers started the ancient way (from init). -.TP 8 -.B v -sets video-off screen-saver preference. -.TP 8 -.B \-v -sets video-on screen-saver preference. -.TP 8 -.B \-wm -forces the default backing-store of all windows to be WhenMapped. This -is a backdoor way of getting backing-store to apply to all windows. -Although all mapped windows will have backing store, the backing store -attribute value reported by the server for a window will be the last -value established by a client. If it has never been set by a client, -the server will report the default value, NotUseful. This behavior is -required by the X protocol, which allows the server to exceed the -client's backing store expectations but does not provide a way to tell -the client that it is doing so. -.TP 8 -.B \-x \fIextension\fP -loads the specified extension at init. -This is a no-op for most implementations. -.TP 8 -.B [+-]xinerama -enable(+) or disable(-) XINERAMA extension. Default is disabled. -.SH SERVER DEPENDENT OPTIONS -Some X servers accept the following options: -.TP 8 -.B \-ld \fIkilobytes\fP -sets the data space limit of the server to the specified number of kilobytes. -A value of zero makes the data size as large as possible. The default value -of \-1 leaves the data space limit unchanged. -.TP 8 -.B \-lf \fIfiles\fP -sets the number-of-open-files limit of the server to the specified number. -A value of zero makes the limit as large as possible. The default value -of \-1 leaves the limit unchanged. -.TP 8 -.B \-ls \fIkilobytes\fP -sets the stack space limit of the server to the specified number of kilobytes. -A value of zero makes the stack size as large as possible. The default value -of \-1 leaves the stack space limit unchanged. -.TP 8 -.B \-logo -turns on the X Window System logo display in the screen-saver. -There is currently no way to change this from a client. -.TP 8 -.B nologo -turns off the X Window System logo display in the screen-saver. -There is currently no way to change this from a client. -.SH XDMCP OPTIONS -X servers that support XDMCP have the following options. -See the \fIX Display Manager Control Protocol\fP specification for more -information. -.TP 8 -.B \-query \fIhost-name\fP -Enable XDMCP and send Query packets to the specified host. -.TP 8 -.B \-broadcast -Enable XDMCP and broadcast BroadcastQuery packets to the network. The -first responding display manager will be chosen for the session. -.TP 8 -.B \-indirect \fIhost-name\fP -Enable XDMCP and send IndirectQuery packets to the specified host. -.TP 8 -.B \-port \fIport-num\fP -Use an alternate port number for XDMCP packets. Must be specified before -any \-query, \-broadcast or \-indirect options. -.TP 8 -.B \-once -Causes the server to terminate (rather than reset) when the XDMCP session ends. -.TP 8 -.B \-class \fIdisplay-class\fP -XDMCP has an additional display qualifier used in resource lookup for -display-specific options. This option sets that value, by default it -is "MIT-Unspecified" (not a very useful value). -.TP 8 -.B \-cookie \fIxdm-auth-bits\fP -When testing XDM-AUTHENTICATION-1, a private key is shared between the -server and the manager. This option sets the value of that private -data (not that it is very private, being on the command line!). -.TP 8 -.B \-displayID \fIdisplay-id\fP -Yet another XDMCP specific value, this one allows the display manager to -identify each display so that it can locate the shared key. -.SH XKEYBOARD OPTIONS -X servers that support the XKEYBOARD extension accept the following options: -.TP 8 -.B \-xkbdir \fIdirectory\fP -base directory for keyboard layout files -.TP 8 -.B \-xkbmap \fIfilename\fP -keyboard description to load on startup -.TP 8 -.B [+-]accessx -enable(+) or disable(-) AccessX key sequences -.TP 8 -.B \-ar1 \fImilliseconds\fP -sets the length of time in milliseconds that a key must be depressed before -autorepeat starts -.TP 8 -.B \-ar2 \fImilliseconds\fP -sets the length of time in milliseconds that should elapse between -autorepeat-generated keystrokes -.PP -Many servers also have device-specific command line options. See the -manual pages for the individual servers for more details. -.SH SECURITY EXTENSION OPTIONS -X servers that support the SECURITY extension accept the following option: -.TP 8 -.B \-sp \fIfilename\fP -causes -the server to attempt to read and interpret filename as a security policy -file with the format described below. The file is read at -server startup and reread at each server reset. -.PP -The syntax of the security policy file is as follows. -Notation: "*" means zero or more occurrences of the preceding element, -and "+" means one or more occurrences. To interpret , ignore -the text after the /; it is used to distinguish between instances of - in the next section. -.PP -.nf - ::= * - - ::= '\en' - - ::= | | | - - ::= # * '\en' - - ::= '\en' - - ::= sitepolicy '\en' - - ::= property '\en' - - ::= - - ::= any | root | - - ::= | - - ::= = - - ::= [ | | ]* - - ::= r | w | d - - ::= a | i | e - - ::= | | - - ::= " * " - - ::= ' * ' - - ::= + - - ::= [ ' ' | '\et' ]* - -Character sets: - - ::= any character except '\en' - ::= any character except " - ::= any character except ' - ::= any character except those in -.fi -.PP -The semantics associated with the above syntax are as follows. -.PP -, the first line in the file, specifies the file format -version. If the server does not recognize the version , it -ignores the rest of the file. The version string for the file format -described here is "version-1" . -.PP -Once past the , lines that do not match the above syntax -are ignored. -.PP - lines are ignored. -.PP - lines are currently ignored. They are intended to -specify the site policies used by the XC-QUERY-SECURITY-1 -authorization method. -.PP - lines specify how the server should react to untrusted -client requests that affect the X Window property named . -The rest of this section describes the interpretation of an -. -.PP -For an to apply to a given instance of , - must be on a window that is in the set of windows -specified by . If is any, the rule applies to - on any window. If is root, the rule applies to - only on root windows. -.PP -If is , the following apply. If is a , the rule applies when the window also -has that , regardless of its value. If is a , must also have -the value specified by . In this case, the property must -have type STRING and format 8, and should contain one or more -null-terminated strings. If any of the strings match , the -rule applies. -.PP -The definition of string matching is simple case-sensitive string -comparison with one elaboration: the occurence of the character '*' in - is a wildcard meaning "any string." A can -contain multiple wildcards anywhere in the string. For example, "x*" -matches strings that begin with x, "*x" matches strings that end with -x, "*x*" matches strings containing x, and "x*y*" matches strings that -start with x and subsequently contain y. -.PP -There may be multiple lines for a given . -The rules are tested in the order that they appear in the file. The -first rule that applies is used. -.PP - specify operations that untrusted clients may attempt, and -the actions that the server should take in response to those operations. -.PP - can be r (read), w (write), or d (delete). The following -table shows how X Protocol property requests map to these operations -in The Open Group server implementation. -.PP -.nf -GetProperty r, or r and d if delete = True -ChangeProperty w -RotateProperties r and w -DeleteProperty d -ListProperties none, untrusted clients can always list all properties -.fi -.PP - can be a (allow), i (ignore), or e (error). Allow means -execute the request as if it had been issued by a trusted client. -Ignore means treat the request as a no-op. In the case of -GetProperty, ignore means return an empty property value if the -property exists, regardless of its actual value. Error means do not -execute the request and return a BadAtom error with the atom set to -the property name. Error is the default action for all properties, -including those not listed in the security policy file. -.PP -An applies to all s that follow it, until the next - is encountered. Thus, irwad means ignore read and write, -allow delete. -.PP -GetProperty and RotateProperties may do multiple operations (r and d, -or r and w). If different actions apply to the operations, the most -severe action is applied to the whole request; there is no partial -request execution. The severity ordering is: allow < ignore < error. -Thus, if the for a property are ired (ignore read, error -delete), and an untrusted client attempts GetProperty on that property -with delete = True, an error is returned, but the property value is -not. Similarly, if any of the properties in a RotateProperties do not -allow both read and write, an error is returned without changing any -property values. -.PP -Here is an example security policy file. -.PP -.ta 3i 4i -.nf -version-1 - -# Allow reading of application resources, but not writing. -property RESOURCE_MANAGER root ar iw -property SCREEN_RESOURCES root ar iw - -# Ignore attempts to use cut buffers. Giving errors causes apps to crash, -# and allowing access may give away too much information. -property CUT_BUFFER0 root irw -property CUT_BUFFER1 root irw -property CUT_BUFFER2 root irw -property CUT_BUFFER3 root irw -property CUT_BUFFER4 root irw -property CUT_BUFFER5 root irw -property CUT_BUFFER6 root irw -property CUT_BUFFER7 root irw - -# If you are using Motif, you probably want these. -property _MOTIF_DEFAULT_BINDINGS root ar iw -property _MOTIF_DRAG_WINDOW root ar iw -property _MOTIF_DRAG_TARGETS any ar iw -property _MOTIF_DRAG_ATOMS any ar iw -property _MOTIF_DRAG_ATOM_PAIRS any ar iw - -# The next two rules let xwininfo -tree work when untrusted. -property WM_NAME any ar - -# Allow read of WM_CLASS, but only for windows with WM_NAME. -# This might be more restrictive than necessary, but demonstrates -# the facility, and is also an attempt to -# say "top level windows only." -property WM_CLASS WM_NAME ar - -# These next three let xlsclients work untrusted. Think carefully -# before including these; giving away the client machine name and command -# may be exposing too much. -property WM_STATE WM_NAME ar -property WM_CLIENT_MACHINE WM_NAME ar -property WM_COMMAND WM_NAME ar - -# To let untrusted clients use the standard colormaps created by -# xstdcmap, include these lines. -property RGB_DEFAULT_MAP root ar -property RGB_BEST_MAP root ar -property RGB_RED_MAP root ar -property RGB_GREEN_MAP root ar -property RGB_BLUE_MAP root ar -property RGB_GRAY_MAP root ar - -# To let untrusted clients use the color management database created -# by xcmsdb, include these lines. -property XDCCC_LINEAR_RGB_CORRECTION root ar -property XDCCC_LINEAR_RGB_MATRICES root ar -property XDCCC_GRAY_SCREENWHITEPOINT root ar -property XDCCC_GRAY_CORRECTION root ar - -# To let untrusted clients use the overlay visuals that many vendors -# support, include this line. -property SERVER_OVERLAY_VISUALS root ar - -# Dumb examples to show other capabilities. - -# oddball property names and explicit specification of error conditions -property "property with spaces" 'property with "' aw er ed - -# Allow deletion of Woo-Hoo if window also has property OhBoy with value -# ending in "son". Reads and writes will cause an error. -property Woo-Hoo OhBoy = "*son" ad - -.fi -.SH "NETWORK CONNECTIONS" -The X server supports client connections via a platform-dependent subset of -the following transport types: TCP\/IP, Unix Domain sockets, DECnet, -and several varieties of SVR4 local connections. See the DISPLAY -NAMES section of the \fIX(__miscmansuffix__)\fP manual page to learn how to specify -which transport type clients should try to use. -.SH GRANTING ACCESS -The X server implements a platform-dependent subset of the following -authorization protocols: MIT-MAGIC-COOKIE-1, XDM-AUTHORIZATION-1, -SUN-DES-1, and MIT-KERBEROS-5. See the \fIXsecurity(1)\fP manual page -for information on the operation of these protocols. -.PP -Authorization data required by the above protocols is passed to the -server in a private file named with the \fB\-auth\fP command line -option. Each time the server is about to accept the first connection -after a reset (or when the server is starting), it reads this file. -If this file contains any authorization records, the local host is not -automatically allowed access to the server, and only clients which -send one of the authorization records contained in the file in the -connection setup information will be allowed access. See the -\fIXau\fP manual page for a description of the binary format of this -file. See \fIxauth(1)\fP for maintenance of this file, and distribution -of its contents to remote hosts. -.PP -The X server also uses a host-based access control list for deciding -whether or not to accept connections from clients on a particular machine. -If no other authorization mechanism is being used, -this list initially consists of the host on which the server is running as -well as any machines listed in the file \fI/etc/X\fBn\fI.hosts\fR, where -\fBn\fP is the display number of the server. Each line of the file should -contain either an Internet hostname (e.g. expo.lcs.mit.edu) or a DECnet -hostname in double colon format (e.g. hydra::). There should be no leading -or trailing spaces on any lines. For example: -.sp -.in +8 -.nf -joesworkstation -corporate.company.com -star:: -bigcpu:: -.fi -.in -8 -.PP -Users can add or remove hosts from this list and enable or disable access -control using the \fIxhost\fP command from the same machine as the server. -.PP -If the X FireWall Proxy (\fIxfwp\fP) is being used without a sitepolicy, -host-based authorization must be turned on for clients to be able to -connect to the X server via the \fIxfwp\fP. If \fIxfwp\fP is run without -a configuration file and thus no sitepolicy is defined, if \fIxfwp\fP -is using an X server where xhost + has been run to turn off host-based -authorization checks, when a client tries to connect to this X server -via \fIxfwp\fP, the X server will deny the connection. See \fIxfwp(1)\fP -for more information about this proxy. -.PP -The X protocol intrinsically does not have any notion of window operation -permissions or place any restrictions on what a client can do; if a program can -connect to a display, it has full run of the screen. -X servers that support the SECURITY extension fare better because clients -can be designated untrusted via the authorization they use to connect; see -the \fIxauth(1)\fP manual page for details. Restrictions are imposed -on untrusted clients that curtail the mischief they can do. See the SECURITY -extension specification for a complete list of these restrictions. -.PP -Sites that have better -authentication and authorization systems might wish to make -use of the hooks in the libraries and the server to provide additional -security models. -.SH SIGNALS -The X server attaches special meaning to the following signals: -.TP 8 -.I SIGHUP -This signal causes the server to close all existing connections, free all -resources, and restore all defaults. It is sent by the display manager -whenever the main user's main application (usually an \fIxterm\fP or window -manager) exits to force the server to clean up and prepare for the next -user. -.TP 8 -.I SIGTERM -This signal causes the server to exit cleanly. -.TP 8 -.I SIGUSR1 -This signal is used quite differently from either of the above. When the -server starts, it checks to see if it has inherited SIGUSR1 as SIG_IGN -instead of the usual SIG_DFL. In this case, the server sends a SIGUSR1 to -its parent process after it has set up the various connection schemes. -\fIXdm\fP uses this feature to recognize when connecting to the server -is possible. -.SH FONTS -The X server -can obtain fonts from directories and/or from font servers. -The list of directories and font servers -the X server uses when trying to open a font is controlled -by the \fIfont path\fP. -.LP -The default font path is -"/lib/X11/fonts/misc/, -/lib/X11/fonts/Speedo/, -/lib/X11/fonts/Type1/, -/lib/X11/fonts/75dpi/, -/lib/X11/fonts/100dpi/" . -where refers to the root of the X11 install tree. -.LP -The font path can be set with the \fB\-fp\fP option or by \fIxset(1)\fP -after the server has started. -.SH FILES -.TP 30 -/etc/X\fBn\fP.hosts -Initial access control list for display number \fBn\fP -.TP 30 -/lib/X11/fonts/misc, /lib/X11/fonts/75dpi, /lib/X11/fonts/100dpi -Bitmap font directories -.TP 30 -/lib/X11/fonts/Speedo, /lib/X11/fonts/Type1 -Outline font directories -.TP 30 -/lib/X11/fonts/PEX -PEX font directories -.TP 30 -/lib/X11/rgb.txt -Color database -.TP 30 -/tmp/.X11-unix/X\fBn\fP -Unix domain socket for display number \fBn\fP -.TP 30 -/tmp/rcX\fBn\fP -Kerberos 5 replay cache for display number \fBn\fP -.TP 30 -/usr/adm/X\fBn\fPmsgs -Error log file for display number \fBn\fP if run from \fIinit(8)\fP -.TP 30 -/lib/X11/xdm/xdm-errors -Default error log file if the server is run from \fIxdm(1)\fP -.LP -Note: refers to the root of the X11 install tree. -.SH "SEE ALSO" -General information: X(__miscmansuffix__) -.PP -Protocols: -.I "X Window System Protocol," -.I "The X Font Service Protocol," -.I "X Display Manager Control Protocol" -.PP -Fonts: bdftopcf(1), mkfontdir(1), xfs(1), xlsfonts(1), xfontsel(1), xfd(1), -.I "X Logical Font Description Conventions" -.PP -Security: Xsecurity(__miscmansuffix__), xauth(1), Xau(1), xdm(1), xhost(1), xfwp(1) -.I "Security Extension Specification" -.PP -Starting the server: xdm(1), xinit(1) -.PP -Controlling the server once started: xset(1), xsetroot(1), xhost(1) -.PP -Server-specific man pages: -Xdec(1), XmacII(1), Xsun(1), Xnest(1), Xvfb(1), -XFree86(1), Xdarwin(1). -.PP -Server internal documentation: -.I "Definition of the Porting Layer for the X v11 Sample Server" -.SH AUTHORS -The sample server was originally written by Susan Angebranndt, Raymond -Drewry, Philip Karlton, and Todd Newman, from Digital Equipment -Corporation, with support from a large cast. It has since been -extensively rewritten by Keith Packard and Bob Scheifler, from MIT. -Dave Wiggins took over post-R5 and made substantial improvements. Index: xc/programs/Xserver/Xserver.man diff -u /dev/null xc/programs/Xserver/Xserver.man:3.16 --- /dev/null Mon Jun 4 12:39:32 2001 +++ xc/programs/Xserver/Xserver.man Wed Mar 28 09:35:14 2001 @@ -0,0 +1,698 @@ +.\" $Xorg: Xserver.man,v 1.3 2000/08/17 19:47:01 cpqbld Exp $ +.\" Copyright 1984 - 1991, 1993, 1994, 1998 The Open Group +.\" +.\" All Rights Reserved. +.\" +.\" The above copyright notice and this permission notice shall be included +.\" in all copies or substantial portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +.\" OTHER DEALINGS IN THE SOFTWARE. +.\" +.\" Except as contained in this notice, the name of The Open Group shall +.\" not be used in advertising or otherwise to promote the sale, use or +.\" other dealings in this Software without prior written authorization +.\" from The Open Group. +.\" $XFree86: xc/programs/Xserver/Xserver.man,v 3.16 2001/03/28 14:35:14 dawes Exp $ +.TH XSERVER 1 __xorgversion__ +.SH NAME +Xserver \- X Window System display server +.SH SYNOPSIS +.B X +[option ...] +.SH DESCRIPTION +.I X +is the generic name for the X Window System display server. It is +frequently a link or a copy of the appropriate server binary for +driving the most frequently used server on a given machine. +.SH "STARTING THE SERVER" +The X server is usually started from the X Display Manager program \fIxdm(1)\fP. +This utility is run from the system boot files and takes care of keeping +the server running, prompting for usernames and passwords, and starting up +the user sessions. +.PP +Installations that run more than one window system may need to use the +\fIxinit(1)\fP utility instead of \fIxdm\fP. However, \fIxinit\fP is +to be considered a tool for building startup scripts and is not +intended for use by end users. Site administrators are \fBstrongly\fP +urged to use \fIxdm\fP, or build other interfaces for novice users. +.PP +The X server may also be started directly by the user, though this +method is usually reserved for testing and is not recommended for +normal operation. On some platforms, the user must have special +permission to start the X server, often because access to certain +devices (e.g. /dev/mouse) is restricted. +.PP +When the X server starts up, it typically takes over the display. If +you are running on a workstation whose console is the display, you may +not be able to log into the console while the server is running. +.SH OPTIONS +All of the X servers accept the following command line options: +.TP 8 +.B :\fIdisplaynumber\fP +the X server runs as the given \fIdisplaynumber\fP, which by default is 0. +If multiple X servers are to run simultaneously on a host, each must have +a unique display number. See the DISPLAY +NAMES section of the \fIX(__miscmansuffix__)\fP manual page to learn how to specify +which display number clients should try to use. +.TP 8 +.B \-a \fInumber\fP +sets pointer acceleration (i.e. the ratio of how much is reported to how much +the user actually moved the pointer). +.TP 8 +.B \-ac +disables host-based access control mechanisms. Enables access by any host, +and permits any host to modify the access control list. +Use with extreme caution. +This option exists primarily for running test suites remotely. +.TP 8 +.B \-audit \fIlevel\fP +Sets the audit trail level. The default level is 1, meaning only connection +rejections are reported. Level 2 additionally reports all successful +connections and disconnects. Level 4 enables messages from the +SECURITY extension, if present, including generation and revocation of +authorizations and violations of the security policy. +Level 0 turns off the audit trail. +Audit lines are sent as standard error output. +.TP 8 +.B \-auth \fIauthorization-file\fP +Specifies a file which contains a collection of authorization records used +to authenticate access. See also the \fIxdm\fP and \fIXsecurity\fP manual +pages. +.TP 8 +.B bc +disables certain kinds of error checking, for bug compatibility with +previous releases (e.g., to work around bugs in R2 and R3 xterms and toolkits). +Deprecated. +.TP 8 +.B \-bs +disables backing store support on all screens. +.TP 8 +.B \-c +turns off key-click. +.TP 8 +.B c \fIvolume\fP +sets key-click volume (allowable range: 0-100). +.TP 8 +.B \-cc \fIclass\fP +sets the visual class for the root window of color screens. +The class numbers are as specified in the X protocol. +Not obeyed by all servers. +.TP 8 +.B \-co \fIfilename\fP +sets name of RGB color database. The default is /lib/X11/rgb, +where refers to the root of the X11 install tree. +.ig +.TP 8 +.B \-config \fIfilename\fP +reads more options from the given file. Options in the file may be separated +by newlines if desired. If a '#' character appears on a line, all characters +between it and the next newline are ignored, providing a simple commenting +facility. The \fB\-config\fP option itself may appear in the file. +.BR NOTE : +This option is disabled when the Xserver is run with an effective uid +different from the user's real uid. +.. +.TP 8 +.B \-core +causes the server to generate a core dump on fatal errors. +.TP 8 +.B \-dpi \fIresolution\fP +sets the resolution of the screen, in dots per inch. +To be used when the server cannot determine the screen size from the hardware. +.TP 8 +.B \-deferglyphs \fIwhichfonts\fP +specifies the types of fonts for which the server should attempt to use +deferred glyph loading. \fIwhichfonts\fP can be all (all fonts), +none (no fonts), or 16 (16 bit fonts only). +.TP 8 +.B \-f \fIvolume\fP +sets feep (bell) volume (allowable range: 0-100). +.TP 8 +.B \-fc \fIcursorFont\fP +sets default cursor font. +.TP 8 +.B \-fn \fIfont\fP +sets the default font. +.TP 8 +.B \-fp \fIfontPath\fP +sets the search path for fonts. This path is a comma separated list +of directories which the X server searches for font databases. +.TP 8 +.B \-help +prints a usage message. +.TP 8 +.B \-I +causes all remaining command line arguments to be ignored. +.TP 8 +.B \-kb +disables the XKEYBOARD extension if present. +.TP 8 +.B \-nolisten \fItrans-type\fP +Disable a transport type. For example, TCP/IP connections can be disabled +with +.B \-nolisten tcp +.TP 8 +.B \-noreset +prevents a server reset when the last client connection is closed. This +overrides a previous +.B \-terminate +command line option. +.TP 8 +.B \-p \fIminutes\fP +sets screen-saver pattern cycle time in minutes. +.TP 8 +.B \-pn +permits the server to continue running if it fails to establish all of +its well-known sockets (connection points for clients), but +establishes at least one. +.TP 8 +.B \-r +turns off auto-repeat. +.TP 8 +.B r +turns on auto-repeat. +.TP 8 +.B \-s \fIminutes\fP +sets screen-saver timeout time in minutes. +.TP 8 +.B \-su +disables save under support on all screens. +.TP 8 +.B \-t \fInumber\fP +sets pointer acceleration threshold in pixels (i.e. after how many pixels +pointer acceleration should take effect). +.TP 8 +.B \-terminate +causes the server to terminate at server reset, instead of continuing to run. +This overrides a previous +.B \-noreset +command line option. +.TP 8 +.B \-to \fIseconds\fP +sets default connection timeout in seconds. +.TP 8 +.B \-tst +disables all testing extensions (e.g., XTEST, XTrap, XTestExtension1, RECORD). +.TP 8 +.B tty\fIxx\fP +ignored, for servers started the ancient way (from init). +.TP 8 +.B v +sets video-off screen-saver preference. +.TP 8 +.B \-v +sets video-on screen-saver preference. +.TP 8 +.B \-wm +forces the default backing-store of all windows to be WhenMapped. This +is a backdoor way of getting backing-store to apply to all windows. +Although all mapped windows will have backing store, the backing store +attribute value reported by the server for a window will be the last +value established by a client. If it has never been set by a client, +the server will report the default value, NotUseful. This behavior is +required by the X protocol, which allows the server to exceed the +client's backing store expectations but does not provide a way to tell +the client that it is doing so. +.TP 8 +.B \-x \fIextension\fP +loads the specified extension at init. +This is a no-op for most implementations. +.TP 8 +.B [+-]xinerama +enable(+) or disable(-) XINERAMA extension. Default is disabled. +.SH SERVER DEPENDENT OPTIONS +Some X servers accept the following options: +.TP 8 +.B \-ld \fIkilobytes\fP +sets the data space limit of the server to the specified number of kilobytes. +A value of zero makes the data size as large as possible. The default value +of \-1 leaves the data space limit unchanged. +.TP 8 +.B \-lf \fIfiles\fP +sets the number-of-open-files limit of the server to the specified number. +A value of zero makes the limit as large as possible. The default value +of \-1 leaves the limit unchanged. +.TP 8 +.B \-ls \fIkilobytes\fP +sets the stack space limit of the server to the specified number of kilobytes. +A value of zero makes the stack size as large as possible. The default value +of \-1 leaves the stack space limit unchanged. +.TP 8 +.B \-logo +turns on the X Window System logo display in the screen-saver. +There is currently no way to change this from a client. +.TP 8 +.B nologo +turns off the X Window System logo display in the screen-saver. +There is currently no way to change this from a client. +.SH XDMCP OPTIONS +X servers that support XDMCP have the following options. +See the \fIX Display Manager Control Protocol\fP specification for more +information. +.TP 8 +.B \-query \fIhost-name\fP +Enable XDMCP and send Query packets to the specified host. +.TP 8 +.B \-broadcast +Enable XDMCP and broadcast BroadcastQuery packets to the network. The +first responding display manager will be chosen for the session. +.TP 8 +.B \-indirect \fIhost-name\fP +Enable XDMCP and send IndirectQuery packets to the specified host. +.TP 8 +.B \-port \fIport-num\fP +Use an alternate port number for XDMCP packets. Must be specified before +any \-query, \-broadcast or \-indirect options. +.TP 8 +.B \-once +Causes the server to terminate (rather than reset) when the XDMCP session ends. +.TP 8 +.B \-class \fIdisplay-class\fP +XDMCP has an additional display qualifier used in resource lookup for +display-specific options. This option sets that value, by default it +is "MIT-Unspecified" (not a very useful value). +.TP 8 +.B \-cookie \fIxdm-auth-bits\fP +When testing XDM-AUTHENTICATION-1, a private key is shared between the +server and the manager. This option sets the value of that private +data (not that it is very private, being on the command line!). +.TP 8 +.B \-displayID \fIdisplay-id\fP +Yet another XDMCP specific value, this one allows the display manager to +identify each display so that it can locate the shared key. +.SH XKEYBOARD OPTIONS +X servers that support the XKEYBOARD extension accept the following options: +.TP 8 +.B \-xkbdir \fIdirectory\fP +base directory for keyboard layout files +.TP 8 +.B \-xkbmap \fIfilename\fP +keyboard description to load on startup +.TP 8 +.B [+-]accessx +enable(+) or disable(-) AccessX key sequences +.TP 8 +.B \-ar1 \fImilliseconds\fP +sets the length of time in milliseconds that a key must be depressed before +autorepeat starts +.TP 8 +.B \-ar2 \fImilliseconds\fP +sets the length of time in milliseconds that should elapse between +autorepeat-generated keystrokes +.PP +Many servers also have device-specific command line options. See the +manual pages for the individual servers for more details. +.SH SECURITY EXTENSION OPTIONS +X servers that support the SECURITY extension accept the following option: +.TP 8 +.B \-sp \fIfilename\fP +causes +the server to attempt to read and interpret filename as a security policy +file with the format described below. The file is read at +server startup and reread at each server reset. +.PP +The syntax of the security policy file is as follows. +Notation: "*" means zero or more occurrences of the preceding element, +and "+" means one or more occurrences. To interpret , ignore +the text after the /; it is used to distinguish between instances of + in the next section. +.PP +.nf + ::= * + + ::= '\en' + + ::= | | | + + ::= # * '\en' + + ::= '\en' + + ::= sitepolicy '\en' + + ::= property '\en' + + ::= + + ::= any | root | + + ::= | + + ::= = + + ::= [ | | ]* + + ::= r | w | d + + ::= a | i | e + + ::= | | + + ::= " * " + + ::= ' * ' + + ::= + + + ::= [ ' ' | '\et' ]* + +Character sets: + + ::= any character except '\en' + ::= any character except " + ::= any character except ' + ::= any character except those in +.fi +.PP +The semantics associated with the above syntax are as follows. +.PP +, the first line in the file, specifies the file format +version. If the server does not recognize the version , it +ignores the rest of the file. The version string for the file format +described here is "version-1" . +.PP +Once past the , lines that do not match the above syntax +are ignored. +.PP + lines are ignored. +.PP + lines are currently ignored. They are intended to +specify the site policies used by the XC-QUERY-SECURITY-1 +authorization method. +.PP + lines specify how the server should react to untrusted +client requests that affect the X Window property named . +The rest of this section describes the interpretation of an +. +.PP +For an to apply to a given instance of , + must be on a window that is in the set of windows +specified by . If is any, the rule applies to + on any window. If is root, the rule applies to + only on root windows. +.PP +If is , the following apply. If is a , the rule applies when the window also +has that , regardless of its value. If is a , must also have +the value specified by . In this case, the property must +have type STRING and format 8, and should contain one or more +null-terminated strings. If any of the strings match , the +rule applies. +.PP +The definition of string matching is simple case-sensitive string +comparison with one elaboration: the occurence of the character '*' in + is a wildcard meaning "any string." A can +contain multiple wildcards anywhere in the string. For example, "x*" +matches strings that begin with x, "*x" matches strings that end with +x, "*x*" matches strings containing x, and "x*y*" matches strings that +start with x and subsequently contain y. +.PP +There may be multiple lines for a given . +The rules are tested in the order that they appear in the file. The +first rule that applies is used. +.PP + specify operations that untrusted clients may attempt, and +the actions that the server should take in response to those operations. +.PP + can be r (read), w (write), or d (delete). The following +table shows how X Protocol property requests map to these operations +in The Open Group server implementation. +.PP +.nf +GetProperty r, or r and d if delete = True +ChangeProperty w +RotateProperties r and w +DeleteProperty d +ListProperties none, untrusted clients can always list all properties +.fi +.PP + can be a (allow), i (ignore), or e (error). Allow means +execute the request as if it had been issued by a trusted client. +Ignore means treat the request as a no-op. In the case of +GetProperty, ignore means return an empty property value if the +property exists, regardless of its actual value. Error means do not +execute the request and return a BadAtom error with the atom set to +the property name. Error is the default action for all properties, +including those not listed in the security policy file. +.PP +An applies to all s that follow it, until the next + is encountered. Thus, irwad means ignore read and write, +allow delete. +.PP +GetProperty and RotateProperties may do multiple operations (r and d, +or r and w). If different actions apply to the operations, the most +severe action is applied to the whole request; there is no partial +request execution. The severity ordering is: allow < ignore < error. +Thus, if the for a property are ired (ignore read, error +delete), and an untrusted client attempts GetProperty on that property +with delete = True, an error is returned, but the property value is +not. Similarly, if any of the properties in a RotateProperties do not +allow both read and write, an error is returned without changing any +property values. +.PP +Here is an example security policy file. +.PP +.ta 3i 4i +.nf +version-1 + +XCOMM Allow reading of application resources, but not writing. +property RESOURCE_MANAGER root ar iw +property SCREEN_RESOURCES root ar iw + +XCOMM Ignore attempts to use cut buffers. Giving errors causes apps to crash, +XCOMM and allowing access may give away too much information. +property CUT_BUFFER0 root irw +property CUT_BUFFER1 root irw +property CUT_BUFFER2 root irw +property CUT_BUFFER3 root irw +property CUT_BUFFER4 root irw +property CUT_BUFFER5 root irw +property CUT_BUFFER6 root irw +property CUT_BUFFER7 root irw + +XCOMM If you are using Motif, you probably want these. +property _MOTIF_DEFAULT_BINDINGS root ar iw +property _MOTIF_DRAG_WINDOW root ar iw +property _MOTIF_DRAG_TARGETS any ar iw +property _MOTIF_DRAG_ATOMS any ar iw +property _MOTIF_DRAG_ATOM_PAIRS any ar iw + +XCOMM The next two rules let xwininfo -tree work when untrusted. +property WM_NAME any ar + +XCOMM Allow read of WM_CLASS, but only for windows with WM_NAME. +XCOMM This might be more restrictive than necessary, but demonstrates +XCOMM the facility, and is also an attempt to +XCOMM say "top level windows only." +property WM_CLASS WM_NAME ar + +XCOMM These next three let xlsclients work untrusted. Think carefully +XCOMM before including these; giving away the client machine name and command +XCOMM may be exposing too much. +property WM_STATE WM_NAME ar +property WM_CLIENT_MACHINE WM_NAME ar +property WM_COMMAND WM_NAME ar + +XCOMM To let untrusted clients use the standard colormaps created by +XCOMM xstdcmap, include these lines. +property RGB_DEFAULT_MAP root ar +property RGB_BEST_MAP root ar +property RGB_RED_MAP root ar +property RGB_GREEN_MAP root ar +property RGB_BLUE_MAP root ar +property RGB_GRAY_MAP root ar + +XCOMM To let untrusted clients use the color management database created +XCOMM by xcmsdb, include these lines. +property XDCCC_LINEAR_RGB_CORRECTION root ar +property XDCCC_LINEAR_RGB_MATRICES root ar +property XDCCC_GRAY_SCREENWHITEPOINT root ar +property XDCCC_GRAY_CORRECTION root ar + +XCOMM To let untrusted clients use the overlay visuals that many vendors +XCOMM support, include this line. +property SERVER_OVERLAY_VISUALS root ar + +XCOMM Dumb examples to show other capabilities. + +XCOMM oddball property names and explicit specification of error conditions +property "property with spaces" 'property with "' aw er ed + +XCOMM Allow deletion of Woo-Hoo if window also has property OhBoy with value +XCOMM ending in "son". Reads and writes will cause an error. +property Woo-Hoo OhBoy = "*son" ad + +.fi +.SH "NETWORK CONNECTIONS" +The X server supports client connections via a platform-dependent subset of +the following transport types: TCP\/IP, Unix Domain sockets, DECnet, +and several varieties of SVR4 local connections. See the DISPLAY +NAMES section of the \fIX(__miscmansuffix__)\fP manual page to learn how to specify +which transport type clients should try to use. +.SH GRANTING ACCESS +The X server implements a platform-dependent subset of the following +authorization protocols: MIT-MAGIC-COOKIE-1, XDM-AUTHORIZATION-1, +SUN-DES-1, and MIT-KERBEROS-5. See the \fIXsecurity(1)\fP manual page +for information on the operation of these protocols. +.PP +Authorization data required by the above protocols is passed to the +server in a private file named with the \fB\-auth\fP command line +option. Each time the server is about to accept the first connection +after a reset (or when the server is starting), it reads this file. +If this file contains any authorization records, the local host is not +automatically allowed access to the server, and only clients which +send one of the authorization records contained in the file in the +connection setup information will be allowed access. See the +\fIXau\fP manual page for a description of the binary format of this +file. See \fIxauth(1)\fP for maintenance of this file, and distribution +of its contents to remote hosts. +.PP +The X server also uses a host-based access control list for deciding +whether or not to accept connections from clients on a particular machine. +If no other authorization mechanism is being used, +this list initially consists of the host on which the server is running as +well as any machines listed in the file \fI/etc/X\fBn\fI.hosts\fR, where +\fBn\fP is the display number of the server. Each line of the file should +contain either an Internet hostname (e.g. expo.lcs.mit.edu) or a DECnet +hostname in double colon format (e.g. hydra::). There should be no leading +or trailing spaces on any lines. For example: +.sp +.in +8 +.nf +joesworkstation +corporate.company.com +star:: +bigcpu:: +.fi +.in -8 +.PP +Users can add or remove hosts from this list and enable or disable access +control using the \fIxhost\fP command from the same machine as the server. +.PP +If the X FireWall Proxy (\fIxfwp\fP) is being used without a sitepolicy, +host-based authorization must be turned on for clients to be able to +connect to the X server via the \fIxfwp\fP. If \fIxfwp\fP is run without +a configuration file and thus no sitepolicy is defined, if \fIxfwp\fP +is using an X server where xhost + has been run to turn off host-based +authorization checks, when a client tries to connect to this X server +via \fIxfwp\fP, the X server will deny the connection. See \fIxfwp(1)\fP +for more information about this proxy. +.PP +The X protocol intrinsically does not have any notion of window operation +permissions or place any restrictions on what a client can do; if a program can +connect to a display, it has full run of the screen. +X servers that support the SECURITY extension fare better because clients +can be designated untrusted via the authorization they use to connect; see +the \fIxauth(1)\fP manual page for details. Restrictions are imposed +on untrusted clients that curtail the mischief they can do. See the SECURITY +extension specification for a complete list of these restrictions. +.PP +Sites that have better +authentication and authorization systems might wish to make +use of the hooks in the libraries and the server to provide additional +security models. +.SH SIGNALS +The X server attaches special meaning to the following signals: +.TP 8 +.I SIGHUP +This signal causes the server to close all existing connections, free all +resources, and restore all defaults. It is sent by the display manager +whenever the main user's main application (usually an \fIxterm\fP or window +manager) exits to force the server to clean up and prepare for the next +user. +.TP 8 +.I SIGTERM +This signal causes the server to exit cleanly. +.TP 8 +.I SIGUSR1 +This signal is used quite differently from either of the above. When the +server starts, it checks to see if it has inherited SIGUSR1 as SIG_IGN +instead of the usual SIG_DFL. In this case, the server sends a SIGUSR1 to +its parent process after it has set up the various connection schemes. +\fIXdm\fP uses this feature to recognize when connecting to the server +is possible. +.SH FONTS +The X server +can obtain fonts from directories and/or from font servers. +The list of directories and font servers +the X server uses when trying to open a font is controlled +by the \fIfont path\fP. +.LP +The default font path is +"/lib/X11/fonts/misc/, +/lib/X11/fonts/Speedo/, +/lib/X11/fonts/Type1/, +/lib/X11/fonts/75dpi/, +/lib/X11/fonts/100dpi/" . +where refers to the root of the X11 install tree. +.LP +The font path can be set with the \fB\-fp\fP option or by \fIxset(1)\fP +after the server has started. +.SH FILES +.TP 30 +/etc/X\fBn\fP.hosts +Initial access control list for display number \fBn\fP +.TP 30 +/lib/X11/fonts/misc, /lib/X11/fonts/75dpi, /lib/X11/fonts/100dpi +Bitmap font directories +.TP 30 +/lib/X11/fonts/Speedo, /lib/X11/fonts/Type1 +Outline font directories +.TP 30 +/lib/X11/fonts/PEX +PEX font directories +.TP 30 +/lib/X11/rgb.txt +Color database +.TP 30 +/tmp/.X11-unix/X\fBn\fP +Unix domain socket for display number \fBn\fP +.TP 30 +/tmp/rcX\fBn\fP +Kerberos 5 replay cache for display number \fBn\fP +.TP 30 +/usr/adm/X\fBn\fPmsgs +Error log file for display number \fBn\fP if run from \fIinit(8)\fP +.TP 30 +/lib/X11/xdm/xdm-errors +Default error log file if the server is run from \fIxdm(1)\fP +.LP +Note: refers to the root of the X11 install tree. +.SH "SEE ALSO" +General information: X(__miscmansuffix__) +.PP +Protocols: +.I "X Window System Protocol," +.I "The X Font Service Protocol," +.I "X Display Manager Control Protocol" +.PP +Fonts: bdftopcf(1), mkfontdir(1), xfs(1), xlsfonts(1), xfontsel(1), xfd(1), +.I "X Logical Font Description Conventions" +.PP +Security: Xsecurity(__miscmansuffix__), xauth(1), Xau(1), xdm(1), xhost(1), xfwp(1) +.I "Security Extension Specification" +.PP +Starting the server: xdm(1), xinit(1) +.PP +Controlling the server once started: xset(1), xsetroot(1), xhost(1) +.PP +Server-specific man pages: +Xdec(1), XmacII(1), Xsun(1), Xnest(1), Xvfb(1), +XFree86(1), XDarwin(1). +.PP +Server internal documentation: +.I "Definition of the Porting Layer for the X v11 Sample Server" +.SH AUTHORS +The sample server was originally written by Susan Angebranndt, Raymond +Drewry, Philip Karlton, and Todd Newman, from Digital Equipment +Corporation, with support from a large cast. It has since been +extensively rewritten by Keith Packard and Bob Scheifler, from MIT. +Dave Wiggins took over post-R5 and made substantial improvements. Index: xc/programs/Xserver/GL/Imakefile diff -u xc/programs/Xserver/GL/Imakefile:1.7 xc/programs/Xserver/GL/Imakefile:1.8 --- xc/programs/Xserver/GL/Imakefile:1.7 Thu Aug 24 18:20:08 2000 +++ xc/programs/Xserver/GL/Imakefile Mon Apr 23 12:17:07 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/GL/Imakefile,v 1.7 2000/08/24 22:20:08 tsi Exp $ +XCOMM $XFree86: xc/programs/Xserver/GL/Imakefile,v 1.8 2001/04/23 16:17:07 tsi Exp $ #define IHaveModules #include @@ -29,7 +29,7 @@ INCLUDES = -Iinclude -Idri -I$(SERVERSRC)/include -I$(SERVERSRC)/mi \ -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(XF86OSSRC) -DEPEND_DEFINES = $(EXT_DEFINES) +DEPEND_DEFINES = $(EXT_DEFINES) DependDefines DEFINES = $(GLX_DEFINES) #if HasParallelMake Index: xc/programs/Xserver/GL/glxmodule.c diff -u xc/programs/Xserver/GL/glxmodule.c:1.9 xc/programs/Xserver/GL/glxmodule.c:1.10 --- xc/programs/Xserver/GL/glxmodule.c:1.9 Tue Feb 22 23:46:51 2000 +++ xc/programs/Xserver/GL/glxmodule.c Tue Apr 10 12:07:54 2001 @@ -25,7 +25,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/programs/Xserver/GL/glxmodule.c,v 1.9 2000/02/23 04:46:51 martin Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glxmodule.c,v 1.10 2001/04/10 16:07:54 dawes Exp $ */ /* * Authors: @@ -74,6 +74,7 @@ static pointer glxSetup(pointer module, pointer opts, int *errmaj, int *errmin) { + static Bool setupDone = FALSE; pointer GLcore = NULL; #ifdef GLX_USE_SGI_SI char GLcoreName[] = "GL"; @@ -81,18 +82,24 @@ char GLcoreName[] = "GLcore"; #endif - LoadExtension(&GLXExt, FALSE); + if (!setupDone) { + setupDone = TRUE; - /* Wrap the init visuals routine in micmap.c */ - GlxWrapInitVisuals(&miInitVisualsProc); - /* Make sure this gets wrapped each time InitVisualWrap is called. */ - miHookInitVisuals(NULL, GlxWrapInitVisuals); - - GLcore = LoadSubModule(module, GLcoreName, NULL, NULL, NULL, NULL, + GLcore = LoadSubModule(module, GLcoreName, NULL, NULL, NULL, NULL, errmaj, errmin); - if (!GLcore) - ErrorF("Cannot load the GL core library: %s\n", GLcoreName); + if (!GLcore) { + ErrorF("Cannot load the GL core library: %s\n", GLcoreName); + } else { + LoadExtension(&GLXExt, FALSE); + + /* Wrap the init visuals routine in micmap.c */ + GlxWrapInitVisuals(&miInitVisualsProc); + /* Make sure this gets wrapped each time InitVisualWrap is called */ + miHookInitVisuals(NULL, GlxWrapInitVisuals); + } + } + if (errmaj) *errmaj = LDR_ONCEONLY; /* Need a non-NULL return value to indicate success */ return GLcore; } Index: xc/programs/Xserver/GL/dri/Imakefile diff -u xc/programs/Xserver/GL/dri/Imakefile:1.5 xc/programs/Xserver/GL/dri/Imakefile:1.6 --- xc/programs/Xserver/GL/dri/Imakefile:1.5 Tue Feb 22 23:46:52 2000 +++ xc/programs/Xserver/GL/dri/Imakefile Sat Apr 28 09:55:36 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/GL/dri/Imakefile,v 1.5 2000/02/23 04:46:52 martin Exp $ +XCOMM $XFree86: xc/programs/Xserver/GL/dri/Imakefile,v 1.6 2001/04/28 13:55:36 dawes Exp $ #define IHaveModules #include @@ -11,7 +11,8 @@ SRCS = xf86dri.c dri.c $(MSRC) OBJS = xf86dri.o dri.o $(MOBJ) - INCLUDES = -I$(SERVERSRC)/include -I$(XTOP)/include -I$(EXTINCSRC) \ + INCLUDES = -I$(SERVERSRC)/include -I$(INCLUDESRC) -I $(XINCLUDESRC) \ + -I$(EXTINCSRC) \ -I$(XF86OSSRC) -I$(XF86COMSRC) \ -I../include -I../glx -I$(LIBSRC)/GL/include \ -I$(SERVERSRC)/mi -I$(FONTINCSRC) Index: xc/programs/Xserver/GL/dri/dri.c diff -u xc/programs/Xserver/GL/dri/dri.c:1.24 xc/programs/Xserver/GL/dri/dri.c:1.31 --- xc/programs/Xserver/GL/dri/dri.c:1.24 Thu Dec 7 15:26:13 2000 +++ xc/programs/Xserver/GL/dri/dri.c Tue Apr 10 12:07:54 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.24 2000/12/07 20:26:13 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.31 2001/04/10 16:07:54 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -65,8 +65,11 @@ #include "glxserver.h" #include "mi.h" #include "mipointer.h" -#include "xf86Priv.h" +#if defined(XFree86LOADER) || defined(PANORAMIX) +extern Bool noPanoramiXExtension; +#endif + static int DRIScreenPrivIndex = -1; static int DRIWindowPrivIndex = -1; static unsigned long DRIGeneration = 0; @@ -81,21 +84,27 @@ static RESTYPE DRIDrawablePrivResType; static RESTYPE DRIContextPrivResType; +static void DRIDestroyDummyContext(ScreenPtr pScreen, Bool hasCtxPriv); /* Wrapper just like xf86DrvMsg, but without the verbosity level checking. This will make it easy to turn off some messages later, based on verbosity level. */ +/* + * Since we're already referencing things from the XFree86 common layer in + * this file, we'd might as well just call xf86VDrvMsgVerb, and have + * consistent message formatting. The verbosity of these messages can be + * easily changed here. + */ +#define DRI_MSG_VERBOSITY 1 static void DRIDrvMsg(int scrnIndex, MessageType type, const char *format, ...) { va_list ap; - static char buffer[1024]; va_start(ap, format); - vsprintf(buffer, format, ap); - ErrorF("(%d): %s", scrnIndex, buffer); + xf86VDrvMsgVerb(scrnIndex, type, DRI_MSG_VERBOSITY, format, ap); va_end(ap); } @@ -106,6 +115,7 @@ drmContextPtr reserved; int reserved_count; int i, fd, drmWasAvailable; + Bool xineramaInCore = FALSE; if (DRIGeneration != serverGeneration) { if ((DRIScreenPrivIndex = AllocateScreenPrivateIndex()) < 0) @@ -113,10 +123,31 @@ DRIGeneration = serverGeneration; } + /* + * If Xinerama is on, don't allow DRI to initialise. It won't be usable + * anyway. + */ +#if defined(PANORAMIX) && !defined(XFree86LOADER) + xineramaInCore = TRUE; +#elif defined(XFree86LOADER) + if (xf86LoaderCheckSymbol("noPanoramiXExtension")) + xineramaInCore = TRUE; +#endif + +#if defined(PANORAMIX) || defined(XFree86LOADER) + if (xineramaInCore) { + if (!noPanoramiXExtension) { + DRIDrvMsg(pScreen->myNum, X_WARNING, + "Direct rendering is not supported when Xinerama is enabled\n"); + return FALSE; + } + } +#endif + drmWasAvailable = drmAvailable(); /* Note that drmOpen will try to load the kernel module, if needed. */ - fd = drmOpen(pDRIInfo->drmDriverName, NULL); + fd = drmOpen(pDRIInfo->drmDriverName, NULL /*pDRIInfo->busIdString*/); if (fd < 0) { /* failed to open DRM */ pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; @@ -145,6 +176,9 @@ pDRIPriv->nrWindows = 0; pDRIPriv->fullscreen = NULL; + pDRIPriv->createDummyCtx = pDRIInfo->createDummyCtx; + pDRIPriv->createDummyCtxPriv = pDRIInfo->createDummyCtxPriv; + if (drmSetBusid(pDRIPriv->drmFD, pDRIPriv->pDriverInfo->busIdString) < 0) { pDRIPriv->directRenderingSupport = FALSE; pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; @@ -165,7 +199,7 @@ 0, pDRIPriv->pDriverInfo->SAREASize, DRM_SHM, - DRM_CONTAINS_LOCK, + DRM_CONTAINS_LOCK, &pDRIPriv->hSAREA) < 0) { pDRIPriv->directRenderingSupport = FALSE; @@ -179,7 +213,7 @@ "[drm] added %d byte SAREA at 0x%08lx\n", pDRIPriv->pDriverInfo->SAREASize, pDRIPriv->hSAREA); - if (drmMap( pDRIPriv->drmFD, + if (drmMap( pDRIPriv->drmFD, pDRIPriv->hSAREA, pDRIPriv->pDriverInfo->SAREASize, (drmAddressPtr)(&pDRIPriv->pSAREA)) < 0) @@ -194,12 +228,12 @@ memset(pDRIPriv->pSAREA, 0, pDRIPriv->pDriverInfo->SAREASize); DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] mapped SAREA 0x%08lx to %p\n", pDRIPriv->hSAREA, pDRIPriv->pSAREA); - - if (drmAddMap( pDRIPriv->drmFD, + + if (drmAddMap( pDRIPriv->drmFD, (drmHandle)pDRIPriv->pDriverInfo->frameBufferPhysicalAddress, pDRIPriv->pDriverInfo->frameBufferSize, - DRM_FRAME_BUFFER, - 0, + DRM_FRAME_BUFFER, + 0, &pDRIPriv->hFrameBuffer) < 0) { pDRIPriv->directRenderingSupport = FALSE; @@ -234,7 +268,7 @@ /* validate max drawable table entry set by driver */ if ((pDRIPriv->pDriverInfo->maxDrawableTableEntry <= 0) || (pDRIPriv->pDriverInfo->maxDrawableTableEntry > SAREA_MAX_DRAWABLES)) { - DRIDrvMsg(pScreen->myNum, X_ERROR, + DRIDrvMsg(pScreen->myNum, X_ERROR, "Invalid max drawable table size set by driver: %d\n", pDRIPriv->pDriverInfo->maxDrawableTableEntry); } @@ -266,7 +300,7 @@ if (!(pDRIContextPriv = DRICreateContextPriv(pScreen, &pDRIPriv->myContext, flags))) { - DRIDrvMsg(pScreen->myNum, X_ERROR, + DRIDrvMsg(pScreen->myNum, X_ERROR, "failed to create server context\n"); return FALSE; } @@ -289,12 +323,12 @@ /* Server will handle 3D swaps, and hide 2D swaps from kernel. * Register server context as a preserved context. */ - + /* allocate memory for hidden context store */ pDRIPriv->hiddenContextStore = (void *)xcalloc(1, pDRIInfo->contextSize); if (!pDRIPriv->hiddenContextStore) { - DRIDrvMsg(pScreen->myNum, X_ERROR, + DRIDrvMsg(pScreen->myNum, X_ERROR, "failed to allocate hidden context\n"); DRIDestroyContextPriv(pDRIContextPriv); return FALSE; @@ -304,17 +338,17 @@ pDRIPriv->partial3DContextStore = (void *)xcalloc(1, pDRIInfo->contextSize); if (!pDRIPriv->partial3DContextStore) { - DRIDrvMsg(pScreen->myNum, X_ERROR, + DRIDrvMsg(pScreen->myNum, X_ERROR, "[DRI] failed to allocate partial 3D context\n"); xfree(pDRIPriv->hiddenContextStore); DRIDestroyContextPriv(pDRIContextPriv); return FALSE; } - + /* save initial context store */ if (pDRIInfo->SwapContext) { (*pDRIInfo->SwapContext)( - pScreen, + pScreen, DRI_NO_SYNC, DRI_2D_CONTEXT, pDRIPriv->hiddenContextStore, @@ -328,7 +362,7 @@ * setup signal handler for receiving swap requests from kernel */ if (!drmInstallSIGIOHandler(pDRIPriv->drmFD, DRISwapContext)) { - DRIDrvMsg(pScreen->myNum, X_ERROR, + DRIDrvMsg(pScreen->myNum, X_ERROR, "[drm] failed to setup DRM signal handler\n"); if (pDRIPriv->hiddenContextStore) xfree(pDRIPriv->hiddenContextStore); @@ -337,7 +371,7 @@ DRIDestroyContextPriv(pDRIContextPriv); return FALSE; } else { - DRIDrvMsg(pScreen->myNum, X_INFO, + DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] installed DRM signal handler\n"); } @@ -354,30 +388,24 @@ pDRIPriv->wrap.PostValidateTree = pScreen->PostValidateTree; pScreen->PostValidateTree = pDRIInfo->wrap.PostValidateTree; } - - /* Potentential optimization: don't wrap the following routines if - pDRIInfo->bufferRequests == DRI_NO_WINDOWS */ - if (pDRIInfo->wrap.PaintWindowBackground) { - pDRIPriv->wrap.PaintWindowBackground = pScreen->PaintWindowBackground; - pScreen->PaintWindowBackground = pDRIInfo->wrap.PaintWindowBackground; - } - if (pDRIInfo->wrap.PaintWindowBorder) { - pDRIPriv->wrap.PaintWindowBorder = pScreen->PaintWindowBorder; - pScreen->PaintWindowBorder = pDRIInfo->wrap.PaintWindowBorder; + if (pDRIInfo->wrap.WindowExposures) { + pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; + pScreen->WindowExposures = pDRIInfo->wrap.WindowExposures; } if (pDRIInfo->wrap.CopyWindow) { pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow; pScreen->CopyWindow = pDRIInfo->wrap.CopyWindow; } - if (pDRIInfo->wrap.ClipNotify) - miClipNotify(pDRIInfo->wrap.ClipNotify); - + if (pDRIInfo->wrap.ClipNotify) { + pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify; + pScreen->ClipNotify = pDRIInfo->wrap.ClipNotify; + } if (pDRIInfo->wrap.AdjustFrame) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; pDRIPriv->wrap.AdjustFrame = pScrn->AdjustFrame; pScrn->AdjustFrame = pDRIInfo->wrap.AdjustFrame; } - + DRIDrvMsg(pScreen->myNum, X_INFO, "[DRI] installation complete\n"); return TRUE; @@ -400,13 +428,17 @@ if (pDRIPriv->pDriverInfo->driverSwapMethod != DRI_KERNEL_SWAP) { if (!drmRemoveSIGIOHandler(pDRIPriv->drmFD)) { - DRIDrvMsg(pScreen->myNum, X_ERROR, + DRIDrvMsg(pScreen->myNum, X_ERROR, "[drm] failed to remove DRM signal handler\n"); } } + if (pDRIPriv->dummyCtxPriv && pDRIPriv->createDummyCtx) { + DRIDestroyDummyContext(pScreen, pDRIPriv->createDummyCtxPriv); + } + if (!DRIDestroyContextPriv(pDRIPriv->myContextPriv)) { - DRIDrvMsg(pScreen->myNum, X_ERROR, + DRIDrvMsg(pScreen->myNum, X_ERROR, "failed to destroy server context\n"); } @@ -440,7 +472,7 @@ pDRIPriv->hSAREA, pDRIPriv->pSAREA); } - + drmClose(pDRIPriv->drmFD); xfree(pDRIPriv); pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; @@ -457,7 +489,7 @@ return FALSE; } - /* Allocate a window private index with a zero sized private area for + /* Allocate a window private index with a zero sized private area for * each window, then should a window become a DRI window, we'll hang * a DRIWindowPrivateRec off of this private index. */ @@ -550,7 +582,7 @@ /* DRICreateContextPriv and DRICreateContextPrivFromHandle are helper functions that layer on drmCreateContext and drmAddContextTag. - + DRICreateContextPriv always creates a kernel drmContext and then calls DRICreateContextPrivFromHandle to create a DRIContextPriv structure for DRI tracking. For the SIGIO handler, the drmContext is associated with @@ -591,7 +623,7 @@ pDRIContextPriv->pContextStore = (void *)(pDRIContextPriv + 1); drmAddContextTag(pDRIPriv->drmFD, hHWContext, pDRIContextPriv); - + pDRIContextPriv->hwContext = hHWContext; pDRIContextPriv->pScreen = pScreen; pDRIContextPriv->flags = flags; @@ -601,7 +633,7 @@ if (drmSetContextFlags(pDRIPriv->drmFD, hHWContext, DRM_CONTEXT_2DONLY)) { - DRIDrvMsg(pScreen->myNum, X_ERROR, + DRIDrvMsg(pScreen->myNum, X_ERROR, "[drm] failed to set 2D context flag\n"); DRIDestroyContextPriv(pDRIContextPriv); return NULL; @@ -611,7 +643,7 @@ if (drmSetContextFlags(pDRIPriv->drmFD, hHWContext, DRM_CONTEXT_PRESERVED)) { - DRIDrvMsg(pScreen->myNum, X_ERROR, + DRIDrvMsg(pScreen->myNum, X_ERROR, "[drm] failed to set preserved flag\n"); DRIDestroyContextPriv(pDRIContextPriv); return NULL; @@ -626,7 +658,7 @@ DRIScreenPrivPtr pDRIPriv; if (!pDRIContextPriv) return TRUE; - + pDRIPriv = DRI_SCREEN_PRIV(pDRIContextPriv->pScreen); if (!(pDRIContextPriv->flags & DRI_CONTEXT_RESERVED)) { @@ -647,10 +679,72 @@ return TRUE; } +static Bool +DRICreateDummyContext(ScreenPtr pScreen, Bool needCtxPriv) +{ + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + __GLXscreenInfo *pGLXScreen = &__glXActiveScreens[pScreen->myNum]; + __GLXvisualConfig *pGLXVis = pGLXScreen->pGlxVisual; + void **pVisualConfigPriv = pGLXScreen->pVisualPriv; + DRIContextPrivPtr pDRIContextPriv; + void *contextStore; + VisualPtr visual; + int visNum; + + visual = pScreen->visuals; + + /* Find the X visual that corresponds the the first GLX visual */ + for (visNum = 0; + visNum < pScreen->numVisuals; + visNum++, visual++) { + if (pGLXVis->vid == visual->vid) + break; + } + if (visNum == pScreen->numVisuals) return FALSE; + + if (!(pDRIContextPriv = + DRICreateContextPriv(pScreen, + &pDRIPriv->pSAREA->dummy_context, 0))) { + return FALSE; + } + + contextStore = DRIGetContextStore(pDRIContextPriv); + if (pDRIPriv->pDriverInfo->CreateContext && needCtxPriv) { + if (!pDRIPriv->pDriverInfo->CreateContext(pScreen, visual, + pDRIPriv->pSAREA->dummy_context, + *pVisualConfigPriv, + (DRIContextType)(long)contextStore)) { + DRIDestroyContextPriv(pDRIContextPriv); + return FALSE; + } + } + + pDRIPriv->dummyCtxPriv = pDRIContextPriv; + return TRUE; +} + +static void +DRIDestroyDummyContext(ScreenPtr pScreen, Bool hasCtxPriv) +{ + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + DRIContextPrivPtr pDRIContextPriv = pDRIPriv->dummyCtxPriv; + void *contextStore; + + if (!pDRIContextPriv) return; + if (pDRIPriv->pDriverInfo->DestroyContext && hasCtxPriv) { + contextStore = DRIGetContextStore(pDRIContextPriv); + pDRIPriv->pDriverInfo->DestroyContext(pDRIContextPriv->pScreen, + pDRIContextPriv->hwContext, + (DRIContextType)(long)contextStore); + } + + DRIDestroyContextPriv(pDRIPriv->dummyCtxPriv); + pDRIPriv->dummyCtxPriv = NULL; +} + Bool DRICreateContext(ScreenPtr pScreen, VisualPtr visual, - XID context, drmContextPtr pHWContext -) + XID context, drmContextPtr pHWContext) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); __GLXscreenInfo *pGLXScreen = &__glXActiveScreens[pScreen->myNum]; @@ -660,6 +754,14 @@ void *contextStore; int visNum; + if (pDRIPriv->createDummyCtx && !pDRIPriv->dummyCtxPriv) { + if (!DRICreateDummyContext(pScreen, pDRIPriv->createDummyCtxPriv)) { + DRIDrvMsg(pScreen->myNum, X_INFO, + "[drm] Could not create dummy context\n"); + return FALSE; + } + } + /* Find the GLX visual associated with the one requested */ for (visNum = 0; visNum < pGLXScreen->numVisuals; @@ -670,14 +772,14 @@ /* No matching GLX visual found */ return FALSE; } - + if (!(pDRIContextPriv = DRICreateContextPriv(pScreen, pHWContext, 0))) { return FALSE; } - contextStore=DRIGetContextStore(pDRIContextPriv); + contextStore = DRIGetContextStore(pDRIContextPriv); if (pDRIPriv->pDriverInfo->CreateContext) { - if (!((*pDRIPriv->pDriverInfo->CreateContext)(pScreen, visual, + if (!((*pDRIPriv->pDriverInfo->CreateContext)(pScreen, visual, *pHWContext, *pVisualConfigPriv, (DRIContextType)(long)contextStore))) { DRIDestroyContextPriv(pDRIContextPriv); @@ -709,9 +811,10 @@ pDRIPriv = DRI_SCREEN_PRIV(pDRIContextPriv->pScreen); if (pDRIPriv->pDriverInfo->DestroyContext) { - contextStore=DRIGetContextStore(pDRIContextPriv); - (pDRIPriv->pDriverInfo->DestroyContext)(pDRIContextPriv->pScreen, - pDRIContextPriv->hwContext, (DRIContextType)(long)contextStore); + contextStore = DRIGetContextStore(pDRIContextPriv); + pDRIPriv->pDriverInfo->DestroyContext(pDRIContextPriv->pScreen, + pDRIContextPriv->hwContext, + (DRIContextType)(long)contextStore); } return DRIDestroyContextPriv(pDRIContextPriv); } @@ -721,9 +824,9 @@ * in the case of transition from private to shared backbuffers. It's * not necessary for correctness, because DRIClipNotify gets called in * time to prevent any conflict, but the transition from - * shared->private is sometimes missed if we don't do this. + * shared->private is sometimes missed if we don't do this. */ -static void +static void DRIClipNotifyAllDrawables(ScreenPtr pScreen) { int i; @@ -731,48 +834,42 @@ for( i=0; i < pDRIPriv->pDriverInfo->maxDrawableTableEntry; i++) { pDRIPriv->pSAREA->drawableTable[i].stamp = DRIDrawableValidationStamp++; - } + } } -static void +static void DRITransitionToSharedBuffers(ScreenPtr pScreen) { -/* ErrorF("DRITransitionToSharedBuffers\n"); */ - DRIClipNotifyAllDrawables( pScreen ); + DRIClipNotifyAllDrawables( pScreen ); } -static void +static void DRITransitionToPrivateBuffers(ScreenPtr pScreen) { -/* ErrorF("DRITransitionToPrivateBuffers\n"); */ - DRIClipNotifyAllDrawables( pScreen ); + DRIClipNotifyAllDrawables( pScreen ); } static void DRITransitionTo3d(ScreenPtr pScreen) { - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo; - -/* ErrorF("DRITransitionTo3d\n"); */ + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo; - if (pDRIInfo->TransitionTo3d) - pDRIInfo->TransitionTo3d( pScreen ); + if (pDRIInfo->TransitionTo3d) + pDRIInfo->TransitionTo3d( pScreen ); } static void DRITransitionTo2d(ScreenPtr pScreen) { - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo; - -/* ErrorF("DRITransitionTo2d\n"); */ + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo; - if (pDRIInfo->TransitionTo2d) - pDRIInfo->TransitionTo2d( pScreen ); + if (pDRIInfo->TransitionTo2d) + pDRIInfo->TransitionTo2d( pScreen ); } @@ -808,7 +905,7 @@ pDRIDrawablePriv->drawableIndex = -1; /* save private off of preallocated index */ - pWin->devPrivates[DRIWindowPrivIndex].ptr = + pWin->devPrivates[DRIWindowPrivIndex].ptr = (pointer)pDRIDrawablePriv; switch (++pDRIPriv->nrWindows) { @@ -847,7 +944,7 @@ pDRIDrawablePriv->refCount--; if (pDRIDrawablePriv->refCount <= 0) { /* This calls back DRIDrawablePrivDelete which frees private area */ - FreeResourceByType(id, DRIDrawablePrivResType, FALSE); + FreeResourceByType(id, DRIDrawablePrivResType, FALSE); } } else { /* pixmap (or for GLX 1.3, a PBuffer) */ @@ -875,7 +972,7 @@ pDRIPriv->DRIDrawables[pDRIDrawablePriv->drawableIndex] = NULL; } - if (drmDestroyDrawable(pDRIPriv->drmFD, + if (drmDestroyDrawable(pDRIPriv->drmFD, pDRIDrawablePriv->hwDrawable)) { return FALSE; } @@ -937,7 +1034,7 @@ if (!(pDRIPriv->DRIDrawables[i])) { pDRIPriv->DRIDrawables[i] = pDrawable; pDRIDrawablePriv->drawableIndex = i; - pDRIPriv->pSAREA->drawableTable[i].stamp = + pDRIPriv->pSAREA->drawableTable[i].stamp = DRIDrawableValidationStamp++; break; } @@ -950,10 +1047,10 @@ int oldestIndex = 0; i = pDRIPriv->pDriverInfo->maxDrawableTableEntry; while (i--) { - if (pDRIPriv->pSAREA->drawableTable[i].stamp < + if (pDRIPriv->pSAREA->drawableTable[i].stamp < oldestStamp) { oldestIndex = i; - oldestStamp = + oldestStamp = pDRIPriv->pSAREA->drawableTable[i].stamp; } } @@ -968,15 +1065,15 @@ pDRIPriv->DRIDrawables[oldestIndex] = pDrawable; /* validate SAREA entry */ - pDRIPriv->pSAREA->drawableTable[oldestIndex].stamp = + pDRIPriv->pSAREA->drawableTable[oldestIndex].stamp = DRIDrawableValidationStamp++; /* check for stamp wrap around */ if (oldestStamp > DRIDrawableValidationStamp) { /* walk SAREA table and invalidate all drawables */ - for( i=0; - i < pDRIPriv->pDriverInfo->maxDrawableTableEntry; + for( i=0; + i < pDRIPriv->pDriverInfo->maxDrawableTableEntry; i++) { pDRIPriv->pSAREA->drawableTable[i].stamp = DRIDrawableValidationStamp++; @@ -992,10 +1089,10 @@ pDRIDrawablePriv->drawableIndex); /* reinit drawable ID if window is visible */ - if ((pWin->viewable) && + if ((pWin->viewable) && (pDRIPriv->pDriverInfo->bufferRequests != DRI_NO_WINDOWS)) { - (*pDRIPriv->pDriverInfo->InitBuffers)(pWin, + (*pDRIPriv->pDriverInfo->InitBuffers)(pWin, &pWin->clipList, pDRIDrawablePriv->drawableIndex); } } @@ -1023,7 +1120,7 @@ *numClipRects = 1; *pClipRects = &pDRIPriv->fullscreen_rect; } - + *backX = *X; *backY = *Y; @@ -1099,8 +1196,7 @@ /* Wrapped function defaults */ inforec->wrap.WakeupHandler = DRIDoWakeupHandler; inforec->wrap.BlockHandler = DRIDoBlockHandler; - inforec->wrap.PaintWindowBackground = DRIPaintWindow; - inforec->wrap.PaintWindowBorder = DRIPaintWindow; + inforec->wrap.WindowExposures = DRIWindowExposures; inforec->wrap.CopyWindow = DRICopyWindow; inforec->wrap.ValidateTree = DRIValidateTree; inforec->wrap.PostValidateTree = DRIPostValidateTree; @@ -1173,7 +1269,7 @@ } } -void +void DRIDoBlockHandler(int screenNum, pointer blockData, pointer pTimeout, pointer pReadmask) { @@ -1192,7 +1288,7 @@ DRIUnlock(pScreen); } -void +void DRISwapContext(int drmFD, void *oldctx, void *newctx) { DRIContextPrivPtr oldContext = (DRIContextPrivPtr)oldctx; @@ -1235,7 +1331,7 @@ #endif if (!pDRIPriv->pDriverInfo->SwapContext) { - DRIDrvMsg(pScreen->myNum, X_ERROR, + DRIDrvMsg(pScreen->myNum, X_ERROR, "[DRI] DDX driver missing context swap call back\n"); return; } @@ -1251,7 +1347,7 @@ oldContextType = DRI_NO_CONTEXT; } newContextStore = DRIGetContextStore(newContext); - if ((newContext->valid3D) && + if ((newContext->valid3D) && (newContext->hwContext != pDRIPriv->myContext)) { newContextType = DRI_3D_CONTEXT; } @@ -1265,8 +1361,8 @@ /* optimize 2D context swaps */ if (newContext->flags & DRI_CONTEXT_2DONLY) { - /* go from 3D context to 2D context and only save 2D - * subset of 3D state + /* go from 3D context to 2D context and only save 2D + * subset of 3D state */ oldContextStore = DRIGetContextStore(oldContext); oldContextType = DRI_2D_CONTEXT; @@ -1277,8 +1373,8 @@ } else if (oldContext->flags & DRI_CONTEXT_2DONLY) { if (pDRIPriv->lastPartial3DContext == newContext) { - /* go from 2D context back to previous 3D context and - * only restore 2D subset of previous 3D state + /* go from 2D context back to previous 3D context and + * only restore 2D subset of previous 3D state */ oldContextStore = DRIGetContextStore(oldContext); oldContextType = DRI_2D_CONTEXT; @@ -1291,7 +1387,7 @@ /* call DDX driver to do partial restore */ oldContextStore = DRIGetContextStore(oldContext); - newContextStore = + newContextStore = DRIGetContextStore(pDRIPriv->lastPartial3DContext); (*pDRIPriv->pDriverInfo->SwapContext)(pScreen, DRI_2D_SYNC, @@ -1305,7 +1401,7 @@ oldContext->valid3D = TRUE; oldContextType = DRI_3D_CONTEXT; newContextStore = DRIGetContextStore(newContext); - if ((newContext->valid3D) && + if ((newContext->valid3D) && (newContext->hwContext != pDRIPriv->myContext)) { newContextType = DRI_3D_CONTEXT; } @@ -1321,7 +1417,7 @@ oldContext->valid3D = TRUE; oldContextType = DRI_3D_CONTEXT; newContextStore = DRIGetContextStore(newContext); - if ((newContext->valid3D) && + if ((newContext->valid3D) && (newContext->hwContext != pDRIPriv->myContext)) { newContextType = DRI_3D_CONTEXT; } @@ -1347,93 +1443,69 @@ return((void *)context->pContextStore); } -void -DRIPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) +void +DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg) { ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); - /* NOT_DONE: HACK until we have newly transitioned 3D->2D - * windows computed - */ - if(what == PW_BACKGROUND) { - if ((pDRIPriv->pDriverInfo->bufferRequests == DRI_3D_WINDOWS_ONLY) && - (pDRIDrawablePriv)) { - - (*pDRIPriv->pDriverInfo->InitBuffers)(pWin, prgn, - pDRIDrawablePriv->drawableIndex); - } - else if (pDRIPriv->pDriverInfo->bufferRequests == DRI_ALL_WINDOWS) { - if (pDRIDrawablePriv) { + if(pDRIDrawablePriv) { + (*pDRIPriv->pDriverInfo->InitBuffers)(pWin, prgn, + pDRIDrawablePriv->drawableIndex); + } - (*pDRIPriv->pDriverInfo->InitBuffers)(pWin, prgn, - pDRIDrawablePriv->drawableIndex); - } - else { + pScreen->WindowExposures = pDRIPriv->wrap.WindowExposures; - /* DMA flush buffers shouldn't be needed here */ + (*pScreen->WindowExposures)(pWin, prgn, bsreg); - /* call DDX driver's DRI specific InitBuffer */ - (*pDRIPriv->pDriverInfo->InitBuffers)(pWin, prgn, - pDRIPriv->pDriverInfo->ddxDrawableTableEntry); - } - } + pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; + pScreen->WindowExposures = DRIWindowExposures; - /* unwrap */ - pScreen->PaintWindowBackground = pDRIPriv->wrap.PaintWindowBackground; +} - /* call lower layers */ - (*pScreen->PaintWindowBackground)(pWin, prgn, what); - /* rewrap */ - pDRIPriv->wrap.PaintWindowBackground = pScreen->PaintWindowBackground; - pScreen->PaintWindowBackground = DRIPaintWindow; - } - else { - if (pDRIPriv->pDriverInfo->bufferRequests == DRI_ALL_WINDOWS) { - /* call DDX driver's DRI specific InitBuffer */ - (*pDRIPriv->pDriverInfo->InitBuffers)(pWin, prgn, - pDRIPriv->pDriverInfo->ddxDrawableTableEntry); - } +static int +DRITreeTraversal(WindowPtr pWin, pointer data) +{ + DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); - /* unwrap */ - pScreen->PaintWindowBorder = pDRIPriv->wrap.PaintWindowBorder; + if(pDRIDrawablePriv) { + ScreenPtr pScreen = pWin->drawable.pScreen; + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + RegionPtr reg = (RegionPtr)data; - /* call lower layers */ - (*pScreen->PaintWindowBorder)(pWin, prgn, what); + REGION_UNION(pScreen, reg, reg, &(pWin->clipList)); - /* rewrap */ - pDRIPriv->wrap.PaintWindowBorder = pScreen->PaintWindowBorder; - pScreen->PaintWindowBorder = DRIPaintWindow; + if(pDRIPriv->nrWindows == 1) + return WT_STOPWALKING; } + return WT_WALKCHILDREN; } -void +void DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); - /* HACK until we have newly transitioned 3D->2D windows repainted */ - if ((pDRIPriv->pDriverInfo->bufferRequests == DRI_3D_WINDOWS_ONLY) && - (pDRIDrawablePriv)) { + if(pDRIPriv->nrWindows > 0) { + RegionRec reg; - (*pDRIPriv->pDriverInfo->MoveBuffers)(pWin, ptOldOrg, prgnSrc, - pDRIDrawablePriv->drawableIndex); - } - else if (pDRIPriv->pDriverInfo->bufferRequests == DRI_ALL_WINDOWS) { - if (pDRIDrawablePriv) { + REGION_INIT(pScreen, ®, NullBox, 0); + TraverseTree(pWin, DRITreeTraversal, (pointer)(®)); - (*pDRIPriv->pDriverInfo->MoveBuffers)(pWin, ptOldOrg, prgnSrc, - pDRIDrawablePriv->drawableIndex); - } - else { - /* call DDX driver's DRI specific InitBuffer */ - (*pDRIPriv->pDriverInfo->MoveBuffers)(pWin, ptOldOrg, prgnSrc, + if(REGION_NOTEMPTY(pScreen, ®)) { + REGION_TRANSLATE(pScreen, ®, ptOldOrg.x - pWin->drawable.x, + ptOldOrg.y - pWin->drawable.y); + REGION_INTERSECT(pScreen, ®, ®, prgnSrc); + + /* The MoveBuffers interface is not ideal */ + (*pDRIPriv->pDriverInfo->MoveBuffers)(pWin, ptOldOrg, ®, pDRIPriv->pDriverInfo->ddxDrawableTableEntry); - } + } + + REGION_UNINIT(pScreen, ®); } /* unwrap */ @@ -1507,14 +1579,10 @@ DRM_SPINLOCK_TAKE(lock, val); } -int -DRIValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) +static void +DRILockTree(ScreenPtr pScreen) { - ScreenPtr pScreen = pParent->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - int returnValue; - - /* Prepare to flush outstanding DMA buffers */ /* Restore the last known 3D context if the X context is hidden */ if (pDRIPriv->pDriverInfo->driverSwapMethod == DRI_HIDE_X_CONTEXT) { @@ -1548,6 +1616,30 @@ DRI_2D_CONTEXT, pDRIPriv->hiddenContextStore); } +} + +/* It appears that somebody is relying on the lock being set even + if we aren't touching 3D windows */ + +#define DRI_BROKEN + +static Bool DRIWindowsTouched = FALSE; + +int +DRIValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) +{ + ScreenPtr pScreen = pParent->drawable.pScreen; + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + int returnValue; + + DRIWindowsTouched = FALSE; + +#ifdef DRI_BROKEN + if(!DRIWindowsTouched) { + DRILockTree(pScreen); + DRIWindowsTouched = TRUE; + } +#endif /* unwrap */ pScreen->ValidateTree = pDRIPriv->wrap.ValidateTree; @@ -1587,26 +1679,44 @@ pScreen->PostValidateTree = DRIPostValidateTree; } - if (pParent) { + if (DRIWindowsTouched) { /* Release spin lock */ DRM_SPINUNLOCK(&pDRIPriv->pSAREA->drawable_lock, 1); + DRIWindowsTouched = FALSE; } } void DRIClipNotify(WindowPtr pWin, int dx, int dy) { - DRIScreenPrivPtr pDRIPriv; + ScreenPtr pScreen = pWin->drawable.pScreen; + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIDrawablePrivPtr pDRIDrawablePriv; if ((pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin))) { - pDRIPriv = DRI_SCREEN_PRIV(pWin->drawable.pScreen); + +#ifndef DRI_BROKEN + if(!DRIWindowsTouched) { + DRILockTree(pScreen); + DRIWindowsTouched = TRUE; + } +#endif + pDRIPriv->pSAREA->drawableTable[pDRIDrawablePriv->drawableIndex].stamp = DRIDrawableValidationStamp++; } + + if(pDRIPriv->wrap.ClipNotify) { + pScreen->ClipNotify = pDRIPriv->wrap.ClipNotify; + + (*pScreen->ClipNotify)(pWin, dx, dy); + + pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify; + pScreen->ClipNotify = DRIClipNotify; + } } -CARD32 +CARD32 DRIGetDrawableIndex(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; @@ -1624,7 +1734,7 @@ return index; } -unsigned int +unsigned int DRIGetDrawableStamp(ScreenPtr pScreen, CARD32 drawable_index) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); @@ -1636,56 +1746,62 @@ DRIPrintDrawableLock(ScreenPtr pScreen, char *msg) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - + ErrorF("%s: %d\n", msg, pDRIPriv->pSAREA->drawable_lock.lock); } void -DRILock(ScreenPtr pScreen, int flags) { +DRILock(ScreenPtr pScreen, int flags) +{ DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - + if (!lockRefCount) - DRM_LOCK(pDRIPriv->drmFD, pDRIPriv->pSAREA, pDRIPriv->myContext, flags); + DRM_LOCK(pDRIPriv->drmFD, pDRIPriv->pSAREA, pDRIPriv->myContext, flags); lockRefCount++; } void -DRIUnlock(ScreenPtr pScreen) { +DRIUnlock(ScreenPtr pScreen) +{ DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - if (lockRefCount>0) lockRefCount--; + if (lockRefCount > 0) { + lockRefCount--; + } else { - ErrorF("DRIUnlock called when not locked\n"); - return; + ErrorF("DRIUnlock called when not locked\n"); + return; } if (!lockRefCount) - DRM_UNLOCK(pDRIPriv->drmFD, pDRIPriv->pSAREA, pDRIPriv->myContext); + DRM_UNLOCK(pDRIPriv->drmFD, pDRIPriv->pSAREA, pDRIPriv->myContext); } void * DRIGetSAREAPrivate(ScreenPtr pScreen) { - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - if (!pDRIPriv) return 0; - return (void *)(((char*)pDRIPriv->pSAREA)+sizeof(XF86DRISAREARec)); + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + if (!pDRIPriv) + return 0; + return (void *)(((char*)pDRIPriv->pSAREA)+sizeof(XF86DRISAREARec)); } drmContext DRIGetContext(ScreenPtr pScreen) { - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - if (!pDRIPriv) return 0; - return pDRIPriv->myContext; + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + if (!pDRIPriv) + return 0; + return pDRIPriv->myContext; } - + /* This lets get at the unwrapped functions so that they can correctly * call the lowerlevel functions, and choose whether they will be - * called at every level of recursion (eg in validatetree). + * called at every level of recursion (eg in validatetree). */ DRIWrappedFuncsRec * DRIGetWrappedFuncs(ScreenPtr pScreen) { - return &(DRI_SCREEN_PRIV(pScreen)->wrap); + return &(DRI_SCREEN_PRIV(pScreen)->wrap); } void @@ -1693,9 +1809,9 @@ int *minorVersion, int *patchVersion) { - *majorVersion = XF86DRI_MAJOR_VERSION; - *minorVersion = XF86DRI_MINOR_VERSION; - *patchVersion = XF86DRI_PATCH_VERSION; + *majorVersion = XF86DRI_MAJOR_VERSION; + *minorVersion = XF86DRI_MINOR_VERSION; + *patchVersion = XF86DRI_PATCH_VERSION; } static void @@ -1767,7 +1883,7 @@ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; WindowPtr pWin = (WindowPtr)pDrawable; XF86DRIClipRectPtr pClipRects = (void *)REGION_RECTS(&pWin->clipList); - + _DRIAdjustFrame(pScrn, pDRIPriv, pScrn->frameX0, pScrn->frameY0); if (pDrawable->type != DRAWABLE_WINDOW) return FALSE; @@ -1796,7 +1912,7 @@ pScrn->vtSema = FALSE; pDRIPriv->fullscreen = pDrawable; DRIClipNotify(pWin, 0, 0); - + if (pDRIPriv->pDriverInfo->OpenFullScreen) pDRIPriv->pDriverInfo->OpenFullScreen(pScreen); @@ -1827,7 +1943,7 @@ pScrn->EnableDisableFBAccess(pScreen->myNum, TRUE); pWin->eventMask = mask; pWin->optional = optional; - + xf86EnableVTSwitch(TRUE); pDRIPriv->pSAREA->frame.fullscreen = 0; return TRUE; @@ -1838,4 +1954,79 @@ { FreeResourceByType(pDrawable->id, DRIFullScreenResType, FALSE); return TRUE; +} + + +/* + * DRIMoveBuffersHelper swaps the regions rects in place leaving you + * a region with the rects in the order that you need to blit them, + * but it is possibly (likely) an invalid region afterwards. If you + * need to use the region again for anything you have to call + * REGION_VALIDATE on it, or better yet, save a copy first. + */ + +void +DRIMoveBuffersHelper( + ScreenPtr pScreen, + int dx, + int dy, + int *xdir, + int *ydir, + RegionPtr reg +) +{ + BoxPtr extents, pbox, firstBox, lastBox; + BoxRec tmpBox; + int y, nbox; + + extents = REGION_EXTENTS(pScreen, reg); + nbox = REGION_NUM_RECTS(reg); + pbox = REGION_RECTS(reg); + + if((dy > 0) && (dy < (extents->y2 - extents->y1))) { + *ydir = -1; + if(nbox > 1) { + firstBox = pbox; + lastBox = pbox + nbox - 1; + while((unsigned long)firstBox < (unsigned long)lastBox) { + tmpBox = *firstBox; + *firstBox = *lastBox; + *lastBox = tmpBox; + firstBox++; + lastBox--; + } + } + } else *ydir = 1; + + if((dx > 0) && (dx < (extents->x2 - extents->x1))) { + *xdir = -1; + if(nbox > 1) { + firstBox = lastBox = pbox; + y = pbox->y1; + while(--nbox) { + pbox++; + if(pbox->y1 == y) lastBox++; + else { + while((unsigned long)firstBox < (unsigned long)lastBox) { + tmpBox = *firstBox; + *firstBox = *lastBox; + *lastBox = tmpBox; + firstBox++; + lastBox--; + } + + firstBox = lastBox = pbox; + y = pbox->y1; + } + } + while((unsigned long)firstBox < (unsigned long)lastBox) { + tmpBox = *firstBox; + *firstBox = *lastBox; + *lastBox = tmpBox; + firstBox++; + lastBox--; + } + } + } else *xdir = 1; + } Index: xc/programs/Xserver/GL/dri/dri.h diff -u xc/programs/Xserver/GL/dri/dri.h:1.15 xc/programs/Xserver/GL/dri/dri.h:1.18 --- xc/programs/Xserver/GL/dri/dri.h:1.15 Thu Dec 7 15:26:14 2000 +++ xc/programs/Xserver/GL/dri/dri.h Wed Mar 21 11:21:40 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.15 2000/12/07 20:26:14 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.18 2001/03/21 16:21:40 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -85,12 +85,11 @@ typedef struct { ScreenWakeupHandlerProcPtr WakeupHandler; ScreenBlockHandlerProcPtr BlockHandler; - PaintWindowBackgroundProcPtr PaintWindowBackground; - PaintWindowBorderProcPtr PaintWindowBorder; + WindowExposuresProcPtr WindowExposures; CopyWindowProcPtr CopyWindow; ValidateTreeProcPtr ValidateTree; PostValidateTreeProcPtr PostValidateTree; - ClipNotifyPtr ClipNotify; + ClipNotifyProcPtr ClipNotify; AdjustFramePtr AdjustFrame; } DRIWrappedFuncsRec, *DRIWrappedFuncsPtr; @@ -147,6 +146,8 @@ DRIWindowRequests bufferRequests; int devPrivateSize; void* devPrivate; + Bool createDummyCtx; + Bool createDummyCtxPriv; } DRIInfoRec, *DRIInfoPtr; @@ -251,9 +252,9 @@ extern void *DRIGetContextStore(DRIContextPrivPtr context); -extern void DRIPaintWindow(WindowPtr pWin, - RegionPtr prgn, - int what); +extern void DRIWindowExposures(WindowPtr pWin, + RegionPtr prgn, + RegionPtr bsreg); extern void DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, @@ -306,6 +307,13 @@ extern int DRIOpenFullScreen(ScreenPtr pScreen, DrawablePtr pDrawable); extern int DRICloseFullScreen(ScreenPtr pScreen, DrawablePtr pDrawable); + +extern void DRIMoveBuffersHelper(ScreenPtr pScreen, + int dx, + int dy, + int *xdir, + int *ydir, + RegionPtr reg); #define _DRI_H_ Index: xc/programs/Xserver/GL/dri/drimodule.c diff -u xc/programs/Xserver/GL/dri/drimodule.c:1.3 xc/programs/Xserver/GL/dri/drimodule.c:1.4 --- xc/programs/Xserver/GL/dri/drimodule.c:1.3 Tue Feb 22 23:46:52 2000 +++ xc/programs/Xserver/GL/dri/drimodule.c Tue Apr 10 12:07:55 2001 @@ -24,7 +24,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/programs/Xserver/GL/dri/drimodule.c,v 1.3 2000/02/23 04:46:52 martin Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/dri/drimodule.c,v 1.4 2001/04/10 16:07:55 dawes Exp $ */ /* * Authors: @@ -64,19 +64,34 @@ NULL }; +static const char *glxSymbols[] = { + "__glXActiveScreens", + NULL +}; + XF86ModuleData driModuleData = { &VersRec, driSetup, NULL }; static pointer driSetup(pointer module, pointer opts, int *errmaj, int *errmin) { + static Bool setupDone = FALSE; pointer drm = NULL; - LoadExtension(&XF86DRIExt, FALSE); + if (!setupDone) { + setupDone = TRUE; + + LoaderRefSymLists(glxSymbols, NULL); + + drm = + LoadSubModule(module, "drm", NULL, NULL, NULL, NULL, errmaj, errmin); - drm = LoadSubModule(module, "drm", NULL, NULL, NULL, NULL, errmaj, errmin); - if (!drm) - ErrorF("Cannot load the drm library\n"); + if (!drm) + ErrorF("Cannot load the drm library\n"); + else + LoadExtension(&XF86DRIExt, FALSE); + } + if (errmaj) *errmaj = LDR_ONCEONLY; /* Need a non-NULL return value to indicate success */ return drm; } Index: xc/programs/Xserver/GL/dri/dristruct.h diff -u xc/programs/Xserver/GL/dri/dristruct.h:1.9 xc/programs/Xserver/GL/dri/dristruct.h:1.10 --- xc/programs/Xserver/GL/dri/dristruct.h:1.9 Thu Dec 7 15:26:14 2000 +++ xc/programs/Xserver/GL/dri/dristruct.h Wed Mar 21 11:21:40 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/dristruct.h,v 1.9 2000/12/07 20:26:14 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/dri/dristruct.h,v 1.10 2001/03/21 16:21:40 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -93,6 +93,9 @@ XF86DRIClipRectRec fullscreen_rect; /* fake rect for fullscreen mode */ DRIWrappedFuncsRec wrap; DrawablePtr DRIDrawables[SAREA_MAX_DRAWABLES]; + DRIContextPrivPtr dummyCtxPriv; /* Pointer to dummy context */ + Bool createDummyCtx; + Bool createDummyCtxPriv; } DRIScreenPrivRec, *DRIScreenPrivPtr; #endif /* DRI_STRUCT_H */ Index: xc/programs/Xserver/GL/dri/sarea.h diff -u xc/programs/Xserver/GL/dri/sarea.h:1.8 xc/programs/Xserver/GL/dri/sarea.h:1.9 --- xc/programs/Xserver/GL/dri/sarea.h:1.8 Thu Dec 7 15:26:14 2000 +++ xc/programs/Xserver/GL/dri/sarea.h Wed Mar 21 11:21:40 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.8 2000/12/07 20:26:14 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.9 2001/03/21 16:21:40 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -73,6 +73,7 @@ drmLock drawable_lock; XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES]; XF86DRISAREAFrameRec frame; + drmContext dummy_context; } XF86DRISAREARec, *XF86DRISAREAPtr; #endif Index: xc/programs/Xserver/GL/glx/Imakefile diff -u xc/programs/Xserver/GL/glx/Imakefile:1.8 xc/programs/Xserver/GL/glx/Imakefile:1.9 --- xc/programs/Xserver/GL/glx/Imakefile:1.8 Thu Aug 24 18:20:09 2000 +++ xc/programs/Xserver/GL/glx/Imakefile Sat Apr 28 09:55:36 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/GL/glx/Imakefile,v 1.8 2000/08/24 22:20:09 tsi Exp $ +XCOMM $XFree86: xc/programs/Xserver/GL/glx/Imakefile,v 1.9 2001/04/28 13:55:36 dawes Exp $ #define IHaveModules #include @@ -21,17 +21,11 @@ g_render.o g_renderswap.o g_single.o g_singleswap.o \ $(MOBJS) -#if GlxUseSGISI - INCLUDES = -I. -I../include -I$(SERVERSRC)/include -I$(XTOP)/include \ - -I$(SERVERSRC)/mi \ + INCLUDES = -I. -I../include -I$(SERVERSRC)/include -I$(INCLUDESRC) \ + -I$(XINCLUDESRC) -I$(SERVERSRC)/mi \ -I$(EXTINCSRC) -I$(FONTINCSRC) -I$(LIBSRC)/GL/include \ - -I$(XF86SRC) -I$(XF86COMSRC) -I$(XF86OSSRC) -#else - INCLUDES = -I. -I../include -I$(SERVERSRC)/include -I$(XTOP)/include \ - -I$(SERVERSRC)/mi \ - -I$(EXTINCSRC) -I$(FONTINCSRC) -I$(LIBSRC)/GL/include \ - -I$(XF86SRC) -I../mesa/include -I../mesa/src -I../mesa/src/X -#endif + -I$(XF86SRC) + XCOMM If you add "-DDEBUG" in DEFINES, then make sure you also XCOMM add DEBUG to the define in ../mesa/src/X/xf86glx.c DEFINES = $(GLX_DEFINES) Index: xc/programs/Xserver/GL/glx/g_disptab.c diff -u xc/programs/Xserver/GL/glx/g_disptab.c:1.2 xc/programs/Xserver/GL/glx/g_disptab.c:1.3 --- xc/programs/Xserver/GL/glx/g_disptab.c:1.2 Mon Jun 14 03:31:22 1999 +++ xc/programs/Xserver/GL/glx/g_disptab.c Wed Mar 21 11:29:35 2001 @@ -1,22 +1,32 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.c,v 1.2 1999/06/14 07:31:22 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.c,v 1.3 2001/03/21 16:29:35 dawes Exp $ */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. +** http://oss.sgi.com/projects/FreeB ** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: This software was created using the +** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has +** not been independently verified as being compliant with the OpenGL(R) +** version 1.2.1 Specification. */ #include "glxserver.h" @@ -166,6 +176,23 @@ __glXDisp_IsEnabled, __glXDisp_IsList, __glXDisp_Flush, + __glXDisp_AreTexturesResident, + __glXDisp_DeleteTextures, + __glXDisp_GenTextures, + __glXDisp_IsTexture, + __glXDisp_GetColorTable, + __glXDisp_GetColorTableParameterfv, + __glXDisp_GetColorTableParameteriv, + __glXDisp_GetConvolutionFilter, + __glXDisp_GetConvolutionParameterfv, + __glXDisp_GetConvolutionParameteriv, + __glXDisp_GetSeparableFilter, + __glXDisp_GetHistogram, + __glXDisp_GetHistogramParameterfv, + __glXDisp_GetHistogramParameteriv, + __glXDisp_GetMinmax, + __glXDisp_GetMinmaxParameterfv, + __glXDisp_GetMinmaxParameteriv, }; __GLXdispatchRenderProcPtr __glXRenderTable[] = { @@ -361,9 +388,28 @@ __glXDisp_Translated, __glXDisp_Translatef, __glXDisp_Viewport, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, + __glXDisp_PolygonOffset, + __glXDisp_DrawArrays, __glXDisp_Indexubv, + __glXDisp_ColorSubTable, + __glXDisp_CopyColorSubTable, + __glXDisp_ActiveTextureARB, + __glXDisp_MultiTexCoord1dvARB, + __glXDisp_MultiTexCoord1fvARB, + __glXDisp_MultiTexCoord1ivARB, + __glXDisp_MultiTexCoord1svARB, + __glXDisp_MultiTexCoord2dvARB, + __glXDisp_MultiTexCoord2fvARB, + __glXDisp_MultiTexCoord2ivARB, + __glXDisp_MultiTexCoord2svARB, + __glXDisp_MultiTexCoord3dvARB, + __glXDisp_MultiTexCoord3fvARB, + __glXDisp_MultiTexCoord3ivARB, + __glXDisp_MultiTexCoord3svARB, + __glXDisp_MultiTexCoord4dvARB, + __glXDisp_MultiTexCoord4fvARB, + __glXDisp_MultiTexCoord4ivARB, + __glXDisp_MultiTexCoord4svARB, }; __GLXdispatchSingleProcPtr __glXSwapSingleTable[] = { @@ -510,6 +556,23 @@ __glXDispSwap_IsEnabled, __glXDispSwap_IsList, __glXDispSwap_Flush, + __glXDispSwap_AreTexturesResident, + __glXDispSwap_DeleteTextures, + __glXDispSwap_GenTextures, + __glXDispSwap_IsTexture, + __glXDispSwap_GetColorTable, + __glXDispSwap_GetColorTableParameterfv, + __glXDispSwap_GetColorTableParameteriv, + __glXDispSwap_GetConvolutionFilter, + __glXDispSwap_GetConvolutionParameterfv, + __glXDispSwap_GetConvolutionParameteriv, + __glXDispSwap_GetSeparableFilter, + __glXDispSwap_GetHistogram, + __glXDispSwap_GetHistogramParameterfv, + __glXDispSwap_GetHistogramParameteriv, + __glXDispSwap_GetMinmax, + __glXDispSwap_GetMinmaxParameterfv, + __glXDispSwap_GetMinmaxParameteriv, }; __GLXdispatchRenderProcPtr __glXSwapRenderTable[] = { @@ -705,7 +768,26 @@ __glXDispSwap_Translated, __glXDispSwap_Translatef, __glXDispSwap_Viewport, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, + __glXDispSwap_PolygonOffset, + __glXDispSwap_DrawArrays, __glXDispSwap_Indexubv, + __glXDispSwap_ColorSubTable, + __glXDispSwap_CopyColorSubTable, + __glXDispSwap_ActiveTextureARB, + __glXDispSwap_MultiTexCoord1dvARB, + __glXDispSwap_MultiTexCoord1fvARB, + __glXDispSwap_MultiTexCoord1ivARB, + __glXDispSwap_MultiTexCoord1svARB, + __glXDispSwap_MultiTexCoord2dvARB, + __glXDispSwap_MultiTexCoord2fvARB, + __glXDispSwap_MultiTexCoord2ivARB, + __glXDispSwap_MultiTexCoord2svARB, + __glXDispSwap_MultiTexCoord3dvARB, + __glXDispSwap_MultiTexCoord3fvARB, + __glXDispSwap_MultiTexCoord3ivARB, + __glXDispSwap_MultiTexCoord3svARB, + __glXDispSwap_MultiTexCoord4dvARB, + __glXDispSwap_MultiTexCoord4fvARB, + __glXDispSwap_MultiTexCoord4ivARB, + __glXDispSwap_MultiTexCoord4svARB, }; Index: xc/programs/Xserver/GL/glx/g_disptab.h diff -u xc/programs/Xserver/GL/glx/g_disptab.h:1.2 xc/programs/Xserver/GL/glx/g_disptab.h:1.3 --- xc/programs/Xserver/GL/glx/g_disptab.h:1.2 Mon Jun 14 03:31:22 1999 +++ xc/programs/Xserver/GL/glx/g_disptab.h Wed Mar 21 11:29:35 2001 @@ -1,24 +1,34 @@ +/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.h,v 1.3 2001/03/21 16:29:35 dawes Exp $ */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ #ifndef _GLX_g_disptab_h_ #define _GLX_g_disptab_h_ -/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.h,v 1.2 1999/06/14 07:31:22 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. +** http://oss.sgi.com/projects/FreeB ** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: This software was created using the +** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has +** not been independently verified as being compliant with the OpenGL(R) +** version 1.2.1 Specification. */ extern int __glXRender(__GLXclientState*, GLbyte*); @@ -83,6 +93,23 @@ extern int __glXDisp_IsEnabled(__GLXclientState*, GLbyte*); extern int __glXDisp_IsList(__GLXclientState*, GLbyte*); extern int __glXDisp_Flush(__GLXclientState*, GLbyte*); +extern int __glXDisp_AreTexturesResident(__GLXclientState*, GLbyte*); +extern int __glXDisp_DeleteTextures(__GLXclientState*, GLbyte*); +extern int __glXDisp_GenTextures(__GLXclientState*, GLbyte*); +extern int __glXDisp_IsTexture(__GLXclientState*, GLbyte*); +extern int __glXDisp_GetColorTable(__GLXclientState*, GLbyte*); +extern int __glXDisp_GetColorTableParameterfv(__GLXclientState*, GLbyte*); +extern int __glXDisp_GetColorTableParameteriv(__GLXclientState*, GLbyte*); +extern int __glXDisp_GetConvolutionFilter(__GLXclientState*, GLbyte*); +extern int __glXDisp_GetConvolutionParameterfv(__GLXclientState*, GLbyte*); +extern int __glXDisp_GetConvolutionParameteriv(__GLXclientState*, GLbyte*); +extern int __glXDisp_GetSeparableFilter(__GLXclientState*, GLbyte*); +extern int __glXDisp_GetHistogram(__GLXclientState*, GLbyte*); +extern int __glXDisp_GetHistogramParameterfv(__GLXclientState*, GLbyte*); +extern int __glXDisp_GetHistogramParameteriv(__GLXclientState*, GLbyte*); +extern int __glXDisp_GetMinmax(__GLXclientState*, GLbyte*); +extern int __glXDisp_GetMinmaxParameterfv(__GLXclientState*, GLbyte*); +extern int __glXDisp_GetMinmaxParameteriv(__GLXclientState*, GLbyte*); extern void __glXDisp_CallList(GLbyte*); extern void __glXDisp_CallLists(GLbyte*); @@ -274,7 +301,28 @@ extern void __glXDisp_Translated(GLbyte*); extern void __glXDisp_Translatef(GLbyte*); extern void __glXDisp_Viewport(GLbyte*); +extern void __glXDisp_PolygonOffset(GLbyte*); +extern void __glXDisp_DrawArrays(GLbyte*); extern void __glXDisp_Indexubv(GLbyte*); +extern void __glXDisp_ColorSubTable(GLbyte*); +extern void __glXDisp_CopyColorSubTable(GLbyte*); +extern void __glXDisp_ActiveTextureARB(GLbyte*); +extern void __glXDisp_MultiTexCoord1dvARB(GLbyte*); +extern void __glXDisp_MultiTexCoord1fvARB(GLbyte*); +extern void __glXDisp_MultiTexCoord1ivARB(GLbyte*); +extern void __glXDisp_MultiTexCoord1svARB(GLbyte*); +extern void __glXDisp_MultiTexCoord2dvARB(GLbyte*); +extern void __glXDisp_MultiTexCoord2fvARB(GLbyte*); +extern void __glXDisp_MultiTexCoord2ivARB(GLbyte*); +extern void __glXDisp_MultiTexCoord2svARB(GLbyte*); +extern void __glXDisp_MultiTexCoord3dvARB(GLbyte*); +extern void __glXDisp_MultiTexCoord3fvARB(GLbyte*); +extern void __glXDisp_MultiTexCoord3ivARB(GLbyte*); +extern void __glXDisp_MultiTexCoord3svARB(GLbyte*); +extern void __glXDisp_MultiTexCoord4dvARB(GLbyte*); +extern void __glXDisp_MultiTexCoord4fvARB(GLbyte*); +extern void __glXDisp_MultiTexCoord4ivARB(GLbyte*); +extern void __glXDisp_MultiTexCoord4svARB(GLbyte*); extern int __glXSwapRender(__GLXclientState*, GLbyte*); extern int __glXSwapRenderLarge(__GLXclientState*, GLbyte*); @@ -338,6 +386,23 @@ extern int __glXDispSwap_IsEnabled(__GLXclientState*, GLbyte*); extern int __glXDispSwap_IsList(__GLXclientState*, GLbyte*); extern int __glXDispSwap_Flush(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_AreTexturesResident(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_DeleteTextures(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_GenTextures(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_IsTexture(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_GetColorTable(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_GetColorTableParameterfv(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_GetColorTableParameteriv(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_GetConvolutionFilter(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_GetSeparableFilter(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_GetHistogram(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_GetHistogramParameterfv(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_GetHistogramParameteriv(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_GetMinmax(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState*, GLbyte*); extern void __glXDispSwap_CallList(GLbyte*); extern void __glXDispSwap_CallLists(GLbyte*); @@ -529,16 +594,37 @@ extern void __glXDispSwap_Translated(GLbyte*); extern void __glXDispSwap_Translatef(GLbyte*); extern void __glXDispSwap_Viewport(GLbyte*); +extern void __glXDispSwap_PolygonOffset(GLbyte*); +extern void __glXDispSwap_DrawArrays(GLbyte*); extern void __glXDispSwap_Indexubv(GLbyte*); +extern void __glXDispSwap_ColorSubTable(GLbyte*); +extern void __glXDispSwap_CopyColorSubTable(GLbyte*); +extern void __glXDispSwap_ActiveTextureARB(GLbyte*); +extern void __glXDispSwap_MultiTexCoord1dvARB(GLbyte*); +extern void __glXDispSwap_MultiTexCoord1fvARB(GLbyte*); +extern void __glXDispSwap_MultiTexCoord1ivARB(GLbyte*); +extern void __glXDispSwap_MultiTexCoord1svARB(GLbyte*); +extern void __glXDispSwap_MultiTexCoord2dvARB(GLbyte*); +extern void __glXDispSwap_MultiTexCoord2fvARB(GLbyte*); +extern void __glXDispSwap_MultiTexCoord2ivARB(GLbyte*); +extern void __glXDispSwap_MultiTexCoord2svARB(GLbyte*); +extern void __glXDispSwap_MultiTexCoord3dvARB(GLbyte*); +extern void __glXDispSwap_MultiTexCoord3fvARB(GLbyte*); +extern void __glXDispSwap_MultiTexCoord3ivARB(GLbyte*); +extern void __glXDispSwap_MultiTexCoord3svARB(GLbyte*); +extern void __glXDispSwap_MultiTexCoord4dvARB(GLbyte*); +extern void __glXDispSwap_MultiTexCoord4fvARB(GLbyte*); +extern void __glXDispSwap_MultiTexCoord4ivARB(GLbyte*); +extern void __glXDispSwap_MultiTexCoord4svARB(GLbyte*); #define __GLX_MIN_GLXCMD_OPCODE 1 #define __GLX_MAX_GLXCMD_OPCODE 20 #define __GLX_MIN_RENDER_OPCODE 1 -#define __GLX_MAX_RENDER_OPCODE 194 +#define __GLX_MAX_RENDER_OPCODE 213 #define __GLX_MIN_SINGLE_OPCODE 1 -#define __GLX_MAX_SINGLE_OPCODE 142 -#define __GLX_SINGLE_TABLE_SIZE 143 -#define __GLX_RENDER_TABLE_SIZE 195 +#define __GLX_MAX_SINGLE_OPCODE 159 +#define __GLX_SINGLE_TABLE_SIZE 160 +#define __GLX_RENDER_TABLE_SIZE 214 extern __GLXdispatchRenderProcPtr __glXRenderTable[__GLX_RENDER_TABLE_SIZE]; extern __GLXdispatchSingleProcPtr __glXSingleTable[__GLX_SINGLE_TABLE_SIZE]; extern __GLXdispatchRenderProcPtr __glXSwapRenderTable[__GLX_RENDER_TABLE_SIZE]; Index: xc/programs/Xserver/GL/glx/g_disptab_EXT.c diff -u xc/programs/Xserver/GL/glx/g_disptab_EXT.c:1.2 xc/programs/Xserver/GL/glx/g_disptab_EXT.c:1.3 --- xc/programs/Xserver/GL/glx/g_disptab_EXT.c:1.2 Mon Jun 14 03:31:22 1999 +++ xc/programs/Xserver/GL/glx/g_disptab_EXT.c Wed Mar 21 11:29:35 2001 @@ -1,31 +1,42 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab_EXT.c,v 1.2 1999/06/14 07:31:22 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab_EXT.c,v 1.3 2001/03/21 16:29:35 dawes Exp $ */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. +** http://oss.sgi.com/projects/FreeB ** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: This software was created using the +** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has +** not been independently verified as being compliant with the OpenGL(R) +** version 1.2.1 Specification. */ #include "glxserver.h" #include "glxext.h" #include "g_disptab_EXT.h" __GLXdispatchRenderProcPtr __glXRenderTable_EXT[] = { - __glXDisp_PolygonOffset, - __glXDisp_TexSubImage1D, - __glXDisp_TexSubImage2D, + __glXDisp_ColorTable, + __glXDisp_ColorTableParameterfv, + __glXDisp_ColorTableParameteriv, + __glXDisp_CopyColorTable, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, @@ -41,26 +52,244 @@ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, - __glXDisp_DrawArrays, - __glXDisp_BindTexture, - __glXDisp_PrioritizeTextures, - __glXDisp_CopyTexImage1D, - __glXDisp_CopyTexImage2D, - __glXDisp_CopyTexSubImage1D, - __glXDisp_CopyTexSubImage2D, -}; -__GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[] = { - __glXDisp_AreTexturesResident, - __glXDisp_DeleteTextures, - __glXDisp_GenTextures, - __glXDisp_IsTexture, -}; - - -__GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[] = { - __glXDispSwap_PolygonOffset, - __glXDispSwap_TexSubImage1D, - __glXDispSwap_TexSubImage2D, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, @@ -76,18 +305,3891 @@ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, - __glXDispSwap_DrawArrays, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXDisp_BlendColor, + __glXDisp_BlendEquation, + __glXNoSuchRenderOpcode, + __glXDisp_TexSubImage1D, + __glXDisp_TexSubImage2D, + __glXDisp_ConvolutionFilter1D, + __glXDisp_ConvolutionFilter2D, + __glXDisp_ConvolutionParameterf, + __glXDisp_ConvolutionParameterfv, + __glXDisp_ConvolutionParameteri, + __glXDisp_ConvolutionParameteriv, + __glXDisp_CopyConvolutionFilter1D, + __glXDisp_CopyConvolutionFilter2D, + __glXDisp_SeparableFilter2D, + __glXDisp_Histogram, + __glXDisp_Minmax, + __glXDisp_ResetHistogram, + __glXDisp_ResetMinmax, + __glXDisp_TexImage3D, + __glXDisp_TexSubImage3D, + __glXDisp_DrawArraysEXT, + __glXDisp_BindTexture, + __glXDisp_PrioritizeTextures, + __glXDisp_CopyTexImage1D, + __glXDisp_CopyTexImage2D, + __glXDisp_CopyTexSubImage1D, + __glXDisp_CopyTexSubImage2D, + __glXDisp_CopyTexSubImage3D, +}; +__GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[] = { + __glXDisp_AreTexturesResidentEXT, + __glXDisp_DeleteTexturesEXT, + __glXDisp_GenTexturesEXT, + __glXDisp_IsTextureEXT, +}; + + +__GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[] = { + __glXDispSwap_ColorTable, + __glXDispSwap_ColorTableParameterfv, + __glXDispSwap_ColorTableParameteriv, + __glXDispSwap_CopyColorTable, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXDispSwap_BlendColor, + __glXDispSwap_BlendEquation, + __glXNoSuchRenderOpcode, + __glXDispSwap_TexSubImage1D, + __glXDispSwap_TexSubImage2D, + __glXDispSwap_ConvolutionFilter1D, + __glXDispSwap_ConvolutionFilter2D, + __glXDispSwap_ConvolutionParameterf, + __glXDispSwap_ConvolutionParameterfv, + __glXDispSwap_ConvolutionParameteri, + __glXDispSwap_ConvolutionParameteriv, + __glXDispSwap_CopyConvolutionFilter1D, + __glXDispSwap_CopyConvolutionFilter2D, + __glXDispSwap_SeparableFilter2D, + __glXDispSwap_Histogram, + __glXDispSwap_Minmax, + __glXDispSwap_ResetHistogram, + __glXDispSwap_ResetMinmax, + __glXDispSwap_TexImage3D, + __glXDispSwap_TexSubImage3D, + __glXDispSwap_DrawArraysEXT, __glXDispSwap_BindTexture, __glXDispSwap_PrioritizeTextures, __glXDispSwap_CopyTexImage1D, __glXDispSwap_CopyTexImage2D, __glXDispSwap_CopyTexSubImage1D, __glXDispSwap_CopyTexSubImage2D, + __glXDispSwap_CopyTexSubImage3D, }; __GLXdispatchVendorPrivProcPtr __glXSwapVendorPrivTable_EXT[] = { - __glXDispSwap_AreTexturesResident, - __glXDispSwap_DeleteTextures, - __glXDispSwap_GenTextures, - __glXDispSwap_IsTexture, + __glXDispSwap_AreTexturesResidentEXT, + __glXDispSwap_DeleteTexturesEXT, + __glXDispSwap_GenTexturesEXT, + __glXDispSwap_IsTextureEXT, }; Index: xc/programs/Xserver/GL/glx/g_disptab_EXT.h diff -u xc/programs/Xserver/GL/glx/g_disptab_EXT.h:1.2 xc/programs/Xserver/GL/glx/g_disptab_EXT.h:1.3 --- xc/programs/Xserver/GL/glx/g_disptab_EXT.h:1.2 Mon Jun 14 03:31:23 1999 +++ xc/programs/Xserver/GL/glx/g_disptab_EXT.h Wed Mar 21 11:29:35 2001 @@ -1,64 +1,116 @@ +/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab_EXT.h,v 1.3 2001/03/21 16:29:35 dawes Exp $ */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ #ifndef _GLX_g_disptab_EXT_h_ #define _GLX_g_disptab_EXT_h_ -/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab_EXT.h,v 1.2 1999/06/14 07:31:23 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. +** http://oss.sgi.com/projects/FreeB ** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: This software was created using the +** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has +** not been independently verified as being compliant with the OpenGL(R) +** version 1.2.1 Specification. */ -extern int __glXDisp_AreTexturesResident(__GLXclientState*, GLbyte*); -extern int __glXDisp_DeleteTextures(__GLXclientState*, GLbyte*); -extern int __glXDisp_GenTextures(__GLXclientState*, GLbyte*); -extern int __glXDisp_IsTexture(__GLXclientState*, GLbyte*); +extern int __glXDisp_AreTexturesResidentEXT(__GLXclientState*, GLbyte*); +extern int __glXDisp_DeleteTexturesEXT(__GLXclientState*, GLbyte*); +extern int __glXDisp_GenTexturesEXT(__GLXclientState*, GLbyte*); +extern int __glXDisp_IsTextureEXT(__GLXclientState*, GLbyte*); -extern void __glXDisp_PolygonOffset(GLbyte*); +extern void __glXDisp_ColorTable(GLbyte*); +extern void __glXDisp_ColorTableParameterfv(GLbyte*); +extern void __glXDisp_ColorTableParameteriv(GLbyte*); +extern void __glXDisp_CopyColorTable(GLbyte*); +extern void __glXDisp_BlendColor(GLbyte*); +extern void __glXDisp_BlendEquation(GLbyte*); extern void __glXDisp_TexSubImage1D(GLbyte*); extern void __glXDisp_TexSubImage2D(GLbyte*); -extern void __glXDisp_DrawArrays(GLbyte*); +extern void __glXDisp_ConvolutionFilter1D(GLbyte*); +extern void __glXDisp_ConvolutionFilter2D(GLbyte*); +extern void __glXDisp_ConvolutionParameterf(GLbyte*); +extern void __glXDisp_ConvolutionParameterfv(GLbyte*); +extern void __glXDisp_ConvolutionParameteri(GLbyte*); +extern void __glXDisp_ConvolutionParameteriv(GLbyte*); +extern void __glXDisp_CopyConvolutionFilter1D(GLbyte*); +extern void __glXDisp_CopyConvolutionFilter2D(GLbyte*); +extern void __glXDisp_SeparableFilter2D(GLbyte*); +extern void __glXDisp_Histogram(GLbyte*); +extern void __glXDisp_Minmax(GLbyte*); +extern void __glXDisp_ResetHistogram(GLbyte*); +extern void __glXDisp_ResetMinmax(GLbyte*); +extern void __glXDisp_TexImage3D(GLbyte*); +extern void __glXDisp_TexSubImage3D(GLbyte*); +extern void __glXDisp_DrawArraysEXT(GLbyte*); extern void __glXDisp_BindTexture(GLbyte*); extern void __glXDisp_PrioritizeTextures(GLbyte*); extern void __glXDisp_CopyTexImage1D(GLbyte*); extern void __glXDisp_CopyTexImage2D(GLbyte*); extern void __glXDisp_CopyTexSubImage1D(GLbyte*); extern void __glXDisp_CopyTexSubImage2D(GLbyte*); +extern void __glXDisp_CopyTexSubImage3D(GLbyte*); -extern int __glXDispSwap_AreTexturesResident(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_DeleteTextures(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GenTextures(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_IsTexture(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_DeleteTexturesEXT(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_GenTexturesEXT(__GLXclientState*, GLbyte*); +extern int __glXDispSwap_IsTextureEXT(__GLXclientState*, GLbyte*); -extern void __glXDispSwap_PolygonOffset(GLbyte*); +extern void __glXDispSwap_ColorTable(GLbyte*); +extern void __glXDispSwap_ColorTableParameterfv(GLbyte*); +extern void __glXDispSwap_ColorTableParameteriv(GLbyte*); +extern void __glXDispSwap_CopyColorTable(GLbyte*); +extern void __glXDispSwap_BlendColor(GLbyte*); +extern void __glXDispSwap_BlendEquation(GLbyte*); extern void __glXDispSwap_TexSubImage1D(GLbyte*); extern void __glXDispSwap_TexSubImage2D(GLbyte*); -extern void __glXDispSwap_DrawArrays(GLbyte*); +extern void __glXDispSwap_ConvolutionFilter1D(GLbyte*); +extern void __glXDispSwap_ConvolutionFilter2D(GLbyte*); +extern void __glXDispSwap_ConvolutionParameterf(GLbyte*); +extern void __glXDispSwap_ConvolutionParameterfv(GLbyte*); +extern void __glXDispSwap_ConvolutionParameteri(GLbyte*); +extern void __glXDispSwap_ConvolutionParameteriv(GLbyte*); +extern void __glXDispSwap_CopyConvolutionFilter1D(GLbyte*); +extern void __glXDispSwap_CopyConvolutionFilter2D(GLbyte*); +extern void __glXDispSwap_SeparableFilter2D(GLbyte*); +extern void __glXDispSwap_Histogram(GLbyte*); +extern void __glXDispSwap_Minmax(GLbyte*); +extern void __glXDispSwap_ResetHistogram(GLbyte*); +extern void __glXDispSwap_ResetMinmax(GLbyte*); +extern void __glXDispSwap_TexImage3D(GLbyte*); +extern void __glXDispSwap_TexSubImage3D(GLbyte*); +extern void __glXDispSwap_DrawArraysEXT(GLbyte*); extern void __glXDispSwap_BindTexture(GLbyte*); extern void __glXDispSwap_PrioritizeTextures(GLbyte*); extern void __glXDispSwap_CopyTexImage1D(GLbyte*); extern void __glXDispSwap_CopyTexImage2D(GLbyte*); extern void __glXDispSwap_CopyTexSubImage1D(GLbyte*); extern void __glXDispSwap_CopyTexSubImage2D(GLbyte*); +extern void __glXDispSwap_CopyTexSubImage3D(GLbyte*); -#define __GLX_MIN_RENDER_OPCODE_EXT 4098 -#define __GLX_MAX_RENDER_OPCODE_EXT 4122 +#define __GLX_MIN_RENDER_OPCODE_EXT 2053 +#define __GLX_MAX_RENDER_OPCODE_EXT 4123 #define __GLX_MIN_VENDPRIV_OPCODE_EXT 11 #define __GLX_MAX_VENDPRIV_OPCODE_EXT 14 #define __GLX_VENDPRIV_TABLE_SIZE_EXT 4 -#define __GLX_RENDER_TABLE_SIZE_EXT 25 +#define __GLX_RENDER_TABLE_SIZE_EXT 2071 extern __GLXdispatchRenderProcPtr __glXRenderTable_EXT[__GLX_RENDER_TABLE_SIZE_EXT]; extern __GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[__GLX_VENDPRIV_TABLE_SIZE_EXT]; extern __GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_RENDER_TABLE_SIZE_EXT]; Index: xc/programs/Xserver/GL/glx/g_render.c diff -u xc/programs/Xserver/GL/glx/g_render.c:1.3 xc/programs/Xserver/GL/glx/g_render.c:1.4 --- xc/programs/Xserver/GL/glx/g_render.c:1.3 Mon Jun 14 03:31:23 1999 +++ xc/programs/Xserver/GL/glx/g_render.c Wed Mar 21 11:29:35 2001 @@ -1,23 +1,32 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/g_render.c,v 1.3 1999/06/14 07:31:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/g_render.c,v 1.4 2001/03/21 16:29:35 dawes Exp $ */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ -/* by SGI when creating the GLX sample implementation */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. +** http://oss.sgi.com/projects/FreeB ** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: This software was created using the +** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has +** not been independently verified as being compliant with the OpenGL(R) +** version 1.2.1 Specification. */ #define NEED_REPLIES @@ -1736,6 +1745,333 @@ { glIndexubv( (GLubyte *)(pc + 0) + ); +} + +void __glXDisp_BlendColor(GLbyte *pc) +{ + glBlendColor( + *(GLclampf *)(pc + 0), + *(GLclampf *)(pc + 4), + *(GLclampf *)(pc + 8), + *(GLclampf *)(pc + 12) + ); +} + +void __glXDisp_BlendEquation(GLbyte *pc) +{ + glBlendEquation( + *(GLenum *)(pc + 0) + ); +} + +void __glXDisp_ColorTableParameterfv(GLbyte *pc) +{ + glColorTableParameterfv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLfloat *)(pc + 8) + ); +} + +void __glXDisp_ColorTableParameteriv(GLbyte *pc) +{ + glColorTableParameteriv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLint *)(pc + 8) + ); +} + +void __glXDisp_CopyColorTable(GLbyte *pc) +{ + glCopyColorTable( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16) + ); +} + +void __glXDisp_CopyColorSubTable(GLbyte *pc) +{ + glCopyColorSubTable( + *(GLenum *)(pc + 0), + *(GLsizei *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16) + ); +} + +void __glXDisp_ConvolutionParameterf(GLbyte *pc) +{ + glConvolutionParameterf( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ); +} + +void __glXDisp_ConvolutionParameterfv(GLbyte *pc) +{ + glConvolutionParameterfv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLfloat *)(pc + 8) + ); +} + +void __glXDisp_ConvolutionParameteri(GLbyte *pc) +{ + glConvolutionParameteri( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ); +} + +void __glXDisp_ConvolutionParameteriv(GLbyte *pc) +{ + glConvolutionParameteriv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLint *)(pc + 8) + ); +} + +void __glXDisp_CopyConvolutionFilter1D(GLbyte *pc) +{ + glCopyConvolutionFilter1D( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16) + ); +} + +void __glXDisp_CopyConvolutionFilter2D(GLbyte *pc) +{ + glCopyConvolutionFilter2D( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16), + *(GLsizei *)(pc + 20) + ); +} + +void __glXDisp_Histogram(GLbyte *pc) +{ + glHistogram( + *(GLenum *)(pc + 0), + *(GLsizei *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLboolean *)(pc + 12) + ); +} + +void __glXDisp_Minmax(GLbyte *pc) +{ + glMinmax( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLboolean *)(pc + 8) + ); +} + +void __glXDisp_ResetHistogram(GLbyte *pc) +{ + glResetHistogram( + *(GLenum *)(pc + 0) + ); +} + +void __glXDisp_ResetMinmax(GLbyte *pc) +{ + glResetMinmax( + *(GLenum *)(pc + 0) + ); +} + +void __glXDisp_CopyTexSubImage3D(GLbyte *pc) +{ + glCopyTexSubImage3D( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLint *)(pc + 20), + *(GLint *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLsizei *)(pc + 32) + ); +} + +void __glXDisp_ActiveTextureARB(GLbyte *pc) +{ + glActiveTextureARB( + *(GLenum *)(pc + 0) + ); +} + +void __glXDisp_MultiTexCoord1dvARB(GLbyte *pc) +{ + +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + __GLX_MEM_COPY(pc-4, pc, 12); + pc -= 4; + } +#endif + glMultiTexCoord1dvARB( + *(GLenum *)(pc + 8), + (GLdouble *)(pc + 0) + ); +} + +void __glXDisp_MultiTexCoord1fvARB(GLbyte *pc) +{ + glMultiTexCoord1fvARB( + *(GLenum *)(pc + 0), + (GLfloat *)(pc + 4) + ); +} + +void __glXDisp_MultiTexCoord1ivARB(GLbyte *pc) +{ + glMultiTexCoord1ivARB( + *(GLenum *)(pc + 0), + (GLint *)(pc + 4) + ); +} + +void __glXDisp_MultiTexCoord1svARB(GLbyte *pc) +{ + glMultiTexCoord1svARB( + *(GLenum *)(pc + 0), + (GLshort *)(pc + 4) + ); +} + +void __glXDisp_MultiTexCoord2dvARB(GLbyte *pc) +{ + +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + __GLX_MEM_COPY(pc-4, pc, 20); + pc -= 4; + } +#endif + glMultiTexCoord2dvARB( + *(GLenum *)(pc + 16), + (GLdouble *)(pc + 0) + ); +} + +void __glXDisp_MultiTexCoord2fvARB(GLbyte *pc) +{ + glMultiTexCoord2fvARB( + *(GLenum *)(pc + 0), + (GLfloat *)(pc + 4) + ); +} + +void __glXDisp_MultiTexCoord2ivARB(GLbyte *pc) +{ + glMultiTexCoord2ivARB( + *(GLenum *)(pc + 0), + (GLint *)(pc + 4) + ); +} + +void __glXDisp_MultiTexCoord2svARB(GLbyte *pc) +{ + glMultiTexCoord2svARB( + *(GLenum *)(pc + 0), + (GLshort *)(pc + 4) + ); +} + +void __glXDisp_MultiTexCoord3dvARB(GLbyte *pc) +{ + +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + __GLX_MEM_COPY(pc-4, pc, 28); + pc -= 4; + } +#endif + glMultiTexCoord3dvARB( + *(GLenum *)(pc + 24), + (GLdouble *)(pc + 0) + ); +} + +void __glXDisp_MultiTexCoord3fvARB(GLbyte *pc) +{ + glMultiTexCoord3fvARB( + *(GLenum *)(pc + 0), + (GLfloat *)(pc + 4) + ); +} + +void __glXDisp_MultiTexCoord3ivARB(GLbyte *pc) +{ + glMultiTexCoord3ivARB( + *(GLenum *)(pc + 0), + (GLint *)(pc + 4) + ); +} + +void __glXDisp_MultiTexCoord3svARB(GLbyte *pc) +{ + glMultiTexCoord3svARB( + *(GLenum *)(pc + 0), + (GLshort *)(pc + 4) + ); +} + +void __glXDisp_MultiTexCoord4dvARB(GLbyte *pc) +{ + +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + __GLX_MEM_COPY(pc-4, pc, 36); + pc -= 4; + } +#endif + glMultiTexCoord4dvARB( + *(GLenum *)(pc + 32), + (GLdouble *)(pc + 0) + ); +} + +void __glXDisp_MultiTexCoord4fvARB(GLbyte *pc) +{ + glMultiTexCoord4fvARB( + *(GLenum *)(pc + 0), + (GLfloat *)(pc + 4) + ); +} + +void __glXDisp_MultiTexCoord4ivARB(GLbyte *pc) +{ + glMultiTexCoord4ivARB( + *(GLenum *)(pc + 0), + (GLint *)(pc + 4) + ); +} + +void __glXDisp_MultiTexCoord4svARB(GLbyte *pc) +{ + glMultiTexCoord4svARB( + *(GLenum *)(pc + 0), + (GLshort *)(pc + 4) ); } Index: xc/programs/Xserver/GL/glx/g_renderswap.c diff -u xc/programs/Xserver/GL/glx/g_renderswap.c:1.3 xc/programs/Xserver/GL/glx/g_renderswap.c:1.4 --- xc/programs/Xserver/GL/glx/g_renderswap.c:1.3 Mon Jun 14 03:31:23 1999 +++ xc/programs/Xserver/GL/glx/g_renderswap.c Wed Mar 21 11:29:35 2001 @@ -1,23 +1,32 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/g_renderswap.c,v 1.3 1999/06/14 07:31:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/g_renderswap.c,v 1.4 2001/03/21 16:29:35 dawes Exp $ */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ -/* by SGI when creating the GLX sample implementation */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. +** http://oss.sgi.com/projects/FreeB ** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: This software was created using the +** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has +** not been independently verified as being compliant with the OpenGL(R) +** version 1.2.1 Specification. */ #define NEED_REPLIES @@ -2712,6 +2721,548 @@ glIndexubv( (GLubyte *)(pc + 0) + ); +} + +void __glXDispSwap_BlendColor(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_FLOAT(pc + 0); + __GLX_SWAP_FLOAT(pc + 4); + __GLX_SWAP_FLOAT(pc + 8); + __GLX_SWAP_FLOAT(pc + 12); + + glBlendColor( + *(GLclampf *)(pc + 0), + *(GLclampf *)(pc + 4), + *(GLclampf *)(pc + 8), + *(GLclampf *)(pc + 12) + ); +} + +void __glXDispSwap_BlendEquation(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + + glBlendEquation( + *(GLenum *)(pc + 0) + ); +} + +void __glXDispSwap_ColorTableParameterfv(GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 4); + pname = *(GLenum *)(pc + 4); + compsize = __glColorTableParameterfv_size(pname); + if (compsize < 0) compsize = 0; + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize); + + glColorTableParameterfv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLfloat *)(pc + 8) + ); +} + +void __glXDispSwap_ColorTableParameteriv(GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 4); + pname = *(GLenum *)(pc + 4); + compsize = __glColorTableParameteriv_size(pname); + if (compsize < 0) compsize = 0; + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT_ARRAY(pc + 8, compsize); + + glColorTableParameteriv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLint *)(pc + 8) + ); +} + +void __glXDispSwap_CopyColorTable(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + 8); + __GLX_SWAP_INT(pc + 12); + __GLX_SWAP_INT(pc + 16); + + glCopyColorTable( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16) + ); +} + +void __glXDispSwap_CopyColorSubTable(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + 8); + __GLX_SWAP_INT(pc + 12); + __GLX_SWAP_INT(pc + 16); + + glCopyColorSubTable( + *(GLenum *)(pc + 0), + *(GLsizei *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16) + ); +} + +void __glXDispSwap_ConvolutionParameterf(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_FLOAT(pc + 8); + + glConvolutionParameterf( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ); +} + +void __glXDispSwap_ConvolutionParameterfv(GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 4); + pname = *(GLenum *)(pc + 4); + compsize = __glConvolutionParameterfv_size(pname); + if (compsize < 0) compsize = 0; + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize); + + glConvolutionParameterfv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLfloat *)(pc + 8) + ); +} + +void __glXDispSwap_ConvolutionParameteri(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + 8); + + glConvolutionParameteri( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ); +} + +void __glXDispSwap_ConvolutionParameteriv(GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 4); + pname = *(GLenum *)(pc + 4); + compsize = __glConvolutionParameteriv_size(pname); + if (compsize < 0) compsize = 0; + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT_ARRAY(pc + 8, compsize); + + glConvolutionParameteriv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLint *)(pc + 8) + ); +} + +void __glXDispSwap_CopyConvolutionFilter1D(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + 8); + __GLX_SWAP_INT(pc + 12); + __GLX_SWAP_INT(pc + 16); + + glCopyConvolutionFilter1D( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16) + ); +} + +void __glXDispSwap_CopyConvolutionFilter2D(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + 8); + __GLX_SWAP_INT(pc + 12); + __GLX_SWAP_INT(pc + 16); + __GLX_SWAP_INT(pc + 20); + + glCopyConvolutionFilter2D( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16), + *(GLsizei *)(pc + 20) + ); +} + +void __glXDispSwap_Histogram(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + 8); + + glHistogram( + *(GLenum *)(pc + 0), + *(GLsizei *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLboolean *)(pc + 12) + ); +} + +void __glXDispSwap_Minmax(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 4); + + glMinmax( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLboolean *)(pc + 8) + ); +} + +void __glXDispSwap_ResetHistogram(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + + glResetHistogram( + *(GLenum *)(pc + 0) + ); +} + +void __glXDispSwap_ResetMinmax(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + + glResetMinmax( + *(GLenum *)(pc + 0) + ); +} + +void __glXDispSwap_CopyTexSubImage3D(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + 8); + __GLX_SWAP_INT(pc + 12); + __GLX_SWAP_INT(pc + 16); + __GLX_SWAP_INT(pc + 20); + __GLX_SWAP_INT(pc + 24); + __GLX_SWAP_INT(pc + 28); + __GLX_SWAP_INT(pc + 32); + + glCopyTexSubImage3D( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLint *)(pc + 20), + *(GLint *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLsizei *)(pc + 32) + ); +} + +void __glXDispSwap_ActiveTextureARB(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + + glActiveTextureARB( + *(GLenum *)(pc + 0) + ); +} + +void __glXDispSwap_MultiTexCoord1dvARB(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + __GLX_MEM_COPY(pc-4, pc, 12); + pc -= 4; + } +#endif + __GLX_SWAP_INT(pc + 8); + __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 1); + + glMultiTexCoord1dvARB( + *(GLenum *)(pc + 8), + (GLdouble *)(pc + 0) + ); +} + +void __glXDispSwap_MultiTexCoord1fvARB(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_FLOAT_ARRAY(pc + 4, 1); + + glMultiTexCoord1fvARB( + *(GLenum *)(pc + 0), + (GLfloat *)(pc + 4) + ); +} + +void __glXDispSwap_MultiTexCoord1ivARB(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT_ARRAY(pc + 4, 1); + + glMultiTexCoord1ivARB( + *(GLenum *)(pc + 0), + (GLint *)(pc + 4) + ); +} + +void __glXDispSwap_MultiTexCoord1svARB(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_SHORT_ARRAY(pc + 4, 1); + + glMultiTexCoord1svARB( + *(GLenum *)(pc + 0), + (GLshort *)(pc + 4) + ); +} + +void __glXDispSwap_MultiTexCoord2dvARB(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + __GLX_MEM_COPY(pc-4, pc, 20); + pc -= 4; + } +#endif + __GLX_SWAP_INT(pc + 16); + __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2); + + glMultiTexCoord2dvARB( + *(GLenum *)(pc + 16), + (GLdouble *)(pc + 0) + ); +} + +void __glXDispSwap_MultiTexCoord2fvARB(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_FLOAT_ARRAY(pc + 4, 2); + + glMultiTexCoord2fvARB( + *(GLenum *)(pc + 0), + (GLfloat *)(pc + 4) + ); +} + +void __glXDispSwap_MultiTexCoord2ivARB(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT_ARRAY(pc + 4, 2); + + glMultiTexCoord2ivARB( + *(GLenum *)(pc + 0), + (GLint *)(pc + 4) + ); +} + +void __glXDispSwap_MultiTexCoord2svARB(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_SHORT_ARRAY(pc + 4, 2); + + glMultiTexCoord2svARB( + *(GLenum *)(pc + 0), + (GLshort *)(pc + 4) + ); +} + +void __glXDispSwap_MultiTexCoord3dvARB(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + __GLX_MEM_COPY(pc-4, pc, 28); + pc -= 4; + } +#endif + __GLX_SWAP_INT(pc + 24); + __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3); + + glMultiTexCoord3dvARB( + *(GLenum *)(pc + 24), + (GLdouble *)(pc + 0) + ); +} + +void __glXDispSwap_MultiTexCoord3fvARB(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_FLOAT_ARRAY(pc + 4, 3); + + glMultiTexCoord3fvARB( + *(GLenum *)(pc + 0), + (GLfloat *)(pc + 4) + ); +} + +void __glXDispSwap_MultiTexCoord3ivARB(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT_ARRAY(pc + 4, 3); + + glMultiTexCoord3ivARB( + *(GLenum *)(pc + 0), + (GLint *)(pc + 4) + ); +} + +void __glXDispSwap_MultiTexCoord3svARB(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_SHORT_ARRAY(pc + 4, 3); + + glMultiTexCoord3svARB( + *(GLenum *)(pc + 0), + (GLshort *)(pc + 4) + ); +} + +void __glXDispSwap_MultiTexCoord4dvARB(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + __GLX_MEM_COPY(pc-4, pc, 36); + pc -= 4; + } +#endif + __GLX_SWAP_INT(pc + 32); + __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4); + + glMultiTexCoord4dvARB( + *(GLenum *)(pc + 32), + (GLdouble *)(pc + 0) + ); +} + +void __glXDispSwap_MultiTexCoord4fvARB(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_FLOAT_ARRAY(pc + 4, 4); + + glMultiTexCoord4fvARB( + *(GLenum *)(pc + 0), + (GLfloat *)(pc + 4) + ); +} + +void __glXDispSwap_MultiTexCoord4ivARB(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT_ARRAY(pc + 4, 4); + + glMultiTexCoord4ivARB( + *(GLenum *)(pc + 0), + (GLint *)(pc + 4) + ); +} + +void __glXDispSwap_MultiTexCoord4svARB(GLbyte *pc) +{ + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_SHORT_ARRAY(pc + 4, 4); + + glMultiTexCoord4svARB( + *(GLenum *)(pc + 0), + (GLshort *)(pc + 4) ); } Index: xc/programs/Xserver/GL/glx/g_single.c diff -u xc/programs/Xserver/GL/glx/g_single.c:1.3 xc/programs/Xserver/GL/glx/g_single.c:1.4 --- xc/programs/Xserver/GL/glx/g_single.c:1.3 Mon Jun 14 03:31:23 1999 +++ xc/programs/Xserver/GL/glx/g_single.c Wed Mar 21 11:29:35 2001 @@ -1,23 +1,32 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/g_single.c,v 1.3 1999/06/14 07:31:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/g_single.c,v 1.4 2001/03/21 16:29:35 dawes Exp $ */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ -/* by SGI when creating the GLX sample implementation */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. +** http://oss.sgi.com/projects/FreeB ** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: This software was created using the +** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has +** not been independently verified as being compliant with the OpenGL(R) +** version 1.2.1 Specification. */ #define NEED_REPLIES @@ -431,8 +440,8 @@ int __glXDisp_GetMapdv(__GLXclientState *cl, GLbyte *pc) { - GLenum query; GLenum target; + GLenum query; GLint compsize; __GLXcontext *cx; ClientPtr client = cl->client; @@ -445,8 +454,8 @@ return error; } pc += __GLX_SINGLE_HDR_SIZE; - query = *(GLenum *)(pc + 4); target = *(GLenum *)(pc + 0); + query = *(GLenum *)(pc + 4); compsize = __glGetMapdv_size(target,query); if (compsize < 0) compsize = 0; @@ -477,8 +486,8 @@ int __glXDisp_GetMapfv(__GLXclientState *cl, GLbyte *pc) { - GLenum query; GLenum target; + GLenum query; GLint compsize; __GLXcontext *cx; ClientPtr client = cl->client; @@ -491,8 +500,8 @@ return error; } pc += __GLX_SINGLE_HDR_SIZE; - query = *(GLenum *)(pc + 4); target = *(GLenum *)(pc + 0); + query = *(GLenum *)(pc + 4); compsize = __glGetMapfv_size(target,query); if (compsize < 0) compsize = 0; @@ -523,8 +532,8 @@ int __glXDisp_GetMapiv(__GLXclientState *cl, GLbyte *pc) { - GLenum query; GLenum target; + GLenum query; GLint compsize; __GLXcontext *cx; ClientPtr client = cl->client; @@ -537,8 +546,8 @@ return error; } pc += __GLX_SINGLE_HDR_SIZE; - query = *(GLenum *)(pc + 4); target = *(GLenum *)(pc + 0); + query = *(GLenum *)(pc + 4); compsize = __glGetMapiv_size(target,query); if (compsize < 0) compsize = 0; @@ -1238,11 +1247,11 @@ GLboolean answerBuffer[200]; char *answer; - cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } - pc += __GLX_VENDPRIV_HDR_SIZE; + pc += __GLX_SINGLE_HDR_SIZE; n = *(GLsizei *)(pc + 0); __GLX_GET_ANSWER_BUFFER(answer,cl,n,1); @@ -1266,11 +1275,11 @@ ClientPtr client = cl->client; int error; - cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } - pc += __GLX_VENDPRIV_HDR_SIZE; + pc += __GLX_SINGLE_HDR_SIZE; n = *(GLsizei *)(pc + 0); glDeleteTextures( @@ -1289,11 +1298,11 @@ GLuint answerBuffer[200]; char *answer; - cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } - pc += __GLX_VENDPRIV_HDR_SIZE; + pc += __GLX_SINGLE_HDR_SIZE; n = *(GLsizei *)(pc + 0); __GLX_GET_ANSWER_BUFFER(answer,cl,n*4,4); @@ -1314,14 +1323,468 @@ ClientPtr client = cl->client; int error; + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + + retval = + glIsTexture( + *(GLuint *)(pc + 0) + ); + __GLX_PUT_RETVAL(retval); + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + return Success; +} + +int __glXDisp_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLfloat answerBuffer[200]; + char *answer; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + pname = *(GLenum *)(pc + 4); + compsize = __glGetColorTableParameterfv_size(pname); + if (compsize < 0) compsize = 0; + + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); + __glXClearErrorOccured(); + glGetColorTableParameterfv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLfloat *) answer + ); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_PUT_SIZE(0); + __GLX_SEND_HEADER(); + } else if (compsize == 1) { + __GLX_BEGIN_REPLY(0); + __GLX_PUT_SIZE(1); + __GLX_PUT_FLOAT(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize*4); + __GLX_PUT_SIZE(compsize); + __GLX_SEND_HEADER(); + __GLX_SEND_FLOAT_ARRAY(compsize); + } + return Success; +} + +int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLint answerBuffer[200]; + char *answer; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + pname = *(GLenum *)(pc + 4); + compsize = __glGetColorTableParameteriv_size(pname); + if (compsize < 0) compsize = 0; + + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); + __glXClearErrorOccured(); + glGetColorTableParameteriv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLint *) answer + ); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_PUT_SIZE(0); + __GLX_SEND_HEADER(); + } else if (compsize == 1) { + __GLX_BEGIN_REPLY(0); + __GLX_PUT_SIZE(1); + __GLX_PUT_INT(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize*4); + __GLX_PUT_SIZE(compsize); + __GLX_SEND_HEADER(); + __GLX_SEND_INT_ARRAY(compsize); + } + return Success; +} + +int __glXDisp_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLfloat answerBuffer[200]; + char *answer; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + pname = *(GLenum *)(pc + 4); + compsize = __glGetConvolutionParameterfv_size(pname); + if (compsize < 0) compsize = 0; + + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); + __glXClearErrorOccured(); + glGetConvolutionParameterfv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLfloat *) answer + ); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_PUT_SIZE(0); + __GLX_SEND_HEADER(); + } else if (compsize == 1) { + __GLX_BEGIN_REPLY(0); + __GLX_PUT_SIZE(1); + __GLX_PUT_FLOAT(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize*4); + __GLX_PUT_SIZE(compsize); + __GLX_SEND_HEADER(); + __GLX_SEND_FLOAT_ARRAY(compsize); + } + return Success; +} + +int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLint answerBuffer[200]; + char *answer; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + pname = *(GLenum *)(pc + 4); + compsize = __glGetConvolutionParameteriv_size(pname); + if (compsize < 0) compsize = 0; + + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); + __glXClearErrorOccured(); + glGetConvolutionParameteriv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLint *) answer + ); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_PUT_SIZE(0); + __GLX_SEND_HEADER(); + } else if (compsize == 1) { + __GLX_BEGIN_REPLY(0); + __GLX_PUT_SIZE(1); + __GLX_PUT_INT(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize*4); + __GLX_PUT_SIZE(compsize); + __GLX_SEND_HEADER(); + __GLX_SEND_INT_ARRAY(compsize); + } + return Success; +} + +int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLfloat answerBuffer[200]; + char *answer; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + pname = *(GLenum *)(pc + 4); + compsize = __glGetHistogramParameterfv_size(pname); + if (compsize < 0) compsize = 0; + + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); + __glXClearErrorOccured(); + glGetHistogramParameterfv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLfloat *) answer + ); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_PUT_SIZE(0); + __GLX_SEND_HEADER(); + } else if (compsize == 1) { + __GLX_BEGIN_REPLY(0); + __GLX_PUT_SIZE(1); + __GLX_PUT_FLOAT(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize*4); + __GLX_PUT_SIZE(compsize); + __GLX_SEND_HEADER(); + __GLX_SEND_FLOAT_ARRAY(compsize); + } + return Success; +} + +int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLint answerBuffer[200]; + char *answer; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + pname = *(GLenum *)(pc + 4); + compsize = __glGetHistogramParameteriv_size(pname); + if (compsize < 0) compsize = 0; + + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); + __glXClearErrorOccured(); + glGetHistogramParameteriv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLint *) answer + ); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_PUT_SIZE(0); + __GLX_SEND_HEADER(); + } else if (compsize == 1) { + __GLX_BEGIN_REPLY(0); + __GLX_PUT_SIZE(1); + __GLX_PUT_INT(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize*4); + __GLX_PUT_SIZE(compsize); + __GLX_SEND_HEADER(); + __GLX_SEND_INT_ARRAY(compsize); + } + return Success; +} + +int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLfloat answerBuffer[200]; + char *answer; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + pname = *(GLenum *)(pc + 4); + compsize = __glGetMinmaxParameterfv_size(pname); + if (compsize < 0) compsize = 0; + + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); + __glXClearErrorOccured(); + glGetMinmaxParameterfv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLfloat *) answer + ); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_PUT_SIZE(0); + __GLX_SEND_HEADER(); + } else if (compsize == 1) { + __GLX_BEGIN_REPLY(0); + __GLX_PUT_SIZE(1); + __GLX_PUT_FLOAT(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize*4); + __GLX_PUT_SIZE(compsize); + __GLX_SEND_HEADER(); + __GLX_SEND_FLOAT_ARRAY(compsize); + } + return Success; +} + +int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLint answerBuffer[200]; + char *answer; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + pname = *(GLenum *)(pc + 4); + compsize = __glGetMinmaxParameteriv_size(pname); + if (compsize < 0) compsize = 0; + + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); + __glXClearErrorOccured(); + glGetMinmaxParameteriv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLint *) answer + ); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_PUT_SIZE(0); + __GLX_SEND_HEADER(); + } else if (compsize == 1) { + __GLX_BEGIN_REPLY(0); + __GLX_PUT_SIZE(1); + __GLX_PUT_INT(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize*4); + __GLX_PUT_SIZE(compsize); + __GLX_SEND_HEADER(); + __GLX_SEND_INT_ARRAY(compsize); + } + return Success; +} + +int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) +{ + GLsizei n; + GLboolean retval; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLboolean answerBuffer[200]; + char *answer; + cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); if (!cx) { return error; } pc += __GLX_VENDPRIV_HDR_SIZE; + n = *(GLsizei *)(pc + 0); + __GLX_GET_ANSWER_BUFFER(answer,cl,n,1); retval = - glIsTexture( + glAreTexturesResidentEXT( + *(GLsizei *)(pc + 0), + (GLuint *)(pc + 4), + (GLboolean *) answer + ); + __GLX_PUT_RETVAL(retval); + __GLX_BEGIN_REPLY(n); + __GLX_SEND_HEADER(); + __GLX_SEND_BYTE_ARRAY(n); + return Success; +} + +int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc) +{ + GLsizei n; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + + cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_VENDPRIV_HDR_SIZE; + n = *(GLsizei *)(pc + 0); + + glDeleteTexturesEXT( + *(GLsizei *)(pc + 0), + (GLuint *)(pc + 4) + ); + return Success; +} + +int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) +{ + GLsizei n; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLuint answerBuffer[200]; + char *answer; + + cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_VENDPRIV_HDR_SIZE; + n = *(GLsizei *)(pc + 0); + + __GLX_GET_ANSWER_BUFFER(answer,cl,n*4,4); + glGenTexturesEXT( + *(GLsizei *)(pc + 0), + (GLuint *) answer + ); + __GLX_BEGIN_REPLY(n*4); + __GLX_SEND_HEADER(); + __GLX_SEND_INT_ARRAY(n); + return Success; +} + +int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) +{ + GLboolean retval; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + + cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_VENDPRIV_HDR_SIZE; + + retval = + glIsTextureEXT( *(GLuint *)(pc + 0) ); __GLX_PUT_RETVAL(retval); Index: xc/programs/Xserver/GL/glx/g_singleswap.c diff -u xc/programs/Xserver/GL/glx/g_singleswap.c:1.3 xc/programs/Xserver/GL/glx/g_singleswap.c:1.4 --- xc/programs/Xserver/GL/glx/g_singleswap.c:1.3 Mon Jun 14 03:31:24 1999 +++ xc/programs/Xserver/GL/glx/g_singleswap.c Wed Mar 21 11:29:35 2001 @@ -1,23 +1,32 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/g_singleswap.c,v 1.3 1999/06/14 07:31:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/g_singleswap.c,v 1.4 2001/03/21 16:29:35 dawes Exp $ */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ -/* by SGI when creating the GLX sample implementation */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. +** http://oss.sgi.com/projects/FreeB ** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: This software was created using the +** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has +** not been independently verified as being compliant with the OpenGL(R) +** version 1.2.1 Specification. */ #define NEED_REPLIES @@ -513,8 +522,8 @@ int __glXDispSwap_GetMapdv(__GLXclientState *cl, GLbyte *pc) { - GLenum query; GLenum target; + GLenum query; GLint compsize; __GLXcontext *cx; ClientPtr client = cl->client; @@ -529,10 +538,10 @@ return error; } pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); __GLX_SWAP_INT(pc + 0); - query = *(GLenum *)(pc + 4); + __GLX_SWAP_INT(pc + 4); target = *(GLenum *)(pc + 0); + query = *(GLenum *)(pc + 4); compsize = __glGetMapdv_size(target,query); if (compsize < 0) compsize = 0; @@ -569,8 +578,8 @@ int __glXDispSwap_GetMapfv(__GLXclientState *cl, GLbyte *pc) { - GLenum query; GLenum target; + GLenum query; GLint compsize; __GLXcontext *cx; ClientPtr client = cl->client; @@ -585,10 +594,10 @@ return error; } pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); __GLX_SWAP_INT(pc + 0); - query = *(GLenum *)(pc + 4); + __GLX_SWAP_INT(pc + 4); target = *(GLenum *)(pc + 0); + query = *(GLenum *)(pc + 4); compsize = __glGetMapfv_size(target,query); if (compsize < 0) compsize = 0; @@ -625,8 +634,8 @@ int __glXDispSwap_GetMapiv(__GLXclientState *cl, GLbyte *pc) { - GLenum query; GLenum target; + GLenum query; GLint compsize; __GLXcontext *cx; ClientPtr client = cl->client; @@ -641,10 +650,10 @@ return error; } pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); __GLX_SWAP_INT(pc + 0); - query = *(GLenum *)(pc + 4); + __GLX_SWAP_INT(pc + 4); target = *(GLenum *)(pc + 0); + query = *(GLenum *)(pc + 4); compsize = __glGetMapiv_size(target,query); if (compsize < 0) compsize = 0; @@ -1500,12 +1509,12 @@ char *answer; __GLX_DECLARE_SWAP_VARIABLES; - __GLX_SWAP_INT(&((xGLXVendorPrivateReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } - pc += __GLX_VENDPRIV_HDR_SIZE; + pc += __GLX_SINGLE_HDR_SIZE; __GLX_SWAP_INT(pc + 0); n = *(GLsizei *)(pc + 0); __GLX_SWAP_INT_ARRAY(pc + 4, n); @@ -1534,12 +1543,12 @@ int error; __GLX_DECLARE_SWAP_VARIABLES; - __GLX_SWAP_INT(&((xGLXVendorPrivateReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } - pc += __GLX_VENDPRIV_HDR_SIZE; + pc += __GLX_SINGLE_HDR_SIZE; __GLX_SWAP_INT(pc + 0); n = *(GLsizei *)(pc + 0); __GLX_SWAP_INT_ARRAY(pc + 4, n); @@ -1561,12 +1570,12 @@ char *answer; __GLX_DECLARE_SWAP_VARIABLES; - __GLX_SWAP_INT(&((xGLXVendorPrivateReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } - pc += __GLX_VENDPRIV_HDR_SIZE; + pc += __GLX_SINGLE_HDR_SIZE; __GLX_SWAP_INT(pc + 0); n = *(GLsizei *)(pc + 0); @@ -1591,16 +1600,570 @@ int error; __GLX_DECLARE_SWAP_VARIABLES; - __GLX_SWAP_INT(&((xGLXVendorPrivateReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } - pc += __GLX_VENDPRIV_HDR_SIZE; + pc += __GLX_SINGLE_HDR_SIZE; __GLX_SWAP_INT(pc + 0); retval = glIsTexture( + *(GLuint *)(pc + 0) + ); + __GLX_PUT_RETVAL(retval); + __GLX_SWAP_REPLY_RETVAL(); + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_HEADER(); + return Success; +} + +int __glXDispSwap_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLfloat answerBuffer[200]; + char *answer; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc + 4); + pname = *(GLenum *)(pc + 4); + compsize = __glGetColorTableParameterfv_size(pname); + if (compsize < 0) compsize = 0; + __GLX_SWAP_INT(pc + 0); + + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); + __glXClearErrorOccured(); + glGetColorTableParameterfv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLfloat *) answer + ); + __GLX_SWAP_FLOAT_ARRAY(answer, compsize); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(0); + __GLX_SEND_HEADER(); + } else if (compsize == 1) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(1); + __GLX_SWAP_REPLY_SIZE(); + __GLX_PUT_FLOAT(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize*4); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(compsize); + __GLX_SWAP_REPLY_SIZE(); + __GLX_SEND_HEADER(); + __GLX_SEND_FLOAT_ARRAY(compsize); + } + return Success; +} + +int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLint answerBuffer[200]; + char *answer; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc + 4); + pname = *(GLenum *)(pc + 4); + compsize = __glGetColorTableParameteriv_size(pname); + if (compsize < 0) compsize = 0; + __GLX_SWAP_INT(pc + 0); + + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); + __glXClearErrorOccured(); + glGetColorTableParameteriv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLint *) answer + ); + __GLX_SWAP_INT_ARRAY(answer, compsize); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(0); + __GLX_SEND_HEADER(); + } else if (compsize == 1) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(1); + __GLX_SWAP_REPLY_SIZE(); + __GLX_PUT_INT(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize*4); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(compsize); + __GLX_SWAP_REPLY_SIZE(); + __GLX_SEND_HEADER(); + __GLX_SEND_INT_ARRAY(compsize); + } + return Success; +} + +int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLfloat answerBuffer[200]; + char *answer; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc + 4); + pname = *(GLenum *)(pc + 4); + compsize = __glGetConvolutionParameterfv_size(pname); + if (compsize < 0) compsize = 0; + __GLX_SWAP_INT(pc + 0); + + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); + __glXClearErrorOccured(); + glGetConvolutionParameterfv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLfloat *) answer + ); + __GLX_SWAP_FLOAT_ARRAY(answer, compsize); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(0); + __GLX_SEND_HEADER(); + } else if (compsize == 1) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(1); + __GLX_SWAP_REPLY_SIZE(); + __GLX_PUT_FLOAT(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize*4); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(compsize); + __GLX_SWAP_REPLY_SIZE(); + __GLX_SEND_HEADER(); + __GLX_SEND_FLOAT_ARRAY(compsize); + } + return Success; +} + +int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLint answerBuffer[200]; + char *answer; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc + 4); + pname = *(GLenum *)(pc + 4); + compsize = __glGetConvolutionParameteriv_size(pname); + if (compsize < 0) compsize = 0; + __GLX_SWAP_INT(pc + 0); + + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); + __glXClearErrorOccured(); + glGetConvolutionParameteriv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLint *) answer + ); + __GLX_SWAP_INT_ARRAY(answer, compsize); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(0); + __GLX_SEND_HEADER(); + } else if (compsize == 1) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(1); + __GLX_SWAP_REPLY_SIZE(); + __GLX_PUT_INT(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize*4); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(compsize); + __GLX_SWAP_REPLY_SIZE(); + __GLX_SEND_HEADER(); + __GLX_SEND_INT_ARRAY(compsize); + } + return Success; +} + +int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLfloat answerBuffer[200]; + char *answer; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc + 4); + pname = *(GLenum *)(pc + 4); + compsize = __glGetHistogramParameterfv_size(pname); + if (compsize < 0) compsize = 0; + __GLX_SWAP_INT(pc + 0); + + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); + __glXClearErrorOccured(); + glGetHistogramParameterfv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLfloat *) answer + ); + __GLX_SWAP_FLOAT_ARRAY(answer, compsize); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(0); + __GLX_SEND_HEADER(); + } else if (compsize == 1) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(1); + __GLX_SWAP_REPLY_SIZE(); + __GLX_PUT_FLOAT(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize*4); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(compsize); + __GLX_SWAP_REPLY_SIZE(); + __GLX_SEND_HEADER(); + __GLX_SEND_FLOAT_ARRAY(compsize); + } + return Success; +} + +int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLint answerBuffer[200]; + char *answer; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc + 4); + pname = *(GLenum *)(pc + 4); + compsize = __glGetHistogramParameteriv_size(pname); + if (compsize < 0) compsize = 0; + __GLX_SWAP_INT(pc + 0); + + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); + __glXClearErrorOccured(); + glGetHistogramParameteriv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLint *) answer + ); + __GLX_SWAP_INT_ARRAY(answer, compsize); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(0); + __GLX_SEND_HEADER(); + } else if (compsize == 1) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(1); + __GLX_SWAP_REPLY_SIZE(); + __GLX_PUT_INT(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize*4); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(compsize); + __GLX_SWAP_REPLY_SIZE(); + __GLX_SEND_HEADER(); + __GLX_SEND_INT_ARRAY(compsize); + } + return Success; +} + +int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLfloat answerBuffer[200]; + char *answer; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc + 4); + pname = *(GLenum *)(pc + 4); + compsize = __glGetMinmaxParameterfv_size(pname); + if (compsize < 0) compsize = 0; + __GLX_SWAP_INT(pc + 0); + + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); + __glXClearErrorOccured(); + glGetMinmaxParameterfv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLfloat *) answer + ); + __GLX_SWAP_FLOAT_ARRAY(answer, compsize); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(0); + __GLX_SEND_HEADER(); + } else if (compsize == 1) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(1); + __GLX_SWAP_REPLY_SIZE(); + __GLX_PUT_FLOAT(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize*4); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(compsize); + __GLX_SWAP_REPLY_SIZE(); + __GLX_SEND_HEADER(); + __GLX_SEND_FLOAT_ARRAY(compsize); + } + return Success; +} + +int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + GLenum pname; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLint answerBuffer[200]; + char *answer; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc + 4); + pname = *(GLenum *)(pc + 4); + compsize = __glGetMinmaxParameteriv_size(pname); + if (compsize < 0) compsize = 0; + __GLX_SWAP_INT(pc + 0); + + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); + __glXClearErrorOccured(); + glGetMinmaxParameteriv( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + (GLint *) answer + ); + __GLX_SWAP_INT_ARRAY(answer, compsize); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(0); + __GLX_SEND_HEADER(); + } else if (compsize == 1) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(1); + __GLX_SWAP_REPLY_SIZE(); + __GLX_PUT_INT(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize*4); + __GLX_SWAP_REPLY_HEADER(); + __GLX_PUT_SIZE(compsize); + __GLX_SWAP_REPLY_SIZE(); + __GLX_SEND_HEADER(); + __GLX_SEND_INT_ARRAY(compsize); + } + return Success; +} + +int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) +{ + GLsizei n; + GLboolean retval; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLboolean answerBuffer[200]; + char *answer; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXVendorPrivateReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_VENDPRIV_HDR_SIZE; + __GLX_SWAP_INT(pc + 0); + n = *(GLsizei *)(pc + 0); + __GLX_SWAP_INT_ARRAY(pc + 4, n); + + __GLX_GET_ANSWER_BUFFER(answer,cl,n,1); + retval = + glAreTexturesResidentEXT( + *(GLsizei *)(pc + 0), + (GLuint *)(pc + 4), + (GLboolean *) answer + ); + __GLX_PUT_RETVAL(retval); + __GLX_SWAP_REPLY_RETVAL(); + __GLX_BEGIN_REPLY(n); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_HEADER(); + __GLX_SEND_BYTE_ARRAY(n); + return Success; +} + +int __glXDispSwap_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc) +{ + GLsizei n; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXVendorPrivateReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_VENDPRIV_HDR_SIZE; + __GLX_SWAP_INT(pc + 0); + n = *(GLsizei *)(pc + 0); + __GLX_SWAP_INT_ARRAY(pc + 4, n); + + glDeleteTexturesEXT( + *(GLsizei *)(pc + 0), + (GLuint *)(pc + 4) + ); + return Success; +} + +int __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) +{ + GLsizei n; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLuint answerBuffer[200]; + char *answer; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXVendorPrivateReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_VENDPRIV_HDR_SIZE; + __GLX_SWAP_INT(pc + 0); + n = *(GLsizei *)(pc + 0); + + __GLX_GET_ANSWER_BUFFER(answer,cl,n*4,4); + glGenTexturesEXT( + *(GLsizei *)(pc + 0), + (GLuint *) answer + ); + __GLX_SWAP_INT_ARRAY(answer, n); + __GLX_BEGIN_REPLY(n*4); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_HEADER(); + __GLX_SEND_INT_ARRAY(n); + return Success; +} + +int __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) +{ + GLboolean retval; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXVendorPrivateReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_VENDPRIV_HDR_SIZE; + __GLX_SWAP_INT(pc + 0); + + retval = + glIsTextureEXT( *(GLuint *)(pc + 0) ); __GLX_PUT_RETVAL(retval); Index: xc/programs/Xserver/GL/glx/global.c diff -u xc/programs/Xserver/GL/glx/global.c:1.2 xc/programs/Xserver/GL/glx/global.c:1.3 --- xc/programs/Xserver/GL/glx/global.c:1.2 Mon Jun 14 03:31:24 1999 +++ xc/programs/Xserver/GL/glx/global.c Wed Mar 21 11:29:35 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/global.c,v 1.2 1999/06/14 07:31:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/global.c,v 1.3 2001/03/21 16:29:35 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #define NEED_REPLIES Index: xc/programs/Xserver/GL/glx/glxbuf.c diff -u xc/programs/Xserver/GL/glx/glxbuf.c:1.4 xc/programs/Xserver/GL/glx/glxbuf.c:1.6 --- xc/programs/Xserver/GL/glx/glxbuf.c:1.4 Sun Jul 18 04:34:22 1999 +++ xc/programs/Xserver/GL/glx/glxbuf.c Sun Mar 25 00:32:01 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxbuf.c,v 1.4 1999/07/18 08:34:22 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxbuf.c,v 1.6 2001/03/25 05:32:01 tsi Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #include "glxserver.h" Index: xc/programs/Xserver/GL/glx/glxbuf.h diff -u xc/programs/Xserver/GL/glx/glxbuf.h:1.2 xc/programs/Xserver/GL/glx/glxbuf.h:1.3 --- xc/programs/Xserver/GL/glx/glxbuf.h:1.2 Mon Jun 14 03:31:25 1999 +++ xc/programs/Xserver/GL/glx/glxbuf.h Wed Mar 21 11:29:36 2001 @@ -1,26 +1,40 @@ +/* $XFree86: xc/programs/Xserver/GL/glx/glxbuf.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */ #ifndef _glxbuf_h_ #define _glxbuf_h_ -/* $XFree86: xc/programs/Xserver/GL/glx/glxbuf.h,v 1.2 1999/06/14 07:31:25 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ extern void __glXFBInitDrawable(__GLXdrawablePrivate *glxPriv, Index: xc/programs/Xserver/GL/glx/glxcmds.c diff -u xc/programs/Xserver/GL/glx/glxcmds.c:1.5 xc/programs/Xserver/GL/glx/glxcmds.c:1.8 --- xc/programs/Xserver/GL/glx/glxcmds.c:1.5 Fri Jun 16 20:03:12 2000 +++ xc/programs/Xserver/GL/glx/glxcmds.c Wed May 2 11:06:05 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxcmds.c,v 1.5 2000/06/17 00:03:12 martin Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxcmds.c,v 1.8 2001/05/02 15:06:05 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #define NEED_REPLIES @@ -32,6 +46,7 @@ #include "glximports.h" #include "glxutil.h" #include "glxext.h" +#include "GL/glx_ansic.h" /************************************************************************/ @@ -43,12 +58,13 @@ __glXImpWarning, __glXImpFatal, __glXImpGetenv, + __glXImpAtoi, __glXImpSprintf, __glXImpFopen, __glXImpFclose, __glXImpFprintf, __glXImpGetDrawablePrivate, - NULL, + NULL }; /************************************************************************/ @@ -998,9 +1014,18 @@ if (pDraw) { __GLXdrawablePrivate *glxPriv; - glxPriv = __glXGetDrawablePrivate(pDraw, drawId, glxc->modes); - if (glxPriv == NULL) { - return __glXBadDrawable; + if (glxc) { + glxPriv = __glXGetDrawablePrivate(pDraw, drawId, glxc->modes); + if (glxPriv == NULL) { + return __glXBadDrawable; + } + } + else { + glxPriv = __glXFindDrawablePrivate(drawId); + if (glxPriv == NULL) { + /* This is a window we've never seen before, do nothing */ + return Success; + } } if ((*glxPriv->swapBuffers)(glxPriv) == GL_FALSE) { Index: xc/programs/Xserver/GL/glx/glxcmdsswap.c diff -u xc/programs/Xserver/GL/glx/glxcmdsswap.c:1.4 xc/programs/Xserver/GL/glx/glxcmdsswap.c:1.5 --- xc/programs/Xserver/GL/glx/glxcmdsswap.c:1.4 Sun Jul 18 04:34:22 1999 +++ xc/programs/Xserver/GL/glx/glxcmdsswap.c Wed Mar 21 11:29:36 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxcmdsswap.c,v 1.4 1999/07/18 08:34:22 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxcmdsswap.c,v 1.5 2001/03/21 16:29:36 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #define NEED_REPLIES @@ -31,6 +45,7 @@ #include #include #include "glxext.h" +#include "GL/glx_ansic.h" /************************************************************************/ @@ -763,7 +778,7 @@ if ((vendorcode >= __GLX_MIN_VENDPRIV_OPCODE_EXT) && (vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) { - (*__glXSwapVendorPrivTable_EXT[vendorcode])(cl, (GLbyte*)req); + (*__glXSwapVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT])(cl, (GLbyte*)req); return Success; } cl->client->errorValue = req->vendorCode; @@ -785,7 +800,7 @@ if ((vendorcode >= __GLX_MIN_VENDPRIV_OPCODE_EXT) && (vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) { - return (*__glXSwapVendorPrivTable_EXT[vendorcode])(cl, (GLbyte*)req); + return (*__glXSwapVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT])(cl, (GLbyte*)req); } cl->client->errorValue = req->vendorCode; return __glXUnsupportedPrivateRequest; Index: xc/programs/Xserver/GL/glx/glxcontext.h diff -u xc/programs/Xserver/GL/glx/glxcontext.h:1.2 xc/programs/Xserver/GL/glx/glxcontext.h:1.3 --- xc/programs/Xserver/GL/glx/glxcontext.h:1.2 Mon Jun 14 03:31:26 1999 +++ xc/programs/Xserver/GL/glx/glxcontext.h Wed Mar 21 11:29:36 2001 @@ -1,26 +1,40 @@ +/* $XFree86: xc/programs/Xserver/GL/glx/glxcontext.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */ #ifndef _GLX_context_h_ #define _GLX_context_h_ -/* $XFree86: xc/programs/Xserver/GL/glx/glxcontext.h,v 1.2 1999/06/14 07:31:26 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ typedef struct __GLXcontextRec __GLXcontext; Index: xc/programs/Xserver/GL/glx/glxdrawable.h diff -u xc/programs/Xserver/GL/glx/glxdrawable.h:1.2 xc/programs/Xserver/GL/glx/glxdrawable.h:1.3 --- xc/programs/Xserver/GL/glx/glxdrawable.h:1.2 Mon Jun 14 03:31:26 1999 +++ xc/programs/Xserver/GL/glx/glxdrawable.h Wed Mar 21 11:29:36 2001 @@ -1,26 +1,40 @@ +/* $XFree86: xc/programs/Xserver/GL/glx/glxdrawable.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */ #ifndef _GLX_drawable_h_ #define _GLX_drawable_h_ -/* $XFree86: xc/programs/Xserver/GL/glx/glxdrawable.h,v 1.2 1999/06/14 07:31:26 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ typedef struct { @@ -76,7 +90,7 @@ GLboolean (*swapBuffers)(struct __GLXdrawablePrivateRec *); /* - ** The GL drawable (information shared between GLX and the GL core + ** The GL drawable (information shared between GLX and the GL core) */ __GLdrawablePrivate glPriv; Index: xc/programs/Xserver/GL/glx/glxerror.h diff -u xc/programs/Xserver/GL/glx/glxerror.h:1.2 xc/programs/Xserver/GL/glx/glxerror.h:1.3 --- xc/programs/Xserver/GL/glx/glxerror.h:1.2 Mon Jun 14 03:31:26 1999 +++ xc/programs/Xserver/GL/glx/glxerror.h Wed Mar 21 11:29:36 2001 @@ -1,26 +1,40 @@ +/* $XFree86: xc/programs/Xserver/GL/glx/glxerror.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */ #ifndef _GLX_error_h_ #define _GLX_error_h_ -/* $XFree86: xc/programs/Xserver/GL/glx/glxerror.h,v 1.2 1999/06/14 07:31:26 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ /* Index: xc/programs/Xserver/GL/glx/glxext.c diff -u xc/programs/Xserver/GL/glx/glxext.c:1.5 xc/programs/Xserver/GL/glx/glxext.c:1.7 --- xc/programs/Xserver/GL/glx/glxext.c:1.5 Tue Sep 26 11:57:02 2000 +++ xc/programs/Xserver/GL/glx/glxext.c Wed Mar 21 11:29:36 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxext.c,v 1.5 2000/09/26 15:57:02 tsi Exp $ +/* $XFree86: xc/programs/Xserver/GL/glx/glxext.c,v 1.7 2001/03/21 16:29:36 dawes Exp $ ** The contents of this file are subject to the GLX Public License Version 1.0 ** (the "License"). You may not use this file except in compliance with the ** License. You may obtain a copy of the License at Silicon Graphics, Inc., @@ -16,7 +16,6 @@ ** Those portions of the Subject Software created by Silicon Graphics, Inc. ** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. ** -** $SGI$ */ #define NEED_REPLIES @@ -48,6 +47,7 @@ { __glXFlushContextCache(); (*__glXExt->resetExtension)(); + __glXScreenReset(); } /* @@ -216,7 +216,7 @@ */ void GlxExtensionInit(void) { - ExtensionEntry *extEntry, *AddExtension(); + ExtensionEntry *extEntry; int i; #ifdef X11R5 Index: xc/programs/Xserver/GL/glx/glxext.h diff -u xc/programs/Xserver/GL/glx/glxext.h:1.3 xc/programs/Xserver/GL/glx/glxext.h:1.4 --- xc/programs/Xserver/GL/glx/glxext.h:1.3 Mon Jun 14 03:31:27 1999 +++ xc/programs/Xserver/GL/glx/glxext.h Wed Mar 21 11:29:36 2001 @@ -1,46 +1,63 @@ +/* $XFree86: xc/programs/Xserver/GL/glx/glxext.h,v 1.4 2001/03/21 16:29:36 dawes Exp $ */ #ifndef _glxext_h_ #define _glxext_h_ -/* $XFree86: xc/programs/Xserver/GL/glx/glxext.h,v 1.3 1999/06/14 07:31:27 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ +/* + * Added by VA Linux for XFree86 4.0.x + */ typedef struct { int type; void (*resetExtension)(void); Bool (*initVisuals)( - VisualPtr * visualp, - DepthPtr * depthp, - int * nvisualp, - int * ndepthp, - int * rootDepthp, - VisualID * defaultVisp, - unsigned long sizes, - int bitsPerRGB - ); + VisualPtr * visualp, + DepthPtr * depthp, + int * nvisualp, + int * ndepthp, + int * rootDepthp, + VisualID * defaultVisp, + unsigned long sizes, + int bitsPerRGB + ); void (*setVisualConfigs)( - int nconfigs, - __GLXvisualConfig *configs, - void **privates - ); + int nconfigs, + __GLXvisualConfig *configs, + void **privates + ); } __GLXextensionInfo; extern GLboolean __glXFreeContext(__GLXcontext *glxc); @@ -56,14 +73,12 @@ extern int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc); extern int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, char *pc); -extern Bool __glXCoreType(void); extern void GlxExtensionInit(void); -extern void GlxSetVisualConfigs( - int nconfigs, - __GLXvisualConfig *configs, - void **privates -); + +extern Bool __glXCoreType(void); + extern int GlxInitVisuals( +#if NeedFunctionPrototypes VisualPtr * visualp, DepthPtr * depthp, int * nvisualp, @@ -73,6 +88,7 @@ unsigned long sizes, int bitsPerRGB, int preferredVis +#endif ); #endif /* _glxext_h_ */ Index: xc/programs/Xserver/GL/glx/glxfb.c diff -u xc/programs/Xserver/GL/glx/glxfb.c:1.2 xc/programs/Xserver/GL/glx/glxfb.c:1.3 --- xc/programs/Xserver/GL/glx/glxfb.c:1.2 Mon Jun 14 03:31:27 1999 +++ xc/programs/Xserver/GL/glx/glxfb.c Wed Mar 21 11:29:36 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxfb.c,v 1.2 1999/06/14 07:31:27 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxfb.c,v 1.3 2001/03/21 16:29:36 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ /* @@ -30,7 +44,7 @@ #include -/* can't include glmath.h */ +/* so we don't include glmath.h */ extern GLuint __glFloorLog2(GLuint); typedef struct __GLFBbufferInfoRec { Index: xc/programs/Xserver/GL/glx/glxfb.h diff -u xc/programs/Xserver/GL/glx/glxfb.h:1.2 xc/programs/Xserver/GL/glx/glxfb.h:1.3 --- xc/programs/Xserver/GL/glx/glxfb.h:1.2 Mon Jun 14 03:31:30 1999 +++ xc/programs/Xserver/GL/glx/glxfb.h Wed Mar 21 11:29:36 2001 @@ -1,26 +1,40 @@ +/* $XFree86: xc/programs/Xserver/GL/glx/glxfb.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */ #ifndef _glxfb_h_ #define _glxfb_h_ -/* $XFree86: xc/programs/Xserver/GL/glx/glxfb.h,v 1.2 1999/06/14 07:31:30 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ extern void __glXInitFB(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv, Index: xc/programs/Xserver/GL/glx/glximports.c diff -u xc/programs/Xserver/GL/glx/glximports.c:1.4 xc/programs/Xserver/GL/glx/glximports.c:1.5 --- xc/programs/Xserver/GL/glx/glximports.c:1.4 Sun Jul 18 04:34:23 1999 +++ xc/programs/Xserver/GL/glx/glximports.c Wed Mar 21 11:29:36 2001 @@ -1,28 +1,43 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glximports.c,v 1.4 1999/07/18 08:34:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glximports.c,v 1.5 2001/03/21 16:29:36 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #include "glxserver.h" #include "glxcontext.h" #include "glximports.h" +#include "GL/glx_ansic.h" void *__glXImpMalloc(__GLcontext *gc, size_t size) { @@ -103,6 +118,11 @@ char *__glXImpGetenv(__GLcontext *gc, const char *var) { return __glXGetenv(var); +} + +int __glXImpAtoi(__GLcontext *gc, const char *str) +{ + return __glXAtoi(str); } int __glXImpSprintf(__GLcontext *gc, char *str, const char *fmt, ...) Index: xc/programs/Xserver/GL/glx/glximports.h diff -u xc/programs/Xserver/GL/glx/glximports.h:1.2 xc/programs/Xserver/GL/glx/glximports.h:1.3 --- xc/programs/Xserver/GL/glx/glximports.h:1.2 Mon Jun 14 03:31:30 1999 +++ xc/programs/Xserver/GL/glx/glximports.h Wed Mar 21 11:29:36 2001 @@ -1,26 +1,40 @@ +/* $XFree86: xc/programs/Xserver/GL/glx/glximports.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */ #ifndef _glximports_h_ #define _glximports_h_ -/* $XFree86: xc/programs/Xserver/GL/glx/glximports.h,v 1.2 1999/06/14 07:31:30 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ extern void *__glXImpMalloc(__GLcontext *gc, size_t size); @@ -32,6 +46,7 @@ extern void __glXImpFatal(__GLcontext *gc, char *msg); extern char *__glXImpGetenv(__GLcontext *gc, const char *var); +extern int __glXImpAtoi(__GLcontext *gc, const char *str); extern int __glXImpSprintf(__GLcontext *gc, char *str, const char *fmt, ...); extern void *__glXImpFopen(__GLcontext *gc, const char *path, const char *mode); Index: xc/programs/Xserver/GL/glx/glxmem.c diff -u xc/programs/Xserver/GL/glx/glxmem.c:1.4 xc/programs/Xserver/GL/glx/glxmem.c:1.5 --- xc/programs/Xserver/GL/glx/glxmem.c:1.4 Sun Jul 18 04:34:23 1999 +++ xc/programs/Xserver/GL/glx/glxmem.c Wed Mar 21 11:29:36 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxmem.c,v 1.4 1999/07/18 08:34:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxmem.c,v 1.5 2001/03/21 16:29:36 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ /* Index: xc/programs/Xserver/GL/glx/glxmem.h diff -u xc/programs/Xserver/GL/glx/glxmem.h:1.2 xc/programs/Xserver/GL/glx/glxmem.h:1.3 --- xc/programs/Xserver/GL/glx/glxmem.h:1.2 Mon Jun 14 03:31:31 1999 +++ xc/programs/Xserver/GL/glx/glxmem.h Wed Mar 21 11:29:36 2001 @@ -1,26 +1,40 @@ +/* $XFree86: xc/programs/Xserver/GL/glx/glxmem.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */ #ifndef _glxmem_h_ #define _glxmem_h_ -/* $XFree86: xc/programs/Xserver/GL/glx/glxmem.h,v 1.2 1999/06/14 07:31:31 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ extern void __glXInitMem(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv, Index: xc/programs/Xserver/GL/glx/glxpix.c diff -u xc/programs/Xserver/GL/glx/glxpix.c:1.3 xc/programs/Xserver/GL/glx/glxpix.c:1.4 --- xc/programs/Xserver/GL/glx/glxpix.c:1.3 Tue Sep 26 11:57:02 2000 +++ xc/programs/Xserver/GL/glx/glxpix.c Wed Mar 21 11:29:36 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxpix.c,v 1.3 2000/09/26 15:57:02 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxpix.c,v 1.4 2001/03/21 16:29:36 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ /* Index: xc/programs/Xserver/GL/glx/glxpix.h diff -u xc/programs/Xserver/GL/glx/glxpix.h:1.2 xc/programs/Xserver/GL/glx/glxpix.h:1.3 --- xc/programs/Xserver/GL/glx/glxpix.h:1.2 Mon Jun 14 03:31:31 1999 +++ xc/programs/Xserver/GL/glx/glxpix.h Wed Mar 21 11:29:36 2001 @@ -1,26 +1,40 @@ +/* $XFree86: xc/programs/Xserver/GL/glx/glxpix.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */ #ifndef _glxpix_h_ #define _glxpix_h_ -/* $XFree86: xc/programs/Xserver/GL/glx/glxpix.h,v 1.2 1999/06/14 07:31:31 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ extern void __glXInitPix(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv, Index: xc/programs/Xserver/GL/glx/glxscreens.c diff -u xc/programs/Xserver/GL/glx/glxscreens.c:1.4 xc/programs/Xserver/GL/glx/glxscreens.c:1.6 --- xc/programs/Xserver/GL/glx/glxscreens.c:1.4 Fri Jun 16 20:03:12 2000 +++ xc/programs/Xserver/GL/glx/glxscreens.c Wed Mar 21 11:29:36 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.c,v 1.4 2000/06/17 00:03:12 martin Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.c,v 1.6 2001/03/21 16:29:36 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #ifdef IN_MODULE @@ -32,6 +46,15 @@ #include "glxserver.h" #include "glxutil.h" +static char GLServerExtensions[] = + "GL_ARB_multitexture " + "GL_ARB_imaging " + "GL_EXT_abgr " + "GL_EXT_blend_color " + "GL_EXT_blend_minmax " + "GL_EXT_blend_subtract " + ; + /* ** We have made the simplifying assuption that the same extensions are ** supported across all screens in a multi-screen system. @@ -41,7 +64,8 @@ static char GLXServerExtensions[] = "GLX_EXT_visual_info " "GLX_EXT_visual_rating " - "GLX_EXT_import_context "; + "GLX_EXT_import_context " + ; /* ** This comes from the GL library that the server will link with. Right @@ -259,6 +283,7 @@ #else __glXActiveScreens[i].numUsableVisuals = __glXActiveScreens[i].numVisuals; #endif + __glXActiveScreens[i].GLextensions = __glXStrdup(GLServerExtensions); __glXActiveScreens[i].GLXvendor = __glXStrdup(GLXServerVendorName); __glXActiveScreens[i].GLXversion = __glXStrdup(GLXServerVersion); __glXActiveScreens[i].GLXextensions = __glXStrdup(GLXServerExtensions); @@ -273,4 +298,18 @@ } } __glXNumActiveScreens = numscreens; +} + +void __glXScreenReset(void) +{ + int i; + + for (i = 0; i < __glXNumActiveScreens; i++) { + __glXFree(__glXActiveScreens[i].GLXvendor); + __glXFree(__glXActiveScreens[i].GLXversion); + __glXFree(__glXActiveScreens[i].GLXextensions); + } + xfree(__glXActiveScreens); + __glXActiveScreens = NULL; + __glXNumActiveScreens = 0; } Index: xc/programs/Xserver/GL/glx/glxscreens.h diff -u xc/programs/Xserver/GL/glx/glxscreens.h:1.2 xc/programs/Xserver/GL/glx/glxscreens.h:1.4 --- xc/programs/Xserver/GL/glx/glxscreens.h:1.2 Mon Jun 14 03:31:32 1999 +++ xc/programs/Xserver/GL/glx/glxscreens.h Wed Mar 21 11:29:37 2001 @@ -1,30 +1,46 @@ #ifndef _GLX_screens_h_ #define _GLX_screens_h_ -/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.h,v 1.2 1999/06/14 07:31:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.h,v 1.4 2001/03/21 16:29:37 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #include "GL/internal/glcore.h" + + /* ** Screen dependent data. These methods are the interface between the DIX ** and DDX layers of the GLX server extension. The methods provide an @@ -58,6 +74,8 @@ GLint numVisuals; GLint numUsableVisuals; + char *GLextensions; + char *GLXvendor; char *GLXversion; char *GLXextensions; @@ -71,5 +89,6 @@ extern void __glXScreenInit(GLint); +extern void __glXScreenReset(void); #endif /* !__GLX_screens_h__ */ Index: xc/programs/Xserver/GL/glx/glxserver.h diff -u xc/programs/Xserver/GL/glx/glxserver.h:1.2 xc/programs/Xserver/GL/glx/glxserver.h:1.3 --- xc/programs/Xserver/GL/glx/glxserver.h:1.2 Mon Jun 14 03:31:32 1999 +++ xc/programs/Xserver/GL/glx/glxserver.h Wed Mar 21 11:29:37 2001 @@ -1,26 +1,40 @@ +/* $XFree86: xc/programs/Xserver/GL/glx/glxserver.h,v 1.3 2001/03/21 16:29:37 dawes Exp $ */ #ifndef _GLX_server_h_ #define _GLX_server_h_ -/* $XFree86: xc/programs/Xserver/GL/glx/glxserver.h,v 1.2 1999/06/14 07:31:32 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #include @@ -42,6 +56,7 @@ #undef abs #undef fabs +#define GL_GLEXT_PROTOTYPES /* we want prototypes */ #include #include #include @@ -110,7 +125,7 @@ */ GLbyte *returnBuf; GLint returnBufSize; - + /* ** Keep track of large rendering commands, which span multiple requests. */ @@ -127,7 +142,7 @@ */ __GLXcontext **currentContexts; GLint numCurrentContexts; - + /* Back pointer to X client record */ ClientPtr client; @@ -168,7 +183,7 @@ } __GLXrenderSizeData; extern __GLXrenderSizeData __glXRenderSizeTable[]; extern __GLXrenderSizeData __glXRenderSizeTable_EXT[]; - + /************************************************************************/ /* @@ -215,6 +230,15 @@ * Routines for computing the size of variably-sized rendering commands. */ +extern int __glXTypeSize(GLenum enm); +extern int __glXImageSize(GLenum format, GLenum type, GLsizei w, GLsizei h, + GLint rowLength, GLint skipRows, GLint alignment); +extern int __glXImage3DSize(GLenum format, GLenum type, + GLsizei w, GLsizei h, GLsizei d, + GLint imageHeight, GLint rowLength, + GLint skipImages, GLint skipRows, + GLint alignment); + extern int __glXCallListsReqSize(GLbyte *pc, Bool swap); extern int __glXBitmapReqSize(GLbyte *pc, Bool swap); extern int __glXFogfvReqSize(GLbyte *pc, Bool swap); @@ -242,10 +266,28 @@ extern int __glXPixelMapuivReqSize(GLbyte *pc, Bool swap); extern int __glXPixelMapusvReqSize(GLbyte *pc, Bool swap); extern int __glXDrawPixelsReqSize(GLbyte *pc, Bool swap); -extern int __glXTypeSize(GLenum enm); extern int __glXDrawArraysSize(GLbyte *pc, Bool swap); extern int __glXPrioritizeTexturesReqSize(GLbyte *pc, Bool swap); extern int __glXTexSubImage1DReqSize(GLbyte *pc, Bool swap); extern int __glXTexSubImage2DReqSize(GLbyte *pc, Bool swap); +extern int __glXTexImage3DReqSize(GLbyte *pc, Bool swap ); +extern int __glXTexSubImage3DReqSize(GLbyte *pc, Bool swap); +extern int __glXConvolutionFilter1DReqSize(GLbyte *pc, Bool swap); +extern int __glXConvolutionFilter2DReqSize(GLbyte *pc, Bool swap); +extern int __glXConvolutionParameterivReqSize(GLbyte *pc, Bool swap); +extern int __glXConvolutionParameterfvReqSize(GLbyte *pc, Bool swap); +extern int __glXSeparableFilter2DReqSize(GLbyte *pc, Bool swap); +extern int __glXColorTableReqSize(GLbyte *pc, Bool swap); +extern int __glXColorSubTableReqSize(GLbyte *pc, Bool swap); +extern int __glXColorTableParameterfvReqSize(GLbyte *pc, Bool swap); +extern int __glXColorTableParameterivReqSize(GLbyte *pc, Bool swap); + +/* + * Routines for computing the size of returned data. + */ +extern int __glXConvolutionParameterivSize(GLenum pname); +extern int __glXConvolutionParameterfvSize(GLenum pname); +extern int __glXColorTableParameterfvSize(GLenum pname); +extern int __glXColorTableParameterivSize(GLenum pname); #endif /* !__GLX_server_h__ */ Index: xc/programs/Xserver/GL/glx/glxutil.c diff -u xc/programs/Xserver/GL/glx/glxutil.c:1.4 xc/programs/Xserver/GL/glx/glxutil.c:1.5 --- xc/programs/Xserver/GL/glx/glxutil.c:1.4 Sun Jul 18 04:34:23 1999 +++ xc/programs/Xserver/GL/glx/glxutil.c Wed Mar 21 11:29:37 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxutil.c,v 1.4 1999/07/18 08:34:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxutil.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #define NEED_REPLIES @@ -29,6 +43,7 @@ #include #include "glxutil.h" #include "glxbuf.h" +#include "GL/glx_ansic.h" /************************************************************************/ @@ -200,8 +215,12 @@ modes->greenMask = config->greenMask; modes->blueMask = config->blueMask; modes->alphaMask = config->alphaMask; +#if 0 modes->rgbBits = modes->redBits + modes->greenBits + modes->blueBits + modes->alphaBits; +#endif + assert( !modes->rgbMode || ((config->bufferSize & 0x7) == 0) ); + modes->rgbBits = config->bufferSize; modes->indexBits = config->bufferSize; modes->accumRedBits = config->accumRedSize; @@ -234,8 +253,6 @@ /* some pending state. Deal with it */ if (glxc->pendingState & __GLX_PENDING_RESIZE) { - __GLXdrawablePrivate *glxPriv = glxc->glxPriv; - glxc->pendingState &= ~__GLX_PENDING_RESIZE; (*glci->exports.notifyResize)(gc); Index: xc/programs/Xserver/GL/glx/glxutil.h diff -u xc/programs/Xserver/GL/glx/glxutil.h:1.2 xc/programs/Xserver/GL/glx/glxutil.h:1.3 --- xc/programs/Xserver/GL/glx/glxutil.h:1.2 Mon Jun 14 03:31:33 1999 +++ xc/programs/Xserver/GL/glx/glxutil.h Wed Mar 21 11:29:37 2001 @@ -1,26 +1,40 @@ +/* $XFree86: xc/programs/Xserver/GL/glx/glxutil.h,v 1.3 2001/03/21 16:29:37 dawes Exp $ */ #ifndef _glxcmds_h_ #define _glxcmds_h_ -/* $XFree86: xc/programs/Xserver/GL/glx/glxutil.h,v 1.2 1999/06/14 07:31:33 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ extern void __glXNop(void); Index: xc/programs/Xserver/GL/glx/impsize.h diff -u xc/programs/Xserver/GL/glx/impsize.h:1.2 xc/programs/Xserver/GL/glx/impsize.h:1.3 --- xc/programs/Xserver/GL/glx/impsize.h:1.2 Mon Jun 14 03:31:33 1999 +++ xc/programs/Xserver/GL/glx/impsize.h Wed Mar 21 11:29:37 2001 @@ -1,26 +1,40 @@ +/* $XFree86: xc/programs/Xserver/GL/glx/impsize.h,v 1.3 2001/03/21 16:29:37 dawes Exp $ */ #ifndef _impsize_h_ #define _impsize_h_ -/* $XFree86: xc/programs/Xserver/GL/glx/impsize.h,v 1.2 1999/06/14 07:31:33 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ /* @@ -31,6 +45,10 @@ ** replicate the code in here. */ extern int __glCallLists_size(GLsizei n, GLenum type); +extern int __glColorTableParameterfv_size(GLenum pname); +extern int __glColorTableParameteriv_size(GLenum pname); +extern int __glConvolutionParameterfv_size(GLenum pname); +extern int __glConvolutionParameteriv_size(GLenum pname); extern int __glDrawPixels_size(GLenum format, GLenum type, GLsizei w,GLsizei h); extern int __glFogfv_size(GLenum pname); extern int __glFogiv_size(GLenum pname); @@ -47,7 +65,6 @@ extern int __glTexGeniv_size(GLenum pname); extern int __glTexParameterfv_size(GLenum e); extern int __glTexParameteriv_size(GLenum e); - extern int __glEvalComputeK(GLenum target); #endif /* _impsize_h_ */ Index: xc/programs/Xserver/GL/glx/render2.c diff -u xc/programs/Xserver/GL/glx/render2.c:1.4 xc/programs/Xserver/GL/glx/render2.c:1.5 --- xc/programs/Xserver/GL/glx/render2.c:1.4 Sun Jul 18 04:34:24 1999 +++ xc/programs/Xserver/GL/glx/render2.c Wed Mar 21 11:29:37 2001 @@ -1,29 +1,44 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/render2.c,v 1.4 1999/07/18 08:34:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/render2.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ /* #define NEED_REPLIES */ -#include "glxserver.h" +#include #include "unpack.h" #include "g_disptab.h" +#include "g_disptab_EXT.h" extern GLint __glEvalComputeK(GLenum target); @@ -33,7 +48,7 @@ GLfloat u1, u2, *points; GLenum target; - target = *(GLenum *)(pc + 0); + target = *(GLenum *)(pc + 0); order = *(GLint *)(pc + 12); u1 = *(GLfloat *)(pc + 4); u2 = *(GLfloat *)(pc + 8); @@ -48,8 +63,8 @@ GLint uorder, vorder, ustride, vstride, k; GLfloat u1, u2, v1, v2, *points; GLenum target; - - target = *(GLenum *)(pc + 0); + + target = *(GLenum *)(pc + 0); uorder = *(GLint *)(pc + 12); vorder = *(GLint *)(pc + 24); u1 = *(GLfloat *)(pc + 4); @@ -169,7 +184,7 @@ GLenum datatype = compHeader[i].datatype; GLint numVals = compHeader[i].numVals; - stride += __GLX_PAD(numVals * __glXTypeSize(datatype)); + stride += __GLX_PAD(numVals * __glXTypeSize(datatype)); } pc += numComponents * sizeof(__GLXdispatchDrawArraysComponentHeader); @@ -180,36 +195,36 @@ GLint numVals = compHeader[i].numVals; GLenum component = compHeader[i].component; - switch (component) { - case GL_VERTEX_ARRAY: + switch (component) { + case GL_VERTEX_ARRAY: glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(numVals, datatype, stride, pc); - break; - case GL_NORMAL_ARRAY: + break; + case GL_NORMAL_ARRAY: glEnableClientState(GL_NORMAL_ARRAY); glNormalPointer(datatype, stride, pc); - break; - case GL_COLOR_ARRAY: + break; + case GL_COLOR_ARRAY: glEnableClientState(GL_COLOR_ARRAY); glColorPointer(numVals, datatype, stride, pc); - break; - case GL_INDEX_ARRAY: + break; + case GL_INDEX_ARRAY: glEnableClientState(GL_INDEX_ARRAY); glIndexPointer(datatype, stride, pc); - break; - case GL_TEXTURE_COORD_ARRAY: + break; + case GL_TEXTURE_COORD_ARRAY: glEnableClientState(GL_TEXTURE_COORD_ARRAY); glTexCoordPointer(numVals, datatype, stride, pc); - break; - case GL_EDGE_FLAG_ARRAY: + break; + case GL_EDGE_FLAG_ARRAY: glEnableClientState(GL_EDGE_FLAG_ARRAY); glEdgeFlagPointer(stride, (const GLboolean *)pc); - break; - default: - break; + break; + default: + break; } - pc += __GLX_PAD(numVals * __glXTypeSize(datatype)); + pc += __GLX_PAD(numVals * __glXTypeSize(datatype)); } glDrawArrays(primType, 0, numVertexes); @@ -221,4 +236,10 @@ glDisableClientState(GL_INDEX_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_EDGE_FLAG_ARRAY); +} + +void __glXDisp_DrawArraysEXT(GLbyte *pc) +{ +#ifdef XXX_STUB +#endif /*XXX_STUB*/ } Index: xc/programs/Xserver/GL/glx/render2swap.c diff -u xc/programs/Xserver/GL/glx/render2swap.c:1.4 xc/programs/Xserver/GL/glx/render2swap.c:1.5 --- xc/programs/Xserver/GL/glx/render2swap.c:1.4 Sun Jul 18 04:34:24 1999 +++ xc/programs/Xserver/GL/glx/render2swap.c Wed Mar 21 11:29:37 2001 @@ -1,29 +1,44 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/render2swap.c,v 1.4 1999/07/18 08:34:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/render2swap.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ /* #define NEED_REPLIES */ #include "glxserver.h" #include "unpack.h" #include "g_disptab.h" +#include "g_disptab_EXT.h" extern GLint __glEvalComputeK(GLenum target); @@ -362,4 +377,10 @@ glDisableClientState(GL_INDEX_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_EDGE_FLAG_ARRAY); +} + +void __glXDispSwap_DrawArraysEXT(GLbyte *pc) +{ +#ifdef XXX_STUB +#endif /*XXX_STUB*/ } Index: xc/programs/Xserver/GL/glx/renderpix.c diff -u xc/programs/Xserver/GL/glx/renderpix.c:1.4 xc/programs/Xserver/GL/glx/renderpix.c:1.5 --- xc/programs/Xserver/GL/glx/renderpix.c:1.4 Sun Jul 18 04:34:24 1999 +++ xc/programs/Xserver/GL/glx/renderpix.c Wed Mar 21 11:29:37 2001 @@ -1,29 +1,44 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/renderpix.c,v 1.4 1999/07/18 08:34:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/renderpix.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #define NEED_REPLIES #include "glxserver.h" #include "unpack.h" #include "g_disptab.h" +#include "g_disptab_EXT.h" void __glXDisp_PolygonStipple(GLbyte *pc) { @@ -48,12 +63,12 @@ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); - glBitmap((GLsizei) hdr->width, - (GLsizei) hdr->height, - (GLfloat) hdr->xorig, - (GLfloat) hdr->yorig, + glBitmap((GLsizei) hdr->width, + (GLsizei) hdr->height, + (GLfloat) hdr->xorig, + (GLfloat) hdr->yorig, (GLfloat) hdr->xmove, - (GLfloat) hdr->ymove, + (GLfloat) hdr->ymove, (GLubyte *)(hdr+1)); } @@ -68,13 +83,13 @@ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); - glTexImage1D(hdr->target, - (GLint) hdr->level, - (GLint) hdr->components, + glTexImage1D(hdr->target, + (GLint) hdr->level, + (GLint) hdr->components, (GLsizei) hdr->width, - (GLint) hdr->border, - hdr->format, - hdr->type, + (GLint) hdr->border, + hdr->format, + hdr->type, (GLvoid *)(hdr+1)); } @@ -89,17 +104,35 @@ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); - glTexImage2D(hdr->target, - (GLint) hdr->level, - (GLint) hdr->components, + glTexImage2D(hdr->target, + (GLint) hdr->level, + (GLint) hdr->components, (GLsizei) hdr->width, - (GLsizei) hdr->height, - (GLint) hdr->border, - hdr->format, + (GLsizei) hdr->height, + (GLint) hdr->border, + hdr->format, hdr->type, (GLvoid *)(hdr+1)); } +void __glXDisp_TexImage3D(GLbyte *pc) +{ + __GLXdispatchTexImage3DHeader *hdr = (__GLXdispatchTexImage3DHeader *) pc; + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); + glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, hdr->imageHeight); + glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_IMAGES, hdr->skipImages); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + + glTexImage3D(hdr->target, hdr->level, hdr->internalformat, hdr->width, + hdr->height, hdr->depth, hdr->border, hdr->format, hdr->type, + (GLvoid *)(hdr+1)); +} + void __glXDisp_DrawPixels(GLbyte *pc) { __GLXdispatchDrawPixelsHeader *hdr = (__GLXdispatchDrawPixelsHeader *) pc; @@ -111,9 +144,9 @@ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); - glDrawPixels((GLsizei) hdr->width, - (GLsizei) hdr->height, - hdr->format, + glDrawPixels((GLsizei) hdr->width, + (GLsizei) hdr->height, + hdr->format, hdr->type, (GLvoid *)(hdr+1)); } @@ -129,12 +162,12 @@ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); - glTexSubImage1D(hdr->target, - (GLint) hdr->level, - (GLint) hdr->xoffset, + glTexSubImage1D(hdr->target, + (GLint) hdr->level, + (GLint) hdr->xoffset, (GLsizei) hdr->width, - hdr->format, - hdr->type, + hdr->format, + hdr->type, (GLvoid *)(hdr+1)); } @@ -149,13 +182,126 @@ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); - glTexSubImage2D(hdr->target, - (GLint) hdr->level, - (GLint) hdr->xoffset, + glTexSubImage2D(hdr->target, + (GLint) hdr->level, + (GLint) hdr->xoffset, (GLint) hdr->yoffset, - (GLsizei) hdr->width, - (GLsizei) hdr->height, - hdr->format, + (GLsizei) hdr->width, + (GLsizei) hdr->height, + hdr->format, hdr->type, (GLvoid *)(hdr+1)); +} + +void __glXDisp_TexSubImage3D(GLbyte *pc) +{ + __GLXdispatchTexSubImage3DHeader *hdr = + (__GLXdispatchTexSubImage3DHeader *) pc; + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); + glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, hdr->imageHeight); + glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_IMAGES, hdr->skipImages); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + + glTexSubImage3D(hdr->target, hdr->level, hdr->xoffset, hdr->yoffset, + hdr->zoffset, hdr->width, hdr->height, hdr->depth, + hdr->format, hdr->type, (GLvoid *)(hdr+1)); +} + +void __glXDisp_ColorTable(GLbyte *pc) +{ + __GLXdispatchColorTableHeader *hdr = + (__GLXdispatchColorTableHeader *) pc; + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + + glColorTable(hdr->target, hdr->internalformat, + hdr->width, hdr->format, hdr->type, + (GLvoid *)(hdr+1)); +} + +void __glXDisp_ColorSubTable(GLbyte *pc) +{ + __GLXdispatchColorSubTableHeader *hdr = + (__GLXdispatchColorSubTableHeader *) pc; + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + + glColorSubTable(hdr->target, hdr->start, hdr->count, hdr->format, + hdr->type, (GLvoid *)(hdr+1)); +} + +void __glXDisp_ConvolutionFilter1D(GLbyte *pc) +{ + __GLXdispatchConvolutionFilterHeader *hdr = + (__GLXdispatchConvolutionFilterHeader *) pc; + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + + glConvolutionFilter1D(hdr->target, hdr->internalformat, + hdr->width, hdr->format, hdr->type, + (GLvoid *)(hdr+1)); +} + +void __glXDisp_ConvolutionFilter2D(GLbyte *pc) +{ + __GLXdispatchConvolutionFilterHeader *hdr = + (__GLXdispatchConvolutionFilterHeader *) pc; + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + + glConvolutionFilter2D(hdr->target, hdr->internalformat, + hdr->width, hdr->height, hdr->format, hdr->type, + (GLvoid *)(hdr+1)); +} + +void __glXDisp_SeparableFilter2D(GLbyte *pc) +{ + __GLXdispatchConvolutionFilterHeader *hdr = + (__GLXdispatchConvolutionFilterHeader *) pc; + GLint hdrlen, image1len; + + hdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_DISPATCH_HDR_SIZE); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + + /* XXX check this usage - internal code called + ** a version without the packing parameters + */ + image1len = __glXImageSize(hdr->format, hdr->type, hdr->width, 1, + hdr->rowLength, hdr->skipRows, hdr->alignment); + image1len = __GLX_PAD(image1len); + + glSeparableFilter2D(hdr->target, hdr->internalformat, + hdr->width, hdr->height, hdr->format, hdr->type, + ((GLubyte *)hdr+hdrlen), ((GLubyte *)hdr+hdrlen+image1len)); } Index: xc/programs/Xserver/GL/glx/renderpixswap.c diff -u xc/programs/Xserver/GL/glx/renderpixswap.c:1.4 xc/programs/Xserver/GL/glx/renderpixswap.c:1.5 --- xc/programs/Xserver/GL/glx/renderpixswap.c:1.4 Sun Jul 18 04:34:24 1999 +++ xc/programs/Xserver/GL/glx/renderpixswap.c Wed Mar 21 11:29:37 2001 @@ -1,29 +1,44 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/renderpixswap.c,v 1.4 1999/07/18 08:34:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/renderpixswap.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #define NEED_REPLIES #include "glxserver.h" #include "unpack.h" #include "g_disptab.h" +#include "g_disptab_EXT.h" void __glXDispSwap_PolygonStipple(GLbyte *pc) { @@ -53,26 +68,26 @@ __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - + __GLX_SWAP_INT((GLbyte *)&hdr->width); __GLX_SWAP_INT((GLbyte *)&hdr->height); __GLX_SWAP_FLOAT((GLbyte *)&hdr->xorig); __GLX_SWAP_FLOAT((GLbyte *)&hdr->yorig); __GLX_SWAP_FLOAT((GLbyte *)&hdr->xmove); __GLX_SWAP_FLOAT((GLbyte *)&hdr->ymove); - + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); - glBitmap((GLsizei) hdr->width, - (GLsizei) hdr->height, - (GLfloat) hdr->xorig, - (GLfloat) hdr->yorig, + glBitmap((GLsizei) hdr->width, + (GLsizei) hdr->height, + (GLfloat) hdr->xorig, + (GLfloat) hdr->yorig, (GLfloat) hdr->xmove, - (GLfloat) hdr->ymove, + (GLfloat) hdr->ymove, (GLubyte *)(hdr+1)); } @@ -85,7 +100,7 @@ __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - + __GLX_SWAP_INT((GLbyte *)&hdr->target); __GLX_SWAP_INT((GLbyte *)&hdr->level); __GLX_SWAP_INT((GLbyte *)&hdr->components); @@ -94,7 +109,7 @@ __GLX_SWAP_INT((GLbyte *)&hdr->border); __GLX_SWAP_INT((GLbyte *)&hdr->format); __GLX_SWAP_INT((GLbyte *)&hdr->type); - + /* ** Just invert swapBytes flag; the GL will figure out if it needs to swap ** the pixel data. @@ -106,13 +121,13 @@ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); - glTexImage1D(hdr->target, - (GLint) hdr->level, - (GLint) hdr->components, + glTexImage1D(hdr->target, + (GLint) hdr->level, + (GLint) hdr->components, (GLsizei) hdr->width, - (GLint) hdr->border, - hdr->format, - hdr->type, + (GLint) hdr->border, + hdr->format, + hdr->type, (GLvoid *)(hdr+1)); } @@ -125,7 +140,7 @@ __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - + __GLX_SWAP_INT((GLbyte *)&hdr->target); __GLX_SWAP_INT((GLbyte *)&hdr->level); __GLX_SWAP_INT((GLbyte *)&hdr->components); @@ -134,7 +149,7 @@ __GLX_SWAP_INT((GLbyte *)&hdr->border); __GLX_SWAP_INT((GLbyte *)&hdr->format); __GLX_SWAP_INT((GLbyte *)&hdr->type); - + /* ** Just invert swapBytes flag; the GL will figure out if it needs to swap ** the pixel data. @@ -146,17 +161,60 @@ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); - glTexImage2D(hdr->target, - (GLint) hdr->level, - (GLint) hdr->components, + glTexImage2D(hdr->target, + (GLint) hdr->level, + (GLint) hdr->components, (GLsizei) hdr->width, - (GLsizei) hdr->height, - (GLint) hdr->border, - hdr->format, + (GLsizei) hdr->height, + (GLint) hdr->border, + hdr->format, hdr->type, (GLvoid *)(hdr+1)); } +void __glXDispSwap_TexImage3D(GLbyte *pc) +{ + __GLXdispatchTexImage3DHeader *hdr = (__GLXdispatchTexImage3DHeader *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); + __GLX_SWAP_INT((GLbyte *)&hdr->imageHeight); + __GLX_SWAP_INT((GLbyte *)&hdr->imageDepth); + __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); + __GLX_SWAP_INT((GLbyte *)&hdr->skipImages); + __GLX_SWAP_INT((GLbyte *)&hdr->skipVolumes); + __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); + __GLX_SWAP_INT((GLbyte *)&hdr->alignment); + + __GLX_SWAP_INT((GLbyte *)&hdr->target); + __GLX_SWAP_INT((GLbyte *)&hdr->level); + __GLX_SWAP_INT((GLbyte *)&hdr->internalformat); + __GLX_SWAP_INT((GLbyte *)&hdr->width); + __GLX_SWAP_INT((GLbyte *)&hdr->height); + __GLX_SWAP_INT((GLbyte *)&hdr->depth); + __GLX_SWAP_INT((GLbyte *)&hdr->size4d); + __GLX_SWAP_INT((GLbyte *)&hdr->border); + __GLX_SWAP_INT((GLbyte *)&hdr->format); + __GLX_SWAP_INT((GLbyte *)&hdr->type); + + /* + ** Just invert swapBytes flag; the GL will figure out if it needs to swap + ** the pixel data. + */ + glPixelStorei(GL_UNPACK_SWAP_BYTES, !hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); + glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, hdr->imageHeight); + glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_IMAGES, hdr->skipImages); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + + glTexImage3D(hdr->target, hdr->level, hdr->internalformat, hdr->width, + hdr->height, hdr->depth, hdr->border, hdr->format, hdr->type, + (GLvoid *)(hdr+1)); +} + void __glXDispSwap_DrawPixels(GLbyte *pc) { __GLXdispatchDrawPixelsHeader *hdr = (__GLXdispatchDrawPixelsHeader *) pc; @@ -166,12 +224,12 @@ __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - + __GLX_SWAP_INT((GLbyte *)&hdr->width); __GLX_SWAP_INT((GLbyte *)&hdr->height); __GLX_SWAP_INT((GLbyte *)&hdr->format); __GLX_SWAP_INT((GLbyte *)&hdr->type); - + /* ** Just invert swapBytes flag; the GL will figure out if it needs to swap ** the pixel data. @@ -183,9 +241,9 @@ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); - glDrawPixels((GLsizei) hdr->width, - (GLsizei) hdr->height, - hdr->format, + glDrawPixels((GLsizei) hdr->width, + (GLsizei) hdr->height, + hdr->format, hdr->type, (GLvoid *)(hdr+1)); } @@ -199,14 +257,14 @@ __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - + __GLX_SWAP_INT((GLbyte *)&hdr->target); __GLX_SWAP_INT((GLbyte *)&hdr->level); __GLX_SWAP_INT((GLbyte *)&hdr->xoffset); __GLX_SWAP_INT((GLbyte *)&hdr->width); __GLX_SWAP_INT((GLbyte *)&hdr->format); __GLX_SWAP_INT((GLbyte *)&hdr->type); - + /* ** Just invert swapBytes flag; the GL will figure out if it needs to swap ** the pixel data. @@ -218,12 +276,12 @@ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); - glTexSubImage1D(hdr->target, - (GLint) hdr->level, - (GLint) hdr->xoffset, + glTexSubImage1D(hdr->target, + (GLint) hdr->level, + (GLint) hdr->xoffset, (GLsizei) hdr->width, - hdr->format, - hdr->type, + hdr->format, + hdr->type, (GLvoid *)(hdr+1)); } @@ -236,7 +294,7 @@ __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - + __GLX_SWAP_INT((GLbyte *)&hdr->target); __GLX_SWAP_INT((GLbyte *)&hdr->level); __GLX_SWAP_INT((GLbyte *)&hdr->xoffset); @@ -245,7 +303,7 @@ __GLX_SWAP_INT((GLbyte *)&hdr->height); __GLX_SWAP_INT((GLbyte *)&hdr->format); __GLX_SWAP_INT((GLbyte *)&hdr->type); - + /* ** Just invert swapBytes flag; the GL will figure out if it needs to swap ** the pixel data. @@ -257,13 +315,236 @@ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); - glTexSubImage2D(hdr->target, - (GLint) hdr->level, - (GLint) hdr->xoffset, + glTexSubImage2D(hdr->target, + (GLint) hdr->level, + (GLint) hdr->xoffset, (GLint) hdr->yoffset, - (GLsizei) hdr->width, - (GLsizei) hdr->height, - hdr->format, + (GLsizei) hdr->width, + (GLsizei) hdr->height, + hdr->format, hdr->type, (GLvoid *)(hdr+1)); +} + +void __glXDispSwap_TexSubImage3D(GLbyte *pc) +{ + __GLXdispatchTexSubImage3DHeader *hdr = + (__GLXdispatchTexSubImage3DHeader *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); + __GLX_SWAP_INT((GLbyte *)&hdr->imageHeight); + __GLX_SWAP_INT((GLbyte *)&hdr->imageDepth); + __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); + __GLX_SWAP_INT((GLbyte *)&hdr->skipImages); + __GLX_SWAP_INT((GLbyte *)&hdr->skipVolumes); + __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); + __GLX_SWAP_INT((GLbyte *)&hdr->alignment); + + __GLX_SWAP_INT((GLbyte *)&hdr->target); + __GLX_SWAP_INT((GLbyte *)&hdr->level); + __GLX_SWAP_INT((GLbyte *)&hdr->xoffset); + __GLX_SWAP_INT((GLbyte *)&hdr->yoffset); + __GLX_SWAP_INT((GLbyte *)&hdr->zoffset); + __GLX_SWAP_INT((GLbyte *)&hdr->width); + __GLX_SWAP_INT((GLbyte *)&hdr->height); + __GLX_SWAP_INT((GLbyte *)&hdr->depth); + __GLX_SWAP_INT((GLbyte *)&hdr->size4d); + __GLX_SWAP_INT((GLbyte *)&hdr->format); + __GLX_SWAP_INT((GLbyte *)&hdr->type); + + /* + ** Just invert swapBytes flag; the GL will figure out if it needs to swap + ** the pixel data. + */ + glPixelStorei(GL_UNPACK_SWAP_BYTES, !hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); + glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, hdr->imageHeight); + glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_IMAGES, hdr->skipImages); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + + glTexSubImage3D(hdr->target, hdr->level, hdr->xoffset, hdr->yoffset, + hdr->zoffset, hdr->width, hdr->height, hdr->depth, + hdr->format, hdr->type, (GLvoid *)(hdr+1)); +} + +void __glXDispSwap_ColorTable(GLbyte *pc) +{ + __GLXdispatchColorTableHeader *hdr = + (__GLXdispatchColorTableHeader *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); + __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); + __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); + __GLX_SWAP_INT((GLbyte *)&hdr->alignment); + + __GLX_SWAP_INT((GLbyte *)&hdr->target); + __GLX_SWAP_INT((GLbyte *)&hdr->internalformat); + __GLX_SWAP_INT((GLbyte *)&hdr->width); + __GLX_SWAP_INT((GLbyte *)&hdr->format); + __GLX_SWAP_INT((GLbyte *)&hdr->type); + + /* + ** Just invert swapBytes flag; the GL will figure out if it needs to swap + ** the pixel data. + */ + glPixelStorei(GL_UNPACK_SWAP_BYTES, !hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + + glColorTable(hdr->target, hdr->internalformat, + hdr->width, hdr->format, hdr->type, + (GLvoid *)(hdr+1)); +} + +void __glXDispSwap_ColorSubTable(GLbyte *pc) +{ + __GLXdispatchColorSubTableHeader *hdr = + (__GLXdispatchColorSubTableHeader *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); + __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); + __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); + __GLX_SWAP_INT((GLbyte *)&hdr->alignment); + + __GLX_SWAP_INT((GLbyte *)&hdr->target); + __GLX_SWAP_INT((GLbyte *)&hdr->start); + __GLX_SWAP_INT((GLbyte *)&hdr->count); + __GLX_SWAP_INT((GLbyte *)&hdr->format); + __GLX_SWAP_INT((GLbyte *)&hdr->type); + + /* + ** Just invert swapBytes flag; the GL will figure out if it needs to swap + ** the pixel data. + */ + glPixelStorei(GL_UNPACK_SWAP_BYTES, !hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + + glColorSubTable(hdr->target, hdr->start, hdr->count, hdr->format, + hdr->type, (GLvoid *)(hdr+1)); +} + +void __glXDispSwap_ConvolutionFilter1D(GLbyte *pc) +{ + __GLXdispatchConvolutionFilterHeader *hdr = + (__GLXdispatchConvolutionFilterHeader *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); + __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); + __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); + __GLX_SWAP_INT((GLbyte *)&hdr->alignment); + + __GLX_SWAP_INT((GLbyte *)&hdr->target); + __GLX_SWAP_INT((GLbyte *)&hdr->internalformat); + __GLX_SWAP_INT((GLbyte *)&hdr->width); + __GLX_SWAP_INT((GLbyte *)&hdr->format); + __GLX_SWAP_INT((GLbyte *)&hdr->type); + + /* + ** Just invert swapBytes flag; the GL will figure out if it needs to swap + ** the pixel data. + */ + glPixelStorei(GL_UNPACK_SWAP_BYTES, !hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + + glConvolutionFilter2D(hdr->target, hdr->internalformat, + hdr->width, 1, hdr->format, hdr->type, + (GLvoid *)(hdr+1)); +} + +void __glXDispSwap_ConvolutionFilter2D(GLbyte *pc) +{ + __GLXdispatchConvolutionFilterHeader *hdr = + (__GLXdispatchConvolutionFilterHeader *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); + __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); + __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); + __GLX_SWAP_INT((GLbyte *)&hdr->alignment); + + __GLX_SWAP_INT((GLbyte *)&hdr->target); + __GLX_SWAP_INT((GLbyte *)&hdr->internalformat); + __GLX_SWAP_INT((GLbyte *)&hdr->width); + __GLX_SWAP_INT((GLbyte *)&hdr->height); + __GLX_SWAP_INT((GLbyte *)&hdr->format); + __GLX_SWAP_INT((GLbyte *)&hdr->type); + + /* + ** Just invert swapBytes flag; the GL will figure out if it needs to swap + ** the pixel data. + */ + glPixelStorei(GL_UNPACK_SWAP_BYTES, !hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + + glConvolutionFilter2D(hdr->target, hdr->internalformat, + hdr->width, hdr->height, hdr->format, hdr->type, + (GLvoid *)(hdr+1)); +} + +void __glXDispSwap_SeparableFilter2D(GLbyte *pc) +{ + __GLXdispatchConvolutionFilterHeader *hdr = + (__GLXdispatchConvolutionFilterHeader *) pc; + GLint hdrlen, image1len; + __GLX_DECLARE_SWAP_VARIABLES; + + hdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_HDR_SIZE); + + __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); + __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); + __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); + __GLX_SWAP_INT((GLbyte *)&hdr->alignment); + + __GLX_SWAP_INT((GLbyte *)&hdr->target); + __GLX_SWAP_INT((GLbyte *)&hdr->internalformat); + __GLX_SWAP_INT((GLbyte *)&hdr->width); + __GLX_SWAP_INT((GLbyte *)&hdr->height); + __GLX_SWAP_INT((GLbyte *)&hdr->format); + __GLX_SWAP_INT((GLbyte *)&hdr->type); + + /* + ** Just invert swapBytes flag; the GL will figure out if it needs to swap + ** the pixel data. + */ + glPixelStorei(GL_UNPACK_SWAP_BYTES, !hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + + /* XXX check this usage - internal code called + ** a version without the packing parameters + */ + image1len = __glXImageSize(hdr->format, hdr->type, hdr->width, 1, + hdr->rowLength, hdr->skipRows, hdr->alignment); + image1len = __GLX_PAD(image1len); + + + glSeparableFilter2D(hdr->target, hdr->internalformat, + hdr->width, hdr->height, hdr->format, hdr->type, + ((GLubyte *)hdr+hdrlen), ((GLubyte *)hdr+hdrlen+image1len)); } Index: xc/programs/Xserver/GL/glx/rensize.c diff -u xc/programs/Xserver/GL/glx/rensize.c:1.2 xc/programs/Xserver/GL/glx/rensize.c:1.3 --- xc/programs/Xserver/GL/glx/rensize.c:1.2 Mon Jun 14 03:31:34 1999 +++ xc/programs/Xserver/GL/glx/rensize.c Wed Mar 21 11:29:37 2001 @@ -1,28 +1,42 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/rensize.c,v 1.2 1999/06/14 07:31:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/rensize.c,v 1.3 2001/03/21 16:29:37 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ -#include "glxserver.h" #include -#include +#include "glxserver.h" +#include "GL/glxproto.h" #include "unpack.h" #include "impsize.h" @@ -64,7 +78,7 @@ } return 4 * __glLightfv_size( pname ); /* defined in samplegl lib */ } - + int __glXLightivReqSize(GLbyte *pc, Bool swap ) { return __glXLightfvReqSize( pc, swap ); @@ -159,7 +173,7 @@ { GLenum target; GLint order, k; - + target = *(GLenum*) (pc + 16); order = *(GLint*) (pc + 20); if (swap) { @@ -174,8 +188,8 @@ { GLenum target; GLint order, k; - - target = *(GLenum *)(pc + 0); + + target = *(GLenum *)(pc + 0); order = *(GLint *)(pc + 12); if (swap) { target = SWAPL( target ); @@ -195,7 +209,7 @@ { GLenum target; GLint uorder, vorder, k; - + target = *(GLenum *)(pc + 32); uorder = *(GLint *)(pc + 36); vorder = *(GLint *)(pc + 40); @@ -212,8 +226,8 @@ { GLenum target; GLint uorder, vorder, k; - - target = *(GLenum *)(pc + 0); + + target = *(GLenum *)(pc + 0); uorder = *(GLint *)(pc + 12); vorder = *(GLint *)(pc + 24); if (swap) { @@ -250,19 +264,19 @@ return 2 * mapsize; } -static int ImageSize( GLenum format, GLenum type, GLsizei w, GLsizei h, - GLint rowLength, GLint skipRows, GLint alignment ) +int __glXImageSize( GLenum format, GLenum type, GLsizei w, GLsizei h, + GLint rowLength, GLint skipRows, GLint alignment ) { GLint bytesPerElement, elementsPerGroup, groupsPerRow; GLint groupSize, rowSize, padding; - + if (w < 0 || h < 0 || (type == GL_BITMAP && (format != GL_COLOR_INDEX && format != GL_STENCIL_INDEX))) { return -1; } if (w==0 || h==0) return 0; - + if (type == GL_BITMAP) { if (rowLength > 0) { groupsPerRow = rowLength; @@ -276,23 +290,117 @@ } return ((h + skipRows) * rowSize); } else { + switch(format) { + case GL_COLOR_INDEX: + case GL_STENCIL_INDEX: + case GL_DEPTH_COMPONENT: + elementsPerGroup = 1; + break; + case GL_RED: + case GL_GREEN: + case GL_BLUE: + case GL_ALPHA: + case GL_LUMINANCE: + elementsPerGroup = 1; + break; + case GL_LUMINANCE_ALPHA: + elementsPerGroup = 2; + break; + case GL_RGB: + case GL_BGR: + elementsPerGroup = 3; + break; + case GL_RGBA: + case GL_BGRA: + case GL_ABGR_EXT: + elementsPerGroup = 4; + break; + default: + return -1; + } switch(type) { case GL_UNSIGNED_BYTE: case GL_BYTE: bytesPerElement = 1; break; + case GL_UNSIGNED_BYTE_3_3_2: + case GL_UNSIGNED_BYTE_2_3_3_REV: + bytesPerElement = 1; + elementsPerGroup = 1; + break; case GL_UNSIGNED_SHORT: case GL_SHORT: bytesPerElement = 2; break; + case GL_UNSIGNED_SHORT_5_6_5: + case GL_UNSIGNED_SHORT_5_6_5_REV: + case GL_UNSIGNED_SHORT_4_4_4_4: + case GL_UNSIGNED_SHORT_4_4_4_4_REV: + case GL_UNSIGNED_SHORT_5_5_5_1: + case GL_UNSIGNED_SHORT_1_5_5_5_REV: + bytesPerElement = 2; + elementsPerGroup = 1; + break; case GL_INT: case GL_UNSIGNED_INT: case GL_FLOAT: bytesPerElement = 4; break; + case GL_UNSIGNED_INT_8_8_8_8: + case GL_UNSIGNED_INT_8_8_8_8_REV: + case GL_UNSIGNED_INT_10_10_10_2: + case GL_UNSIGNED_INT_2_10_10_10_REV: + bytesPerElement = 4; + elementsPerGroup = 1; + break; default: return -1; } + groupSize = bytesPerElement * elementsPerGroup; + if (rowLength > 0) { + groupsPerRow = rowLength; + } else { + groupsPerRow = w; + } + rowSize = groupsPerRow * groupSize; + padding = (rowSize % alignment); + if (padding) { + rowSize += alignment - padding; + } + return ((h + skipRows) * rowSize); + } +} + +/* XXX + * This should be folded into __glXImageSize(). + */ +int __glXImage3DSize( GLenum format, GLenum type, GLsizei w, GLsizei h, + GLsizei d, GLint imageHeight, GLint rowLength, + GLint skipImages, GLint skipRows, GLint alignment ) +{ + GLint bytesPerElement, elementsPerGroup, groupsPerRow; + GLint groupSize, rowSize, padding, imageSize; + + if (w < 0 || h < 0 || d < 0 || + (type == GL_BITMAP && + (format != GL_COLOR_INDEX && format != GL_STENCIL_INDEX))) { + return -1; + } + if (w==0 || h==0 || d == 0) return 0; + + if (type == GL_BITMAP) { + if (rowLength > 0) { + groupsPerRow = rowLength; + } else { + groupsPerRow = w; + } + rowSize = (groupsPerRow + 7) >> 3; + padding = (rowSize % alignment); + if (padding) { + rowSize += alignment - padding; + } + return ((h + skipRows) * rowSize); + } else { switch(format) { case GL_COLOR_INDEX: case GL_STENCIL_INDEX: @@ -310,15 +418,55 @@ elementsPerGroup = 2; break; case GL_RGB: + case GL_BGR: elementsPerGroup = 3; break; case GL_RGBA: + case GL_BGRA: case GL_ABGR_EXT: elementsPerGroup = 4; break; default: return -1; } + switch(type) { + case GL_UNSIGNED_BYTE: + case GL_BYTE: + bytesPerElement = 1; + break; + case GL_UNSIGNED_BYTE_3_3_2: + case GL_UNSIGNED_BYTE_2_3_3_REV: + bytesPerElement = 1; + elementsPerGroup = 1; + break; + case GL_UNSIGNED_SHORT: + case GL_SHORT: + bytesPerElement = 2; + break; + case GL_UNSIGNED_SHORT_5_6_5: + case GL_UNSIGNED_SHORT_5_6_5_REV: + case GL_UNSIGNED_SHORT_4_4_4_4: + case GL_UNSIGNED_SHORT_4_4_4_4_REV: + case GL_UNSIGNED_SHORT_5_5_5_1: + case GL_UNSIGNED_SHORT_1_5_5_5_REV: + bytesPerElement = 2; + elementsPerGroup = 1; + break; + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + bytesPerElement = 4; + break; + case GL_UNSIGNED_INT_8_8_8_8: + case GL_UNSIGNED_INT_8_8_8_8_REV: + case GL_UNSIGNED_INT_10_10_10_2: + case GL_UNSIGNED_INT_2_10_10_10_REV: + bytesPerElement = 4; + elementsPerGroup = 1; + break; + default: + return -1; + } groupSize = bytesPerElement * elementsPerGroup; if (rowLength > 0) { groupsPerRow = rowLength; @@ -330,10 +478,16 @@ if (padding) { rowSize += alignment - padding; } - return ((h + skipRows) * rowSize); + if (imageHeight > 0) { + imageSize = (imageHeight + skipRows) * rowSize; + } else { + imageSize = (h + skipRows) * rowSize; + } + return ((d + skipImages) * imageSize); } } + int __glXDrawPixelsReqSize(GLbyte *pc, Bool swap ) { __GLXdispatchDrawPixelsHeader *hdr = (__GLXdispatchDrawPixelsHeader *) pc; @@ -350,11 +504,11 @@ type = SWAPL( type ); w = SWAPL( w ); h = SWAPL( h ); - rowLength = SWAPL( rowLength ); + rowLength = SWAPL( rowLength ); skipRows = SWAPL( skipRows ); alignment = SWAPL( alignment ); } - return ImageSize( format, type, w, h, rowLength, skipRows, alignment ); + return __glXImageSize( format, type, w, h, rowLength, skipRows, alignment ); } int __glXBitmapReqSize(GLbyte *pc, Bool swap ) @@ -369,11 +523,11 @@ if (swap) { w = SWAPL( w ); h = SWAPL( h ); - rowLength = SWAPL( rowLength ); + rowLength = SWAPL( rowLength ); skipRows = SWAPL( skipRows ); alignment = SWAPL( alignment ); } - return ImageSize( GL_COLOR_INDEX, GL_BITMAP, w, h, + return __glXImageSize( GL_COLOR_INDEX, GL_BITMAP, w, h, rowLength, skipRows, alignment ); } @@ -402,7 +556,7 @@ } else if (format == GL_STENCIL_INDEX || format == GL_DEPTH_COMPONENT) { return -1; } - return ImageSize( format, type, w, 1, rowLength, skipRows, alignment ); + return __glXImageSize( format, type, w, 1, rowLength, skipRows, alignment ); } int __glXTexImage2DReqSize(GLbyte *pc, Bool swap ) @@ -432,20 +586,21 @@ } else if (format == GL_STENCIL_INDEX || format == GL_DEPTH_COMPONENT) { return -1; } - return ImageSize( format, type, w, h, rowLength, skipRows, alignment ); + return __glXImageSize( format, type, w, h, rowLength, skipRows, alignment ); } +/* XXX this is used elsewhere - should it be exported from glxserver.h? */ int __glXTypeSize(GLenum enm) { switch(enm) { - case GL_BYTE: return sizeof(GLbyte); - case GL_UNSIGNED_BYTE: return sizeof(GLubyte); - case GL_SHORT: return sizeof(GLshort); - case GL_UNSIGNED_SHORT: return sizeof(GLushort); - case GL_INT: return sizeof(GLint); - case GL_UNSIGNED_INT: return sizeof(GLint); - case GL_FLOAT: return sizeof(GLfloat); - case GL_DOUBLE: return sizeof(GLdouble); + case GL_BYTE: return sizeof(GLbyte); + case GL_UNSIGNED_BYTE: return sizeof(GLubyte); + case GL_SHORT: return sizeof(GLshort); + case GL_UNSIGNED_SHORT: return sizeof(GLushort); + case GL_INT: return sizeof(GLint); + case GL_UNSIGNED_INT: return sizeof(GLint); + case GL_FLOAT: return sizeof(GLfloat); + case GL_DOUBLE: return sizeof(GLdouble); default: return -1; } } @@ -478,32 +633,32 @@ component = SWAPL( component ); } - switch (component) { - case GL_VERTEX_ARRAY: - case GL_COLOR_ARRAY: - case GL_TEXTURE_COORD_ARRAY: - break; - case GL_NORMAL_ARRAY: - if (numVals != 3) { + switch (component) { + case GL_VERTEX_ARRAY: + case GL_COLOR_ARRAY: + case GL_TEXTURE_COORD_ARRAY: + break; + case GL_NORMAL_ARRAY: + if (numVals != 3) { /* bad size */ - return -1; - } + return -1; + } break; - case GL_INDEX_ARRAY: - if (numVals != 1) { + case GL_INDEX_ARRAY: + if (numVals != 1) { /* bad size */ - return -1; - } - break; - case GL_EDGE_FLAG_ARRAY: - if ((numVals != 1) && (datatype != GL_UNSIGNED_BYTE)) { + return -1; + } + break; + case GL_EDGE_FLAG_ARRAY: + if ((numVals != 1) && (datatype != GL_UNSIGNED_BYTE)) { /* bad size or bad type */ return -1; - } - break; - default: - /* unknown component type */ - return -1; + } + break; + default: + /* unknown component type */ + return -1; } arrayElementSize += __GLX_PAD(numVals * __glXTypeSize(datatype)); @@ -512,7 +667,7 @@ } return ((numComponents * sizeof(__GLXdispatchDrawArraysComponentHeader)) + - (numVertexes * arrayElementSize)); + (numVertexes * arrayElementSize)); } int __glXPrioritizeTexturesReqSize(GLbyte *pc, Bool swap ) @@ -541,7 +696,7 @@ skipRows = SWAPL( skipRows ); alignment = SWAPL( alignment ); } - return ImageSize( format, type, w, 1, rowLength, skipRows, alignment ); + return __glXImageSize( format, type, w, 1, rowLength, skipRows, alignment ); } int __glXTexSubImage2DReqSize(GLbyte *pc, Bool swap ) @@ -564,6 +719,281 @@ rowLength = SWAPL( rowLength ); skipRows = SWAPL( skipRows ); alignment = SWAPL( alignment ); + } + return __glXImageSize( format, type, w, h, rowLength, skipRows, alignment ); +} + +int __glXTexImage3DReqSize(GLbyte *pc, Bool swap ) +{ + __GLXdispatchTexImage3DHeader *hdr = (__GLXdispatchTexImage3DHeader *) pc; + GLenum target = hdr->target; + GLenum format = hdr->format; + GLenum type = hdr->type; + GLint w = hdr->width; + GLint h = hdr->height; + GLint d = hdr->depth; + GLint imageHeight = hdr->imageHeight; + GLint rowLength = hdr->rowLength; + GLint skipImages = hdr->skipImages; + GLint skipRows = hdr->skipRows; + GLint alignment = hdr->alignment; + GLint nullImage = hdr->nullimage; + + if (swap) { + target = SWAPL( target ); + format = SWAPL( format ); + type = SWAPL( type ); + w = SWAPL( w ); + h = SWAPL( h ); + d = SWAPL( d ); + imageHeight = SWAPL( imageHeight ); + rowLength = SWAPL( rowLength ); + skipImages = SWAPL( skipImages ); + skipRows = SWAPL( skipRows ); + alignment = SWAPL( alignment ); + } + if (target == GL_PROXY_TEXTURE_3D || nullImage) { + return 0; + } else { + return __glXImage3DSize( format, type, w, h, d, imageHeight, + rowLength, skipImages, skipRows, + alignment); + } +} + +int __glXTexSubImage3DReqSize(GLbyte *pc, Bool swap ) +{ + __GLXdispatchTexSubImage3DHeader *hdr = + (__GLXdispatchTexSubImage3DHeader *) pc; + GLenum target = hdr->target; + GLenum format = hdr->format; + GLenum type = hdr->type; + GLint w = hdr->width; + GLint h = hdr->height; + GLint d = hdr->depth; + GLint imageHeight = hdr->imageHeight; + GLint rowLength = hdr->rowLength; + GLint skipImages = hdr->skipImages; + GLint skipRows = hdr->skipRows; + GLint alignment = hdr->alignment; + + if (swap) { + target = SWAPL( target ); + format = SWAPL( format ); + type = SWAPL( type ); + w = SWAPL( w ); + h = SWAPL( h ); + d = SWAPL( d ); + imageHeight = SWAPL( imageHeight ); + rowLength = SWAPL( rowLength ); + skipImages = SWAPL( skipImages ); + skipRows = SWAPL( skipRows ); + alignment = SWAPL( alignment ); + } + if (target == GL_PROXY_TEXTURE_3D) { + return 0; + } else { + return __glXImage3DSize( format, type, w, h, d, imageHeight, + rowLength, skipImages, skipRows, + alignment); + } +} + +int __glXConvolutionFilter1DReqSize(GLbyte *pc, Bool swap ) +{ + __GLXdispatchConvolutionFilterHeader *hdr = + (__GLXdispatchConvolutionFilterHeader *) pc; + + GLenum format = hdr->format; + GLenum type = hdr->type; + GLint w = hdr->width; + GLint rowLength = hdr->rowLength; + GLint alignment = hdr->alignment; + + if (swap) { + format = SWAPL( format ); + type = SWAPL( type ); + w = SWAPL( w ); + rowLength = SWAPL( rowLength ); + alignment = SWAPL( alignment ); + } + + return __glXImageSize ( format, type, w, 1, rowLength, 0, alignment ); +} + +int __glXConvolutionFilter2DReqSize(GLbyte *pc, Bool swap ) +{ + __GLXdispatchConvolutionFilterHeader *hdr = + (__GLXdispatchConvolutionFilterHeader *) pc; + + GLenum format = hdr->format; + GLenum type = hdr->type; + GLint w = hdr->width; + GLint h = hdr->height; + GLint rowLength = hdr->rowLength; + GLint skipRows = hdr->skipRows; + GLint alignment = hdr->alignment; + + if (swap) { + format = SWAPL( format ); + type = SWAPL( type ); + w = SWAPL( w ); + h = SWAPL( h ); + rowLength = SWAPL( rowLength ); + skipRows = SWAPL( skipRows ); + alignment = SWAPL( alignment ); } - return ImageSize( format, type, w, h, rowLength, skipRows, alignment ); + + return __glXImageSize ( format, type, w, h, rowLength, skipRows, alignment ); +} + +int __glXConvolutionParameterivSize(GLenum pname) +{ + switch (pname) { + case GL_CONVOLUTION_BORDER_COLOR: + case GL_CONVOLUTION_FILTER_SCALE: + case GL_CONVOLUTION_FILTER_BIAS: + return 4; + case GL_CONVOLUTION_BORDER_MODE: + return 1; + default: + return -1; + } +} + +int __glXConvolutionParameterfvSize(GLenum pname) +{ + return __glXConvolutionParameterivSize(pname); +} + +int __glXConvolutionParameterivReqSize(GLbyte *pc, Bool swap ) +{ + GLenum pname = *(GLenum *)(pc + 4); + if (swap) { + pname = SWAPL( pname ); + } + return 4 * __glXConvolutionParameterivSize( pname ); +} + +int __glXConvolutionParameterfvReqSize(GLbyte *pc, Bool swap ) +{ + return __glXConvolutionParameterivReqSize( pc, swap ); +} + +int __glXSeparableFilter2DReqSize(GLbyte *pc, Bool swap ) +{ + __GLXdispatchConvolutionFilterHeader *hdr = + (__GLXdispatchConvolutionFilterHeader *) pc; + + GLint image1size, image2size; + GLenum format = hdr->format; + GLenum type = hdr->type; + GLint w = hdr->width; + GLint h = hdr->height; + GLint rowLength = hdr->rowLength; + GLint alignment = hdr->alignment; + + if (swap) { + format = SWAPL( format ); + type = SWAPL( type ); + w = SWAPL( w ); + h = SWAPL( h ); + rowLength = SWAPL( rowLength ); + alignment = SWAPL( alignment ); + } + + /* XXX Should rowLength be used for either or both image? */ + image1size = __glXImageSize ( format, type, w, 1, rowLength, 0, alignment ); + image1size = __GLX_PAD(image1size); + image2size = __glXImageSize ( format, type, h, 1, rowLength, 0, alignment ); + return image1size + image2size; + +} + +int __glXColorTableParameterfvSize(GLenum pname) +{ + /* currently, only scale and bias are supported; return RGBA */ + switch(pname) { + case GL_COLOR_TABLE_SCALE: + case GL_COLOR_TABLE_BIAS: + return 4; + default: + return 0; + } +} + +int __glXColorTableParameterivSize(GLenum pname) +{ + /* fv and iv are the same in this context */ + return __glXColorTableParameterfvSize(pname); +} + +int __glXColorTableReqSize(GLbyte *pc, Bool swap ) +{ + __GLXdispatchColorTableHeader *hdr = + (__GLXdispatchColorTableHeader *) pc; + + GLenum target = hdr->target; + GLenum format = hdr->format; + GLenum type = hdr->type; + GLint w = hdr->width; + GLint rowLength = hdr->rowLength; + GLint alignment = hdr->alignment; + + switch (target) { + case GL_PROXY_TEXTURE_1D: + case GL_PROXY_TEXTURE_2D: + case GL_PROXY_TEXTURE_3D: + case GL_PROXY_COLOR_TABLE: + case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE: + case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE: + return 0; + } + + if (swap) { + format = SWAPL( format ); + type = SWAPL( type ); + w = SWAPL( w ); + rowLength = SWAPL( rowLength ); + alignment = SWAPL( alignment ); + } + + return __glXImageSize ( format, type, w, 1, rowLength, 0, alignment ); +} + +int __glXColorSubTableReqSize(GLbyte *pc, Bool swap ) +{ + __GLXdispatchColorSubTableHeader *hdr = + (__GLXdispatchColorSubTableHeader *) pc; + + GLenum format = hdr->format; + GLenum type = hdr->type; + GLint count = hdr->count; + GLint rowLength = hdr->rowLength; + GLint alignment = hdr->alignment; + + if (swap) { + format = SWAPL( format ); + type = SWAPL( type ); + count = SWAPL( count ); + rowLength = SWAPL( rowLength ); + alignment = SWAPL( alignment ); + } + + return __glXImageSize ( format, type, count, 1, rowLength, 0, alignment ); +} + +int __glXColorTableParameterfvReqSize(GLbyte *pc, Bool swap ) +{ + GLenum pname = *(GLenum *)(pc + 4); + if (swap) { + pname = SWAPL( pname ); + } + return 4 * __glXColorTableParameterfvSize(pname); +} + +int __glXColorTableParameterivReqSize(GLbyte *pc, Bool swap ) +{ + /* no difference between fv and iv versions */ + return __glXColorTableParameterfvReqSize(pc, swap); } Index: xc/programs/Xserver/GL/glx/rensizetab.c diff -u xc/programs/Xserver/GL/glx/rensizetab.c:1.2 xc/programs/Xserver/GL/glx/rensizetab.c:1.3 --- xc/programs/Xserver/GL/glx/rensizetab.c:1.2 Mon Jun 14 03:31:34 1999 +++ xc/programs/Xserver/GL/glx/rensizetab.c Wed Mar 21 11:29:37 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/rensizetab.c,v 1.2 1999/06/14 07:31:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/rensizetab.c,v 1.3 2001/03/21 16:29:37 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #include "glxserver.h" @@ -216,14 +230,2058 @@ /* Translatef */ { 16, 0 }, /* Viewport */ { 20, 0 }, /* PolygonOffset */ { 12, 0 }, - /* DrawArrays */ { 16, __glXDrawArraysSize }, + /* no such opcode */ { 0, 0 }, /* Indexubv */ { 8, 0 }, + /* ColorSubTable */ { 44, __glXColorSubTableReqSize }, + /* CopyColorSubTable */ { 24, 0 }, + /* ActiveTextureARB */ { 8, 0 }, + /* MultiTexCoord1dvARB */ { 16, 0 }, + /* MultiTexCoord1fvARB */ { 12, 0 }, + /* MultiTexCoord1ivARB */ { 12, 0 }, + /* MultiTexCoord1svARB */ { 12, 0 }, + /* MultiTexCoord2dvARB */ { 24, 0 }, + /* MultiTexCoord2fvARB */ { 16, 0 }, + /* MultiTexCoord2ivARB */ { 16, 0 }, + /* MultiTexCoord2svARB */ { 12, 0 }, + /* MultiTexCoord3dvARB */ { 32, 0 }, + /* MultiTexCoord3fvARB */ { 20, 0 }, + /* MultiTexCoord3ivARB */ { 20, 0 }, + /* MultiTexCoord3svARB */ { 16, 0 }, + /* MultiTexCoord4dvARB */ { 40, 0 }, + /* MultiTexCoord4fvARB */ { 24, 0 }, + /* MultiTexCoord4ivARB */ { 24, 0 }, + /* MultiTexCoord4svARB */ { 16, 0 }, }; __GLXrenderSizeData __glXRenderSizeTable_EXT[] = { - /* PolygonOffset */ { 12, 0 }, - /* TexSubImage1D */ { 60, __glXTexSubImage1DReqSize }, - /* TexSubImage2D */ { 60, __glXTexSubImage2DReqSize }, - /* no such opcode */ { 0, 0 }, + /* ColorTable */ { 44, __glXColorTableReqSize }, + /* ColorTableParameterfv */ { 12, __glXColorTableParameterfvReqSize }, + /* ColorTableParameteriv */ { 12, __glXColorTableParameterivReqSize }, + /* CopyColorTable */ { 24, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, @@ -238,11 +2296,32 @@ /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, + /* BlendColor */ { 20, 0 }, + /* BlendEquation */ { 8, 0 }, /* no such opcode */ { 0, 0 }, + /* TexSubImage1D */ { 60, __glXTexSubImage1DReqSize }, + /* TexSubImage2D */ { 60, __glXTexSubImage2DReqSize }, + /* ConvolutionFilter1D */ { 48, __glXConvolutionFilter1DReqSize }, + /* ConvolutionFilter2D */ { 48, __glXConvolutionFilter2DReqSize }, + /* ConvolutionParameterf */ { 16, 0 }, + /* ConvolutionParameterfv */ { 12, __glXConvolutionParameterfvReqSize }, + /* ConvolutionParameteri */ { 16, 0 }, + /* ConvolutionParameteriv */ { 12, __glXConvolutionParameterivReqSize }, + /* CopyConvolutionFilter1D */ { 24, }, + /* CopyConvolutionFilter2D */ { 28, }, + /* SeparableFilter2D */ { 48, __glXSeparableFilter2DReqSize }, + /* Histogram */ { 20, }, + /* Minmax */ { 16, }, + /* ResetHistogram */ { 8, }, + /* ResetMinmax */ { 8, }, + /* TexImage3D */ { 84, __glXTexImage3DReqSize }, + /* TexSubImage3D */ { 92, __glXTexSubImage3DReqSize }, + /* DrawArrays */ { 16, __glXDrawArraysSize }, /* BindTexture */ { 12, 0 }, /* PrioritizeTextures */ { 8, __glXPrioritizeTexturesReqSize }, /* CopyTexImage1D */ { 32, 0 }, /* CopyTexImage2D */ { 36, 0 }, /* CopyTexSubImage1D */ { 28, 0 }, /* CopyTexSubImage2D */ { 36, 0 }, + /* CopyTexSubImage3D */ { 40, 0 }, }; Index: xc/programs/Xserver/GL/glx/single2.c diff -u xc/programs/Xserver/GL/glx/single2.c:1.4 xc/programs/Xserver/GL/glx/single2.c:1.5 --- xc/programs/Xserver/GL/glx/single2.c:1.4 Sun Jul 18 04:34:25 1999 +++ xc/programs/Xserver/GL/glx/single2.c Wed Mar 21 11:29:37 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/single2.c,v 1.4 1999/07/18 08:34:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/single2.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #define NEED_REPLIES @@ -26,6 +40,7 @@ #include "glxext.h" #include "unpack.h" #include "g_disptab.h" +#include "GL/glx_ansic.h" int __glXDisp_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc) { @@ -186,7 +201,6 @@ int __glXDisp_Flush(__GLXclientState *cl, GLbyte *pc) { __GLXcontext *cx; - ClientPtr client = cl->client; int error; cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -282,10 +296,9 @@ __GLXcontext *cx; GLenum name; const char *string; - GLint length; int error; - GLubyte *answer; - char *buf; + char *buf = NULL, *buf1 = NULL; + GLint length = 0; cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { @@ -297,26 +310,32 @@ string = (const char *)glGetString(name); client = cl->client; - if ((name == GL_EXTENSIONS) && (cl->GLClientextensions)) { - buf = __glXcombine_strings(string, + /* + ** Restrict extensions to those that are supported by both the + ** implementation and the connection. That is, return the + ** intersection of client, server, and core extension strings. + */ + if (name == GL_EXTENSIONS) { + buf1 = __glXcombine_strings(string, cl->GLClientextensions); - } else { - buf = __glXMalloc(__glXStrlen(string) + 2); - __glXStrcpy(buf, string); - } - if (!buf) { - length = 0; - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - } else { - length = __glXStrlen((const char *) buf) + 1; - __GLX_BEGIN_REPLY(length); - __GLX_PUT_SIZE(length); + buf = __glXcombine_strings(buf1, + cx->pGlxScreen->GLextensions); + if (buf1 != NULL) { + __glXFree(buf1); + } + string = buf; + } + if (string) { + length = __glXStrlen((const char *) string) + 1; } + __GLX_BEGIN_REPLY(length); + __GLX_PUT_SIZE(length); __GLX_SEND_HEADER(); - WriteToClient(client, length, buf); - __glXFree(buf); + WriteToClient(client, length, (char *) string); + if (buf != NULL) { + __glXFree(buf); + } return Success; } Index: xc/programs/Xserver/GL/glx/single2swap.c diff -u xc/programs/Xserver/GL/glx/single2swap.c:1.4 xc/programs/Xserver/GL/glx/single2swap.c:1.5 --- xc/programs/Xserver/GL/glx/single2swap.c:1.4 Sun Jul 18 04:34:25 1999 +++ xc/programs/Xserver/GL/glx/single2swap.c Wed Mar 21 11:29:37 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/single2swap.c,v 1.4 1999/07/18 08:34:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/single2swap.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #define NEED_REPLIES @@ -26,6 +40,7 @@ #include "glxext.h" #include "unpack.h" #include "g_disptab.h" +#include "GL/glx_ansic.h" int __glXDispSwap_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc) { @@ -251,11 +266,11 @@ __GLXcontext *cx; GLenum name; const char *string; - GLint length; __GLX_DECLARE_SWAP_VARIABLES; int error; GLubyte *answer; - char *buf; + char *buf = NULL, *buf1 = NULL; + GLint length = 0; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -269,28 +284,35 @@ string = (const char *)glGetString(name); client = cl->client; - if ((name == GL_EXTENSIONS) && (cl->GLClientextensions)) { - buf = __glXcombine_strings(string, + /* + ** Restrict extensions to those that are supported by both the + ** implementation and the connection. That is, return the + ** intersection of client, server, and core extension strings. + */ + if (name == GL_EXTENSIONS) { + buf1 = __glXcombine_strings(string, cl->GLClientextensions); - } else { - buf = __glXMalloc(__glXStrlen(string) + 2); - __glXStrcpy(buf, string); - } - if (!buf) { - length = 0; - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - } else { - length = __glXStrlen((const char *) buf) + 1; - __GLX_BEGIN_REPLY(length); - __GLX_PUT_SIZE(length); + buf = __glXcombine_strings(buf1, + cx->pGlxScreen->GLextensions); + if (buf1 != NULL) { + __glXFree(buf1); + } + string = buf; } - + if (string) { + length = __glXStrlen((const char *) string) + 1; + } + + __GLX_BEGIN_REPLY(length); + __GLX_PUT_SIZE(length); + __GLX_SWAP_REPLY_SIZE(); __GLX_SWAP_REPLY_HEADER(); __GLX_SEND_HEADER(); - WriteToClient(client, length, buf); - __glXFree(buf); + WriteToClient(client, length, (char *) string); + if (buf != NULL) { + __glXFree(buf); + } return Success; } Index: xc/programs/Xserver/GL/glx/singlepix.c diff -u xc/programs/Xserver/GL/glx/singlepix.c:1.4 xc/programs/Xserver/GL/glx/singlepix.c:1.5 --- xc/programs/Xserver/GL/glx/singlepix.c:1.4 Sun Jul 18 04:34:25 1999 +++ xc/programs/Xserver/GL/glx/singlepix.c Wed Mar 21 11:29:37 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/singlepix.c,v 1.4 1999/07/18 08:34:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/singlepix.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #define NEED_REPLIES @@ -26,6 +40,7 @@ #include "singlesize.h" #include "unpack.h" #include "g_disptab.h" +#include "g_disptab_EXT.h" int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc) { @@ -57,7 +72,7 @@ glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst); __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); __glXClearErrorOccured(); - glReadPixels( + glReadPixels( *(GLint *)(pc + 0), *(GLint *)(pc + 4), *(GLsizei *)(pc + 8), @@ -87,7 +102,7 @@ ClientPtr client = cl->client; int error; char *answer, answerBuffer[200]; - GLint width=0, height=0; + GLint width=0, height=0, depth=1; cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { @@ -100,20 +115,23 @@ type = *(GLenum *)(pc + 12); target = *(GLenum *)(pc + 0); swapBytes = *(GLboolean *)(pc + 16); - + glGetTexLevelParameteriv(target, level, GL_TEXTURE_WIDTH, &width); glGetTexLevelParameteriv(target, level, GL_TEXTURE_HEIGHT, &height); + if ( target == GL_TEXTURE_3D) { + glGetTexLevelParameteriv(target, level, GL_TEXTURE_DEPTH, &depth); + } /* - * The two queries above might fail if we're in a state where queries - * are illegal, but then width and height would still be zero anyway. + * The three queries above might fail if we're in a state where queries + * are illegal, but then width, height, and depth would still be zero anyway. */ - compsize = __glGetTexImage_size(target,level,format,type,width,height); + compsize = __glGetTexImage_size(target,level,format,type,width,height,depth); if (compsize < 0) compsize = 0; - + glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); __glXClearErrorOccured(); - glGetTexImage( + glGetTexImage( *(GLenum *)(pc + 0), *(GLint *)(pc + 4), *(GLenum *)(pc + 8), @@ -128,6 +146,7 @@ __GLX_BEGIN_REPLY(compsize); ((xGLXGetTexImageReply *)&__glXReply)->width = width; ((xGLXGetTexImageReply *)&__glXReply)->height = height; + ((xGLXGetTexImageReply *)&__glXReply)->depth = depth; __GLX_SEND_HEADER(); __GLX_SEND_VOID_ARRAY(compsize); } @@ -147,17 +166,18 @@ if (!cx) { return error; } + pc += __GLX_SINGLE_HDR_SIZE; lsbFirst = *(GLboolean *)(pc + 0); glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst); __GLX_GET_ANSWER_BUFFER(answer,cl,128,1); - + __glXClearErrorOccured(); - glGetPolygonStipple( + glGetPolygonStipple( (GLubyte *) answer ); - + if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SEND_HEADER(); @@ -169,4 +189,270 @@ return Success; } +int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc) +{ + GLint compsize, compsize2; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + GLint width=0, height=0; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + + /* target must be SEPARABLE_2D, however I guess we can let the GL + barf on this one.... */ + + glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width); + glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height); + /* + * The two queries above might fail if we're in a state where queries + * are illegal, but then width and height would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,1,format,type,width,1,1); + compsize2 = __glGetTexImage_size(target,1,format,type,height,1,1); + + if (compsize < 0) compsize = 0; + if (compsize2 < 0) compsize2 = 0; + compsize = __GLX_PAD(compsize); + compsize2 = __GLX_PAD(compsize2); + + glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize + compsize2,1); + __glXClearErrorOccured(); + glGetSeparableFilter( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + answer, + answer + compsize, + NULL + ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize + compsize2); + ((xGLXGetSeparableFilterReply *)&__glXReply)->width = width; + ((xGLXGetSeparableFilterReply *)&__glXReply)->height = height; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize + compsize2); + } + + return Success; +} + +int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + GLint width=0, height=0; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + + glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width); + if (target == GL_CONVOLUTION_1D) { + height = 1; + } else { + glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height); + } + /* + * The two queries above might fail if we're in a state where queries + * are illegal, but then width and height would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,1,format,type,width,height,1); + if (compsize < 0) compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + glGetConvolutionFilter( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + answer + ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + ((xGLXGetConvolutionFilterReply *)&__glXReply)->width = width; + ((xGLXGetConvolutionFilterReply *)&__glXReply)->height = height; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + return Success; +} + +int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes, reset; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + GLint width=0; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + reset = *(GLboolean *)(pc + 13); + + glGetHistogramParameteriv(target, GL_HISTOGRAM_WIDTH, &width); + /* + * The one query above might fail if we're in a state where queries + * are illegal, but then width would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,1,format,type,width,1,1); + if (compsize < 0) compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + glGetHistogram( target, reset, format, type, answer); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + ((xGLXGetHistogramReply *)&__glXReply)->width = width; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int __glXDisp_GetMinmax(__GLXclientState *cl, GLbyte *pc) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes, reset; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + reset = *(GLboolean *)(pc + 13); + + compsize = __glGetTexImage_size(target,1,format,type,2,1,1); + if (compsize < 0) compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + glGetMinmax( target, reset, format, type, answer); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + GLint width=0; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + target = *(GLenum *)(pc + 0); + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + swapBytes = *(GLboolean *)(pc + 12); + + glGetColorTableParameteriv(target, GL_COLOR_TABLE_WIDTH, &width); + /* + * The one query above might fail if we're in a state where queries + * are illegal, but then width would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,1,format,type,width,1,1); + if (compsize < 0) compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + glGetColorTable( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + answer + ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + ((xGLXGetColorTableReply *)&__glXReply)->width = width; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} Index: xc/programs/Xserver/GL/glx/singlepixswap.c diff -u xc/programs/Xserver/GL/glx/singlepixswap.c:1.4 xc/programs/Xserver/GL/glx/singlepixswap.c:1.5 --- xc/programs/Xserver/GL/glx/singlepixswap.c:1.4 Sun Jul 18 04:34:25 1999 +++ xc/programs/Xserver/GL/glx/singlepixswap.c Wed Mar 21 11:29:37 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/singlepixswap.c,v 1.4 1999/07/18 08:34:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/singlepixswap.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #define NEED_REPLIES @@ -26,6 +40,7 @@ #include "singlesize.h" #include "unpack.h" #include "g_disptab.h" +#include "g_disptab_EXT.h" int __glXDispSwap_ReadPixels(__GLXclientState *cl, GLbyte *pc) { @@ -66,7 +81,7 @@ glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst); __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); __glXClearErrorOccured(); - glReadPixels( + glReadPixels( *(GLint *)(pc + 0), *(GLint *)(pc + 4), *(GLsizei *)(pc + 8), @@ -99,7 +114,7 @@ ClientPtr client = cl->client; int error; char *answer, answerBuffer[200]; - GLint width=0, height=0; + GLint width=0, height=0, depth=1; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -121,17 +136,20 @@ glGetTexLevelParameteriv(target, level, GL_TEXTURE_WIDTH, &width); glGetTexLevelParameteriv(target, level, GL_TEXTURE_HEIGHT, &height); + if ( target == GL_TEXTURE_3D) { + glGetTexLevelParameteriv(target, level, GL_TEXTURE_DEPTH, &depth); + } /* - * The two queries above might fail if we're in a state where queries - * are illegal, but then width and height would still be zero anyway. + * The three queries above might fail if we're in a state where queries + * are illegal, but then width, height, and depth would still be zero anyway. */ - compsize = __glGetTexImage_size(target,level,format,type,width,height); + compsize = __glGetTexImage_size(target,level,format,type,width,height,depth); if (compsize < 0) compsize = 0; - + glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); __glXClearErrorOccured(); - glGetTexImage( + glGetTexImage( *(GLenum *)(pc + 0), *(GLint *)(pc + 4), *(GLenum *)(pc + 8), @@ -148,8 +166,10 @@ __GLX_SWAP_REPLY_HEADER(); __GLX_SWAP_INT(&width); __GLX_SWAP_INT(&height); + __GLX_SWAP_INT(&depth); ((xGLXGetTexImageReply *)&__glXReply)->width = width; ((xGLXGetTexImageReply *)&__glXReply)->height = height; + ((xGLXGetTexImageReply *)&__glXReply)->depth = depth; __GLX_SEND_HEADER(); __GLX_SEND_VOID_ARRAY(compsize); } @@ -176,9 +196,9 @@ glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst); __GLX_GET_ANSWER_BUFFER(answer,cl,128,1); - + __glXClearErrorOccured(); - glGetPolygonStipple( + glGetPolygonStipple( (GLubyte *) answer ); if (__glXErrorOccured()) { @@ -191,5 +211,304 @@ __GLX_SEND_HEADER(); __GLX_SEND_BYTE_ARRAY(128); } + return Success; +} + +int __glXDispSwap_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc) +{ + GLint compsize, compsize2; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + __GLX_DECLARE_SWAP_VARIABLES; + char *answer, answerBuffer[200]; + GLint width=0, height=0; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc+0); + __GLX_SWAP_INT(pc+4); + __GLX_SWAP_INT(pc+8); + + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + + /* target must be SEPARABLE_2D, however I guess we can let the GL + barf on this one.... */ + + glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width); + glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height); + /* + * The two queries above might fail if we're in a state where queries + * are illegal, but then width and height would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,1,format,type,width,1,1); + compsize2 = __glGetTexImage_size(target,1,format,type,height,1,1); + + if (compsize < 0) compsize = 0; + if (compsize2 < 0) compsize2 = 0; + compsize = __GLX_PAD(compsize); + compsize2 = __GLX_PAD(compsize2); + + glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize + compsize2,1); + __glXClearErrorOccured(); + glGetSeparableFilter( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + answer, + answer + compsize, + NULL + ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize + compsize2); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SWAP_INT(&width); + __GLX_SWAP_INT(&height); + ((xGLXGetSeparableFilterReply *)&__glXReply)->width = width; + ((xGLXGetSeparableFilterReply *)&__glXReply)->height = height; + __GLX_SEND_VOID_ARRAY(compsize + compsize2); + } + + return Success; +} + +int __glXDispSwap_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + __GLX_DECLARE_SWAP_VARIABLES; + char *answer, answerBuffer[200]; + GLint width=0, height=0; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc+0); + __GLX_SWAP_INT(pc+4); + __GLX_SWAP_INT(pc+8); + + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + + glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width); + if (target == GL_CONVOLUTION_2D) { + height = 1; + } else { + glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height); + } + /* + * The two queries above might fail if we're in a state where queries + * are illegal, but then width and height would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,1,format,type,width,height,1); + if (compsize < 0) compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + glGetConvolutionFilter( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + answer + ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SWAP_INT(&width); + __GLX_SWAP_INT(&height); + ((xGLXGetConvolutionFilterReply *)&__glXReply)->width = width; + ((xGLXGetConvolutionFilterReply *)&__glXReply)->height = height; + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int __glXDispSwap_GetHistogram(__GLXclientState *cl, GLbyte *pc) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes, reset; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + __GLX_DECLARE_SWAP_VARIABLES; + char *answer, answerBuffer[200]; + GLint width=0; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc+0); + __GLX_SWAP_INT(pc+4); + __GLX_SWAP_INT(pc+8); + + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + reset = *(GLboolean *)(pc + 13); + + glGetHistogramParameteriv(target, GL_HISTOGRAM_WIDTH, &width); + /* + * The one query above might fail if we're in a state where queries + * are illegal, but then width would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,1,format,type,width,1,1); + if (compsize < 0) compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + glGetHistogram( target, reset, format, type, answer); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SWAP_INT(&width); + ((xGLXGetHistogramReply *)&__glXReply)->width = width; + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int __glXDispSwap_GetMinmax(__GLXclientState *cl, GLbyte *pc) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes, reset; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + __GLX_DECLARE_SWAP_VARIABLES; + char *answer, answerBuffer[200]; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc+0); + __GLX_SWAP_INT(pc+4); + __GLX_SWAP_INT(pc+8); + + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + reset = *(GLboolean *)(pc + 13); + + compsize = __glGetTexImage_size(target,1,format,type,2,1,1); + if (compsize < 0) compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + glGetMinmax( target, reset, format, type, answer); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + __GLX_DECLARE_SWAP_VARIABLES; + char *answer, answerBuffer[200]; + GLint width=0; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc+0); + __GLX_SWAP_INT(pc+4); + __GLX_SWAP_INT(pc+8); + + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + + glGetColorTableParameteriv(target, GL_COLOR_TABLE_WIDTH, &width); + /* + * The one query above might fail if we're in a state where queries + * are illegal, but then width would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,1,format,type,width,1,1); + if (compsize < 0) compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + glGetColorTable( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + answer + ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SWAP_INT(&width); + ((xGLXGetColorTableReply *)&__glXReply)->width = width; + __GLX_SEND_VOID_ARRAY(compsize); + } + return Success; } Index: xc/programs/Xserver/GL/glx/singlesize.c diff -u xc/programs/Xserver/GL/glx/singlesize.c:1.2 xc/programs/Xserver/GL/glx/singlesize.c:1.3 --- xc/programs/Xserver/GL/glx/singlesize.c:1.2 Mon Jun 14 03:31:35 1999 +++ xc/programs/Xserver/GL/glx/singlesize.c Wed Mar 21 11:29:37 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/singlesize.c,v 1.2 1999/06/14 07:31:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/singlesize.c,v 1.3 2001/03/21 16:29:37 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #include @@ -34,8 +48,8 @@ { GLint elements, esize; GLint rowsize, padding; - - if (w < 0 || h < 0) { + + if (w < 0 || h < 0) { return -1; } switch (format) { @@ -55,9 +69,11 @@ elements = 2; break; case GL_RGB: + case GL_BGR: elements = 3; break; case GL_RGBA: + case GL_BGRA: case GL_ABGR_EXT: elements = 4; break; @@ -71,7 +87,7 @@ */ switch (type) { case GL_BITMAP: - if (format == GL_COLOR_INDEX || format == GL_STENCIL_INDEX) { + if (format == GL_COLOR_INDEX || format == GL_STENCIL_INDEX) { rowsize = ((w * elements)+7)/8; padding = rowsize % 4; if (padding) { @@ -85,15 +101,36 @@ case GL_UNSIGNED_BYTE: esize = 1; break; + case GL_UNSIGNED_BYTE_3_3_2: + case GL_UNSIGNED_BYTE_2_3_3_REV: + esize = 1; + elements = 1; + break; case GL_SHORT: case GL_UNSIGNED_SHORT: esize = 2; break; + case GL_UNSIGNED_SHORT_5_6_5: + case GL_UNSIGNED_SHORT_5_6_5_REV: + case GL_UNSIGNED_SHORT_4_4_4_4: + case GL_UNSIGNED_SHORT_4_4_4_4_REV: + case GL_UNSIGNED_SHORT_5_5_5_1: + case GL_UNSIGNED_SHORT_1_5_5_5_REV: + esize = 2; + elements = 1; + break; case GL_INT: case GL_UNSIGNED_INT: case GL_FLOAT: esize = 4; break; + case GL_UNSIGNED_INT_8_8_8_8: + case GL_UNSIGNED_INT_8_8_8_8_REV: + case GL_UNSIGNED_INT_10_10_10_2: + case GL_UNSIGNED_INT_2_10_10_10_REV: + esize = 4; + elements = 1; + break; default: return -1; } @@ -151,11 +188,10 @@ { switch (pname) { case GL_TEXTURE_WRAP_S: - return 1; case GL_TEXTURE_WRAP_T: + case GL_TEXTURE_WRAP_R: return 1; case GL_TEXTURE_MIN_FILTER: - return 1; case GL_TEXTURE_MAG_FILTER: return 1; case GL_TEXTURE_BORDER_COLOR: @@ -163,7 +199,12 @@ case GL_TEXTURE_PRIORITY: return 1; case GL_TEXTURE_RESIDENT: - return 1; + return 1; + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + return 1; default: return -1; @@ -184,7 +225,7 @@ return 4; case GL_SPECULAR: return 4; - case GL_POSITION: + case GL_POSITION: return 4; case GL_SPOT_DIRECTION: return 3; @@ -236,7 +277,7 @@ } return 0; } - + GLint __glGetMap_size(GLenum target, GLenum query) { GLint k, order=0, majorMinor[2]; @@ -342,7 +383,7 @@ { GLint size; GLenum query; - + switch (map) { case GL_PIXEL_MAP_I_TO_I: query = GL_PIXEL_MAP_I_TO_I_SIZE; @@ -454,9 +495,13 @@ case GL_POINT_SIZE: return 1; case GL_POINT_SIZE_RANGE: + /* case GL_SMOOTH_POINT_SIZE_RANGE: */ /* alias */ return 2; case GL_POINT_SIZE_GRANULARITY: + /* case GL_SMOOTH_POINT_SIZE_GRANULARITY: */ /* alias */ return 1; + case GL_ALIASED_POINT_SIZE_RANGE: + return 2; case GL_POINT_SMOOTH: return 1; case GL_LINE_SMOOTH: @@ -464,9 +509,13 @@ case GL_LINE_WIDTH: return 1; case GL_LINE_WIDTH_RANGE: + /* case GL_SMOOTH_LINE_WIDTH_RANGE: */ /* alias */ return 2; case GL_LINE_WIDTH_GRANULARITY: + /* case GL_SMOOTH_LINE_WIDTH_GRANULARITY: */ /* alias */ return 1; + case GL_ALIASED_LINE_WIDTH_RANGE: + return 2; case GL_LINE_STIPPLE_PATTERN: return 1; case GL_LINE_STIPPLE_REPEAT: @@ -495,6 +544,8 @@ return 1; case GL_LIGHT_MODEL_AMBIENT: return 4; + case GL_LIGHT_MODEL_COLOR_CONTROL: + return 1; case GL_COLOR_MATERIAL: return 1; case GL_COLOR_MATERIAL_FACE: @@ -637,10 +688,14 @@ return 1; case GL_PACK_ROW_LENGTH: return 1; + case GL_PACK_IMAGE_HEIGHT: + return 1; case GL_PACK_SKIP_ROWS: return 1; case GL_PACK_SKIP_PIXELS: return 1; + case GL_PACK_SKIP_IMAGES: + return 1; case GL_PACK_ALIGNMENT: return 1; case GL_UNPACK_SWAP_BYTES: @@ -649,10 +704,14 @@ return 1; case GL_UNPACK_ROW_LENGTH: return 1; + case GL_UNPACK_IMAGE_HEIGHT: + return 1; case GL_UNPACK_SKIP_ROWS: return 1; case GL_UNPACK_SKIP_PIXELS: return 1; + case GL_UNPACK_SKIP_IMAGES: + return 1; case GL_UNPACK_ALIGNMENT: return 1; case GL_MAP_COLOR: @@ -678,11 +737,11 @@ case GL_ZOOM_X: case GL_ZOOM_Y: return 1; - case GL_PIXEL_MAP_I_TO_I_SIZE: case GL_PIXEL_MAP_S_TO_S_SIZE: - case GL_PIXEL_MAP_I_TO_R_SIZE: case GL_PIXEL_MAP_I_TO_G_SIZE: - case GL_PIXEL_MAP_I_TO_B_SIZE: case GL_PIXEL_MAP_I_TO_A_SIZE: - case GL_PIXEL_MAP_R_TO_R_SIZE: case GL_PIXEL_MAP_G_TO_G_SIZE: - case GL_PIXEL_MAP_B_TO_B_SIZE: case GL_PIXEL_MAP_A_TO_A_SIZE: + case GL_PIXEL_MAP_I_TO_I_SIZE: case GL_PIXEL_MAP_S_TO_S_SIZE: + case GL_PIXEL_MAP_I_TO_R_SIZE: case GL_PIXEL_MAP_I_TO_G_SIZE: + case GL_PIXEL_MAP_I_TO_B_SIZE: case GL_PIXEL_MAP_I_TO_A_SIZE: + case GL_PIXEL_MAP_R_TO_R_SIZE: case GL_PIXEL_MAP_G_TO_G_SIZE: + case GL_PIXEL_MAP_B_TO_B_SIZE: case GL_PIXEL_MAP_A_TO_A_SIZE: return 1; case GL_MAX_EVAL_ORDER: return 1; @@ -731,17 +790,18 @@ return 2; case GL_TEXTURE_1D: case GL_TEXTURE_2D: + case GL_TEXTURE_3D: return 1; case GL_NAME_STACK_DEPTH: return 1; case GL_MAX_VIEWPORT_DIMS: - return 2; + return 2; case GL_DOUBLEBUFFER: - return 1; + return 1; case GL_AUX_BUFFERS: - return 1; + return 1; case GL_STEREO: - return 1; + return 1; case GL_CLIP_PLANE0: case GL_CLIP_PLANE1: case GL_CLIP_PLANE2: case GL_CLIP_PLANE3: case GL_CLIP_PLANE4: case GL_CLIP_PLANE5: @@ -774,14 +834,56 @@ return 1; case GL_TEXTURE_BINDING_1D: case GL_TEXTURE_BINDING_2D: + case GL_TEXTURE_BINDING_3D: return 1; - case GL_BLEND_COLOR_EXT: + case GL_BLEND_COLOR: return 4; - case GL_BLEND_EQUATION_EXT: + case GL_BLEND_EQUATION: + return 1; + case GL_COLOR_MATRIX: + return 16; + case GL_COLOR_MATRIX_STACK_DEPTH: return 1; + case GL_COLOR_TABLE: + case GL_POST_CONVOLUTION_COLOR_TABLE: + case GL_POST_COLOR_MATRIX_COLOR_TABLE: + case GL_CONVOLUTION_1D: + case GL_CONVOLUTION_2D: + case GL_SEPARABLE_2D: + case GL_HISTOGRAM: + case GL_MINMAX: + return 1; case GL_POLYGON_OFFSET_FACTOR: case GL_POLYGON_OFFSET_UNITS: return 1; + case GL_POST_CONVOLUTION_RED_SCALE: + case GL_POST_CONVOLUTION_GREEN_SCALE: + case GL_POST_CONVOLUTION_BLUE_SCALE: + case GL_POST_CONVOLUTION_ALPHA_SCALE: + case GL_POST_CONVOLUTION_RED_BIAS: + case GL_POST_CONVOLUTION_GREEN_BIAS: + case GL_POST_CONVOLUTION_BLUE_BIAS: + case GL_POST_CONVOLUTION_ALPHA_BIAS: + return 1; + case GL_POST_COLOR_MATRIX_RED_SCALE: + case GL_POST_COLOR_MATRIX_GREEN_SCALE: + case GL_POST_COLOR_MATRIX_BLUE_SCALE: + case GL_POST_COLOR_MATRIX_ALPHA_SCALE: + case GL_POST_COLOR_MATRIX_RED_BIAS: + case GL_POST_COLOR_MATRIX_GREEN_BIAS: + case GL_POST_COLOR_MATRIX_BLUE_BIAS: + case GL_POST_COLOR_MATRIX_ALPHA_BIAS: + return 1; + case GL_RESCALE_NORMAL: + return 1; + case GL_ACTIVE_TEXTURE_ARB: + case GL_CLIENT_ACTIVE_TEXTURE_ARB: + case GL_MAX_TEXTURE_UNITS_ARB: + return 1; + case GL_MAX_COLOR_MATRIX_STACK_DEPTH: + case GL_MAX_CONVOLUTION_WIDTH: + case GL_MAX_CONVOLUTION_HEIGHT: + return 1; default: return -1; } @@ -812,6 +914,7 @@ switch (pname) { case GL_TEXTURE_WIDTH: case GL_TEXTURE_HEIGHT: + case GL_TEXTURE_DEPTH: case GL_TEXTURE_COMPONENTS: case GL_TEXTURE_BORDER: case GL_TEXTURE_RED_SIZE: @@ -832,17 +935,19 @@ } GLint __glGetTexImage_size(GLenum target, GLint level, GLenum format, - GLenum type, GLint width, GLint height) + GLenum type, GLint width, GLint height, GLint depth) { GLint elements, esize; GLint padding, rowsize; switch (format) { case GL_RGBA: + case GL_BGRA: case GL_ABGR_EXT: elements = 4; break; case GL_RGB: + case GL_BGR: elements = 3; break; case GL_RED: @@ -863,15 +968,36 @@ case GL_UNSIGNED_BYTE: esize = 1; break; + case GL_UNSIGNED_BYTE_3_3_2: + case GL_UNSIGNED_BYTE_2_3_3_REV: + esize = 1; + elements = 1; + break; case GL_SHORT: case GL_UNSIGNED_SHORT: esize = 2; break; + case GL_UNSIGNED_SHORT_5_6_5: + case GL_UNSIGNED_SHORT_5_6_5_REV: + case GL_UNSIGNED_SHORT_4_4_4_4: + case GL_UNSIGNED_SHORT_4_4_4_4_REV: + case GL_UNSIGNED_SHORT_5_5_5_1: + case GL_UNSIGNED_SHORT_1_5_5_5_REV: + esize = 2; + elements = 1; + break; case GL_INT: case GL_UNSIGNED_INT: case GL_FLOAT: esize = 4; break; + case GL_UNSIGNED_INT_8_8_8_8: + case GL_UNSIGNED_INT_8_8_8_8_REV: + case GL_UNSIGNED_INT_10_10_10_2: + case GL_UNSIGNED_INT_2_10_10_10_REV: + esize = 4; + elements = 1; + break; default: return -1; } @@ -885,5 +1011,95 @@ if (padding) { rowsize += 4 - padding; } - return (rowsize * height); + return (rowsize * height * depth); } + +GLint __glGetConvolutionParameteriv_size(GLenum pname) +{ + switch (pname) { + case GL_CONVOLUTION_BORDER_COLOR: + case GL_CONVOLUTION_FILTER_SCALE: + case GL_CONVOLUTION_FILTER_BIAS: + return 4; + case GL_CONVOLUTION_BORDER_MODE: + case GL_CONVOLUTION_FORMAT: + case GL_CONVOLUTION_WIDTH: + case GL_CONVOLUTION_HEIGHT: + case GL_MAX_CONVOLUTION_WIDTH: + case GL_MAX_CONVOLUTION_HEIGHT: + return 1; + default: + return -1; + } +} + +GLint __glGetConvolutionParameterfv_size(GLenum pname) +{ + return __glGetConvolutionParameteriv_size(pname); +} + + +GLint __glGetHistogramParameterfv_size(GLenum pname) +{ + switch (pname) { + case GL_HISTOGRAM_WIDTH: + case GL_HISTOGRAM_FORMAT: + case GL_HISTOGRAM_RED_SIZE: + case GL_HISTOGRAM_GREEN_SIZE: + case GL_HISTOGRAM_BLUE_SIZE: + case GL_HISTOGRAM_ALPHA_SIZE: + case GL_HISTOGRAM_LUMINANCE_SIZE: + case GL_HISTOGRAM_SINK: + return 1; + default: + return -1; + } +} + +GLint __glGetHistogramParameteriv_size(GLenum pname) +{ + return __glGetHistogramParameterfv_size(pname); +} + +GLint __glGetMinmaxParameterfv_size(GLenum pname) +{ + switch (pname) { + case GL_MINMAX_FORMAT: + case GL_MINMAX_SINK: + return 1; + default: + return -1; + } +} + +GLint __glGetMinmaxParameteriv_size(GLenum pname) +{ + return __glGetMinmaxParameterfv_size(pname); +} + +GLint __glGetColorTableParameterfv_size(GLenum pname) +{ + switch(pname) { + + case GL_COLOR_TABLE_SCALE: /* return RGBA */ + case GL_COLOR_TABLE_BIAS: + return 4; + case GL_COLOR_TABLE_FORMAT: + case GL_COLOR_TABLE_WIDTH: + case GL_COLOR_TABLE_RED_SIZE: + case GL_COLOR_TABLE_GREEN_SIZE: + case GL_COLOR_TABLE_BLUE_SIZE: + case GL_COLOR_TABLE_ALPHA_SIZE: + case GL_COLOR_TABLE_LUMINANCE_SIZE: + case GL_COLOR_TABLE_INTENSITY_SIZE: + return 1; + default: + return 0; + } +} + +GLint __glGetColorTableParameteriv_size(GLenum pname) +{ + return __glGetColorTableParameterfv_size(pname); +} + Index: xc/programs/Xserver/GL/glx/singlesize.h diff -u xc/programs/Xserver/GL/glx/singlesize.h:1.2 xc/programs/Xserver/GL/glx/singlesize.h:1.3 --- xc/programs/Xserver/GL/glx/singlesize.h:1.2 Mon Jun 14 03:31:36 1999 +++ xc/programs/Xserver/GL/glx/singlesize.h Wed Mar 21 11:29:37 2001 @@ -1,26 +1,40 @@ +/* $XFree86: xc/programs/Xserver/GL/glx/singlesize.h,v 1.3 2001/03/21 16:29:37 dawes Exp $ */ #ifndef _singlesize_h_ #define _singlesize_h_ -/* $XFree86: xc/programs/Xserver/GL/glx/singlesize.h,v 1.2 1999/06/14 07:31:36 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ extern GLint __glReadPixels_size(GLenum format, GLenum type, @@ -52,7 +66,16 @@ extern GLint __glGetTexLevelParameterfv_size(GLenum pname); extern GLint __glGetTexLevelParameteriv_size(GLenum pname); extern GLint __glGetTexImage_size(GLenum target, GLint level, GLenum format, - GLenum type, GLint width, GLint height); + GLenum type, GLint width, GLint height, + GLint depth); +extern GLint __glGetColorTableParameterfv_size(GLenum pname); +extern GLint __glGetColorTableParameteriv_size(GLenum pname); +extern GLint __glGetConvolutionParameterfv_size(GLenum pname); +extern GLint __glGetConvolutionParameteriv_size(GLenum pname); +extern GLint __glGetHistogramParameterfv_size(GLenum pname); +extern GLint __glGetHistogramParameteriv_size(GLenum pname); +extern GLint __glGetMinmaxParameterfv_size(GLenum pname); +extern GLint __glGetMinmaxParameteriv_size(GLenum pname); #endif /* _singlesize_h_ */ Index: xc/programs/Xserver/GL/glx/unpack.h diff -u xc/programs/Xserver/GL/glx/unpack.h:1.2 xc/programs/Xserver/GL/glx/unpack.h:1.3 --- xc/programs/Xserver/GL/glx/unpack.h:1.2 Mon Jun 14 03:31:36 1999 +++ xc/programs/Xserver/GL/glx/unpack.h Wed Mar 21 11:29:37 2001 @@ -1,26 +1,40 @@ +/* $XFree86: xc/programs/Xserver/GL/glx/unpack.h,v 1.3 2001/03/21 16:29:37 dawes Exp $ */ #ifndef __GLX_unpack_h__ #define __GLX_unpack_h__ -/* $XFree86: xc/programs/Xserver/GL/glx/unpack.h,v 1.2 1999/06/14 07:31:36 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #define __GLX_PAD(s) (((s)+3) & (GLuint)~3) @@ -41,7 +55,7 @@ #define __GLX_GET_DOUBLE(dst,src) (dst) = *((GLdouble*)(src)) #endif -extern void __glXMemInit(); +extern void __glXMemInit(void); extern xGLXSingleReply __glXReply; @@ -133,6 +147,7 @@ GLbyte sw; \ GLbyte *swapPC; \ GLbyte *swapEnd + #define __GLX_SWAP_INT(pc) \ sw = ((GLbyte *)(pc))[0]; \ Index: xc/programs/Xserver/GL/glx/xfont.c diff -u xc/programs/Xserver/GL/glx/xfont.c:1.2 xc/programs/Xserver/GL/glx/xfont.c:1.3 --- xc/programs/Xserver/GL/glx/xfont.c:1.2 Mon Jun 14 03:31:36 1999 +++ xc/programs/Xserver/GL/glx/xfont.c Wed Mar 21 11:29:37 2001 @@ -1,23 +1,37 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/xfont.c,v 1.2 1999/06/14 07:31:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/xfont.c,v 1.3 2001/03/21 16:29:37 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. -** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. -** -** $SGI$ */ #define NEED_REPLIES Index: xc/programs/Xserver/GL/include/GL/glx_ansic.h diff -u xc/programs/Xserver/GL/include/GL/glx_ansic.h:1.3 xc/programs/Xserver/GL/include/GL/glx_ansic.h:1.5 --- xc/programs/Xserver/GL/include/GL/glx_ansic.h:1.3 Sun Jul 11 04:49:18 1999 +++ xc/programs/Xserver/GL/include/GL/glx_ansic.h Wed Mar 21 15:49:08 2001 @@ -1,26 +1,39 @@ #ifndef _glx_ansic_h_ #define _glx_ansic_h_ -/* $XFree86: xc/programs/Xserver/GL/include/GL/glx_ansic.h,v 1.3 1999/07/11 08:49:18 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/include/GL/glx_ansic.h,v 1.5 2001/03/21 20:49:08 dawes Exp $ */ /* -** The contents of this file are subject to the GLX Public License Version 1.0 -** (the "License"). You may not use this file except in compliance with the -** License. You may obtain a copy of the License at Silicon Graphics, Inc., -** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -** or at http://www.sgi.com/software/opensource/glx/license.html. +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: ** -** Software distributed under the License is distributed on an "AS IS" -** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -** language governing rights and limitations under the License. +** http://oss.sgi.com/projects/FreeB ** -** The Original Software is GLX version 1.2 source code, released February, -** 1999. The developer of the Original Software is Silicon Graphics, Inc. -** Those portions of the Subject Software created by Silicon Graphics, Inc. -** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. ** -** $SGI$ +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. */ /* @@ -38,92 +51,25 @@ */ #ifdef XFree86Server -#include -#define XF_Minimum_Version ( (3 * 10) + (9) ) -#define XF_Version ( (XF86_VERSION_MAJOR * 10) + (XF86_VERSION_MINOR) ) -#endif - -#if defined(XFree86LOADER) && defined(XFree86Server) && ( XF_Version >= XF_Minimum_Version) -#include "xf86_ansic.h" -#else -#endif -#if 0 && defined(XFree86LOADER) && defined(XFree86Server) && ( XF_Version >= XF_Minimum_Version) - -#include "xf86Module.h" - -/* -** I'm not sure if this is entirely correct. xf86_ansic needs to be told -** whether to include these definitions or not. Near as I can tell, a -** necessary define is included when XFree86 is built (as part of the build). -** When we build the glx server, this define isn't present. I don't recall -** having to do this before, but this seems to work. Perhaps I just need to -** include the proper header file, but I can't find it. Anyways, if need be -** this can be fixed later, but works for now... -** I'm specifically refering to NEED_XF86_TYPES being declared here. -*/ - -#define NEED_XF86_TYPES #include "xf86_ansic.h" - -#define GLX_STDOUT xf86stdout -#define GLX_STDERR xf86stderr -#define __glXPrintf xf86printf -#define __glXFprintf xf86fprintf -#define __glXSprintf xf86sprintf -#define __glXVfprintf xf86vfprintf -#define __glXVsprintf xf86vsprintf -#define __glXFopen xf86fopen -#define __glXFclose xf86fclose -#define __glXCos(x) xf86cos(x) -#define __glXSin(x) xf86sin(x) -#define __glXAtan(x) xf86atan(x) -#define __glXAbs(x) xf86abs(x) -#define __glXLog(x) xf86log(x) -#define __glXCeil(x) xf86ceil(x) -#define __glXFloor(x) xf86floor(x) -#define __glXSqrt(x) xf86sqrt(x) -#define __glXPow(x, y) xf86pow(x, y) -#define __glXMemmove(dest, src, n) xf86memmove(dest, src, n) -#define __glXMemcpy(dest, src, n) xf86memcpy(dest, src, n) -#define __glXMemset(s, c, n) xf86memset(s, c, n) -#define __glXStrdup(str) xf86strdup(str) -#define __glXStrcpy(dest, src) xf86strcpy(dest, src) -#define __glXStrncpy(dest, src, n) xf86strncpy(dest, src, n) -#define __glXStrcat(dest, src) xf86strcat(dest, src) -#define __glXStrncat(dest, src, n) xf86strncat(dest, src, n) -#define __glXStrcmp(s1, s2) xf86strcmp(s1, s2) -#define __glXStrncmp(s1, s2, n) xf86strncmp(s1, s2, n) -#define __glXStrlen(str) xf86strlen(str) -#define __glXAbort() xf86abort() -#define __glXStrtok(s, delim) xf86strtok(s, delim) -#define __glXStrcspn(s, reject) xf86strcspn(s, reject) -#define __glXGetenv(a) xf86getenv(a) - #ifndef assert #define assert(a) #endif #else -/* -** Either not a loadable module, or pre X3.9 -*/ - -/* assert() is named __assert() in the LynxOS libc. We might get - * unresolved externals if we #undef assert and include assert.h - * if assert.h was already included on our way here.... - */ #if defined(Lynx) && defined(__assert_h) #undef __assert_h #endif - #ifdef assert #undef assert #endif - #include +#endif + + #define GLX_STDOUT stdout #define GLX_STDERR stderr #define __glXPrintf printf @@ -157,8 +103,7 @@ #define __glXStrtok(s, delim) strtok(s, delim) #define __glXStrcspn(s, reject) strcspn(s, reject) #define __glXGetenv(a) getenv(a) - -#endif +#define __glXAtoi(a) atoi(a) #endif /* _glx_ansic_h_ */ Index: xc/programs/Xserver/GL/mesa/Imakefile diff -u xc/programs/Xserver/GL/mesa/Imakefile:1.4 xc/programs/Xserver/GL/mesa/Imakefile:1.5 --- xc/programs/Xserver/GL/mesa/Imakefile:1.4 Tue Feb 22 23:46:54 2000 +++ xc/programs/Xserver/GL/mesa/Imakefile Thu Apr 26 12:54:45 2001 @@ -1,11 +1,11 @@ -XCOMM $XFree86: xc/programs/Xserver/GL/mesa/Imakefile,v 1.4 2000/02/23 04:46:54 martin Exp $ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/Imakefile,v 1.5 2001/04/26 16:54:45 dawes Exp $ #define IHaveModules #include #define IHaveSubdirs - SUBDIRS = include src + SUBDIRS = src DEFINES = $(GLX_DEFINES) MakeSubdirs($(SUBDIRS)) Index: xc/programs/Xserver/GL/mesa/include/Imakefile diff -u xc/programs/Xserver/GL/mesa/include/Imakefile:1.3 xc/programs/Xserver/GL/mesa/include/Imakefile:removed --- xc/programs/Xserver/GL/mesa/include/Imakefile:1.3 Tue Feb 22 23:46:54 2000 +++ xc/programs/Xserver/GL/mesa/include/Imakefile Mon Jun 4 12:39:36 2001 @@ -1,14 +0,0 @@ -XCOMM $XFree86: xc/programs/Xserver/GL/mesa/include/Imakefile,v 1.3 2000/02/23 04:46:54 martin Exp $ - -#define IHaveModules -#include - -#define IHaveSubdirs - - SUBDIRS = GL - DEFINES = $(GLX_DEFINES) - -MakeSubdirs($(SUBDIRS)) -DependSubdirs($(SUBDIRS)) -MakeLintLibSubdirs($(SUBDIRS)) -LintSubdirs($(SUBDIRS)) Index: xc/programs/Xserver/GL/mesa/include/GL/Imakefile diff -u xc/programs/Xserver/GL/mesa/include/GL/Imakefile:1.6 xc/programs/Xserver/GL/mesa/include/GL/Imakefile:removed --- xc/programs/Xserver/GL/mesa/include/GL/Imakefile:1.6 Tue Aug 1 16:28:39 2000 +++ xc/programs/Xserver/GL/mesa/include/GL/Imakefile Mon Jun 4 12:39:36 2001 @@ -1,13 +0,0 @@ -XCOMM $XFree86: xc/programs/Xserver/GL/mesa/include/GL/Imakefile,v 1.6 2000/08/01 20:28:39 dawes Exp $ - -#define IHaveModules -#include - - DEFINES = $(GLX_DEFINES) - -LinkSourceFile(gl.h, $(MESASRCDIR)/include/GL) -LinkSourceFile(glx.h, $(TOP)/include/GL) -LinkSourceFile(glxtokens.h, $(TOP)/include/GL) -LinkSourceFile(xmesa.h, $(MESASRCDIR)/include/GL) -LinkSourceFile(xmesa_x.h, $(MESASRCDIR)/include/GL) -LinkSourceFile(xmesa_xf86.h, $(MESASRCDIR)/include/GL) Index: xc/programs/Xserver/GL/mesa/src/Imakefile diff -u xc/programs/Xserver/GL/mesa/src/Imakefile:1.16 xc/programs/Xserver/GL/mesa/src/Imakefile:1.18 --- xc/programs/Xserver/GL/mesa/src/Imakefile:1.16 Sun Sep 24 09:51:22 2000 +++ xc/programs/Xserver/GL/mesa/src/Imakefile Thu Apr 26 12:54:47 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/Imakefile,v 1.16 2000/09/24 13:51:22 alanh Exp $ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/Imakefile,v 1.18 2001/04/26 16:54:47 dawes Exp $ #define IHaveModules #include @@ -7,341 +7,11 @@ SUBDIRS = X -LinkSourceFile(aatriangle.c,$(MESASRCDIR)/src) -LinkSourceFile(aatriangle.h,$(MESASRCDIR)/src) -LinkSourceFile(aatritemp.h,$(MESASRCDIR)/src) -LinkSourceFile(accum.c,$(MESASRCDIR)/src) -LinkSourceFile(accum.h,$(MESASRCDIR)/src) -LinkSourceFile(all.h,$(MESASRCDIR)/src) -LinkSourceFile(alpha.c,$(MESASRCDIR)/src) -LinkSourceFile(alpha.h,$(MESASRCDIR)/src) -LinkSourceFile(alphabuf.c,$(MESASRCDIR)/src) -LinkSourceFile(alphabuf.h,$(MESASRCDIR)/src) -LinkSourceFile(attrib.c,$(MESASRCDIR)/src) -LinkSourceFile(attrib.h,$(MESASRCDIR)/src) -LinkSourceFile(bbox.c,$(MESASRCDIR)/src) -LinkSourceFile(bbox.h,$(MESASRCDIR)/src) -LinkSourceFile(bitmap.c,$(MESASRCDIR)/src) -LinkSourceFile(bitmap.h,$(MESASRCDIR)/src) -LinkSourceFile(blend.c,$(MESASRCDIR)/src) -LinkSourceFile(blend.h,$(MESASRCDIR)/src) -LinkSourceFile(buffers.c,$(MESASRCDIR)/src) -LinkSourceFile(buffers.h,$(MESASRCDIR)/src) -LinkSourceFile(clip.c,$(MESASRCDIR)/src) -LinkSourceFile(clip.h,$(MESASRCDIR)/src) -LinkSourceFile(clip_funcs.h,$(MESASRCDIR)/src) -LinkSourceFile(clip_tmp.h,$(MESASRCDIR)/src) -LinkSourceFile(colortab.c,$(MESASRCDIR)/src) -LinkSourceFile(colortab.h,$(MESASRCDIR)/src) -LinkSourceFile(config.c,$(MESASRCDIR)/src) -LinkSourceFile(config.h,$(MESASRCDIR)/src) -LinkSourceFile(context.c,$(MESASRCDIR)/src) -LinkSourceFile(context.h,$(MESASRCDIR)/src) -LinkSourceFile(copy_tmp.h,$(MESASRCDIR)/src) -LinkSourceFile(copypix.c,$(MESASRCDIR)/src) -LinkSourceFile(copypix.h,$(MESASRCDIR)/src) -LinkSourceFile(cull_tmp.h,$(MESASRCDIR)/src) -LinkSourceFile(cva.c,$(MESASRCDIR)/src) -LinkSourceFile(cva.h,$(MESASRCDIR)/src) -LinkSourceFile(dd.h,$(MESASRCDIR)/src) -LinkSourceFile(ddsample.c,$(MESASRCDIR)/src) -LinkSourceFile(debug_xform.c,$(MESASRCDIR)/src) -LinkSourceFile(debug_xform.h,$(MESASRCDIR)/src) -LinkSourceFile(depth.c,$(MESASRCDIR)/src) -LinkSourceFile(depth.h,$(MESASRCDIR)/src) -LinkSourceFile(dispatch.c,$(MESASRCDIR)/src) -LinkSourceFile(dlist.c,$(MESASRCDIR)/src) -LinkSourceFile(dlist.h,$(MESASRCDIR)/src) -LinkSourceFile(dotprod_tmp.h,$(MESASRCDIR)/src) -LinkSourceFile(drawpix.c,$(MESASRCDIR)/src) -LinkSourceFile(drawpix.h,$(MESASRCDIR)/src) -LinkSourceFile(enable.c,$(MESASRCDIR)/src) -LinkSourceFile(enable.h,$(MESASRCDIR)/src) -LinkSourceFile(enums.c,$(MESASRCDIR)/src) -LinkSourceFile(enums.h,$(MESASRCDIR)/src) -LinkSourceFile(eval.c,$(MESASRCDIR)/src) -LinkSourceFile(eval.h,$(MESASRCDIR)/src) -LinkSourceFile(extensions.c,$(MESASRCDIR)/src) -LinkSourceFile(extensions.h,$(MESASRCDIR)/src) -LinkSourceFile(feedback.c,$(MESASRCDIR)/src) -LinkSourceFile(feedback.h,$(MESASRCDIR)/src) -LinkSourceFile(fixed.h,$(MESASRCDIR)/src) -LinkSourceFile(fog.c,$(MESASRCDIR)/src) -LinkSourceFile(fog.h,$(MESASRCDIR)/src) -LinkSourceFile(fog_tmp.h,$(MESASRCDIR)/src) -LinkSourceFile(general_clip.h,$(MESASRCDIR)/src) -LinkSourceFile(get.c,$(MESASRCDIR)/src) -LinkSourceFile(get.h,$(MESASRCDIR)/src) -LinkSourceFile(glapi.h,$(MESASRCDIR)/src) -LinkSourceFile(glapi.c,$(MESASRCDIR)/src) -LinkSourceFile(glapioffsets.h,$(MESASRCDIR)/src) -LinkSourceFile(glapinoop.c,$(MESASRCDIR)/src) -LinkSourceFile(glapinoop.h,$(MESASRCDIR)/src) -LinkSourceFile(glapitable.h,$(MESASRCDIR)/src) -LinkSourceFile(glapitemp.h,$(MESASRCDIR)/src) -LinkSourceFile(glheader.h,$(MESASRCDIR)/src) -LinkSourceFile(glthread.c,$(MESASRCDIR)/src) -LinkSourceFile(glthread.h,$(MESASRCDIR)/src) -LinkSourceFile(hash.c,$(MESASRCDIR)/src) -LinkSourceFile(hash.h,$(MESASRCDIR)/src) -LinkSourceFile(hint.c,$(MESASRCDIR)/src) -LinkSourceFile(hint.h,$(MESASRCDIR)/src) -LinkSourceFile(highpc.c,$(MESASRCDIR)/src) -LinkSourceFile(image.c,$(MESASRCDIR)/src) -LinkSourceFile(image.h,$(MESASRCDIR)/src) -LinkSourceFile(imaging.c,$(MESASRCDIR)/src) -LinkSourceFile(imaging.h,$(MESASRCDIR)/src) -LinkSourceFile(indirect_tmp.h,$(MESASRCDIR)/src) -LinkSourceFile(interp_tmp.h,$(MESASRCDIR)/src) -LinkSourceFile(light.c,$(MESASRCDIR)/src) -LinkSourceFile(light.h,$(MESASRCDIR)/src) -LinkSourceFile(lines.c,$(MESASRCDIR)/src) -LinkSourceFile(lines.h,$(MESASRCDIR)/src) -LinkSourceFile(linetemp.h,$(MESASRCDIR)/src) -LinkSourceFile(lnaatemp.h,$(MESASRCDIR)/src) -LinkSourceFile(logic.c,$(MESASRCDIR)/src) -LinkSourceFile(logic.h,$(MESASRCDIR)/src) -LinkSourceFile(lowpc.c,$(MESASRCDIR)/src) -LinkSourceFile(macros.h,$(MESASRCDIR)/src) -LinkSourceFile(masking.c,$(MESASRCDIR)/src) -LinkSourceFile(masking.h,$(MESASRCDIR)/src) -LinkSourceFile(matrix.c,$(MESASRCDIR)/src) -LinkSourceFile(matrix.h,$(MESASRCDIR)/src) -LinkSourceFile(mem.c,$(MESASRCDIR)/src) -LinkSourceFile(mem.h,$(MESASRCDIR)/src) -LinkSourceFile(mmath.c,$(MESASRCDIR)/src) -LinkSourceFile(mmath.h,$(MESASRCDIR)/src) -LinkSourceFile(norm_tmp.h,$(MESASRCDIR)/src) -LinkSourceFile(pb.c,$(MESASRCDIR)/src) -LinkSourceFile(pb.h,$(MESASRCDIR)/src) -LinkSourceFile(pipeline.c,$(MESASRCDIR)/src) -LinkSourceFile(pipeline.h,$(MESASRCDIR)/src) -LinkSourceFile(pixel.c,$(MESASRCDIR)/src) -LinkSourceFile(pixel.h,$(MESASRCDIR)/src) -LinkSourceFile(pixeltex.c,$(MESASRCDIR)/src) -LinkSourceFile(pixeltex.h,$(MESASRCDIR)/src) -LinkSourceFile(points.c,$(MESASRCDIR)/src) -LinkSourceFile(points.h,$(MESASRCDIR)/src) -LinkSourceFile(polygon.c,$(MESASRCDIR)/src) -LinkSourceFile(polygon.h,$(MESASRCDIR)/src) -LinkSourceFile(quads.c,$(MESASRCDIR)/src) -LinkSourceFile(quads.h,$(MESASRCDIR)/src) -LinkSourceFile(rastpos.c,$(MESASRCDIR)/src) -LinkSourceFile(rastpos.h,$(MESASRCDIR)/src) -LinkSourceFile(readpix.c,$(MESASRCDIR)/src) -LinkSourceFile(readpix.h,$(MESASRCDIR)/src) -LinkSourceFile(rect.c,$(MESASRCDIR)/src) -LinkSourceFile(rect.h,$(MESASRCDIR)/src) -LinkSourceFile(render_tmp.h,$(MESASRCDIR)/src) -LinkSourceFile(scissor.c,$(MESASRCDIR)/src) -LinkSourceFile(scissor.h,$(MESASRCDIR)/src) -LinkSourceFile(shade.c,$(MESASRCDIR)/src) -LinkSourceFile(shade.h,$(MESASRCDIR)/src) -LinkSourceFile(shade_tmp.h,$(MESASRCDIR)/src) -LinkSourceFile(simple_list.h,$(MESASRCDIR)/src) -LinkSourceFile(span.c,$(MESASRCDIR)/src) -LinkSourceFile(span.h,$(MESASRCDIR)/src) -LinkSourceFile(stages.c,$(MESASRCDIR)/src) -LinkSourceFile(stages.h,$(MESASRCDIR)/src) -LinkSourceFile(state.c,$(MESASRCDIR)/src) -LinkSourceFile(state.h,$(MESASRCDIR)/src) -LinkSourceFile(stencil.c,$(MESASRCDIR)/src) -LinkSourceFile(stencil.h,$(MESASRCDIR)/src) -LinkSourceFile(texgen_tmp.h,$(MESASRCDIR)/src) -LinkSourceFile(teximage.c,$(MESASRCDIR)/src) -LinkSourceFile(teximage.h,$(MESASRCDIR)/src) -LinkSourceFile(texobj.c,$(MESASRCDIR)/src) -LinkSourceFile(texobj.h,$(MESASRCDIR)/src) -LinkSourceFile(texstate.c,$(MESASRCDIR)/src) -LinkSourceFile(texstate.h,$(MESASRCDIR)/src) -LinkSourceFile(texture.c,$(MESASRCDIR)/src) -LinkSourceFile(texture.h,$(MESASRCDIR)/src) -LinkSourceFile(trans_tmp.h,$(MESASRCDIR)/src) -LinkSourceFile(translate.c,$(MESASRCDIR)/src) -LinkSourceFile(translate.h,$(MESASRCDIR)/src) -LinkSourceFile(triangle.c,$(MESASRCDIR)/src) -LinkSourceFile(triangle.h,$(MESASRCDIR)/src) -LinkSourceFile(tritemp.h,$(MESASRCDIR)/src) -LinkSourceFile(types.h,$(MESASRCDIR)/src) -LinkSourceFile(varray.c,$(MESASRCDIR)/src) -LinkSourceFile(varray.h,$(MESASRCDIR)/src) -LinkSourceFile(vb.c,$(MESASRCDIR)/src) -LinkSourceFile(vb.h,$(MESASRCDIR)/src) -LinkSourceFile(vbcull.c,$(MESASRCDIR)/src) -LinkSourceFile(vbcull.h,$(MESASRCDIR)/src) -LinkSourceFile(vbfill.c,$(MESASRCDIR)/src) -LinkSourceFile(vbfill.h,$(MESASRCDIR)/src) -LinkSourceFile(vbindirect.c,$(MESASRCDIR)/src) -LinkSourceFile(vbindirect.h,$(MESASRCDIR)/src) -LinkSourceFile(vbrender.c,$(MESASRCDIR)/src) -LinkSourceFile(vbrender.h,$(MESASRCDIR)/src) -LinkSourceFile(vbxform.c,$(MESASRCDIR)/src) -LinkSourceFile(vbxform.h,$(MESASRCDIR)/src) -LinkSourceFile(vector.c,$(MESASRCDIR)/src) -LinkSourceFile(vector.h,$(MESASRCDIR)/src) -LinkSourceFile(vertices.c,$(MESASRCDIR)/src) -LinkSourceFile(vertices.h,$(MESASRCDIR)/src) -LinkSourceFile(winpos.c,$(MESASRCDIR)/src) -LinkSourceFile(winpos.h,$(MESASRCDIR)/src) -LinkSourceFile(xform.c,$(MESASRCDIR)/src) -LinkSourceFile(xform.h,$(MESASRCDIR)/src) -LinkSourceFile(xform_tmp.h,$(MESASRCDIR)/src) -LinkSourceFile(zoom.c,$(MESASRCDIR)/src) -LinkSourceFile(zoom.h,$(MESASRCDIR)/src) - - CORE_SRCS = aatriangle.c \ - accum.c \ - alpha.c \ - alphabuf.c \ - attrib.c \ - bbox.c \ - bitmap.c \ - blend.c \ - buffers.c \ - clip.c \ - colortab.c \ - config.c \ - context.c \ - copypix.c \ - cva.c \ - debug_xform.c \ - depth.c \ - dispatch.c \ - dlist.c \ - drawpix.c \ - enable.c \ - enums.c \ - eval.c \ - extensions.c \ - feedback.c \ - fog.c \ - get.c \ - glapi.c \ - glapinoop.c \ - hash.c \ - hint.c \ - image.c \ - imaging.c \ - light.c \ - lines.c \ - logic.c \ - masking.c \ - matrix.c \ - mem.c \ - mmath.c \ - pb.c \ - pipeline.c \ - pixel.c \ - pixeltex.c \ - points.c \ - polygon.c \ - quads.c \ - rastpos.c \ - readpix.c \ - rect.c \ - scissor.c \ - shade.c \ - span.c \ - stages.c \ - state.c \ - stencil.c \ - teximage.c \ - texobj.c \ - texstate.c \ - texture.c \ - translate.c \ - triangle.c \ - varray.c \ - vb.c \ - vbcull.c \ - vbfill.c \ - vbindirect.c \ - vbrender.c \ - vbxform.c \ - vector.c \ - vertices.c \ - winpos.c \ - xform.c \ - zoom.c - - CORE_OBJS = aatriangle.o \ - accum.o \ - alpha.o \ - alphabuf.o \ - attrib.o \ - bbox.o \ - bitmap.o \ - blend.o \ - buffers.o \ - clip.o \ - colortab.o \ - config.o \ - context.o \ - copypix.o \ - cva.o \ - debug_xform.o \ - depth.o \ - dispatch.o \ - dlist.o \ - drawpix.o \ - enable.o \ - enums.o \ - eval.o \ - extensions.o \ - feedback.o \ - fog.o \ - get.o \ - glapi.o \ - glapinoop.o \ - glthread.o \ - hash.o \ - hint.o \ - image.o \ - imaging.o \ - light.o \ - lines.o \ - logic.o \ - masking.o \ - matrix.o \ - mem.o \ - mmath.o \ - pb.o \ - pipeline.o \ - pixel.o \ - pixeltex.o \ - points.o \ - polygon.o \ - quads.o \ - rastpos.o \ - readpix.o \ - rect.o \ - scissor.o \ - shade.o \ - span.o \ - stages.o \ - state.o \ - stencil.o \ - teximage.o \ - texobj.o \ - texstate.o \ - texture.o \ - translate.o \ - triangle.o \ - varray.o \ - vb.o \ - vbcull.o \ - vbfill.o \ - vbindirect.o \ - vbrender.o \ - vbxform.o \ - vector.o \ - vertices.o \ - winpos.o \ - xform.o \ - zoom.o +#define NeedAllMesaSrc +#define NeedToLinkMesaSrc +#define MesaBuildDir /**/ - ASM_SRCS = asm_386.S - ASM_OBJS = asm_386.o +#include "../../../../../lib/GL/mesa/src/Imakefile.inc" #if DoLoadableServer MSRCS = GLcoremodule.c @@ -350,13 +20,13 @@ XOBJS = X/?*.o #endif - SRCS = $(CORE_SRCS) /*$(ASM_SRCS)*/ $(MSRCS) - OBJS = $(CORE_OBJS) /*$(ASM_OBJS)*/ $(MOBJS) + SRCS = $(COREMESASRCS) $(MSRCS) + OBJS = $(COREMESAOBJS) $(MOBJS) - INCLUDES = -I. -I../include -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ - -I../../include -I../../glx + INCLUDES = -I$(INCLUDESRC) -I$(XINCLUDESRC) -I$(EXTINCSRC) \ + -I$(MESASRCDIR)/src -I$(SERVERSRC)/include - DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM */ + DEFINES = $(GLX_DEFINES) #if DoLoadableServer DONES = X/DONE @@ -384,4 +54,3 @@ DependSubdirs($(SUBDIRS)) MakeLintLibSubdirs($(SUBDIRS)) LintSubdirs($(SUBDIRS)) - Index: xc/programs/Xserver/GL/mesa/src/X/Imakefile diff -u xc/programs/Xserver/GL/mesa/src/X/Imakefile:1.8 xc/programs/Xserver/GL/mesa/src/X/Imakefile:1.9 --- xc/programs/Xserver/GL/mesa/src/X/Imakefile:1.8 Tue Aug 1 16:28:40 2000 +++ xc/programs/Xserver/GL/mesa/src/X/Imakefile Thu Apr 26 12:54:47 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/X/Imakefile,v 1.8 2000/08/01 20:28:40 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/X/Imakefile,v 1.9 2001/04/26 16:54:47 dawes Exp $ #define IHaveModules #include @@ -7,11 +7,8 @@ LinkSourceFile(xmesa2.c,$(MESASRCDIR)/src/X) LinkSourceFile(xmesa3.c,$(MESASRCDIR)/src/X) LinkSourceFile(xmesa4.c,$(MESASRCDIR)/src/X) -LinkSourceFile(xmesaP.h,$(MESASRCDIR)/src/X) -LinkSourceFile(glxheader.h,$(MESASRCDIR)/src/X) LinkSourceFile(compsize.c,$(LIBSRC)/GL/glx) -LinkSourceFile(size.h,$(LIBSRC)/GL/glx) DRIVER_SRCS = xmesa1.c xmesa2.c xmesa3.c xmesa4.c DRIVER_OBJS = xmesa1.o xmesa2.o xmesa3.o xmesa4.o @@ -22,11 +19,12 @@ SRCS = $(DRIVER_SRCS) $(GLX_SRCS) OBJS = $(DRIVER_OBJS) $(GLX_OBJS) - INCLUDES = -I. -I.. -I../../include \ - -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ - -I../../../include -I../../../glx \ - -I$(LIBSRC)/GL/include \ - -I$(XF86SRC) -I$(XTOP)/include + INCLUDES = -I. -I$(INCLUDESRC) -I$(XINCLUDESRC) -I$(EXTINCSRC) \ + -I$(MESASRCDIR)/src -I$(MESASRCDIR)/src/X \ + -I$(MESASRCDIR)/include \ + -I$(LIBSRC)/GL/glx -I$(LIBSRC)/GL/include \ + -I$(SERVERSRC)/include -I$(SERVERSRC)/GL/include \ + -I$(SERVERSRC)/GL/glx DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ Index: xc/programs/Xserver/GL/mesa/src/X/xf86glx.c diff -u xc/programs/Xserver/GL/mesa/src/X/xf86glx.c:1.9 xc/programs/Xserver/GL/mesa/src/X/xf86glx.c:1.10 --- xc/programs/Xserver/GL/mesa/src/X/xf86glx.c:1.9 Fri Jun 16 20:03:13 2000 +++ xc/programs/Xserver/GL/mesa/src/X/xf86glx.c Fri Feb 16 08:24:06 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx.c,v 1.9 2000/06/17 00:03:13 martin Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx.c,v 1.10 2001/02/16 13:24:06 eich Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -580,13 +580,16 @@ for (i = 0; i < screenInfo.numScreens; i++) { for (j = 0; j < MESAScreens[i].num_vis; j++) { - if (MESAScreens[i].xm_vis[j]) + if (MESAScreens[i].xm_vis[j]) { XMesaDestroyVisual(MESAScreens[i].xm_vis[j]); + MESAScreens[i].xm_vis[j] = NULL; + } } __glXFree(MESAScreens[i].glx_vis); MESAScreens[i].glx_vis = NULL; MESAScreens[i].num_vis = 0; } + __glDDXScreenInfo.pGlxVisual = NULL; MESA_CC = NULL; } Index: xc/programs/Xserver/PEX5/Imakefile diff -u xc/programs/Xserver/PEX5/Imakefile:3.13 xc/programs/Xserver/PEX5/Imakefile:3.14 --- xc/programs/Xserver/PEX5/Imakefile:3.13 Sat Aug 14 06:49:24 1999 +++ xc/programs/Xserver/PEX5/Imakefile Wed Jan 17 17:12:19 2001 @@ -1,5 +1,9 @@ -XCOMM $XConsortium: Imakefile /main/11 1996/12/02 10:18:28 lehors $ -XCOMM $XFree86: xc/programs/Xserver/PEX5/Imakefile,v 3.13 1999/08/14 10:49:24 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:02 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/PEX5/Imakefile,v 3.14 2001/01/17 22:12:19 dawes Exp $ #define IHaveModules #include Index: xc/programs/Xserver/PEX5/ddpex/Imakefile diff -u xc/programs/Xserver/PEX5/ddpex/Imakefile:1.1.1.1 xc/programs/Xserver/PEX5/ddpex/Imakefile:1.1.1.2 --- xc/programs/Xserver/PEX5/ddpex/Imakefile:1.1.1.1 Sat Dec 21 23:04:33 1996 +++ xc/programs/Xserver/PEX5/ddpex/Imakefile Tue Jan 16 17:29:57 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: Imakefile /main/1 1996/12/02 10:18:43 lehors $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:02 cpqbld Exp $ XCOMM This is only used on NT where we do not know how to jump over this dir #ifdef Win32Architecture Index: xc/programs/Xserver/PEX5/ddpex/mi/Imakefile diff -u xc/programs/Xserver/PEX5/ddpex/mi/Imakefile:1.1.1.1 xc/programs/Xserver/PEX5/ddpex/mi/Imakefile:1.1.1.2 --- xc/programs/Xserver/PEX5/ddpex/mi/Imakefile:1.1.1.1 Sat Dec 21 23:04:33 1996 +++ xc/programs/Xserver/PEX5/ddpex/mi/Imakefile Tue Jan 16 17:30:00 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: Imakefile /main/1 1996/12/02 10:18:54 lehors $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:02 cpqbld Exp $ XCOMM This is only used on NT where we do not know how to jump over this dir #ifdef Win32Architecture Index: xc/programs/Xserver/PEX5/ddpex/mi/include/ddpex2.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/ddpex2.h:1.1.1.2 xc/programs/Xserver/PEX5/ddpex/mi/include/ddpex2.h:1.1.1.3 --- xc/programs/Xserver/PEX5/ddpex/mi/include/ddpex2.h:1.1.1.2 Sun Sep 27 04:42:53 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/ddpex2.h Tue Jan 16 17:30:03 2001 @@ -1,4 +1,4 @@ -/* $TOG: ddpex2.h /main/3 1998/02/10 12:38:12 kaleb $ */ +/* $Xorg: ddpex2.h,v 1.5 2000/08/17 19:47:02 cpqbld Exp $ */ /*********************************************************** @@ -186,7 +186,11 @@ } miLightStateStruct; typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + ddUSHORT c_operator; +#else ddUSHORT operator; +#endif listofObj *halfspaces; } miMCVolume_Struct; Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miClip.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miClip.h:1.1.1.2 xc/programs/Xserver/PEX5/ddpex/mi/include/miClip.h:1.1.1.3 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miClip.h:1.1.1.2 Sun Sep 27 04:42:58 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miClip.h Tue Jan 16 17:30:06 2001 @@ -1,4 +1,4 @@ -/* $TOG: miClip.h /main/4 1998/02/10 12:38:18 kaleb $ */ +/* $Xorg: miClip.h,v 1.3 2000/08/17 19:47:02 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miFont.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miFont.h:1.2 xc/programs/Xserver/PEX5/ddpex/mi/include/miFont.h:1.3 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miFont.h:1.2 Sun Jan 31 07:21:27 1999 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miFont.h Wed Jan 17 17:12:19 2001 @@ -1,4 +1,4 @@ -/* $TOG: miFont.h /main/5 1998/02/10 12:38:22 kaleb $ */ +/* $Xorg: miFont.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ /*********************************************************** @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/miFont.h,v 1.2 1999/01/31 12:21:27 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/miFont.h,v 1.3 2001/01/17 22:12:19 dawes Exp $ */ /* * font internal format */ Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miInfo.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miInfo.h:1.1.1.2 xc/programs/Xserver/PEX5/ddpex/mi/include/miInfo.h:1.1.1.3 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miInfo.h:1.1.1.2 Sun Sep 27 04:43:05 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miInfo.h Tue Jan 16 17:30:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: miInfo.h /main/5 1998/02/10 12:38:27 kaleb $ */ +/* $Xorg: miInfo.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miLUT.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miLUT.h:1.1.1.2 xc/programs/Xserver/PEX5/ddpex/mi/include/miLUT.h:1.1.1.3 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miLUT.h:1.1.1.2 Sun Sep 27 04:43:06 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miLUT.h Tue Jan 16 17:30:14 2001 @@ -1,4 +1,4 @@ -/* $TOG: miLUT.h /main/5 1998/02/10 12:38:32 kaleb $ */ +/* $Xorg: miLUT.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miLight.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miLight.h:1.4 xc/programs/Xserver/PEX5/ddpex/mi/include/miLight.h:1.5 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miLight.h:1.4 Sun Oct 4 05:34:07 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miLight.h Wed Jan 17 17:12:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: miLight.h /main/5 1998/02/10 12:38:37 kaleb $ */ +/* $Xorg: miLight.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -43,7 +43,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/miLight.h,v 1.4 1998/10/04 09:34:07 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/miLight.h,v 1.5 2001/01/17 22:12:20 dawes Exp $ */ #ifndef MI_LIGHT_H #define MI_LIGHT_H Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miLineDash.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miLineDash.h:1.1.1.2 xc/programs/Xserver/PEX5/ddpex/mi/include/miLineDash.h:1.1.1.3 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miLineDash.h:1.1.1.2 Sun Sep 27 04:43:09 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miLineDash.h Tue Jan 16 17:30:19 2001 @@ -1,4 +1,4 @@ -/* $TOG: miLineDash.h /main/3 1998/02/10 12:38:43 kaleb $ */ +/* $Xorg: miLineDash.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ /***************************************************************** Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miMarkers.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miMarkers.h:1.1.1.2 xc/programs/Xserver/PEX5/ddpex/mi/include/miMarkers.h:1.1.1.3 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miMarkers.h:1.1.1.2 Sun Sep 27 04:43:10 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miMarkers.h Tue Jan 16 17:30:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: miMarkers.h /main/3 1998/02/10 12:38:47 kaleb $ */ +/* $Xorg: miMarkers.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miNS.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miNS.h:1.1.1.2 xc/programs/Xserver/PEX5/ddpex/mi/include/miNS.h:1.1.1.3 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miNS.h:1.1.1.2 Sun Sep 27 04:43:12 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miNS.h Tue Jan 16 17:30:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: miNS.h /main/3 1998/02/10 12:38:52 kaleb $ */ +/* $Xorg: miNS.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miNurbs.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miNurbs.h:1.1.1.2 xc/programs/Xserver/PEX5/ddpex/mi/include/miNurbs.h:1.1.1.3 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miNurbs.h:1.1.1.2 Sun Sep 27 04:43:14 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miNurbs.h Tue Jan 16 17:30:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: miNurbs.h /main/4 1998/02/10 12:38:57 kaleb $ */ +/* $Xorg: miNurbs.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ /***************************************************************** Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miPick.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miPick.h:1.1.1.2 xc/programs/Xserver/PEX5/ddpex/mi/include/miPick.h:1.1.1.3 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miPick.h:1.1.1.2 Sun Sep 27 04:43:16 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miPick.h Tue Jan 16 17:30:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: miPick.h /main/3 1998/02/10 12:39:02 kaleb $ */ +/* $Xorg: miPick.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miRender.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miRender.h:1.1.1.2 xc/programs/Xserver/PEX5/ddpex/mi/include/miRender.h:1.1.1.3 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miRender.h:1.1.1.2 Sun Sep 27 04:43:17 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miRender.h Tue Jan 16 17:30:36 2001 @@ -1,5 +1,5 @@ -/* $TOG: miRender.h /main/5 1998/02/10 12:39:06 kaleb $ */ +/* $Xorg: miRender.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miStrMacro.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miStrMacro.h:1.1.1.2 xc/programs/Xserver/PEX5/ddpex/mi/include/miStrMacro.h:1.1.1.3 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miStrMacro.h:1.1.1.2 Sun Sep 27 04:43:18 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miStrMacro.h Tue Jan 16 17:30:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: miStrMacro.h /main/6 1998/02/10 12:39:11 kaleb $ */ +/* $Xorg: miStrMacro.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h:1.4 xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h:1.5 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h:1.4 Thu Aug 31 15:03:55 2000 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h Wed Jan 17 17:12:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: miStruct.h /main/6 1998/02/10 12:39:15 kaleb $ */ +/* $Xorg: miStruct.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h,v 1.4 2000/08/31 19:03:55 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h,v 1.5 2001/01/17 22:12:20 dawes Exp $ */ #ifndef MISTRUCT_H #define MISTRUCT_H Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miText.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miText.h:1.1.1.2 xc/programs/Xserver/PEX5/ddpex/mi/include/miText.h:1.1.1.3 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miText.h:1.1.1.2 Sun Sep 27 04:43:19 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miText.h Tue Jan 16 17:30:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: miText.h /main/3 1998/02/10 12:39:20 kaleb $ */ +/* $Xorg: miText.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miWks.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miWks.h:1.1.1.2 xc/programs/Xserver/PEX5/ddpex/mi/include/miWks.h:1.1.1.3 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miWks.h:1.1.1.2 Sun Sep 27 04:43:19 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miWks.h Tue Jan 16 17:30:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: miWks.h /main/5 1998/02/10 12:39:24 kaleb $ */ +/* $Xorg: miWks.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/ddpex/mi/include/mipex.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/mipex.h:3.1 xc/programs/Xserver/PEX5/ddpex/mi/include/mipex.h:3.2 --- xc/programs/Xserver/PEX5/ddpex/mi/include/mipex.h:3.1 Sun Oct 4 05:34:08 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/mipex.h Wed Jan 17 17:12:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: mipex.h /main/6 1998/02/10 12:39:29 kaleb $ */ +/* $Xorg: mipex.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ /*********************************************************** @@ -42,7 +42,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/mipex.h,v 3.1 1998/10/04 09:34:08 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/mipex.h,v 3.2 2001/01/17 22:12:20 dawes Exp $ */ #ifndef MI_H #define MI_H Index: xc/programs/Xserver/PEX5/ddpex/mi/include/mixform.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/mixform.h:1.1.1.2 xc/programs/Xserver/PEX5/ddpex/mi/include/mixform.h:1.1.1.3 --- xc/programs/Xserver/PEX5/ddpex/mi/include/mixform.h:1.1.1.2 Sun Sep 27 04:43:21 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/mixform.h Tue Jan 16 17:30:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: mixform.h /main/3 1998/02/10 12:39:35 kaleb $ */ +/* $Xorg: mixform.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/ddpex/mi/level0/README diff -u xc/programs/Xserver/PEX5/ddpex/mi/level0/README:1.1.1.2 xc/programs/Xserver/PEX5/ddpex/mi/level0/README:1.1.1.3 --- xc/programs/Xserver/PEX5/ddpex/mi/level0/README:1.1.1.2 Sun Sep 27 04:43:21 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level0/README Tue Jan 16 17:30:56 2001 @@ -1,5 +1,5 @@ -/* $TOG: README /main/3 1998/02/10 13:59:41 kaleb $ */ +/* $Xorg: README,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/Imakefile diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/Imakefile:3.11 xc/programs/Xserver/PEX5/ddpex/mi/level1/Imakefile:3.12 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/Imakefile:3.11 Thu Aug 24 18:20:09 2000 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/Imakefile Wed Jan 17 17:12:20 2001 @@ -1,6 +1,8 @@ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ XCOMM -XCOMM $XConsortium: Imakefile /main/10 1996/09/28 16:54:08 rws $ -XCOMM $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/Imakefile,v 3.11 2000/08/24 22:20:09 tsi Exp $ +XCOMM +XCOMM +XCOMM $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/Imakefile,v 3.12 2001/01/17 22:12:20 dawes Exp $ XCOMM XCOMM XCOMM Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/mi52stubs.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/mi52stubs.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level1/mi52stubs.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/mi52stubs.c:3.5 Sun Oct 4 05:34:09 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/mi52stubs.c Wed Jan 17 17:12:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: mi52stubs.c /main/2 1998/02/10 12:40:32 kaleb $ */ +/* $Xorg: mi52stubs.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miDDCtoGC.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miDDCtoGC.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level1/miDDCtoGC.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miDDCtoGC.c:3.6 Sun Oct 4 05:34:09 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miDDCtoGC.c Wed Jan 17 17:12:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: miDDCtoGC.c /main/7 1998/02/10 12:39:39 kaleb $ */ +/* $Xorg: miDDCtoGC.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -43,7 +43,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/miDDCtoGC.c,v 3.6 1998/10/04 09:34:09 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/miDDCtoGC.c,v 3.7 2001/01/17 22:12:20 dawes Exp $ */ #include "miLUT.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miLevel1.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miLevel1.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/level1/miLevel1.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miLevel1.c:1.7 Sun Oct 4 05:34:10 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miLevel1.c Wed Jan 17 17:12:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: miLevel1.c /main/3 1998/02/10 12:39:44 kaleb $ */ +/* $Xorg: miLevel1.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miListUtil.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miListUtil.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level1/miListUtil.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miListUtil.c:3.5 Sun Oct 4 05:34:10 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miListUtil.c Wed Jan 17 17:12:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: miListUtil.c /main/4 1998/02/10 12:39:50 kaleb $ */ +/* $Xorg: miListUtil.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -43,7 +43,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/miListUtil.c,v 3.5 1998/10/04 09:34:10 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/miListUtil.c,v 3.6 2001/01/17 22:12:21 dawes Exp $ */ #include "miRender.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miLvl1Tab.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miLvl1Tab.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/level1/miLvl1Tab.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miLvl1Tab.c:1.7 Sun Oct 4 05:34:11 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miLvl1Tab.c Wed Jan 17 17:12:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: miLvl1Tab.c /main/3 1998/02/10 12:39:55 kaleb $ */ +/* $Xorg: miLvl1Tab.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miPck1Prim.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miPck1Prim.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level1/miPck1Prim.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miPck1Prim.c:3.5 Sun Oct 4 05:34:11 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miPck1Prim.c Wed Jan 17 17:12:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: miPck1Prim.c /main/4 1998/02/10 12:40:00 kaleb $ */ +/* $Xorg: miPck1Prim.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndFArea.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndFArea.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndFArea.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndFArea.c:3.5 Sun Oct 4 05:34:11 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndFArea.c Wed Jan 17 17:12:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: miRndFArea.c /main/6 1998/02/10 12:40:05 kaleb $ */ +/* $Xorg: miRndFArea.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndMarkr.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndMarkr.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndMarkr.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndMarkr.c:3.6 Sun Oct 4 05:34:12 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndMarkr.c Wed Jan 17 17:12:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: miRndMarkr.c /main/7 1998/02/10 12:40:10 kaleb $ */ +/* $Xorg: miRndMarkr.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -43,7 +43,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndMarkr.c,v 3.6 1998/10/04 09:34:12 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndMarkr.c,v 3.7 2001/01/17 22:12:21 dawes Exp $ */ #define NEED_EVENTS #include "miRender.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndPLine.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndPLine.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndPLine.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndPLine.c:3.5 Sun Oct 4 05:34:12 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndPLine.c Wed Jan 17 17:12:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: miRndPLine.c /main/3 1998/02/10 12:40:15 kaleb $ */ +/* $Xorg: miRndPLine.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndTStrip.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndTStrip.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndTStrip.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndTStrip.c:3.5 Sun Oct 4 05:34:13 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndTStrip.c Wed Jan 17 17:12:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: miRndTStrip.c /main/4 1998/02/10 12:40:21 kaleb $ */ +/* $Xorg: miRndTStrip.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndText.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndText.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndText.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndText.c:3.5 Sun Oct 4 05:34:13 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndText.c Wed Jan 17 17:12:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: miRndText.c /main/3 1998/02/10 12:40:27 kaleb $ */ +/* $Xorg: miRndText.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -43,7 +43,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndText.c,v 3.5 1998/10/04 09:34:13 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndText.c,v 3.6 2001/01/17 22:12:21 dawes Exp $ */ #define NEED_EVENTS #include "miRender.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/Imakefile diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/Imakefile:3.10 xc/programs/Xserver/PEX5/ddpex/mi/level2/Imakefile:3.11 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/Imakefile:3.10 Thu Aug 24 18:20:09 2000 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/Imakefile Wed Jan 17 17:12:22 2001 @@ -1,6 +1,9 @@ XCOMM -XCOMM $XConsortium: Imakefile /main/8 1996/09/28 16:54:14 rws $ -XCOMM $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/Imakefile,v 3.10 2000/08/24 22:20:09 tsi Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ +XCOMM +XCOMM +XCOMM +XCOMM $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/Imakefile,v 3.11 2001/01/17 22:12:22 dawes Exp $ XCOMM XCOMM XCOMM Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/ddContext.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/ddContext.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level2/ddContext.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/ddContext.c:3.5 Sun Oct 4 05:34:15 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/ddContext.c Wed Jan 17 17:12:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: ddContext.c /main/11 1998/02/10 12:40:37 kaleb $ */ +/* $Xorg: ddContext.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -44,7 +44,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/ddContext.c,v 3.5 1998/10/04 09:34:15 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/ddContext.c,v 3.6 2001/01/17 22:12:22 dawes Exp $ */ #include "miWks.h" #include "miStruct.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miBldXform.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miBldXform.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level2/miBldXform.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miBldXform.c:3.5 Sun Oct 4 05:34:16 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miBldXform.c Wed Jan 17 17:12:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: miBldXform.c /main/8 1998/02/10 12:40:42 kaleb $ */ +/* $Xorg: miBldXform.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -43,7 +43,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miBldXform.c,v 3.5 1998/10/04 09:34:16 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miBldXform.c,v 3.6 2001/01/17 22:12:22 dawes Exp $ */ #include "X.h" #include "Xproto.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miCellArray.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miCellArray.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miCellArray.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miCellArray.c:3.6 Sun Oct 4 05:34:17 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miCellArray.c Wed Jan 17 17:12:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: miCellArray.c /main/7 1998/02/10 12:40:49 kaleb $ */ +/* $Xorg: miCellArray.c,v 1.3 2000/08/17 19:47:05 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -43,7 +43,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miCellArray.c,v 3.6 1998/10/04 09:34:17 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miCellArray.c,v 3.7 2001/01/17 22:12:22 dawes Exp $ */ #include "mipex.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miClip.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miClip.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level2/miClip.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miClip.c:3.5 Sun Oct 4 05:34:17 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miClip.c Wed Jan 17 17:12:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: miClip.c /main/5 1998/02/10 12:40:54 kaleb $ */ +/* $Xorg: miClip.c,v 1.3 2000/08/17 19:47:05 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -43,7 +43,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miClip.c,v 3.5 1998/10/04 09:34:17 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miClip.c,v 3.6 2001/01/17 22:12:22 dawes Exp $ */ #include "mipex.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miConvert.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miConvert.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/miConvert.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miConvert.c:1.7 Sun Oct 4 05:34:17 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miConvert.c Wed Jan 17 17:12:22 2001 @@ -1,4 +1,4 @@ -/* $TOG: miConvert.c /main/8 1998/02/10 12:40:59 kaleb $ */ +/* $Xorg: miConvert.c,v 1.3 2000/08/17 19:47:05 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miConvert.c,v 1.7 1998/10/04 09:34:17 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miConvert.c,v 1.8 2001/01/17 22:12:22 dawes Exp $ */ #include "miLUT.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miCopy.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miCopy.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miCopy.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miCopy.c:3.6 Sun Oct 4 05:34:18 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miCopy.c Wed Jan 17 17:12:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: miCopy.c /main/10 1998/02/10 12:41:05 kaleb $ */ +/* $Xorg: miCopy.c,v 1.3 2000/08/17 19:47:05 cpqbld Exp $ */ /*********************************************************** @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miCopy.c,v 3.6 1998/10/04 09:34:18 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miCopy.c,v 3.7 2001/01/17 22:12:23 dawes Exp $ */ #include "ddpex.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miDestroy.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miDestroy.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miDestroy.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miDestroy.c:3.6 Sun Oct 4 05:34:19 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miDestroy.c Wed Jan 17 17:12:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: miDestroy.c /main/5 1998/02/10 12:41:10 kaleb $ */ +/* $Xorg: miDestroy.c,v 1.3 2000/08/17 19:47:05 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miFillArea.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miFillArea.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level2/miFillArea.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miFillArea.c:3.5 Sun Oct 4 05:34:19 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miFillArea.c Wed Jan 17 17:12:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: miFillArea.c /main/11 1998/02/10 12:41:15 kaleb $ */ +/* $Xorg: miFillArea.c,v 1.3 2000/08/17 19:47:05 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -43,7 +43,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miFillArea.c,v 3.5 1998/10/04 09:34:19 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miFillArea.c,v 3.6 2001/01/17 22:12:23 dawes Exp $ */ #include "miLUT.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miInquire.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miInquire.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miInquire.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miInquire.c:3.6 Sun Oct 4 05:34:20 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miInquire.c Wed Jan 17 17:12:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: miInquire.c /main/11 1998/02/10 12:41:21 kaleb $ */ +/* $Xorg: miInquire.c,v 1.5 2000/08/17 19:47:06 cpqbld Exp $ */ /*********************************************************** @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miInquire.c,v 3.6 1998/10/04 09:34:20 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miInquire.c,v 3.7 2001/01/17 22:12:23 dawes Exp $ */ #include "ddpex.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miLight.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miLight.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/miLight.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miLight.c:1.7 Sun Oct 4 05:34:20 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miLight.c Wed Jan 17 17:12:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: miLight.c /main/5 1998/02/10 12:41:26 kaleb $ */ +/* $Xorg: miLight.c,v 1.3 2000/08/17 19:47:06 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miLight.c,v 1.7 1998/10/04 09:34:20 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miLight.c,v 1.8 2001/01/17 22:12:23 dawes Exp $ */ #include "miLUT.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miLvl2Tab.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miLvl2Tab.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/miLvl2Tab.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miLvl2Tab.c:1.7 Sun Oct 4 05:34:21 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miLvl2Tab.c Wed Jan 17 17:12:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: miLvl2Tab.c /main/6 1998/02/10 12:41:32 kaleb $ */ +/* $Xorg: miLvl2Tab.c,v 1.3 2000/08/17 19:47:06 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miMarkers.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miMarkers.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level2/miMarkers.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miMarkers.c:3.5 Sun Oct 4 05:34:21 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miMarkers.c Wed Jan 17 17:12:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: miMarkers.c /main/6 1998/02/10 12:41:39 kaleb $ */ +/* $Xorg: miMarkers.c,v 1.3 2000/08/17 19:47:06 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miMarkers.c,v 3.5 1998/10/04 09:34:21 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miMarkers.c,v 3.6 2001/01/17 22:12:23 dawes Exp $ */ #include "mipex.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNCurve.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miNCurve.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miNCurve.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miNCurve.c:3.6 Sun Oct 4 05:34:22 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miNCurve.c Wed Jan 17 17:12:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: miNCurve.c /main/4 1998/02/10 12:41:43 kaleb $ */ +/* $Xorg: miNCurve.c,v 1.3 2000/08/17 19:47:06 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNCurve.c,v 3.6 1998/10/04 09:34:22 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNCurve.c,v 3.7 2001/01/17 22:12:23 dawes Exp $ */ #include "mipex.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSTrim.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSTrim.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSTrim.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSTrim.c:3.5 Sun Oct 4 05:34:22 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSTrim.c Wed Jan 17 17:12:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: miNSTrim.c /main/6 1998/02/10 12:41:47 kaleb $ */ +/* $Xorg: miNSTrim.c,v 1.3 2000/08/17 19:47:06 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSTrim.c,v 3.5 1998/10/04 09:34:22 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSTrim.c,v 3.6 2001/01/17 22:12:23 dawes Exp $ */ #include "mipex.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSurf.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSurf.c:3.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSurf.c:3.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSurf.c:3.7 Wed Apr 5 14:13:28 2000 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSurf.c Wed Jan 17 17:12:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: miNSurf.c /main/11 1998/02/10 12:41:53 kaleb $ */ +/* $Xorg: miNSurf.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSurf.c,v 3.7 2000/04/05 18:13:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSurf.c,v 3.8 2001/01/17 22:12:23 dawes Exp $ */ #define TRIMING 1 Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNurbs.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miNurbs.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miNurbs.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miNurbs.c:3.6 Sun Jan 31 07:21:28 1999 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miNurbs.c Wed Jan 17 17:12:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: miNurbs.c /main/6 1998/02/10 12:42:00 kaleb $ */ +/* $Xorg: miNurbs.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNurbs.c,v 3.6 1999/01/31 12:21:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNurbs.c,v 3.7 2001/01/17 22:12:24 dawes Exp $ */ #include "X.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miOCs.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miOCs.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level2/miOCs.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miOCs.c:3.5 Sun Oct 4 05:34:24 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miOCs.c Wed Jan 17 17:12:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: miOCs.c /main/7 1998/02/10 12:42:05 kaleb $ */ +/* $Xorg: miOCs.c,v 1.5 2000/08/17 19:47:07 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miOCs.c,v 3.5 1998/10/04 09:34:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miOCs.c,v 3.6 2001/01/17 22:12:24 dawes Exp $ */ #include "miLUT.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miPickPrim.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miPickPrim.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miPickPrim.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miPickPrim.c:3.6 Sun Oct 4 05:34:25 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miPickPrim.c Wed Jan 17 17:12:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: miPickPrim.c /main/9 1998/02/10 12:42:11 kaleb $ */ +/* $Xorg: miPickPrim.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miPickPrim.c,v 3.6 1998/10/04 09:34:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miPickPrim.c,v 3.7 2001/01/17 22:12:24 dawes Exp $ */ #include "miWks.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miPolyLine.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miPolyLine.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level2/miPolyLine.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miPolyLine.c:3.5 Sun Oct 4 05:34:25 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miPolyLine.c Wed Jan 17 17:12:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: miPolyLine.c /main/6 1998/02/10 12:42:19 kaleb $ */ +/* $Xorg: miPolyLine.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miPolyLine.c,v 3.5 1998/10/04 09:34:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miPolyLine.c,v 3.6 2001/01/17 22:12:24 dawes Exp $ */ #include "mipex.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miQuadMesh.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miQuadMesh.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miQuadMesh.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miQuadMesh.c:3.6 Sun Oct 4 05:34:25 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miQuadMesh.c Wed Jan 17 17:12:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: miQuadMesh.c /main/6 1998/02/10 12:42:23 kaleb $ */ +/* $Xorg: miQuadMesh.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miQuadMesh.c,v 3.6 1998/10/04 09:34:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miQuadMesh.c,v 3.7 2001/01/17 22:12:24 dawes Exp $ */ #include "miLUT.h" #include "ddpex2.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miReplace.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miReplace.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miReplace.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miReplace.c:3.6 Sun Oct 4 05:34:26 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miReplace.c Wed Jan 17 17:12:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: miReplace.c /main/6 1998/02/10 12:42:28 kaleb $ */ +/* $Xorg: miReplace.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ /*********************************************************** @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miReplace.c,v 3.6 1998/10/04 09:34:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miReplace.c,v 3.7 2001/01/17 22:12:24 dawes Exp $ */ #include "ddpex2.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miSOFAS.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miSOFAS.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miSOFAS.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miSOFAS.c:3.6 Sun Oct 4 05:34:26 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miSOFAS.c Wed Jan 17 17:12:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: miSOFAS.c /main/5 1998/02/10 12:42:32 kaleb $ */ +/* $Xorg: miSOFAS.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miSOFAS.c,v 3.6 1998/10/04 09:34:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miSOFAS.c,v 3.7 2001/01/17 22:12:24 dawes Exp $ */ #include "mipex.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miSearch.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miSearch.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level2/miSearch.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miSearch.c:3.5 Sun Oct 4 05:34:27 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miSearch.c Wed Jan 17 17:12:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: miSearch.c /main/7 1998/02/10 12:42:37 kaleb $ */ +/* $Xorg: miSearch.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miSearch.c,v 3.5 1998/10/04 09:34:27 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miSearch.c,v 3.6 2001/01/17 22:12:24 dawes Exp $ */ #include "miWks.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miTestOCs.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miTestOCs.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/miTestOCs.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miTestOCs.c:1.7 Sun Oct 4 05:34:28 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miTestOCs.c Wed Jan 17 17:12:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: miTestOCs.c /main/3 1998/02/10 12:42:41 kaleb $ */ +/* $Xorg: miTestOCs.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miText.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miText.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miText.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miText.c:3.6 Sun Oct 4 05:34:28 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miText.c Wed Jan 17 17:12:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: miText.c /main/14 1998/02/10 12:42:46 kaleb $ */ +/* $Xorg: miText.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miText.c,v 3.6 1998/10/04 09:34:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miText.c,v 3.7 2001/01/17 22:12:24 dawes Exp $ */ #include "miLUT.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miTrans.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miTrans.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/miTrans.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miTrans.c:1.7 Sun Oct 4 05:34:29 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miTrans.c Wed Jan 17 17:12:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: miTrans.c /main/4 1998/02/10 12:42:53 kaleb $ */ +/* $Xorg: miTrans.c,v 1.3 2000/08/17 19:47:08 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miTrans.c,v 1.7 1998/10/04 09:34:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miTrans.c,v 1.8 2001/01/17 22:12:25 dawes Exp $ */ #include "mipex.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miTriStrip.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miTriStrip.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level2/miTriStrip.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miTriStrip.c:3.5 Sun Oct 4 05:34:30 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miTriStrip.c Wed Jan 17 17:12:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: miTriStrip.c /main/13 1998/02/10 12:42:58 kaleb $ */ +/* $Xorg: miTriStrip.c,v 1.3 2000/08/17 19:47:08 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miTriStrip.c,v 3.5 1998/10/04 09:34:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miTriStrip.c,v 3.6 2001/01/17 22:12:25 dawes Exp $ */ #include "miClip.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/pexOCParse.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/pexOCParse.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/pexOCParse.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/pexOCParse.c:3.6 Sun Oct 4 05:34:30 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/pexOCParse.c Wed Jan 17 17:12:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexOCParse.c /main/11 1998/02/10 12:43:05 kaleb $ */ +/* $Xorg: pexOCParse.c,v 1.5 2000/08/17 19:47:08 cpqbld Exp $ */ /*********************************************************** @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/pexOCParse.c,v 3.6 1998/10/04 09:34:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/pexOCParse.c,v 3.7 2001/01/17 22:12:25 dawes Exp $ */ #include "miStruct.h" @@ -1006,17 +1006,17 @@ PARSER_PTR(ptr); ddHalfSpace ddHS; - INT16 i, count, operator; + INT16 i, count, op; int listSize = 0; ddFLOAT length; - EXTRACT_INT16(operator, ptr); + EXTRACT_INT16(op, ptr); EXTRACT_INT16(count, ptr); listSize = puCountList(DD_HALF_SPACE, count); GET_DD_STORAGE( ddMCV, miMCVolume_Struct, sizeof(miMCVolume_Struct) + listSize); - ddMCV->operator = operator; + ddMCV->operator = op; ddMCV->halfspaces = (listofObj *)(ddMCV + 1); puInitList(ddMCV->halfspaces, DD_HALF_SPACE, count); @@ -1038,17 +1038,17 @@ miMCVolume_Struct *ddMCV; PARSER_PTR(ptr); ddHalfSpace ddHS; - INT16 i, count, operator; + INT16 i, count, op; int listSize = 0; ddFLOAT length; - EXTRACT_INT16(operator, ptr); + EXTRACT_INT16(op, ptr); EXTRACT_INT16(count, ptr); listSize = puCountList(DD_HALF_SPACE, count); GET_DD_STORAGE( ddMCV, miMCVolume_Struct, sizeof(miMCVolume_Struct) + listSize); - ddMCV->operator = operator; + ddMCV->operator = op; ddMCV->halfspaces = (listofObj *)(ddMCV + 1); puInitList(ddMCV->halfspaces, DD_HALF_SPACE, count); Index: xc/programs/Xserver/PEX5/ddpex/mi/level3/Imakefile diff -u xc/programs/Xserver/PEX5/ddpex/mi/level3/Imakefile:3.10 xc/programs/Xserver/PEX5/ddpex/mi/level3/Imakefile:3.11 --- xc/programs/Xserver/PEX5/ddpex/mi/level3/Imakefile:3.10 Thu Aug 24 18:20:09 2000 +++ xc/programs/Xserver/PEX5/ddpex/mi/level3/Imakefile Wed Jan 17 17:12:27 2001 @@ -1,6 +1,9 @@ XCOMM -XCOMM $XConsortium: Imakefile /main/9 1996/09/28 16:54:20 rws $ -XCOMM $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level3/Imakefile,v 3.10 2000/08/24 22:20:09 tsi Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:08 cpqbld Exp $ +XCOMM +XCOMM +XCOMM +XCOMM $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level3/Imakefile,v 3.11 2001/01/17 22:12:27 dawes Exp $ XCOMM XCOMM XCOMM Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium Index: xc/programs/Xserver/PEX5/ddpex/mi/level3/miRender.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level3/miRender.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level3/miRender.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level3/miRender.c:3.5 Sun Oct 4 05:34:37 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level3/miRender.c Wed Jan 17 17:12:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: miRender.c /main/22 1998/02/10 12:43:12 kaleb $ */ +/* $Xorg: miRender.c,v 1.3 2000/08/17 19:47:08 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level3/miRender.c,v 3.5 1998/10/04 09:34:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level3/miRender.c,v 3.6 2001/01/17 22:12:27 dawes Exp $ */ #include "miLUT.h" #include "dipex.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level3/miRndrPick.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level3/miRndrPick.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/level3/miRndrPick.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/level3/miRndrPick.c:1.8 Sun Dec 26 19:39:31 1999 +++ xc/programs/Xserver/PEX5/ddpex/mi/level3/miRndrPick.c Wed Jan 17 17:12:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: miRndrPick.c /main/12 1998/02/10 12:43:20 kaleb $ */ +/* $Xorg: miRndrPick.c,v 1.3 2000/08/17 19:47:09 cpqbld Exp $ */ /************************************************************ @@ -21,7 +21,7 @@ in this Software without prior written authorization from The Open Group. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level3/miRndrPick.c,v 1.8 1999/12/27 00:39:31 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level3/miRndrPick.c,v 1.9 2001/01/17 22:12:28 dawes Exp $ */ #include "miLUT.h" #include "ddpex3.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/Imakefile diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/Imakefile:3.12 xc/programs/Xserver/PEX5/ddpex/mi/level4/Imakefile:3.14 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/Imakefile:3.12 Thu Aug 24 18:20:10 2000 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/Imakefile Mon Apr 23 12:17:07 2001 @@ -1,7 +1,10 @@ XCOMM -XCOMM $XConsortium: Imakefile /main/11 1996/09/28 16:54:25 rws $ -XCOMM $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/Imakefile,v 3.12 2000/08/24 22:20:10 tsi Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:09 cpqbld Exp $ XCOMM +XCOMM +XCOMM +XCOMM $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/Imakefile,v 3.14 2001/04/23 16:17:07 tsi Exp $ +XCOMM XCOMM XCOMM Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium XCOMM @@ -35,8 +38,7 @@ XCOMM DDTEST turns on some fprintf(stderr...)s for debugging DEFINES = PexDdpexDefines -EXT_DEFINES = ExtensionDefines -DEPEND_DEFINES = $(EXT_DEFINES) +DEPEND_DEFINES = $(EXT_DEFINES) DependDefines CDEBUGFLAGS = PexDdpexCDebugFlags PEXSERVINC = ../../../include Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/css_ex_str.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/css_ex_str.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/level4/css_ex_str.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/css_ex_str.c:1.8 Sun Jan 31 07:21:28 1999 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/css_ex_str.c Wed Jan 17 17:12:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: css_ex_str.c /main/3 1998/02/10 12:43:24 kaleb $ */ +/* $Xorg: css_ex_str.c,v 1.3 2000/08/17 19:47:09 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/css_ex_str.c,v 1.8 1999/01/31 12:21:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/css_ex_str.c,v 1.9 2001/01/17 22:12:29 dawes Exp $ */ /* * this file contains the element handling procedures for * the execute structure element. It is stored in PEX format Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/css_plain.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/css_plain.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/level4/css_plain.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/css_plain.c:1.8 Sun Jan 31 07:21:29 1999 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/css_plain.c Wed Jan 17 17:12:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: css_plain.c /main/6 1998/02/10 12:43:29 kaleb $ */ +/* $Xorg: css_plain.c,v 1.3 2000/08/17 19:47:09 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/css_plain.c,v 1.8 1999/01/31 12:21:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/css_plain.c,v 1.9 2001/01/17 22:12:29 dawes Exp $ */ /* * this file contains the element handling procedures for elements * which are stored in the format they are received. This includes Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/css_tbls.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/css_tbls.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/level4/css_tbls.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/css_tbls.c:1.7 Sun Oct 4 05:34:39 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/css_tbls.c Wed Jan 17 17:12:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: css_tbls.c /main/5 1998/02/10 12:43:33 kaleb $ */ +/* $Xorg: css_tbls.c,v 1.3 2000/08/17 19:47:09 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/miDynamics.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/miDynamics.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/level4/miDynamics.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/miDynamics.c:1.7 Sun Oct 4 05:34:40 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/miDynamics.c Wed Jan 17 17:12:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: miDynamics.c /main/4 1998/02/10 12:43:38 kaleb $ */ +/* $Xorg: miDynamics.c,v 1.3 2000/08/17 19:47:10 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/miPick.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/miPick.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/level4/miPick.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/miPick.c:1.7 Sun Oct 4 05:34:40 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/miPick.c Wed Jan 17 17:12:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: miPick.c /main/9 1998/02/10 12:43:42 kaleb $ */ +/* $Xorg: miPick.c,v 1.3 2000/08/17 19:47:10 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miPick.c,v 1.7 1998/10/04 09:34:40 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miPick.c,v 1.8 2001/01/17 22:12:29 dawes Exp $ */ #include "miWks.h" /* miPickMeasureStr is defined in here */ #include "miNS.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/miSC.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/miSC.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/level4/miSC.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/miSC.c:1.8 Sun Jan 31 07:21:29 1999 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/miSC.c Wed Jan 17 17:12:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: miSC.c /main/5 1998/02/10 12:43:47 kaleb $ */ +/* $Xorg: miSC.c,v 1.3 2000/08/17 19:47:10 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miSC.c,v 1.8 1999/01/31 12:21:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miSC.c,v 1.9 2001/01/17 22:12:29 dawes Exp $ */ #include "ddpex4.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/miStruct.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/miStruct.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/level4/miStruct.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/miStruct.c:3.5 Sun Oct 4 05:34:41 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/miStruct.c Wed Jan 17 17:12:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: miStruct.c /main/13 1998/02/10 12:43:51 kaleb $ */ +/* $Xorg: miStruct.c,v 1.3 2000/08/17 19:47:10 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miStruct.c,v 3.5 1998/10/04 09:34:41 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miStruct.c,v 3.6 2001/01/17 22:12:29 dawes Exp $ */ #include "mipex.h" #include "ddpex4.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/miTraverse.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/miTraverse.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/level4/miTraverse.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/miTraverse.c:1.8 Sun Jan 31 07:21:29 1999 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/miTraverse.c Wed Jan 17 17:12:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: miTraverse.c /main/7 1998/02/10 12:43:58 kaleb $ */ +/* $Xorg: miTraverse.c,v 1.3 2000/08/17 19:47:10 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miTraverse.c,v 1.8 1999/01/31 12:21:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miTraverse.c,v 1.9 2001/01/17 22:12:30 dawes Exp $ */ #include "miWks.h" #include "PEXproto.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/miWks.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/miWks.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/level4/miWks.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/miWks.c:1.8 Wed Jan 26 17:05:47 2000 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/miWks.c Wed Jan 17 17:12:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: miWks.c /main/17 1998/02/10 12:44:02 kaleb $ */ +/* $Xorg: miWks.c,v 1.3 2000/08/17 19:47:10 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miWks.c,v 1.8 2000/01/26 22:05:47 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miWks.c,v 1.9 2001/01/17 22:12:30 dawes Exp $ */ #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/Imakefile diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/Imakefile:3.12 xc/programs/Xserver/PEX5/ddpex/mi/shared/Imakefile:3.14 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/Imakefile:3.12 Thu Aug 24 18:20:10 2000 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/Imakefile Mon Apr 23 12:17:08 2001 @@ -1,7 +1,10 @@ XCOMM -XCOMM $XConsortium: Imakefile /main/12 1996/09/28 16:54:42 rws $ -XCOMM $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/Imakefile,v 3.12 2000/08/24 22:20:10 tsi Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:10 cpqbld Exp $ XCOMM +XCOMM +XCOMM +XCOMM $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/Imakefile,v 3.14 2001/04/23 16:17:08 tsi Exp $ +XCOMM XCOMM XCOMM Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium XCOMM @@ -36,7 +39,6 @@ XCOMM PEX_DEFAULT_FONTPATH defines the default path to PEX fonts DEFINES = PexDdpexDefines -EXT_DEFINES = ExtensionDefines CDEBUGFLAGS = PexDdpexCDebugFlags PEXSERVINC = ../../../include Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miClrApLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miClrApLUT.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/shared/miClrApLUT.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miClrApLUT.c:1.7 Sun Oct 4 05:34:45 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miClrApLUT.c Wed Jan 17 17:12:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: miClrApLUT.c /main/3 1998/02/10 12:44:09 kaleb $ */ +/* $Xorg: miClrApLUT.c,v 1.3 2000/08/17 19:47:10 cpqbld Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miClrApLUT.c,v 1.7 1998/10/04 09:34:45 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miClrApLUT.c,v 1.8 2001/01/17 22:12:32 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miColrLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miColrLUT.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/shared/miColrLUT.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miColrLUT.c:1.7 Sun Oct 4 05:34:46 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miColrLUT.c Wed Jan 17 17:12:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: miColrLUT.c /main/3 1998/02/10 12:44:13 kaleb $ */ +/* $Xorg: miColrLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miColrLUT.c,v 1.7 1998/10/04 09:34:46 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miColrLUT.c,v 1.8 2001/01/17 22:12:32 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miDCueLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miDCueLUT.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/shared/miDCueLUT.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miDCueLUT.c:1.7 Sun Oct 4 05:34:46 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miDCueLUT.c Wed Jan 17 17:12:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: miDCueLUT.c /main/3 1998/02/10 12:44:18 kaleb $ */ +/* $Xorg: miDCueLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miDCueLUT.c,v 1.7 1998/10/04 09:34:46 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miDCueLUT.c,v 1.8 2001/01/17 22:12:32 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miEdgeLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miEdgeLUT.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/shared/miEdgeLUT.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miEdgeLUT.c:1.7 Sun Oct 4 05:34:47 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miEdgeLUT.c Wed Jan 17 17:12:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: miEdgeLUT.c /main/3 1998/02/10 12:44:22 kaleb $ */ +/* $Xorg: miEdgeLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miEdgeLUT.c,v 1.7 1998/10/04 09:34:47 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miEdgeLUT.c,v 1.8 2001/01/17 22:12:32 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miFont.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miFont.c:3.5 xc/programs/Xserver/PEX5/ddpex/mi/shared/miFont.c:3.6 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miFont.c:3.5 Sun Oct 4 05:34:47 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miFont.c Wed Jan 17 17:12:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: miFont.c /main/8 1998/02/10 12:44:26 kaleb $ */ +/* $Xorg: miFont.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miFont.c,v 3.5 1998/10/04 09:34:47 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miFont.c,v 3.6 2001/01/17 22:12:33 dawes Exp $ */ #include "miFont.h" #include "miLUT.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miFontLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miFontLUT.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/shared/miFontLUT.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miFontLUT.c:1.7 Sun Oct 4 05:34:48 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miFontLUT.c Wed Jan 17 17:12:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: miFontLUT.c /main/3 1998/02/10 12:44:32 kaleb $ */ +/* $Xorg: miFontLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miFontLUT.c,v 1.7 1998/10/04 09:34:48 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miFontLUT.c,v 1.8 2001/01/17 22:12:33 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miIntLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miIntLUT.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/shared/miIntLUT.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miIntLUT.c:1.7 Sun Oct 4 05:34:49 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miIntLUT.c Wed Jan 17 17:12:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: miIntLUT.c /main/3 1998/02/10 12:44:40 kaleb $ */ +/* $Xorg: miIntLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miIntLUT.c,v 1.7 1998/10/04 09:34:49 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miIntLUT.c,v 1.8 2001/01/17 22:12:33 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUT.c:1.9 xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUT.c:1.10 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUT.c:1.9 Sun Jul 18 04:34:27 1999 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUT.c Wed Jan 17 17:12:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: miLUT.c /main/3 1998/02/10 12:44:46 kaleb $ */ +/* $Xorg: miLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUT.c,v 1.9 1999/07/18 08:34:27 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUT.c,v 1.10 2001/01/17 22:12:33 dawes Exp $ */ #include "miLUT.h" #include "pexUtils.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUTProcs.ci diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUTProcs.ci:1.1.1.2 xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUTProcs.ci:1.1.1.3 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUTProcs.ci:1.1.1.2 Sun Sep 27 04:44:19 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUTProcs.ci Tue Jan 16 17:34:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: miLUTProcs.ci /main/6 1998/02/10 13:59:50 kaleb $ */ +/* $Xorg: miLUTProcs.ci,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLightLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miLightLUT.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/shared/miLightLUT.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miLightLUT.c:1.7 Sun Oct 4 05:34:50 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miLightLUT.c Wed Jan 17 17:12:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: miLightLUT.c /main/4 1998/02/10 12:44:53 kaleb $ */ +/* $Xorg: miLightLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLightLUT.c,v 1.7 1998/10/04 09:34:50 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLightLUT.c,v 1.8 2001/01/17 22:12:33 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLineLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miLineLUT.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/shared/miLineLUT.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miLineLUT.c:1.7 Sun Oct 4 05:34:50 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miLineLUT.c Wed Jan 17 17:12:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: miLineLUT.c /main/3 1998/02/10 12:45:00 kaleb $ */ +/* $Xorg: miLineLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLineLUT.c,v 1.7 1998/10/04 09:34:50 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLineLUT.c,v 1.8 2001/01/17 22:12:33 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miMarkLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miMarkLUT.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/shared/miMarkLUT.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miMarkLUT.c:1.7 Sun Oct 4 05:34:51 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miMarkLUT.c Wed Jan 17 17:12:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: miMarkLUT.c /main/3 1998/02/10 12:45:06 kaleb $ */ +/* $Xorg: miMarkLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miMarkLUT.c,v 1.7 1998/10/04 09:34:51 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miMarkLUT.c,v 1.8 2001/01/17 22:12:33 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miMisc.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miMisc.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/shared/miMisc.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miMisc.c:1.7 Sun Oct 4 05:34:51 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miMisc.c Wed Jan 17 17:12:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: miMisc.c /main/10 1998/02/10 12:45:11 kaleb $ */ +/* $Xorg: miMisc.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miMisc.c,v 1.7 1998/10/04 09:34:51 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miMisc.c,v 1.8 2001/01/17 22:12:34 dawes Exp $ */ #include "mipex.h" #include "miInfo.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miNS.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miNS.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/shared/miNS.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miNS.c:1.8 Sun Jan 31 07:21:31 1999 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miNS.c Wed Jan 17 17:12:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: miNS.c /main/4 1998/02/10 12:45:17 kaleb $ */ +/* $Xorg: miNS.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miNS.c,v 1.8 1999/01/31 12:21:31 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miNS.c,v 1.9 2001/01/17 22:12:34 dawes Exp $ */ #include "mipex.h" #include "miNS.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miPattLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miPattLUT.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/shared/miPattLUT.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miPattLUT.c:1.7 Sun Oct 4 05:34:52 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miPattLUT.c Wed Jan 17 17:12:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: miPattLUT.c /main/5 1998/02/10 12:45:24 kaleb $ */ +/* $Xorg: miPattLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miPattLUT.c,v 1.7 1998/10/04 09:34:52 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miPattLUT.c,v 1.8 2001/01/17 22:12:34 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miTextLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miTextLUT.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/shared/miTextLUT.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miTextLUT.c:1.7 Sun Oct 4 05:34:53 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miTextLUT.c Wed Jan 17 17:12:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: miTextLUT.c /main/3 1998/02/10 12:45:30 kaleb $ */ +/* $Xorg: miTextLUT.c,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ */ /* @@ -43,7 +43,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miTextLUT.c,v 1.7 1998/10/04 09:34:53 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miTextLUT.c,v 1.8 2001/01/17 22:12:34 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miUtils.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miUtils.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/shared/miUtils.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miUtils.c:1.7 Sun Oct 4 05:34:53 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miUtils.c Wed Jan 17 17:12:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: miUtils.c /main/6 1998/02/10 12:45:37 kaleb $ */ +/* $Xorg: miUtils.c,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miUtils.c,v 1.7 1998/10/04 09:34:53 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miUtils.c,v 1.8 2001/01/17 22:12:34 dawes Exp $ */ #include "mipex.h" #include "PEX.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miViewLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miViewLUT.c:1.7 xc/programs/Xserver/PEX5/ddpex/mi/shared/miViewLUT.c:1.8 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miViewLUT.c:1.7 Sun Oct 4 05:34:54 1998 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miViewLUT.c Wed Jan 17 17:12:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: miViewLUT.c /main/3 1998/02/10 12:45:43 kaleb $ */ +/* $Xorg: miViewLUT.c,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miViewLUT.c,v 1.7 1998/10/04 09:34:54 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miViewLUT.c,v 1.8 2001/01/17 22:12:34 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/dipex/Imakefile diff -u xc/programs/Xserver/PEX5/dipex/Imakefile:1.1.1.1 xc/programs/Xserver/PEX5/dipex/Imakefile:1.1.1.2 --- xc/programs/Xserver/PEX5/dipex/Imakefile:1.1.1.1 Sat Dec 21 23:03:55 1996 +++ xc/programs/Xserver/PEX5/dipex/Imakefile Tue Jan 16 17:34:30 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: Imakefile /main/1 1996/12/02 10:19:00 lehors $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ XCOMM This is only used on NT where we do not know how to jump over this dir #ifdef Win32Architecture Index: xc/programs/Xserver/PEX5/dipex/dispatch/Imakefile diff -u xc/programs/Xserver/PEX5/dipex/dispatch/Imakefile:3.12 xc/programs/Xserver/PEX5/dipex/dispatch/Imakefile:3.13 --- xc/programs/Xserver/PEX5/dipex/dispatch/Imakefile:3.12 Thu Aug 24 18:20:10 2000 +++ xc/programs/Xserver/PEX5/dipex/dispatch/Imakefile Wed Jan 17 17:12:36 2001 @@ -1,6 +1,9 @@ XCOMM -XCOMM $XConsortium: Imakefile /main/8 1996/09/28 16:54:48 rws $ -XCOMM $XFree86: xc/programs/Xserver/PEX5/dipex/dispatch/Imakefile,v 3.12 2000/08/24 22:20:10 tsi Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ +XCOMM +XCOMM +XCOMM +XCOMM $XFree86: xc/programs/Xserver/PEX5/dipex/dispatch/Imakefile,v 3.13 2001/01/17 22:12:36 dawes Exp $ XCOMM XCOMM XCOMM Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium. Index: xc/programs/Xserver/PEX5/dipex/dispatch/dipexBuf.c diff -u xc/programs/Xserver/PEX5/dipex/dispatch/dipexBuf.c:3.5 xc/programs/Xserver/PEX5/dipex/dispatch/dipexBuf.c:3.6 --- xc/programs/Xserver/PEX5/dipex/dispatch/dipexBuf.c:3.5 Sun Oct 4 05:34:57 1998 +++ xc/programs/Xserver/PEX5/dipex/dispatch/dipexBuf.c Wed Jan 17 17:12:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: dipexBuf.c /main/4 1998/02/10 12:34:37 kaleb $ */ +/* $Xorg: dipexBuf.c,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/dispatch/dipexExt.c diff -u xc/programs/Xserver/PEX5/dipex/dispatch/dipexExt.c:3.18 xc/programs/Xserver/PEX5/dipex/dispatch/dipexExt.c:3.20 --- xc/programs/Xserver/PEX5/dipex/dispatch/dipexExt.c:3.18 Sun Dec 20 06:57:23 1998 +++ xc/programs/Xserver/PEX5/dipex/dispatch/dipexExt.c Fri Feb 16 08:24:06 2001 @@ -1,4 +1,4 @@ -/* $TOG: dipexExt.c /main/12 1998/02/10 12:34:41 kaleb $ */ +/* $Xorg: dipexExt.c,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ */ /*********************************************************** @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/dispatch/dipexExt.c,v 3.18 1998/12/20 11:57:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/dispatch/dipexExt.c,v 3.20 2001/02/16 13:24:06 eich Exp $ */ #define NEED_EVENTS #include "X.h" @@ -146,6 +146,7 @@ in the SI but maybe some vendors versions might... */ diFreePEXBuffer(pPEXBuffer); + pPEXBuffer = NULL; return; } @@ -156,6 +157,7 @@ if (!pPEXFont) { ErrorF("PEXExtensionInit: Memory error--could not allocate default PEX font\n"); diFreePEXBuffer(pPEXBuffer); + pPEXBuffer = NULL; return; } @@ -186,6 +188,7 @@ xfree(pPEXFont); defaultPEXFont = 0; diFreePEXBuffer(pPEXBuffer); + pPEXBuffer = NULL; return; } @@ -205,6 +208,7 @@ xfree(pPEXFont); defaultPEXFont = 0; diFreePEXBuffer(pPEXBuffer); + pPEXBuffer = NULL; return; } @@ -216,6 +220,7 @@ xfree(pPEXFont); defaultPEXFont = 0; diFreePEXBuffer(pPEXBuffer); + pPEXBuffer = NULL; return; } @@ -312,6 +317,7 @@ ddpexReset(); diFreePEXBuffer(pPEXBuffer); + pPEXBuffer = NULL; } Index: xc/programs/Xserver/PEX5/dipex/dispatch/dipexParse.c diff -u xc/programs/Xserver/PEX5/dipex/dispatch/dipexParse.c:1.7 xc/programs/Xserver/PEX5/dipex/dispatch/dipexParse.c:1.8 --- xc/programs/Xserver/PEX5/dipex/dispatch/dipexParse.c:1.7 Sun Oct 4 05:34:58 1998 +++ xc/programs/Xserver/PEX5/dipex/dispatch/dipexParse.c Wed Jan 17 17:12:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: dipexParse.c /main/3 1998/02/10 12:34:46 kaleb $ */ +/* $Xorg: dipexParse.c,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/dispatch/pexDump.c diff -u xc/programs/Xserver/PEX5/dipex/dispatch/pexDump.c:1.7 xc/programs/Xserver/PEX5/dipex/dispatch/pexDump.c:1.8 --- xc/programs/Xserver/PEX5/dipex/dispatch/pexDump.c:1.7 Sun Oct 4 05:34:59 1998 +++ xc/programs/Xserver/PEX5/dipex/dispatch/pexDump.c Wed Jan 17 17:12:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexDump.c /main/4 1998/02/10 12:34:50 kaleb $ */ +/* $Xorg: pexDump.c,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/dispatch/pexError.c diff -u xc/programs/Xserver/PEX5/dipex/dispatch/pexError.c:1.1.1.2 xc/programs/Xserver/PEX5/dipex/dispatch/pexError.c:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/dispatch/pexError.c:1.1.1.2 Sun Sep 27 04:40:38 1998 +++ xc/programs/Xserver/PEX5/dipex/dispatch/pexError.c Tue Jan 16 17:34:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexError.c /main/4 1998/02/10 12:34:54 kaleb $ */ +/* $Xorg: pexError.c,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/dispatch/pexUtils.c diff -u xc/programs/Xserver/PEX5/dipex/dispatch/pexUtils.c:3.6 xc/programs/Xserver/PEX5/dipex/dispatch/pexUtils.c:3.7 --- xc/programs/Xserver/PEX5/dipex/dispatch/pexUtils.c:3.6 Sun Oct 4 05:34:59 1998 +++ xc/programs/Xserver/PEX5/dipex/dispatch/pexUtils.c Wed Jan 17 17:12:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexUtils.c /main/9 1998/02/10 12:34:58 kaleb $ */ +/* $Xorg: pexUtils.c,v 1.3 2000/08/17 19:47:13 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -43,7 +43,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/dispatch/pexUtils.c,v 3.6 1998/10/04 09:34:59 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/dispatch/pexUtils.c,v 3.7 2001/01/17 22:12:36 dawes Exp $ */ #include "ddpex.h" #include "pexUtils.h" Index: xc/programs/Xserver/PEX5/dipex/objects/Imakefile diff -u xc/programs/Xserver/PEX5/dipex/objects/Imakefile:3.15 xc/programs/Xserver/PEX5/dipex/objects/Imakefile:3.16 --- xc/programs/Xserver/PEX5/dipex/objects/Imakefile:3.15 Thu Aug 24 18:20:10 2000 +++ xc/programs/Xserver/PEX5/dipex/objects/Imakefile Wed Jan 17 17:12:37 2001 @@ -1,6 +1,9 @@ XCOMM -XCOMM $XConsortium: Imakefile /main/13 1996/09/28 16:54:53 rws $ -XCOMM $XFree86: xc/programs/Xserver/PEX5/dipex/objects/Imakefile,v 3.15 2000/08/24 22:20:10 tsi Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:13 cpqbld Exp $ +XCOMM +XCOMM +XCOMM +XCOMM $XFree86: xc/programs/Xserver/PEX5/dipex/objects/Imakefile,v 3.16 2001/01/17 22:12:37 dawes Exp $ XCOMM XCOMM XCOMM Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium Index: xc/programs/Xserver/PEX5/dipex/objects/pexAccBuf.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexAccBuf.c:3.6 xc/programs/Xserver/PEX5/dipex/objects/pexAccBuf.c:3.7 --- xc/programs/Xserver/PEX5/dipex/objects/pexAccBuf.c:3.6 Sun Oct 4 05:35:01 1998 +++ xc/programs/Xserver/PEX5/dipex/objects/pexAccBuf.c Wed Jan 17 17:12:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexAccBuf.c /main/2 1998/02/10 12:35:56 kaleb $ */ +/* $Xorg: pexAccBuf.c,v 1.3 2000/08/17 19:47:13 cpqbld Exp $ */ /* Copyright 1994, 1998 The Open Group Index: xc/programs/Xserver/PEX5/dipex/objects/pexFont.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexFont.c:3.7 xc/programs/Xserver/PEX5/dipex/objects/pexFont.c:3.8 --- xc/programs/Xserver/PEX5/dipex/objects/pexFont.c:3.7 Sun Oct 4 05:35:02 1998 +++ xc/programs/Xserver/PEX5/dipex/objects/pexFont.c Wed Jan 17 17:12:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexFont.c /main/9 1998/02/10 12:35:03 kaleb $ */ +/* $Xorg: pexFont.c,v 1.3 2000/08/17 19:47:13 cpqbld Exp $ */ /*********************************************************** @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexFont.c,v 3.7 1998/10/04 09:35:02 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexFont.c,v 3.8 2001/01/17 22:12:37 dawes Exp $ */ /*++ pexFont.c Index: xc/programs/Xserver/PEX5/dipex/objects/pexInfo.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexInfo.c:1.7 xc/programs/Xserver/PEX5/dipex/objects/pexInfo.c:1.8 --- xc/programs/Xserver/PEX5/dipex/objects/pexInfo.c:1.7 Sun Oct 4 05:35:02 1998 +++ xc/programs/Xserver/PEX5/dipex/objects/pexInfo.c Wed Jan 17 17:12:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexInfo.c /main/7 1998/02/10 12:35:07 kaleb $ */ +/* $Xorg: pexInfo.c,v 1.3 2000/08/17 19:47:13 cpqbld Exp $ */ /*********************************************************** @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexInfo.c,v 1.7 1998/10/04 09:35:02 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexInfo.c,v 1.8 2001/01/17 22:12:37 dawes Exp $ */ /*++ pexInfo.c Index: xc/programs/Xserver/PEX5/dipex/objects/pexLut.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexLut.c:3.7 xc/programs/Xserver/PEX5/dipex/objects/pexLut.c:3.8 --- xc/programs/Xserver/PEX5/dipex/objects/pexLut.c:3.7 Sun Jan 31 07:21:31 1999 +++ xc/programs/Xserver/PEX5/dipex/objects/pexLut.c Wed Jan 17 17:12:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexLut.c /main/6 1998/02/10 12:35:11 kaleb $ */ +/* $Xorg: pexLut.c,v 1.3 2000/08/17 19:47:13 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -43,7 +43,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexLut.c,v 3.7 1999/01/31 12:21:31 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexLut.c,v 3.8 2001/01/17 22:12:37 dawes Exp $ */ /*++ Index: xc/programs/Xserver/PEX5/dipex/objects/pexNs.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexNs.c:3.6 xc/programs/Xserver/PEX5/dipex/objects/pexNs.c:3.7 --- xc/programs/Xserver/PEX5/dipex/objects/pexNs.c:3.6 Sun Jan 31 07:21:32 1999 +++ xc/programs/Xserver/PEX5/dipex/objects/pexNs.c Wed Jan 17 17:12:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexNs.c /main/4 1998/02/10 12:35:15 kaleb $ */ +/* $Xorg: pexNs.c,v 1.3 2000/08/17 19:47:13 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -43,7 +43,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexNs.c,v 3.6 1999/01/31 12:21:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexNs.c,v 3.7 2001/01/17 22:12:37 dawes Exp $ */ #include "X.h" Index: xc/programs/Xserver/PEX5/dipex/objects/pexPc.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexPc.c:3.5 xc/programs/Xserver/PEX5/dipex/objects/pexPc.c:3.6 --- xc/programs/Xserver/PEX5/dipex/objects/pexPc.c:3.5 Sun Oct 4 05:35:03 1998 +++ xc/programs/Xserver/PEX5/dipex/objects/pexPc.c Wed Jan 17 17:12:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexPc.c /main/11 1998/02/10 12:35:20 kaleb $ */ +/* $Xorg: pexPc.c,v 1.3 2000/08/17 19:47:14 cpqbld Exp $ */ /*********************************************************** @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexPc.c,v 3.5 1998/10/04 09:35:03 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexPc.c,v 3.6 2001/01/17 22:12:37 dawes Exp $ */ /*++ Index: xc/programs/Xserver/PEX5/dipex/objects/pexPhigs.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexPhigs.c:3.6 xc/programs/Xserver/PEX5/dipex/objects/pexPhigs.c:3.7 --- xc/programs/Xserver/PEX5/dipex/objects/pexPhigs.c:3.6 Sun Jan 31 07:21:32 1999 +++ xc/programs/Xserver/PEX5/dipex/objects/pexPhigs.c Wed Jan 17 17:12:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexPhigs.c /main/6 1998/02/10 12:35:27 kaleb $ */ +/* $Xorg: pexPhigs.c,v 1.3 2000/08/17 19:47:14 cpqbld Exp $ */ /*********************************************************** @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexPhigs.c,v 3.6 1999/01/31 12:21:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexPhigs.c,v 3.7 2001/01/17 22:12:38 dawes Exp $ */ /*++ Index: xc/programs/Xserver/PEX5/dipex/objects/pexPick.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexPick.c:3.6 xc/programs/Xserver/PEX5/dipex/objects/pexPick.c:3.7 --- xc/programs/Xserver/PEX5/dipex/objects/pexPick.c:3.6 Sun Jan 31 07:21:32 1999 +++ xc/programs/Xserver/PEX5/dipex/objects/pexPick.c Wed Jan 17 17:12:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexPick.c /main/4 1998/02/10 12:35:32 kaleb $ */ +/* $Xorg: pexPick.c,v 1.3 2000/08/17 19:47:14 cpqbld Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group @@ -43,7 +43,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexPick.c,v 3.6 1999/01/31 12:21:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexPick.c,v 3.7 2001/01/17 22:12:38 dawes Exp $ */ /*++ Index: xc/programs/Xserver/PEX5/dipex/objects/pexRndr.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexRndr.c:3.6 xc/programs/Xserver/PEX5/dipex/objects/pexRndr.c:3.7 --- xc/programs/Xserver/PEX5/dipex/objects/pexRndr.c:3.6 Sun Oct 4 05:35:07 1998 +++ xc/programs/Xserver/PEX5/dipex/objects/pexRndr.c Wed Jan 17 17:12:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexRndr.c /main/30 1998/02/10 12:35:36 kaleb $ */ +/* $Xorg: pexRndr.c,v 1.3 2000/08/17 19:47:14 cpqbld Exp $ */ /*********************************************************** @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexRndr.c,v 3.6 1998/10/04 09:35:07 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexRndr.c,v 3.7 2001/01/17 22:12:38 dawes Exp $ */ /*++ * PEXCreateRenderer Index: xc/programs/Xserver/PEX5/dipex/objects/pexRndrPick.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexRndrPick.c:1.7 xc/programs/Xserver/PEX5/dipex/objects/pexRndrPick.c:1.8 --- xc/programs/Xserver/PEX5/dipex/objects/pexRndrPick.c:1.7 Sun Oct 4 05:35:07 1998 +++ xc/programs/Xserver/PEX5/dipex/objects/pexRndrPick.c Wed Jan 17 17:12:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexRndrPick.c /main/10 1998/02/10 12:35:43 kaleb $ */ +/* $Xorg: pexRndrPick.c,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ /************************************************************ Index: xc/programs/Xserver/PEX5/dipex/objects/pexSc.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexSc.c:3.5 xc/programs/Xserver/PEX5/dipex/objects/pexSc.c:3.6 --- xc/programs/Xserver/PEX5/dipex/objects/pexSc.c:3.5 Sun Oct 4 05:35:08 1998 +++ xc/programs/Xserver/PEX5/dipex/objects/pexSc.c Wed Jan 17 17:12:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexSc.c /main/10 1998/02/10 12:35:47 kaleb $ */ +/* $Xorg: pexSc.c,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ /*********************************************************** @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexSc.c,v 3.5 1998/10/04 09:35:08 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexSc.c,v 3.6 2001/01/17 22:12:38 dawes Exp $ */ /*++ Index: xc/programs/Xserver/PEX5/dipex/objects/pexStr.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexStr.c:3.6 xc/programs/Xserver/PEX5/dipex/objects/pexStr.c:3.7 --- xc/programs/Xserver/PEX5/dipex/objects/pexStr.c:3.6 Sun Oct 4 05:35:08 1998 +++ xc/programs/Xserver/PEX5/dipex/objects/pexStr.c Wed Jan 17 17:12:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexStr.c /main/6 1998/02/10 12:35:52 kaleb $ */ +/* $Xorg: pexStr.c,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/objects/pexTM.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexTM.c:3.6 xc/programs/Xserver/PEX5/dipex/objects/pexTM.c:3.7 --- xc/programs/Xserver/PEX5/dipex/objects/pexTM.c:3.6 Sun Oct 4 05:35:09 1998 +++ xc/programs/Xserver/PEX5/dipex/objects/pexTM.c Wed Jan 17 17:12:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexTM.c /main/3 1998/02/10 12:36:01 kaleb $ */ +/* $Xorg: pexTM.c,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ /* Copyright 1994, 1998 The Open Group Index: xc/programs/Xserver/PEX5/dipex/swap/ConvName.ci diff -u xc/programs/Xserver/PEX5/dipex/swap/ConvName.ci:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/ConvName.ci:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/ConvName.ci:1.1.1.2 Sun Sep 27 04:41:25 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/ConvName.ci Tue Jan 16 17:35:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: ConvName.ci /main/3 1998/02/10 14:00:03 kaleb $ */ +/* $Xorg: ConvName.ci,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/ConvName.h diff -u xc/programs/Xserver/PEX5/dipex/swap/ConvName.h:3.1 xc/programs/Xserver/PEX5/dipex/swap/ConvName.h:3.2 --- xc/programs/Xserver/PEX5/dipex/swap/ConvName.h:3.1 Sun Oct 4 05:35:11 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/ConvName.h Wed Jan 17 17:12:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: ConvName.h /main/5 1998/02/10 12:36:05 kaleb $ */ +/* $Xorg: ConvName.h,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/Convert.c diff -u xc/programs/Xserver/PEX5/dipex/swap/Convert.c:1.7 xc/programs/Xserver/PEX5/dipex/swap/Convert.c:1.8 --- xc/programs/Xserver/PEX5/dipex/swap/Convert.c:1.7 Sun Oct 4 05:35:12 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/Convert.c Wed Jan 17 17:12:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: Convert.c /main/6 1998/02/10 12:36:09 kaleb $ */ +/* $Xorg: Convert.c,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/Imakefile diff -u xc/programs/Xserver/PEX5/dipex/swap/Imakefile:3.10 xc/programs/Xserver/PEX5/dipex/swap/Imakefile:3.11 --- xc/programs/Xserver/PEX5/dipex/swap/Imakefile:3.10 Thu Aug 24 18:20:11 2000 +++ xc/programs/Xserver/PEX5/dipex/swap/Imakefile Wed Jan 17 17:12:39 2001 @@ -1,6 +1,9 @@ XCOMM -XCOMM $XConsortium: Imakefile /main/13 1996/09/28 16:55:03 rws $ -XCOMM $XFree86: xc/programs/Xserver/PEX5/dipex/swap/Imakefile,v 3.10 2000/08/24 22:20:11 tsi Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ +XCOMM +XCOMM +XCOMM +XCOMM $XFree86: xc/programs/Xserver/PEX5/dipex/swap/Imakefile,v 3.11 2001/01/17 22:12:39 dawes Exp $ XCOMM XCOMM XCOMM Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium Index: xc/programs/Xserver/PEX5/dipex/swap/OCTables.c diff -u xc/programs/Xserver/PEX5/dipex/swap/OCTables.c:1.7 xc/programs/Xserver/PEX5/dipex/swap/OCTables.c:1.8 --- xc/programs/Xserver/PEX5/dipex/swap/OCTables.c:1.7 Sun Oct 4 05:35:12 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/OCTables.c Wed Jan 17 17:12:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: OCTables.c /main/3 1998/02/10 12:36:13 kaleb $ */ +/* $Xorg: OCTables.c,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/OCattr.c diff -u xc/programs/Xserver/PEX5/dipex/swap/OCattr.c:1.7 xc/programs/Xserver/PEX5/dipex/swap/OCattr.c:1.8 --- xc/programs/Xserver/PEX5/dipex/swap/OCattr.c:1.7 Sun Oct 4 05:35:13 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/OCattr.c Wed Jan 17 17:12:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: OCattr.c /main/8 1998/02/10 12:36:17 kaleb $ */ +/* $Xorg: OCattr.c,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/OCattr.h diff -u xc/programs/Xserver/PEX5/dipex/swap/OCattr.h:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/OCattr.h:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/OCattr.h:1.1.1.2 Sun Sep 27 04:41:37 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/OCattr.h Tue Jan 16 17:35:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: OCattr.h /main/4 1998/02/10 12:36:22 kaleb $ */ +/* $Xorg: OCattr.h,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/OCcolour.c diff -u xc/programs/Xserver/PEX5/dipex/swap/OCcolour.c:1.7 xc/programs/Xserver/PEX5/dipex/swap/OCcolour.c:1.8 --- xc/programs/Xserver/PEX5/dipex/swap/OCcolour.c:1.7 Sun Oct 4 05:35:13 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/OCcolour.c Wed Jan 17 17:12:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: OCcolour.c /main/3 1998/02/10 12:36:26 kaleb $ */ +/* $Xorg: OCcolour.c,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/OCcolour.ci diff -u xc/programs/Xserver/PEX5/dipex/swap/OCcolour.ci:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/OCcolour.ci:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/OCcolour.ci:1.1.1.2 Sun Sep 27 04:41:40 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/OCcolour.ci Tue Jan 16 17:35:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: OCcolour.ci /main/4 1998/02/10 14:00:09 kaleb $ */ +/* $Xorg: OCcolour.ci,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/OCcolour.h diff -u xc/programs/Xserver/PEX5/dipex/swap/OCcolour.h:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/OCcolour.h:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/OCcolour.h:1.1.1.2 Sun Sep 27 04:41:41 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/OCcolour.h Tue Jan 16 17:35:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: OCcolour.h /main/3 1998/02/10 12:36:30 kaleb $ */ +/* $Xorg: OCcolour.h,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/OCprim.h diff -u xc/programs/Xserver/PEX5/dipex/swap/OCprim.h:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/OCprim.h:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/OCprim.h:1.1.1.2 Sun Sep 27 04:41:42 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/OCprim.h Tue Jan 16 17:35:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: OCprim.h /main/5 1998/02/10 12:36:34 kaleb $ */ +/* $Xorg: OCprim.h,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/RepTables.c diff -u xc/programs/Xserver/PEX5/dipex/swap/RepTables.c:1.7 xc/programs/Xserver/PEX5/dipex/swap/RepTables.c:1.8 --- xc/programs/Xserver/PEX5/dipex/swap/RepTables.c:1.7 Sun Oct 4 05:35:14 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/RepTables.c Wed Jan 17 17:12:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: RepTables.c /main/3 1998/02/10 12:36:40 kaleb $ */ +/* $Xorg: RepTables.c,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/Replies.ci diff -u xc/programs/Xserver/PEX5/dipex/swap/Replies.ci:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/Replies.ci:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/Replies.ci:1.1.1.2 Sun Sep 27 04:41:46 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/Replies.ci Tue Jan 16 17:35:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: Replies.ci /main/5 1998/02/10 14:00:14 kaleb $ */ +/* $Xorg: Replies.ci,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/ReqTables.c diff -u xc/programs/Xserver/PEX5/dipex/swap/ReqTables.c:1.7 xc/programs/Xserver/PEX5/dipex/swap/ReqTables.c:1.8 --- xc/programs/Xserver/PEX5/dipex/swap/ReqTables.c:1.7 Sun Oct 4 05:35:14 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/ReqTables.c Wed Jan 17 17:12:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: ReqTables.c /main/3 1998/02/10 12:36:46 kaleb $ */ +/* $Xorg: ReqTables.c,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/Requests.ci diff -u xc/programs/Xserver/PEX5/dipex/swap/Requests.ci:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/Requests.ci:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/Requests.ci:1.1.1.2 Sun Sep 27 04:41:49 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/Requests.ci Tue Jan 16 17:35:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: Requests.ci /main/7 1998/02/10 14:00:21 kaleb $ */ +/* $Xorg: Requests.ci,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ /****************************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/Requests.h diff -u xc/programs/Xserver/PEX5/dipex/swap/Requests.h:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/Requests.h:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/Requests.h:1.1.1.2 Sun Sep 27 04:41:50 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/Requests.h Tue Jan 16 17:35:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: Requests.h /main/5 1998/02/10 12:36:50 kaleb $ */ +/* $Xorg: Requests.h,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ /****************************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/SwapConv.h diff -u xc/programs/Xserver/PEX5/dipex/swap/SwapConv.h:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/SwapConv.h:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/SwapConv.h:1.1.1.2 Sun Sep 27 04:41:52 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/SwapConv.h Tue Jan 16 17:35:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: SwapConv.h /main/4 1998/02/10 12:36:54 kaleb $ */ +/* $Xorg: SwapConv.h,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/UconvName.ci diff -u xc/programs/Xserver/PEX5/dipex/swap/UconvName.ci:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/UconvName.ci:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/UconvName.ci:1.1.1.2 Sun Sep 27 04:41:54 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/UconvName.ci Tue Jan 16 17:35:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: UconvName.ci /main/3 1998/02/10 14:00:28 kaleb $ */ +/* $Xorg: UconvName.ci,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/UconvName.h diff -u xc/programs/Xserver/PEX5/dipex/swap/UconvName.h:3.1 xc/programs/Xserver/PEX5/dipex/swap/UconvName.h:3.2 --- xc/programs/Xserver/PEX5/dipex/swap/UconvName.h:3.1 Sun Oct 4 05:35:14 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/UconvName.h Wed Jan 17 17:12:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: UconvName.h /main/5 1998/02/10 12:36:58 kaleb $ */ +/* $Xorg: UconvName.h,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/cOCTables.ci diff -u xc/programs/Xserver/PEX5/dipex/swap/cOCTables.ci:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/cOCTables.ci:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/cOCTables.ci:1.1.1.2 Sun Sep 27 04:41:57 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/cOCTables.ci Tue Jan 16 17:35:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: cOCTables.ci /main/6 1998/02/10 13:59:58 kaleb $ */ +/* $Xorg: cOCTables.ci,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ /* Automatically generated OC table */ /****************************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/cOCprim.c diff -u xc/programs/Xserver/PEX5/dipex/swap/cOCprim.c:1.7 xc/programs/Xserver/PEX5/dipex/swap/cOCprim.c:1.8 --- xc/programs/Xserver/PEX5/dipex/swap/cOCprim.c:1.7 Sun Oct 4 05:35:15 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/cOCprim.c Wed Jan 17 17:12:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: cOCprim.c /main/11 1998/02/10 12:37:03 kaleb $ */ +/* $Xorg: cOCprim.c,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/check.c diff -u xc/programs/Xserver/PEX5/dipex/swap/check.c:1.7 xc/programs/Xserver/PEX5/dipex/swap/check.c:1.8 --- xc/programs/Xserver/PEX5/dipex/swap/check.c:1.7 Sun Oct 4 05:35:15 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/check.c Wed Jan 17 17:12:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: check.c /main/7 1998/02/10 12:37:08 kaleb $ */ + /* $Xorg: check.c,v 1.4 2000/08/17 19:47:17 cpqbld Exp $ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/convEv.c diff -u xc/programs/Xserver/PEX5/dipex/swap/convEv.c:1.7 xc/programs/Xserver/PEX5/dipex/swap/convEv.c:1.8 --- xc/programs/Xserver/PEX5/dipex/swap/convEv.c:1.7 Sun Oct 4 05:35:16 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/convEv.c Wed Jan 17 17:12:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: convEv.c /main/3 1998/02/10 12:37:12 kaleb $ */ +/* $Xorg: convEv.c,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ /************************************************************ Index: xc/programs/Xserver/PEX5/dipex/swap/convReq.c diff -u xc/programs/Xserver/PEX5/dipex/swap/convReq.c:1.7 xc/programs/Xserver/PEX5/dipex/swap/convReq.c:1.8 --- xc/programs/Xserver/PEX5/dipex/swap/convReq.c:1.7 Sun Oct 4 05:35:16 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/convReq.c Wed Jan 17 17:12:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: convReq.c /main/18 1998/02/10 12:37:16 kaleb $ */ +/* $Xorg: convReq.c,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/convReq.h diff -u xc/programs/Xserver/PEX5/dipex/swap/convReq.h:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/convReq.h:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/convReq.h:1.1.1.2 Sun Sep 27 04:42:06 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/convReq.h Tue Jan 16 17:36:04 2001 @@ -1,4 +1,4 @@ -/* $TOG: convReq.h /main/4 1998/02/10 12:37:23 kaleb $ */ +/* $Xorg: convReq.h,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/convUtil.c diff -u xc/programs/Xserver/PEX5/dipex/swap/convUtil.c:1.7 xc/programs/Xserver/PEX5/dipex/swap/convUtil.c:1.8 --- xc/programs/Xserver/PEX5/dipex/swap/convUtil.c:1.7 Sun Oct 4 05:35:17 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/convUtil.c Wed Jan 17 17:12:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: convUtil.c /main/5 1998/02/10 12:37:28 kaleb $ */ +/* $Xorg: convUtil.c,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/convUtil.h diff -u xc/programs/Xserver/PEX5/dipex/swap/convUtil.h:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/convUtil.h:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/convUtil.h:1.1.1.2 Sun Sep 27 04:42:12 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/convUtil.h Tue Jan 16 17:36:08 2001 @@ -1,4 +1,4 @@ -/* $TOG: convUtil.h /main/3 1998/02/10 12:37:34 kaleb $ */ +/* $Xorg: convUtil.h,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/convertStr.h diff -u xc/programs/Xserver/PEX5/dipex/swap/convertStr.h:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/convertStr.h:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/convertStr.h:1.1.1.2 Sun Sep 27 04:42:14 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/convertStr.h Tue Jan 16 17:36:09 2001 @@ -1,4 +1,4 @@ -/* $TOG: convertStr.h /main/5 1998/02/10 12:37:40 kaleb $ */ +/* $Xorg: convertStr.h,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/floatconv.c diff -u xc/programs/Xserver/PEX5/dipex/swap/floatconv.c:1.7 xc/programs/Xserver/PEX5/dipex/swap/floatconv.c:1.8 --- xc/programs/Xserver/PEX5/dipex/swap/floatconv.c:1.7 Sun Oct 4 05:35:17 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/floatconv.c Wed Jan 17 17:12:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: floatconv.c /main/6 1998/02/10 12:37:46 kaleb $ */ +/* $Xorg: floatconv.c,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/floatconv.h diff -u xc/programs/Xserver/PEX5/dipex/swap/floatconv.h:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/floatconv.h:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/floatconv.h:1.1.1.2 Sun Sep 27 04:42:19 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/floatconv.h Tue Jan 16 17:36:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: floatconv.h /main/6 1998/02/12 14:15:06 kaleb $ */ +/* $Xorg: floatconv.h,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ /* * Copyright 1988-1991 by Sun Microsystems Index: xc/programs/Xserver/PEX5/dipex/swap/uOCTables.ci diff -u xc/programs/Xserver/PEX5/dipex/swap/uOCTables.ci:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/uOCTables.ci:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/uOCTables.ci:1.1.1.2 Sun Sep 27 04:42:21 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/uOCTables.ci Tue Jan 16 17:36:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: uOCTables.ci /main/5 1998/02/10 14:00:33 kaleb $ */ +/* $Xorg: uOCTables.ci,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ /* Automatically generated OC table */ /****************************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/uOCprim.c diff -u xc/programs/Xserver/PEX5/dipex/swap/uOCprim.c:1.7 xc/programs/Xserver/PEX5/dipex/swap/uOCprim.c:1.8 --- xc/programs/Xserver/PEX5/dipex/swap/uOCprim.c:1.7 Sun Oct 4 05:35:18 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/uOCprim.c Wed Jan 17 17:12:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: uOCprim.c /main/11 1998/02/10 12:37:55 kaleb $ */ +/* $Xorg: uOCprim.c,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/uconvRep.c diff -u xc/programs/Xserver/PEX5/dipex/swap/uconvRep.c:1.7 xc/programs/Xserver/PEX5/dipex/swap/uconvRep.c:1.8 --- xc/programs/Xserver/PEX5/dipex/swap/uconvRep.c:1.7 Sun Oct 4 05:35:19 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/uconvRep.c Wed Jan 17 17:12:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: uconvRep.c /main/16 1998/02/10 12:38:00 kaleb $ */ +/* $Xorg: uconvRep.c,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/uconvRep.h diff -u xc/programs/Xserver/PEX5/dipex/swap/uconvRep.h:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/uconvRep.h:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/uconvRep.h:1.1.1.2 Sun Sep 27 04:42:27 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/uconvRep.h Tue Jan 16 17:36:16 2001 @@ -1,4 +1,4 @@ -/* $TOG: uconvRep.h /main/4 1998/02/10 12:38:08 kaleb $ */ +/* $Xorg: uconvRep.h,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/dipex/swap/util/Imakefile diff -u xc/programs/Xserver/PEX5/dipex/swap/util/Imakefile:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/util/Imakefile:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/util/Imakefile:1.1.1.2 Sat Dec 21 23:04:27 1996 +++ xc/programs/Xserver/PEX5/dipex/swap/util/Imakefile Tue Jan 16 17:36:17 2001 @@ -1,4 +1,4 @@ -# $XConsortium: Imakefile /main/3 1996/09/28 16:55:13 rws $ +# $Xorg: Imakefile,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ # This can be used directly as a Makefile, with make -f Imakefile PEXINCLUDE = ./../../../../../include/PEX Index: xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.awk diff -u xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.awk:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.awk:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.awk:1.1.1.2 Sun Sep 27 04:42:30 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.awk Tue Jan 16 17:36:18 2001 @@ -1,5 +1,5 @@ ## -# $TOG: OCReduce.awk /main/3 1998/02/10 14:00:40 kaleb $ +# $Xorg: OCReduce.awk,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ ## ## ## Copyright 1996, 1998 The Open Group Index: xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.sed diff -u xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.sed:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.sed:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.sed:1.1.1.2 Sun Sep 27 04:42:35 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.sed Tue Jan 16 17:36:20 2001 @@ -1,5 +1,5 @@ ## -# $TOG: OCReduce.sed /main/3 1998/02/10 14:00:46 kaleb $ +# $Xorg: OCReduce.sed,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ ## ## Copyright 1996, 1998 The Open Group ## Index: xc/programs/Xserver/PEX5/dipex/swap/util/OCTables.awk diff -u xc/programs/Xserver/PEX5/dipex/swap/util/OCTables.awk:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/util/OCTables.awk:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/util/OCTables.awk:1.1.1.2 Sun Sep 27 04:42:42 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/util/OCTables.awk Tue Jan 16 17:36:21 2001 @@ -1,4 +1,4 @@ -# $TOG: OCTables.awk /main/3 1998/02/10 14:00:53 kaleb $ +# $Xorg: OCTables.awk,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ ## ## Copyright 1996, 1998 The Open Group ## Index: xc/programs/Xserver/PEX5/dipex/swap/util/ReqSame.awk diff -u xc/programs/Xserver/PEX5/dipex/swap/util/ReqSame.awk:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/util/ReqSame.awk:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/util/ReqSame.awk:1.1.1.2 Sun Sep 27 04:42:45 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/util/ReqSame.awk Tue Jan 16 17:36:23 2001 @@ -1,4 +1,4 @@ -# $TOG: ReqSame.awk /main/4 1998/02/10 14:00:59 kaleb $ +# $Xorg: ReqSame.awk,v 1.3 2000/08/17 19:47:18 cpqbld Exp $ ## ## Copyright 1996, 1998 The Open Group ## Index: xc/programs/Xserver/PEX5/dipex/swap/util/ReqTab.awk diff -u xc/programs/Xserver/PEX5/dipex/swap/util/ReqTab.awk:1.1.1.2 xc/programs/Xserver/PEX5/dipex/swap/util/ReqTab.awk:1.1.1.3 --- xc/programs/Xserver/PEX5/dipex/swap/util/ReqTab.awk:1.1.1.2 Sun Sep 27 04:42:49 1998 +++ xc/programs/Xserver/PEX5/dipex/swap/util/ReqTab.awk Tue Jan 16 17:36:26 2001 @@ -1,4 +1,4 @@ -# $TOG: ReqTab.awk /main/3 1998/02/10 14:01:05 kaleb $ +# $Xorg: ReqTab.awk,v 1.3 2000/08/17 19:47:18 cpqbld Exp $ ## ## Copyright 1996, 1998 The Open Group ## Index: xc/programs/Xserver/PEX5/include/PEX.h diff -u xc/programs/Xserver/PEX5/include/PEX.h:1.1.1.3 xc/programs/Xserver/PEX5/include/PEX.h:1.1.1.4 --- xc/programs/Xserver/PEX5/include/PEX.h:1.1.1.3 Sun Sep 27 04:40:19 1998 +++ xc/programs/Xserver/PEX5/include/PEX.h Tue Jan 16 17:36:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: PEX.h /main/13 1998/02/10 12:33:17 kaleb $ */ +/* $Xorg: PEX.h,v 1.3 2000/08/17 19:47:18 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/include/PEXErr.h diff -u xc/programs/Xserver/PEX5/include/PEXErr.h:1.1.1.2 xc/programs/Xserver/PEX5/include/PEXErr.h:1.1.1.3 --- xc/programs/Xserver/PEX5/include/PEXErr.h:1.1.1.2 Sun Sep 27 04:40:20 1998 +++ xc/programs/Xserver/PEX5/include/PEXErr.h Tue Jan 16 17:36:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: PEXErr.h /main/3 1998/02/10 12:33:26 kaleb $ */ +/* $Xorg: PEXErr.h,v 1.3 2000/08/17 19:47:18 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/include/PEXfuncs.h diff -u xc/programs/Xserver/PEX5/include/PEXfuncs.h:1.1.1.2 xc/programs/Xserver/PEX5/include/PEXfuncs.h:1.1.1.3 --- xc/programs/Xserver/PEX5/include/PEXfuncs.h:1.1.1.2 Sun Sep 27 04:40:21 1998 +++ xc/programs/Xserver/PEX5/include/PEXfuncs.h Tue Jan 16 17:36:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: PEXfuncs.h /main/3 1998/02/10 12:33:31 kaleb $ */ +/* $Xorg: PEXfuncs.h,v 1.3 2000/08/17 19:47:18 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/include/PEXmacs.h diff -u xc/programs/Xserver/PEX5/include/PEXmacs.h:1.1.1.2 xc/programs/Xserver/PEX5/include/PEXmacs.h:1.1.1.3 --- xc/programs/Xserver/PEX5/include/PEXmacs.h:1.1.1.2 Sun Sep 27 04:40:22 1998 +++ xc/programs/Xserver/PEX5/include/PEXmacs.h Tue Jan 16 17:36:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: PEXmacs.h /main/3 1998/02/10 12:33:35 kaleb $ */ +/* $Xorg: PEXmacs.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/include/PEXproto.h diff -u xc/programs/Xserver/PEX5/include/PEXproto.h:1.1.1.3 xc/programs/Xserver/PEX5/include/PEXproto.h:1.1.1.4 --- xc/programs/Xserver/PEX5/include/PEXproto.h:1.1.1.3 Sun Sep 27 04:40:23 1998 +++ xc/programs/Xserver/PEX5/include/PEXproto.h Tue Jan 16 17:36:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: PEXproto.h /main/9 1998/02/10 12:33:40 kaleb $ */ +/* $Xorg: PEXproto.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/include/PEXprotost.h diff -u xc/programs/Xserver/PEX5/include/PEXprotost.h:1.1.1.2 xc/programs/Xserver/PEX5/include/PEXprotost.h:1.1.1.3 --- xc/programs/Xserver/PEX5/include/PEXprotost.h:1.1.1.2 Sun Sep 27 04:40:24 1998 +++ xc/programs/Xserver/PEX5/include/PEXprotost.h Tue Jan 16 17:36:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: PEXprotost.h /main/7 1998/02/10 12:33:45 kaleb $ */ +/* $Xorg: PEXprotost.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/include/ddpex.h diff -u xc/programs/Xserver/PEX5/include/ddpex.h:1.1.1.2 xc/programs/Xserver/PEX5/include/ddpex.h:1.1.1.3 --- xc/programs/Xserver/PEX5/include/ddpex.h:1.1.1.2 Sun Sep 27 04:40:24 1998 +++ xc/programs/Xserver/PEX5/include/ddpex.h Tue Jan 16 17:36:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: ddpex.h /main/14 1998/02/10 12:33:50 kaleb $ */ +/* $Xorg: ddpex.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/include/ddpex3.h diff -u xc/programs/Xserver/PEX5/include/ddpex3.h:1.1.1.2 xc/programs/Xserver/PEX5/include/ddpex3.h:1.1.1.3 --- xc/programs/Xserver/PEX5/include/ddpex3.h:1.1.1.2 Sun Sep 27 04:40:25 1998 +++ xc/programs/Xserver/PEX5/include/ddpex3.h Tue Jan 16 17:36:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: ddpex3.h /main/3 1998/02/10 12:33:55 kaleb $ */ +/* $Xorg: ddpex3.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/include/ddpex4.h diff -u xc/programs/Xserver/PEX5/include/ddpex4.h:1.1.1.2 xc/programs/Xserver/PEX5/include/ddpex4.h:1.1.1.3 --- xc/programs/Xserver/PEX5/include/ddpex4.h:1.1.1.2 Sun Sep 27 04:40:26 1998 +++ xc/programs/Xserver/PEX5/include/ddpex4.h Tue Jan 16 17:36:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: ddpex4.h /main/3 1998/02/10 12:34:00 kaleb $ */ +/* $Xorg: ddpex4.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/include/dipex.h diff -u xc/programs/Xserver/PEX5/include/dipex.h:1.3 xc/programs/Xserver/PEX5/include/dipex.h:1.4 --- xc/programs/Xserver/PEX5/include/dipex.h:1.3 Sun Oct 4 05:35:22 1998 +++ xc/programs/Xserver/PEX5/include/dipex.h Wed Jan 17 17:12:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: dipex.h /main/7 1998/02/10 12:34:04 kaleb $ */ +/* $Xorg: dipex.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/include/pexError.h diff -u xc/programs/Xserver/PEX5/include/pexError.h:1.1.1.2 xc/programs/Xserver/PEX5/include/pexError.h:1.1.1.3 --- xc/programs/Xserver/PEX5/include/pexError.h:1.1.1.2 Sun Sep 27 04:40:28 1998 +++ xc/programs/Xserver/PEX5/include/pexError.h Tue Jan 16 17:36:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexError.h /main/6 1998/02/10 12:34:08 kaleb $ */ +/* $Xorg: pexError.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/include/pexExtract.h diff -u xc/programs/Xserver/PEX5/include/pexExtract.h:1.1.1.2 xc/programs/Xserver/PEX5/include/pexExtract.h:1.1.1.3 --- xc/programs/Xserver/PEX5/include/pexExtract.h:1.1.1.2 Sun Sep 27 04:40:29 1998 +++ xc/programs/Xserver/PEX5/include/pexExtract.h Tue Jan 16 17:36:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexExtract.h /main/10 1998/02/10 12:34:12 kaleb $ */ +/* $Xorg: pexExtract.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/include/pexLookup.h diff -u xc/programs/Xserver/PEX5/include/pexLookup.h:1.1.1.2 xc/programs/Xserver/PEX5/include/pexLookup.h:1.1.1.3 --- xc/programs/Xserver/PEX5/include/pexLookup.h:1.1.1.2 Sun Sep 27 04:40:29 1998 +++ xc/programs/Xserver/PEX5/include/pexLookup.h Tue Jan 16 17:36:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexLookup.h /main/3 1998/02/10 12:34:16 kaleb $ */ +/* $Xorg: pexLookup.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/include/pexSwap.h diff -u xc/programs/Xserver/PEX5/include/pexSwap.h:1.1.1.2 xc/programs/Xserver/PEX5/include/pexSwap.h:1.1.1.3 --- xc/programs/Xserver/PEX5/include/pexSwap.h:1.1.1.2 Sun Sep 27 04:40:30 1998 +++ xc/programs/Xserver/PEX5/include/pexSwap.h Tue Jan 16 17:36:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexSwap.h /main/8 1998/02/10 12:34:21 kaleb $ */ +/* $Xorg: pexSwap.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/include/pexUtils.h diff -u xc/programs/Xserver/PEX5/include/pexUtils.h:1.1.1.2 xc/programs/Xserver/PEX5/include/pexUtils.h:1.1.1.3 --- xc/programs/Xserver/PEX5/include/pexUtils.h:1.1.1.2 Sun Sep 27 04:40:31 1998 +++ xc/programs/Xserver/PEX5/include/pexUtils.h Tue Jan 16 17:36:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: pexUtils.h /main/3 1998/02/10 12:34:25 kaleb $ */ +/* $Xorg: pexUtils.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/include/pex_site.h diff -u xc/programs/Xserver/PEX5/include/pex_site.h:1.1.1.2 xc/programs/Xserver/PEX5/include/pex_site.h:1.1.1.3 --- xc/programs/Xserver/PEX5/include/pex_site.h:1.1.1.2 Sun Sep 27 04:40:32 1998 +++ xc/programs/Xserver/PEX5/include/pex_site.h Tue Jan 16 17:36:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: pex_site.h /main/3 1998/02/10 12:34:29 kaleb $ */ +/* $Xorg: pex_site.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ /*********************************************************** Index: xc/programs/Xserver/PEX5/ospex/Imakefile diff -u xc/programs/Xserver/PEX5/ospex/Imakefile:3.14 xc/programs/Xserver/PEX5/ospex/Imakefile:3.15 --- xc/programs/Xserver/PEX5/ospex/Imakefile:3.14 Thu Aug 24 18:20:11 2000 +++ xc/programs/Xserver/PEX5/ospex/Imakefile Wed Jan 17 17:12:43 2001 @@ -1,6 +1,9 @@ XCOMM -XCOMM $XConsortium: Imakefile /main/8 1996/09/28 16:55:19 rws $ -XCOMM $XFree86: xc/programs/Xserver/PEX5/ospex/Imakefile,v 3.14 2000/08/24 22:20:11 tsi Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:20 cpqbld Exp $ +XCOMM +XCOMM +XCOMM +XCOMM $XFree86: xc/programs/Xserver/PEX5/ospex/Imakefile,v 3.15 2001/01/17 22:12:43 dawes Exp $ XCOMM XCOMM XCOMM Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium Index: xc/programs/Xserver/PEX5/ospex/osPexFont.c diff -u xc/programs/Xserver/PEX5/ospex/osPexFont.c:3.16 xc/programs/Xserver/PEX5/ospex/osPexFont.c:3.17 --- xc/programs/Xserver/PEX5/ospex/osPexFont.c:3.16 Thu Aug 10 13:40:30 2000 +++ xc/programs/Xserver/PEX5/ospex/osPexFont.c Wed Jan 17 17:12:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: osPexFont.c /main/11 1998/02/10 12:34:33 kaleb $ */ +/* $Xorg: osPexFont.c,v 1.3 2000/08/17 19:47:20 cpqbld Exp $ */ /* @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ospex/osPexFont.c,v 3.16 2000/08/10 17:40:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ospex/osPexFont.c,v 3.17 2001/01/17 22:12:43 dawes Exp $ */ #ifdef WIN32 #define _WILLWINSOCK_ Index: xc/programs/Xserver/XIE/Imakefile diff -u xc/programs/Xserver/XIE/Imakefile:3.16 xc/programs/Xserver/XIE/Imakefile:3.17 --- xc/programs/Xserver/XIE/Imakefile:3.16 Sat Aug 14 06:49:24 1999 +++ xc/programs/Xserver/XIE/Imakefile Wed Jan 17 17:12:44 2001 @@ -1,5 +1,9 @@ -XCOMM $XConsortium: Imakefile,v 1.3 93/11/07 10:56:36 rws Exp $ -XCOMM $XFree86: xc/programs/Xserver/XIE/Imakefile,v 3.16 1999/08/14 10:49:24 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:22 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/XIE/Imakefile,v 3.17 2001/01/17 22:12:44 dawes Exp $ #define IHaveModules #include Index: xc/programs/Xserver/XIE/dixie/Imakefile diff -u xc/programs/Xserver/XIE/dixie/Imakefile:3.15 xc/programs/Xserver/XIE/dixie/Imakefile:3.16 --- xc/programs/Xserver/XIE/dixie/Imakefile:3.15 Thu Aug 24 18:20:11 2000 +++ xc/programs/Xserver/XIE/dixie/Imakefile Wed Jan 17 17:12:47 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/6 1995/12/07 21:15:29 gildea $ -XCOMM $XFree86: xc/programs/Xserver/XIE/dixie/Imakefile,v 3.15 2000/08/24 22:20:11 tsi Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:23 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/XIE/dixie/Imakefile,v 3.16 2001/01/17 22:12:47 dawes Exp $ + XCOMM build dixie archive #define IHaveModules Index: xc/programs/Xserver/XIE/dixie/export/Imakefile diff -u xc/programs/Xserver/XIE/dixie/export/Imakefile:3.5 xc/programs/Xserver/XIE/dixie/export/Imakefile:3.6 --- xc/programs/Xserver/XIE/dixie/export/Imakefile:3.5 Sat Jul 25 04:05:06 1998 +++ xc/programs/Xserver/XIE/dixie/export/Imakefile Wed Jan 17 17:12:48 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/6 1996/09/28 16:55:25 rws $ -XCOMM $XFree86: xc/programs/Xserver/XIE/dixie/export/Imakefile,v 3.5 1998/07/25 08:05:06 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:23 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/XIE/dixie/export/Imakefile,v 3.6 2001/01/17 22:12:48 dawes Exp $ + XCOMM build device independent export element objects #define IHaveModules Index: xc/programs/Xserver/XIE/dixie/export/echist.c diff -u xc/programs/Xserver/XIE/dixie/export/echist.c:3.3 xc/programs/Xserver/XIE/dixie/export/echist.c:3.4 --- xc/programs/Xserver/XIE/dixie/export/echist.c:3.3 Sun Oct 25 02:11:23 1998 +++ xc/programs/Xserver/XIE/dixie/export/echist.c Wed Jan 17 17:12:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: echist.c /main/4 1998/02/09 16:07:45 kaleb $ */ +/* $Xorg: echist.c,v 1.3 2000/08/17 19:47:23 cpqbld Exp $ */ /**** module echist.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. July 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/echist.c,v 3.3 1998/10/25 07:11:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/echist.c,v 3.4 2001/01/17 22:12:48 dawes Exp $ */ #define _XIEC_ECHIST Index: xc/programs/Xserver/XIE/dixie/export/eclut.c diff -u xc/programs/Xserver/XIE/dixie/export/eclut.c:3.3 xc/programs/Xserver/XIE/dixie/export/eclut.c:3.4 --- xc/programs/Xserver/XIE/dixie/export/eclut.c:3.3 Sun Oct 25 02:11:23 1998 +++ xc/programs/Xserver/XIE/dixie/export/eclut.c Wed Jan 17 17:12:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: eclut.c /main/5 1998/02/09 16:07:52 kaleb $ */ +/* $Xorg: eclut.c,v 1.3 2000/08/17 19:47:23 cpqbld Exp $ */ /**** module eclut.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. July 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/eclut.c,v 3.3 1998/10/25 07:11:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/eclut.c,v 3.4 2001/01/17 22:12:48 dawes Exp $ */ #define _XIEC_ECLUT Index: xc/programs/Xserver/XIE/dixie/export/ecphoto.c diff -u xc/programs/Xserver/XIE/dixie/export/ecphoto.c:3.4 xc/programs/Xserver/XIE/dixie/export/ecphoto.c:3.5 --- xc/programs/Xserver/XIE/dixie/export/ecphoto.c:3.4 Sun Oct 25 02:11:24 1998 +++ xc/programs/Xserver/XIE/dixie/export/ecphoto.c Wed Jan 17 17:12:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: ecphoto.c /main/7 1998/02/09 16:07:57 kaleb $ */ +/* $Xorg: ecphoto.c,v 1.3 2000/08/17 19:47:23 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module ecphoto.c ****/ /****************************************************************************** @@ -67,7 +67,7 @@ Dean Verheiden -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/ecphoto.c,v 3.4 1998/10/25 07:11:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/ecphoto.c,v 3.5 2001/01/17 22:12:48 dawes Exp $ */ #define _XIEC_ECPHOTO Index: xc/programs/Xserver/XIE/dixie/export/ecroi.c diff -u xc/programs/Xserver/XIE/dixie/export/ecroi.c:3.3 xc/programs/Xserver/XIE/dixie/export/ecroi.c:3.4 --- xc/programs/Xserver/XIE/dixie/export/ecroi.c:3.3 Sun Oct 25 02:11:24 1998 +++ xc/programs/Xserver/XIE/dixie/export/ecroi.c Wed Jan 17 17:12:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: ecroi.c /main/5 1998/02/09 16:08:02 kaleb $ */ +/* $Xorg: ecroi.c,v 1.3 2000/08/17 19:47:23 cpqbld Exp $ */ /**** module ecroi.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. August 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/ecroi.c,v 3.3 1998/10/25 07:11:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/ecroi.c,v 3.4 2001/01/17 22:12:48 dawes Exp $ */ #define _XIEC_ECROI Index: xc/programs/Xserver/XIE/dixie/export/edraw.c diff -u xc/programs/Xserver/XIE/dixie/export/edraw.c:3.3 xc/programs/Xserver/XIE/dixie/export/edraw.c:3.4 --- xc/programs/Xserver/XIE/dixie/export/edraw.c:3.3 Sun Oct 25 02:11:24 1998 +++ xc/programs/Xserver/XIE/dixie/export/edraw.c Wed Jan 17 17:12:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: edraw.c /main/5 1998/02/09 16:08:10 kaleb $ */ +/* $Xorg: edraw.c,v 1.3 2000/08/17 19:47:23 cpqbld Exp $ */ /**** module edraw.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/edraw.c,v 3.3 1998/10/25 07:11:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/edraw.c,v 3.4 2001/01/17 22:12:49 dawes Exp $ */ #define _XIEC_EDRAW Index: xc/programs/Xserver/XIE/dixie/export/edrawp.c diff -u xc/programs/Xserver/XIE/dixie/export/edrawp.c:3.3 xc/programs/Xserver/XIE/dixie/export/edrawp.c:3.4 --- xc/programs/Xserver/XIE/dixie/export/edrawp.c:3.3 Sun Oct 25 02:11:25 1998 +++ xc/programs/Xserver/XIE/dixie/export/edrawp.c Wed Jan 17 17:12:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: edrawp.c /main/5 1998/02/09 16:08:06 kaleb $ */ +/* $Xorg: edrawp.c,v 1.3 2000/08/17 19:47:23 cpqbld Exp $ */ /**** module edrawp.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/edrawp.c,v 3.3 1998/10/25 07:11:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/edrawp.c,v 3.4 2001/01/17 22:12:49 dawes Exp $ */ #define _XIEC_EDRAWP Index: xc/programs/Xserver/XIE/dixie/export/elut.c diff -u xc/programs/Xserver/XIE/dixie/export/elut.c:3.3 xc/programs/Xserver/XIE/dixie/export/elut.c:3.4 --- xc/programs/Xserver/XIE/dixie/export/elut.c:3.3 Sun Oct 25 02:11:25 1998 +++ xc/programs/Xserver/XIE/dixie/export/elut.c Wed Jan 17 17:12:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: elut.c /main/5 1998/02/09 16:08:15 kaleb $ */ +/* $Xorg: elut.c,v 1.3 2000/08/17 19:47:23 cpqbld Exp $ */ /**** module elut.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Larry Hare -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/elut.c,v 3.3 1998/10/25 07:11:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/elut.c,v 3.4 2001/01/17 22:12:49 dawes Exp $ */ #define _XIEC_ELUT Index: xc/programs/Xserver/XIE/dixie/export/ephoto.c diff -u xc/programs/Xserver/XIE/dixie/export/ephoto.c:3.4 xc/programs/Xserver/XIE/dixie/export/ephoto.c:3.5 --- xc/programs/Xserver/XIE/dixie/export/ephoto.c:3.4 Sun Oct 25 02:11:25 1998 +++ xc/programs/Xserver/XIE/dixie/export/ephoto.c Wed Jan 17 17:12:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: ephoto.c /main/8 1998/02/09 16:08:20 kaleb $ */ +/* $Xorg: ephoto.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ /**** module ephoto.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley && Dean Verheiden -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/ephoto.c,v 3.4 1998/10/25 07:11:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/ephoto.c,v 3.5 2001/01/17 22:12:49 dawes Exp $ */ #define _XIEC_EPHOTO Index: xc/programs/Xserver/XIE/dixie/export/eroi.c diff -u xc/programs/Xserver/XIE/dixie/export/eroi.c:3.3 xc/programs/Xserver/XIE/dixie/export/eroi.c:3.4 --- xc/programs/Xserver/XIE/dixie/export/eroi.c:3.3 Sun Oct 25 02:11:25 1998 +++ xc/programs/Xserver/XIE/dixie/export/eroi.c Wed Jan 17 17:12:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: eroi.c /main/5 1998/02/09 16:08:25 kaleb $ */ +/* $Xorg: eroi.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ /**** module eroi.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/eroi.c,v 3.3 1998/10/25 07:11:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/eroi.c,v 3.4 2001/01/17 22:12:49 dawes Exp $ */ #define _XIEC_EROI Index: xc/programs/Xserver/XIE/dixie/import/Imakefile diff -u xc/programs/Xserver/XIE/dixie/import/Imakefile:3.5 xc/programs/Xserver/XIE/dixie/import/Imakefile:3.6 --- xc/programs/Xserver/XIE/dixie/import/Imakefile:3.5 Sat Jul 25 04:05:06 1998 +++ xc/programs/Xserver/XIE/dixie/import/Imakefile Wed Jan 17 17:12:50 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/5 1996/09/28 16:55:32 rws $ -XCOMM $XFree86: xc/programs/Xserver/XIE/dixie/import/Imakefile,v 3.5 1998/07/25 08:05:06 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/XIE/dixie/import/Imakefile,v 3.6 2001/01/17 22:12:50 dawes Exp $ + XCOMM build device independent import element objects #define IHaveModules Index: xc/programs/Xserver/XIE/dixie/import/iclut.c diff -u xc/programs/Xserver/XIE/dixie/import/iclut.c:3.3 xc/programs/Xserver/XIE/dixie/import/iclut.c:3.4 --- xc/programs/Xserver/XIE/dixie/import/iclut.c:3.3 Sun Oct 25 02:11:27 1998 +++ xc/programs/Xserver/XIE/dixie/import/iclut.c Wed Jan 17 17:12:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: iclut.c /main/6 1998/02/09 16:08:34 kaleb $ */ +/* $Xorg: iclut.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module iclut.c ****/ /****************************************************************************** @@ -68,7 +68,7 @@ Ben Fahy -- AGE Logic, Inc. May 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/import/iclut.c,v 3.3 1998/10/25 07:11:27 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/import/iclut.c,v 3.4 2001/01/17 22:12:50 dawes Exp $ */ #define _XIEC_ICLUT Index: xc/programs/Xserver/XIE/dixie/import/icphoto.c diff -u xc/programs/Xserver/XIE/dixie/import/icphoto.c:3.3 xc/programs/Xserver/XIE/dixie/import/icphoto.c:3.4 --- xc/programs/Xserver/XIE/dixie/import/icphoto.c:3.3 Sun Oct 25 02:11:27 1998 +++ xc/programs/Xserver/XIE/dixie/import/icphoto.c Wed Jan 17 17:12:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: icphoto.c /main/5 1998/02/09 16:08:38 kaleb $ */ +/* $Xorg: icphoto.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ /**** module icphoto.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley, Dean Verheiden -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/import/icphoto.c,v 3.3 1998/10/25 07:11:27 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/import/icphoto.c,v 3.4 2001/01/17 22:12:50 dawes Exp $ */ #define _XIEC_ICPHOTO Index: xc/programs/Xserver/XIE/dixie/import/icroi.c diff -u xc/programs/Xserver/XIE/dixie/import/icroi.c:3.3 xc/programs/Xserver/XIE/dixie/import/icroi.c:3.4 --- xc/programs/Xserver/XIE/dixie/import/icroi.c:3.3 Sun Oct 25 02:11:28 1998 +++ xc/programs/Xserver/XIE/dixie/import/icroi.c Wed Jan 17 17:12:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: icroi.c /main/5 1998/02/09 16:08:43 kaleb $ */ +/* $Xorg: icroi.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ /**** module icroi.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley, Dean Verheiden -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/import/icroi.c,v 3.3 1998/10/25 07:11:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/import/icroi.c,v 3.4 2001/01/17 22:12:50 dawes Exp $ */ #define _XIEC_ICROI Index: xc/programs/Xserver/XIE/dixie/import/idraw.c diff -u xc/programs/Xserver/XIE/dixie/import/idraw.c:3.3 xc/programs/Xserver/XIE/dixie/import/idraw.c:3.4 --- xc/programs/Xserver/XIE/dixie/import/idraw.c:3.3 Sun Oct 25 02:11:28 1998 +++ xc/programs/Xserver/XIE/dixie/import/idraw.c Wed Jan 17 17:12:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: idraw.c /main/5 1998/02/09 16:08:53 kaleb $ */ +/* $Xorg: idraw.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ /**** module idraw.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/import/idraw.c,v 3.3 1998/10/25 07:11:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/import/idraw.c,v 3.4 2001/01/17 22:12:50 dawes Exp $ */ #define _XIEC_IDRAW Index: xc/programs/Xserver/XIE/dixie/import/idrawp.c diff -u xc/programs/Xserver/XIE/dixie/import/idrawp.c:3.3 xc/programs/Xserver/XIE/dixie/import/idrawp.c:3.4 --- xc/programs/Xserver/XIE/dixie/import/idrawp.c:3.3 Sun Oct 25 02:11:28 1998 +++ xc/programs/Xserver/XIE/dixie/import/idrawp.c Wed Jan 17 17:12:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: idrawp.c /main/5 1998/02/09 16:08:48 kaleb $ */ +/* $Xorg: idrawp.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ /**** module idrawp.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/import/idrawp.c,v 3.3 1998/10/25 07:11:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/import/idrawp.c,v 3.4 2001/01/17 22:12:50 dawes Exp $ */ #define _XIEC_IDRAWP Index: xc/programs/Xserver/XIE/dixie/import/ilut.c diff -u xc/programs/Xserver/XIE/dixie/import/ilut.c:3.3 xc/programs/Xserver/XIE/dixie/import/ilut.c:3.4 --- xc/programs/Xserver/XIE/dixie/import/ilut.c:3.3 Sun Oct 25 02:11:29 1998 +++ xc/programs/Xserver/XIE/dixie/import/ilut.c Wed Jan 17 17:12:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: ilut.c /main/5 1998/02/09 16:08:57 kaleb $ */ +/* $Xorg: ilut.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ /**** module ilut.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Larry Hare -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/import/ilut.c,v 3.3 1998/10/25 07:11:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/import/ilut.c,v 3.4 2001/01/17 22:12:51 dawes Exp $ */ #define _XIEC_ILUT Index: xc/programs/Xserver/XIE/dixie/import/iphoto.c diff -u xc/programs/Xserver/XIE/dixie/import/iphoto.c:3.3 xc/programs/Xserver/XIE/dixie/import/iphoto.c:3.4 --- xc/programs/Xserver/XIE/dixie/import/iphoto.c:3.3 Sun Oct 25 02:11:29 1998 +++ xc/programs/Xserver/XIE/dixie/import/iphoto.c Wed Jan 17 17:12:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: iphoto.c /main/6 1998/02/09 16:09:07 kaleb $ */ +/* $Xorg: iphoto.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ /**** module iphoto.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/import/iphoto.c,v 3.3 1998/10/25 07:11:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/import/iphoto.c,v 3.4 2001/01/17 22:12:51 dawes Exp $ */ #define _XIEC_IPHOTO Index: xc/programs/Xserver/XIE/dixie/import/iroi.c diff -u xc/programs/Xserver/XIE/dixie/import/iroi.c:3.3 xc/programs/Xserver/XIE/dixie/import/iroi.c:3.4 --- xc/programs/Xserver/XIE/dixie/import/iroi.c:3.3 Sun Oct 25 02:11:29 1998 +++ xc/programs/Xserver/XIE/dixie/import/iroi.c Wed Jan 17 17:12:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: iroi.c /main/5 1998/02/09 16:09:12 kaleb $ */ +/* $Xorg: iroi.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ /**** module iroi.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/import/iroi.c,v 3.3 1998/10/25 07:11:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/import/iroi.c,v 3.4 2001/01/17 22:12:51 dawes Exp $ */ #define _XIEC_IROI Index: xc/programs/Xserver/XIE/dixie/process/Imakefile diff -u xc/programs/Xserver/XIE/dixie/process/Imakefile:3.5 xc/programs/Xserver/XIE/dixie/process/Imakefile:3.6 --- xc/programs/Xserver/XIE/dixie/process/Imakefile:3.5 Sat Jul 25 04:05:07 1998 +++ xc/programs/Xserver/XIE/dixie/process/Imakefile Wed Jan 17 17:12:51 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/5 1996/09/28 16:55:42 rws $ -XCOMM $XFree86: xc/programs/Xserver/XIE/dixie/process/Imakefile,v 3.5 1998/07/25 08:05:07 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:25 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/XIE/dixie/process/Imakefile,v 3.6 2001/01/17 22:12:51 dawes Exp $ + XCOMM build device independent processing element objects #define IHaveModules Index: xc/programs/Xserver/XIE/dixie/process/parith.c diff -u xc/programs/Xserver/XIE/dixie/process/parith.c:3.3 xc/programs/Xserver/XIE/dixie/process/parith.c:3.4 --- xc/programs/Xserver/XIE/dixie/process/parith.c:3.3 Sun Oct 25 02:11:31 1998 +++ xc/programs/Xserver/XIE/dixie/process/parith.c Wed Jan 17 17:12:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: parith.c /main/5 1998/02/09 16:09:23 kaleb $ */ +/* $Xorg: parith.c,v 1.5 2000/08/17 19:47:26 cpqbld Exp $ */ /**** module parith.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/parith.c,v 3.3 1998/10/25 07:11:31 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/parith.c,v 3.4 2001/01/17 22:12:52 dawes Exp $ */ #define _XIEC_PARITH Index: xc/programs/Xserver/XIE/dixie/process/pbandc.c diff -u xc/programs/Xserver/XIE/dixie/process/pbandc.c:3.3 xc/programs/Xserver/XIE/dixie/process/pbandc.c:3.4 --- xc/programs/Xserver/XIE/dixie/process/pbandc.c:3.3 Sun Oct 25 02:11:31 1998 +++ xc/programs/Xserver/XIE/dixie/process/pbandc.c Wed Jan 17 17:12:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: pbandc.c /main/5 1998/02/09 16:09:27 kaleb $ */ +/* $Xorg: pbandc.c,v 1.3 2000/08/17 19:47:26 cpqbld Exp $ */ /**** module pbandc.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. July 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pbandc.c,v 3.3 1998/10/25 07:11:31 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pbandc.c,v 3.4 2001/01/17 22:12:52 dawes Exp $ */ #define _XIEC_PBANDC Index: xc/programs/Xserver/XIE/dixie/process/pbande.c diff -u xc/programs/Xserver/XIE/dixie/process/pbande.c:3.3 xc/programs/Xserver/XIE/dixie/process/pbande.c:3.4 --- xc/programs/Xserver/XIE/dixie/process/pbande.c:3.3 Sun Oct 25 02:11:31 1998 +++ xc/programs/Xserver/XIE/dixie/process/pbande.c Wed Jan 17 17:12:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: pbande.c /main/5 1998/02/09 16:09:31 kaleb $ */ +/* $Xorg: pbande.c,v 1.3 2000/08/17 19:47:26 cpqbld Exp $ */ /**** module pbande.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. July 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pbande.c,v 3.3 1998/10/25 07:11:31 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pbande.c,v 3.4 2001/01/17 22:12:52 dawes Exp $ */ #define _XIEC_PBANDE Index: xc/programs/Xserver/XIE/dixie/process/pbands.c diff -u xc/programs/Xserver/XIE/dixie/process/pbands.c:3.3 xc/programs/Xserver/XIE/dixie/process/pbands.c:3.4 --- xc/programs/Xserver/XIE/dixie/process/pbands.c:3.3 Sun Oct 25 02:11:31 1998 +++ xc/programs/Xserver/XIE/dixie/process/pbands.c Wed Jan 17 17:12:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: pbands.c /main/4 1998/02/09 16:09:36 kaleb $ */ +/* $Xorg: pbands.c,v 1.3 2000/08/17 19:47:26 cpqbld Exp $ */ /**** module pbands.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. September 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pbands.c,v 3.3 1998/10/25 07:11:31 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pbands.c,v 3.4 2001/01/17 22:12:52 dawes Exp $ */ #define _XIEC_PBANDS Index: xc/programs/Xserver/XIE/dixie/process/pblend.c diff -u xc/programs/Xserver/XIE/dixie/process/pblend.c:3.3 xc/programs/Xserver/XIE/dixie/process/pblend.c:3.4 --- xc/programs/Xserver/XIE/dixie/process/pblend.c:3.3 Sun Oct 25 02:11:32 1998 +++ xc/programs/Xserver/XIE/dixie/process/pblend.c Wed Jan 17 17:12:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: pblend.c /main/5 1998/02/09 16:09:40 kaleb $ */ +/* $Xorg: pblend.c,v 1.3 2000/08/17 19:47:26 cpqbld Exp $ */ /**** module pblend.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pblend.c,v 3.3 1998/10/25 07:11:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pblend.c,v 3.4 2001/01/17 22:12:52 dawes Exp $ */ #define _XIEC_PBLEND Index: xc/programs/Xserver/XIE/dixie/process/pcfrgb.c diff -u xc/programs/Xserver/XIE/dixie/process/pcfrgb.c:3.4 xc/programs/Xserver/XIE/dixie/process/pcfrgb.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/pcfrgb.c:3.4 Sun Oct 25 02:11:32 1998 +++ xc/programs/Xserver/XIE/dixie/process/pcfrgb.c Wed Jan 17 17:12:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: pcfrgb.c /main/5 1998/02/09 16:09:46 kaleb $ */ +/* $Xorg: pcfrgb.c,v 1.3 2000/08/17 19:47:26 cpqbld Exp $ */ /**** module pcfrgb.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. August 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pcfrgb.c,v 3.4 1998/10/25 07:11:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pcfrgb.c,v 3.5 2001/01/17 22:12:52 dawes Exp $ */ #define _XIEC_PCFRGB Index: xc/programs/Xserver/XIE/dixie/process/pcfromi.c diff -u xc/programs/Xserver/XIE/dixie/process/pcfromi.c:3.3 xc/programs/Xserver/XIE/dixie/process/pcfromi.c:3.4 --- xc/programs/Xserver/XIE/dixie/process/pcfromi.c:3.3 Sun Oct 25 02:11:32 1998 +++ xc/programs/Xserver/XIE/dixie/process/pcfromi.c Wed Jan 17 17:12:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: pcfromi.c /main/5 1998/02/09 16:09:52 kaleb $ */ +/* $Xorg: pcfromi.c,v 1.3 2000/08/17 19:47:26 cpqbld Exp $ */ /**** module pcfromi.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pcfromi.c,v 3.3 1998/10/25 07:11:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pcfromi.c,v 3.4 2001/01/17 22:12:52 dawes Exp $ */ #define _XIEC_PCFROMI #define _XIEC_PCI Index: xc/programs/Xserver/XIE/dixie/process/pcnst.c diff -u xc/programs/Xserver/XIE/dixie/process/pcnst.c:3.4 xc/programs/Xserver/XIE/dixie/process/pcnst.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/pcnst.c:3.4 Sun Oct 25 02:11:33 1998 +++ xc/programs/Xserver/XIE/dixie/process/pcnst.c Wed Jan 17 17:12:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: pcnst.c /main/6 1998/02/09 16:09:56 kaleb $ */ +/* $Xorg: pcnst.c,v 1.3 2000/08/17 19:47:26 cpqbld Exp $ */ /**** module pcnst.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. May 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pcnst.c,v 3.4 1998/10/25 07:11:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pcnst.c,v 3.5 2001/01/17 22:12:52 dawes Exp $ */ #define _XIEC_PCNST Index: xc/programs/Xserver/XIE/dixie/process/pcomp.c diff -u xc/programs/Xserver/XIE/dixie/process/pcomp.c:3.3 xc/programs/Xserver/XIE/dixie/process/pcomp.c:3.4 --- xc/programs/Xserver/XIE/dixie/process/pcomp.c:3.3 Sun Oct 25 02:11:33 1998 +++ xc/programs/Xserver/XIE/dixie/process/pcomp.c Wed Jan 17 17:12:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: pcomp.c /main/4 1998/02/09 16:10:00 kaleb $ */ +/* $Xorg: pcomp.c,v 1.5 2000/08/17 19:47:27 cpqbld Exp $ */ /**** module pcomp.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. July 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pcomp.c,v 3.3 1998/10/25 07:11:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pcomp.c,v 3.4 2001/01/17 22:12:52 dawes Exp $ */ #define _XIEC_PCOMP Index: xc/programs/Xserver/XIE/dixie/process/pconv.c diff -u xc/programs/Xserver/XIE/dixie/process/pconv.c:3.4 xc/programs/Xserver/XIE/dixie/process/pconv.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/pconv.c:3.4 Sun Oct 25 02:11:33 1998 +++ xc/programs/Xserver/XIE/dixie/process/pconv.c Wed Jan 17 17:12:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: pconv.c /main/6 1998/02/09 16:10:05 kaleb $ */ +/* $Xorg: pconv.c,v 1.3 2000/08/17 19:47:27 cpqbld Exp $ */ /**** module pconv.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pconv.c,v 3.4 1998/10/25 07:11:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pconv.c,v 3.5 2001/01/17 22:12:52 dawes Exp $ */ #define _XIEC_PCONV Index: xc/programs/Xserver/XIE/dixie/process/pctoi.c diff -u xc/programs/Xserver/XIE/dixie/process/pctoi.c:3.4 xc/programs/Xserver/XIE/dixie/process/pctoi.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/pctoi.c:3.4 Sun Oct 25 02:11:34 1998 +++ xc/programs/Xserver/XIE/dixie/process/pctoi.c Wed Jan 17 17:12:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: pctoi.c /main/8 1998/02/09 16:10:09 kaleb $ */ +/* $Xorg: pctoi.c,v 1.3 2000/08/17 19:47:27 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module pctoi.c ****/ /****************************************************************************** @@ -67,7 +67,7 @@ Dean Verheiden && Robert NC Shelley -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pctoi.c,v 3.4 1998/10/25 07:11:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pctoi.c,v 3.5 2001/01/17 22:12:52 dawes Exp $ */ #define _XIEC_PCTOI #define _XIEC_PCI Index: xc/programs/Xserver/XIE/dixie/process/pctrgb.c diff -u xc/programs/Xserver/XIE/dixie/process/pctrgb.c:3.4 xc/programs/Xserver/XIE/dixie/process/pctrgb.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/pctrgb.c:3.4 Sun Oct 25 02:11:34 1998 +++ xc/programs/Xserver/XIE/dixie/process/pctrgb.c Wed Jan 17 17:12:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: pctrgb.c /main/5 1998/02/09 16:10:14 kaleb $ */ +/* $Xorg: pctrgb.c,v 1.3 2000/08/17 19:47:28 cpqbld Exp $ */ /**** module pctrgb.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. August 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pctrgb.c,v 3.4 1998/10/25 07:11:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pctrgb.c,v 3.5 2001/01/17 22:12:52 dawes Exp $ */ #define _XIEC_PCTRGB Index: xc/programs/Xserver/XIE/dixie/process/pdither.c diff -u xc/programs/Xserver/XIE/dixie/process/pdither.c:3.3 xc/programs/Xserver/XIE/dixie/process/pdither.c:3.4 --- xc/programs/Xserver/XIE/dixie/process/pdither.c:3.3 Sun Oct 25 02:11:34 1998 +++ xc/programs/Xserver/XIE/dixie/process/pdither.c Wed Jan 17 17:12:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: pdither.c /main/7 1998/02/09 16:10:19 kaleb $ */ +/* $Xorg: pdither.c,v 1.3 2000/08/17 19:47:28 cpqbld Exp $ */ /**** module pdither.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Larry Hare -- AGE Logic, Inc. May 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pdither.c,v 3.3 1998/10/25 07:11:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pdither.c,v 3.4 2001/01/17 22:12:53 dawes Exp $ */ #define _XIEC_PDITHER Index: xc/programs/Xserver/XIE/dixie/process/pgeom.c diff -u xc/programs/Xserver/XIE/dixie/process/pgeom.c:3.4 xc/programs/Xserver/XIE/dixie/process/pgeom.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/pgeom.c:3.4 Sun Oct 25 02:11:34 1998 +++ xc/programs/Xserver/XIE/dixie/process/pgeom.c Wed Jan 17 17:12:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: pgeom.c /main/6 1998/02/09 16:10:24 kaleb $ */ +/* $Xorg: pgeom.c,v 1.3 2000/08/17 19:47:28 cpqbld Exp $ */ /**** module pgeom.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Ben Fahy -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pgeom.c,v 3.4 1998/10/25 07:11:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pgeom.c,v 3.5 2001/01/17 22:12:53 dawes Exp $ */ #define _XIEC_PGEOM Index: xc/programs/Xserver/XIE/dixie/process/phist.c diff -u xc/programs/Xserver/XIE/dixie/process/phist.c:3.4 xc/programs/Xserver/XIE/dixie/process/phist.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/phist.c:3.4 Sun Oct 25 02:11:35 1998 +++ xc/programs/Xserver/XIE/dixie/process/phist.c Wed Jan 17 17:12:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: phist.c /main/5 1998/02/09 16:10:28 kaleb $ */ +/* $Xorg: phist.c,v 1.3 2000/08/17 19:47:28 cpqbld Exp $ */ /**** module phist.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. August 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/phist.c,v 3.4 1998/10/25 07:11:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/phist.c,v 3.5 2001/01/17 22:12:53 dawes Exp $ */ #define _XIEC_PHIST Index: xc/programs/Xserver/XIE/dixie/process/plogic.c diff -u xc/programs/Xserver/XIE/dixie/process/plogic.c:3.3 xc/programs/Xserver/XIE/dixie/process/plogic.c:3.4 --- xc/programs/Xserver/XIE/dixie/process/plogic.c:3.3 Sun Oct 25 02:11:35 1998 +++ xc/programs/Xserver/XIE/dixie/process/plogic.c Wed Jan 17 17:12:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: plogic.c /main/5 1998/02/09 16:10:33 kaleb $ */ +/* $Xorg: plogic.c,v 1.5 2000/08/17 19:47:28 cpqbld Exp $ */ /**** module plogic.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/plogic.c,v 3.3 1998/10/25 07:11:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/plogic.c,v 3.4 2001/01/17 22:12:53 dawes Exp $ */ #define _XIEC_PLOGIC Index: xc/programs/Xserver/XIE/dixie/process/pmath.c diff -u xc/programs/Xserver/XIE/dixie/process/pmath.c:3.3 xc/programs/Xserver/XIE/dixie/process/pmath.c:3.4 --- xc/programs/Xserver/XIE/dixie/process/pmath.c:3.3 Sun Oct 25 02:11:35 1998 +++ xc/programs/Xserver/XIE/dixie/process/pmath.c Wed Jan 17 17:12:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: pmath.c /main/4 1998/02/09 16:10:38 kaleb $ */ +/* $Xorg: pmath.c,v 1.5 2000/08/17 19:47:29 cpqbld Exp $ */ /**** module pmath.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. July 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pmath.c,v 3.3 1998/10/25 07:11:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pmath.c,v 3.4 2001/01/17 22:12:53 dawes Exp $ */ #define _XIEC_PMATH Index: xc/programs/Xserver/XIE/dixie/process/ppaste.c diff -u xc/programs/Xserver/XIE/dixie/process/ppaste.c:3.3 xc/programs/Xserver/XIE/dixie/process/ppaste.c:3.4 --- xc/programs/Xserver/XIE/dixie/process/ppaste.c:3.3 Sun Oct 25 02:11:36 1998 +++ xc/programs/Xserver/XIE/dixie/process/ppaste.c Wed Jan 17 17:12:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: ppaste.c /main/5 1998/02/09 16:10:44 kaleb $ */ +/* $Xorg: ppaste.c,v 1.3 2000/08/17 19:47:29 cpqbld Exp $ */ /**** module ppaste.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/ppaste.c,v 3.3 1998/10/25 07:11:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/ppaste.c,v 3.4 2001/01/17 22:12:53 dawes Exp $ */ #define _XIEC_PPASTE Index: xc/programs/Xserver/XIE/dixie/process/ppoint.c diff -u xc/programs/Xserver/XIE/dixie/process/ppoint.c:3.3 xc/programs/Xserver/XIE/dixie/process/ppoint.c:3.4 --- xc/programs/Xserver/XIE/dixie/process/ppoint.c:3.3 Sun Oct 25 02:11:36 1998 +++ xc/programs/Xserver/XIE/dixie/process/ppoint.c Wed Jan 17 17:12:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: ppoint.c /main/5 1998/02/09 16:10:51 kaleb $ */ +/* $Xorg: ppoint.c,v 1.3 2000/08/17 19:47:29 cpqbld Exp $ */ /**** module ppoint.c ****/ /****************************************************************************** @@ -67,7 +67,7 @@ Ben Fahy -- AGE Logic, Inc. May 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/ppoint.c,v 3.3 1998/10/25 07:11:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/ppoint.c,v 3.4 2001/01/17 22:12:53 dawes Exp $ */ #define _XIEC_PPOINT #define _XIEC_POINT Index: xc/programs/Xserver/XIE/dixie/process/puncnst.c diff -u xc/programs/Xserver/XIE/dixie/process/puncnst.c:3.3 xc/programs/Xserver/XIE/dixie/process/puncnst.c:3.4 --- xc/programs/Xserver/XIE/dixie/process/puncnst.c:3.3 Sun Oct 25 02:11:36 1998 +++ xc/programs/Xserver/XIE/dixie/process/puncnst.c Wed Jan 17 17:12:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: puncnst.c /main/5 1998/02/09 16:10:56 kaleb $ */ +/* $Xorg: puncnst.c,v 1.3 2000/08/17 19:47:29 cpqbld Exp $ */ /**** module puncnst.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. May 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/puncnst.c,v 3.3 1998/10/25 07:11:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/puncnst.c,v 3.4 2001/01/17 22:12:53 dawes Exp $ */ #define _XIEC_PUNCNST Index: xc/programs/Xserver/XIE/dixie/request/Imakefile diff -u xc/programs/Xserver/XIE/dixie/request/Imakefile:3.7 xc/programs/Xserver/XIE/dixie/request/Imakefile:3.8 --- xc/programs/Xserver/XIE/dixie/request/Imakefile:3.7 Sat Jul 25 04:05:07 1998 +++ xc/programs/Xserver/XIE/dixie/request/Imakefile Wed Jan 17 17:12:54 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/5 1996/09/28 16:55:47 rws $ -XCOMM $XFree86: xc/programs/Xserver/XIE/dixie/request/Imakefile,v 3.7 1998/07/25 08:05:07 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:29 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/XIE/dixie/request/Imakefile,v 3.8 2001/01/17 22:12:54 dawes Exp $ + XCOMM build device independent request objects #define IHaveModules Index: xc/programs/Xserver/XIE/dixie/request/colorlst.c diff -u xc/programs/Xserver/XIE/dixie/request/colorlst.c:3.3 xc/programs/Xserver/XIE/dixie/request/colorlst.c:3.4 --- xc/programs/Xserver/XIE/dixie/request/colorlst.c:3.3 Sun Oct 25 02:11:39 1998 +++ xc/programs/Xserver/XIE/dixie/request/colorlst.c Wed Jan 17 17:12:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: colorlst.c /main/7 1998/02/09 16:11:00 kaleb $ */ +/* $Xorg: colorlst.c,v 1.3 2000/08/17 19:47:29 cpqbld Exp $ */ /**** module colorlst.c ****/ /**************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. March, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/colorlst.c,v 3.3 1998/10/25 07:11:39 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/colorlst.c,v 3.4 2001/01/17 22:12:55 dawes Exp $ */ #define _XIEC_COLORLST Index: xc/programs/Xserver/XIE/dixie/request/difloat.c diff -u xc/programs/Xserver/XIE/dixie/request/difloat.c:1.6 xc/programs/Xserver/XIE/dixie/request/difloat.c:1.7 --- xc/programs/Xserver/XIE/dixie/request/difloat.c:1.6 Sun Oct 25 02:11:39 1998 +++ xc/programs/Xserver/XIE/dixie/request/difloat.c Wed Jan 17 17:12:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: difloat.c /main/6 1998/02/09 16:11:05 kaleb $ */ +/* $Xorg: difloat.c,v 1.3 2000/08/17 19:47:30 cpqbld Exp $ */ /**** module difloat.c ****/ /****************************************************************************** @@ -67,7 +67,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/difloat.c,v 1.6 1998/10/25 07:11:39 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/difloat.c,v 1.7 2001/01/17 22:12:55 dawes Exp $ */ #ifndef XIE_IEEE_IS_NATIVE #define _XIEC_DIFLOAT Index: xc/programs/Xserver/XIE/dixie/request/error.c diff -u xc/programs/Xserver/XIE/dixie/request/error.c:3.3 xc/programs/Xserver/XIE/dixie/request/error.c:3.4 --- xc/programs/Xserver/XIE/dixie/request/error.c:3.3 Sat Oct 10 11:25:21 1998 +++ xc/programs/Xserver/XIE/dixie/request/error.c Wed Jan 17 17:12:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: error.c /main/9 1998/02/09 16:11:09 kaleb $ */ +/* $Xorg: error.c,v 1.5 2000/08/17 19:47:30 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module error.c ****/ /**************************************************************************** @@ -61,7 +61,7 @@ Title to this software shall at all times remain with AGE Logic, Inc. ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/error.c,v 3.3 1998/10/10 15:25:21 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/error.c,v 3.4 2001/01/17 22:12:55 dawes Exp $ */ /* * Include files Index: xc/programs/Xserver/XIE/dixie/request/event.c diff -u xc/programs/Xserver/XIE/dixie/request/event.c:3.3 xc/programs/Xserver/XIE/dixie/request/event.c:3.4 --- xc/programs/Xserver/XIE/dixie/request/event.c:3.3 Sun Oct 25 02:11:39 1998 +++ xc/programs/Xserver/XIE/dixie/request/event.c Wed Jan 17 17:12:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: event.c /main/6 1998/02/09 16:11:14 kaleb $ */ +/* $Xorg: event.c,v 1.3 2000/08/17 19:47:30 cpqbld Exp $ */ /**** module event.c ****/ /**************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. April 1993 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/event.c,v 3.3 1998/10/25 07:11:39 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/event.c,v 3.4 2001/01/17 22:12:55 dawes Exp $ */ #define _XIEC_EVENT Index: xc/programs/Xserver/XIE/dixie/request/flo.c diff -u xc/programs/Xserver/XIE/dixie/request/flo.c:3.4 xc/programs/Xserver/XIE/dixie/request/flo.c:3.5 --- xc/programs/Xserver/XIE/dixie/request/flo.c:3.4 Sun Oct 25 02:11:40 1998 +++ xc/programs/Xserver/XIE/dixie/request/flo.c Wed Jan 17 17:12:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: flo.c /main/8 1998/02/09 16:11:19 kaleb $ */ +/* $Xorg: flo.c,v 1.3 2000/08/17 19:47:30 cpqbld Exp $ */ /**** module flo.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. May, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/flo.c,v 3.4 1998/10/25 07:11:40 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/flo.c,v 3.5 2001/01/17 22:12:55 dawes Exp $ */ /* * Include files Index: xc/programs/Xserver/XIE/dixie/request/lut.c diff -u xc/programs/Xserver/XIE/dixie/request/lut.c:3.3 xc/programs/Xserver/XIE/dixie/request/lut.c:3.4 --- xc/programs/Xserver/XIE/dixie/request/lut.c:3.3 Sun Oct 25 02:11:40 1998 +++ xc/programs/Xserver/XIE/dixie/request/lut.c Wed Jan 17 17:12:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: lut.c /main/5 1998/02/09 16:11:28 kaleb $ */ +/* $Xorg: lut.c,v 1.3 2000/08/17 19:47:31 cpqbld Exp $ */ /**** module lut.c ****/ /**************************************************************************** @@ -60,7 +60,7 @@ Title to this software shall at all times remain with AGE Logic, Inc. ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/lut.c,v 3.3 1998/10/25 07:11:40 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/lut.c,v 3.4 2001/01/17 22:12:55 dawes Exp $ */ /* * Include files Index: xc/programs/Xserver/XIE/dixie/request/memory.c diff -u xc/programs/Xserver/XIE/dixie/request/memory.c:3.5 xc/programs/Xserver/XIE/dixie/request/memory.c:3.6 --- xc/programs/Xserver/XIE/dixie/request/memory.c:3.5 Sun Oct 25 02:11:40 1998 +++ xc/programs/Xserver/XIE/dixie/request/memory.c Wed Jan 17 17:12:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: memory.c /main/7 1998/02/09 16:11:33 kaleb $ */ +/* $Xorg: memory.c,v 1.3 2000/08/17 19:47:31 cpqbld Exp $ */ /* Module memory.c */ /**************************************************************************** @@ -67,7 +67,7 @@ Dean Verheiden, AGE Logic, Inc., April 1993 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/memory.c,v 3.5 1998/10/25 07:11:40 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/memory.c,v 3.6 2001/01/17 22:12:55 dawes Exp $ */ #define _XIEC_MEMORY Index: xc/programs/Xserver/XIE/dixie/request/photomap.c diff -u xc/programs/Xserver/XIE/dixie/request/photomap.c:3.3 xc/programs/Xserver/XIE/dixie/request/photomap.c:3.4 --- xc/programs/Xserver/XIE/dixie/request/photomap.c:3.3 Sun Oct 25 02:11:41 1998 +++ xc/programs/Xserver/XIE/dixie/request/photomap.c Wed Jan 17 17:12:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: photomap.c /main/7 1998/02/09 16:11:38 kaleb $ */ +/* $Xorg: photomap.c,v 1.3 2000/08/17 19:47:31 cpqbld Exp $ */ /**** module photomap.c ****/ /**************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden, Robert NC Shelley AGE Logic, Inc. April 1993 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/photomap.c,v 3.3 1998/10/25 07:11:41 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/photomap.c,v 3.4 2001/01/17 22:12:56 dawes Exp $ */ #define _XIEC_PHOTOMAP Index: xc/programs/Xserver/XIE/dixie/request/protoflo.c diff -u xc/programs/Xserver/XIE/dixie/request/protoflo.c:3.3 xc/programs/Xserver/XIE/dixie/request/protoflo.c:3.4 --- xc/programs/Xserver/XIE/dixie/request/protoflo.c:3.3 Sun Oct 25 02:11:41 1998 +++ xc/programs/Xserver/XIE/dixie/request/protoflo.c Wed Jan 17 17:12:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: protoflo.c /main/11 1998/02/09 16:11:44 kaleb $ */ +/* $Xorg: protoflo.c,v 1.3 2000/08/17 19:47:31 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module protoflo.c ****/ /**************************************************************************** @@ -67,7 +67,7 @@ Robert NC Shelley, Dean Verheiden -- AGE Logic, Inc., May 1993 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/protoflo.c,v 3.3 1998/10/25 07:11:41 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/protoflo.c,v 3.4 2001/01/17 22:12:56 dawes Exp $ */ #include Index: xc/programs/Xserver/XIE/dixie/request/roi.c diff -u xc/programs/Xserver/XIE/dixie/request/roi.c:3.3 xc/programs/Xserver/XIE/dixie/request/roi.c:3.4 --- xc/programs/Xserver/XIE/dixie/request/roi.c:3.3 Sun Oct 25 02:11:41 1998 +++ xc/programs/Xserver/XIE/dixie/request/roi.c Wed Jan 17 17:12:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: roi.c /main/5 1998/02/09 16:11:50 kaleb $ */ +/* $Xorg: roi.c,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ /**** module roi.c ****/ /**************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden, AGE Logic, Inc., April 1993 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/roi.c,v 3.3 1998/10/25 07:11:41 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/roi.c,v 3.4 2001/01/17 22:12:56 dawes Exp $ */ #define _XIEC_ROI Index: xc/programs/Xserver/XIE/dixie/request/session.c diff -u xc/programs/Xserver/XIE/dixie/request/session.c:3.12 xc/programs/Xserver/XIE/dixie/request/session.c:3.13 --- xc/programs/Xserver/XIE/dixie/request/session.c:3.12 Sun Jan 31 07:21:34 1999 +++ xc/programs/Xserver/XIE/dixie/request/session.c Wed Jan 17 17:12:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: session.c /main/7 1998/02/09 16:11:54 kaleb $ */ +/* $Xorg: session.c,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ /**** session.c ****/ /**************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc March, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/session.c,v 3.12 1999/01/31 12:21:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/session.c,v 3.13 2001/01/17 22:12:56 dawes Exp $ */ #define _XIEC_SESSION Index: xc/programs/Xserver/XIE/dixie/request/tables.c diff -u xc/programs/Xserver/XIE/dixie/request/tables.c:3.4 xc/programs/Xserver/XIE/dixie/request/tables.c:3.5 --- xc/programs/Xserver/XIE/dixie/request/tables.c:3.4 Sun Jan 31 07:21:34 1999 +++ xc/programs/Xserver/XIE/dixie/request/tables.c Wed Jan 17 17:12:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: tables.c /main/5 1998/02/09 16:11:59 kaleb $ */ +/* $Xorg: tables.c,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ /**** tables.c ****/ /**************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden, AGE Logic, Inc March 1993 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/tables.c,v 3.4 1999/01/31 12:21:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/tables.c,v 3.5 2001/01/17 22:12:56 dawes Exp $ */ #define _XIEC_TABLES Index: xc/programs/Xserver/XIE/dixie/request/technq.c diff -u xc/programs/Xserver/XIE/dixie/request/technq.c:3.5 xc/programs/Xserver/XIE/dixie/request/technq.c:3.6 --- xc/programs/Xserver/XIE/dixie/request/technq.c:3.5 Sun Oct 25 02:11:42 1998 +++ xc/programs/Xserver/XIE/dixie/request/technq.c Wed Jan 17 17:12:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: technq.c /main/7 1998/02/09 16:12:04 kaleb $ */ +/* $Xorg: technq.c,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ /**** module technq.c ****/ /**************************************************************************** @@ -64,7 +64,7 @@ Dean Verheiden AGE Logic, Inc. April 1993 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/technq.c,v 3.5 1998/10/25 07:11:42 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/technq.c,v 3.6 2001/01/17 22:12:56 dawes Exp $ */ #define _XIEC_TECHNQ Index: xc/programs/Xserver/XIE/include/colorlst.h diff -u xc/programs/Xserver/XIE/include/colorlst.h:1.1.1.2 xc/programs/Xserver/XIE/include/colorlst.h:1.1.1.3 --- xc/programs/Xserver/XIE/include/colorlst.h:1.1.1.2 Sun Sep 27 04:36:38 1998 +++ xc/programs/Xserver/XIE/include/colorlst.h Tue Jan 16 17:38:08 2001 @@ -1,4 +1,4 @@ -/* $TOG: colorlst.h /main/5 1998/02/10 10:27:12 kaleb $ */ +/* $Xorg: colorlst.h,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ /**** colorlst.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/include/corex.h diff -u xc/programs/Xserver/XIE/include/corex.h:1.3 xc/programs/Xserver/XIE/include/corex.h:1.4 --- xc/programs/Xserver/XIE/include/corex.h:1.3 Sun Oct 25 07:47:53 1998 +++ xc/programs/Xserver/XIE/include/corex.h Wed Jan 17 17:12:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: corex.h /main/6 1998/02/10 10:27:18 kaleb $ */ +/* $Xorg: corex.h,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ /**** module corex.h ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. April, 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/include/corex.h,v 1.3 1998/10/25 12:47:53 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/include/corex.h,v 1.4 2001/01/17 22:12:57 dawes Exp $ */ #ifndef _XIEH_COREX #define _XIEH_COREX Index: xc/programs/Xserver/XIE/include/difloat.h diff -u xc/programs/Xserver/XIE/include/difloat.h:1.3 xc/programs/Xserver/XIE/include/difloat.h:1.4 --- xc/programs/Xserver/XIE/include/difloat.h:1.3 Sun Oct 25 07:47:53 1998 +++ xc/programs/Xserver/XIE/include/difloat.h Wed Jan 17 17:12:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: difloat.h /main/5 1998/02/10 10:27:23 kaleb $ */ +/* $Xorg: difloat.h,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ /**** module difloat.h ****/ /****************************************************************************** @@ -67,7 +67,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/include/difloat.h,v 1.3 1998/10/25 12:47:53 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/include/difloat.h,v 1.4 2001/01/17 22:12:57 dawes Exp $ */ #ifndef _XIE_DIFLOAT #define _XIE_DIFLOAT Index: xc/programs/Xserver/XIE/include/element.h diff -u xc/programs/Xserver/XIE/include/element.h:1.1.1.4 xc/programs/Xserver/XIE/include/element.h:1.1.1.5 --- xc/programs/Xserver/XIE/include/element.h:1.1.1.4 Sun Sep 27 04:36:42 1998 +++ xc/programs/Xserver/XIE/include/element.h Tue Jan 16 17:38:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: element.h /main/8 1998/02/10 10:27:27 kaleb $ */ +/* $Xorg: element.h,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /* module element.h */ /***************************************************************************** Index: xc/programs/Xserver/XIE/include/error.h diff -u xc/programs/Xserver/XIE/include/error.h:3.3 xc/programs/Xserver/XIE/include/error.h:3.4 --- xc/programs/Xserver/XIE/include/error.h:3.3 Mon Oct 5 09:22:23 1998 +++ xc/programs/Xserver/XIE/include/error.h Wed Jan 17 17:12:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: error.h /main/5 1998/02/10 10:27:32 kaleb $ */ +/* $Xorg: error.h,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ /**** module error.h ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. April, 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/include/error.h,v 3.3 1998/10/05 13:22:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/include/error.h,v 3.4 2001/01/17 22:12:58 dawes Exp $ */ #ifndef _XIEH_ERROR #define _XIEH_ERROR Index: xc/programs/Xserver/XIE/include/flo.h diff -u xc/programs/Xserver/XIE/include/flo.h:1.3 xc/programs/Xserver/XIE/include/flo.h:1.4 --- xc/programs/Xserver/XIE/include/flo.h:1.3 Sun Oct 25 07:47:54 1998 +++ xc/programs/Xserver/XIE/include/flo.h Wed Jan 17 17:12:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: flo.h /main/5 1998/02/10 10:27:46 kaleb $ */ +/* $Xorg: flo.h,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ /**** module flo.h ****/ /**************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/include/flo.h,v 1.3 1998/10/25 12:47:54 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/include/flo.h,v 1.4 2001/01/17 22:12:58 dawes Exp $ */ #ifndef _XIEH_FLO #define _XIEH_FLO Index: xc/programs/Xserver/XIE/include/flodata.h diff -u xc/programs/Xserver/XIE/include/flodata.h:1.1.1.2 xc/programs/Xserver/XIE/include/flodata.h:1.1.1.3 --- xc/programs/Xserver/XIE/include/flodata.h:1.1.1.2 Sun Sep 27 04:36:45 1998 +++ xc/programs/Xserver/XIE/include/flodata.h Tue Jan 16 17:38:14 2001 @@ -1,4 +1,4 @@ -/* $TOG: flodata.h /main/5 1998/02/10 10:27:37 kaleb $ */ +/* $Xorg: flodata.h,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ /**** module flodata.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/include/flostr.h diff -u xc/programs/Xserver/XIE/include/flostr.h:1.1.1.3 xc/programs/Xserver/XIE/include/flostr.h:1.1.1.4 --- xc/programs/Xserver/XIE/include/flostr.h:1.1.1.3 Sun Sep 27 04:36:46 1998 +++ xc/programs/Xserver/XIE/include/flostr.h Tue Jan 16 17:38:16 2001 @@ -1,4 +1,4 @@ -/* $TOG: flostr.h /main/7 1998/02/10 10:27:41 kaleb $ */ +/* $Xorg: flostr.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ /**** module flostr.h ****/ /**************************************************************************** Index: xc/programs/Xserver/XIE/include/lut.h diff -u xc/programs/Xserver/XIE/include/lut.h:1.1.1.2 xc/programs/Xserver/XIE/include/lut.h:1.1.1.3 --- xc/programs/Xserver/XIE/include/lut.h:1.1.1.2 Sun Sep 27 04:36:47 1998 +++ xc/programs/Xserver/XIE/include/lut.h Tue Jan 16 17:38:18 2001 @@ -1,4 +1,4 @@ -/* $TOG: lut.h /main/5 1998/02/10 10:27:50 kaleb $ */ +/* $Xorg: lut.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ /**** module lut.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/include/macro.h diff -u xc/programs/Xserver/XIE/include/macro.h:1.8 xc/programs/Xserver/XIE/include/macro.h:1.9 --- xc/programs/Xserver/XIE/include/macro.h:1.8 Sun Oct 25 02:11:46 1998 +++ xc/programs/Xserver/XIE/include/macro.h Wed Jan 17 17:12:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: macro.h /main/8 1998/02/10 10:27:54 kaleb $ */ +/* $Xorg: macro.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ /**** module macro.h ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. March 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/include/macro.h,v 1.8 1998/10/25 07:11:46 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/include/macro.h,v 1.9 2001/01/17 22:12:58 dawes Exp $ */ #ifndef _XIEH_MACRO #define _XIEH_MACRO Index: xc/programs/Xserver/XIE/include/memory.h diff -u xc/programs/Xserver/XIE/include/memory.h:1.3 xc/programs/Xserver/XIE/include/memory.h:1.4 --- xc/programs/Xserver/XIE/include/memory.h:1.3 Sun Oct 25 07:47:54 1998 +++ xc/programs/Xserver/XIE/include/memory.h Wed Jan 17 17:12:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: memory.h /main/6 1998/02/10 10:27:59 kaleb $ */ +/* $Xorg: memory.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ /**** module memory.h ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. April 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/include/memory.h,v 1.3 1998/10/25 12:47:54 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/include/memory.h,v 1.4 2001/01/17 22:12:58 dawes Exp $ */ #ifndef _XIEH_MEMORY #define _XIEH_MEMORY Index: xc/programs/Xserver/XIE/include/photomap.h diff -u xc/programs/Xserver/XIE/include/photomap.h:1.1.1.2 xc/programs/Xserver/XIE/include/photomap.h:1.1.1.3 --- xc/programs/Xserver/XIE/include/photomap.h:1.1.1.2 Sun Sep 27 04:36:50 1998 +++ xc/programs/Xserver/XIE/include/photomap.h Tue Jan 16 17:38:20 2001 @@ -1,4 +1,4 @@ -/* $TOG: photomap.h /main/6 1998/02/10 10:28:03 kaleb $ */ +/* $Xorg: photomap.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ /**** module photomap.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/include/photospc.h diff -u xc/programs/Xserver/XIE/include/photospc.h:1.1.1.2 xc/programs/Xserver/XIE/include/photospc.h:1.1.1.3 --- xc/programs/Xserver/XIE/include/photospc.h:1.1.1.2 Sun Sep 27 04:36:51 1998 +++ xc/programs/Xserver/XIE/include/photospc.h Tue Jan 16 17:38:21 2001 @@ -1,4 +1,4 @@ -/* $TOG: photospc.h /main/5 1998/02/10 10:28:07 kaleb $ */ +/* $Xorg: photospc.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ /**** module photospc.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/include/roi.h diff -u xc/programs/Xserver/XIE/include/roi.h:1.1.1.2 xc/programs/Xserver/XIE/include/roi.h:1.1.1.3 --- xc/programs/Xserver/XIE/include/roi.h:1.1.1.2 Sun Sep 27 04:36:52 1998 +++ xc/programs/Xserver/XIE/include/roi.h Tue Jan 16 17:38:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: roi.h /main/5 1998/02/10 10:28:11 kaleb $ */ +/* $Xorg: roi.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ /**** module roi.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/include/tables.h diff -u xc/programs/Xserver/XIE/include/tables.h:1.3 xc/programs/Xserver/XIE/include/tables.h:1.4 --- xc/programs/Xserver/XIE/include/tables.h:1.3 Sun Oct 25 07:47:54 1998 +++ xc/programs/Xserver/XIE/include/tables.h Wed Jan 17 17:12:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: tables.h /main/5 1998/02/10 10:28:15 kaleb $ */ +/* $Xorg: tables.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ /**** module tables.h ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden, Robert NC Shelley -- AGE Logic, Inc. April 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/include/tables.h,v 1.3 1998/10/25 12:47:54 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/include/tables.h,v 1.4 2001/01/17 22:12:58 dawes Exp $ */ #ifndef _XIEH_TABLES #define _XIEH_TABLES Index: xc/programs/Xserver/XIE/include/technq.h diff -u xc/programs/Xserver/XIE/include/technq.h:1.3 xc/programs/Xserver/XIE/include/technq.h:1.4 --- xc/programs/Xserver/XIE/include/technq.h:1.3 Sun Oct 25 07:47:55 1998 +++ xc/programs/Xserver/XIE/include/technq.h Wed Jan 17 17:12:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: technq.h /main/5 1998/02/10 10:28:19 kaleb $ */ +/* $Xorg: technq.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ /**** module technq.h ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. April 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/include/technq.h,v 1.3 1998/10/25 12:47:55 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/include/technq.h,v 1.4 2001/01/17 22:12:58 dawes Exp $ */ #ifndef _XIEH_TECHNQ #define _XIEH_TECHNQ Index: xc/programs/Xserver/XIE/mixie/Imakefile diff -u xc/programs/Xserver/XIE/mixie/Imakefile:3.16 xc/programs/Xserver/XIE/mixie/Imakefile:3.17 --- xc/programs/Xserver/XIE/mixie/Imakefile:3.16 Thu Aug 24 18:20:11 2000 +++ xc/programs/Xserver/XIE/mixie/Imakefile Wed Jan 17 17:12:59 2001 @@ -1,5 +1,9 @@ -XCOMM $XConsortium: Imakefile /main/6 1995/12/07 21:15:34 gildea $ -XCOMM $XFree86: xc/programs/Xserver/XIE/mixie/Imakefile,v 3.16 2000/08/24 22:20:11 tsi Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/XIE/mixie/Imakefile,v 3.17 2001/01/17 22:12:59 dawes Exp $ #define IHaveModules #include Index: xc/programs/Xserver/XIE/mixie/control/Imakefile diff -u xc/programs/Xserver/XIE/mixie/control/Imakefile:3.5 xc/programs/Xserver/XIE/mixie/control/Imakefile:3.6 --- xc/programs/Xserver/XIE/mixie/control/Imakefile:3.5 Sat Jul 25 04:05:09 1998 +++ xc/programs/Xserver/XIE/mixie/control/Imakefile Wed Jan 17 17:13:00 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/5 1996/09/28 16:55:55 rws $ -XCOMM $XFree86: xc/programs/Xserver/XIE/mixie/control/Imakefile,v 3.5 1998/07/25 08:05:09 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:34 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/XIE/mixie/control/Imakefile,v 3.6 2001/01/17 22:13:00 dawes Exp $ + XCOMM build device dependent machine independent control objects #define IHaveModules Index: xc/programs/Xserver/XIE/mixie/control/analyze.c diff -u xc/programs/Xserver/XIE/mixie/control/analyze.c:1.3 xc/programs/Xserver/XIE/mixie/control/analyze.c:1.4 --- xc/programs/Xserver/XIE/mixie/control/analyze.c:1.3 Tue Oct 6 06:35:15 1998 +++ xc/programs/Xserver/XIE/mixie/control/analyze.c Wed Jan 17 17:13:00 2001 @@ -1,4 +1,4 @@ -/* $TOG: analyze.c /main/5 1998/02/09 16:12:09 kaleb $ */ +/* $Xorg: analyze.c,v 1.3 2000/08/17 19:47:34 cpqbld Exp $ */ /**** module analyze.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. April, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/control/analyze.c,v 1.3 1998/10/06 10:35:15 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/control/analyze.c,v 1.4 2001/01/17 22:13:00 dawes Exp $ */ #define _XIEC_ANALYZE Index: xc/programs/Xserver/XIE/mixie/control/domain.c diff -u xc/programs/Xserver/XIE/mixie/control/domain.c:1.3 xc/programs/Xserver/XIE/mixie/control/domain.c:1.4 --- xc/programs/Xserver/XIE/mixie/control/domain.c:1.3 Tue Oct 6 06:35:16 1998 +++ xc/programs/Xserver/XIE/mixie/control/domain.c Wed Jan 17 17:13:00 2001 @@ -1,4 +1,4 @@ -/* $TOG: domain.c /main/6 1998/02/09 16:12:14 kaleb $ */ +/* $Xorg: domain.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ /**** module domain.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group @@ -67,7 +67,7 @@ Dean Verheiden -- AGE Logic, Inc. July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/control/domain.c,v 1.3 1998/10/06 10:35:16 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/control/domain.c,v 1.4 2001/01/17 22:13:00 dawes Exp $ */ #define _XIEC_DOMAIN Index: xc/programs/Xserver/XIE/mixie/control/floman.c diff -u xc/programs/Xserver/XIE/mixie/control/floman.c:3.3 xc/programs/Xserver/XIE/mixie/control/floman.c:3.4 --- xc/programs/Xserver/XIE/mixie/control/floman.c:3.3 Sun Oct 25 02:11:49 1998 +++ xc/programs/Xserver/XIE/mixie/control/floman.c Wed Jan 17 17:13:00 2001 @@ -1,4 +1,4 @@ -/* $TOG: floman.c /main/7 1998/02/09 16:12:19 kaleb $ */ +/* $Xorg: floman.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ /**** module floman.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. May, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/control/floman.c,v 3.3 1998/10/25 07:11:49 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/control/floman.c,v 3.4 2001/01/17 22:13:00 dawes Exp $ */ /* * Include files Index: xc/programs/Xserver/XIE/mixie/control/sched.c diff -u xc/programs/Xserver/XIE/mixie/control/sched.c:1.4 xc/programs/Xserver/XIE/mixie/control/sched.c:1.5 --- xc/programs/Xserver/XIE/mixie/control/sched.c:1.4 Sun Oct 25 02:11:51 1998 +++ xc/programs/Xserver/XIE/mixie/control/sched.c Wed Jan 17 17:13:00 2001 @@ -1,4 +1,4 @@ -/* $TOG: sched.c /main/5 1998/02/09 16:12:28 kaleb $ */ +/* $Xorg: sched.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ /**** module sched.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden, Robert NC Shelley -- AGE Logic, Inc. May, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/control/sched.c,v 1.4 1998/10/25 07:11:51 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/control/sched.c,v 1.5 2001/01/17 22:13:00 dawes Exp $ */ /* * Include files Index: xc/programs/Xserver/XIE/mixie/control/strip.c diff -u xc/programs/Xserver/XIE/mixie/control/strip.c:3.5 xc/programs/Xserver/XIE/mixie/control/strip.c:3.6 --- xc/programs/Xserver/XIE/mixie/control/strip.c:3.5 Sun Jan 31 07:21:35 1999 +++ xc/programs/Xserver/XIE/mixie/control/strip.c Wed Jan 17 17:13:00 2001 @@ -1,4 +1,4 @@ -/* $TOG: strip.c /main/10 1998/02/09 16:12:32 kaleb $ */ +/* $Xorg: strip.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module strip.c ****/ /***************************************************************************** @@ -67,7 +67,7 @@ Robert NC Shelley -- AGE Logic, Inc. April, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/control/strip.c,v 3.5 1999/01/31 12:21:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/control/strip.c,v 3.6 2001/01/17 22:13:00 dawes Exp $ */ /* * Include files Index: xc/programs/Xserver/XIE/mixie/export/Imakefile diff -u xc/programs/Xserver/XIE/mixie/export/Imakefile:3.5 xc/programs/Xserver/XIE/mixie/export/Imakefile:3.6 --- xc/programs/Xserver/XIE/mixie/export/Imakefile:3.5 Sat Jul 25 04:05:10 1998 +++ xc/programs/Xserver/XIE/mixie/export/Imakefile Wed Jan 17 17:13:01 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/6 1996/09/28 16:56:01 rws $ -XCOMM $XFree86: xc/programs/Xserver/XIE/mixie/export/Imakefile,v 3.5 1998/07/25 08:05:10 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/XIE/mixie/export/Imakefile,v 3.6 2001/01/17 22:13:01 dawes Exp $ + XCOMM build device dependent machine independent export element objs #define IHaveModules Index: xc/programs/Xserver/XIE/mixie/export/mechist.c diff -u xc/programs/Xserver/XIE/mixie/export/mechist.c:3.4 xc/programs/Xserver/XIE/mixie/export/mechist.c:3.5 --- xc/programs/Xserver/XIE/mixie/export/mechist.c:3.4 Sun Oct 25 02:11:52 1998 +++ xc/programs/Xserver/XIE/mixie/export/mechist.c Wed Jan 17 17:13:01 2001 @@ -1,4 +1,4 @@ -/* $TOG: mechist.c /main/5 1998/02/09 16:12:42 kaleb $ */ +/* $Xorg: mechist.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ /**** module mechist.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Larry Hare -- AGE Logic, Inc. August, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mechist.c,v 3.4 1998/10/25 07:11:52 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mechist.c,v 3.5 2001/01/17 22:13:01 dawes Exp $ */ #define _XIEC_MECHIST #define _XIEC_ECHIST Index: xc/programs/Xserver/XIE/mixie/export/meclut.c diff -u xc/programs/Xserver/XIE/mixie/export/meclut.c:3.4 xc/programs/Xserver/XIE/mixie/export/meclut.c:3.5 --- xc/programs/Xserver/XIE/mixie/export/meclut.c:3.4 Sun Oct 25 02:11:53 1998 +++ xc/programs/Xserver/XIE/mixie/export/meclut.c Wed Jan 17 17:13:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: meclut.c /main/7 1998/02/09 16:12:47 kaleb $ */ +/* $Xorg: meclut.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ /**** module meclut.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Larry Hare -- AGE Logic, Inc. July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/meclut.c,v 3.4 1998/10/25 07:11:53 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/meclut.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ #define _XIEC_MECLUT #define _XIEC_ECLUT Index: xc/programs/Xserver/XIE/mixie/export/mecphoto.c diff -u xc/programs/Xserver/XIE/mixie/export/mecphoto.c:3.4 xc/programs/Xserver/XIE/mixie/export/mecphoto.c:3.5 --- xc/programs/Xserver/XIE/mixie/export/mecphoto.c:3.4 Sun Oct 25 02:11:53 1998 +++ xc/programs/Xserver/XIE/mixie/export/mecphoto.c Wed Jan 17 17:13:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: mecphoto.c /main/10 1998/02/09 16:12:51 kaleb $ */ +/* $Xorg: mecphoto.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ /**** module mecphoto.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley && Dean Verheiden -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mecphoto.c,v 3.4 1998/10/25 07:11:53 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mecphoto.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ #define _XIEC_MECPHOTO #define _XIEC_ECPHOTO #define _XIEC_EPHOTO Index: xc/programs/Xserver/XIE/mixie/export/mecroi.c diff -u xc/programs/Xserver/XIE/mixie/export/mecroi.c:3.4 xc/programs/Xserver/XIE/mixie/export/mecroi.c:3.5 --- xc/programs/Xserver/XIE/mixie/export/mecroi.c:3.4 Sun Oct 25 02:11:53 1998 +++ xc/programs/Xserver/XIE/mixie/export/mecroi.c Wed Jan 17 17:13:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: mecroi.c /main/6 1998/02/09 16:12:56 kaleb $ */ +/* $Xorg: mecroi.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ /**** module mecroi.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Larry Hare && Dean Verheiden -- AGE Logic, Inc. August, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mecroi.c,v 3.4 1998/10/25 07:11:53 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mecroi.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ #define _XIEC_MECROI #define _XIEC_ECROI Index: xc/programs/Xserver/XIE/mixie/export/medraw.c diff -u xc/programs/Xserver/XIE/mixie/export/medraw.c:3.4 xc/programs/Xserver/XIE/mixie/export/medraw.c:3.5 --- xc/programs/Xserver/XIE/mixie/export/medraw.c:3.4 Sun Oct 25 02:11:54 1998 +++ xc/programs/Xserver/XIE/mixie/export/medraw.c Wed Jan 17 17:13:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: medraw.c /main/7 1998/02/09 16:13:05 kaleb $ */ +/* $Xorg: medraw.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ /**** module medraw.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. April, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/medraw.c,v 3.4 1998/10/25 07:11:54 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/medraw.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ #define _XIEC_MEDRAW #define _XIEC_EDRAW Index: xc/programs/Xserver/XIE/mixie/export/medrawp.c diff -u xc/programs/Xserver/XIE/mixie/export/medrawp.c:3.4 xc/programs/Xserver/XIE/mixie/export/medrawp.c:3.5 --- xc/programs/Xserver/XIE/mixie/export/medrawp.c:3.4 Sun Oct 25 02:11:54 1998 +++ xc/programs/Xserver/XIE/mixie/export/medrawp.c Wed Jan 17 17:13:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: medrawp.c /main/8 1998/02/09 16:13:00 kaleb $ */ +/* $Xorg: medrawp.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ /**** module medrawp.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley && Larry Hare -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/medrawp.c,v 3.4 1998/10/25 07:11:54 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/medrawp.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ #define _XIEC_MEDRAWP #define _XIEC_EDRAWP Index: xc/programs/Xserver/XIE/mixie/export/mefax.c diff -u xc/programs/Xserver/XIE/mixie/export/mefax.c:3.4 xc/programs/Xserver/XIE/mixie/export/mefax.c:3.5 --- xc/programs/Xserver/XIE/mixie/export/mefax.c:3.4 Sun Oct 25 02:11:54 1998 +++ xc/programs/Xserver/XIE/mixie/export/mefax.c Wed Jan 17 17:13:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: mefax.c /main/8 1998/02/09 16:13:09 kaleb $ */ +/* $Xorg: mefax.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ /**** module mefax.c ****/ /****************************************************************************** @@ -67,7 +67,7 @@ Ben Fahy -- AGE Logic, Inc. Oct, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mefax.c,v 3.4 1998/10/25 07:11:54 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mefax.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ #define _XIEC_MEPHOTO #define _XIEC_EPHOTO Index: xc/programs/Xserver/XIE/mixie/export/mejpeg.c diff -u xc/programs/Xserver/XIE/mixie/export/mejpeg.c:3.6 xc/programs/Xserver/XIE/mixie/export/mejpeg.c:3.7 --- xc/programs/Xserver/XIE/mixie/export/mejpeg.c:3.6 Sun Jan 31 07:21:35 1999 +++ xc/programs/Xserver/XIE/mixie/export/mejpeg.c Wed Jan 17 17:13:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: mejpeg.c /main/6 1998/02/09 16:13:13 kaleb $ */ +/* $Xorg: mejpeg.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ /**** module mejpeg.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Ben Fahy -- AGE Logic, Inc. Oct, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mejpeg.c,v 3.6 1999/01/31 12:21:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mejpeg.c,v 3.7 2001/01/17 22:13:02 dawes Exp $ */ #define _XIEC_MEPHOTO #define _XIEC_EPHOTO Index: xc/programs/Xserver/XIE/mixie/export/melut.c diff -u xc/programs/Xserver/XIE/mixie/export/melut.c:3.4 xc/programs/Xserver/XIE/mixie/export/melut.c:3.5 --- xc/programs/Xserver/XIE/mixie/export/melut.c:3.4 Sun Oct 25 02:11:55 1998 +++ xc/programs/Xserver/XIE/mixie/export/melut.c Wed Jan 17 17:13:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: melut.c /main/6 1998/02/09 16:13:18 kaleb $ */ +/* $Xorg: melut.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ /**** module melut.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Larry Hare -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/melut.c,v 3.4 1998/10/25 07:11:55 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/melut.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ #define _XIEC_MELUT #define _XIEC_ELUT Index: xc/programs/Xserver/XIE/mixie/export/mephoto.c diff -u xc/programs/Xserver/XIE/mixie/export/mephoto.c:3.4 xc/programs/Xserver/XIE/mixie/export/mephoto.c:3.5 --- xc/programs/Xserver/XIE/mixie/export/mephoto.c:3.4 Sun Oct 25 02:11:55 1998 +++ xc/programs/Xserver/XIE/mixie/export/mephoto.c Wed Jan 17 17:13:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: mephoto.c /main/8 1998/02/09 16:13:22 kaleb $ */ +/* $Xorg: mephoto.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ /**** module mephoto.c ****/ /****************************************************************************** @@ -67,7 +67,7 @@ Dean && Ben - various additions to handle different techniques *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mephoto.c,v 3.4 1998/10/25 07:11:55 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mephoto.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ #define _XIEC_MEPHOTO #define _XIEC_EPHOTO Index: xc/programs/Xserver/XIE/mixie/export/meroi.c diff -u xc/programs/Xserver/XIE/mixie/export/meroi.c:3.4 xc/programs/Xserver/XIE/mixie/export/meroi.c:3.5 --- xc/programs/Xserver/XIE/mixie/export/meroi.c:3.4 Sun Oct 25 02:11:56 1998 +++ xc/programs/Xserver/XIE/mixie/export/meroi.c Wed Jan 17 17:13:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: meroi.c /main/5 1998/02/09 16:13:27 kaleb $ */ +/* $Xorg: meroi.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ /**** module meroi.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. August, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/meroi.c,v 3.4 1998/10/25 07:11:56 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/meroi.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ #define _XIEC_MEROI Index: xc/programs/Xserver/XIE/mixie/export/meuncomp.c diff -u xc/programs/Xserver/XIE/mixie/export/meuncomp.c:1.4 xc/programs/Xserver/XIE/mixie/export/meuncomp.c:1.5 --- xc/programs/Xserver/XIE/mixie/export/meuncomp.c:1.4 Sun Oct 25 02:11:56 1998 +++ xc/programs/Xserver/XIE/mixie/export/meuncomp.c Wed Jan 17 17:13:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: meuncomp.c /main/5 1998/02/09 16:13:32 kaleb $ */ +/* $Xorg: meuncomp.c,v 1.3 2000/08/17 19:47:36 cpqbld Exp $ */ /**** module meuncomp.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. October 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/meuncomp.c,v 1.4 1998/10/25 07:11:56 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/meuncomp.c,v 1.5 2001/01/17 22:13:02 dawes Exp $ */ #define _XIEC_MEUNCOMP Index: xc/programs/Xserver/XIE/mixie/export/schoice.c diff -u xc/programs/Xserver/XIE/mixie/export/schoice.c:3.4 xc/programs/Xserver/XIE/mixie/export/schoice.c:3.5 --- xc/programs/Xserver/XIE/mixie/export/schoice.c:3.4 Sun Oct 25 02:11:56 1998 +++ xc/programs/Xserver/XIE/mixie/export/schoice.c Wed Jan 17 17:13:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: schoice.c /main/5 1998/02/09 16:13:38 kaleb $ */ +/* $Xorg: schoice.c,v 1.3 2000/08/17 19:47:36 cpqbld Exp $ */ /**** module schoice.c ****/ /**************************************************************************** @@ -64,7 +64,7 @@ Dean Verheiden && Robert NC Shelley AGE Logic, Inc. Jan 1994 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/schoice.c,v 3.4 1998/10/25 07:11:56 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/schoice.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ #define _XIEC_SCHOICE #define _XIEC_IPHOTO Index: xc/programs/Xserver/XIE/mixie/fax/Imakefile diff -u xc/programs/Xserver/XIE/mixie/fax/Imakefile:3.5 xc/programs/Xserver/XIE/mixie/fax/Imakefile:3.6 --- xc/programs/Xserver/XIE/mixie/fax/Imakefile:3.5 Sat Jul 25 04:05:10 1998 +++ xc/programs/Xserver/XIE/mixie/fax/Imakefile Wed Jan 17 17:13:03 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/5 1996/09/28 16:56:07 rws $ -XCOMM $XFree86: xc/programs/Xserver/XIE/mixie/fax/Imakefile,v 3.5 1998/07/25 08:05:10 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:36 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/XIE/mixie/fax/Imakefile,v 3.6 2001/01/17 22:13:03 dawes Exp $ + XCOMM build device dependent machine independent fax processing element objects #define IHaveModules Index: xc/programs/Xserver/XIE/mixie/fax/bits.h diff -u xc/programs/Xserver/XIE/mixie/fax/bits.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/fax/bits.h:1.1.1.4 --- xc/programs/Xserver/XIE/mixie/fax/bits.h:1.1.1.3 Sun Sep 27 04:37:49 1998 +++ xc/programs/Xserver/XIE/mixie/fax/bits.h Tue Jan 16 17:38:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: bits.h /main/7 1998/02/09 16:13:43 kaleb $ */ +/* $Xorg: bits.h,v 1.3 2000/08/17 19:47:36 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module fax/bits.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/fax/dg31d.c diff -u xc/programs/Xserver/XIE/mixie/fax/dg31d.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/fax/dg31d.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/fax/dg31d.c:1.1.1.2 Sun Sep 27 04:37:51 1998 +++ xc/programs/Xserver/XIE/mixie/fax/dg31d.c Tue Jan 16 17:38:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: dg31d.c /main/6 1998/02/09 16:13:48 kaleb $ */ +/* $Xorg: dg31d.c,v 1.3 2000/08/17 19:47:37 cpqbld Exp $ */ /**** module fax/dg31d.c ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/fax/dg32d.c diff -u xc/programs/Xserver/XIE/mixie/fax/dg32d.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/fax/dg32d.c:1.1.1.4 --- xc/programs/Xserver/XIE/mixie/fax/dg32d.c:1.1.1.3 Sun Sep 27 04:37:52 1998 +++ xc/programs/Xserver/XIE/mixie/fax/dg32d.c Tue Jan 16 17:38:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: dg32d.c /main/7 1998/02/09 16:13:52 kaleb $ */ +/* $Xorg: dg32d.c,v 1.3 2000/08/17 19:47:37 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module fax/dg32d.c ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/fax/dg4.c diff -u xc/programs/Xserver/XIE/mixie/fax/dg4.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/fax/dg4.c:1.1.1.4 --- xc/programs/Xserver/XIE/mixie/fax/dg4.c:1.1.1.3 Sun Sep 27 04:37:53 1998 +++ xc/programs/Xserver/XIE/mixie/fax/dg4.c Tue Jan 16 17:38:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: dg4.c /main/6 1998/02/09 16:13:57 kaleb $ */ +/* $Xorg: dg4.c,v 1.3 2000/08/17 19:47:38 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module fax/g4.c ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/fax/dtiff2.c diff -u xc/programs/Xserver/XIE/mixie/fax/dtiff2.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/fax/dtiff2.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/fax/dtiff2.c:1.1.1.2 Sun Sep 27 04:37:54 1998 +++ xc/programs/Xserver/XIE/mixie/fax/dtiff2.c Tue Jan 16 17:38:55 2001 @@ -1,4 +1,4 @@ -/* $TOG: dtiff2.c /main/4 1998/02/09 16:14:02 kaleb $ */ +/* $Xorg: dtiff2.c,v 1.3 2000/08/17 19:47:38 cpqbld Exp $ */ /**** module fax/dtiff2.c ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/fax/dtiffpb.c diff -u xc/programs/Xserver/XIE/mixie/fax/dtiffpb.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/fax/dtiffpb.c:1.1.1.4 --- xc/programs/Xserver/XIE/mixie/fax/dtiffpb.c:1.1.1.3 Sun Sep 27 04:37:54 1998 +++ xc/programs/Xserver/XIE/mixie/fax/dtiffpb.c Tue Jan 16 17:38:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: dtiffpb.c /main/5 1998/02/09 16:14:09 kaleb $ */ +/* $Xorg: dtiffpb.c,v 1.3 2000/08/17 19:47:38 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module fax/tiffpb.c ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/fax/eg31d.c diff -u xc/programs/Xserver/XIE/mixie/fax/eg31d.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/fax/eg31d.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/fax/eg31d.c:1.1.1.2 Sun Sep 27 04:37:55 1998 +++ xc/programs/Xserver/XIE/mixie/fax/eg31d.c Tue Jan 16 17:38:57 2001 @@ -1,4 +1,4 @@ -/* $TOG: eg31d.c /main/4 1998/02/09 16:14:15 kaleb $ */ +/* $Xorg: eg31d.c,v 1.3 2000/08/17 19:47:38 cpqbld Exp $ */ /**** module eg31d.c ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/fax/eg32d.c diff -u xc/programs/Xserver/XIE/mixie/fax/eg32d.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/fax/eg32d.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/fax/eg32d.c:1.1.1.2 Sun Sep 27 04:37:56 1998 +++ xc/programs/Xserver/XIE/mixie/fax/eg32d.c Tue Jan 16 17:38:59 2001 @@ -1,4 +1,4 @@ -/* $TOG: eg32d.c /main/4 1998/02/09 16:14:20 kaleb $ */ +/* $Xorg: eg32d.c,v 1.3 2000/08/17 19:47:39 cpqbld Exp $ */ /**** module eg32d.c ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/fax/etiff2.c diff -u xc/programs/Xserver/XIE/mixie/fax/etiff2.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/fax/etiff2.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/fax/etiff2.c:1.1.1.2 Sun Sep 27 04:37:58 1998 +++ xc/programs/Xserver/XIE/mixie/fax/etiff2.c Tue Jan 16 17:38:59 2001 @@ -1,4 +1,4 @@ -/* $TOG: etiff2.c /main/4 1998/02/09 16:14:25 kaleb $ */ +/* $Xorg: etiff2.c,v 1.3 2000/08/17 19:47:39 cpqbld Exp $ */ /**** module etiff2.c ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/fax/etiffpb.c diff -u xc/programs/Xserver/XIE/mixie/fax/etiffpb.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/fax/etiffpb.c:1.1.1.4 --- xc/programs/Xserver/XIE/mixie/fax/etiffpb.c:1.1.1.3 Sun Sep 27 04:37:59 1998 +++ xc/programs/Xserver/XIE/mixie/fax/etiffpb.c Tue Jan 16 17:39:00 2001 @@ -1,4 +1,4 @@ -/* $TOG: etiffpb.c /main/5 1998/02/09 16:14:34 kaleb $ */ +/* $Xorg: etiffpb.c,v 1.3 2000/08/17 19:47:39 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module etiffpb.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/fax/faxint.h diff -u xc/programs/Xserver/XIE/mixie/fax/faxint.h:1.1.1.2 xc/programs/Xserver/XIE/mixie/fax/faxint.h:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/fax/faxint.h:1.1.1.2 Sun Sep 27 04:38:00 1998 +++ xc/programs/Xserver/XIE/mixie/fax/faxint.h Tue Jan 16 17:39:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: faxint.h /main/5 1998/02/09 16:14:46 kaleb $ */ +/* $Xorg: faxint.h,v 1.3 2000/08/17 19:47:39 cpqbld Exp $ */ /**** module fax/faxint.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/fax/faxtabs.c diff -u xc/programs/Xserver/XIE/mixie/fax/faxtabs.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/fax/faxtabs.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/fax/faxtabs.c:1.1.1.2 Sun Sep 27 04:38:01 1998 +++ xc/programs/Xserver/XIE/mixie/fax/faxtabs.c Tue Jan 16 17:39:03 2001 @@ -1,4 +1,4 @@ -/* $TOG: faxtabs.c /main/6 1998/02/09 16:14:50 kaleb $ */ +/* $Xorg: faxtabs.c,v 1.3 2000/08/17 19:47:39 cpqbld Exp $ */ /**** module fax/faxtabs.c ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/fax/faxtabs.h diff -u xc/programs/Xserver/XIE/mixie/fax/faxtabs.h:1.1.1.2 xc/programs/Xserver/XIE/mixie/fax/faxtabs.h:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/fax/faxtabs.h:1.1.1.2 Sun Sep 27 04:38:11 1998 +++ xc/programs/Xserver/XIE/mixie/fax/faxtabs.h Tue Jan 16 17:39:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: faxtabs.h /main/5 1998/02/09 16:14:54 kaleb $ */ +/* $Xorg: faxtabs.h,v 1.3 2000/08/17 19:47:39 cpqbld Exp $ */ /**** module fax/bits.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/fax/fencode.h diff -u xc/programs/Xserver/XIE/mixie/fax/fencode.h:1.1.1.2 xc/programs/Xserver/XIE/mixie/fax/fencode.h:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/fax/fencode.h:1.1.1.2 Sun Sep 27 04:38:16 1998 +++ xc/programs/Xserver/XIE/mixie/fax/fencode.h Tue Jan 16 17:39:09 2001 @@ -1,4 +1,4 @@ -/* $TOG: fencode.h /main/5 1998/02/09 16:16:04 kaleb $ */ +/* $Xorg: fencode.h,v 1.3 2000/08/17 19:47:43 cpqbld Exp $ */ /**** module fencode.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/fax/fetabs.h diff -u xc/programs/Xserver/XIE/mixie/fax/fetabs.h:1.1.1.2 xc/programs/Xserver/XIE/mixie/fax/fetabs.h:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/fax/fetabs.h:1.1.1.2 Sun Sep 27 04:38:18 1998 +++ xc/programs/Xserver/XIE/mixie/fax/fetabs.h Tue Jan 16 17:39:10 2001 @@ -1,4 +1,4 @@ -/* $TOG: fetabs.h /main/4 1998/02/09 16:16:09 kaleb $ */ +/* $Xorg: fetabs.h,v 1.3 2000/08/17 19:47:43 cpqbld Exp $ */ /**** module fetabs.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/fax/gbits.h diff -u xc/programs/Xserver/XIE/mixie/fax/gbits.h:1.1.1.2 xc/programs/Xserver/XIE/mixie/fax/gbits.h:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/fax/gbits.h:1.1.1.2 Sun Sep 27 04:38:22 1998 +++ xc/programs/Xserver/XIE/mixie/fax/gbits.h Tue Jan 16 17:39:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: gbits.h /main/5 1998/02/09 16:16:13 kaleb $ */ +/* $Xorg: gbits.h,v 1.3 2000/08/17 19:47:43 cpqbld Exp $ */ /**** module fax/gbits.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/fax/zeroeven.c diff -u xc/programs/Xserver/XIE/mixie/fax/zeroeven.c:1.3 xc/programs/Xserver/XIE/mixie/fax/zeroeven.c:1.4 --- xc/programs/Xserver/XIE/mixie/fax/zeroeven.c:1.3 Sun Oct 4 05:36:11 1998 +++ xc/programs/Xserver/XIE/mixie/fax/zeroeven.c Wed Jan 17 17:13:03 2001 @@ -1,4 +1,4 @@ -/* $TOG: zeroeven.c /main/6 1998/02/09 16:16:22 kaleb $ */ +/* $Xorg: zeroeven.c,v 1.3 2000/08/17 19:47:44 cpqbld Exp $ */ /**** module fax/zeroeven.c ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/import/Imakefile diff -u xc/programs/Xserver/XIE/mixie/import/Imakefile:3.5 xc/programs/Xserver/XIE/mixie/import/Imakefile:3.6 --- xc/programs/Xserver/XIE/mixie/import/Imakefile:3.5 Sat Jul 25 04:05:11 1998 +++ xc/programs/Xserver/XIE/mixie/import/Imakefile Wed Jan 17 17:13:04 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/5 1996/09/28 16:56:13 rws $ -XCOMM $XFree86: xc/programs/Xserver/XIE/mixie/import/Imakefile,v 3.5 1998/07/25 08:05:11 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:44 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/XIE/mixie/import/Imakefile,v 3.6 2001/01/17 22:13:04 dawes Exp $ + XCOMM build device dependent machine independent import element objects #define IHaveModules Index: xc/programs/Xserver/XIE/mixie/import/miclut.c diff -u xc/programs/Xserver/XIE/mixie/import/miclut.c:3.4 xc/programs/Xserver/XIE/mixie/import/miclut.c:3.5 --- xc/programs/Xserver/XIE/mixie/import/miclut.c:3.4 Sun Oct 25 02:11:58 1998 +++ xc/programs/Xserver/XIE/mixie/import/miclut.c Wed Jan 17 17:13:04 2001 @@ -1,4 +1,4 @@ -/* $TOG: miclut.c /main/7 1998/02/09 16:16:31 kaleb $ */ +/* $Xorg: miclut.c,v 1.3 2000/08/17 19:47:44 cpqbld Exp $ */ /**** module miclut.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Ben Fahy -- AGE Logic, Inc. May, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miclut.c,v 3.4 1998/10/25 07:11:58 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miclut.c,v 3.5 2001/01/17 22:13:04 dawes Exp $ */ #define _XIEC_MICLUT #define _XIEC_ICLUT Index: xc/programs/Xserver/XIE/mixie/import/micphoto.c diff -u xc/programs/Xserver/XIE/mixie/import/micphoto.c:3.3 xc/programs/Xserver/XIE/mixie/import/micphoto.c:3.4 --- xc/programs/Xserver/XIE/mixie/import/micphoto.c:3.3 Mon Oct 5 09:22:34 1998 +++ xc/programs/Xserver/XIE/mixie/import/micphoto.c Wed Jan 17 17:13:04 2001 @@ -1,4 +1,4 @@ -/* $TOG: micphoto.c /main/9 1998/02/09 16:16:35 kaleb $ */ +/* $Xorg: micphoto.c,v 1.3 2000/08/17 19:47:44 cpqbld Exp $ */ /**** module micphoto.c ****/ /****************************************************************************** @@ -68,7 +68,7 @@ Fax stuff added by Ben Fahy *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/micphoto.c,v 3.3 1998/10/05 13:22:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/micphoto.c,v 3.4 2001/01/17 22:13:04 dawes Exp $ */ #define _XIEC_MICPHOTO #define _XIEC_ICPHOTO Index: xc/programs/Xserver/XIE/mixie/import/microi.c diff -u xc/programs/Xserver/XIE/mixie/import/microi.c:3.3 xc/programs/Xserver/XIE/mixie/import/microi.c:3.4 --- xc/programs/Xserver/XIE/mixie/import/microi.c:3.3 Mon Oct 5 09:22:35 1998 +++ xc/programs/Xserver/XIE/mixie/import/microi.c Wed Jan 17 17:13:04 2001 @@ -1,4 +1,4 @@ -/* $TOG: microi.c /main/8 1998/02/09 16:16:40 kaleb $ */ +/* $Xorg: microi.c,v 1.3 2000/08/17 19:47:45 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module microi.c ****/ /****************************************************************************** @@ -67,7 +67,7 @@ Dean Verheiden -- AGE Logic, Inc. August, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/microi.c,v 3.3 1998/10/05 13:22:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/microi.c,v 3.4 2001/01/17 22:13:04 dawes Exp $ */ #define _XIEC_MICROI Index: xc/programs/Xserver/XIE/mixie/import/midraw.c diff -u xc/programs/Xserver/XIE/mixie/import/midraw.c:3.4 xc/programs/Xserver/XIE/mixie/import/midraw.c:3.5 --- xc/programs/Xserver/XIE/mixie/import/midraw.c:3.4 Sat Sep 25 10:36:43 1999 +++ xc/programs/Xserver/XIE/mixie/import/midraw.c Wed Jan 17 17:13:04 2001 @@ -1,4 +1,4 @@ -/* $TOG: midraw.c /main/10 1998/02/09 16:16:46 kaleb $ */ +/* $Xorg: midraw.c,v 1.3 2000/08/17 19:47:45 cpqbld Exp $ */ /**** module midraw.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Larry Hare -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/midraw.c,v 3.4 1999/09/25 14:36:43 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/midraw.c,v 3.5 2001/01/17 22:13:04 dawes Exp $ */ #define _XIEC_IDRAW #define _XIEC_MIDRAW Index: xc/programs/Xserver/XIE/mixie/import/mifax.c diff -u xc/programs/Xserver/XIE/mixie/import/mifax.c:3.3 xc/programs/Xserver/XIE/mixie/import/mifax.c:3.4 --- xc/programs/Xserver/XIE/mixie/import/mifax.c:3.3 Mon Oct 5 09:22:35 1998 +++ xc/programs/Xserver/XIE/mixie/import/mifax.c Wed Jan 17 17:13:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: mifax.c /main/10 1998/02/09 16:16:51 kaleb $ */ +/* $Xorg: mifax.c,v 1.3 2000/08/17 19:47:45 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module mifax.c ****/ /****************************************************************************** @@ -69,7 +69,7 @@ Ben Fahy -- AGE Logic, Inc. July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/mifax.c,v 3.3 1998/10/05 13:22:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/mifax.c,v 3.4 2001/01/17 22:13:05 dawes Exp $ */ #define _XIEC_MICPHOTO #define _XIEC_ICPHOTO Index: xc/programs/Xserver/XIE/mixie/import/mijpeg.c diff -u xc/programs/Xserver/XIE/mixie/import/mijpeg.c:3.5 xc/programs/Xserver/XIE/mixie/import/mijpeg.c:3.6 --- xc/programs/Xserver/XIE/mixie/import/mijpeg.c:3.5 Sun Jan 31 07:21:36 1999 +++ xc/programs/Xserver/XIE/mixie/import/mijpeg.c Wed Jan 17 17:13:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: mijpeg.c /main/5 1998/02/09 16:16:55 kaleb $ */ +/* $Xorg: mijpeg.c,v 1.3 2000/08/17 19:47:45 cpqbld Exp $ */ /**** module mijpeg.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group @@ -68,7 +68,7 @@ Ben Fahy -- AGE Logic, Inc. Oct, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/mijpeg.c,v 3.5 1999/01/31 12:21:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/mijpeg.c,v 3.6 2001/01/17 22:13:05 dawes Exp $ */ #define _XIEC_MIPHOTO #define _XIEC_IPHOTO Index: xc/programs/Xserver/XIE/mixie/import/milut.c diff -u xc/programs/Xserver/XIE/mixie/import/milut.c:3.3 xc/programs/Xserver/XIE/mixie/import/milut.c:3.4 --- xc/programs/Xserver/XIE/mixie/import/milut.c:3.3 Mon Oct 5 09:22:36 1998 +++ xc/programs/Xserver/XIE/mixie/import/milut.c Wed Jan 17 17:13:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: milut.c /main/5 1998/02/09 16:17:00 kaleb $ */ +/* $Xorg: milut.c,v 1.3 2000/08/17 19:47:45 cpqbld Exp $ */ /**** module milut.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Larry Hare -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/milut.c,v 3.3 1998/10/05 13:22:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/milut.c,v 3.4 2001/01/17 22:13:05 dawes Exp $ */ #define _XIEC_ILUT #define _XIEC_MILUT Index: xc/programs/Xserver/XIE/mixie/import/miphoto.c diff -u xc/programs/Xserver/XIE/mixie/import/miphoto.c:3.3 xc/programs/Xserver/XIE/mixie/import/miphoto.c:3.4 --- xc/programs/Xserver/XIE/mixie/import/miphoto.c:3.3 Mon Oct 5 09:22:36 1998 +++ xc/programs/Xserver/XIE/mixie/import/miphoto.c Wed Jan 17 17:13:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: miphoto.c /main/8 1998/02/09 16:17:05 kaleb $ */ +/* $Xorg: miphoto.c,v 1.3 2000/08/17 19:47:45 cpqbld Exp $ */ /**** module miphoto.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. April, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miphoto.c,v 3.3 1998/10/05 13:22:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miphoto.c,v 3.4 2001/01/17 22:13:05 dawes Exp $ */ #define _XIEC_MIPHOTO #define _XIEC_IPHOTO Index: xc/programs/Xserver/XIE/mixie/import/miregion.c diff -u xc/programs/Xserver/XIE/mixie/import/miregion.c:3.5 xc/programs/Xserver/XIE/mixie/import/miregion.c:3.6 --- xc/programs/Xserver/XIE/mixie/import/miregion.c:3.5 Sun Jan 31 07:21:36 1999 +++ xc/programs/Xserver/XIE/mixie/import/miregion.c Wed Jan 17 17:13:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: miregion.c /main/5 1998/02/09 16:17:10 kaleb $ */ +/* $Xorg: miregion.c,v 1.3 2000/08/17 19:47:45 cpqbld Exp $ */ /**** module miregion.c ****/ /****************************************************************************** @@ -117,7 +117,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miregion.c,v 3.5 1999/01/31 12:21:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miregion.c,v 3.6 2001/01/17 22:13:05 dawes Exp $ */ #define _XIEC_MIREGION Index: xc/programs/Xserver/XIE/mixie/import/miroi.c diff -u xc/programs/Xserver/XIE/mixie/import/miroi.c:3.3 xc/programs/Xserver/XIE/mixie/import/miroi.c:3.4 --- xc/programs/Xserver/XIE/mixie/import/miroi.c:3.3 Mon Oct 5 09:22:37 1998 +++ xc/programs/Xserver/XIE/mixie/import/miroi.c Wed Jan 17 17:13:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: miroi.c /main/6 1998/02/09 16:17:16 kaleb $ */ +/* $Xorg: miroi.c,v 1.3 2000/08/17 19:47:45 cpqbld Exp $ */ /**** module miroi.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. April, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miroi.c,v 3.3 1998/10/05 13:22:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miroi.c,v 3.4 2001/01/17 22:13:05 dawes Exp $ */ #define _XIEC_MIROI #define _XIEC_IROI Index: xc/programs/Xserver/XIE/mixie/import/miuncomp.c diff -u xc/programs/Xserver/XIE/mixie/import/miuncomp.c:1.4 xc/programs/Xserver/XIE/mixie/import/miuncomp.c:1.5 --- xc/programs/Xserver/XIE/mixie/import/miuncomp.c:1.4 Sun Oct 25 02:11:58 1998 +++ xc/programs/Xserver/XIE/mixie/import/miuncomp.c Wed Jan 17 17:13:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: miuncomp.c /main/5 1998/02/09 16:17:20 kaleb $ */ +/* $Xorg: miuncomp.c,v 1.3 2000/08/17 19:47:45 cpqbld Exp $ */ /**** module miuncomp.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. September 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miuncomp.c,v 1.4 1998/10/25 07:11:58 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miuncomp.c,v 1.5 2001/01/17 22:13:05 dawes Exp $ */ #define _XIEC_MIUNCOMP Index: xc/programs/Xserver/XIE/mixie/include/domain.h diff -u xc/programs/Xserver/XIE/mixie/include/domain.h:1.3 xc/programs/Xserver/XIE/mixie/include/domain.h:1.4 --- xc/programs/Xserver/XIE/mixie/include/domain.h:1.3 Sun Oct 25 07:47:56 1998 +++ xc/programs/Xserver/XIE/mixie/include/domain.h Wed Jan 17 17:13:06 2001 @@ -1,4 +1,4 @@ -/* $TOG: domain.h /main/5 1998/02/09 16:17:25 kaleb $ */ +/* $Xorg: domain.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /**** module domain.h ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. August 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/include/domain.h,v 1.3 1998/10/25 12:47:56 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/include/domain.h,v 1.4 2001/01/17 22:13:06 dawes Exp $ */ #ifndef _XIEH_DOMAIN Index: xc/programs/Xserver/XIE/mixie/include/fax.h diff -u xc/programs/Xserver/XIE/mixie/include/fax.h:1.2 xc/programs/Xserver/XIE/mixie/include/fax.h:1.3 --- xc/programs/Xserver/XIE/mixie/include/fax.h:1.2 Mon Oct 5 09:22:39 1998 +++ xc/programs/Xserver/XIE/mixie/include/fax.h Wed Jan 17 17:13:06 2001 @@ -1,4 +1,4 @@ -/* $TOG: fax.h /main/6 1998/02/09 16:17:29 kaleb $ */ +/* $Xorg: fax.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /**** module fax.h ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Ben Fahy -- AGE Logic, Inc. May 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/include/fax.h,v 1.2 1998/10/05 13:22:39 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/include/fax.h,v 1.3 2001/01/17 22:13:06 dawes Exp $ */ #ifndef XFree86LOADER #include Index: xc/programs/Xserver/XIE/mixie/include/floman.h diff -u xc/programs/Xserver/XIE/mixie/include/floman.h:1.1.1.2 xc/programs/Xserver/XIE/mixie/include/floman.h:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/include/floman.h:1.1.1.2 Sun Sep 27 04:38:47 1998 +++ xc/programs/Xserver/XIE/mixie/include/floman.h Tue Jan 16 17:39:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: floman.h /main/5 1998/02/09 16:17:33 kaleb $ */ +/* $Xorg: floman.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /**** module floman.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/include/jpeg.h diff -u xc/programs/Xserver/XIE/mixie/include/jpeg.h:1.1.1.2 xc/programs/Xserver/XIE/mixie/include/jpeg.h:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/include/jpeg.h:1.1.1.2 Sun Sep 27 04:38:48 1998 +++ xc/programs/Xserver/XIE/mixie/include/jpeg.h Tue Jan 16 17:39:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: jpeg.h /main/4 1998/02/09 16:17:46 kaleb $ */ +/* $Xorg: jpeg.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group Index: xc/programs/Xserver/XIE/mixie/include/jpegd.h diff -u xc/programs/Xserver/XIE/mixie/include/jpegd.h:1.1.1.2 xc/programs/Xserver/XIE/mixie/include/jpegd.h:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/include/jpegd.h:1.1.1.2 Sun Sep 27 04:38:49 1998 +++ xc/programs/Xserver/XIE/mixie/include/jpegd.h Tue Jan 16 17:39:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: jpegd.h /main/4 1998/02/09 16:17:37 kaleb $ */ +/* $Xorg: jpegd.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group Index: xc/programs/Xserver/XIE/mixie/include/jpege.h diff -u xc/programs/Xserver/XIE/mixie/include/jpege.h:1.1.1.2 xc/programs/Xserver/XIE/mixie/include/jpege.h:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/include/jpege.h:1.1.1.2 Sun Sep 27 04:38:50 1998 +++ xc/programs/Xserver/XIE/mixie/include/jpege.h Tue Jan 16 17:39:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: jpege.h /main/4 1998/02/09 16:17:41 kaleb $ */ +/* $Xorg: jpege.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group Index: xc/programs/Xserver/XIE/mixie/include/meuncomp.h diff -u xc/programs/Xserver/XIE/mixie/include/meuncomp.h:1.3 xc/programs/Xserver/XIE/mixie/include/meuncomp.h:1.4 --- xc/programs/Xserver/XIE/mixie/include/meuncomp.h:1.3 Sun Oct 25 07:47:56 1998 +++ xc/programs/Xserver/XIE/mixie/include/meuncomp.h Wed Jan 17 17:13:06 2001 @@ -1,4 +1,4 @@ -/* $TOG: meuncomp.h /main/5 1998/02/09 16:17:50 kaleb $ */ +/* $Xorg: meuncomp.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /**** module miuncomp.h ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. October 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/include/meuncomp.h,v 1.3 1998/10/25 12:47:56 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/include/meuncomp.h,v 1.4 2001/01/17 22:13:06 dawes Exp $ */ typedef struct _meuncompdef { void (*action)(); Index: xc/programs/Xserver/XIE/mixie/include/microi.h diff -u xc/programs/Xserver/XIE/mixie/include/microi.h:1.1.1.2 xc/programs/Xserver/XIE/mixie/include/microi.h:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/include/microi.h:1.1.1.2 Sun Sep 27 04:38:52 1998 +++ xc/programs/Xserver/XIE/mixie/include/microi.h Tue Jan 16 17:39:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: microi.h /main/5 1998/02/09 16:17:54 kaleb $ */ +/* $Xorg: microi.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /**** module microi.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/include/miphoto.h diff -u xc/programs/Xserver/XIE/mixie/include/miphoto.h:1.1.1.2 xc/programs/Xserver/XIE/mixie/include/miphoto.h:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/include/miphoto.h:1.1.1.2 Sun Sep 27 04:38:53 1998 +++ xc/programs/Xserver/XIE/mixie/include/miphoto.h Tue Jan 16 17:39:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: miphoto.h /main/5 1998/02/09 16:17:58 kaleb $ */ +/* $Xorg: miphoto.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /**** module miphoto.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/include/miuncomp.h diff -u xc/programs/Xserver/XIE/mixie/include/miuncomp.h:1.3 xc/programs/Xserver/XIE/mixie/include/miuncomp.h:1.4 --- xc/programs/Xserver/XIE/mixie/include/miuncomp.h:1.3 Sun Oct 25 07:47:56 1998 +++ xc/programs/Xserver/XIE/mixie/include/miuncomp.h Wed Jan 17 17:13:07 2001 @@ -1,4 +1,4 @@ -/* $TOG: miuncomp.h /main/5 1998/02/09 16:18:02 kaleb $ */ +/* $Xorg: miuncomp.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /**** module miuncomp.h ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. September 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/include/miuncomp.h,v 1.3 1998/10/25 12:47:56 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/include/miuncomp.h,v 1.4 2001/01/17 22:13:07 dawes Exp $ */ #define MIUNCOMP_BP_ARGS \ BytePixel *src, \ Index: xc/programs/Xserver/XIE/mixie/include/mpgeom.h diff -u xc/programs/Xserver/XIE/mixie/include/mpgeom.h:1.1.1.2 xc/programs/Xserver/XIE/mixie/include/mpgeom.h:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/include/mpgeom.h:1.1.1.2 Sun Sep 27 04:38:55 1998 +++ xc/programs/Xserver/XIE/mixie/include/mpgeom.h Tue Jan 16 17:39:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: mpgeom.h /main/6 1998/02/09 16:18:07 kaleb $ */ +/* $Xorg: mpgeom.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /**** module mpgeom.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/include/mppoint.h diff -u xc/programs/Xserver/XIE/mixie/include/mppoint.h:1.1.1.2 xc/programs/Xserver/XIE/mixie/include/mppoint.h:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/include/mppoint.h:1.1.1.2 Sun Sep 27 04:38:58 1998 +++ xc/programs/Xserver/XIE/mixie/include/mppoint.h Tue Jan 16 17:39:29 2001 @@ -1,4 +1,4 @@ -/* $TOG: mppoint.h /main/5 1998/02/09 16:18:11 kaleb $ */ +/* $Xorg: mppoint.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /**** module mppoint.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/include/sched.h diff -u xc/programs/Xserver/XIE/mixie/include/sched.h:1.3 xc/programs/Xserver/XIE/mixie/include/sched.h:1.4 --- xc/programs/Xserver/XIE/mixie/include/sched.h:1.3 Sun Oct 25 07:47:57 1998 +++ xc/programs/Xserver/XIE/mixie/include/sched.h Wed Jan 17 17:13:07 2001 @@ -1,4 +1,4 @@ -/* $TOG: sched.h /main/5 1998/02/09 16:18:15 kaleb $ */ +/* $Xorg: sched.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /**** module sched.h ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. May 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/include/sched.h,v 1.3 1998/10/25 12:47:57 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/include/sched.h,v 1.4 2001/01/17 22:13:07 dawes Exp $ */ #ifndef _XIEH_SCHED #define _XIEH_SCHED Index: xc/programs/Xserver/XIE/mixie/include/strip.h diff -u xc/programs/Xserver/XIE/mixie/include/strip.h:1.1.1.2 xc/programs/Xserver/XIE/mixie/include/strip.h:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/include/strip.h:1.1.1.2 Sun Sep 27 04:39:02 1998 +++ xc/programs/Xserver/XIE/mixie/include/strip.h Tue Jan 16 17:39:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: strip.h /main/6 1998/02/09 16:18:19 kaleb $ */ +/* $Xorg: strip.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /**** module strip.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/include/tex.h diff -u xc/programs/Xserver/XIE/mixie/include/tex.h:1.3 xc/programs/Xserver/XIE/mixie/include/tex.h:1.4 --- xc/programs/Xserver/XIE/mixie/include/tex.h:1.3 Sun Oct 25 07:47:57 1998 +++ xc/programs/Xserver/XIE/mixie/include/tex.h Wed Jan 17 17:13:07 2001 @@ -1,4 +1,4 @@ -/* $TOG: tex.h /main/5 1998/02/09 16:18:29 kaleb $ */ +/* $Xorg: tex.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /**** module tex.h ****/ /**************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/include/tex.h,v 1.3 1998/10/25 12:47:57 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/include/tex.h,v 1.4 2001/01/17 22:13:07 dawes Exp $ */ #ifndef _XIEH_TEX #define _XIEH_TEX Index: xc/programs/Xserver/XIE/mixie/include/texstr.h diff -u xc/programs/Xserver/XIE/mixie/include/texstr.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/include/texstr.h:1.1.1.4 --- xc/programs/Xserver/XIE/mixie/include/texstr.h:1.1.1.3 Sun Sep 27 04:39:07 1998 +++ xc/programs/Xserver/XIE/mixie/include/texstr.h Tue Jan 16 17:39:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: texstr.h /main/7 1998/02/09 16:18:24 kaleb $ */ +/* $Xorg: texstr.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /**** module texstr.h ****/ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/include/xiemd.h diff -u xc/programs/Xserver/XIE/mixie/include/xiemd.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/include/xiemd.h:1.1.1.4 --- xc/programs/Xserver/XIE/mixie/include/xiemd.h:1.1.1.3 Sun Sep 27 04:39:09 1998 +++ xc/programs/Xserver/XIE/mixie/include/xiemd.h Tue Jan 16 17:39:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: xiemd.h /main/9 1998/02/09 16:18:34 kaleb $ */ +/* $Xorg: xiemd.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module xiemd.h ****/ /****************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/Imakefile diff -u xc/programs/Xserver/XIE/mixie/jpeg/Imakefile:3.5 xc/programs/Xserver/XIE/mixie/jpeg/Imakefile:3.6 --- xc/programs/Xserver/XIE/mixie/jpeg/Imakefile:3.5 Sat Jul 25 04:05:11 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/Imakefile Wed Jan 17 17:13:07 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/8 1996/09/28 16:56:19 rws $ -XCOMM $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/Imakefile,v 3.5 1998/07/25 08:05:11 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/Imakefile,v 3.6 2001/01/17 22:13:07 dawes Exp $ + XCOMM build device dependent machine independent fax processing element objects #define IHaveModules Index: xc/programs/Xserver/XIE/mixie/jpeg/README diff -u xc/programs/Xserver/XIE/mixie/jpeg/README:1.1.1.1 xc/programs/Xserver/XIE/mixie/jpeg/README:1.1.1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/README:1.1.1.1 Wed Apr 27 03:18:43 1994 +++ xc/programs/Xserver/XIE/mixie/jpeg/README Tue Jan 16 17:39:32 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: README,v 1.2 93/11/07 10:25:48 rws Exp $ */ +/* $Xorg: README,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ The Independent JPEG Group's JPEG software ========================================== Index: xc/programs/Xserver/XIE/mixie/jpeg/jcdeflts.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jcdeflts.c:1.3 xc/programs/Xserver/XIE/mixie/jpeg/jcdeflts.c:1.4 --- xc/programs/Xserver/XIE/mixie/jpeg/jcdeflts.c:1.3 Sun Oct 4 05:36:19 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jcdeflts.c Wed Jan 17 17:13:07 2001 @@ -1,4 +1,4 @@ -/* $TOG: jcdeflts.c /main/5 1998/02/09 16:18:43 kaleb $ */ +/* $Xorg: jcdeflts.c,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /* Module jcdeflts.c */ /**************************************************************************** @@ -66,7 +66,7 @@ Gary Rogers, AGE Logic, Inc., January 1994 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jcdeflts.c,v 1.3 1998/10/04 09:36:19 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jcdeflts.c,v 1.4 2001/01/17 22:13:07 dawes Exp $ */ /* * jcdeflts.c * Index: xc/programs/Xserver/XIE/mixie/jpeg/jcexpand.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jcexpand.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/jpeg/jcexpand.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/jpeg/jcexpand.c:1.1.1.2 Sun Sep 27 04:39:50 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jcexpand.c Tue Jan 16 17:39:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: jcexpand.c /main/5 1998/02/09 16:18:49 kaleb $ */ +/* $Xorg: jcexpand.c,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ /* Module jcexpand.c */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jchuff.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jchuff.c:1.3 xc/programs/Xserver/XIE/mixie/jpeg/jchuff.c:1.4 --- xc/programs/Xserver/XIE/mixie/jpeg/jchuff.c:1.3 Sun Oct 4 05:36:19 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jchuff.c Wed Jan 17 17:13:07 2001 @@ -1,4 +1,4 @@ -/* $TOG: jchuff.c /main/5 1998/02/09 16:18:53 kaleb $ */ +/* $Xorg: jchuff.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ /* Module jchuff.c */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jcmcu.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jcmcu.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/jpeg/jcmcu.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/jpeg/jcmcu.c:1.1.1.2 Sun Sep 27 04:39:52 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jcmcu.c Tue Jan 16 17:39:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: jcmcu.c /main/5 1998/02/09 16:18:58 kaleb $ */ +/* $Xorg: jcmcu.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ /* Module jcmcu.c */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jconfig.h diff -u xc/programs/Xserver/XIE/mixie/jpeg/jconfig.h:1.5 xc/programs/Xserver/XIE/mixie/jpeg/jconfig.h:1.6 --- xc/programs/Xserver/XIE/mixie/jpeg/jconfig.h:1.5 Tue Sep 19 08:46:09 2000 +++ xc/programs/Xserver/XIE/mixie/jpeg/jconfig.h Wed Jan 17 17:13:08 2001 @@ -1,4 +1,4 @@ -/* $TOG: jconfig.h /main/5 1998/02/09 16:19:03 kaleb $ */ +/* $Xorg: jconfig.h,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ /* Module jconfig.h */ /**************************************************************************** @@ -66,7 +66,7 @@ Gary Rogers, AGE Logic, Inc., January 1994 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jconfig.h,v 1.5 2000/09/19 12:46:09 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jconfig.h,v 1.6 2001/01/17 22:13:08 dawes Exp $ */ /* * jconfig.h Index: xc/programs/Xserver/XIE/mixie/jpeg/jcsample.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jcsample.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/jpeg/jcsample.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/jpeg/jcsample.c:1.1.1.2 Sun Sep 27 04:39:55 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jcsample.c Tue Jan 16 17:39:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: jcsample.c /main/5 1998/02/09 16:19:08 kaleb $ */ +/* $Xorg: jcsample.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ /* Module jcsample.c */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jcxie.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jcxie.c:1.3 xc/programs/Xserver/XIE/mixie/jpeg/jcxie.c:1.4 --- xc/programs/Xserver/XIE/mixie/jpeg/jcxie.c:1.3 Sun Oct 4 05:36:20 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jcxie.c Wed Jan 17 17:13:08 2001 @@ -1,4 +1,4 @@ -/* $TOG: jcxie.c /main/5 1998/02/09 16:19:18 kaleb $ */ +/* $Xorg: jcxie.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ /* Module jcxie.c */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jcxief.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jcxief.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/jpeg/jcxief.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/jpeg/jcxief.c:1.1.1.2 Sun Sep 27 04:39:57 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jcxief.c Tue Jan 16 17:39:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: jcxief.c /main/5 1998/02/09 16:19:13 kaleb $ */ +/* $Xorg: jcxief.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ /* Module jcxief.c */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jdbuffer.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jdbuffer.c:1.3 xc/programs/Xserver/XIE/mixie/jpeg/jdbuffer.c:1.4 --- xc/programs/Xserver/XIE/mixie/jpeg/jdbuffer.c:1.3 Sun Oct 4 05:36:21 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jdbuffer.c Wed Jan 17 17:13:08 2001 @@ -1,4 +1,4 @@ -/* $TOG: jdbuffer.c /main/6 1998/02/09 16:19:23 kaleb $ */ +/* $Xorg: jdbuffer.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ /*** jdbuffer.c - transfer data from input strip to decode buffer */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jddeflts.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jddeflts.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/jpeg/jddeflts.c:1.1.1.4 --- xc/programs/Xserver/XIE/mixie/jpeg/jddeflts.c:1.1.1.3 Sun Sep 27 04:39:59 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jddeflts.c Tue Jan 16 17:39:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: jddeflts.c /main/6 1998/02/09 16:19:27 kaleb $ */ +/* $Xorg: jddeflts.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /* Module jddeflts.c */ Index: xc/programs/Xserver/XIE/mixie/jpeg/jdhuff.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jdhuff.c:1.3 xc/programs/Xserver/XIE/mixie/jpeg/jdhuff.c:1.4 --- xc/programs/Xserver/XIE/mixie/jpeg/jdhuff.c:1.3 Sun Oct 4 05:36:21 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jdhuff.c Wed Jan 17 17:13:08 2001 @@ -1,4 +1,4 @@ -/* $TOG: jdhuff.c /main/6 1998/02/09 16:19:31 kaleb $ */ +/* $Xorg: jdhuff.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /* Module jdhuff.c */ Index: xc/programs/Xserver/XIE/mixie/jpeg/jdlossy.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jdlossy.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/jpeg/jdlossy.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/jpeg/jdlossy.c:1.1.1.2 Sun Sep 27 04:40:01 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jdlossy.c Tue Jan 16 17:39:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: jdlossy.c /main/5 1998/02/09 16:19:36 kaleb $ */ +/* $Xorg: jdlossy.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ /* Module jdlossy.c */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jdmcu.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jdmcu.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/jpeg/jdmcu.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/jpeg/jdmcu.c:1.1.1.2 Sun Sep 27 04:40:02 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jdmcu.c Tue Jan 16 17:39:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: jdmcu.c /main/5 1998/02/09 16:19:40 kaleb $ */ +/* $Xorg: jdmcu.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ /* Module jdmcu.c */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jdsample.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jdsample.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/jpeg/jdsample.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/jpeg/jdsample.c:1.1.1.2 Sun Sep 27 04:40:03 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jdsample.c Tue Jan 16 17:39:38 2001 @@ -1,4 +1,4 @@ -/* $TOG: jdsample.c /main/5 1998/02/09 16:19:45 kaleb $ */ +/* $Xorg: jdsample.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ /* Module jdsample.c */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jdxie.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jdxie.c:1.3 xc/programs/Xserver/XIE/mixie/jpeg/jdxie.c:1.4 --- xc/programs/Xserver/XIE/mixie/jpeg/jdxie.c:1.3 Sun Oct 4 05:36:22 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jdxie.c Wed Jan 17 17:13:08 2001 @@ -1,4 +1,4 @@ -/* $TOG: jdxie.c /main/5 1998/02/09 16:19:54 kaleb $ */ +/* $Xorg: jdxie.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ /* Module jdxie.c */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jdxief.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jdxief.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/jpeg/jdxief.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/jpeg/jdxief.c:1.1.1.2 Sun Sep 27 04:40:05 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jdxief.c Tue Jan 16 17:39:39 2001 @@ -1,4 +1,4 @@ -/* $TOG: jdxief.c /main/5 1998/02/09 16:19:50 kaleb $ */ +/* $Xorg: jdxief.c,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ /* Module jdxief.c */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jelossy.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jelossy.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/jpeg/jelossy.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/jpeg/jelossy.c:1.1.1.2 Sun Sep 27 04:40:06 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jelossy.c Tue Jan 16 17:39:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: jelossy.c /main/5 1998/02/09 16:19:59 kaleb $ */ +/* $Xorg: jelossy.c,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ /* Module jelossy.c */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jfwddct.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jfwddct.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/jpeg/jfwddct.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/jpeg/jfwddct.c:1.1.1.2 Sun Sep 27 04:40:07 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jfwddct.c Tue Jan 16 17:39:40 2001 @@ -1,4 +1,4 @@ -/* $TOG: jfwddct.c /main/5 1998/02/09 16:20:04 kaleb $ */ +/* $Xorg: jfwddct.c,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ /* Module jfwddct.c */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jinclude.h diff -u xc/programs/Xserver/XIE/mixie/jpeg/jinclude.h:1.5 xc/programs/Xserver/XIE/mixie/jpeg/jinclude.h:1.6 --- xc/programs/Xserver/XIE/mixie/jpeg/jinclude.h:1.5 Sun Jan 31 07:21:37 1999 +++ xc/programs/Xserver/XIE/mixie/jpeg/jinclude.h Wed Jan 17 17:13:08 2001 @@ -1,4 +1,4 @@ -/* $TOG: jinclude.h /main/7 1998/02/09 16:20:08 kaleb $ */ +/* $Xorg: jinclude.h,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ /* Module jinclude.h */ /**************************************************************************** @@ -66,7 +66,7 @@ Gary Rogers, AGE Logic, Inc., January 1994 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jinclude.h,v 1.5 1999/01/31 12:21:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jinclude.h,v 1.6 2001/01/17 22:13:08 dawes Exp $ */ /* * jinclude.h Index: xc/programs/Xserver/XIE/mixie/jpeg/jmemmgr.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jmemmgr.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/jpeg/jmemmgr.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/jpeg/jmemmgr.c:1.1.1.2 Sun Sep 27 04:40:09 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jmemmgr.c Tue Jan 16 17:39:41 2001 @@ -1,4 +1,4 @@ -/* $TOG: jmemmgr.c /main/5 1998/02/09 16:20:13 kaleb $ */ +/* $Xorg: jmemmgr.c,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ /* Module jmemmgr.c */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.c:3.2 xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.c:3.3 --- xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.c:3.2 Sun Oct 4 05:36:23 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.c Wed Jan 17 17:13:09 2001 @@ -1,4 +1,4 @@ -/* $TOG: jmemsys.c /main/5 1998/02/09 16:20:19 kaleb $ */ +/* $Xorg: jmemsys.c,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ /* Module jmemsys.c */ /**************************************************************************** @@ -66,7 +66,7 @@ Gary Rogers, AGE Logic, Inc., January 1994 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.c,v 3.2 1998/10/04 09:36:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.c,v 3.3 2001/01/17 22:13:09 dawes Exp $ */ /* * jmemnobs.c (jmemsys.c) Index: xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.h diff -u xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.h:1.1.1.2 xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.h:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.h:1.1.1.2 Sun Sep 27 04:40:13 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.h Tue Jan 16 17:39:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: jmemsys.h /main/5 1998/02/09 16:20:23 kaleb $ */ +/* $Xorg: jmemsys.h,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ /* Module jmemsys.h */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jpegdata.h diff -u xc/programs/Xserver/XIE/mixie/jpeg/jpegdata.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/jpeg/jpegdata.h:1.1.1.4 --- xc/programs/Xserver/XIE/mixie/jpeg/jpegdata.h:1.1.1.3 Sun Sep 27 04:40:14 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jpegdata.h Tue Jan 16 17:39:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: jpegdata.h /main/6 1998/02/09 16:20:27 kaleb $ */ +/* $Xorg: jpegdata.h,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /* Module jpegdata.h */ Index: xc/programs/Xserver/XIE/mixie/jpeg/jrdjfif.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jrdjfif.c:1.3 xc/programs/Xserver/XIE/mixie/jpeg/jrdjfif.c:1.4 --- xc/programs/Xserver/XIE/mixie/jpeg/jrdjfif.c:1.3 Sun Oct 4 05:36:23 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jrdjfif.c Wed Jan 17 17:13:09 2001 @@ -1,4 +1,4 @@ -/* $TOG: jrdjfif.c /main/6 1998/02/09 16:20:33 kaleb $ */ +/* $Xorg: jrdjfif.c,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /* Module jrdjfif.c */ @@ -66,7 +66,7 @@ Gary Rogers, AGE Logic, Inc., October 1993 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jrdjfif.c,v 1.3 1998/10/04 09:36:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jrdjfif.c,v 1.4 2001/01/17 22:13:09 dawes Exp $ */ /* * jrdjfif.c Index: xc/programs/Xserver/XIE/mixie/jpeg/jrevdct.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jrevdct.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/jpeg/jrevdct.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/jpeg/jrevdct.c:1.1.1.2 Sun Sep 27 04:40:16 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jrevdct.c Tue Jan 16 17:39:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: jrevdct.c /main/5 1998/02/09 16:20:38 kaleb $ */ +/* $Xorg: jrevdct.c,v 1.3 2000/08/17 19:47:49 cpqbld Exp $ */ /* Module jrevdct.c */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jutils.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jutils.c:1.3 xc/programs/Xserver/XIE/mixie/jpeg/jutils.c:1.4 --- xc/programs/Xserver/XIE/mixie/jpeg/jutils.c:1.3 Sun Oct 4 05:36:24 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jutils.c Wed Jan 17 17:13:09 2001 @@ -1,4 +1,4 @@ -/* $TOG: jutils.c /main/5 1998/02/09 16:20:43 kaleb $ */ +/* $Xorg: jutils.c,v 1.3 2000/08/17 19:47:49 cpqbld Exp $ */ /* Module jutils.c */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/jpeg/jwrjfif.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jwrjfif.c:1.1.1.2 xc/programs/Xserver/XIE/mixie/jpeg/jwrjfif.c:1.1.1.3 --- xc/programs/Xserver/XIE/mixie/jpeg/jwrjfif.c:1.1.1.2 Sun Sep 27 04:40:18 1998 +++ xc/programs/Xserver/XIE/mixie/jpeg/jwrjfif.c Tue Jan 16 17:39:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: jwrjfif.c /main/5 1998/02/09 16:20:48 kaleb $ */ +/* $Xorg: jwrjfif.c,v 1.3 2000/08/17 19:47:49 cpqbld Exp $ */ /* Module jwrjfif.c */ /**************************************************************************** Index: xc/programs/Xserver/XIE/mixie/process/Imakefile diff -u xc/programs/Xserver/XIE/mixie/process/Imakefile:3.5 xc/programs/Xserver/XIE/mixie/process/Imakefile:3.6 --- xc/programs/Xserver/XIE/mixie/process/Imakefile:3.5 Sat Jul 25 04:05:13 1998 +++ xc/programs/Xserver/XIE/mixie/process/Imakefile Wed Jan 17 17:13:10 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/5 1996/09/28 16:56:25 rws $ -XCOMM $XFree86: xc/programs/Xserver/XIE/mixie/process/Imakefile,v 3.5 1998/07/25 08:05:13 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:49 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/XIE/mixie/process/Imakefile,v 3.6 2001/01/17 22:13:10 dawes Exp $ + XCOMM build device dependent machine independent process element objs #define IHaveModules Index: xc/programs/Xserver/XIE/mixie/process/bitfun.c diff -u xc/programs/Xserver/XIE/mixie/process/bitfun.c:1.3 xc/programs/Xserver/XIE/mixie/process/bitfun.c:1.4 --- xc/programs/Xserver/XIE/mixie/process/bitfun.c:1.3 Tue Oct 6 06:35:19 1998 +++ xc/programs/Xserver/XIE/mixie/process/bitfun.c Wed Jan 17 17:13:10 2001 @@ -1,4 +1,4 @@ -/* $TOG: bitfun.c /main/6 1998/02/09 16:20:58 kaleb $ */ +/* $Xorg: bitfun.c,v 1.3 2000/08/17 19:47:49 cpqbld Exp $ */ /**** module bitfun.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Larry Hare -- AGE Logic, Inc. July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/bitfun.c,v 1.3 1998/10/06 10:35:19 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/bitfun.c,v 1.4 2001/01/17 22:13:10 dawes Exp $ */ #define _XIEC_MPBITFUN Index: xc/programs/Xserver/XIE/mixie/process/mparith.c diff -u xc/programs/Xserver/XIE/mixie/process/mparith.c:3.3 xc/programs/Xserver/XIE/mixie/process/mparith.c:3.4 --- xc/programs/Xserver/XIE/mixie/process/mparith.c:3.3 Mon Oct 5 09:22:40 1998 +++ xc/programs/Xserver/XIE/mixie/process/mparith.c Wed Jan 17 17:13:10 2001 @@ -1,4 +1,4 @@ -/* $TOG: mparith.c /main/7 1998/02/09 16:21:07 kaleb $ */ +/* $Xorg: mparith.c,v 1.5 2000/08/17 19:47:49 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module mparith.c ****/ /****************************************************************************** @@ -67,7 +67,7 @@ Larry Hare -- AGE Logic, Inc. August, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mparith.c,v 3.3 1998/10/05 13:22:40 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mparith.c,v 3.4 2001/01/17 22:13:10 dawes Exp $ */ #define _XIEC_MPARITH @@ -1081,7 +1081,7 @@ if (!act && !raw->src2) act = action_monoROI[iclass][raw->operator-1]; - /* Or maybe a monadic look up table operator */ + /* Or maybe a monadic look up table op */ if (!act && !raw->src2) { act = action_lut[iclass]; if (act) { Index: xc/programs/Xserver/XIE/mixie/process/mpbandc.c diff -u xc/programs/Xserver/XIE/mixie/process/mpbandc.c:3.3 xc/programs/Xserver/XIE/mixie/process/mpbandc.c:3.4 --- xc/programs/Xserver/XIE/mixie/process/mpbandc.c:3.3 Mon Oct 5 09:22:41 1998 +++ xc/programs/Xserver/XIE/mixie/process/mpbandc.c Wed Jan 17 17:13:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: mpbandc.c /main/6 1998/02/09 16:21:13 kaleb $ */ +/* $Xorg: mpbandc.c,v 1.3 2000/08/17 19:47:49 cpqbld Exp $ */ /**** module mpbandc.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpbandc.c,v 3.3 1998/10/05 13:22:41 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpbandc.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ #define _XIEC_MPBANDC #define _XIEC_PBANDC Index: xc/programs/Xserver/XIE/mixie/process/mpbande.c diff -u xc/programs/Xserver/XIE/mixie/process/mpbande.c:3.3 xc/programs/Xserver/XIE/mixie/process/mpbande.c:3.4 --- xc/programs/Xserver/XIE/mixie/process/mpbande.c:3.3 Mon Oct 5 09:22:41 1998 +++ xc/programs/Xserver/XIE/mixie/process/mpbande.c Wed Jan 17 17:13:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: mpbande.c /main/6 1998/02/09 16:21:17 kaleb $ */ +/* $Xorg: mpbande.c,v 1.3 2000/08/17 19:47:49 cpqbld Exp $ */ /**** module mpbande.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpbande.c,v 3.3 1998/10/05 13:22:41 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpbande.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ #define _XIEC_MPBANDE #define _XIEC_PBANDE Index: xc/programs/Xserver/XIE/mixie/process/mpbands.c diff -u xc/programs/Xserver/XIE/mixie/process/mpbands.c:3.3 xc/programs/Xserver/XIE/mixie/process/mpbands.c:3.4 --- xc/programs/Xserver/XIE/mixie/process/mpbands.c:3.3 Mon Oct 5 09:22:41 1998 +++ xc/programs/Xserver/XIE/mixie/process/mpbands.c Wed Jan 17 17:13:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: mpbands.c /main/5 1998/02/09 16:21:21 kaleb $ */ +/* $Xorg: mpbands.c,v 1.3 2000/08/17 19:47:49 cpqbld Exp $ */ /**** module mpbands.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. September, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpbands.c,v 3.3 1998/10/05 13:22:41 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpbands.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ #define _XIEC_MPBANDS #define _XIEC_PBANDS Index: xc/programs/Xserver/XIE/mixie/process/mpblend.c diff -u xc/programs/Xserver/XIE/mixie/process/mpblend.c:3.3 xc/programs/Xserver/XIE/mixie/process/mpblend.c:3.4 --- xc/programs/Xserver/XIE/mixie/process/mpblend.c:3.3 Mon Oct 5 09:22:41 1998 +++ xc/programs/Xserver/XIE/mixie/process/mpblend.c Wed Jan 17 17:13:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: mpblend.c /main/7 1998/02/09 16:21:26 kaleb $ */ +/* $Xorg: mpblend.c,v 1.3 2000/08/17 19:47:50 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module mpblend.c ****/ /****************************************************************************** @@ -67,7 +67,7 @@ Dean Verheiden -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpblend.c,v 3.3 1998/10/05 13:22:41 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpblend.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ #define _XIEC_MPBLEND #define _XIEC_PBLEND Index: xc/programs/Xserver/XIE/mixie/process/mpcfromi.c diff -u xc/programs/Xserver/XIE/mixie/process/mpcfromi.c:3.3 xc/programs/Xserver/XIE/mixie/process/mpcfromi.c:3.4 --- xc/programs/Xserver/XIE/mixie/process/mpcfromi.c:3.3 Mon Oct 5 09:22:42 1998 +++ xc/programs/Xserver/XIE/mixie/process/mpcfromi.c Wed Jan 17 17:13:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: mpcfromi.c /main/6 1998/02/09 16:21:31 kaleb $ */ +/* $Xorg: mpcfromi.c,v 1.3 2000/08/17 19:47:50 cpqbld Exp $ */ /**** module mpcfromi.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Robert NC Shelley -- AGE Logic, Inc. July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpcfromi.c,v 3.3 1998/10/05 13:22:42 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpcfromi.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ #define _XIEC_MPCFROMI #define _XIEC_PCFROMI Index: xc/programs/Xserver/XIE/mixie/process/mpcnst.c diff -u xc/programs/Xserver/XIE/mixie/process/mpcnst.c:3.3 xc/programs/Xserver/XIE/mixie/process/mpcnst.c:3.4 --- xc/programs/Xserver/XIE/mixie/process/mpcnst.c:3.3 Mon Oct 5 09:22:42 1998 +++ xc/programs/Xserver/XIE/mixie/process/mpcnst.c Wed Jan 17 17:13:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: mpcnst.c /main/7 1998/02/09 16:21:36 kaleb $ */ +/* $Xorg: mpcnst.c,v 1.3 2000/08/17 19:47:50 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module mpcnst.c ****/ /****************************************************************************** @@ -67,7 +67,7 @@ Dean Verheiden && Larry Hare -- AGE Logic, Inc. May, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpcnst.c,v 3.3 1998/10/05 13:22:42 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpcnst.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ #define _XIEC_MPCNST Index: xc/programs/Xserver/XIE/mixie/process/mpcomp.c diff -u xc/programs/Xserver/XIE/mixie/process/mpcomp.c:3.3 xc/programs/Xserver/XIE/mixie/process/mpcomp.c:3.4 --- xc/programs/Xserver/XIE/mixie/process/mpcomp.c:3.3 Mon Oct 5 09:22:43 1998 +++ xc/programs/Xserver/XIE/mixie/process/mpcomp.c Wed Jan 17 17:13:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: mpcomp.c /main/5 1998/02/09 16:21:43 kaleb $ */ +/* $Xorg: mpcomp.c,v 1.5 2000/08/17 19:47:51 cpqbld Exp $ */ /**** module mpcomp.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Larry Hare -- AGE Logic, Inc. August, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpcomp.c,v 3.3 1998/10/05 13:22:43 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpcomp.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ #define _XIEC_MPCOMP Index: xc/programs/Xserver/XIE/mixie/process/mpconv.c diff -u xc/programs/Xserver/XIE/mixie/process/mpconv.c:3.3 xc/programs/Xserver/XIE/mixie/process/mpconv.c:3.4 --- xc/programs/Xserver/XIE/mixie/process/mpconv.c:3.3 Mon Oct 5 09:22:43 1998 +++ xc/programs/Xserver/XIE/mixie/process/mpconv.c Wed Jan 17 17:13:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: mpconv.c /main/7 1998/02/09 16:21:49 kaleb $ */ +/* $Xorg: mpconv.c,v 1.3 2000/08/17 19:47:51 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module mpconv.c ****/ /****************************************************************************** @@ -67,7 +67,7 @@ Dean Verheiden && Robert NC Shelley -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpconv.c,v 3.3 1998/10/05 13:22:43 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpconv.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ #define _XIEC_MPCONV Index: xc/programs/Xserver/XIE/mixie/process/mpctoi.c diff -u xc/programs/Xserver/XIE/mixie/process/mpctoi.c:3.4 xc/programs/Xserver/XIE/mixie/process/mpctoi.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mpctoi.c:3.4 Thu Oct 5 17:59:29 2000 +++ xc/programs/Xserver/XIE/mixie/process/mpctoi.c Wed Jan 17 17:13:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: mpctoi.c /main/9 1998/02/09 16:21:54 kaleb $ */ +/* $Xorg: mpctoi.c,v 1.3 2000/08/17 19:47:51 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module mpctoi.c ****/ /****************************************************************************** @@ -67,7 +67,7 @@ Robert NC Shelley -- AGE Logic, Inc. July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpctoi.c,v 3.4 2000/10/05 21:59:29 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpctoi.c,v 3.5 2001/01/17 22:13:11 dawes Exp $ */ #define _XIEC_MPCTOI #define _XIEC_PCTOI Index: xc/programs/Xserver/XIE/mixie/process/mpdither.c diff -u xc/programs/Xserver/XIE/mixie/process/mpdither.c:3.3 xc/programs/Xserver/XIE/mixie/process/mpdither.c:3.4 --- xc/programs/Xserver/XIE/mixie/process/mpdither.c:3.3 Mon Oct 5 09:22:44 1998 +++ xc/programs/Xserver/XIE/mixie/process/mpdither.c Wed Jan 17 17:13:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: mpdither.c /main/7 1998/02/09 16:21:59 kaleb $ */ +/* $Xorg: mpdither.c,v 1.3 2000/08/17 19:47:51 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module mpdither.c ****/ /****************************************************************************** @@ -67,7 +67,7 @@ Larry Hare -- AGE Logic, Inc. May, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpdither.c,v 3.3 1998/10/05 13:22:44 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpdither.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ #define _XIEC_MPDITHER Index: xc/programs/Xserver/XIE/mixie/process/mpgeom.c diff -u xc/programs/Xserver/XIE/mixie/process/mpgeom.c:1.3 xc/programs/Xserver/XIE/mixie/process/mpgeom.c:1.4 --- xc/programs/Xserver/XIE/mixie/process/mpgeom.c:1.3 Tue Oct 6 06:35:19 1998 +++ xc/programs/Xserver/XIE/mixie/process/mpgeom.c Wed Jan 17 17:13:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: mpgeom.c /main/5 1998/02/09 16:22:16 kaleb $ */ +/* $Xorg: mpgeom.c,v 1.3 2000/08/17 19:47:52 cpqbld Exp $ */ /**** module mpgeom.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Ben Fahy -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpgeom.c,v 1.3 1998/10/06 10:35:19 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpgeom.c,v 1.4 2001/01/17 22:13:11 dawes Exp $ */ #define _XIEC_MPGEOM Index: xc/programs/Xserver/XIE/mixie/process/mpgeomaa.c diff -u xc/programs/Xserver/XIE/mixie/process/mpgeomaa.c:3.4 xc/programs/Xserver/XIE/mixie/process/mpgeomaa.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mpgeomaa.c:3.4 Mon Oct 5 09:22:44 1998 +++ xc/programs/Xserver/XIE/mixie/process/mpgeomaa.c Wed Jan 17 17:13:11 2001 @@ -1,4 +1,4 @@ -/* $TOG: mpgeomaa.c /main/9 1998/02/09 16:22:04 kaleb $ */ +/* $Xorg: mpgeomaa.c,v 1.3 2000/08/17 19:47:52 cpqbld Exp $ */ /**** module mpgeomaa.c ****/ /****************************************************************************** @@ -67,7 +67,7 @@ Ben Fahy && Larry Hare -- AGE Logic, Inc. July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpgeomaa.c,v 3.4 1998/10/05 13:22:44 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpgeomaa.c,v 3.5 2001/01/17 22:13:11 dawes Exp $ */ #define _XIEC_MPGEOM Index: xc/programs/Xserver/XIE/mixie/process/mpgeomnn.c diff -u xc/programs/Xserver/XIE/mixie/process/mpgeomnn.c:3.3 xc/programs/Xserver/XIE/mixie/process/mpgeomnn.c:3.4 --- xc/programs/Xserver/XIE/mixie/process/mpgeomnn.c:3.3 Mon Oct 5 09:22:45 1998 +++ xc/programs/Xserver/XIE/mixie/process/mpgeomnn.c Wed Jan 17 17:13:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: mpgeomnn.c /main/9 1998/02/09 16:22:10 kaleb $ */ +/* $Xorg: mpgeomnn.c,v 1.3 2000/08/17 19:47:53 cpqbld Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module mpgeomnn.c ****/ /****************************************************************************** @@ -73,7 +73,7 @@ Ben Fahy && Larry Hare -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpgeomnn.c,v 3.3 1998/10/05 13:22:45 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpgeomnn.c,v 3.4 2001/01/17 22:13:12 dawes Exp $ */ #define _XIEC_MPGEOM Index: xc/programs/Xserver/XIE/mixie/process/mphist.c diff -u xc/programs/Xserver/XIE/mixie/process/mphist.c:3.3 xc/programs/Xserver/XIE/mixie/process/mphist.c:3.4 --- xc/programs/Xserver/XIE/mixie/process/mphist.c:3.3 Mon Oct 5 09:22:45 1998 +++ xc/programs/Xserver/XIE/mixie/process/mphist.c Wed Jan 17 17:13:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: mphist.c /main/5 1998/02/09 16:22:20 kaleb $ */ +/* $Xorg: mphist.c,v 1.3 2000/08/17 19:47:53 cpqbld Exp $ */ /**** module mphist.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Larry Hare -- AGE Logic, Inc. August, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mphist.c,v 3.3 1998/10/05 13:22:45 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mphist.c,v 3.4 2001/01/17 22:13:12 dawes Exp $ */ #define _XIEC_MPHIST #define _XIEC_PHIST Index: xc/programs/Xserver/XIE/mixie/process/mplogic.c diff -u xc/programs/Xserver/XIE/mixie/process/mplogic.c:3.3 xc/programs/Xserver/XIE/mixie/process/mplogic.c:3.4 --- xc/programs/Xserver/XIE/mixie/process/mplogic.c:3.3 Mon Oct 5 09:22:46 1998 +++ xc/programs/Xserver/XIE/mixie/process/mplogic.c Wed Jan 17 17:13:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: mplogic.c /main/9 1998/02/09 16:22:25 kaleb $ */ +/* $Xorg: mplogic.c,v 1.5 2000/08/17 19:47:53 cpqbld Exp $ */ /**** module mplogic.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Larry Hare -- AGE Logic, Inc. July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mplogic.c,v 3.3 1998/10/05 13:22:46 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mplogic.c,v 3.4 2001/01/17 22:13:12 dawes Exp $ */ #define _XIEC_MPLOGIC Index: xc/programs/Xserver/XIE/mixie/process/mppaste.c diff -u xc/programs/Xserver/XIE/mixie/process/mppaste.c:3.3 xc/programs/Xserver/XIE/mixie/process/mppaste.c:3.4 --- xc/programs/Xserver/XIE/mixie/process/mppaste.c:3.3 Mon Oct 5 09:22:46 1998 +++ xc/programs/Xserver/XIE/mixie/process/mppaste.c Wed Jan 17 17:13:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: mppaste.c /main/7 1998/02/09 16:22:30 kaleb $ */ +/* $Xorg: mppaste.c,v 1.3 2000/08/17 19:47:53 cpqbld Exp $ */ /**** module mppaste.c ****/ /****************************************************************************** @@ -67,7 +67,7 @@ July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mppaste.c,v 3.3 1998/10/05 13:22:46 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mppaste.c,v 3.4 2001/01/17 22:13:12 dawes Exp $ */ #define _XIEC_MPPASTE #define _XIEC_PPASTE Index: xc/programs/Xserver/XIE/mixie/process/mppoint.c diff -u xc/programs/Xserver/XIE/mixie/process/mppoint.c:3.3 xc/programs/Xserver/XIE/mixie/process/mppoint.c:3.4 --- xc/programs/Xserver/XIE/mixie/process/mppoint.c:3.3 Mon Oct 5 09:22:46 1998 +++ xc/programs/Xserver/XIE/mixie/process/mppoint.c Wed Jan 17 17:13:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: mppoint.c /main/6 1998/02/09 16:22:35 kaleb $ */ +/* $Xorg: mppoint.c,v 1.3 2000/08/17 19:47:54 cpqbld Exp $ */ /**** module mppoint.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Larry Hare -- AGE Logic, Inc. May, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mppoint.c,v 3.3 1998/10/05 13:22:46 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mppoint.c,v 3.4 2001/01/17 22:13:12 dawes Exp $ */ #define _XIEC_MPPOINT Index: xc/programs/Xserver/XIE/mixie/process/mprgb.c diff -u xc/programs/Xserver/XIE/mixie/process/mprgb.c:3.3 xc/programs/Xserver/XIE/mixie/process/mprgb.c:3.4 --- xc/programs/Xserver/XIE/mixie/process/mprgb.c:3.3 Mon Oct 5 09:22:47 1998 +++ xc/programs/Xserver/XIE/mixie/process/mprgb.c Wed Jan 17 17:13:12 2001 @@ -1,4 +1,4 @@ -/* $TOG: mprgb.c /main/7 1998/02/09 16:22:40 kaleb $ */ +/* $Xorg: mprgb.c,v 1.3 2000/08/17 19:47:54 cpqbld Exp $ */ /**** module mprgb.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Larry Hare -- AGE Logic, Inc. August, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mprgb.c,v 3.3 1998/10/05 13:22:47 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mprgb.c,v 3.4 2001/01/17 22:13:12 dawes Exp $ */ #define _XIEC_MPRGB Index: xc/programs/Xserver/XIE/mixie/process/mpuncnst.c diff -u xc/programs/Xserver/XIE/mixie/process/mpuncnst.c:3.3 xc/programs/Xserver/XIE/mixie/process/mpuncnst.c:3.4 --- xc/programs/Xserver/XIE/mixie/process/mpuncnst.c:3.3 Mon Oct 5 09:22:47 1998 +++ xc/programs/Xserver/XIE/mixie/process/mpuncnst.c Wed Jan 17 17:13:13 2001 @@ -1,4 +1,4 @@ -/* $TOG: mpuncnst.c /main/6 1998/02/09 16:22:46 kaleb $ */ +/* $Xorg: mpuncnst.c,v 1.3 2000/08/17 19:47:54 cpqbld Exp $ */ /**** module mpuncnst.c ****/ /****************************************************************************** @@ -66,7 +66,7 @@ Dean Verheiden && Larry Hare -- AGE Logic, Inc. May, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpuncnst.c,v 3.3 1998/10/05 13:22:47 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpuncnst.c,v 3.4 2001/01/17 22:13:13 dawes Exp $ */ #define _XIEC_MPUNCNST Index: xc/programs/Xserver/Xext/EVI.c diff -u xc/programs/Xserver/Xext/EVI.c:3.5 xc/programs/Xserver/Xext/EVI.c:3.6 --- xc/programs/Xserver/Xext/EVI.c:3.5 Sun Oct 4 04:15:25 1998 +++ xc/programs/Xserver/Xext/EVI.c Wed Jan 17 17:13:14 2001 @@ -1,4 +1,4 @@ -/* $TOG: EVI.c /main/3 1998/01/23 15:19:47 kaleb $ */ +/* $Xorg: EVI.c,v 1.3 2000/08/17 19:47:55 cpqbld Exp $ */ /************************************************************ Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. Permission to use, copy, modify, and distribute this Index: xc/programs/Xserver/Xext/EVIstruct.h diff -u xc/programs/Xserver/Xext/EVIstruct.h:3.3 xc/programs/Xserver/Xext/EVIstruct.h:3.4 --- xc/programs/Xserver/Xext/EVIstruct.h:3.3 Sun Oct 4 04:15:26 1998 +++ xc/programs/Xserver/Xext/EVIstruct.h Wed Jan 17 17:13:14 2001 @@ -1,4 +1,4 @@ -/* $TOG: EVIstruct.h /main/1 1997/11/24 16:48:35 kaleb $ */ +/* $Xorg: EVIstruct.h,v 1.3 2000/08/17 19:47:55 cpqbld Exp $ */ /************************************************************ Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. Permission to use, copy, modify, and distribute this Index: xc/programs/Xserver/Xext/Imakefile diff -u xc/programs/Xserver/Xext/Imakefile:3.36 xc/programs/Xserver/Xext/Imakefile:3.40 --- xc/programs/Xserver/Xext/Imakefile:3.36 Tue Aug 15 12:05:32 2000 +++ xc/programs/Xserver/Xext/Imakefile Sun Mar 4 23:51:55 2001 @@ -1,6 +1,10 @@ -XCOMM $TOG: Imakefile /main/63 1997/11/24 16:48:40 kaleb $ -XCOMM $XFree86: xc/programs/Xserver/Xext/Imakefile,v 3.36 2000/08/15 16:05:32 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:55 cpqbld Exp $ + + + +XCOMM $XFree86: xc/programs/Xserver/Xext/Imakefile,v 3.40 2001/03/05 04:51:55 mvojkovi Exp $ + #include #if DoLoadableServer @@ -32,7 +36,7 @@ SCRNSAVOBJ = saver.o #endif -#if BuildXF86VidModeExt +#if BuildXF86VidModeExt && XF86Server VIDMODESRCS = xf86vmode.c VIDMODEOBJS = xf86vmode.o #endif @@ -56,8 +60,8 @@ #endif #if BuildXvExt - XVSRCS = xvmain.c xvdisp.c - XVOBJS = xvmain.o xvdisp.o + XVSRCS = xvmain.c xvdisp.c xvmc.c + XVOBJS = xvmain.o xvdisp.o xvmc.o #endif #if BuildAppgroup @@ -77,7 +81,7 @@ #if BuildXinerama PNRXSRCS = panoramiX.c panoramiXSwap.c panoramiXprocs.c PNRXOBJS = panoramiX.o panoramiXSwap.o panoramiXprocs.o - PNRXINCLUDES = -I$(FONTINCSRC) -I../mi + PNRXINCLUDES = -I$(FONTINCSRC) -I../mi -I../render #endif #if BuildDPMS DPMSSRCS = dpms.c Index: xc/programs/Xserver/Xext/SecurityPolicy diff -u xc/programs/Xserver/Xext/SecurityPolicy:1.1.1.1 xc/programs/Xserver/Xext/SecurityPolicy:1.1.1.2 --- xc/programs/Xserver/Xext/SecurityPolicy:1.1.1.1 Sat Dec 21 23:01:30 1996 +++ xc/programs/Xserver/Xext/SecurityPolicy Tue Jan 16 17:39:55 2001 @@ -1,6 +1,6 @@ version-1 -# $XConsortium: SecurityPolicy /main/3 1996/12/20 20:27:48 swick $ +# $Xorg: SecurityPolicy,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ # The site policy fields are interpreted by the XC-QUERY-SECURITY-1 # authorization protocol. The values are arbitrary and site-specific. Index: xc/programs/Xserver/Xext/appgroup.c diff -u xc/programs/Xserver/Xext/appgroup.c:1.3 xc/programs/Xserver/Xext/appgroup.c:1.4 --- xc/programs/Xserver/Xext/appgroup.c:1.3 Fri Aug 11 19:59:47 2000 +++ xc/programs/Xserver/Xext/appgroup.c Wed Jan 17 17:13:14 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/appgroup.c,v 1.3 2000/08/11 23:59:47 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/appgroup.c,v 1.4 2001/01/17 22:13:14 dawes Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -20,7 +20,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $TOG: appgroup.c /main/21 1998/02/09 15:23:40 kaleb $ */ +/* $Xorg: appgroup.c,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ */ #define NEED_REPLIES #define NEED_EVENTS Index: xc/programs/Xserver/Xext/bigreq.c diff -u xc/programs/Xserver/Xext/bigreq.c:3.3 xc/programs/Xserver/Xext/bigreq.c:3.4 --- xc/programs/Xserver/Xext/bigreq.c:3.3 Sun Oct 4 05:36:44 1998 +++ xc/programs/Xserver/Xext/bigreq.c Wed Jan 17 17:13:14 2001 @@ -1,4 +1,4 @@ -/* $TOG: bigreq.c /main/6 1998/02/09 15:23:47 kaleb $ */ +/* $Xorg: bigreq.c,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/Xext/bigreq.c,v 3.3 1998/10/04 09:36:44 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/bigreq.c,v 3.4 2001/01/17 22:13:14 dawes Exp $ */ #define NEED_EVENTS #include "X.h" Index: xc/programs/Xserver/Xext/cup.c diff -u xc/programs/Xserver/Xext/cup.c:1.5 xc/programs/Xserver/Xext/cup.c:1.6 --- xc/programs/Xserver/Xext/cup.c:1.5 Sun Dec 6 08:30:39 1998 +++ xc/programs/Xserver/Xext/cup.c Wed Jan 17 17:13:14 2001 @@ -1,4 +1,4 @@ -/* $TOG: cup.c /main/3 1998/02/09 15:23:52 kaleb $ */ +/* $Xorg: cup.c,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ */ /* Copyright 1997, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/Xserver/Xext/cup.c,v 1.5 1998/12/06 13:30:39 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/cup.c,v 1.6 2001/01/17 22:13:14 dawes Exp $ */ #define NEED_REPLIES #define NEED_EVENTS Index: xc/programs/Xserver/Xext/dpms.c diff -u xc/programs/Xserver/Xext/dpms.c:3.7 xc/programs/Xserver/Xext/dpms.c:3.8 --- xc/programs/Xserver/Xext/dpms.c:3.7 Fri Aug 11 17:12:43 2000 +++ xc/programs/Xserver/Xext/dpms.c Wed Jan 17 17:13:14 2001 @@ -1,3 +1,4 @@ +/* $Xorg: dpms.c,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ */ /***************************************************************** Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts. @@ -32,7 +33,7 @@ * @(#)RCSfile: dpms.c,v Revision: 1.1.4.5 (DEC) Date: 1996/03/04 15:27:00 */ -/* $XFree86: xc/programs/Xserver/Xext/dpms.c,v 3.7 2000/08/11 21:12:43 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/dpms.c,v 3.8 2001/01/17 22:13:14 dawes Exp $ */ #include "X.h" #include "Xproto.h" Index: xc/programs/Xserver/Xext/dpmsstubs.c diff -u xc/programs/Xserver/Xext/dpmsstubs.c:3.3 xc/programs/Xserver/Xext/dpmsstubs.c:3.4 --- xc/programs/Xserver/Xext/dpmsstubs.c:3.3 Wed Dec 15 21:26:23 1999 +++ xc/programs/Xserver/Xext/dpmsstubs.c Wed Jan 17 17:13:15 2001 @@ -1,6 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/dpmsstubs.c,v 3.3 1999/12/16 02:26:23 robin Exp $ */ - -/* $TOG: dpmsstubs.c /main/3 1997/11/14 11:08:23 kaleb $ */ +/* $Xorg: dpmsstubs.c,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ */ /***************************************************************** Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts. @@ -28,6 +26,7 @@ Equipment Corporation. ******************************************************************/ +/* $XFree86: xc/programs/Xserver/Xext/dpmsstubs.c,v 3.4 2001/01/17 22:13:15 dawes Exp $ */ typedef int Bool; Index: xc/programs/Xserver/Xext/mbuf.c diff -u xc/programs/Xserver/Xext/mbuf.c:3.9 xc/programs/Xserver/Xext/mbuf.c:3.10 --- xc/programs/Xserver/Xext/mbuf.c:3.9 Tue Jan 18 11:35:37 2000 +++ xc/programs/Xserver/Xext/mbuf.c Wed Jan 17 17:13:15 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/mbuf.c,v 3.9 2000/01/18 16:35:37 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/mbuf.c,v 3.10 2001/01/17 22:13:15 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -21,7 +21,7 @@ ********************************************************/ -/* $TOG: mbuf.c /main/27 1998/02/26 12:04:55 barstow $ */ +/* $Xorg: mbuf.c,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ */ #define NEED_REPLIES #define NEED_EVENTS #include "X.h" Index: xc/programs/Xserver/Xext/mbufbf.c diff -u xc/programs/Xserver/Xext/mbufbf.c:3.1 xc/programs/Xserver/Xext/mbufbf.c:3.2 --- xc/programs/Xserver/Xext/mbufbf.c:3.1 Sun Oct 4 05:36:45 1998 +++ xc/programs/Xserver/Xext/mbufbf.c Wed Jan 17 17:13:15 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/mbufbf.c,v 3.1 1998/10/04 09:36:45 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/mbufbf.c,v 3.2 2001/01/17 22:13:15 dawes Exp $ */ /* Copyright 1989, 1998 The Open Group @@ -21,7 +21,7 @@ */ -/* $TOG: mbufbf.c /main/6 1998/02/09 15:24:17 kaleb $ */ +/* $Xorg: mbufbf.c,v 1.3 2000/08/17 19:47:57 cpqbld Exp $ */ #define NEED_REPLIES #define NEED_EVENTS Index: xc/programs/Xserver/Xext/mbufpx.c diff -u xc/programs/Xserver/Xext/mbufpx.c:3.1 xc/programs/Xserver/Xext/mbufpx.c:3.2 --- xc/programs/Xserver/Xext/mbufpx.c:3.1 Sun Oct 4 05:36:46 1998 +++ xc/programs/Xserver/Xext/mbufpx.c Wed Jan 17 17:13:15 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/mbufpx.c,v 3.1 1998/10/04 09:36:46 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/mbufpx.c,v 3.2 2001/01/17 22:13:15 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -21,7 +21,7 @@ ********************************************************/ -/* $TOG: mbufpx.c /main/6 1998/02/09 15:24:22 kaleb $ */ +/* $Xorg: mbufpx.c,v 1.3 2000/08/17 19:47:57 cpqbld Exp $ */ #define NEED_REPLIES #define NEED_EVENTS #include Index: xc/programs/Xserver/Xext/mitmisc.c diff -u xc/programs/Xserver/Xext/mitmisc.c:3.2 xc/programs/Xserver/Xext/mitmisc.c:3.3 --- xc/programs/Xserver/Xext/mitmisc.c:3.2 Sun Oct 4 05:36:46 1998 +++ xc/programs/Xserver/Xext/mitmisc.c Wed Jan 17 17:13:15 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/mitmisc.c,v 3.2 1998/10/04 09:36:46 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/mitmisc.c,v 3.3 2001/01/17 22:13:15 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -23,7 +23,7 @@ /* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ -/* $TOG: mitmisc.c /main/6 1998/02/09 15:24:34 kaleb $ */ +/* $Xorg: mitmisc.c,v 1.3 2000/08/17 19:47:57 cpqbld Exp $ */ #define NEED_EVENTS #include "X.h" Index: xc/programs/Xserver/Xext/panoramiX.c diff -u xc/programs/Xserver/Xext/panoramiX.c:3.23.2.1 xc/programs/Xserver/Xext/panoramiX.c:3.25 --- xc/programs/Xserver/Xext/panoramiX.c:3.23.2.1 Thu Mar 8 21:26:52 2001 +++ xc/programs/Xserver/Xext/panoramiX.c Wed Jan 17 17:13:15 2001 @@ -1,25 +1,29 @@ -/* $TOG: panoramiX.c /main/5 1998/02/27 12:22:22 barstow $ */ -/**************************************************************** -* * -* Copyright (c) Digital Equipment Corporation, 1991, 1997 * -* * -* All Rights Reserved. Unpublished rights reserved under * -* the copyright laws of the United States. * -* * -* The software contained on this media is proprietary to * -* and embodies the confidential technology of Digital * -* Equipment Corporation. Possession, use, duplication or * -* dissemination of the software and media is authorized only * -* pursuant to a valid written license from Digital Equipment * -* Corporation. * -* * -* RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure * -* by the U.S. Government is subject to restrictions as set * -* forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, * -* or in FAR 52.227-19, as applicable. * -* * -*****************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/panoramiX.c,v 3.23.2.1 2001/03/09 02:26:52 keithp Exp $ */ +/* $Xorg: panoramiX.c,v 1.5 2000/08/17 19:47:57 cpqbld Exp $ */ +/***************************************************************** +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. +******************************************************************/ +/* $XFree86: xc/programs/Xserver/Xext/panoramiX.c,v 3.25 2001/01/17 22:13:15 dawes Exp $ */ #define NEED_REPLIES #include @@ -43,6 +47,10 @@ #include "globals.h" #include "servermd.h" #include "resource.h" +#ifdef RENDER +#include "picturestr.h" +#endif + static unsigned char PanoramiXReqCode = 0; /* @@ -614,7 +622,6 @@ #ifdef RENDER PanoramiXRenderInit (); #endif - return; } extern @@ -864,6 +871,9 @@ { int i; +#ifdef RENDER + PanoramiXRenderReset (); +#endif screenInfo.numScreens = PanoramiXNumScreens; for (i = 256; i--; ) ProcVector[i] = SavedProcVector[i]; Index: xc/programs/Xserver/Xext/panoramiX.h diff -u xc/programs/Xserver/Xext/panoramiX.h:1.4.2.1 xc/programs/Xserver/Xext/panoramiX.h:1.5 --- xc/programs/Xserver/Xext/panoramiX.h:1.4.2.1 Thu Mar 8 21:26:52 2001 +++ xc/programs/Xserver/Xext/panoramiX.h Tue Jan 2 21:54:17 2001 @@ -19,7 +19,7 @@ * or in FAR 52.227-19, as applicable. * * * *****************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/panoramiX.h,v 1.4.2.1 2001/03/09 02:26:52 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/panoramiX.h,v 1.5 2001/01/03 02:54:17 keithp Exp $ */ /* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */ Index: xc/programs/Xserver/Xext/panoramiXSwap.c diff -u xc/programs/Xserver/Xext/panoramiXSwap.c:3.6 xc/programs/Xserver/Xext/panoramiXSwap.c:3.7 --- xc/programs/Xserver/Xext/panoramiXSwap.c:3.6 Sun Feb 27 18:15:30 2000 +++ xc/programs/Xserver/Xext/panoramiXSwap.c Wed Jan 17 17:13:15 2001 @@ -1,25 +1,29 @@ -/* $TOG: panoramiXSwap.c /main/1 1997/10/29 13:26:35 kaleb $ */ -/**************************************************************** -* * -* Copyright (c) Digital Equipment Corporation, 1991, 1997 * -* * -* All Rights Reserved. Unpublished rights reserved under * -* the copyright laws of the United States. * -* * -* The software contained on this media is proprietary to * -* and embodies the confidential technology of Digital * -* Equipment Corporation. Possession, use, duplication or * -* dissemination of the software and media is authorized only * -* pursuant to a valid written license from Digital Equipment * -* Corporation. * -* * -* RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure * -* by the U.S. Government is subject to restrictions as set * -* forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, * -* or in FAR 52.227-19, as applicable. * -* * -*****************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/panoramiXSwap.c,v 3.6 2000/02/27 23:15:30 mvojkovi Exp $ */ +/* $Xorg: panoramiXSwap.c,v 1.4 2000/08/17 19:47:57 cpqbld Exp $ */ +/***************************************************************** +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. +******************************************************************/ +/* $XFree86: xc/programs/Xserver/Xext/panoramiXSwap.c,v 3.7 2001/01/17 22:13:15 dawes Exp $ */ #include #include "X.h" Index: xc/programs/Xserver/Xext/panoramiXprocs.c diff -u xc/programs/Xserver/Xext/panoramiXprocs.c:3.27 xc/programs/Xserver/Xext/panoramiXprocs.c:3.28 --- xc/programs/Xserver/Xext/panoramiXprocs.c:3.27 Sat Apr 8 15:18:54 2000 +++ xc/programs/Xserver/Xext/panoramiXprocs.c Wed Jan 17 17:13:15 2001 @@ -1,28 +1,32 @@ -/* $TOG: panoramiXprocs.c /main/9 1998/03/17 06:51:10 kaleb $ */ -/**************************************************************** -* * -* Copyright (c) Digital Equipment Corporation, 1991, 1997 * -* * -* All Rights Reserved. Unpublished rights reserved under * -* the copyright laws of the United States. * -* * -* The software contained on this media is proprietary to * -* and embodies the confidential technology of Digital * -* Equipment Corporation. Possession, use, duplication or * -* dissemination of the software and media is authorized only * -* pursuant to a valid written license from Digital Equipment * -* Corporation. * -* * -* RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure * -* by the U.S. Government is subject to restrictions as set * -* forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, * -* or in FAR 52.227-19, as applicable. * -* * -*****************************************************************/ +/* $Xorg: panoramiXprocs.c,v 1.5 2000/08/17 19:47:57 cpqbld Exp $ */ +/***************************************************************** +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. +******************************************************************/ + /* Massively rewritten by Mark Vojkovich */ -/* $XFree86: xc/programs/Xserver/Xext/panoramiXprocs.c,v 3.27 2000/04/08 19:18:54 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/panoramiXprocs.c,v 3.28 2001/01/17 22:13:15 dawes Exp $ */ #include #include "X.h" Index: xc/programs/Xserver/Xext/panoramiXsrv.h diff -u xc/programs/Xserver/Xext/panoramiXsrv.h:1.6 xc/programs/Xserver/Xext/panoramiXsrv.h:1.7 --- xc/programs/Xserver/Xext/panoramiXsrv.h:1.6 Thu Mar 30 13:20:35 2000 +++ xc/programs/Xserver/Xext/panoramiXsrv.h Tue Jan 2 21:54:17 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/panoramiXsrv.h,v 1.6 2000/03/30 18:20:35 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/panoramiXsrv.h,v 1.7 2001/01/03 02:54:17 keithp Exp $ */ #ifndef _PANORAMIXSRV_H_ #define _PANORAMIXSRV_H_ Index: xc/programs/Xserver/Xext/sampleEVI.c diff -u xc/programs/Xserver/Xext/sampleEVI.c:3.3 xc/programs/Xserver/Xext/sampleEVI.c:3.4 --- xc/programs/Xserver/Xext/sampleEVI.c:3.3 Sun Oct 4 04:15:30 1998 +++ xc/programs/Xserver/Xext/sampleEVI.c Wed Jan 17 17:13:16 2001 @@ -1,4 +1,4 @@ -/* $TOG: sampleEVI.c /main/2 1997/11/24 17:03:42 kaleb $ */ +/* $Xorg: sampleEVI.c,v 1.3 2000/08/17 19:47:58 cpqbld Exp $ */ /************************************************************ Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. Permission to use, copy, modify, and distribute this Index: xc/programs/Xserver/Xext/security.c diff -u xc/programs/Xserver/Xext/security.c:1.5 xc/programs/Xserver/Xext/security.c:1.6 --- xc/programs/Xserver/Xext/security.c:1.5 Thu Aug 10 13:40:30 2000 +++ xc/programs/Xserver/Xext/security.c Wed Jan 17 17:13:16 2001 @@ -1,4 +1,4 @@ -/* $TOG: security.c /main/15 1998/02/09 15:25:09 kaleb $ */ +/* $Xorg: security.c,v 1.3 2000/08/17 19:47:58 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -20,7 +20,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/Xserver/Xext/security.c,v 1.5 2000/08/10 17:40:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/security.c,v 1.6 2001/01/17 22:13:16 dawes Exp $ */ #include "dixstruct.h" #include "extnsionst.h" Index: xc/programs/Xserver/Xext/shape.c diff -u xc/programs/Xserver/Xext/shape.c:3.12 xc/programs/Xserver/Xext/shape.c:3.13.2.1 --- xc/programs/Xserver/Xext/shape.c:3.12 Tue Oct 24 18:45:03 2000 +++ xc/programs/Xserver/Xext/shape.c Thu May 31 12:33:38 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/shape.c,v 3.12 2000/10/24 22:45:03 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/shape.c,v 3.13.2.1 2001/05/31 16:33:38 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -21,7 +21,7 @@ ********************************************************/ -/* $TOG: shape.c /main/39 1998/02/09 15:25:16 kaleb $ */ +/* $Xorg: shape.c,v 1.3 2000/08/17 19:47:58 cpqbld Exp $ */ #define NEED_REPLIES #define NEED_EVENTS #include "X.h" @@ -206,7 +206,31 @@ REGION_DESTROY(pScreen, srcRgn); return Success; } - switch (op) { + + /* May/30/2001: + * The shape.PS specs say if src is None, existing shape is to be + * removed (and so the op-code has no meaning in such removal); + * see shape.PS, page 3, ShapeMask. + */ + if (srcRgn == NULL) { + if (*destRgnp != NULL) { + REGION_DESTROY (pScreen, *destRgnp); + *destRgnp = 0; + /* go on to remove shape and generate ShapeNotify */ + } + else { + /* May/30/2001: + * The target currently has no shape in effect, so nothing to + * do here. The specs say that ShapeNotify is generated whenever + * the client region is "modified"; since no modification is done + * here, we do not generate that event. The specs does not say + * "it is an error to request removal when there is no shape in + * effect", so we return good status. + */ + return Success; + } + } + else switch (op) { case ShapeSet: if (*destRgnp) REGION_DESTROY(pScreen, *destRgnp); Index: xc/programs/Xserver/Xext/shm.c diff -u xc/programs/Xserver/Xext/shm.c:3.27 xc/programs/Xserver/Xext/shm.c:3.29 --- xc/programs/Xserver/Xext/shm.c:3.27 Thu Aug 10 13:40:30 2000 +++ xc/programs/Xserver/Xext/shm.c Tue May 1 13:03:35 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/shm.c,v 3.27 2000/08/10 17:40:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/shm.c,v 3.29 2001/05/01 17:03:35 alanh Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -23,15 +23,11 @@ /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ -/* $TOG: shm.c /main/27 1998/02/09 15:25:23 kaleb $ */ +/* $Xorg: shm.c,v 1.3 2000/08/17 19:47:58 cpqbld Exp $ */ #include #ifndef Lynx -#ifndef __CYGWIN__ #include -#else -#include -#endif #include #else #include Index: xc/programs/Xserver/Xext/sleepuntil.c diff -u xc/programs/Xserver/Xext/sleepuntil.c:3.1 xc/programs/Xserver/Xext/sleepuntil.c:3.2 --- xc/programs/Xserver/Xext/sleepuntil.c:3.1 Sun Oct 4 05:36:49 1998 +++ xc/programs/Xserver/Xext/sleepuntil.c Wed Jan 17 17:13:18 2001 @@ -1,5 +1,5 @@ /* - * $TOG: sleepuntil.c /main/6 1998/02/09 15:25:28 kaleb $ + * $Xorg: sleepuntil.c,v 1.3 2000/08/17 19:47:58 cpqbld Exp $ * Copyright 1992, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/Xext/sleepuntil.c,v 3.1 1998/10/04 09:36:49 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/sleepuntil.c,v 3.2 2001/01/17 22:13:18 dawes Exp $ */ /* dixsleep.c - implement millisecond timeouts for X clients */ Index: xc/programs/Xserver/Xext/sync.c diff -u xc/programs/Xserver/Xext/sync.c:3.7 xc/programs/Xserver/Xext/sync.c:3.8 --- xc/programs/Xserver/Xext/sync.c:3.7 Sat Mar 6 08:12:22 1999 +++ xc/programs/Xserver/Xext/sync.c Wed Jan 17 17:13:18 2001 @@ -1,4 +1,4 @@ -/* $TOG: sync.c /main/14 1998/02/09 15:25:33 kaleb $ */ +/* $Xorg: sync.c,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ */ /* Copyright 1991, 1993, 1998 The Open Group @@ -46,7 +46,7 @@ PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/Xext/sync.c,v 3.7 1999/03/06 13:12:22 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/sync.c,v 3.8 2001/01/17 22:13:18 dawes Exp $ */ #define NEED_REPLIES #define NEED_EVENTS Index: xc/programs/Xserver/Xext/vidmodeproc.h diff -u xc/programs/Xserver/Xext/vidmodeproc.h:1.4 xc/programs/Xserver/Xext/vidmodeproc.h:1.5 --- xc/programs/Xserver/Xext/vidmodeproc.h:1.4 Sun Dec 12 20:39:40 1999 +++ xc/programs/Xserver/Xext/vidmodeproc.h Sat May 5 20:51:19 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/vidmodeproc.h,v 1.4 1999/12/13 01:39:40 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/vidmodeproc.h,v 1.5 2001/05/06 00:51:19 mvojkovi Exp $ */ /* Prototypes for DGA functions that the DDX must provide */ @@ -65,6 +65,9 @@ int VidModeGetModeValue(pointer mode, int valtyp); void VidModeSetModeValue(pointer mode, int valtyp, int val); vidMonitorValue VidModeGetMonitorValue(pointer monitor, int valtyp, int indx); +Bool VidModeSetGammaRamp(int, int, CARD16 *, CARD16 *, CARD16 *); +Bool VidModeGetGammaRamp(int, int, CARD16 *, CARD16 *, CARD16 *); +int VidModeGetGammaRampSize(int scrnIndex); #endif Index: xc/programs/Xserver/Xext/xcmisc.c diff -u xc/programs/Xserver/Xext/xcmisc.c:3.3 xc/programs/Xserver/Xext/xcmisc.c:3.4 --- xc/programs/Xserver/Xext/xcmisc.c:3.3 Sun Oct 4 05:36:50 1998 +++ xc/programs/Xserver/Xext/xcmisc.c Wed Jan 17 17:13:19 2001 @@ -1,4 +1,4 @@ -/* $TOG: xcmisc.c /main/6 1998/02/09 15:25:40 kaleb $ */ +/* $Xorg: xcmisc.c,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ */ /* Copyright 1993, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/Xext/xcmisc.c,v 3.3 1998/10/04 09:36:50 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xcmisc.c,v 3.4 2001/01/17 22:13:19 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES Index: xc/programs/Xserver/Xext/xf86bigfont.c diff -u xc/programs/Xserver/Xext/xf86bigfont.c:1.10 xc/programs/Xserver/Xext/xf86bigfont.c:1.12 --- xc/programs/Xserver/Xext/xf86bigfont.c:1.10 Thu Aug 10 13:40:30 2000 +++ xc/programs/Xserver/Xext/xf86bigfont.c Tue May 1 13:29:59 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86bigfont.c,v 1.10 2000/08/10 17:40:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xf86bigfont.c,v 1.12 2001/05/01 17:29:59 alanh Exp $ */ /* * BIGFONT extension for sharing font metrics between clients (if possible) * and for transmitting font metrics to clients in a compressed form. @@ -37,7 +37,8 @@ #include #ifdef HAS_SHM -#if defined(linux) && !defined(__GNU_LIBRARY__) +#if defined(linux) && (!defined(__GNU_LIBRARY__) || __GNU_LIBRARY__ < 2) +/* libc4 does not define __GNU_LIBRARY__, libc5 defines __GNU_LIBRARY__ as 1 */ /* Linux libc4 and libc5 only (because glibc doesn't include kernel headers): Linux 2.0.x and 2.2.x define SHMLBA as PAGE_SIZE, but forget to define PAGE_SIZE. It is defined in . */ @@ -163,7 +164,7 @@ FontShmdescIndex = AllocateFontPrivateIndex(); -#if !defined(CSRG_BASED) +#if !defined(CSRG_BASED) && !defined(__CYGWIN__) pagesize = SHMLBA; #else # ifdef _SC_PAGESIZE Index: xc/programs/Xserver/Xext/xf86vmode.c diff -u xc/programs/Xserver/Xext/xf86vmode.c:3.50 xc/programs/Xserver/Xext/xf86vmode.c:3.52 --- xc/programs/Xserver/Xext/xf86vmode.c:3.50 Sun Dec 12 20:39:40 1999 +++ xc/programs/Xserver/Xext/xf86vmode.c Sat May 5 20:51:19 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86vmode.c,v 3.50 1999/12/13 01:39:40 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xf86vmode.c,v 3.52 2001/05/06 00:51:19 mvojkovi Exp $ */ /* @@ -29,7 +29,7 @@ from Kaleb S. KEITHLEY */ -/* $TOG: xf86vmode.c /main/27 1998/02/09 15:25:44 kaleb $ */ +/* $Xorg: xf86vmode.c,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ */ /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ #define NEED_REPLIES @@ -87,6 +87,9 @@ static DISPATCH_PROC(ProcXF86VidModeSetGamma); static DISPATCH_PROC(ProcXF86VidModeGetGamma); static DISPATCH_PROC(ProcXF86VidModeSetClientVersion); +static DISPATCH_PROC(ProcXF86VidModeGetGammaRamp); +static DISPATCH_PROC(ProcXF86VidModeSetGammaRamp); +static DISPATCH_PROC(ProcXF86VidModeGetGammaRampSize); static DISPATCH_PROC(SProcXF86VidModeDispatch); static DISPATCH_PROC(SProcXF86VidModeGetAllModeLines); static DISPATCH_PROC(SProcXF86VidModeGetModeLine); @@ -105,6 +108,9 @@ static DISPATCH_PROC(SProcXF86VidModeSetGamma); static DISPATCH_PROC(SProcXF86VidModeGetGamma); static DISPATCH_PROC(SProcXF86VidModeSetClientVersion); +static DISPATCH_PROC(SProcXF86VidModeGetGammaRamp); +static DISPATCH_PROC(SProcXF86VidModeSetGammaRamp); +static DISPATCH_PROC(SProcXF86VidModeGetGammaRampSize); static unsigned char XF86VidModeReqCode = 0; @@ -442,6 +448,9 @@ } rep.sequenceNumber = client->sequence; + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + if (!VidModeGetCurrentModeline(stuff->screen, &mode, &dotClock)) return BadValue; @@ -529,6 +538,11 @@ DEBUG_P("XF86VidModeGetAllModelines"); + REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq); + + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + ver = ClientMajorVersion(client); modecount = VidModeGetNumOfModes(stuff->screen); @@ -538,7 +552,6 @@ if (!VidModeGetFirstModeline(stuff->screen, &mode, &dotClock)) return BadValue; - REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq); rep.type = X_Reply; rep.length = SIZEOF(xXF86VidModeGetAllModeLinesReply) - SIZEOF(xGenericReply); @@ -690,6 +703,9 @@ if (len != stuff->privsize) return BadLength; + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + if (stuff->hsyncstart < stuff->hdisplay || stuff->hsyncend < stuff->hsyncstart || stuff->htotal < stuff->hsyncend || @@ -830,6 +846,9 @@ return BadLength; } + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + if (!VidModeGetCurrentModeline(stuff->screen, &mode, &dotClock)) return BadValue; @@ -941,6 +960,9 @@ stuff->vtotal < stuff->vsyncend) return BadValue; + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + if (!VidModeGetCurrentModeline(stuff->screen, &mode, &dotClock)) return BadValue; @@ -1054,6 +1076,9 @@ if (len != stuff->privsize) return BadLength; + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + status = MODE_OK; if (stuff->hsyncstart < stuff->hdisplay || @@ -1118,10 +1143,13 @@ DEBUG_P("XF86VidModeSwitchMode"); - VidModeZoomViewport(stuff->screen, (short)stuff->zoom); - REQUEST_SIZE_MATCH(xXF86VidModeSwitchModeReq); + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + + VidModeZoomViewport(stuff->screen, (short)stuff->zoom); + return (client->noClientException); } @@ -1178,6 +1206,9 @@ if (len != stuff->privsize) return BadLength; + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + if (!VidModeGetCurrentModeline(stuff->screen, &mode, &dotClock)) return BadValue; @@ -1228,6 +1259,9 @@ DEBUG_P("XF86VidModeLockModeSwitch"); + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + if (!VidModeLockZoom(stuff->screen, (short)stuff->lock)) return VidModeErrorBase + XF86VidModeZoomLocked; @@ -1246,11 +1280,13 @@ DEBUG_P("XF86VidModeGetMonitor"); - if (!VidModeGetMonitor(stuff->screen, &monitor)) - return BadValue; + REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq); + if(stuff->screen >= screenInfo.numScreens) + return BadValue; - REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq); + if (!VidModeGetMonitor(stuff->screen, &monitor)) + return BadValue; nHsync = VidModeGetMonitorValue(monitor, VIDMODE_MON_NHSYNC, 0).i; nVrefresh = VidModeGetMonitorValue(monitor, VIDMODE_MON_NVREFRESH, 0).i; @@ -1329,6 +1365,10 @@ DEBUG_P("XF86VidModeGetViewPort"); REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq); + + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -1356,6 +1396,9 @@ REQUEST_SIZE_MATCH(xXF86VidModeSetViewPortReq); + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + if (!VidModeSetViewPort(stuff->screen, stuff->x, stuff->y)) return BadValue; @@ -1375,9 +1418,13 @@ DEBUG_P("XF86VidModeGetDotClocks"); + REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq); + + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + numClocks = VidModeGetNumOfClocks(stuff->screen, &ClockProg); - REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq); rep.type = X_Reply; rep.length = (SIZEOF(xXF86VidModeGetDotClocksReply) - SIZEOF(xGenericReply) + numClocks) >> 2; @@ -1429,12 +1476,15 @@ DEBUG_P("XF86VidModeSetGamma"); + REQUEST_SIZE_MATCH(xXF86VidModeSetGammaReq); + + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + if (!VidModeSetGamma(stuff->screen, ((float)stuff->red)/10000., ((float)stuff->green)/10000., ((float)stuff->blue)/10000.)) return BadValue; - REQUEST_SIZE_MATCH(xXF86VidModeSetGammaReq); - return (client->noClientException); } @@ -1449,6 +1499,10 @@ DEBUG_P("XF86VidModeGetGamma"); REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq); + + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -1469,6 +1523,108 @@ } static int +ProcXF86VidModeSetGammaRamp(ClientPtr client) +{ + CARD16 *r, *g, *b; + int length; + REQUEST(xXF86VidModeSetGammaRampReq); + + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + + if(stuff->size != VidModeGetGammaRampSize(stuff->screen)) + return BadValue; + + length = (stuff->size + 1) & ~1; + + REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length * 6); + + r = (CARD16*)&stuff[1]; + g = r + length; + b = g + length; + + if (!VidModeSetGammaRamp(stuff->screen, stuff->size, r, g, b)) + return BadValue; + + return (client->noClientException); +} + +static int +ProcXF86VidModeGetGammaRamp(ClientPtr client) +{ + CARD16 *ramp = NULL; + int n, length, i; + xXF86VidModeGetGammaRampReply rep; + REQUEST(xXF86VidModeGetGammaRampReq); + + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + + if(stuff->size != VidModeGetGammaRampSize(stuff->screen)) + return BadValue; + + REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq); + + length = (stuff->size + 1) & ~1; + + if(stuff->size) { + if(!(ramp = xalloc(length * 3 * sizeof(CARD16)))) + return BadAlloc; + + if (!VidModeGetGammaRamp(stuff->screen, stuff->size, + ramp, ramp + length, ramp + (length * 2))) + return BadValue; + } + + rep.type = X_Reply; + rep.length = (length >> 1) * 3; + rep.sequenceNumber = client->sequence; + rep.size = stuff->size; + if(client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swaps(&rep.size, n); + for(i = 0; i < length * 3; i++) + swaps(&ramp[i],n); + } + WriteToClient(client, sizeof(xXF86VidModeGetGammaRampReply), (char *)&rep); + + if(stuff->size) { + WriteToClient(client, rep.length << 2, (char*)ramp); + xfree(ramp); + } + + return (client->noClientException); +} + + +static int +ProcXF86VidModeGetGammaRampSize(ClientPtr client) +{ + xXF86VidModeGetGammaRampSizeReply rep; + int n; + REQUEST(xXF86VidModeGetGammaRampSizeReq); + + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + + REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq); + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.size = VidModeGetGammaRampSize(stuff->screen); + if(client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swaps(&rep.size, n); + } + WriteToClient(client,sizeof(xXF86VidModeGetGammaRampSizeReply),(char*)&rep); + + return (client->noClientException); +} + +static int ProcXF86VidModeSetClientVersion(ClientPtr client) { REQUEST(xXF86VidModeSetClientVersionReq); @@ -1536,6 +1692,12 @@ return ProcXF86VidModeGetGamma(client); case X_XF86VidModeSetClientVersion: return ProcXF86VidModeSetClientVersion(client); + case X_XF86VidModeGetGammaRamp: + return ProcXF86VidModeGetGammaRamp(client); + case X_XF86VidModeSetGammaRamp: + return ProcXF86VidModeSetGammaRamp(client); + case X_XF86VidModeGetGammaRampSize: + return ProcXF86VidModeGetGammaRampSize(client); default: return BadRequest; } @@ -1874,6 +2036,52 @@ } static int +SProcXF86VidModeSetGammaRamp(ClientPtr client) +{ + CARD16 *ramp; + int length, n; + REQUEST(xXF86VidModeSetGammaRampReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xXF86VidModeSetGammaRampReq); + swaps(&stuff->size, n); + swaps(&stuff->screen, n); + length = ((stuff->size + 1) & ~1) * 6; + REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length); + ramp = (CARD16*)&stuff[1]; + while(length--) { + swaps(ramp, n); + ramp++; + } + return ProcXF86VidModeSetGammaRamp(client); +} + +static int +SProcXF86VidModeGetGammaRamp(ClientPtr client) +{ + int n; + REQUEST(xXF86VidModeGetGammaRampReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq); + swaps(&stuff->size, n); + swaps(&stuff->screen, n); + return ProcXF86VidModeGetGammaRamp(client); +} + +static int +SProcXF86VidModeGetGammaRampSize(ClientPtr client) +{ + int n; + REQUEST(xXF86VidModeGetGammaRampSizeReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq); + swaps(&stuff->screen, n); + return ProcXF86VidModeGetGammaRampSize(client); +} + + + + +static int SProcXF86VidModeDispatch(ClientPtr client) { REQUEST(xReq); @@ -1918,6 +2126,12 @@ return SProcXF86VidModeGetGamma(client); case X_XF86VidModeSetClientVersion: return SProcXF86VidModeSetClientVersion(client); + case X_XF86VidModeGetGammaRamp: + return SProcXF86VidModeGetGammaRamp(client); + case X_XF86VidModeSetGammaRamp: + return SProcXF86VidModeSetGammaRamp(client); + case X_XF86VidModeGetGammaRampSize: + return SProcXF86VidModeGetGammaRampSize(client); default: return BadRequest; } Index: xc/programs/Xserver/Xext/xprint.c diff -u xc/programs/Xserver/Xext/xprint.c:1.8 xc/programs/Xserver/Xext/xprint.c:1.9 --- xc/programs/Xserver/Xext/xprint.c:1.8 Tue Jan 18 11:35:38 2000 +++ xc/programs/Xserver/Xext/xprint.c Wed Jan 17 17:13:19 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: xprint.c /main/5 1996/12/30 18:39:20 kaleb $ */ +/* $Xorg: xprint.c,v 1.4 2000/08/17 19:47:59 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -64,7 +64,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/xprint.c,v 1.8 2000/01/18 16:35:38 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xprint.c,v 1.9 2001/01/17 22:13:19 dawes Exp $ */ #include "X.h" #include "Xos.h" @@ -709,10 +709,11 @@ numPrintScreens++; totalSize += sizeof(WINDOW); rep = (xPrintQueryScreensReply *)xrealloc(rep, totalSize); + /* fix of bug: pWinId should be set again after reallocate rep */ + pWinId = (WINDOW *)(rep + 1); *pWinId = WindowTable[i]->drawable.id; if (client->swapped) swapl((long *)pWinId, l); - pWinId++; } } Index: xc/programs/Xserver/Xext/xtest.c diff -u xc/programs/Xserver/Xext/xtest.c:3.3 xc/programs/Xserver/Xext/xtest.c:3.4 --- xc/programs/Xserver/Xext/xtest.c:3.3 Sun Jan 31 07:21:39 1999 +++ xc/programs/Xserver/Xext/xtest.c Wed Jan 17 17:13:19 2001 @@ -1,4 +1,4 @@ -/* $TOG: xtest.c /main/23 1998/02/09 15:26:12 kaleb $ */ +/* $Xorg: xtest.c,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/Xext/xtest.c,v 3.3 1999/01/31 12:21:39 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xtest.c,v 3.4 2001/01/17 22:13:19 dawes Exp $ */ #include "X.h" #define NEED_EVENTS Index: xc/programs/Xserver/Xext/xtest1dd.c diff -u xc/programs/Xserver/Xext/xtest1dd.c:3.2 xc/programs/Xserver/Xext/xtest1dd.c:3.3 --- xc/programs/Xserver/Xext/xtest1dd.c:3.2 Sat Mar 13 22:21:30 1999 +++ xc/programs/Xserver/Xext/xtest1dd.c Wed Jan 17 17:13:19 2001 @@ -1,4 +1,4 @@ -/* $TOG: xtest1dd.c /main/15 1998/02/09 15:25:58 kaleb $ */ +/* $Xorg: xtest1dd.c,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ */ /* * File: xtest1dd.c * @@ -48,7 +48,7 @@ University of California. */ -/* $XFree86: xc/programs/Xserver/Xext/xtest1dd.c,v 3.2 1999/03/14 03:21:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xtest1dd.c,v 3.3 2001/01/17 22:13:19 dawes Exp $ */ /*************************************************************** * include files Index: xc/programs/Xserver/Xext/xtest1di.c diff -u xc/programs/Xserver/Xext/xtest1di.c:3.1 xc/programs/Xserver/Xext/xtest1di.c:3.2 --- xc/programs/Xserver/Xext/xtest1di.c:3.1 Sun Oct 4 05:36:54 1998 +++ xc/programs/Xserver/Xext/xtest1di.c Wed Jan 17 17:13:19 2001 @@ -1,4 +1,4 @@ -/* $TOG: xtest1di.c /main/14 1998/02/09 15:26:04 kaleb $ */ +/* $Xorg: xtest1di.c,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ */ /* * File: xtest1di.c * @@ -48,7 +48,7 @@ University of California. */ -/* $XFree86: xc/programs/Xserver/Xext/xtest1di.c,v 3.1 1998/10/04 09:36:54 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xtest1di.c,v 3.2 2001/01/17 22:13:19 dawes Exp $ */ /***************************************************************************** * include files Index: xc/programs/Xserver/Xext/xvdisp.c diff -u xc/programs/Xserver/Xext/xvdisp.c:1.16 xc/programs/Xserver/Xext/xvdisp.c:1.19 --- xc/programs/Xserver/Xext/xvdisp.c:1.16 Thu Aug 10 13:40:30 2000 +++ xc/programs/Xserver/Xext/xvdisp.c Wed Mar 7 14:37:51 2001 @@ -21,7 +21,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/xvdisp.c,v 1.16 2000/08/10 17:40:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xvdisp.c,v 1.19 2001/03/07 19:37:51 mvojkovi Exp $ */ /* ** File: @@ -74,11 +74,14 @@ #include "panoramiX.h" #include "panoramiXsrv.h" -XvAdaptorPtr XineramaAdaptors[MAXSCREENS]; +unsigned long XvXRTPort; + #ifdef MITSHM static int XineramaXvShmPutImage(ClientPtr); #endif static int XineramaXvPutImage(ClientPtr); +static int XineramaXvPutVideo(ClientPtr); +static int XineramaXvPutStill(ClientPtr); static int XineramaXvSetPortAttribute(ClientPtr); static int XineramaXvStopVideo(ClientPtr); #endif @@ -226,8 +229,20 @@ case xv_QueryExtension: return(ProcXvQueryExtension(client)); case xv_QueryAdaptors: return(ProcXvQueryAdaptors(client)); case xv_QueryEncodings: return(ProcXvQueryEncodings(client)); - case xv_PutVideo: return(ProcXvPutVideo(client)); - case xv_PutStill: return(ProcXvPutStill(client)); + case xv_PutVideo: +#ifdef PANORAMIX + if(!noPanoramiXExtension) + return(XineramaXvPutVideo(client)); + else +#endif + return(ProcXvPutVideo(client)); + case xv_PutStill: +#ifdef PANORAMIX + if(!noPanoramiXExtension) + return(XineramaXvPutStill(client)); + else +#endif + return(ProcXvPutStill(client)); case xv_GetVideo: return(ProcXvGetVideo(client)); case xv_GetStill: return(ProcXvGetStill(client)); case xv_GrabPort: return(ProcXvGrabPort(client)); @@ -1068,6 +1083,9 @@ pPort, pImage, &width, &height, NULL, NULL); size += sizeof(xvPutImageReq); size = (size + 3) >> 2; + + if((width < stuff->width) || (height < stuff->height)) + return BadValue; if(client->req_len < size) return BadLength; @@ -1160,6 +1178,9 @@ if((size_needed + stuff->offset) > shmdesc->size) return BadAccess; + if((width < stuff->width) || (height < stuff->height)) + return BadValue; + status = XVCALL(diPutImage)(client, pDraw, pPort, pGC, stuff->src_x, stuff->src_y, stuff->src_w, stuff->src_h, @@ -1834,45 +1855,51 @@ #ifdef PANORAMIX + + static int XineramaXvStopVideo(ClientPtr client) { - int result, i, portoffset; - PanoramiXRes *draw; - XvPortPtr pPort; - REQUEST(xvStopVideoReq); - REQUEST_SIZE_MATCH(xvStopVideoReq); + int result = Success, i; + PanoramiXRes *draw, *port; + REQUEST(xvStopVideoReq); + REQUEST_SIZE_MATCH(xvStopVideoReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) return BadDrawable; - portoffset = stuff->port - XineramaAdaptors[0]->base_id; + if(!(port = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->port, XvXRTPort, SecurityReadAccess))) + return _XvBadPort; - FOR_NSCREENS_BACKWARD(i) { - if(XineramaAdaptors[i]) { - stuff->drawable = draw->info[i].id; - stuff->port = XineramaAdaptors[i]->base_id + portoffset; - result = ProcXvStopVideo(client); - } - } + FOR_NSCREENS_BACKWARD(i) { + if(port->info[i].id) { + stuff->drawable = draw->info[i].id; + stuff->port = port->info[i].id; + result = ProcXvStopVideo(client); + } + } - return result; + return result; } static int XineramaXvSetPortAttribute(ClientPtr client) { REQUEST(xvSetPortAttributeReq); - int result, i, portoffset; + PanoramiXRes *port; + int result = Success, i; REQUEST_SIZE_MATCH(xvSetPortAttributeReq); - portoffset = stuff->port - XineramaAdaptors[0]->base_id; + if(!(port = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->port, XvXRTPort, SecurityReadAccess))) + return _XvBadPort; FOR_NSCREENS_BACKWARD(i) { - if(XineramaAdaptors[i]) { - stuff->port = XineramaAdaptors[i]->base_id + portoffset; + if(port->info[i].id) { + stuff->port = port->info[i].id; result = ProcXvSetPortAttribute(client); } } @@ -1885,10 +1912,10 @@ XineramaXvShmPutImage(ClientPtr client) { REQUEST(xvShmPutImageReq); - PanoramiXRes *draw, *gc; + PanoramiXRes *draw, *gc, *port; Bool send_event = stuff->send_event; Bool isRoot; - int result, i, x, y, portoffset; + int result = Success, i, x, y; REQUEST_SIZE_MATCH(xvShmPutImageReq); @@ -1899,6 +1926,10 @@ if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( client, stuff->gc, XRT_GC, SecurityReadAccess))) return BadGC; + + if(!(port = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->port, XvXRTPort, SecurityReadAccess))) + return _XvBadPort; isRoot = (draw->type == XRT_WINDOW) && (stuff->drawable == WindowTable[0]->drawable.id); @@ -1906,12 +1937,10 @@ x = stuff->drw_x; y = stuff->drw_y; - portoffset = stuff->port - XineramaAdaptors[0]->base_id; - FOR_NSCREENS_BACKWARD(i) { - if(XineramaAdaptors[i]) { + if(port->info[i].id) { stuff->drawable = draw->info[i].id; - stuff->port = XineramaAdaptors[i]->base_id + portoffset; + stuff->port = port->info[i].id; stuff->gc = gc->info[i].id; stuff->drw_x = x; stuff->drw_y = y; @@ -1922,7 +1951,6 @@ stuff->send_event = (send_event && !i) ? 1 : 0; result = ProcXvShmPutImage(client); - if(result != Success) break; } } return result; @@ -1933,9 +1961,9 @@ XineramaXvPutImage(ClientPtr client) { REQUEST(xvPutImageReq); - PanoramiXRes *draw, *gc; + PanoramiXRes *draw, *gc, *port; Bool isRoot; - int result, i, x, y, portoffset; + int result = Success, i, x, y; REQUEST_AT_LEAST_SIZE(xvPutImageReq); @@ -1946,6 +1974,10 @@ if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( client, stuff->gc, XRT_GC, SecurityReadAccess))) return BadGC; + + if(!(port = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->port, XvXRTPort, SecurityReadAccess))) + return _XvBadPort; isRoot = (draw->type == XRT_WINDOW) && (stuff->drawable == WindowTable[0]->drawable.id); @@ -1953,12 +1985,10 @@ x = stuff->drw_x; y = stuff->drw_y; - portoffset = stuff->port - XineramaAdaptors[0]->base_id; - FOR_NSCREENS_BACKWARD(i) { - if(XineramaAdaptors[i]) { + if(port->info[i].id) { stuff->drawable = draw->info[i].id; - stuff->port = XineramaAdaptors[i]->base_id + portoffset; + stuff->port = port->info[i].id; stuff->gc = gc->info[i].id; stuff->drw_x = x; stuff->drw_y = y; @@ -1968,91 +1998,207 @@ } result = ProcXvPutImage(client); - if(result != Success) break; } } return result; } - -void XineramifyXv(void) +static int +XineramaXvPutVideo(ClientPtr client) { - ScreenPtr pScreen; - XvScreenPtr pxvs; - XvAdaptorPtr pAdapt, refAdapt; - XvImagePtr refImage; - int imageHeads = 0; - Bool match, blast; - int max_w = 0, max_h = 0; - int i, j, k, n; - - /* find which heads can do images */ - for(i = 0; i < PanoramiXNumScreens; i++) { - pScreen = screenInfo.screens[i]; - XineramaAdaptors[i] = NULL; - pxvs = (XvScreenPtr)pScreen->devPrivates[XvScreenIndex].ptr; - if(pxvs) { - for(j = 0; j < pxvs->nAdaptors; j++) { - pAdapt = pxvs->pAdaptors + j; - if((pAdapt->type & XvImageMask) && (pAdapt->nImages > 0)) { - imageHeads++; - XineramaAdaptors[i] = pAdapt; - break; /* assuming only one XvImage capable adaptor per head */ + REQUEST(xvPutImageReq); + PanoramiXRes *draw, *gc, *port; + Bool isRoot; + int result = Success, i, x, y; + + REQUEST_AT_LEAST_SIZE(xvPutVideoReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) + return BadDrawable; + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, SecurityReadAccess))) + return BadGC; + + if(!(port = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->port, XvXRTPort, SecurityReadAccess))) + return _XvBadPort; + + isRoot = (draw->type == XRT_WINDOW) && + (stuff->drawable == WindowTable[0]->drawable.id); + + x = stuff->drw_x; + y = stuff->drw_y; + + FOR_NSCREENS_BACKWARD(i) { + if(port->info[i].id) { + stuff->drawable = draw->info[i].id; + stuff->port = port->info[i].id; + stuff->gc = gc->info[i].id; + stuff->drw_x = x; + stuff->drw_y = y; + if(isRoot) { + stuff->drw_x -= panoramiXdataPtr[i].x; + stuff->drw_y -= panoramiXdataPtr[i].y; } + + result = ProcXvPutVideo(client); } - } - } + } + return result; +} - if(!imageHeads || !XineramaAdaptors[0]) return; +static int +XineramaXvPutStill(ClientPtr client) +{ + REQUEST(xvPutImageReq); + PanoramiXRes *draw, *gc, *port; + Bool isRoot; + int result = Success, i, x, y; - /* filter out image types not common on all */ - refAdapt = XineramaAdaptors[0]; + REQUEST_AT_LEAST_SIZE(xvPutImageReq); - for(i = 0; i < refAdapt->nEncodings; i++) { - if(!strcmp(refAdapt->pEncodings[i].name, "XV_IMAGE")) { - max_w = refAdapt->pEncodings[i].width; - max_h = refAdapt->pEncodings[i].height; - break; - } - } + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) + return BadDrawable; + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, SecurityReadAccess))) + return BadGC; + + if(!(port = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->port, XvXRTPort, SecurityReadAccess))) + return _XvBadPort; - for(i = 0; i < refAdapt->nImages; i++) { - refImage = refAdapt->pImages + i; + isRoot = (draw->type == XRT_WINDOW) && + (stuff->drawable == WindowTable[0]->drawable.id); + + x = stuff->drw_x; + y = stuff->drw_y; - blast = FALSE; - for(j = 0; j < PanoramiXNumScreens; j++) { - match = FALSE; - if((pAdapt = XineramaAdaptors[j])) { - for(k = 0; k < pAdapt->nImages; k++) { - if(pAdapt->pImages[k].id == refImage->id) { - match = TRUE; - for(n = 0; n < pAdapt->nEncodings; n++) { - if(!strcmp(pAdapt->pEncodings[n].name, "XV_IMAGE")) { - if(max_w > pAdapt->pEncodings[n].width) - max_w = pAdapt->pEncodings[n].width; - if(max_h > pAdapt->pEncodings[n].height) - max_h = pAdapt->pEncodings[n].height; - break; - } - } - break; - } + FOR_NSCREENS_BACKWARD(i) { + if(port->info[i].id) { + stuff->drawable = draw->info[i].id; + stuff->port = port->info[i].id; + stuff->gc = gc->info[i].id; + stuff->drw_x = x; + stuff->drw_y = y; + if(isRoot) { + stuff->drw_x -= panoramiXdataPtr[i].x; + stuff->drw_y -= panoramiXdataPtr[i].y; } - } - if(!match) { - blast = TRUE; - break; + + result = ProcXvPutStill(client); } - } - if(blast) { - if(i < (refAdapt->nImages - 1)) - memcpy(refAdapt->pImages + i, refAdapt->pImages + i + 1, - (refAdapt->nImages - 1 - i) * sizeof(XvImageRec)); - refAdapt->nImages--; - } - } + } + return result; +} + + +void XineramifyXv(void) +{ + ScreenPtr pScreen, screen0 = screenInfo.screens[0]; + XvScreenPtr xvsp0 = (XvScreenPtr)screen0->devPrivates[XvScreenIndex].ptr; + XvAdaptorPtr refAdapt, pAdapt; + XvAttributePtr pAttr; + XvScreenPtr xvsp; + Bool isOverlay, hasOverlay; + PanoramiXRes *port; + XvAdaptorPtr MatchingAdaptors[MAXSCREENS]; + int i, j, k, l; + + XvXRTPort = CreateNewResourceType(XineramaDeleteResource); + + for(i = 0; i < xvsp0->nAdaptors; i++) { + refAdapt = xvsp0->pAdaptors + i; + + bzero(MatchingAdaptors, sizeof(XvAdaptorPtr) * MAXSCREENS); + + MatchingAdaptors[0] = refAdapt; + + if(!(refAdapt->type & XvInputMask)) continue; + + isOverlay = FALSE; + for(j = 0; j < refAdapt->nAttributes; j++) { + pAttr = refAdapt->pAttributes + j; + if(!strcmp(pAttr->name, "XV_COLORKEY")) { + isOverlay = TRUE; + break; + } + } + + for(j = 1; j < PanoramiXNumScreens; j++) { + pScreen = screenInfo.screens[j]; + xvsp = (XvScreenPtr)pScreen->devPrivates[XvScreenIndex].ptr; + + /* Do not try to go on if xv is not supported on this screen */ + if (xvsp==NULL) continue ; + + /* if the adaptor has the same name it's a perfect match */ + for(k = 0; k < xvsp->nAdaptors; k++) { + pAdapt = xvsp->pAdaptors + k; + if(!strcmp(refAdapt->name, pAdapt->name)) { + MatchingAdaptors[j] = pAdapt; + break; + } + } + if(MatchingAdaptors[j]) continue; /* found it */ + + /* otherwise we only look for XvImage adaptors */ + if(!(refAdapt->type & XvImageMask)) continue; + if(refAdapt->nImages <= 0) continue; + + /* prefer overlay/overlay non-overlay/non-overlay pairing */ + for(k = 0; k < xvsp->nAdaptors; k++) { + pAdapt = xvsp->pAdaptors + k; + if((pAdapt->type & XvImageMask) & (pAdapt->nImages > 0)) { + hasOverlay = FALSE; + for(l = 0; l < pAdapt->nAttributes; l++) { + if(!strcmp(pAdapt->name, "XV_COLORKEY")) { + hasOverlay = TRUE; + break; + } + } + if(isOverlay && hasOverlay) { + MatchingAdaptors[j] = pAdapt; + break; + } + else if(!isOverlay && !hasOverlay) { + MatchingAdaptors[j] = pAdapt; + break; + } + } + } + + if(MatchingAdaptors[j]) continue; /* found it */ + + /* but we'll take any XvImage pairing if we can get it */ + + for(k = 0; k < xvsp->nAdaptors; k++) { + pAdapt = xvsp->pAdaptors + k; + if((pAdapt->type & XvImageMask) & (pAdapt->nImages > 0)) { + MatchingAdaptors[j] = pAdapt; + break; + } + } + } - if(!refAdapt->nImages) /* no image formats in common between heads */ - refAdapt->type &= ~XvImageMask; + /* now create a resource for each port */ + for(j = 0; j < refAdapt->nPorts; j++) { + if(!(port = xalloc(sizeof(PanoramiXRes)))) + break; + port->info[0].id = MatchingAdaptors[0]->base_id + j; + AddResource(port->info[0].id, XvXRTPort, port); + + for(k = 1; k < PanoramiXNumScreens; k++) { + if(MatchingAdaptors[k] && (MatchingAdaptors[k]->nPorts > j)) + port->info[k].id = MatchingAdaptors[k]->base_id + j; + else + port->info[k].id = 0; + } + } + } } + #endif Index: xc/programs/Xserver/Xext/xvdix.h diff -u xc/programs/Xserver/Xext/xvdix.h:1.6 xc/programs/Xserver/Xext/xvdix.h:1.7 --- xc/programs/Xserver/Xext/xvdix.h:1.6 Tue Jan 18 11:35:39 2000 +++ xc/programs/Xserver/Xext/xvdix.h Mon May 7 17:37:51 2001 @@ -21,7 +21,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/xvdix.h,v 1.6 2000/01/18 16:35:39 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xvdix.h,v 1.7 2001/05/07 21:37:51 tsi Exp $ */ #ifndef XVDIX_H #define XVDIX_H @@ -53,7 +53,7 @@ ** */ -#include "pixmap.h" +#include "scrnintstr.h" #include "Xvproto.h" extern int XvScreenIndex; Index: xc/programs/Xserver/Xext/xvmc.c diff -u /dev/null xc/programs/Xserver/Xext/xvmc.c:1.4 --- /dev/null Mon Jun 4 12:39:57 2001 +++ xc/programs/Xserver/Xext/xvmc.c Sat Apr 7 07:04:21 2001 @@ -0,0 +1,632 @@ +/* $XFree86: xc/programs/Xserver/Xext/xvmc.c,v 1.4 2001/04/07 11:04:21 alanh Exp $ */ + +#define NEED_REPLIES +#define NEED_EVENTS +#include "X.h" +#include "Xproto.h" +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "resource.h" +#include "scrnintstr.h" +#include "extnsionst.h" +#include "servermd.h" +#include "Xfuncproto.h" +#include "xvdix.h" +#include "XvMC.h" +#include "Xvproto.h" +#include "XvMCproto.h" +#include "xvmcext.h" + +int XvMCScreenIndex = -1; + +unsigned long XvMCGeneration = 0; + +int XvMCReqCode; +int XvMCEventBase; +int XvMCErrorBase; + +unsigned long XvMCRTContext; +unsigned long XvMCRTSurface; +unsigned long XvMCRTSubpicture; + +typedef struct { + int num_adaptors; + XvMCAdaptorPtr adaptors; + CloseScreenProcPtr CloseScreen; +} XvMCScreenRec, *XvMCScreenPtr; + +#define XVMC_GET_PRIVATE(pScreen) \ + (XvMCScreenPtr)((pScreen)->devPrivates[XvMCScreenIndex].ptr) + + +static int +XvMCDestroyContextRes(pointer data, XID id) +{ + XvMCContextPtr pContext = (XvMCContextPtr)data; + + pContext->refcnt--; + + if(!pContext->refcnt) { + XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); + (*pScreenPriv->adaptors[pContext->adapt_num].DestroyContext)(pContext); + xfree(pContext); + } + + return Success; +} + +static int +XvMCDestroySurfaceRes(pointer data, XID id) +{ + XvMCSurfacePtr pSurface = (XvMCSurfacePtr)data; + XvMCContextPtr pContext = pSurface->context; + XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); + + (*pScreenPriv->adaptors[pContext->adapt_num].DestroySurface)(pSurface); + xfree(pSurface); + + XvMCDestroyContextRes((pointer)pContext, pContext->context_id); + + return Success; +} + + +static int +XvMCDestroySubpictureRes(pointer data, XID id) +{ + XvMCSubpicturePtr pSubpict = (XvMCSubpicturePtr)data; + XvMCContextPtr pContext = pSubpict->context; + XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); + + (*pScreenPriv->adaptors[pContext->adapt_num].DestroySubpicture)(pSubpict); + xfree(pSubpict); + + XvMCDestroyContextRes((pointer)pContext, pContext->context_id); + + return Success; +} + +static void +XvMCResetProc (ExtensionEntry *extEntry) +{ +} + + +static int +ProcXvMCQueryVersion(ClientPtr client) +{ + xvmcQueryVersionReply rep; + REQUEST(xvmcQueryVersionReq); + REQUEST_SIZE_MATCH(xvmcQueryVersionReq); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 0; + rep.major = XvMCVersion; + rep.minor = XvMCRevision; + WriteToClient(client, sizeof(xvmcQueryVersionReply), (char*)&rep); + return Success; +} + + +static int +ProcXvMCListSurfaceTypes(ClientPtr client) +{ + XvPortPtr pPort; + ScreenPtr pScreen; + int i; + XvMCScreenPtr pScreenPriv; + xvmcListSurfaceTypesReply rep; + xvmcSurfaceInfo info; + XvMCAdaptorPtr adaptor = NULL; + XvMCSurfaceInfoPtr surface; + REQUEST(xvmcListSurfaceTypesReq); + REQUEST_SIZE_MATCH(xvmcListSurfaceTypesReq); + + if(!(pPort = LOOKUP_PORT(stuff->port, client))) { + client->errorValue = stuff->port; + return _XvBadPort; + } + + pScreen = pPort->pAdaptor->pScreen; + pScreenPriv = XVMC_GET_PRIVATE(pScreen); + + for(i = 0; i < pScreenPriv->num_adaptors; i++) { + if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { + adaptor = &(pScreenPriv->adaptors[i]); + break; + } + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.num = (adaptor) ? adaptor->num_surfaces : 0; + rep.length = rep.num * sizeof(xvmcSurfaceInfo) >> 2; + + WriteToClient(client, sizeof(xvmcListSurfaceTypesReply), (char*)&rep); + + for(i = 0; i < rep.num; i++) { + surface = adaptor->surfaces[i]; + info.surface_type_id = surface->surface_type_id; + info.chroma_format = surface->chroma_format; + info.color_description = surface->color_description; + info.max_width = surface->max_width; + info.max_height = surface->max_height; + info.subpicture_max_width = surface->subpicture_max_width; + info.subpicture_max_height = surface->subpicture_max_height; + info.mc_type = surface->mc_type; + info.flags = surface->flags; + WriteToClient(client, sizeof(xvmcSurfaceInfo), (char*)&info); + } + + return Success; +} + +static int +ProcXvMCCreateContext(ClientPtr client) +{ + XvPortPtr pPort; + CARD32 *data = NULL; + int dwords = 0; + int i, result, adapt_num = -1; + ScreenPtr pScreen; + XvMCContextPtr pContext; + XvMCScreenPtr pScreenPriv; + XvMCAdaptorPtr adaptor = NULL; + XvMCSurfaceInfoPtr surface = NULL; + xvmcCreateContextReply rep; + REQUEST(xvmcCreateContextReq); + REQUEST_SIZE_MATCH(xvmcCreateContextReq); + + if(!(pPort = LOOKUP_PORT(stuff->port, client))) { + client->errorValue = stuff->port; + return _XvBadPort; + } + + pScreen = pPort->pAdaptor->pScreen; + pScreenPriv = XVMC_GET_PRIVATE(pScreen); + + for(i = 0; i < pScreenPriv->num_adaptors; i++) { + if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { + adaptor = &(pScreenPriv->adaptors[i]); + adapt_num = i; + break; + } + } + + if(adapt_num < 0) /* that port doesn't support MC */ + return BadMatch; + + for(i = 0; i < adaptor->num_surfaces; i++) { + if(adaptor->surfaces[i]->surface_type_id == stuff->surface_type_id) { + surface = adaptor->surfaces[i]; + break; + } + } + + /* adaptor doesn't support this suface_type_id */ + if(!surface) return BadMatch; + + + if((stuff->width > surface->max_width) || + (stuff->height > surface->max_height)) + return BadValue; + + if(!(pContext = xalloc(sizeof(XvMCContextRec)))) { + return BadAlloc; + } + + + pContext->pScreen = pScreen; + pContext->adapt_num = adapt_num; + pContext->context_id = stuff->context_id; + pContext->surface_type_id = stuff->surface_type_id; + pContext->width = stuff->width; + pContext->height = stuff->height; + pContext->flags = stuff->flags; + pContext->refcnt = 1; + + result = (*adaptor->CreateContext)(pPort, pContext, &dwords, &data); + + if(result != Success) { + xfree(pContext); + return result; + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.width_actual = pContext->width; + rep.height_actual = pContext->height; + rep.flags_return = pContext->flags; + rep.length = dwords; + + WriteToClient(client, sizeof(xvmcCreateContextReply), (char*)&rep); + if(dwords) + WriteToClient(client, dwords << 2, (char*)data); + AddResource(pContext->context_id, XvMCRTContext, pContext); + + if(data) + xfree(data); + + return Success; +} + +static int +ProcXvMCDestroyContext(ClientPtr client) +{ + REQUEST(xvmcDestroyContextReq); + REQUEST_SIZE_MATCH(xvmcDestroyContextReq); + + if(!LookupIDByType(stuff->context_id, XvMCRTContext)) + return (XvMCBadContext + XvMCErrorBase); + + FreeResource(stuff->context_id, RT_NONE); + + return Success; +} + +static int +ProcXvMCCreateSurface(ClientPtr client) +{ + CARD32 *data = NULL; + int dwords = 0; + int result; + XvMCContextPtr pContext; + XvMCSurfacePtr pSurface; + XvMCScreenPtr pScreenPriv; + xvmcCreateSurfaceReply rep; + REQUEST(xvmcCreateSurfaceReq); + REQUEST_SIZE_MATCH(xvmcCreateSurfaceReq); + + if(!(pContext = LookupIDByType(stuff->context_id, XvMCRTContext))) + return (XvMCBadContext + XvMCErrorBase); + + pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); + + if(!(pSurface = xalloc(sizeof(XvMCSurfaceRec)))) + return BadAlloc; + + pSurface->surface_id = stuff->surface_id; + pSurface->surface_type_id = pContext->surface_type_id; + pSurface->context = pContext; + + result = (*pScreenPriv->adaptors[pContext->adapt_num].CreateSurface)( + pSurface, &dwords, &data); + + if(result != Success) { + xfree(pSurface); + return result; + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = dwords; + + WriteToClient(client, sizeof(xvmcCreateSurfaceReply), (char*)&rep); + if(dwords) + WriteToClient(client, dwords << 2, (char*)data); + AddResource(pSurface->surface_id, XvMCRTSurface, pSurface); + + if(data) + xfree(data); + + pContext->refcnt++; + + return Success; +} + +static int +ProcXvMCDestroySurface(ClientPtr client) +{ + REQUEST(xvmcDestroySurfaceReq); + REQUEST_SIZE_MATCH(xvmcDestroySurfaceReq); + + if(!LookupIDByType(stuff->surface_id, XvMCRTSurface)) + return (XvMCBadSurface + XvMCErrorBase); + + FreeResource(stuff->surface_id, RT_NONE); + + return Success; +} + +static int +ProcXvMCCreateSubpicture(ClientPtr client) +{ + Bool image_supported = FALSE; + CARD32 *data = NULL; + int i, result, dwords = 0; + XvMCContextPtr pContext; + XvMCSubpicturePtr pSubpicture; + XvMCScreenPtr pScreenPriv; + xvmcCreateSubpictureReply rep; + XvMCAdaptorPtr adaptor; + XvMCSurfaceInfoPtr surface = NULL; + REQUEST(xvmcCreateSubpictureReq); + REQUEST_SIZE_MATCH(xvmcCreateSubpictureReq); + + if(!(pContext = LookupIDByType(stuff->context_id, XvMCRTContext))) + return (XvMCBadContext + XvMCErrorBase); + + pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); + + adaptor = &(pScreenPriv->adaptors[pContext->adapt_num]); + + /* find which surface this context supports */ + for(i = 0; i < adaptor->num_surfaces; i++) { + if(adaptor->surfaces[i]->surface_type_id == pContext->surface_type_id){ + surface = adaptor->surfaces[i]; + break; + } + } + + if(!surface) return BadMatch; + + /* make sure this surface supports that xvimage format */ + if(!surface->compatible_subpictures) return BadMatch; + + for(i = 0; i < surface->compatible_subpictures->num_xvimages; i++) { + if(surface->compatible_subpictures->xvimage_ids[i] == stuff->xvimage_id) { + image_supported = TRUE; + break; + } + } + + if(!image_supported) return BadMatch; + + /* make sure the size is OK */ + if((stuff->width > surface->subpicture_max_width) || + (stuff->height > surface->subpicture_max_height)) + return BadValue; + + if(!(pSubpicture = xalloc(sizeof(XvMCSubpictureRec)))) + return BadAlloc; + + pSubpicture->subpicture_id = stuff->subpicture_id; + pSubpicture->xvimage_id = stuff->xvimage_id; + pSubpicture->width = stuff->width; + pSubpicture->height = stuff->height; + pSubpicture->num_palette_entries = 0; /* overwritten by DDX */ + pSubpicture->entry_bytes = 0; /* overwritten by DDX */ + pSubpicture->component_order[0] = 0; /* overwritten by DDX */ + pSubpicture->component_order[1] = 0; + pSubpicture->component_order[2] = 0; + pSubpicture->component_order[3] = 0; + pSubpicture->context = pContext; + + result = (*pScreenPriv->adaptors[pContext->adapt_num].CreateSubpicture)( + pSubpicture, &dwords, &data); + + if(result != Success) { + xfree(pSubpicture); + return result; + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.width_actual = pSubpicture->width; + rep.height_actual = pSubpicture->height; + rep.num_palette_entries = pSubpicture->num_palette_entries; + rep.entry_bytes = pSubpicture->entry_bytes; + rep.component_order[0] = pSubpicture->component_order[0]; + rep.component_order[1] = pSubpicture->component_order[1]; + rep.component_order[2] = pSubpicture->component_order[2]; + rep.component_order[3] = pSubpicture->component_order[3]; + rep.length = dwords; + + WriteToClient(client, sizeof(xvmcCreateSubpictureReply), (char*)&rep); + if(dwords) + WriteToClient(client, dwords << 2, (char*)data); + AddResource(pSubpicture->subpicture_id, XvMCRTSubpicture, pSubpicture); + + if(data) + xfree(data); + + pContext->refcnt++; + + return Success; +} + +static int +ProcXvMCDestroySubpicture(ClientPtr client) +{ + REQUEST(xvmcDestroySubpictureReq); + REQUEST_SIZE_MATCH(xvmcDestroySubpictureReq); + + if(!LookupIDByType(stuff->subpicture_id, XvMCRTSubpicture)) + return (XvMCBadSubpicture + XvMCErrorBase); + + FreeResource(stuff->subpicture_id, RT_NONE); + + return Success; +} + + +static int +ProcXvMCListSubpictureTypes(ClientPtr client) +{ + XvPortPtr pPort; + xvmcListSubpictureTypesReply rep; + XvMCScreenPtr pScreenPriv; + ScreenPtr pScreen; + XvMCAdaptorPtr adaptor = NULL; + XvMCSurfaceInfoPtr surface = NULL; + xvImageFormatInfo info; + XvImagePtr pImage; + int i, j; + REQUEST(xvmcListSubpictureTypesReq); + REQUEST_SIZE_MATCH(xvmcListSubpictureTypesReq); + + if(!(pPort = LOOKUP_PORT(stuff->port, client))) { + client->errorValue = stuff->port; + return _XvBadPort; + } + + pScreen = pPort->pAdaptor->pScreen; + pScreenPriv = XVMC_GET_PRIVATE(pScreen); + + for(i = 0; i < pScreenPriv->num_adaptors; i++) { + if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { + adaptor = &(pScreenPriv->adaptors[i]); + break; + } + } + + if(!adaptor) return BadMatch; + + for(i = 0; i < adaptor->num_surfaces; i++) { + if(adaptor->surfaces[i]->surface_type_id == stuff->surface_type_id) { + surface = adaptor->surfaces[i]; + break; + } + } + + if(!surface) return BadMatch; + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.num = 0; + if(surface->compatible_subpictures) + rep.num = surface->compatible_subpictures->num_xvimages; + + rep.length = rep.num * sizeof(xvImageFormatInfo) >> 2; + + WriteToClient(client, sizeof(xvmcListSubpictureTypesReply), (char*)&rep); + + for(i = 0; i < rep.num; i++) { + pImage = NULL; + for(j = 0; j < adaptor->num_subpictures; j++) { + if(surface->compatible_subpictures->xvimage_ids[i] == + adaptor->subpictures[j]->id) + { + pImage = adaptor->subpictures[j]; + break; + } + } + if(!pImage) return BadImplementation; + + info.id = pImage->id; + info.type = pImage->type; + info.byte_order = pImage->byte_order; + memcpy(&info.guid, pImage->guid, 16); + info.bpp = pImage->bits_per_pixel; + info.num_planes = pImage->num_planes; + info.depth = pImage->depth; + info.red_mask = pImage->red_mask; + info.green_mask = pImage->green_mask; + info.blue_mask = pImage->blue_mask; + info.format = pImage->format; + info.y_sample_bits = pImage->y_sample_bits; + info.u_sample_bits = pImage->u_sample_bits; + info.v_sample_bits = pImage->v_sample_bits; + info.horz_y_period = pImage->horz_y_period; + info.horz_u_period = pImage->horz_u_period; + info.horz_v_period = pImage->horz_v_period; + info.vert_y_period = pImage->vert_y_period; + info.vert_u_period = pImage->vert_u_period; + info.vert_v_period = pImage->vert_v_period; + memcpy(&info.comp_order, pImage->component_order, 32); + info.scanline_order = pImage->scanline_order; + WriteToClient(client, sizeof(xvImageFormatInfo), (char*)&info); + } + + return Success; +} + + + +int (*ProcXvMCVector[xvmcNumRequest])(ClientPtr) = { + ProcXvMCQueryVersion, + ProcXvMCListSurfaceTypes, + ProcXvMCCreateContext, + ProcXvMCDestroyContext, + ProcXvMCCreateSurface, + ProcXvMCDestroySurface, + ProcXvMCCreateSubpicture, + ProcXvMCDestroySubpicture, + ProcXvMCListSubpictureTypes +}; + +static int +ProcXvMCDispatch (ClientPtr client) +{ + REQUEST(xReq); + + if(stuff->data < xvmcNumRequest) + return (*ProcXvMCVector[stuff->data])(client); + else + return BadRequest; +} + +static int +SProcXvMCDispatch (ClientPtr client) +{ + /* We only support local */ + return BadImplementation; +} + +void +XvMCExtensionInit() +{ + ExtensionEntry *extEntry; + + if(XvMCScreenIndex < 0) /* nobody supports it */ + return; + + if(!(XvMCRTContext = CreateNewResourceType(XvMCDestroyContextRes))) + return; + + if(!(XvMCRTSurface = CreateNewResourceType(XvMCDestroySurfaceRes))) + return; + + if(!(XvMCRTSubpicture = CreateNewResourceType(XvMCDestroySubpictureRes))) + return; + + extEntry = AddExtension(XvMCName, XvMCNumEvents, XvMCNumErrors, + ProcXvMCDispatch, SProcXvMCDispatch, + XvMCResetProc, StandardMinorOpcode); + + if(!extEntry) return; + + XvMCReqCode = extEntry->base; + XvMCEventBase = extEntry->eventBase; + XvMCErrorBase = extEntry->errorBase; +} + +static Bool +XvMCCloseScreen (int i, ScreenPtr pScreen) +{ + XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pScreen); + + pScreen->CloseScreen = pScreenPriv->CloseScreen; + + xfree(pScreenPriv); + + return (*pScreen->CloseScreen)(i, pScreen); +} + + +int +XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr pAdapt) +{ + XvMCScreenPtr pScreenPriv; + + if(XvMCGeneration != serverGeneration) { + if((XvMCScreenIndex = AllocateScreenPrivateIndex()) < 0) + return BadAlloc; + + XvMCGeneration = serverGeneration; + } + + if(!(pScreenPriv = (XvMCScreenPtr)xalloc(sizeof(XvMCScreenRec)))) + return BadAlloc; + + pScreen->devPrivates[XvMCScreenIndex].ptr = (pointer)pScreenPriv; + + pScreenPriv->CloseScreen = pScreen->CloseScreen; + pScreen->CloseScreen = XvMCCloseScreen; + + pScreenPriv->num_adaptors = num; + pScreenPriv->adaptors = pAdapt; + + return Success; +} Index: xc/programs/Xserver/Xext/xvmcext.h diff -u /dev/null xc/programs/Xserver/Xext/xvmcext.h:1.1 --- /dev/null Mon Jun 4 12:39:57 2001 +++ xc/programs/Xserver/Xext/xvmcext.h Sat Apr 7 07:04:21 2001 @@ -0,0 +1,109 @@ +/* $XFree86: xc/programs/Xserver/Xext/xvmcext.h,v 1.1 2001/04/07 11:04:21 alanh Exp $ */ + +#ifndef _XVMC_H +#define _XVMC_H +#include "Xv.h" +#include "xvdix.h" + +typedef struct { + int num_xvimages; + int *xvimage_ids; +} XvMCImageIDList; + +typedef struct { + int surface_type_id; + int chroma_format; + int color_description; + unsigned short max_width; + unsigned short max_height; + unsigned short subpicture_max_width; + unsigned short subpicture_max_height; + int mc_type; + int flags; + XvMCImageIDList *compatible_subpictures; +} XvMCSurfaceInfoRec, *XvMCSurfaceInfoPtr; + +typedef struct { + XID context_id; + ScreenPtr pScreen; + int adapt_num; + int surface_type_id; + unsigned short width; + unsigned short height; + CARD32 flags; + int refcnt; + pointer port_priv; + pointer driver_priv; +} XvMCContextRec, *XvMCContextPtr; + +typedef struct { + XID surface_id; + int surface_type_id; + XvMCContextPtr context; + pointer driver_priv; +} XvMCSurfaceRec, *XvMCSurfacePtr; + + +typedef struct { + XID subpicture_id; + int xvimage_id; + unsigned short width; + unsigned short height; + int num_palette_entries; + int entry_bytes; + char component_order[4]; + XvMCContextPtr context; + pointer driver_priv; +} XvMCSubpictureRec, *XvMCSubpicturePtr; + +typedef int (*XvMCCreateContextProcPtr) ( + XvPortPtr port, + XvMCContextPtr context, + int *num_priv, + CARD32 **priv +); + +typedef void (*XvMCDestroyContextProcPtr) ( + XvMCContextPtr context +); + +typedef int (*XvMCCreateSurfaceProcPtr) ( + XvMCSurfacePtr surface, + int *num_priv, + CARD32 **priv +); + +typedef void (*XvMCDestroySurfaceProcPtr) ( + XvMCSurfacePtr surface +); + +typedef int (*XvMCCreateSubpictureProcPtr) ( + XvMCSubpicturePtr subpicture, + int *num_priv, + CARD32 **priv +); + +typedef void (*XvMCDestroySubpictureProcPtr) ( + XvMCSubpicturePtr subpicture +); + + +typedef struct { + XvAdaptorPtr xv_adaptor; + int num_surfaces; + XvMCSurfaceInfoPtr *surfaces; + int num_subpictures; + XvImagePtr *subpictures; + XvMCCreateContextProcPtr CreateContext; + XvMCDestroyContextProcPtr DestroyContext; + XvMCCreateSurfaceProcPtr CreateSurface; + XvMCDestroySurfaceProcPtr DestroySurface; + XvMCCreateSubpictureProcPtr CreateSubpicture; + XvMCDestroySubpictureProcPtr DestroySubpicture; +} XvMCAdaptorRec, *XvMCAdaptorPtr; + +void XvMCExtensionInit(void); + +int XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr adapt); + +#endif /* _XVMC_H */ Index: xc/programs/Xserver/Xext/xvmod.c diff -u xc/programs/Xserver/Xext/xvmod.c:1.1 xc/programs/Xserver/Xext/xvmod.c:1.2 --- xc/programs/Xserver/Xext/xvmod.c:1.1 Thu Aug 13 10:45:36 1998 +++ xc/programs/Xserver/Xext/xvmod.c Sun Mar 4 23:51:55 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/xvmod.c,v 1.1 1998/08/13 14:45:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xvmod.c,v 1.2 2001/03/05 04:51:55 mvojkovi Exp $ */ #include "X.h" #include "misc.h" @@ -15,5 +15,6 @@ XvScreenInitProc = XvScreenInit; XvGetScreenIndexProc = XvGetScreenIndex; XvGetRTPortProc = XvGetRTPort; + XvMCScreenInitProc = XvMCScreenInit; } Index: xc/programs/Xserver/Xext/xvmodproc.h diff -u xc/programs/Xserver/Xext/xvmodproc.h:1.1 xc/programs/Xserver/Xext/xvmodproc.h:1.3 --- xc/programs/Xserver/Xext/xvmodproc.h:1.1 Thu Aug 13 10:45:36 1998 +++ xc/programs/Xserver/Xext/xvmodproc.h Sun Apr 8 12:33:22 2001 @@ -1,7 +1,10 @@ -/* $XFree86: xc/programs/Xserver/Xext/xvmodproc.h,v 1.1 1998/08/13 14:45:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xvmodproc.h,v 1.3 2001/04/08 16:33:22 dawes Exp $ */ +#include "xvmcext.h" + extern int (*XvGetScreenIndexProc)(void); extern unsigned long (*XvGetRTPortProc)(void); extern int (*XvScreenInitProc)(ScreenPtr); +extern int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr); extern void XvRegister(void); Index: xc/programs/Xserver/Xext/extmod/Imakefile diff -u xc/programs/Xserver/Xext/extmod/Imakefile:1.20 xc/programs/Xserver/Xext/extmod/Imakefile:1.21 --- xc/programs/Xserver/Xext/extmod/Imakefile:1.20 Tue Aug 15 12:05:33 2000 +++ xc/programs/Xserver/Xext/extmod/Imakefile Sun Mar 4 23:51:56 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/Xext/extmod/Imakefile,v 1.20 2000/08/15 16:05:33 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/Xext/extmod/Imakefile,v 1.21 2001/03/05 04:51:56 mvojkovi Exp $ XCOMM This directory is only entered if DoLoadableServer is set #define IHaveModules @@ -51,11 +51,12 @@ #endif #if BuildXvExt - XVSRCS = xvmain.c xvdisp.c xvmod.c - XVOBJS = xvmain.o xvdisp.o xvmod.o + XVSRCS = xvmain.c xvdisp.c xvmod.c xvmc.c + XVOBJS = xvmain.o xvdisp.o xvmod.o xvmc.o LinkSourceFile(xvmain.c,..) LinkSourceFile(xvdisp.c,..) LinkSourceFile(xvmod.c,..) +LinkSourceFile(xvmc.c,..) #endif #if BuildEVI Index: xc/programs/Xserver/Xext/extmod/modinit.c diff -u xc/programs/Xserver/Xext/extmod/modinit.c:1.14 xc/programs/Xserver/Xext/extmod/modinit.c:1.15 --- xc/programs/Xserver/Xext/extmod/modinit.c:1.14 Tue Aug 8 23:06:55 2000 +++ xc/programs/Xserver/Xext/extmod/modinit.c Sun Mar 4 23:51:56 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/extmod/modinit.c,v 1.14 2000/08/09 03:06:55 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/extmod/modinit.c,v 1.15 2001/03/05 04:51:56 mvojkovi Exp $ */ /* * @@ -128,8 +128,10 @@ #ifdef XV extern void XvExtensionInit(INITARGS); +extern void XvMCExtensionInit(INITARGS); extern void XvRegister(INITARGS); #include "Xv.h" +#include "XvMC.h" #endif /* @@ -277,6 +279,13 @@ NULL, XvRegister, NULL + }, + { + XvMCExtensionInit, + XvMCName, + NULL, + NULL, + NULL }, #endif { /* DON'T delete this entry ! */ Index: xc/programs/Xserver/Xi/Imakefile diff -u xc/programs/Xserver/Xi/Imakefile:3.2 xc/programs/Xserver/Xi/Imakefile:3.3 --- xc/programs/Xserver/Xi/Imakefile:3.2 Sat Apr 17 05:08:22 1999 +++ xc/programs/Xserver/Xi/Imakefile Wed Jan 17 17:13:23 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/8 1996/09/28 16:56:49 rws $ -XCOMM $XFree86: xc/programs/Xserver/Xi/Imakefile,v 3.2 1999/04/17 09:08:22 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/Xi/Imakefile,v 3.3 2001/01/17 22:13:23 dawes Exp $ + #include SRCS = allowev.c \ Index: xc/programs/Xserver/Xi/allowev.c diff -u xc/programs/Xserver/Xi/allowev.c:3.2 xc/programs/Xserver/Xi/allowev.c:3.3 --- xc/programs/Xserver/Xi/allowev.c:3.2 Sun Oct 4 05:36:57 1998 +++ xc/programs/Xserver/Xi/allowev.c Wed Jan 17 17:13:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: allowev.c /main/5 1998/02/09 15:27:57 kaleb $ */ +/* $Xorg: allowev.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/allowev.c,v 3.2 1998/10/04 09:36:57 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/allowev.c,v 3.3 2001/01/17 22:13:23 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/chgdctl.c diff -u xc/programs/Xserver/Xi/chgdctl.c:3.2 xc/programs/Xserver/Xi/chgdctl.c:3.3 --- xc/programs/Xserver/Xi/chgdctl.c:3.2 Sun Oct 4 05:36:57 1998 +++ xc/programs/Xserver/Xi/chgdctl.c Wed Jan 17 17:13:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: chgdctl.c /main/5 1998/02/09 15:28:01 kaleb $ */ +/* $Xorg: chgdctl.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgdctl.c,v 3.2 1998/10/04 09:36:57 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/chgdctl.c,v 3.3 2001/01/17 22:13:23 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/chgfctl.c diff -u xc/programs/Xserver/Xi/chgfctl.c:3.2 xc/programs/Xserver/Xi/chgfctl.c:3.3 --- xc/programs/Xserver/Xi/chgfctl.c:3.2 Sun Oct 4 05:36:58 1998 +++ xc/programs/Xserver/Xi/chgfctl.c Wed Jan 17 17:13:23 2001 @@ -1,4 +1,4 @@ -/* $TOG: chgfctl.c /main/14 1998/02/09 15:28:05 kaleb $ */ +/* $Xorg: chgfctl.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgfctl.c,v 3.2 1998/10/04 09:36:58 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/chgfctl.c,v 3.3 2001/01/17 22:13:23 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/chgkbd.c diff -u xc/programs/Xserver/Xi/chgkbd.c:3.3 xc/programs/Xserver/Xi/chgkbd.c:3.4 --- xc/programs/Xserver/Xi/chgkbd.c:3.3 Sun Oct 4 05:36:59 1998 +++ xc/programs/Xserver/Xi/chgkbd.c Wed Jan 17 17:13:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: chgkbd.c /main/21 1998/02/09 15:28:12 kaleb $ */ +/* $Xorg: chgkbd.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgkbd.c,v 3.3 1998/10/04 09:36:59 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/chgkbd.c,v 3.4 2001/01/17 22:13:24 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/chgkmap.c diff -u xc/programs/Xserver/Xi/chgkmap.c:3.1 xc/programs/Xserver/Xi/chgkmap.c:3.2 --- xc/programs/Xserver/Xi/chgkmap.c:3.1 Sun Oct 4 05:36:59 1998 +++ xc/programs/Xserver/Xi/chgkmap.c Wed Jan 17 17:13:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: chgkmap.c /main/5 1998/02/09 15:28:16 kaleb $ */ +/* $Xorg: chgkmap.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgkmap.c,v 3.1 1998/10/04 09:36:59 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/chgkmap.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/chgprop.c diff -u xc/programs/Xserver/Xi/chgprop.c:3.1 xc/programs/Xserver/Xi/chgprop.c:3.2 --- xc/programs/Xserver/Xi/chgprop.c:3.1 Sun Oct 4 05:36:59 1998 +++ xc/programs/Xserver/Xi/chgprop.c Wed Jan 17 17:13:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: chgprop.c /main/10 1998/02/09 15:28:20 kaleb $ */ +/* $Xorg: chgprop.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgprop.c,v 3.1 1998/10/04 09:36:59 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/chgprop.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/chgptr.c diff -u xc/programs/Xserver/Xi/chgptr.c:3.4 xc/programs/Xserver/Xi/chgptr.c:3.5 --- xc/programs/Xserver/Xi/chgptr.c:3.4 Sun Oct 4 05:37:00 1998 +++ xc/programs/Xserver/Xi/chgptr.c Wed Jan 17 17:13:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: chgptr.c /main/20 1998/02/09 15:28:25 kaleb $ */ +/* $Xorg: chgptr.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgptr.c,v 3.4 1998/10/04 09:37:00 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/chgptr.c,v 3.5 2001/01/17 22:13:24 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/closedev.c diff -u xc/programs/Xserver/Xi/closedev.c:3.1 xc/programs/Xserver/Xi/closedev.c:3.2 --- xc/programs/Xserver/Xi/closedev.c:3.1 Sun Oct 4 05:37:00 1998 +++ xc/programs/Xserver/Xi/closedev.c Wed Jan 17 17:13:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: closedev.c /main/8 1998/02/09 15:28:29 kaleb $ */ +/* $Xorg: closedev.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/closedev.c,v 3.1 1998/10/04 09:37:00 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/closedev.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/devbell.c diff -u xc/programs/Xserver/Xi/devbell.c:3.1 xc/programs/Xserver/Xi/devbell.c:3.2 --- xc/programs/Xserver/Xi/devbell.c:3.1 Sun Oct 4 05:37:01 1998 +++ xc/programs/Xserver/Xi/devbell.c Wed Jan 17 17:13:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: devbell.c /main/5 1998/02/09 15:28:33 kaleb $ */ +/* $Xorg: devbell.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/devbell.c,v 3.1 1998/10/04 09:37:01 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/devbell.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/exevents.c diff -u xc/programs/Xserver/Xi/exevents.c:3.7 xc/programs/Xserver/Xi/exevents.c:3.8 --- xc/programs/Xserver/Xi/exevents.c:3.7 Sat Dec 5 09:39:57 1998 +++ xc/programs/Xserver/Xi/exevents.c Wed Jan 17 17:13:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: exevents.c /main/53 1998/02/09 15:28:37 kaleb $ */ +/* $Xorg: exevents.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -40,7 +40,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/exevents.c,v 3.7 1998/12/05 14:39:57 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/exevents.c,v 3.8 2001/01/17 22:13:24 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/extinit.c diff -u xc/programs/Xserver/Xi/extinit.c:3.4 xc/programs/Xserver/Xi/extinit.c:3.5 --- xc/programs/Xserver/Xi/extinit.c:3.4 Sun Oct 4 05:37:02 1998 +++ xc/programs/Xserver/Xi/extinit.c Wed Jan 17 17:13:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: extinit.c /main/19 1998/02/09 15:28:43 kaleb $ */ +/* $Xorg: extinit.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/extinit.c,v 3.4 1998/10/04 09:37:02 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/extinit.c,v 3.5 2001/01/17 22:13:24 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/getbmap.c diff -u xc/programs/Xserver/Xi/getbmap.c:3.1 xc/programs/Xserver/Xi/getbmap.c:3.2 --- xc/programs/Xserver/Xi/getbmap.c:3.1 Sun Oct 4 05:37:03 1998 +++ xc/programs/Xserver/Xi/getbmap.c Wed Jan 17 17:13:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: getbmap.c /main/5 1998/02/09 15:28:50 kaleb $ */ +/* $Xorg: getbmap.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getbmap.c,v 3.1 1998/10/04 09:37:03 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getbmap.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/getdctl.c diff -u xc/programs/Xserver/Xi/getdctl.c:3.2 xc/programs/Xserver/Xi/getdctl.c:3.3 --- xc/programs/Xserver/Xi/getdctl.c:3.2 Sun Oct 4 05:37:03 1998 +++ xc/programs/Xserver/Xi/getdctl.c Wed Jan 17 17:13:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: getdctl.c /main/5 1998/02/09 15:28:55 kaleb $ */ +/* $Xorg: getdctl.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getdctl.c,v 3.2 1998/10/04 09:37:03 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getdctl.c,v 3.3 2001/01/17 22:13:24 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/getfctl.c diff -u xc/programs/Xserver/Xi/getfctl.c:3.2 xc/programs/Xserver/Xi/getfctl.c:3.3 --- xc/programs/Xserver/Xi/getfctl.c:3.2 Sun Oct 4 05:37:04 1998 +++ xc/programs/Xserver/Xi/getfctl.c Wed Jan 17 17:13:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: getfctl.c /main/14 1998/02/09 15:29:01 kaleb $ */ +/* $Xorg: getfctl.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getfctl.c,v 3.2 1998/10/04 09:37:04 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getfctl.c,v 3.3 2001/01/17 22:13:24 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/getfocus.c diff -u xc/programs/Xserver/Xi/getfocus.c:3.1 xc/programs/Xserver/Xi/getfocus.c:3.2 --- xc/programs/Xserver/Xi/getfocus.c:3.1 Sun Oct 4 05:37:04 1998 +++ xc/programs/Xserver/Xi/getfocus.c Wed Jan 17 17:13:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: getfocus.c /main/6 1998/02/09 15:29:07 kaleb $ */ +/* $Xorg: getfocus.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getfocus.c,v 3.1 1998/10/04 09:37:04 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getfocus.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/getkmap.c diff -u xc/programs/Xserver/Xi/getkmap.c:3.2 xc/programs/Xserver/Xi/getkmap.c:3.3 --- xc/programs/Xserver/Xi/getkmap.c:3.2 Sun Oct 4 05:37:05 1998 +++ xc/programs/Xserver/Xi/getkmap.c Wed Jan 17 17:13:24 2001 @@ -1,4 +1,4 @@ -/* $TOG: getkmap.c /main/6 1998/02/09 15:29:13 kaleb $ */ +/* $Xorg: getkmap.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getkmap.c,v 3.2 1998/10/04 09:37:05 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getkmap.c,v 3.3 2001/01/17 22:13:24 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/getmmap.c diff -u xc/programs/Xserver/Xi/getmmap.c:3.1 xc/programs/Xserver/Xi/getmmap.c:3.2 --- xc/programs/Xserver/Xi/getmmap.c:3.1 Sun Oct 4 05:37:05 1998 +++ xc/programs/Xserver/Xi/getmmap.c Wed Jan 17 17:13:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: getmmap.c /main/5 1998/02/09 15:29:19 kaleb $ */ +/* $Xorg: getmmap.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getmmap.c,v 3.1 1998/10/04 09:37:05 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getmmap.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/getprop.c diff -u xc/programs/Xserver/Xi/getprop.c:3.3 xc/programs/Xserver/Xi/getprop.c:3.4 --- xc/programs/Xserver/Xi/getprop.c:3.3 Sun Oct 4 05:37:06 1998 +++ xc/programs/Xserver/Xi/getprop.c Wed Jan 17 17:13:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: getprop.c /main/8 1998/02/09 15:29:25 kaleb $ */ +/* $Xorg: getprop.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getprop.c,v 3.3 1998/10/04 09:37:06 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getprop.c,v 3.4 2001/01/17 22:13:25 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/getselev.c diff -u xc/programs/Xserver/Xi/getselev.c:3.3 xc/programs/Xserver/Xi/getselev.c:3.4 --- xc/programs/Xserver/Xi/getselev.c:3.3 Sun Oct 4 05:37:06 1998 +++ xc/programs/Xserver/Xi/getselev.c Wed Jan 17 17:13:25 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xi/getselev.c,v 3.3 1998/10/04 09:37:06 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getselev.c,v 3.4 2001/01/17 22:13:25 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -41,7 +41,7 @@ ********************************************************/ -/* $TOG: getselev.c /main/9 1998/02/09 15:29:30 kaleb $ */ +/* $Xorg: getselev.c,v 1.3 2000/08/17 19:48:01 cpqbld Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/getvers.c diff -u xc/programs/Xserver/Xi/getvers.c:3.1 xc/programs/Xserver/Xi/getvers.c:3.2 --- xc/programs/Xserver/Xi/getvers.c:3.1 Sun Oct 4 05:37:07 1998 +++ xc/programs/Xserver/Xi/getvers.c Wed Jan 17 17:13:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: getvers.c /main/7 1998/02/09 15:29:34 kaleb $ */ +/* $Xorg: getvers.c,v 1.3 2000/08/17 19:48:01 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getvers.c,v 3.1 1998/10/04 09:37:07 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getvers.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/grabdev.c diff -u xc/programs/Xserver/Xi/grabdev.c:3.1 xc/programs/Xserver/Xi/grabdev.c:3.2 --- xc/programs/Xserver/Xi/grabdev.c:3.1 Sun Oct 4 05:37:07 1998 +++ xc/programs/Xserver/Xi/grabdev.c Wed Jan 17 17:13:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: grabdev.c /main/10 1998/02/09 15:29:47 kaleb $ */ +/* $Xorg: grabdev.c,v 1.3 2000/08/17 19:48:01 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/grabdev.c,v 3.1 1998/10/04 09:37:07 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/grabdev.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/grabdevb.c diff -u xc/programs/Xserver/Xi/grabdevb.c:3.1 xc/programs/Xserver/Xi/grabdevb.c:3.2 --- xc/programs/Xserver/Xi/grabdevb.c:3.1 Sun Oct 4 05:37:08 1998 +++ xc/programs/Xserver/Xi/grabdevb.c Wed Jan 17 17:13:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: grabdevb.c /main/10 1998/02/09 15:29:38 kaleb $ */ +/* $Xorg: grabdevb.c,v 1.3 2000/08/17 19:48:01 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/grabdevb.c,v 3.1 1998/10/04 09:37:08 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/grabdevb.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/grabdevk.c diff -u xc/programs/Xserver/Xi/grabdevk.c:3.1 xc/programs/Xserver/Xi/grabdevk.c:3.2 --- xc/programs/Xserver/Xi/grabdevk.c:3.1 Sun Oct 4 05:37:08 1998 +++ xc/programs/Xserver/Xi/grabdevk.c Wed Jan 17 17:13:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: grabdevk.c /main/9 1998/02/09 15:29:42 kaleb $ */ +/* $Xorg: grabdevk.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/grabdevk.c,v 3.1 1998/10/04 09:37:08 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/grabdevk.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/gtmotion.c diff -u xc/programs/Xserver/Xi/gtmotion.c:3.4 xc/programs/Xserver/Xi/gtmotion.c:3.5 --- xc/programs/Xserver/Xi/gtmotion.c:3.4 Sun Oct 4 05:37:09 1998 +++ xc/programs/Xserver/Xi/gtmotion.c Wed Jan 17 17:13:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: gtmotion.c /main/13 1998/02/09 15:29:51 kaleb $ */ /*ALLOC-FIX*/ +/* $Xorg: gtmotion.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/gtmotion.c,v 3.4 1998/10/04 09:37:09 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/gtmotion.c,v 3.5 2001/01/17 22:13:25 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/listdev.c diff -u xc/programs/Xserver/Xi/listdev.c:3.2 xc/programs/Xserver/Xi/listdev.c:3.3 --- xc/programs/Xserver/Xi/listdev.c:3.2 Sun Oct 4 05:37:12 1998 +++ xc/programs/Xserver/Xi/listdev.c Wed Jan 17 17:13:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: listdev.c /main/13 1998/02/09 15:29:56 kaleb $ */ +/* $Xorg: listdev.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/listdev.c,v 3.2 1998/10/04 09:37:12 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/listdev.c,v 3.3 2001/01/17 22:13:25 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/opendev.c diff -u xc/programs/Xserver/Xi/opendev.c:3.1 xc/programs/Xserver/Xi/opendev.c:3.2 --- xc/programs/Xserver/Xi/opendev.c:3.1 Sun Oct 4 05:37:12 1998 +++ xc/programs/Xserver/Xi/opendev.c Wed Jan 17 17:13:25 2001 @@ -1,4 +1,4 @@ -/* $TOG: opendev.c /main/9 1998/02/09 15:30:00 kaleb $ */ +/* $Xorg: opendev.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/opendev.c,v 3.1 1998/10/04 09:37:12 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/opendev.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/queryst.c diff -u xc/programs/Xserver/Xi/queryst.c:3.3 xc/programs/Xserver/Xi/queryst.c:3.4 --- xc/programs/Xserver/Xi/queryst.c:3.3 Sun Oct 4 05:37:13 1998 +++ xc/programs/Xserver/Xi/queryst.c Wed Jan 17 17:13:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: queryst.c /main/12 1998/02/09 15:30:05 kaleb $ */ +/* $Xorg: queryst.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ /* Copyright 1998, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/Xi/queryst.c,v 3.3 1998/10/04 09:37:13 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/queryst.c,v 3.4 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/selectev.c diff -u xc/programs/Xserver/Xi/selectev.c:3.1 xc/programs/Xserver/Xi/selectev.c:3.2 --- xc/programs/Xserver/Xi/selectev.c:3.1 Sun Oct 4 05:37:13 1998 +++ xc/programs/Xserver/Xi/selectev.c Wed Jan 17 17:13:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: selectev.c /main/7 1998/02/09 15:30:09 kaleb $ */ +/* $Xorg: selectev.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/selectev.c,v 3.1 1998/10/04 09:37:13 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/selectev.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/sendexev.c diff -u xc/programs/Xserver/Xi/sendexev.c:3.1 xc/programs/Xserver/Xi/sendexev.c:3.2 --- xc/programs/Xserver/Xi/sendexev.c:3.1 Sun Oct 4 05:37:14 1998 +++ xc/programs/Xserver/Xi/sendexev.c Wed Jan 17 17:13:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: sendexev.c /main/7 1998/02/09 15:30:14 kaleb $ */ +/* $Xorg: sendexev.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/sendexev.c,v 3.1 1998/10/04 09:37:14 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/sendexev.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/setbmap.c diff -u xc/programs/Xserver/Xi/setbmap.c:3.1 xc/programs/Xserver/Xi/setbmap.c:3.2 --- xc/programs/Xserver/Xi/setbmap.c:3.1 Sun Oct 4 05:37:14 1998 +++ xc/programs/Xserver/Xi/setbmap.c Wed Jan 17 17:13:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: setbmap.c /main/6 1998/02/09 15:30:18 kaleb $ */ +/* $Xorg: setbmap.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/setbmap.c,v 3.1 1998/10/04 09:37:14 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/setbmap.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/setdval.c diff -u xc/programs/Xserver/Xi/setdval.c:3.1 xc/programs/Xserver/Xi/setdval.c:3.2 --- xc/programs/Xserver/Xi/setdval.c:3.1 Sun Oct 4 05:37:15 1998 +++ xc/programs/Xserver/Xi/setdval.c Wed Jan 17 17:13:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: setdval.c /main/5 1998/02/09 15:30:22 kaleb $ */ +/* $Xorg: setdval.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/setdval.c,v 3.1 1998/10/04 09:37:15 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/setdval.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/setfocus.c diff -u xc/programs/Xserver/Xi/setfocus.c:3.1 xc/programs/Xserver/Xi/setfocus.c:3.2 --- xc/programs/Xserver/Xi/setfocus.c:3.1 Sun Oct 4 05:37:15 1998 +++ xc/programs/Xserver/Xi/setfocus.c Wed Jan 17 17:13:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: setfocus.c /main/7 1998/02/09 15:30:28 kaleb $ */ +/* $Xorg: setfocus.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/setfocus.c,v 3.1 1998/10/04 09:37:15 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/setfocus.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/setmmap.c diff -u xc/programs/Xserver/Xi/setmmap.c:3.1 xc/programs/Xserver/Xi/setmmap.c:3.2 --- xc/programs/Xserver/Xi/setmmap.c:3.1 Sun Oct 4 05:37:16 1998 +++ xc/programs/Xserver/Xi/setmmap.c Wed Jan 17 17:13:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: setmmap.c /main/7 1998/02/09 15:30:32 kaleb $ */ +/* $Xorg: setmmap.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/setmmap.c,v 3.1 1998/10/04 09:37:16 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/setmmap.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/setmode.c diff -u xc/programs/Xserver/Xi/setmode.c:3.1 xc/programs/Xserver/Xi/setmode.c:3.2 --- xc/programs/Xserver/Xi/setmode.c:3.1 Sun Oct 4 05:37:16 1998 +++ xc/programs/Xserver/Xi/setmode.c Wed Jan 17 17:13:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: setmode.c /main/11 1998/02/09 15:30:36 kaleb $ */ +/* $Xorg: setmode.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/setmode.c,v 3.1 1998/10/04 09:37:16 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/setmode.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/stubs.c diff -u xc/programs/Xserver/Xi/stubs.c:3.2 xc/programs/Xserver/Xi/stubs.c:3.3 --- xc/programs/Xserver/Xi/stubs.c:3.2 Sun Oct 4 05:37:17 1998 +++ xc/programs/Xserver/Xi/stubs.c Wed Jan 17 17:13:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: stubs.c /main/12 1998/02/09 15:30:40 kaleb $ */ +/* $Xorg: stubs.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/stubs.c,v 3.2 1998/10/04 09:37:17 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/stubs.c,v 3.3 2001/01/17 22:13:26 dawes Exp $ */ /* * stubs.c -- stub routines for the X server side of the XINPUT Index: xc/programs/Xserver/Xi/ungrdev.c diff -u xc/programs/Xserver/Xi/ungrdev.c:3.1 xc/programs/Xserver/Xi/ungrdev.c:3.2 --- xc/programs/Xserver/Xi/ungrdev.c:3.1 Sun Oct 4 05:37:17 1998 +++ xc/programs/Xserver/Xi/ungrdev.c Wed Jan 17 17:13:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: ungrdev.c /main/5 1998/02/09 15:30:54 kaleb $ */ +/* $Xorg: ungrdev.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/ungrdev.c,v 3.1 1998/10/04 09:37:17 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/ungrdev.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/ungrdevb.c diff -u xc/programs/Xserver/Xi/ungrdevb.c:3.2 xc/programs/Xserver/Xi/ungrdevb.c:3.3 --- xc/programs/Xserver/Xi/ungrdevb.c:3.2 Sun Oct 4 05:37:18 1998 +++ xc/programs/Xserver/Xi/ungrdevb.c Wed Jan 17 17:13:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: ungrdevb.c /main/8 1998/02/09 15:30:44 kaleb $ */ +/* $Xorg: ungrdevb.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/ungrdevb.c,v 3.2 1998/10/04 09:37:18 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/ungrdevb.c,v 3.3 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/ungrdevk.c diff -u xc/programs/Xserver/Xi/ungrdevk.c:3.2 xc/programs/Xserver/Xi/ungrdevk.c:3.3 --- xc/programs/Xserver/Xi/ungrdevk.c:3.2 Sun Oct 4 05:37:18 1998 +++ xc/programs/Xserver/Xi/ungrdevk.c Wed Jan 17 17:13:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: ungrdevk.c /main/8 1998/02/09 15:30:50 kaleb $ */ +/* $Xorg: ungrdevk.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ /************************************************************ @@ -41,7 +41,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/ungrdevk.c,v 3.2 1998/10/04 09:37:18 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/ungrdevk.c,v 3.3 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/XpConfig/README diff -u xc/programs/Xserver/XpConfig/README:1.1.1.1 xc/programs/Xserver/XpConfig/README:1.1.1.2 --- xc/programs/Xserver/XpConfig/README:1.1.1.1 Tue Dec 24 04:56:40 1996 +++ xc/programs/Xserver/XpConfig/README Tue Jan 16 17:40:23 2001 @@ -315,4 +315,4 @@ -$XConsortium: README /main/1 1996/12/15 21:53:55 rws $ +$Xorg: README,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ Index: xc/programs/Xserver/XpConfig/C/print/Xprinters diff -u xc/programs/Xserver/XpConfig/C/print/Xprinters:1.1.1.1 xc/programs/Xserver/XpConfig/C/print/Xprinters:1.1.1.2 --- xc/programs/Xserver/XpConfig/C/print/Xprinters:1.1.1.1 Sat Dec 21 23:08:00 1996 +++ xc/programs/Xserver/XpConfig/C/print/Xprinters Tue Jan 16 17:40:23 2001 @@ -1,6 +1,6 @@ ######################################################################## # -# $XConsortium: Xprinters /main/1 1996/11/24 16:23:30 rws $ +# $Xorg: Xprinters,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ # # X*printers sample configuration file # Index: xc/programs/Xserver/XpConfig/C/print/attributes/document diff -u xc/programs/Xserver/XpConfig/C/print/attributes/document:1.1.1.1 xc/programs/Xserver/XpConfig/C/print/attributes/document:1.1.1.2 --- xc/programs/Xserver/XpConfig/C/print/attributes/document:1.1.1.1 Sat Dec 21 23:08:00 1996 +++ xc/programs/Xserver/XpConfig/C/print/attributes/document Tue Jan 16 17:40:23 2001 @@ -1,4 +1,4 @@ -# $XConsortium: document /main/2 1996/12/04 10:45:14 rws $ +# $Xorg: document,v 1.3 2000/08/17 19:48:03 cpqbld Exp $ # Document DPA-Object initial attribute values # Attribute IDs must be qualified by using one of the following Index: xc/programs/Xserver/XpConfig/C/print/attributes/job diff -u xc/programs/Xserver/XpConfig/C/print/attributes/job:1.1.1.1 xc/programs/Xserver/XpConfig/C/print/attributes/job:1.1.1.2 --- xc/programs/Xserver/XpConfig/C/print/attributes/job:1.1.1.1 Sat Dec 21 23:08:01 1996 +++ xc/programs/Xserver/XpConfig/C/print/attributes/job Tue Jan 16 17:40:24 2001 @@ -1,4 +1,4 @@ -# $XConsortium: job /main/2 1996/12/04 10:45:23 rws $ +# $Xorg: job,v 1.3 2000/08/17 19:48:03 cpqbld Exp $ # Job DPA-Object initial attribute values # Attribute IDs must be qualified by using one of the following Index: xc/programs/Xserver/XpConfig/C/print/attributes/printer diff -u xc/programs/Xserver/XpConfig/C/print/attributes/printer:1.1.1.1 xc/programs/Xserver/XpConfig/C/print/attributes/printer:1.1.1.2 --- xc/programs/Xserver/XpConfig/C/print/attributes/printer:1.1.1.1 Sat Dec 21 23:08:01 1996 +++ xc/programs/Xserver/XpConfig/C/print/attributes/printer Tue Jan 16 17:40:24 2001 @@ -1,4 +1,4 @@ -# $XConsortium: printer /main/2 1996/12/04 10:45:27 rws $ +# $Xorg: printer,v 1.3 2000/08/17 19:48:03 cpqbld Exp $ # Printer DPA-Object initial attribute values # Attribute IDs must be qualified by using one of the following Index: xc/programs/Xserver/XpConfig/C/print/ddx-config/raster/pcl diff -u xc/programs/Xserver/XpConfig/C/print/ddx-config/raster/pcl:1.1.1.1 xc/programs/Xserver/XpConfig/C/print/ddx-config/raster/pcl:1.1.1.2 --- xc/programs/Xserver/XpConfig/C/print/ddx-config/raster/pcl:1.1.1.1 Sat Dec 21 23:08:02 1996 +++ xc/programs/Xserver/XpConfig/C/print/ddx-config/raster/pcl Tue Jan 16 17:40:24 2001 @@ -1,4 +1,4 @@ -# $XConsortium: pcl /main/2 1996/12/04 10:45:32 rws $ +# $Xorg: pcl,v 1.3 2000/08/17 19:48:03 cpqbld Exp $ # This is the file which you should customize to include the printers that # will print through the raster driver. The early part of this file # specifies some commn useful defaults. You can override them when Index: xc/programs/Xserver/XpConfig/C/print/models/HPDJ1600C/model-config diff -u xc/programs/Xserver/XpConfig/C/print/models/HPDJ1600C/model-config:1.1.1.1 xc/programs/Xserver/XpConfig/C/print/models/HPDJ1600C/model-config:1.1.1.2 --- xc/programs/Xserver/XpConfig/C/print/models/HPDJ1600C/model-config:1.1.1.1 Sat Dec 21 23:08:02 1996 +++ xc/programs/Xserver/XpConfig/C/print/models/HPDJ1600C/model-config Tue Jan 16 17:40:25 2001 @@ -1,4 +1,4 @@ -# $XConsortium: model-config /main/3 1996/12/09 07:10:16 kaleb $ +# $Xorg: model-config,v 1.3 2000/08/17 19:48:04 cpqbld Exp $ # This is the configuration file for the HP DeskJet 1600C printer. # # The CDEnext SI supports two 1600C drivers XP-PCL-MONO and Index: xc/programs/Xserver/XpConfig/C/print/models/HPDJ1600C/fonts/README diff -u xc/programs/Xserver/XpConfig/C/print/models/HPDJ1600C/fonts/README:1.1.1.1 xc/programs/Xserver/XpConfig/C/print/models/HPDJ1600C/fonts/README:1.1.1.2 --- xc/programs/Xserver/XpConfig/C/print/models/HPDJ1600C/fonts/README:1.1.1.1 Sat Dec 21 23:08:03 1996 +++ xc/programs/Xserver/XpConfig/C/print/models/HPDJ1600C/fonts/README Tue Jan 16 17:40:27 2001 @@ -1,4 +1,4 @@ -$XConsortium: README /main/2 1996/12/09 07:15:00 kaleb $ +$Xorg: README,v 1.3 2000/08/17 19:48:04 cpqbld Exp $ This directory contains "printer metric files" for the X Print Server suitable for the DeskJet 1600C printer. The following Index: xc/programs/Xserver/XpConfig/C/print/models/HPLJ4family/model-config diff -u xc/programs/Xserver/XpConfig/C/print/models/HPLJ4family/model-config:1.1.1.1 xc/programs/Xserver/XpConfig/C/print/models/HPLJ4family/model-config:1.1.1.2 --- xc/programs/Xserver/XpConfig/C/print/models/HPLJ4family/model-config:1.1.1.1 Sat Dec 21 23:08:04 1996 +++ xc/programs/Xserver/XpConfig/C/print/models/HPLJ4family/model-config Tue Jan 16 17:40:45 2001 @@ -1,4 +1,4 @@ -# $XConsortium: model-config /main/2 1996/12/09 07:10:35 kaleb $ +# $Xorg: model-config,v 1.3 2000/08/17 19:48:04 cpqbld Exp $ # This is the configuration file for the HP LaserJet 4 Printers. # # Though not a deliverable for the CDEnext SI, the XP-PCL-MONO Index: xc/programs/Xserver/XpConfig/C/print/models/HPLJ4family/fonts/README diff -u xc/programs/Xserver/XpConfig/C/print/models/HPLJ4family/fonts/README:1.1.1.1 xc/programs/Xserver/XpConfig/C/print/models/HPLJ4family/fonts/README:1.1.1.2 --- xc/programs/Xserver/XpConfig/C/print/models/HPLJ4family/fonts/README:1.1.1.1 Sat Dec 21 23:08:04 1996 +++ xc/programs/Xserver/XpConfig/C/print/models/HPLJ4family/fonts/README Tue Jan 16 17:40:51 2001 @@ -1,4 +1,4 @@ -$XConsortium: README /main/2 1996/12/09 07:15:18 kaleb $ +$Xorg: README,v 1.3 2000/08/17 19:48:04 cpqbld Exp $ This directory contains "printer metric files" for the X Print Server suitable for the LaserJet 4 family of printers - 4, 4L, Index: xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/model-config diff -u xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/model-config:1.1.1.1 xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/model-config:1.1.1.2 --- xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/model-config:1.1.1.1 Sat Dec 21 23:08:05 1996 +++ xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/model-config Tue Jan 16 17:41:05 2001 @@ -1,4 +1,4 @@ -# $XConsortium: model-config /main/2 1996/12/09 07:10:48 kaleb $ +# $Xorg: model-config,v 1.3 2000/08/17 19:48:04 cpqbld Exp $ SPSPARC2.printer-model: "SunPics SPARCprinter II" SPSPARC2.printer-resolutions-supported: 300 SPSPARC2.content-orientations-supported: portrait landscape Index: xc/programs/Xserver/Xprint/AttrValid.c diff -u xc/programs/Xserver/Xprint/AttrValid.c:1.3 xc/programs/Xserver/Xprint/AttrValid.c:1.4 --- xc/programs/Xserver/Xprint/AttrValid.c:1.3 Wed Dec 15 21:26:23 1999 +++ xc/programs/Xserver/Xprint/AttrValid.c Wed Jan 17 17:36:27 2001 @@ -1,6 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xprint/AttrValid.c,v 1.3 1999/12/16 02:26:23 robin Exp $ */ - -/* $XConsortium: AttrValid.c /main/2 1996/11/16 15:23:21 rws $ */ +/* $Xorg: AttrValid.c,v 1.3 2000/08/17 19:48:04 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -32,6 +30,8 @@ dealings in this Software without prior written authorization from said copyright holders. */ +/* $XFree86: xc/programs/Xserver/Xprint/AttrValid.c,v 1.4 2001/01/17 22:36:27 dawes Exp $ */ + #include #include "attributes.h" Index: xc/programs/Xserver/Xprint/AttrValid.h diff -u xc/programs/Xserver/Xprint/AttrValid.h:1.3 xc/programs/Xserver/Xprint/AttrValid.h:1.4 --- xc/programs/Xserver/Xprint/AttrValid.h:1.3 Wed Dec 15 21:26:24 1999 +++ xc/programs/Xserver/Xprint/AttrValid.h Wed Jan 17 17:36:28 2001 @@ -1,6 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xprint/AttrValid.h,v 1.3 1999/12/16 02:26:24 robin Exp $ */ - -/* $XConsortium: AttrValid.h /main/1 1996/09/28 16:57:36 rws $ */ +/* $Xorg: AttrValid.h,v 1.3 2000/08/17 19:48:04 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -32,6 +30,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ +/* $XFree86: xc/programs/Xserver/Xprint/AttrValid.h,v 1.4 2001/01/17 22:36:28 dawes Exp $ */ #ifndef _Xp_AttrValid_h #define _Xp_AttrValid_h Index: xc/programs/Xserver/Xprint/DiPrint.h diff -u xc/programs/Xserver/Xprint/DiPrint.h:1.3 xc/programs/Xserver/Xprint/DiPrint.h:1.4 --- xc/programs/Xserver/Xprint/DiPrint.h:1.3 Wed Dec 15 21:26:24 1999 +++ xc/programs/Xserver/Xprint/DiPrint.h Wed Jan 17 17:36:28 2001 @@ -1,6 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xprint/DiPrint.h,v 1.3 1999/12/16 02:26:24 robin Exp $ */ - -/* $XConsortium: DiPrint.h /main/1 1996/09/28 16:57:42 rws $ */ +/* $Xorg: DiPrint.h,v 1.3 2000/08/17 19:48:04 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -32,6 +30,8 @@ dealings in this Software without prior written authorization from said copyright holders. */ +/* $XFree86: xc/programs/Xserver/Xprint/DiPrint.h,v 1.4 2001/01/17 22:36:28 dawes Exp $ */ + /* * The XpDiListEntry struct is the type of each element of the array * handed back to the extension code to handle a GetPrinterList request. Index: xc/programs/Xserver/Xprint/Imakefile diff -u xc/programs/Xserver/Xprint/Imakefile:1.14 xc/programs/Xserver/Xprint/Imakefile:1.16 --- xc/programs/Xserver/Xprint/Imakefile:1.14 Tue Jan 4 21:03:09 2000 +++ xc/programs/Xserver/Xprint/Imakefile Fri Apr 20 11:51:16 2001 @@ -1,9 +1,10 @@ -XCOMM $TOG: Imakefile /main/5 1997/11/14 11:11:40 kaleb $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:04 cpqbld Exp $ -XCOMM $XFree86: xc/programs/Xserver/Xprint/Imakefile,v 1.14 2000/01/05 02:03:09 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/Xprint/Imakefile,v 1.16 2001/04/20 15:51:16 tsi Exp $ + #include #ifndef XpRasterDDX @@ -68,7 +69,6 @@ PSDEF = -DXPPSDDX #endif -OS_DEFINES = ServerOSDefines #if HasMkstemp MKTMP_DEFINES = -DHAS_MKSTEMP #endif Index: xc/programs/Xserver/Xprint/Init.c diff -u xc/programs/Xserver/Xprint/Init.c:1.8 xc/programs/Xserver/Xprint/Init.c:1.9 --- xc/programs/Xserver/Xprint/Init.c:1.8 Tue Nov 14 13:20:33 2000 +++ xc/programs/Xserver/Xprint/Init.c Wed Jan 17 17:36:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: Init.c /main/6 1997/06/12 09:59:34 samborn $ */ +/* $Xorg: Init.c,v 1.4 2000/08/17 19:48:05 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -50,7 +50,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/Init.c,v 1.8 2000/11/14 18:20:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/Init.c,v 1.9 2001/01/17 22:36:28 dawes Exp $ */ #include #include @@ -142,7 +142,7 @@ const char *LIST_QUEUES = "LANG=C lpstat -v | " "nawk '" " $2 == \"for\" " - " { print $10 }' " + " { print $4 }' " " | sort"; #else #ifdef __uxp__ Index: xc/programs/Xserver/Xprint/Oid.c diff -u xc/programs/Xserver/Xprint/Oid.c:1.3 xc/programs/Xserver/Xprint/Oid.c:1.4 --- xc/programs/Xserver/Xprint/Oid.c:1.3 Sun Dec 12 21:12:47 1999 +++ xc/programs/Xserver/Xprint/Oid.c Wed Jan 17 17:36:28 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: Oid.c /main/2 1996/12/11 15:26:39 lehors $ */ +/* $Xorg: Oid.c,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -30,7 +30,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/Oid.c,v 1.3 1999/12/13 02:12:47 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/Oid.c,v 1.4 2001/01/17 22:36:28 dawes Exp $ */ #include "attributes.h" Index: xc/programs/Xserver/Xprint/Oid.h diff -u xc/programs/Xserver/Xprint/Oid.h:1.3 xc/programs/Xserver/Xprint/Oid.h:1.4 --- xc/programs/Xserver/Xprint/Oid.h:1.3 Wed Dec 15 21:26:24 1999 +++ xc/programs/Xserver/Xprint/Oid.h Wed Jan 17 17:36:28 2001 @@ -1,6 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xprint/Oid.h,v 1.3 1999/12/16 02:26:24 robin Exp $ */ - -/* $XConsortium: Oid.h /main/1 1996/09/28 16:58:20 rws $ */ +/* $Xorg: Oid.h,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -32,6 +30,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ +/* $XFree86: xc/programs/Xserver/Xprint/Oid.h,v 1.4 2001/01/17 22:36:28 dawes Exp $ */ #ifndef _Xp_Oid_h #define _Xp_Oid_h Index: xc/programs/Xserver/Xprint/OidDefs.h diff -u xc/programs/Xserver/Xprint/OidDefs.h:1.1.1.1 xc/programs/Xserver/Xprint/OidDefs.h:1.1.1.2 --- xc/programs/Xserver/Xprint/OidDefs.h:1.1.1.1 Sat Dec 21 23:08:07 1996 +++ xc/programs/Xserver/Xprint/OidDefs.h Tue Jan 16 17:41:45 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: OidDefs.h /main/1 1996/09/28 16:58:29 rws $ */ +/* $Xorg: OidDefs.h,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. Index: xc/programs/Xserver/Xprint/OidStrs.h diff -u xc/programs/Xserver/Xprint/OidStrs.h:1.3 xc/programs/Xserver/Xprint/OidStrs.h:1.4 --- xc/programs/Xserver/Xprint/OidStrs.h:1.3 Wed Dec 15 21:26:25 1999 +++ xc/programs/Xserver/Xprint/OidStrs.h Wed Jan 17 17:36:28 2001 @@ -1,6 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xprint/OidStrs.h,v 1.3 1999/12/16 02:26:25 robin Exp $ */ - -/* $XConsortium: OidStrs.h /main/1 1996/09/28 16:58:35 rws $ */ +/* $Xorg: OidStrs.h,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -32,6 +30,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ +/* $XFree86: xc/programs/Xserver/Xprint/OidStrs.h,v 1.4 2001/01/17 22:36:28 dawes Exp $ */ static int XpOidStringMapCount = 117; Index: xc/programs/Xserver/Xprint/Quarks.c diff -u xc/programs/Xserver/Xprint/Quarks.c:1.3 xc/programs/Xserver/Xprint/Quarks.c:1.4 --- xc/programs/Xserver/Xprint/Quarks.c:1.3 Wed Dec 15 21:26:25 1999 +++ xc/programs/Xserver/Xprint/Quarks.c Wed Jan 17 17:36:28 2001 @@ -1,7 +1,7 @@ -/* $XFree86: xc/programs/Xserver/Xprint/Quarks.c,v 1.3 1999/12/16 02:26:25 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/Quarks.c,v 1.4 2001/01/17 22:36:28 dawes Exp $ */ /* - * $XConsortium: Quarks.c /main/1 1996/09/28 16:58:44 rws $ + * $Xorg: Quarks.c,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company Index: xc/programs/Xserver/Xprint/Util.c diff -u xc/programs/Xserver/Xprint/Util.c:1.10 xc/programs/Xserver/Xprint/Util.c:1.11 --- xc/programs/Xserver/Xprint/Util.c:1.10 Sun Dec 12 21:12:49 1999 +++ xc/programs/Xserver/Xprint/Util.c Wed Jan 17 17:36:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: Util.c /main/4 1998/03/25 09:17:45 kaleb $ */ +/* $Xorg: Util.c,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -30,7 +30,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/Util.c,v 1.10 1999/12/13 02:12:49 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/Util.c,v 1.11 2001/01/17 22:36:28 dawes Exp $ */ /* To get the tempnam() prototype in */ #if defined(linux) && defined(__STRICT_ANSI__) Index: xc/programs/Xserver/Xprint/ValTree.c diff -u xc/programs/Xserver/Xprint/ValTree.c:1.1.1.1 xc/programs/Xserver/Xprint/ValTree.c:1.1.1.2 --- xc/programs/Xserver/Xprint/ValTree.c:1.1.1.1 Sat Dec 21 23:08:07 1996 +++ xc/programs/Xserver/Xprint/ValTree.c Tue Jan 16 17:41:46 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: ValTree.c /main/1 1996/09/28 16:58:58 rws $ */ +/* $Xorg: ValTree.c,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. Index: xc/programs/Xserver/Xprint/Xlcint.h diff -u xc/programs/Xserver/Xprint/Xlcint.h:1.1.1.1 xc/programs/Xserver/Xprint/Xlcint.h:1.1.1.2 --- xc/programs/Xserver/Xprint/Xlcint.h:1.1.1.1 Sat Dec 21 23:08:08 1996 +++ xc/programs/Xserver/Xprint/Xlcint.h Tue Jan 16 17:41:47 2001 @@ -1,5 +1,5 @@ /* - * $XConsortium: Xlcint.h /main/1 1996/09/28 16:59:05 rws $ + * $Xorg: Xlcint.h,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company Index: xc/programs/Xserver/Xprint/Xresource.h diff -u xc/programs/Xserver/Xprint/Xresource.h:1.5 xc/programs/Xserver/Xprint/Xresource.h:1.6 --- xc/programs/Xserver/Xprint/Xresource.h:1.5 Thu Sep 28 16:17:06 2000 +++ xc/programs/Xserver/Xprint/Xresource.h Wed Jan 17 17:36:28 2001 @@ -1,6 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xprint/Xresource.h,v 1.5 2000/09/28 20:17:06 tsi Exp $ */ - -/* $XConsortium: Xresource.h /main/1 1996/09/28 16:59:12 rws $ */ +/* $Xorg: Xresource.h,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -32,6 +30,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ +/* $XFree86: xc/programs/Xserver/Xprint/Xresource.h,v 1.6 2001/01/17 22:36:28 dawes Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, Index: xc/programs/Xserver/Xprint/Xrm.c diff -u xc/programs/Xserver/Xprint/Xrm.c:1.6 xc/programs/Xserver/Xprint/Xrm.c:1.7 --- xc/programs/Xserver/Xprint/Xrm.c:1.6 Sun Dec 12 21:12:49 1999 +++ xc/programs/Xserver/Xprint/Xrm.c Wed Jan 17 17:36:28 2001 @@ -1,5 +1,5 @@ /* - * $TOG: Xrm.c /main/4 1997/06/22 07:14:18 kaleb $ + * $Xorg: Xrm.c,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company @@ -57,7 +57,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/Xrm.c,v 1.6 1999/12/13 02:12:49 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/Xrm.c,v 1.7 2001/01/17 22:36:28 dawes Exp $ */ #include #include Index: xc/programs/Xserver/Xprint/XrmI.h diff -u xc/programs/Xserver/Xprint/XrmI.h:1.1.1.1 xc/programs/Xserver/Xprint/XrmI.h:1.1.1.2 --- xc/programs/Xserver/Xprint/XrmI.h:1.1.1.1 Sat Dec 21 23:08:09 1996 +++ xc/programs/Xserver/Xprint/XrmI.h Tue Jan 16 17:41:49 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XrmI.h /main/1 1996/09/28 16:59:28 rws $ */ +/* $Xorg: XrmI.h,v 1.3 2000/08/17 19:48:07 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. Index: xc/programs/Xserver/Xprint/attributes.c diff -u xc/programs/Xserver/Xprint/attributes.c:1.11 xc/programs/Xserver/Xprint/attributes.c:1.12 --- xc/programs/Xserver/Xprint/attributes.c:1.11 Wed Nov 1 21:51:14 2000 +++ xc/programs/Xserver/Xprint/attributes.c Wed Jan 17 17:36:28 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: attributes.c /main/6 1996/12/30 14:56:11 kaleb $ */ +/* $Xorg: attributes.c,v 1.3 2000/08/17 19:48:07 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -44,7 +44,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/attributes.c,v 1.11 2000/11/02 02:51:14 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/attributes.c,v 1.12 2001/01/17 22:36:28 dawes Exp $ */ #include #include Index: xc/programs/Xserver/Xprint/attributes.h diff -u xc/programs/Xserver/Xprint/attributes.h:1.3 xc/programs/Xserver/Xprint/attributes.h:1.4 --- xc/programs/Xserver/Xprint/attributes.h:1.3 Wed Dec 15 21:26:25 1999 +++ xc/programs/Xserver/Xprint/attributes.h Wed Jan 17 17:36:28 2001 @@ -1,6 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xprint/attributes.h,v 1.3 1999/12/16 02:26:25 robin Exp $ */ - -/* $XConsortium: attributes.h /main/1 1996/09/28 16:59:43 rws $ */ +/* $Xorg: attributes.h,v 1.3 2000/08/17 19:48:07 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -32,6 +30,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ +/* $XFree86: xc/programs/Xserver/Xprint/attributes.h,v 1.4 2001/01/17 22:36:28 dawes Exp $ */ #ifndef _Xp_attributes_h #define _Xp_attributes_h 1 Index: xc/programs/Xserver/Xprint/ddxInit.c diff -u xc/programs/Xserver/Xprint/ddxInit.c:1.10 xc/programs/Xserver/Xprint/ddxInit.c:1.12 --- xc/programs/Xserver/Xprint/ddxInit.c:1.10 Sun Dec 12 21:12:51 1999 +++ xc/programs/Xserver/Xprint/ddxInit.c Sun Mar 4 12:40:04 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: ddxInit.c /main/2 1996/11/16 15:23:55 rws $ */ +/* $Xorg: ddxInit.c,v 1.3 2000/08/17 19:48:07 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -30,7 +30,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/ddxInit.c,v 1.10 1999/12/13 02:12:51 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ddxInit.c,v 1.12 2001/03/04 17:40:04 herrb Exp $ */ #include "X.h" #include "Xproto.h" @@ -205,6 +205,13 @@ ProcessInputEvents(void) { } + +#ifdef __DARWIN__ +void +DarwinHandleGUI(int argc, char *argv[]) +{ +} +#endif #ifdef DDXOSINIT void Index: xc/programs/Xserver/Xprint/mediaSizes.c diff -u xc/programs/Xserver/Xprint/mediaSizes.c:1.3 xc/programs/Xserver/Xprint/mediaSizes.c:1.4 --- xc/programs/Xserver/Xprint/mediaSizes.c:1.3 Wed Dec 15 21:26:26 1999 +++ xc/programs/Xserver/Xprint/mediaSizes.c Wed Jan 17 17:36:28 2001 @@ -1,6 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xprint/mediaSizes.c,v 1.3 1999/12/16 02:26:26 robin Exp $ */ - -/* $XConsortium: mediaSizes.c /main/1 1996/09/28 16:59:55 rws $ */ +/* $Xorg: mediaSizes.c,v 1.3 2000/08/17 19:48:07 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -32,6 +30,8 @@ dealings in this Software without prior written authorization from said copyright holders. */ +/* $XFree86: xc/programs/Xserver/Xprint/mediaSizes.c,v 1.4 2001/01/17 22:36:28 dawes Exp $ */ + /******************************************************************* ** ** ********************************************************* Index: xc/programs/Xserver/Xprint/pcl/Imakefile diff -u xc/programs/Xserver/Xprint/pcl/Imakefile:1.5 xc/programs/Xserver/Xprint/pcl/Imakefile:1.6 --- xc/programs/Xserver/Xprint/pcl/Imakefile:1.5 Sun Jul 18 11:47:37 1999 +++ xc/programs/Xserver/Xprint/pcl/Imakefile Wed Jan 17 17:36:29 2001 @@ -1,8 +1,9 @@ -XCOMM $XFree86: xc/programs/Xserver/Xprint/pcl/Imakefile,v 1.5 1999/07/18 15:47:37 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:07 cpqbld Exp $ -XCOMM $XConsortium: Imakefile /main/1 1996/09/28 17:00:10 rws $ + +XCOMM $XFree86: xc/programs/Xserver/Xprint/pcl/Imakefile,v 1.6 2001/01/17 22:36:29 dawes Exp $ #include Index: xc/programs/Xserver/Xprint/pcl/Pcl.h diff -u xc/programs/Xserver/Xprint/pcl/Pcl.h:1.5 xc/programs/Xserver/Xprint/pcl/Pcl.h:1.7 --- xc/programs/Xserver/Xprint/pcl/Pcl.h:1.5 Sun Dec 12 21:12:53 1999 +++ xc/programs/Xserver/Xprint/pcl/Pcl.h Fri Jan 19 12:10:50 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: Pcl.h /main/3 1996/12/30 14:56:18 kaleb $ */ +/* $Xorg: Pcl.h,v 1.3 2000/08/17 19:48:07 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -44,7 +44,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/Pcl.h,v 1.5 1999/12/13 02:12:53 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/Pcl.h,v 1.7 2001/01/19 17:10:50 dawes Exp $ */ #ifndef _PCL_H_ #define _PCL_H_ @@ -554,7 +554,6 @@ register WindowPtr pWin, int x, int y); -extern Bool PclUnmapWindow(WindowPtr pWindow); extern Bool PclUnmapWindow(WindowPtr pWindow); extern void PclCopyWindow( WindowPtr pWin, Index: xc/programs/Xserver/Xprint/pcl/PclArc.c diff -u xc/programs/Xserver/Xprint/pcl/PclArc.c:1.4 xc/programs/Xserver/Xprint/pcl/PclArc.c:1.5 --- xc/programs/Xserver/Xprint/pcl/PclArc.c:1.4 Sun Dec 12 21:12:53 1999 +++ xc/programs/Xserver/Xprint/pcl/PclArc.c Wed Jan 17 17:36:30 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PclArc.c /main/1 1996/09/28 17:00:23 rws $ */ +/* $Xorg: PclArc.c,v 1.3 2000/08/17 19:48:07 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -45,7 +45,7 @@ copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclArc.c,v 1.4 1999/12/13 02:12:53 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclArc.c,v 1.5 2001/01/17 22:36:30 dawes Exp $ */ #include #include Index: xc/programs/Xserver/Xprint/pcl/PclArea.c diff -u xc/programs/Xserver/Xprint/pcl/PclArea.c:1.7 xc/programs/Xserver/Xprint/pcl/PclArea.c:1.8 --- xc/programs/Xserver/Xprint/pcl/PclArea.c:1.7 Sun Dec 12 21:12:54 1999 +++ xc/programs/Xserver/Xprint/pcl/PclArea.c Wed Jan 17 17:36:30 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PclArea.c /main/3 1996/12/30 16:36:46 kaleb $ */ +/* $Xorg: PclArea.c,v 1.3 2000/08/17 19:48:07 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -44,7 +44,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclArea.c,v 1.7 1999/12/13 02:12:54 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclArea.c,v 1.8 2001/01/17 22:36:30 dawes Exp $ */ #include #include Index: xc/programs/Xserver/Xprint/pcl/PclAttVal.c diff -u xc/programs/Xserver/Xprint/pcl/PclAttVal.c:1.1.1.1 xc/programs/Xserver/Xprint/pcl/PclAttVal.c:1.1.1.2 --- xc/programs/Xserver/Xprint/pcl/PclAttVal.c:1.1.1.1 Sat Dec 21 23:08:11 1996 +++ xc/programs/Xserver/Xprint/pcl/PclAttVal.c Tue Jan 16 17:41:51 2001 @@ -1,5 +1,5 @@ /* - * $XConsortium: PclAttVal.c /main/1 1996/09/28 17:00:37 rws $ + * $Xorg: PclAttVal.c,v 1.3 2000/08/17 19:48:07 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company Index: xc/programs/Xserver/Xprint/pcl/PclAttr.c diff -u xc/programs/Xserver/Xprint/pcl/PclAttr.c:1.1.1.1 xc/programs/Xserver/Xprint/pcl/PclAttr.c:1.1.1.2 --- xc/programs/Xserver/Xprint/pcl/PclAttr.c:1.1.1.1 Sat Dec 21 23:08:11 1996 +++ xc/programs/Xserver/Xprint/pcl/PclAttr.c Tue Jan 16 17:41:52 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PclAttr.c /main/1 1996/09/28 17:00:45 rws $ */ +/* $Xorg: PclAttr.c,v 1.3 2000/08/17 19:48:07 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* Index: xc/programs/Xserver/Xprint/pcl/PclColor.c diff -u xc/programs/Xserver/Xprint/pcl/PclColor.c:1.7 xc/programs/Xserver/Xprint/pcl/PclColor.c:1.8 --- xc/programs/Xserver/Xprint/pcl/PclColor.c:1.7 Sun Dec 12 21:12:54 1999 +++ xc/programs/Xserver/Xprint/pcl/PclColor.c Wed Jan 17 17:36:30 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PclColor.c /main/4 1996/12/30 16:36:57 kaleb $ */ +/* $Xorg: PclColor.c,v 1.3 2000/08/17 19:48:07 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -45,7 +45,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclColor.c,v 1.7 1999/12/13 02:12:54 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclColor.c,v 1.8 2001/01/17 22:36:30 dawes Exp $ */ #include #include Index: xc/programs/Xserver/Xprint/pcl/PclCursor.c diff -u xc/programs/Xserver/Xprint/pcl/PclCursor.c:1.3 xc/programs/Xserver/Xprint/pcl/PclCursor.c:1.4 --- xc/programs/Xserver/Xprint/pcl/PclCursor.c:1.3 Wed Dec 15 21:26:27 1999 +++ xc/programs/Xserver/Xprint/pcl/PclCursor.c Wed Jan 17 17:36:30 2001 @@ -1,6 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclCursor.c,v 1.3 1999/12/16 02:26:27 robin Exp $ */ - -/* $XConsortium: PclCursor.c /main/1 1996/09/28 17:00:59 rws $ */ +/* $Xorg: PclCursor.c,v 1.3 2000/08/17 19:48:08 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -46,6 +44,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclCursor.c,v 1.4 2001/01/17 22:36:30 dawes Exp $ */ #include Index: xc/programs/Xserver/Xprint/pcl/PclDef.h diff -u xc/programs/Xserver/Xprint/pcl/PclDef.h:1.1.1.1 xc/programs/Xserver/Xprint/pcl/PclDef.h:1.1.1.2 --- xc/programs/Xserver/Xprint/pcl/PclDef.h:1.1.1.1 Sat Dec 21 23:08:12 1996 +++ xc/programs/Xserver/Xprint/pcl/PclDef.h Tue Jan 16 17:41:52 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PclDef.h /main/1 1996/09/28 17:01:04 rws $ */ +/* $Xorg: PclDef.h,v 1.3 2000/08/17 19:48:08 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* Index: xc/programs/Xserver/Xprint/pcl/PclFonts.c diff -u xc/programs/Xserver/Xprint/pcl/PclFonts.c:1.1.1.1 xc/programs/Xserver/Xprint/pcl/PclFonts.c:1.1.1.2 --- xc/programs/Xserver/Xprint/pcl/PclFonts.c:1.1.1.1 Sat Dec 21 23:08:12 1996 +++ xc/programs/Xserver/Xprint/pcl/PclFonts.c Tue Jan 16 17:41:53 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PclFonts.c /main/1 1996/09/28 17:01:09 rws $ */ +/* $Xorg: PclFonts.c,v 1.3 2000/08/17 19:48:08 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* Index: xc/programs/Xserver/Xprint/pcl/PclGC.c diff -u xc/programs/Xserver/Xprint/pcl/PclGC.c:1.7 xc/programs/Xserver/Xprint/pcl/PclGC.c:1.9 --- xc/programs/Xserver/Xprint/pcl/PclGC.c:1.7 Sun Dec 12 21:12:55 1999 +++ xc/programs/Xserver/Xprint/pcl/PclGC.c Fri Jan 19 13:34:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: PclGC.c /main/3 1997/06/11 17:53:43 samborn $ */ +/* $Xorg: PclGC.c,v 1.4 2000/08/17 19:48:08 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -44,7 +44,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclGC.c,v 1.7 1999/12/13 02:12:55 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclGC.c,v 1.9 2001/01/19 18:34:28 dawes Exp $ */ #include "gcstruct.h" @@ -107,14 +107,13 @@ if( mfbCreateGC( pGC ) == FALSE ) return FALSE; } - else if( pGC->depth <= 8 ) - { - if( cfbCreateGC( pGC ) == FALSE ) - return FALSE; - } else if( pGC->depth <= 32 ) { +#if PSZ == 8 + if( cfbCreateGC( pGC ) == FALSE ) +#else if( cfb32CreateGC( pGC ) == FALSE ) +#endif return FALSE; } else @@ -671,6 +670,7 @@ PclSendPattern( bits, sz, 8, h, w, 100, *outFile ); xfree( bits ); } +#if PSZ == 32 else { sz = h * PixmapBytePad( w, 24 ); @@ -680,6 +680,7 @@ PclSendPattern( bits, sz, 24, h, w, 100, *outFile ); xfree( bits ); } +#endif } if( changeMask & ( GCTileStipXOrigin | GCTileStipYOrigin ) ) @@ -763,8 +764,9 @@ mfbGetImage( &(scratchPix->drawable), 0, 0, w, h, XYPixmap, ~0, bits ); } - else if( pGC->depth <= 8 ) + else if( pGC->depth <= 32 ) { +#if PSZ == 8 cfbValidateGC( scratchGC, ~0L, (DrawablePtr)scratchPix ); cfbCopyPlane( &(pGC->stipple->drawable), @@ -772,16 +774,15 @@ 0, w, h, 0, 0, 1 ); cfbGetImage( &(scratchPix->drawable), 0, 0, w, h, ZPixmap, ~0, bits ); - } - else if( pGC->depth <= 32 ) - { +#else cfb32ValidateGC( scratchGC, ~0L, - (DrawablePtr)scratchPix ); - cfb32CopyPlane( &(pGC->stipple->drawable), - (DrawablePtr)scratchPix, scratchGC, 0, - 0, w, h, 0, 0, 1 ); - cfb32GetImage( &(scratchPix->drawable), 0, 0, w, h, ZPixmap, ~0, - bits ); + (DrawablePtr)scratchPix ); + cfb32CopyPlane( pGC->stipple, + (DrawablePtr)scratchPix, scratchGC, 0, + 0, w, h, 0, 0, 1 ); + cfb32GetImage( scratchPix, 0, 0, w, h, ZPixmap, ~0, + bits ); +#endif } PclSendPattern( bits, sz, pGC->depth, h, w, 101, *outFile ); FreeScratchGC( scratchGC ); @@ -996,13 +997,13 @@ { mfbValidateGC( pGC, ~0, pDrawable ); } - else if( pDrawable->depth <= 8 ) - { - cfbValidateGC( pGC, ~0, pDrawable ); - } else if( pDrawable->depth <= 32 ) { +#if PSZ == 8 + cfbValidateGC( pGC, ~0, pDrawable ); +#else cfb32ValidateGC( pGC, ~0, pDrawable ); +#endif } return; } Index: xc/programs/Xserver/Xprint/pcl/PclInit.c diff -u xc/programs/Xserver/Xprint/pcl/PclInit.c:1.7 xc/programs/Xserver/Xprint/pcl/PclInit.c:1.8 --- xc/programs/Xserver/Xprint/pcl/PclInit.c:1.7 Sun Dec 12 21:12:55 1999 +++ xc/programs/Xserver/Xprint/pcl/PclInit.c Wed Jan 17 17:36:30 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PclInit.c /main/3 1996/12/30 16:37:06 kaleb $ */ +/* $Xorg: PclInit.c,v 1.3 2000/08/17 19:48:08 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -76,7 +76,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclInit.c,v 1.7 1999/12/13 02:12:55 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclInit.c,v 1.8 2001/01/17 22:36:30 dawes Exp $ */ #include #include Index: xc/programs/Xserver/Xprint/pcl/PclLine.c diff -u xc/programs/Xserver/Xprint/pcl/PclLine.c:1.6 xc/programs/Xserver/Xprint/pcl/PclLine.c:1.7 --- xc/programs/Xserver/Xprint/pcl/PclLine.c:1.6 Sun Dec 12 21:12:55 1999 +++ xc/programs/Xserver/Xprint/pcl/PclLine.c Wed Jan 17 17:36:30 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PclLine.c /main/2 1996/12/30 14:56:54 kaleb $ */ +/* $Xorg: PclLine.c,v 1.3 2000/08/17 19:48:08 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -44,7 +44,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclLine.c,v 1.6 1999/12/13 02:12:55 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclLine.c,v 1.7 2001/01/17 22:36:30 dawes Exp $ */ #include "Pcl.h" #include "gcstruct.h" Index: xc/programs/Xserver/Xprint/pcl/PclMisc.c diff -u xc/programs/Xserver/Xprint/pcl/PclMisc.c:1.7 xc/programs/Xserver/Xprint/pcl/PclMisc.c:1.8 --- xc/programs/Xserver/Xprint/pcl/PclMisc.c:1.7 Wed Aug 23 17:06:19 2000 +++ xc/programs/Xserver/Xprint/pcl/PclMisc.c Wed Jan 17 17:36:30 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PclMisc.c /main/3 1996/12/30 14:56:58 kaleb $ */ +/* $Xorg: PclMisc.c,v 1.3 2000/08/17 19:48:08 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -44,7 +44,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclMisc.c,v 1.7 2000/08/23 21:06:19 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclMisc.c,v 1.8 2001/01/17 22:36:30 dawes Exp $ */ #ifdef __CYGWIN__ #include Index: xc/programs/Xserver/Xprint/pcl/PclPixel.c diff -u xc/programs/Xserver/Xprint/pcl/PclPixel.c:1.4 xc/programs/Xserver/Xprint/pcl/PclPixel.c:1.5 --- xc/programs/Xserver/Xprint/pcl/PclPixel.c:1.4 Sun Dec 12 21:12:56 1999 +++ xc/programs/Xserver/Xprint/pcl/PclPixel.c Wed Jan 17 17:36:30 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PclPixel.c /main/1 1996/09/28 17:01:49 rws $ */ +/* $Xorg: PclPixel.c,v 1.3 2000/08/17 19:48:08 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -44,7 +44,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPixel.c,v 1.4 1999/12/13 02:12:56 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPixel.c,v 1.5 2001/01/17 22:36:30 dawes Exp $ */ #include Index: xc/programs/Xserver/Xprint/pcl/PclPixmap.c diff -u xc/programs/Xserver/Xprint/pcl/PclPixmap.c:1.3 xc/programs/Xserver/Xprint/pcl/PclPixmap.c:1.4 --- xc/programs/Xserver/Xprint/pcl/PclPixmap.c:1.3 Wed Dec 15 21:26:27 1999 +++ xc/programs/Xserver/Xprint/pcl/PclPixmap.c Wed Jan 17 17:36:30 2001 @@ -1,6 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPixmap.c,v 1.3 1999/12/16 02:26:27 robin Exp $ */ - -/* $XConsortium: PclPixmap.c /main/1 1996/09/28 17:01:58 rws $ */ +/* $Xorg: PclPixmap.c,v 1.3 2000/08/17 19:48:08 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -46,6 +44,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPixmap.c,v 1.4 2001/01/17 22:36:30 dawes Exp $ */ #include "Pcl.h" #include "cfb.h" Index: xc/programs/Xserver/Xprint/pcl/PclPolygon.c diff -u xc/programs/Xserver/Xprint/pcl/PclPolygon.c:1.6 xc/programs/Xserver/Xprint/pcl/PclPolygon.c:1.7 --- xc/programs/Xserver/Xprint/pcl/PclPolygon.c:1.6 Sun Dec 12 21:12:56 1999 +++ xc/programs/Xserver/Xprint/pcl/PclPolygon.c Wed Jan 17 17:36:30 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PclPolygon.c /main/2 1996/12/30 14:57:02 kaleb $ */ +/* $Xorg: PclPolygon.c,v 1.3 2000/08/17 19:48:08 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -44,7 +44,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPolygon.c,v 1.6 1999/12/13 02:12:56 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPolygon.c,v 1.7 2001/01/17 22:36:30 dawes Exp $ */ #include "Pcl.h" Index: xc/programs/Xserver/Xprint/pcl/PclPrint.c diff -u xc/programs/Xserver/Xprint/pcl/PclPrint.c:1.5 xc/programs/Xserver/Xprint/pcl/PclPrint.c:1.6 --- xc/programs/Xserver/Xprint/pcl/PclPrint.c:1.5 Sun Dec 12 21:12:57 1999 +++ xc/programs/Xserver/Xprint/pcl/PclPrint.c Wed Jan 17 17:36:30 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PclPrint.c /main/4 1996/12/30 16:37:15 kaleb $ */ +/* $Xorg: PclPrint.c,v 1.3 2000/08/17 19:48:08 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -43,7 +43,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPrint.c,v 1.5 1999/12/13 02:12:57 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPrint.c,v 1.6 2001/01/17 22:36:30 dawes Exp $ */ #include #include Index: xc/programs/Xserver/Xprint/pcl/PclSFonts.c diff -u xc/programs/Xserver/Xprint/pcl/PclSFonts.c:1.4 xc/programs/Xserver/Xprint/pcl/PclSFonts.c:1.5 --- xc/programs/Xserver/Xprint/pcl/PclSFonts.c:1.4 Sun Dec 12 21:12:57 1999 +++ xc/programs/Xserver/Xprint/pcl/PclSFonts.c Wed Jan 17 17:36:30 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PclSFonts.c /main/2 1996/12/30 14:57:11 kaleb $ */ +/* $Xorg: PclSFonts.c,v 1.3 2000/08/17 19:48:08 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -45,7 +45,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclSFonts.c,v 1.4 1999/12/13 02:12:57 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclSFonts.c,v 1.5 2001/01/17 22:36:30 dawes Exp $ */ #include Index: xc/programs/Xserver/Xprint/pcl/PclSFonts.h diff -u xc/programs/Xserver/Xprint/pcl/PclSFonts.h:1.1.1.1 xc/programs/Xserver/Xprint/pcl/PclSFonts.h:1.1.1.2 --- xc/programs/Xserver/Xprint/pcl/PclSFonts.h:1.1.1.1 Sat Dec 21 23:08:14 1996 +++ xc/programs/Xserver/Xprint/pcl/PclSFonts.h Tue Jan 16 17:41:56 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PclSFonts.h /main/1 1996/09/28 17:02:39 rws $ */ +/* $Xorg: PclSFonts.h,v 1.3 2000/08/17 19:48:08 cpqbld Exp $ */ #ifndef _PCLFONTS_H #define _PCLFONTS_H Index: xc/programs/Xserver/Xprint/pcl/PclSpans.c diff -u xc/programs/Xserver/Xprint/pcl/PclSpans.c:1.5 xc/programs/Xserver/Xprint/pcl/PclSpans.c:1.6 --- xc/programs/Xserver/Xprint/pcl/PclSpans.c:1.5 Sun Dec 12 21:12:57 1999 +++ xc/programs/Xserver/Xprint/pcl/PclSpans.c Wed Jan 17 17:36:30 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PclSpans.c /main/2 1996/12/30 14:57:17 kaleb $ */ +/* $Xorg: PclSpans.c,v 1.3 2000/08/17 19:48:08 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -44,7 +44,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclSpans.c,v 1.5 1999/12/13 02:12:57 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclSpans.c,v 1.6 2001/01/17 22:36:30 dawes Exp $ */ #include "Pcl.h" Index: xc/programs/Xserver/Xprint/pcl/PclText.c diff -u xc/programs/Xserver/Xprint/pcl/PclText.c:1.6 xc/programs/Xserver/Xprint/pcl/PclText.c:1.8 --- xc/programs/Xserver/Xprint/pcl/PclText.c:1.6 Sun Dec 12 21:12:58 1999 +++ xc/programs/Xserver/Xprint/pcl/PclText.c Fri Jan 19 12:10:50 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PclText.c /main/2 1996/12/30 14:57:22 kaleb $ */ +/* $Xorg: PclText.c,v 1.4 2000/08/17 19:48:08 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -44,7 +44,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclText.c,v 1.6 1999/12/13 02:12:58 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclText.c,v 1.8 2001/01/19 17:10:50 dawes Exp $ */ #ifdef DO_TWO_BYTE_PCL #include "iconv.h" @@ -150,7 +150,8 @@ */ MACRO_START( outFile, pConPriv ); sprintf(t, "\033%%0B;PU%d,%dPD;TD1;DT%c,1;", - x + pDrawable->x, y + pDrawable->y, ETX); + x + pDrawable->x, y + pDrawable->y + pGC->font->info.fontAscent, + ETX); SAVE_PCL( outFile, pConPriv, t ); SAVE_PCL_COUNT( outFile, pConPriv, "FI0;SS;LB", 9 ); @@ -196,7 +197,8 @@ */ MACRO_START( outFile, pConPriv ); sprintf(t, "\033%%0B;PU%d,%dPD;TD1;DT%c,1;", - x + pDrawable->x, y + pDrawable->y, ETX); + x + pDrawable->x, y + pDrawable->y + pGC->font->info.fontAscent, + ETX); SAVE_PCL( outFile, pConPriv, t ); selectSize(outFile, pConPriv, pin); SAVE_PCL_COUNT( outFile, pConPriv, "FI0;SS;LB", 9 ); @@ -223,15 +225,14 @@ * Convert the collection of rectangles into a proper region, then * intersect it with the clip region. */ - box.x1 = x + charinfo[0]->metrics.leftSideBearing + pDrawable->x; - box.y1 = y - max_ascent + pDrawable->y; - box.x2 = x + w - charinfo[n-1]->metrics.characterWidth - + charinfo[n-1]->metrics.rightSideBearing + pDrawable->x; - box.y2 = y + max_descent + pDrawable->y; - - drawRegion = REGION_CREATE( pGC->pScreen, &box, 0 ); - region = REGION_CREATE( pGC->pScreen, NULL, 0 ); - REGION_INTERSECT( pGC->pScreen, region, drawRegion, pGC->pCompositeClip ); + box.x1 = x + pDrawable->x; + box.y1 = y - max_ascent + pDrawable->y + pGC->font->info.fontAscent; + box.x2 = x + w + pDrawable->x; + box.y2 = y + max_descent + pDrawable->y + pGC->font->info.fontAscent; + + drawRegion = miRegionCreate( &box, 0 ); + region = miRegionCreate( NULL, 0 ); + miIntersect( region, drawRegion, pGC->pCompositeClip ); /* * For each rectangle in the clip region, set the HP-GL/2 "input @@ -335,7 +336,8 @@ */ MACRO_START( outFile, pConPriv ); sprintf(t, "\033%%0B;PU%d,%dPD;TD1;DT%c,1;", - x + pDrawable->x, y + pDrawable->y, ETX); + x + pDrawable->x, y + pDrawable->y + pGC->font->info.fontAscent, + ETX); SAVE_PCL( outFile, pConPriv, t ); SAVE_PCL_COUNT( outFile, pConPriv, "FI0;SS;LB", 9 ); @@ -393,7 +395,8 @@ */ MACRO_START( outFile, pConPriv ); sprintf(t, "\033%%0B;PU%d,%dPD;TD1;DT%c,1;", - x + pDrawable->x, y + pDrawable->y, ETX); + x + pDrawable->x, y + pDrawable->y + pGC->font->info.fontAscent, + ETX); SAVE_PCL( outFile, pConPriv, t ); sprintf(t, "TD0;\033%%1A"); SAVE_PCL( outFile, pConPriv, t ); @@ -421,15 +424,14 @@ * Convert the collection of rectangles into a proper region, then * intersect it with the clip region. */ - box.x1 = x + charinfo[0]->metrics.leftSideBearing + pDrawable->x; - box.y1 = y - max_ascent + pDrawable->y; - box.x2 = x + w - charinfo[n-1]->metrics.characterWidth - + charinfo[n-1]->metrics.rightSideBearing + pDrawable->x; - box.y2 = y + max_descent + pDrawable->y; - - drawRegion = REGION_CREATE( pGC->pScreen, &box, 0 ); - region = REGION_CREATE( pGC->pScreen, NULL, 0 ); - REGION_INTERSECT( pGC->pScreen, region, drawRegion, pGC->pCompositeClip ); + box.x1 = x + pDrawable->x; + box.y1 = y - max_ascent + pDrawable->y + pGC->font->info.fontAscent; + box.x2 = x + w + pDrawable->x; + box.y2 = y + max_descent + pDrawable->y + pGC->font->info.fontAscent; + + drawRegion = miRegionCreate( &box, 0 ); + region = miRegionCreate( NULL, 0 ); + miIntersect( region, drawRegion, pGC->pCompositeClip ); /* * For each rectangle in the clip region, set the HP-GL/2 "input Index: xc/programs/Xserver/Xprint/pcl/PclWindow.c diff -u xc/programs/Xserver/Xprint/pcl/PclWindow.c:1.7 xc/programs/Xserver/Xprint/pcl/PclWindow.c:1.8 --- xc/programs/Xserver/Xprint/pcl/PclWindow.c:1.7 Sun Dec 20 06:57:27 1998 +++ xc/programs/Xserver/Xprint/pcl/PclWindow.c Wed Jan 17 17:36:30 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: PclWindow.c /main/3 1996/12/30 16:37:28 kaleb $ */ +/* $Xorg: PclWindow.c,v 1.3 2000/08/17 19:48:08 cpqbld Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -44,7 +44,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclWindow.c,v 1.7 1998/12/20 11:57:27 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclWindow.c,v 1.8 2001/01/17 22:36:30 dawes Exp $ */ #include Index: xc/programs/Xserver/Xprint/pcl/Pclmap.h diff -u xc/programs/Xserver/Xprint/pcl/Pclmap.h:1.3 xc/programs/Xserver/Xprint/pcl/Pclmap.h:1.4 --- xc/programs/Xserver/Xprint/pcl/Pclmap.h:1.3 Sun Dec 12 21:12:58 1999 +++ xc/programs/Xserver/Xprint/pcl/Pclmap.h Wed Jan 17 17:36:30 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: Pclmap.h /main/2 1996/11/16 15:27:02 rws $ */ +/* $Xorg: Pclmap.h,v 1.3 2000/08/17 19:48:08 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -30,7 +30,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/Pclmap.h,v 1.3 1999/12/13 02:12:58 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/Pclmap.h,v 1.4 2001/01/17 22:36:30 dawes Exp $ */ #ifndef _PCLMAP_H_ #define _PCLMAP_H_ Index: xc/programs/Xserver/Xprint/pcl-mono/Imakefile diff -u xc/programs/Xserver/Xprint/pcl-mono/Imakefile:1.1.1.1 xc/programs/Xserver/Xprint/pcl-mono/Imakefile:1.1.1.2 --- xc/programs/Xserver/Xprint/pcl-mono/Imakefile:1.1.1.1 Sat Dec 21 23:08:16 1996 +++ xc/programs/Xserver/Xprint/pcl-mono/Imakefile Tue Jan 16 17:42:06 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: Imakefile /main/1 1996/09/28 17:00:04 rws $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:09 cpqbld Exp $ #define PclDriver -DXP_PCL_MONO #define LinkDirectory ../pcl Index: xc/programs/Xserver/Xprint/ps/Imakefile diff -u xc/programs/Xserver/Xprint/ps/Imakefile:1.5 xc/programs/Xserver/Xprint/ps/Imakefile:1.6 --- xc/programs/Xserver/Xprint/ps/Imakefile:1.5 Sun Jul 18 11:47:38 1999 +++ xc/programs/Xserver/Xprint/ps/Imakefile Wed Jan 17 17:36:31 2001 @@ -1,9 +1,9 @@ -XCOMM $XFree86: xc/programs/Xserver/Xprint/ps/Imakefile,v 1.5 1999/07/18 15:47:38 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.4 2000/08/17 19:48:09 cpqbld Exp $ -XCOMM $XConsortium: Imakefile /main/2 1996/11/16 15:24:20 rws $ +XCOMM $XFree86: xc/programs/Xserver/Xprint/ps/Imakefile,v 1.6 2001/01/17 22:36:31 dawes Exp $ #include @@ -20,7 +20,7 @@ OBJS = $(OBJS1) XCOMM DEFINES = -DPIXPRIV - DEFINES = -UXFree86LOADER + DEFINES = -UXFree86LOADER -DXP_PSTEXT INCLUDES = -I. \ -I../../cfb \ Index: xc/programs/Xserver/Xprint/ps/Ps.h diff -u xc/programs/Xserver/Xprint/ps/Ps.h:1.5 xc/programs/Xserver/Xprint/ps/Ps.h:1.6 --- xc/programs/Xserver/Xprint/ps/Ps.h:1.5 Sun Dec 12 21:13:00 1999 +++ xc/programs/Xserver/Xprint/ps/Ps.h Wed Jan 17 17:36:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: Ps.h /main/4 1998/02/09 15:43:35 kaleb $ */ +/* $Xorg: Ps.h,v 1.3 2000/08/17 19:48:09 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -70,7 +70,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/Ps.h,v 1.5 1999/12/13 02:13:00 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/Ps.h,v 1.6 2001/01/17 22:36:31 dawes Exp $ */ #ifndef _PS_H_ #define _PS_H_ Index: xc/programs/Xserver/Xprint/ps/PsArc.c diff -u xc/programs/Xserver/Xprint/ps/PsArc.c:1.1.1.2 xc/programs/Xserver/Xprint/ps/PsArc.c:1.1.1.3 --- xc/programs/Xserver/Xprint/ps/PsArc.c:1.1.1.2 Sun Sep 27 04:47:57 1998 +++ xc/programs/Xserver/Xprint/ps/PsArc.c Tue Jan 16 17:41:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: PsArc.c /main/4 1998/02/10 08:17:20 barstow $ */ +/* $Xorg: PsArc.c,v 1.3 2000/08/17 19:48:09 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group Index: xc/programs/Xserver/Xprint/ps/PsArea.c diff -u xc/programs/Xserver/Xprint/ps/PsArea.c:1.1.1.2 xc/programs/Xserver/Xprint/ps/PsArea.c:1.1.1.3 --- xc/programs/Xserver/Xprint/ps/PsArea.c:1.1.1.2 Sun Sep 27 04:47:58 1998 +++ xc/programs/Xserver/Xprint/ps/PsArea.c Tue Jan 16 17:41:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: PsArea.c /main/3 1998/02/09 15:42:11 kaleb $ */ +/* $Xorg: PsArea.c,v 1.4 2000/08/17 19:48:09 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -23,7 +23,7 @@ /* * (c) Copyright 1996 Hewlett-Packard Company * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. + * (c) Copyright 1996, 2000 Sun Microsystems, Inc. * (c) Copyright 1996 Novell, Inc. * (c) Copyright 1996 Digital Equipment Corp. * (c) Copyright 1996 Fujitsu Limited @@ -225,6 +225,155 @@ } void +PsPutScaledImageIM(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, + int w, int h, int leftPad, int format, int imageRes, char *pImage) +{ + if( pDrawable->type==DRAWABLE_PIXMAP ) + { + int size = PixmapBytePad(w, depth)*h; + DisplayElmPtr elm; + PixmapPtr pix = (PixmapPtr)pDrawable; + PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; + DisplayListPtr disp; + GCPtr gc; + + if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return; + + disp = PsGetFreeDisplayBlock(priv); + elm = &disp->elms[disp->nelms]; + elm->type = PutImageCmd; + elm->gc = gc; + elm->c.image.depth = depth; + elm->c.image.x = x; + elm->c.image.y = y; + elm->c.image.w = w; + elm->c.image.h = h; + elm->c.image.leftPad = leftPad; + elm->c.image.format = format; + elm->c.image.res = imageRes; + elm->c.image.pData = (char *)xalloc(size); + memcpy(elm->c.image.pData, pImage, size); + disp->nelms += 1; + } + else + { + int i, j; + int r, c; + int swap; + char *pt; + PsOutPtr psOut; + ColormapPtr cMap; + int pageRes, sw, sh; + + if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; + if (!imageRes) { + sw = w; + sh = h; + } else { + pageRes = XpGetResolution(XpGetPrintContext(requestingClient)); + sw = (float)w * (float)pageRes / (float)imageRes + 0.5; + sh = (float)h * (float)pageRes / (float)imageRes + 0.5; + } + PsOut_Offset(psOut, pDrawable->x, pDrawable->y); + pt = (char *)(&i); i = 1; if( pt[0]=='\001' ) swap = 1; else swap = 0; + + if( depth==24 ) + { + PsOut_BeginImageIM(psOut, 0, 0, x, y, w, h, sw, sh, 3); + if( format==XYPixmap ) + { + int rowsiz = PixmapBytePad(w, depth); + char *planes[3]; + planes[0] = pImage; + planes[1] = &pImage[rowsiz*h]; + planes[2] = &pImage[rowsiz*h*2]; + for( r=0 ; rbgPixel), + PsGetPixelColor(cMap, pGC->fgPixel), + x, y, w, h, sw, sh, 1); + for( r=0 ; r>j)&1)<<(7-j)); } + else + iv_ = iv; + c = iv_; + PsOut_OutImageBytes(psOut, 1, &c); + } + } + PsOut_EndImage(psOut); + } + } + } +error: + return; +} +void PsPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pImage) { @@ -232,6 +381,15 @@ if (requestingClient && (pcon = XpGetPrintContext(requestingClient))) PsPutScaledImage(pDrawable, pGC, depth, x, y, w, h, leftPad, format, pcon->imageRes, pImage); +} +void +PsPutImageMask(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, + int w, int h, int leftPad, int format, char *pImage) +{ + XpContextPtr pcon; + if (requestingClient && (pcon = XpGetPrintContext(requestingClient))) + PsPutScaledImageIM(pDrawable, pGC, depth, x, y, w, h, leftPad, format, + pcon->imageRes, pImage); } RegionPtr Index: xc/programs/Xserver/Xprint/ps/PsAttVal.c diff -u xc/programs/Xserver/Xprint/ps/PsAttVal.c:1.3 xc/programs/Xserver/Xprint/ps/PsAttVal.c:1.4 --- xc/programs/Xserver/Xprint/ps/PsAttVal.c:1.3 Tue Mar 2 06:49:25 1999 +++ xc/programs/Xserver/Xprint/ps/PsAttVal.c Wed Jan 17 17:36:31 2001 @@ -1,5 +1,5 @@ /* - * $XConsortium: PsAttVal.c /main/1 1996/11/16 15:24:44 rws $ + * $Xorg: PsAttVal.c,v 1.3 2000/08/17 19:48:09 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company @@ -32,7 +32,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsAttVal.c,v 1.3 1999/03/02 11:49:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsAttVal.c,v 1.4 2001/01/17 22:36:31 dawes Exp $ */ #include "Ps.h" #include "AttrValid.h" Index: xc/programs/Xserver/Xprint/ps/PsAttr.c diff -u xc/programs/Xserver/Xprint/ps/PsAttr.c:1.3 xc/programs/Xserver/Xprint/ps/PsAttr.c:1.4 --- xc/programs/Xserver/Xprint/ps/PsAttr.c:1.3 Wed Dec 15 21:26:28 1999 +++ xc/programs/Xserver/Xprint/ps/PsAttr.c Wed Jan 17 17:36:32 2001 @@ -1,6 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsAttr.c,v 1.3 1999/12/16 02:26:28 robin Exp $ */ - -/* $TOG: PsAttr.c /main/3 1998/02/09 15:42:17 kaleb $ */ +/* $Xorg: PsAttr.c,v 1.3 2000/08/17 19:48:09 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -55,6 +53,7 @@ * or other dealings in this Software without prior written authorization * from said copyright holders. */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsAttr.c,v 1.4 2001/01/17 22:36:32 dawes Exp $ */ /******************************************************************* ** Index: xc/programs/Xserver/Xprint/ps/PsColor.c diff -u xc/programs/Xserver/Xprint/ps/PsColor.c:1.1.1.2 xc/programs/Xserver/Xprint/ps/PsColor.c:1.1.1.3 --- xc/programs/Xserver/Xprint/ps/PsColor.c:1.1.1.2 Sun Sep 27 04:47:59 1998 +++ xc/programs/Xserver/Xprint/ps/PsColor.c Tue Jan 16 17:41:59 2001 @@ -1,4 +1,4 @@ -/* $TOG: PsColor.c /main/3 1998/02/09 15:42:27 kaleb $ */ +/* $Xorg: PsColor.c,v 1.3 2000/08/17 19:48:09 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group Index: xc/programs/Xserver/Xprint/ps/PsDef.h diff -u xc/programs/Xserver/Xprint/ps/PsDef.h:1.1.1.2 xc/programs/Xserver/Xprint/ps/PsDef.h:1.1.1.3 --- xc/programs/Xserver/Xprint/ps/PsDef.h:1.1.1.2 Sun Sep 27 04:48:00 1998 +++ xc/programs/Xserver/Xprint/ps/PsDef.h Tue Jan 16 17:41:59 2001 @@ -1,4 +1,4 @@ -/* $TOG: PsDef.h /main/3 1998/02/09 15:42:31 kaleb $ */ +/* $Xorg: PsDef.h,v 1.3 2000/08/17 19:48:09 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group Index: xc/programs/Xserver/Xprint/ps/PsFonts.c diff -u xc/programs/Xserver/Xprint/ps/PsFonts.c:1.3 xc/programs/Xserver/Xprint/ps/PsFonts.c:1.4 --- xc/programs/Xserver/Xprint/ps/PsFonts.c:1.3 Wed Dec 15 21:26:28 1999 +++ xc/programs/Xserver/Xprint/ps/PsFonts.c Wed Jan 17 17:36:32 2001 @@ -1,6 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsFonts.c,v 1.3 1999/12/16 02:26:28 robin Exp $ */ - -/* $TOG: PsFonts.c /main/3 1998/02/09 15:42:34 kaleb $ */ +/* $Xorg: PsFonts.c,v 1.4 2000/08/17 19:48:09 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -55,6 +53,7 @@ * or other dealings in this Software without prior written authorization * from said copyright holders. */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsFonts.c,v 1.4 2001/01/17 22:36:32 dawes Exp $ */ /******************************************************************* ** @@ -150,7 +149,7 @@ if( (Atom)props[i].name == name ) { value = props[i].value; break; } } - if( !value ) return "Times-Roman"; + if( !value ) return (char *)0; return NameForAtom(value); } Index: xc/programs/Xserver/Xprint/ps/PsGC.c diff -u xc/programs/Xserver/Xprint/ps/PsGC.c:1.3 xc/programs/Xserver/Xprint/ps/PsGC.c:1.4 --- xc/programs/Xserver/Xprint/ps/PsGC.c:1.3 Mon Sep 27 10:59:17 1999 +++ xc/programs/Xserver/Xprint/ps/PsGC.c Wed Jan 17 17:36:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: PsGC.c /main/4 1998/02/09 15:42:38 kaleb $ */ +/* $Xorg: PsGC.c,v 1.3 2000/08/17 19:48:10 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -53,7 +53,7 @@ * or other dealings in this Software without prior written authorization * from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsGC.c,v 1.3 1999/09/27 14:59:17 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsGC.c,v 1.4 2001/01/17 22:36:32 dawes Exp $ */ /******************************************************************* ** Index: xc/programs/Xserver/Xprint/ps/PsInit.c diff -u xc/programs/Xserver/Xprint/ps/PsInit.c:1.8 xc/programs/Xserver/Xprint/ps/PsInit.c:1.9 --- xc/programs/Xserver/Xprint/ps/PsInit.c:1.8 Sun Dec 12 21:13:01 1999 +++ xc/programs/Xserver/Xprint/ps/PsInit.c Wed Jan 17 17:36:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: PsInit.c /main/6 1998/02/09 15:42:43 kaleb $ */ +/* $Xorg: PsInit.c,v 1.3 2000/08/17 19:48:10 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -69,7 +69,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsInit.c,v 1.8 1999/12/13 02:13:01 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsInit.c,v 1.9 2001/01/17 22:36:32 dawes Exp $ */ #include #include Index: xc/programs/Xserver/Xprint/ps/PsLine.c diff -u xc/programs/Xserver/Xprint/ps/PsLine.c:1.4 xc/programs/Xserver/Xprint/ps/PsLine.c:1.5 --- xc/programs/Xserver/Xprint/ps/PsLine.c:1.4 Sun Oct 4 05:37:27 1998 +++ xc/programs/Xserver/Xprint/ps/PsLine.c Wed Jan 17 17:36:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: PsLine.c /main/4 1998/02/09 15:42:47 kaleb $ */ +/* $Xorg: PsLine.c,v 1.3 2000/08/17 19:48:10 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -69,7 +69,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsLine.c,v 1.4 1998/10/04 09:37:27 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsLine.c,v 1.5 2001/01/17 22:36:32 dawes Exp $ */ #include "Ps.h" #include "gcstruct.h" Index: xc/programs/Xserver/Xprint/ps/PsMisc.c diff -u xc/programs/Xserver/Xprint/ps/PsMisc.c:1.4 xc/programs/Xserver/Xprint/ps/PsMisc.c:1.5 --- xc/programs/Xserver/Xprint/ps/PsMisc.c:1.4 Sun Oct 4 05:37:27 1998 +++ xc/programs/Xserver/Xprint/ps/PsMisc.c Wed Jan 17 17:36:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: PsMisc.c /main/5 1998/02/09 15:42:51 kaleb $ */ +/* $Xorg: PsMisc.c,v 1.3 2000/08/17 19:48:10 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -69,7 +69,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsMisc.c,v 1.4 1998/10/04 09:37:27 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsMisc.c,v 1.5 2001/01/17 22:36:32 dawes Exp $ */ #include "Xos.h" /* for SIGCLD on pre-POSIX systems */ #include Index: xc/programs/Xserver/Xprint/ps/PsPixel.c diff -u xc/programs/Xserver/Xprint/ps/PsPixel.c:1.4 xc/programs/Xserver/Xprint/ps/PsPixel.c:1.5 --- xc/programs/Xserver/Xprint/ps/PsPixel.c:1.4 Sun Oct 4 05:37:28 1998 +++ xc/programs/Xserver/Xprint/ps/PsPixel.c Wed Jan 17 17:36:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: PsPixel.c /main/4 1998/02/09 15:43:05 kaleb $ */ +/* $Xorg: PsPixel.c,v 1.3 2000/08/17 19:48:11 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -69,7 +69,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsPixel.c,v 1.4 1998/10/04 09:37:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsPixel.c,v 1.5 2001/01/17 22:36:32 dawes Exp $ */ #include Index: xc/programs/Xserver/Xprint/ps/PsPixmap.c diff -u xc/programs/Xserver/Xprint/ps/PsPixmap.c:1.3 xc/programs/Xserver/Xprint/ps/PsPixmap.c:1.4 --- xc/programs/Xserver/Xprint/ps/PsPixmap.c:1.3 Sun Dec 12 21:13:01 1999 +++ xc/programs/Xserver/Xprint/ps/PsPixmap.c Wed Jan 17 17:36:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: PsPixmap.c /main/3 1998/02/09 15:43:09 kaleb $ */ +/* $Xorg: PsPixmap.c,v 1.3 2000/08/17 19:48:11 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -53,7 +53,7 @@ * or other dealings in this Software without prior written authorization * from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsPixmap.c,v 1.3 1999/12/13 02:13:01 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsPixmap.c,v 1.4 2001/01/17 22:36:32 dawes Exp $ */ /******************************************************************* ** ** ********************************************************* Index: xc/programs/Xserver/Xprint/ps/PsPolygon.c diff -u xc/programs/Xserver/Xprint/ps/PsPolygon.c:1.5 xc/programs/Xserver/Xprint/ps/PsPolygon.c:1.6 --- xc/programs/Xserver/Xprint/ps/PsPolygon.c:1.5 Sun Dec 12 21:13:02 1999 +++ xc/programs/Xserver/Xprint/ps/PsPolygon.c Wed Jan 17 17:36:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: PsPolygon.c /main/4 1998/02/09 15:43:14 kaleb $ */ +/* $Xorg: PsPolygon.c,v 1.3 2000/08/17 19:48:11 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -69,7 +69,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsPolygon.c,v 1.5 1999/12/13 02:13:02 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsPolygon.c,v 1.6 2001/01/17 22:36:32 dawes Exp $ */ #include "Ps.h" #include "gcstruct.h" Index: xc/programs/Xserver/Xprint/ps/PsPrint.c diff -u xc/programs/Xserver/Xprint/ps/PsPrint.c:1.6 xc/programs/Xserver/Xprint/ps/PsPrint.c:1.7 --- xc/programs/Xserver/Xprint/ps/PsPrint.c:1.6 Sun Dec 12 21:13:02 1999 +++ xc/programs/Xserver/Xprint/ps/PsPrint.c Wed Jan 17 17:36:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: PsPrint.c /main/5 1998/02/09 15:43:18 kaleb $ */ +/* $Xorg: PsPrint.c,v 1.4 2000/08/17 19:48:11 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -23,7 +23,7 @@ /* * (c) Copyright 1996 Hewlett-Packard Company * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. + * (c) Copyright 1996, 2000 Sun Microsystems, Inc. All rights reserved. * (c) Copyright 1996 Novell, Inc. * (c) Copyright 1996 Digital Equipment Corp. * (c) Copyright 1996 Fujitsu Limited @@ -69,7 +69,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsPrint.c,v 1.6 1999/12/13 02:13:02 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsPrint.c,v 1.7 2001/01/17 22:36:32 dawes Exp $ */ #include #include @@ -89,17 +89,79 @@ #include "windowstr.h" #include "Oid.h" +/* static utility function to get document/page attributes */ +static void +S_GetPageAttributes(XpContextPtr pCon,int *iorient,int *icount, int *iplex, + int *ires, unsigned short *iwd, unsigned short *iht) +{ + char *count; + XpOid orient, plex; + /* + * Get the orientation + */ + orient = XpGetContentOrientation(pCon); + switch (orient) { + case xpoid_val_content_orientation_landscape: + *iorient = 1; + break; + case xpoid_val_content_orientation_reverse_portrait: + *iorient = 2; + break; + case xpoid_val_content_orientation_reverse_landscape: + *iorient = 3; + break; + case xpoid_val_content_orientation_portrait: + default: + *iorient = 0; + break; + } + + /* + * Get the count + */ + count = XpGetOneAttribute(pCon, XPDocAttr, "copy-count"); + if( count ) + { + int ii = sscanf(count, "%d", icount); + if( ii!=1 ) *icount = 1; + } + else *icount = 1; + + /* + * Get the plex + */ + plex = XpGetPlex(pCon); + switch(plex) + { + case xpoid_val_plex_duplex: + *iplex = 1; + break; + case xpoid_val_plex_tumble: + *iplex = 2; + break; + default: + *iplex = 0; + break; + } + + /* + * Get the resolution and media size + */ + *ires = XpGetResolution(pCon); + XpGetMediumDimensions(pCon, iwd, iht); +} + + int PsStartJob( XpContextPtr pCon, Bool sendClientData, ClientPtr client) { + int iorient, iplex, icount, ires; + unsigned short iwd, iht; PsContextPrivPtr pConPriv = (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr; - char *jobHeader; - CARD16 width, height; - char s[20]; /* * Create a temporary file to store the printer output. @@ -110,8 +172,13 @@ /* * Write the job header to the job file. */ + + /* get document level attributes */ + S_GetPageAttributes(pCon,&iorient,&icount,&iplex,&ires,&iwd,&iht); - pConPriv->pPsOut = PsOut_BeginFile(pConPriv->pJobFile); + pConPriv->pPsOut = PsOut_BeginFile(pConPriv->pJobFile, + iorient, icount, iplex, ires, + (int)iwd, (int)iht); return Success; } @@ -219,7 +286,6 @@ { int iorient, iplex, icount, ires; unsigned short iwd, iht; - char *count; register WindowPtr pChild; PsContextPrivPtr pConPriv = (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr; @@ -227,59 +293,15 @@ (PsWindowPrivPtr)pWin->devPrivates[PsWindowPrivateIndex].ptr; char s[80]; xEvent event; - XpOid orient, plex; /* * Put a pointer to the context in the window private structure */ pWinPriv->validContext = 1; pWinPriv->context = pCon; - - /* - * Get the orientation - */ - orient = XpGetContentOrientation(pCon); - switch (orient) { - case xpoid_val_content_orientation_landscape: - iorient = 1; - break; - case xpoid_val_content_orientation_reverse_portrait: - iorient = 2; - break; - case xpoid_val_content_orientation_reverse_landscape: - iorient = 3; - break; - case xpoid_val_content_orientation_portrait: - default: - iorient = 0; - break; - } - - /* - * Get the count - */ - count = XpGetOneAttribute(pCon, XPDocAttr, "copy-count"); - if( count ) - { - int ii = sscanf(count, "%d", &icount); - if( ii!=1 ) icount = 1; - } - else icount = 1; - - /* - * Get the plex - */ - plex = XpGetPlex(pCon); - if (plex == xpoid_val_plex_duplex) iplex = 1; - else if (plex == xpoid_val_plex_tumble) iplex = 2; - else iplex = 0; - - /* - * Get the resolution and media size - */ - ires = XpGetResolution(pCon); - XpGetMediumDimensions(pCon, &iwd, &iht); + /* get page level attributes */ + S_GetPageAttributes(pCon,&iorient,&icount,&iplex,&ires,&iwd,&iht); /* * Start the page */ Index: xc/programs/Xserver/Xprint/ps/PsSpans.c diff -u xc/programs/Xserver/Xprint/ps/PsSpans.c:1.6 xc/programs/Xserver/Xprint/ps/PsSpans.c:1.7 --- xc/programs/Xserver/Xprint/ps/PsSpans.c:1.6 Sun Dec 12 21:13:02 1999 +++ xc/programs/Xserver/Xprint/ps/PsSpans.c Wed Jan 17 17:36:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: PsSpans.c /main/4 1998/02/09 15:43:23 kaleb $ */ +/* $Xorg: PsSpans.c,v 1.3 2000/08/17 19:48:11 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -69,7 +69,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsSpans.c,v 1.6 1999/12/13 02:13:02 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsSpans.c,v 1.7 2001/01/17 22:36:32 dawes Exp $ */ #include "Ps.h" #include "gcstruct.h" Index: xc/programs/Xserver/Xprint/ps/PsText.c diff -u xc/programs/Xserver/Xprint/ps/PsText.c:1.8 xc/programs/Xserver/Xprint/ps/PsText.c:1.10 --- xc/programs/Xserver/Xprint/ps/PsText.c:1.8 Thu Dec 30 08:09:37 1999 +++ xc/programs/Xserver/Xprint/ps/PsText.c Fri Jan 19 12:42:53 2001 @@ -1,4 +1,4 @@ -/* $TOG: PsText.c /main/4 1998/02/09 15:43:26 kaleb $ */ +/* $Xorg: PsText.c,v 1.6 2000/08/17 19:48:11 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -69,12 +69,51 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsText.c,v 1.8 1999/12/30 13:09:37 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsText.c,v 1.10 2001/01/19 17:42:53 dawes Exp $ */ #include "Ps.h" #include "gcstruct.h" #include "windowstr.h" +#include "fntfilst.h" +#include +static int readFontName(char *fileName, char *file_name, char *dlfnam) +{ + FILE *file; + struct stat statb; + int count, i, status; + char buf[256]; + char *front, *end, *fn; + + file = fopen(fileName, "r"); + if(file) + { + if (fstat (fileno(file), &statb) == -1) + return 0; + while(fgets(buf, 255, file)) + { + if((fn = strstr(buf, " -"))) + { + strcpy(file_name, buf); + file_name[fn - buf - 4] = '\0'; + fn++; + if((front = strstr(fn, "normal-"))) + { + fn[front - fn] = '\0'; + if(strstr(dlfnam, fn)) + { + fclose(file); + return 1; + } + } + } + } + } + file_name[0] = '\0'; + fclose(file); + return 0; +} + int PsPolyText8( DrawablePtr pDrawable, @@ -108,23 +147,69 @@ } else { - int iso; - int siz; - float mtx[4]; - char *fnam; - PsOutPtr psOut; - ColormapPtr cMap; - - if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return x; - PsOut_Offset(psOut, pDrawable->x, pDrawable->y); - PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); - fnam = PsGetPSFontName(pGC->font); - if( !fnam ) return x; - siz = PsGetFontSize(pGC->font, mtx); - iso = PsIsISOLatin1Encoding(pGC->font); - if( !siz ) PsOut_TextAttrsMtx(psOut, fnam, mtx, iso); - else PsOut_TextAttrs(psOut, fnam, siz, iso); - PsOut_Text(psOut, x, y, string, count, -1); + char *fnam, ffname[512], *dlfnam; + FontDirectoryPtr dir; + char file_name[MAXFONTNAMELEN]; + + dir = pGC->font->fpe->private; + sprintf(ffname, "%s%s", dir->directory, "fonts.dir"); + + fnam = PsGetPSFontName(pGC->font); + if(!fnam){ + if(!(dlfnam = PsGetFontName(pGC->font))) + return x; + /* If Type1 font, try to download to printer first */ + if(strstr(ffname, "Type1") && readFontName(ffname, file_name, dlfnam)) + { + int iso; + int siz; + float mtx[4]; + PsOutPtr psOut; + ColormapPtr cMap; + + if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) + return x; + sprintf(ffname, "%s%s%s", dir->directory, file_name, ".pfa"); + PsOut_DownloadType1(psOut, file_name, ffname); + PsOut_Offset(psOut, pDrawable->x, pDrawable->y); + PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); + siz = PsGetFontSize(pGC->font, mtx); + iso = PsIsISOLatin1Encoding(pGC->font); + if( !siz ) PsOut_TextAttrsMtx(psOut, file_name, mtx, 1); + else PsOut_TextAttrs(psOut, file_name, siz, 1); + PsOut_Text(psOut, x, y, string, count, -1); + return x; + } + { + unsigned long n, i; + int w; + CharInfoPtr charinfo[255]; + + GetGlyphs(pGC->font, (unsigned long)count, + (unsigned char *)string, Linear8Bit,&n, charinfo); + w = 0; + for (i=0; i < n; i++) w += charinfo[i]->metrics.characterWidth; + if (n != 0) + PsPolyGlyphBlt(pDrawable, pGC, x, y, n, + charinfo, FONTGLYPHS(pGC->font)); + x += w; + } + }else{ + int iso; + int siz; + float mtx[4]; + PsOutPtr psOut; + ColormapPtr cMap; + + if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return x; + PsOut_Offset(psOut, pDrawable->x, pDrawable->y); + PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); + siz = PsGetFontSize(pGC->font, mtx); + iso = PsIsISOLatin1Encoding(pGC->font); + if( !siz ) PsOut_TextAttrsMtx(psOut, fnam, mtx, iso); + else PsOut_TextAttrs(psOut, fnam, siz, iso); + PsOut_Text(psOut, x, y, string, count, -1); + } } return x; } @@ -163,13 +248,18 @@ } else { - int i; - char *str; - if( !count ) return x; - str = (char *)xalloc(count); - for( i=0 ; ifont, (unsigned long)count, (unsigned char *)string, + (FONTLASTROW(pGC->font) == 0) ? Linear16Bit : TwoD16Bit, + &n, charinfo); + w = 0; + for (i=0; i < n; i++) w += charinfo[i]->metrics.characterWidth; + if (n != 0) + PsPolyGlyphBlt(pDrawable, pGC, x, y, n, charinfo, FONTGLYPHS(pGC->font)); + x += w; } return x; } @@ -218,7 +308,7 @@ PsOut_Offset(psOut, pDrawable->x, pDrawable->y); PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); fnam = PsGetPSFontName(pGC->font); - if( !fnam ) return; + if( !fnam ) fnam = "Times-Roman"; siz = PsGetFontSize(pGC->font, mtx); iso = PsIsISOLatin1Encoding(pGC->font); if( !siz ) PsOut_TextAttrsMtx(psOut, fnam, mtx, iso); @@ -294,5 +384,91 @@ CharInfoPtr *pCharInfo, pointer pGlyphBase) { - /* NOT TO BE IMPLEMENTED */ + int width, height; + PixmapPtr pPixmap; + int nbyLine; /* bytes per line of padded pixmap */ + FontPtr pfont; + GCPtr pGCtmp; + register int i; + register int j; + unsigned char *pbits; /* buffer for PutImage */ + register unsigned char *pb; /* temp pointer into buffer */ + register CharInfoPtr pci; /* currect char info */ + register unsigned char *pglyph; /* pointer bits in glyph */ + int gWidth, gHeight; /* width and height of glyph */ + register int nbyGlyphWidth; /* bytes per scanline of glyph */ + int nbyPadGlyph; /* server padded line of glyph */ + int w, tmpx; + XID gcvals[3]; + + pfont = pGC->font; + width = FONTMAXBOUNDS(pfont,rightSideBearing) - + FONTMINBOUNDS(pfont,leftSideBearing); + height = FONTMAXBOUNDS(pfont,ascent) + + FONTMAXBOUNDS(pfont,descent); + + if ((width == 0) || (height == 0) ) + return; + { + int i; + w = 0; + for (i=0; i < nGlyphs; i++) w += pCharInfo[i]->metrics.characterWidth; + } + pGCtmp = GetScratchGC(1, pDrawable->pScreen); + if (!pGCtmp) + { + (*pDrawable->pScreen->DestroyPixmap)(pPixmap); + return; + } + + gcvals[0] = GXcopy; + gcvals[1] = pGC->fgPixel; + gcvals[2] = pGC->bgPixel; + + DoChangeGC(pGCtmp, GCFunction|GCForeground|GCBackground, gcvals, 0); + + + nbyLine = BitmapBytePad(width); + pbits = (unsigned char *)ALLOCATE_LOCAL(height*nbyLine); + if (!pbits){ + PsDestroyPixmap(pPixmap); + return; + } + tmpx = 0; + while(nGlyphs--) + { + pci = *pCharInfo++; + pglyph = FONTGLYPHBITS(pGlyphBase, pci); + gWidth = GLYPHWIDTHPIXELS(pci); + gHeight = GLYPHHEIGHTPIXELS(pci); + if (gWidth && gHeight) + { + nbyGlyphWidth = GLYPHWIDTHBYTESPADDED(pci); + nbyPadGlyph = BitmapBytePad(gWidth); + + if (nbyGlyphWidth == nbyPadGlyph +#if GLYPHPADBYTES != 4 + && (((int) pglyph) & 3) == 0 +#endif + ) + { + pb = pglyph; + } + else + { + for (i=0, pb = pbits; imetrics.leftSideBearing, + y - pci->metrics.ascent, gWidth, gHeight, + 0, XYBitmap, (char *)pb); + x += pci->metrics.characterWidth; + } + } + DEALLOCATE_LOCAL(pbits); + FreeScratchGC(pGCtmp); } Index: xc/programs/Xserver/Xprint/ps/PsWindow.c diff -u xc/programs/Xserver/Xprint/ps/PsWindow.c:1.8 xc/programs/Xserver/Xprint/ps/PsWindow.c:1.9 --- xc/programs/Xserver/Xprint/ps/PsWindow.c:1.8 Sun Dec 20 06:57:27 1998 +++ xc/programs/Xserver/Xprint/ps/PsWindow.c Wed Jan 17 17:36:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: PsWindow.c /main/5 1998/02/09 15:43:30 kaleb $ */ +/* $Xorg: PsWindow.c,v 1.3 2000/08/17 19:48:11 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -69,7 +69,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsWindow.c,v 1.8 1998/12/20 11:57:27 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsWindow.c,v 1.9 2001/01/17 22:36:32 dawes Exp $ */ #include #include Index: xc/programs/Xserver/Xprint/ps/psout.c diff -u xc/programs/Xserver/Xprint/ps/psout.c:1.6 xc/programs/Xserver/Xprint/ps/psout.c:1.7 --- xc/programs/Xserver/Xprint/ps/psout.c:1.6 Sun Dec 12 21:13:03 1999 +++ xc/programs/Xserver/Xprint/ps/psout.c Wed Jan 17 17:36:32 2001 @@ -1,4 +1,4 @@ -/* $TOG: psout.c /main/6 1998/02/09 15:42:56 kaleb $ */ +/* $Xorg: psout.c,v 1.5 2000/08/17 19:48:11 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -23,7 +23,7 @@ /* * (c) Copyright 1996 Hewlett-Packard Company * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. + * (c) Copyright 1996, 2000 Sun Microsystems, Inc. All Rights Reserved. * (c) Copyright 1996 Novell, Inc. * (c) Copyright 1996 Digital Equipment Corp. * (c) Copyright 1996 Fujitsu Limited @@ -69,7 +69,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/psout.c,v 1.6 1999/12/13 02:13:03 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/psout.c,v 1.7 2001/01/17 22:36:32 dawes Exp $ */ /* * For XFree86 3.3.3: @@ -320,11 +320,23 @@ 0 2 i rl dp 0 rl 0 2 i ng rl 0 3 i rl ng 0 rl cp fl p p\ gr T}bd\ /Im1{6 4 r tr scl t [3 i 0 0 5 i 0 0]{cf str1 rh p} im}bd\ +/Im1rev{6 4 r tr scl f [3 i 0 0 5 i 0 0]{cf str1 rh p} im}bd\ /Im24{gs 6 4 r tr scl 8 [3 i 0 0 5 i 0 0]{cf str3 rh p} f 3 ci}bd\ /Im1t{6 4 r tr scl t [3 i 0 0 5 i 0 0]{} im}bd\ /Im24t{gs 6 4 r tr scl 8 [3 i 0 0 5 i 0 0]{} f 3 ci}bd\ +/ck2{/currentpagedevice wh \ +{p dp currentpagedevice dp 3 -1 r kn \ +{x get al p 3 -1 r eq 3 1 r eq and } \ +{p p p p t}ie} \ +{p p p t}ie}bd \ +/ck1{/currentpagedevice wh \ +{p dp currentpagedevice dp 3 -1 r kn \ +{x get eq} {p p p t}ie} \ +{p p t}ie}bd \ "; +int pagenum = 0; +char *pg_orient[] = {"Portrait","Landscape","Reverse Portrait","Reverse Landscape"}; /* * Setup definitions */ @@ -446,12 +458,109 @@ } } +static void +S_SetPageDevice(PsOutPtr self, int orient, int count, int plex, int res, + int wd, int ht, int isPage) +{ + float fwd = ((float)wd/(float)res)*72.; + float fht = ((float)ht/(float)res)*72.; + + S_OutTok(self, "/pWd", 0); + S_OutNum(self, fwd); + S_OutTok(self, "d /pHt", 0); + S_OutNum(self, fht); + S_OutTok(self, "d", 1); + + /* + * if these are page attributes, have PostScript check to see if they + * have changed. If not, don't do setpagedevice, since it will cause + * a page flush and screw up duplex printing. Having PostScript check + * means we don't have to keep track ourselves. + */ + if(isPage) { + S_OutNum(self, (float) orient); + S_OutTok(self, "/Orientation ck1", 0); + S_OutTok(self, "pWd pHt /PageSize ck2 and not {", 1); + } + S_OutTok(self, "{db", 0); + + S_OutTok(self, "/Orientation", 0); + S_OutNum(self, (float) orient); + S_OutTok(self, " d ", 0); + S_OutTok(self, "/PageSize [pWd pHt] d", 0); + + S_OutTok(self, " de spd", 0); + /* + * save a flag to show if we failed to set orientation... determined + * by both/either Orientation and/or PageSize, use this + * later to set/not set orientation using Cs command. + */ + S_OutTok(self,"}stp /orientationFailed x d", 1); + /* + * if these are page attributes, have PostScript check to see if they + * have changed. If not, don't do setpagedevice, since it will cause + * a page flush and screw up duplex printing. Having PostScript check + * means we don't have to keep track ourselves. + */ + if(isPage) + { + S_OutTok(self,"}if",1); + + S_OutTok(self, (plex==0)?"f":"t", 0); + S_OutTok(self, "/Duplex ck1 ", 0); + + S_OutTok(self, (plex==2)?"t":"f", 0); + S_OutTok(self, "/Tumble ck1 and ", 0); + + + S_OutNum(self, (float)res); + S_OutNum(self, (float)res); + S_OutTok(self, " /HWResolution ck2 and", 0); + + if( count>1 ) + { + S_OutNum(self, (float)count); + S_OutTok(self, " /NumCopies", 0); + S_OutTok(self, " ck1 and ", 0); + } + S_OutTok(self," not {",1); + } + S_OutTok(self, "{db", 0); + + S_OutTok(self, "/Duplex ", 0); + S_OutTok(self, (plex==0)?"f":"t", 0); + S_OutTok(self, " d ", 0); + + S_OutTok(self, "/Tumble ", 0); + S_OutTok(self, (plex==2)?"t":"f", 0); + S_OutTok(self, " d ", 0); + + S_OutTok(self, " /HWResolution [", 0); + S_OutNum(self, (float)res); + S_OutNum(self, (float)res); + S_OutTok(self, "] d ", 0); + + if( count>1 ) + { + S_OutTok(self, " /NumCopies", 0); + S_OutNum(self, (float)count); + S_OutTok(self, " d ", 0); + } + S_OutTok(self, " de spd}stp p", 1); + + if(isPage) + { + S_OutTok(self, "}if", 1); + } +} + /******************************************************************* * PUBLIC FUNCTIONS * *******************************************************************/ PsOutPtr -PsOut_BeginFile(FILE *fp) +PsOut_BeginFile(FILE *fp, int orient, int count, int plex, int res, + int wd, int ht) { int i; /* @@ -461,6 +570,7 @@ psout = (PsOutPtr)xalloc(sizeof(PsOutRec)); memset(psout, 0, sizeof(PsOutRec)); psout->Fp = fp; + pagenum = 0; /* * Output PostScript header @@ -476,6 +586,9 @@ S_Comment(psout, "%%EndProcSet"); S_Comment(psout, "%%EndProlog"); S_Comment(psout, "%%BeginSetup"); + /* set document level page attributes */ + S_SetPageDevice(psout, orient, count, plex, res, wd, ht, 0); + S_Comment(psout, "%%Pages: atend"); S_OutDefs(psout, S_SetupDefs); S_Comment(psout, "%%EndSetup"); /* @@ -497,8 +610,12 @@ void PsOut_EndFile(PsOutPtr self, int closeFile) { + char coms[50]; int i; + S_Comment(self,"%%Trailer"); + sprintf(coms,"%%%%Pages: %d",pagenum); + S_Comment(self, coms); S_Comment(self, "%%EOF"); if( self->NDashes && self->Dashes ) xfree(self->Dashes); if( self->FontName ) xfree(self->FontName); @@ -507,6 +624,7 @@ if( closeFile ) fclose(self->Fp); for( i=0 ; iNDownloads ; i++ ) xfree(self->Downloads[i]); if( self->Downloads ) xfree(self->Downloads); + pagenum = 0; /* reset page num back to 0 */ xfree(self); } @@ -514,42 +632,46 @@ PsOut_BeginPage(PsOutPtr self, int orient, int count, int plex, int res, int wd, int ht) { - float fwd = ((float)wd/(float)res)*72.; - float fht = ((float)ht/(float)res)*72.; - S_OutTok(self, "/pWd", 0); - S_OutNum(self, fwd); - S_OutTok(self, "d /pHt", 0); - S_OutNum(self, fht); - S_OutTok(self, "d", 1); - - S_OutTok(self, "{db", 0); - if( count>1 ) - { - S_OutTok(self, "/NumCopies", 0); - S_OutNum(self, (float)count); - S_OutTok(self, "d", 0); - } - if( plex ) S_OutTok(self, "/Duplex t d", 0); - if( plex==1 ) S_OutTok(self, "/Tumble f d", 0); - else S_OutTok(self, "/Tumble t d", 0); + char coms[50]; - S_OutTok(self, "/Orientation", 0); - S_OutNum(self, (float) orient); - - S_OutTok(self, "d/HWResolution [", 0); - S_OutNum(self, (float)res); - S_OutNum(self, (float)res); - S_OutTok(self, "] d/PageSize [pWd pHt]d de spd}stp p", 1); +/*** comment for pagenumbers *****/ + + S_Comment(self,"%%PageHeader"); + pagenum++; + sprintf(coms,"%%%%Page: %d %d",pagenum,pagenum); + S_Comment(self, coms); + sprintf(coms,"%%%%PageOrientation: %s",pg_orient[orient]); + S_Comment(self, coms); + +/*** end comment *****************/ - S_OutTok(self, "gs", 0); + /* set page level page attributes */ + S_SetPageDevice(self, orient, count, plex, res, wd, ht, 1); + + S_OutTok(self, "gs ", 0); + /* + * check to see if we set orientation already; if it wasn't set, + * use Cs to set orientation here. + */ + S_OutNum(self, (float)orient); + S_OutTok(self, "orientationFailed { ", 0); S_OutNum(self, (float)orient); - S_OutTok(self, "Cs 100 sml gs", 1); + S_OutTok(self, " } { 0 }ie Cs 100 sml gs", 1); } void PsOut_EndPage(PsOutPtr self) { S_OutTok(self, "gr gr sp", 1); + + /* did grestore: mark attributes 'dirty' so they will be re-sent */ + PsOut_DirtyAttributes(self); + +/*** comment for pagenumbers *****/ + + S_Comment(self,"%%PageTrailer"); + +/*** end comment *****************/ } void @@ -1075,8 +1197,69 @@ S_OutNum(self, (float)h); S_OutNum(self, (float)sw); S_OutNum(self, (float)sh); - if( format==1 ) S_OutTok(self, "Im1", 1); + if( format==1 ) { + if(self->RevImage) + S_OutTok(self, "Im1rev", 1); + else + S_OutTok(self, "Im1", 1); + } else S_OutTok(self, "Im24", 1); + self->ImageFormat = format; + self->CurColor = savClr; +} + +void +PsOut_BeginImageIM(PsOutPtr self, int bclr, int fclr, int x, int y, + int w, int h, int sw, int sh, int format) +{ + int savClr = self->CurColor; + int xo = self->XOff; + int yo = self->YOff; + + if( self->InFrame || self->InTile ) xo = yo = 0; + x += xo; y += yo; + if( self->InTile ) + { + if( self->InTile>=PsStip && format!=1 ) { self->ImgSkip = 1; return; } + self->ImgBClr = bclr; self->ImgFClr = fclr; + self->ImgX = x; self->ImgY = y; + self->ImgW = w; self->ImgH = h; + self->SclW = sw; self->SclH = sh; + S_OutTok(self, "<", 0); + self->ImageFormat = format; + self->RevImage = 0; + if( self->InTile==PsTile && format==1 && fclr==0xFFFFFF ) + self->RevImage = 1; + return; + } + + self->RevImage = 0; + if( format==1 ) + { + S_OutTok(self, "gs", 0); + if( fclr==0xFFFFFF ) + { + PsOut_Color(self, bclr); + self->RevImage = 1; + } + else + { + PsOut_Color(self, fclr); + } + } + S_OutNum(self, (float)x); + S_OutNum(self, (float)y); + S_OutNum(self, (float)w); + S_OutNum(self, (float)h); + S_OutNum(self, (float)sw); + S_OutNum(self, (float)sh); + if( format==1 ){ + if(self->RevImage) + S_OutTok(self, "Im1rev", 1); + else + S_OutTok(self, "Im1", 1); + } + else S_OutTok(self, "Im24", 1); self->ImageFormat = format; self->CurColor = savClr; } Index: xc/programs/Xserver/Xprint/ps/psout.h diff -u xc/programs/Xserver/Xprint/ps/psout.h:1.1.1.2 xc/programs/Xserver/Xprint/ps/psout.h:1.1.1.3 --- xc/programs/Xserver/Xprint/ps/psout.h:1.1.1.2 Sun Sep 27 04:48:08 1998 +++ xc/programs/Xserver/Xprint/ps/psout.h Tue Jan 16 17:42:05 2001 @@ -1,4 +1,4 @@ -/* $TOG: psout.h /main/3 1998/02/09 15:43:01 kaleb $ */ +/* $Xorg: psout.h,v 1.4 2000/08/17 19:48:11 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -144,7 +144,8 @@ typedef struct PsOutRec_ *PsOutPtr; -extern PsOutPtr PsOut_BeginFile(FILE *fp); +extern PsOutPtr PsOut_BeginFile(FILE *fp, int orient, int count, int plex, + int res, int wd, int ht); extern void PsOut_EndFile(PsOutPtr self, int closeFile); extern void PsOut_BeginPage(PsOutPtr self, int orient, int count, int plex, int res, int wd, int ht); Index: xc/programs/Xserver/Xprint/raster/Imakefile diff -u xc/programs/Xserver/Xprint/raster/Imakefile:1.4 xc/programs/Xserver/Xprint/raster/Imakefile:1.5 --- xc/programs/Xserver/Xprint/raster/Imakefile:1.4 Sat Apr 17 05:08:26 1999 +++ xc/programs/Xserver/Xprint/raster/Imakefile Wed Jan 17 17:36:33 2001 @@ -1,9 +1,9 @@ -XCOMM $XFree86: xc/programs/Xserver/Xprint/raster/Imakefile,v 1.4 1999/04/17 09:08:26 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:11 cpqbld Exp $ -XCOMM $XConsortium: Imakefile /main/1 1996/09/28 17:05:59 rws $ +XCOMM $XFree86: xc/programs/Xserver/Xprint/raster/Imakefile,v 1.5 2001/01/17 22:36:33 dawes Exp $ #include Index: xc/programs/Xserver/Xprint/raster/Raster.c diff -u xc/programs/Xserver/Xprint/raster/Raster.c:1.3 xc/programs/Xserver/Xprint/raster/Raster.c:1.4 --- xc/programs/Xserver/Xprint/raster/Raster.c:1.3 Sun Oct 4 05:37:32 1998 +++ xc/programs/Xserver/Xprint/raster/Raster.c Wed Jan 17 17:36:33 2001 @@ -1,4 +1,4 @@ -/* $TOG: Raster.c /main/4 1998/04/06 14:56:49 mgreess $ */ +/* $Xorg: Raster.c,v 1.3 2000/08/17 19:48:11 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -31,7 +31,7 @@ copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/raster/Raster.c,v 1.3 1998/10/04 09:37:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/raster/Raster.c,v 1.4 2001/01/17 22:36:33 dawes Exp $ */ /******************************************************************* ** Index: xc/programs/Xserver/Xprint/raster/Raster.h diff -u xc/programs/Xserver/Xprint/raster/Raster.h:1.1.1.1 xc/programs/Xserver/Xprint/raster/Raster.h:1.1.1.2 --- xc/programs/Xserver/Xprint/raster/Raster.h:1.1.1.1 Sat Dec 21 23:08:23 1996 +++ xc/programs/Xserver/Xprint/raster/Raster.h Tue Jan 16 17:42:07 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: Raster.h /main/2 1996/11/16 15:26:32 rws $ */ +/* $Xorg: Raster.h,v 1.3 2000/08/17 19:48:12 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. Index: xc/programs/Xserver/Xprint/raster/RasterAttVal.c diff -u xc/programs/Xserver/Xprint/raster/RasterAttVal.c:1.1.1.1 xc/programs/Xserver/Xprint/raster/RasterAttVal.c:1.1.1.2 --- xc/programs/Xserver/Xprint/raster/RasterAttVal.c:1.1.1.1 Sat Dec 21 23:08:23 1996 +++ xc/programs/Xserver/Xprint/raster/RasterAttVal.c Tue Jan 16 17:42:07 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: RasterAttVal.c /main/1 1996/09/28 17:06:26 rws $ */ +/* $Xorg: RasterAttVal.c,v 1.3 2000/08/17 19:48:12 cpqbld Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. Index: xc/programs/Xserver/cfb/Imakefile diff -u xc/programs/Xserver/cfb/Imakefile:3.25 xc/programs/Xserver/cfb/Imakefile:3.26 --- xc/programs/Xserver/cfb/Imakefile:3.25 Thu Nov 30 19:24:31 2000 +++ xc/programs/Xserver/cfb/Imakefile Wed Jan 17 17:36:34 2001 @@ -1,5 +1,8 @@ -XCOMM $TOG: Imakefile /main/71 1997/11/17 10:00:11 msr $ -XCOMM $XFree86: xc/programs/Xserver/cfb/Imakefile,v 3.25 2000/12/01 00:24:31 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:12 cpqbld Exp $ + + + +XCOMM $XFree86: xc/programs/Xserver/cfb/Imakefile,v 3.26 2001/01/17 22:36:34 dawes Exp $ #define IHaveModules #include Index: xc/programs/Xserver/cfb/cfb.h diff -u xc/programs/Xserver/cfb/cfb.h:3.25 xc/programs/Xserver/cfb/cfb.h:3.27 --- xc/programs/Xserver/cfb/cfb.h:3.25 Mon Oct 23 17:16:43 2000 +++ xc/programs/Xserver/cfb/cfb.h Tue Jan 30 17:06:15 2001 @@ -1,4 +1,4 @@ -/* $TOG: cfb.h /main/53 1998/02/09 14:08:27 kaleb $ */ +/* $Xorg: cfb.h,v 1.3 2000/08/17 19:48:12 cpqbld Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -27,7 +27,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfb.h,v 3.25 2000/10/23 21:16:43 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfb.h,v 3.27 2001/01/30 22:06:15 tsi Exp $ */ #if !defined(__CFB_H__) || defined(CFB_PROTOTYPES_ONLY) @@ -1221,7 +1221,7 @@ xArc * /*parcs*/ ); -#if !defined(SINGLEDEPTH) && PSZ != 8 || defined(FORCE_SEPARATE_PRIVATE) +#if (!defined(SINGLEDEPTH) && PSZ != 8) || defined(FORCE_SEPARATE_PRIVATE) #define CFB_NEED_SCREEN_PRIVATE Index: xc/programs/Xserver/cfb/cfb8bit.c diff -u xc/programs/Xserver/cfb/cfb8bit.c:1.3 xc/programs/Xserver/cfb/cfb8bit.c:1.4 --- xc/programs/Xserver/cfb/cfb8bit.c:1.3 Sat Feb 12 00:43:17 2000 +++ xc/programs/Xserver/cfb/cfb8bit.c Wed Jan 17 17:36:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: cfb8bit.c /main/14 1998/02/09 14:03:59 kaleb $ */ +/* $Xorg: cfb8bit.c,v 1.3 2000/08/17 19:48:12 cpqbld Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/cfb/cfb8bit.c,v 1.3 2000/02/12 05:43:17 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfb8bit.c,v 1.4 2001/01/17 22:36:34 dawes Exp $ */ /* * cfb8bit.c Index: xc/programs/Xserver/cfb/cfb8bit.h diff -u xc/programs/Xserver/cfb/cfb8bit.h:3.4 xc/programs/Xserver/cfb/cfb8bit.h:3.5 --- xc/programs/Xserver/cfb/cfb8bit.h:3.4 Fri Feb 11 22:39:20 2000 +++ xc/programs/Xserver/cfb/cfb8bit.h Wed Jan 17 17:36:34 2001 @@ -7,7 +7,7 @@ * are used for depths other than 8. Perhaps the file should be * renamed. dpw */ -/* $XFree86: xc/programs/Xserver/cfb/cfb8bit.h,v 3.4 2000/02/12 03:39:20 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfb8bit.h,v 3.5 2001/01/17 22:36:34 dawes Exp $ */ /* @@ -30,7 +30,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $TOG: cfb8bit.h /main/19 1998/02/09 14:04:05 kaleb $ */ +/* $Xorg: cfb8bit.h,v 1.3 2000/08/17 19:48:12 cpqbld Exp $ */ #include "servermd.h" Index: xc/programs/Xserver/cfb/cfb8line.c diff -u xc/programs/Xserver/cfb/cfb8line.c:3.13 xc/programs/Xserver/cfb/cfb8line.c:3.15 --- xc/programs/Xserver/cfb/cfb8line.c:3.13 Tue Oct 24 14:07:46 2000 +++ xc/programs/Xserver/cfb/cfb8line.c Tue Jan 30 17:06:15 2001 @@ -1,5 +1,5 @@ /* - * $TOG: cfb8line.c /main/34 1998/02/09 14:04:19 kaleb $ + * $Xorg: cfb8line.c,v 1.3 2000/08/17 19:48:13 cpqbld Exp $ * Copyright 1990, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Keith Packard, MIT X Consortium * - * $XFree86: xc/programs/Xserver/cfb/cfb8line.c,v 3.13 2000/10/24 18:07:46 dawes Exp $ + * $XFree86: xc/programs/Xserver/cfb/cfb8line.c,v 3.15 2001/01/30 22:06:15 tsi Exp $ * Jeff Anton'x fixes: cfb8line.c 97/02/07 */ @@ -890,17 +890,13 @@ } #else /* PSZ == 24 */ if (y1_or_e1 + x1_or_len <= PPW) - { + { if (x1_or_len) - { + { maskpartialbits(y1_or_e1, x1_or_len, e) -#ifdef __sparc__ - RROP_SOLID_MASK_lu((CfbBits *) addrp, e); -#else - RROP_SOLID_MASK((CfbBits *) addrp, e); -#endif - } - } + RROP_SOLID_MASK((CfbBits *) addrp, e); + } + } else { maskbits(y1_or_e1, x1_or_len, e, e3, x1_or_len) @@ -909,17 +905,9 @@ RROP_SOLID_MASK((CfbBits *) addrp, e); addrp += PPW; } -#ifdef __sparc__ - RROP_SPAN_lu(addrp, x1_or_len) -#else RROP_SPAN(addrp, x1_or_len) -#endif if (e3) -#ifdef __sparc__ - RROP_SOLID_MASK_lu((CfbBits *) addrp, e3); -#else RROP_SOLID_MASK((CfbBits *) addrp, e3); -#endif } #endif /* PSZ == 24 */ } Index: xc/programs/Xserver/cfb/cfballpriv.c diff -u xc/programs/Xserver/cfb/cfballpriv.c:1.9 xc/programs/Xserver/cfb/cfballpriv.c:1.11 --- xc/programs/Xserver/cfb/cfballpriv.c:1.9 Sun Dec 12 21:13:06 1999 +++ xc/programs/Xserver/cfb/cfballpriv.c Tue Jan 30 17:06:15 2001 @@ -1,5 +1,5 @@ /* - * $TOG: cfballpriv.c /main/6 1998/02/09 14:04:27 kaleb $ + * $Xorg: cfballpriv.c,v 1.3 2000/08/17 19:48:13 cpqbld Exp $ * Copyright 1991, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfballpriv.c,v 1.9 1999/12/13 02:13:06 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfballpriv.c,v 1.11 2001/01/30 22:06:15 tsi Exp $ */ #include "X.h" #include "Xmd.h" @@ -41,11 +41,9 @@ #if PSZ==8 int cfbWindowPrivateIndex; int cfbGCPrivateIndex; -#ifdef CFB_NEED_SCREEN_PRIVATE -int cfbScreenPrivateIndex = -1; #endif -#endif #ifdef CFB_NEED_SCREEN_PRIVATE +int cfbScreenPrivateIndex = -1; static unsigned long cfbGeneration = 0; #endif Index: xc/programs/Xserver/cfb/cfbbitblt.c diff -u xc/programs/Xserver/cfb/cfbbitblt.c:1.11 xc/programs/Xserver/cfb/cfbbitblt.c:1.12 --- xc/programs/Xserver/cfb/cfbbitblt.c:1.11 Tue Sep 26 11:57:03 2000 +++ xc/programs/Xserver/cfb/cfbbitblt.c Wed Jan 17 17:36:34 2001 @@ -2,7 +2,7 @@ * cfb copy area */ -/* $XFree86: xc/programs/Xserver/cfb/cfbbitblt.c,v 1.11 2000/09/26 15:57:03 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbbitblt.c,v 1.12 2001/01/17 22:36:34 dawes Exp $ */ /* @@ -27,7 +27,7 @@ Author: Keith Packard */ -/* $TOG: cfbbitblt.c /main/73 1998/05/14 14:41:31 msr $ */ +/* $Xorg: cfbbitblt.c,v 1.3 2000/08/17 19:48:13 cpqbld Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/cfb/cfbblt.c diff -u xc/programs/Xserver/cfb/cfbblt.c:3.9 xc/programs/Xserver/cfb/cfbblt.c:3.10 --- xc/programs/Xserver/cfb/cfbblt.c:3.9 Fri Feb 11 22:39:22 2000 +++ xc/programs/Xserver/cfb/cfbblt.c Wed Jan 17 17:36:34 2001 @@ -1,7 +1,7 @@ /* * cfb copy area */ -/* $XFree86: xc/programs/Xserver/cfb/cfbblt.c,v 3.9 2000/02/12 03:39:22 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbblt.c,v 3.10 2001/01/17 22:36:34 dawes Exp $ */ /* @@ -26,7 +26,7 @@ Author: Keith Packard */ -/* $TOG: cfbblt.c /main/14 1998/02/09 14:04:41 kaleb $ */ +/* $Xorg: cfbblt.c,v 1.3 2000/08/17 19:48:13 cpqbld Exp $ */ /* 24-bit bug fixes: Peter Wainwright, 1998/11/28 */ Index: xc/programs/Xserver/cfb/cfbbres.c diff -u xc/programs/Xserver/cfb/cfbbres.c:3.3 xc/programs/Xserver/cfb/cfbbres.c:3.4 --- xc/programs/Xserver/cfb/cfbbres.c:3.3 Fri Feb 11 22:39:22 2000 +++ xc/programs/Xserver/cfb/cfbbres.c Wed Jan 17 17:36:34 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbbres.c,v 3.3 2000/02/12 03:39:22 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbbres.c,v 3.4 2001/01/17 22:36:34 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $TOG: cfbbres.c /main/16 1998/02/09 14:04:53 kaleb $ */ +/* $Xorg: cfbbres.c,v 1.3 2000/08/17 19:48:13 cpqbld Exp $ */ #include "X.h" #include "misc.h" #include "cfb.h" Index: xc/programs/Xserver/cfb/cfbbresd.c diff -u xc/programs/Xserver/cfb/cfbbresd.c:3.4 xc/programs/Xserver/cfb/cfbbresd.c:3.5 --- xc/programs/Xserver/cfb/cfbbresd.c:3.4 Tue Sep 26 11:57:03 2000 +++ xc/programs/Xserver/cfb/cfbbresd.c Wed Jan 17 17:36:34 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbbresd.c,v 3.4 2000/09/26 15:57:03 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbbresd.c,v 3.5 2001/01/17 22:36:34 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $TOG: cfbbresd.c /main/17 1998/02/09 14:04:47 kaleb $ */ +/* $Xorg: cfbbresd.c,v 1.3 2000/08/17 19:48:13 cpqbld Exp $ */ #include "X.h" #include "misc.h" #include "cfb.h" Index: xc/programs/Xserver/cfb/cfbbstore.c diff -u xc/programs/Xserver/cfb/cfbbstore.c:1.4 xc/programs/Xserver/cfb/cfbbstore.c:1.5 --- xc/programs/Xserver/cfb/cfbbstore.c:1.4 Sun Jan 31 07:21:41 1999 +++ xc/programs/Xserver/cfb/cfbbstore.c Wed Jan 17 17:36:34 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbbstore.c,v 1.4 1999/01/31 12:21:41 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbbstore.c,v 1.5 2001/01/17 22:36:34 dawes Exp $ */ /*- * cfbbstore.c -- * Functions required by the backing-store implementation in MI. @@ -15,7 +15,7 @@ * * */ -/* $TOG: cfbbstore.c /main/18 1998/02/17 11:03:44 kaleb $ */ +/* $Xorg: cfbbstore.c,v 1.3 2000/08/17 19:48:13 cpqbld Exp $ */ #include "cfb.h" #include "X.h" Index: xc/programs/Xserver/cfb/cfbcmap.c diff -u xc/programs/Xserver/cfb/cfbcmap.c:3.12 xc/programs/Xserver/cfb/cfbcmap.c:3.13 --- xc/programs/Xserver/cfb/cfbcmap.c:3.12 Fri Feb 11 22:39:23 2000 +++ xc/programs/Xserver/cfb/cfbcmap.c Wed Jan 17 17:36:34 2001 @@ -1,4 +1,4 @@ -/* $TOG: cfbcmap.c /main/25 1998/02/09 14:05:03 kaleb $ */ +/* $Xorg: cfbcmap.c,v 1.3 2000/08/17 19:48:13 cpqbld Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -27,7 +27,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbcmap.c,v 3.12 2000/02/12 03:39:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbcmap.c,v 3.13 2001/01/17 22:36:34 dawes Exp $ */ #include "X.h" Index: xc/programs/Xserver/cfb/cfbfillarc.c diff -u xc/programs/Xserver/cfb/cfbfillarc.c:3.3 xc/programs/Xserver/cfb/cfbfillarc.c:3.4 --- xc/programs/Xserver/cfb/cfbfillarc.c:3.3 Fri Feb 11 22:39:24 2000 +++ xc/programs/Xserver/cfb/cfbfillarc.c Wed Jan 17 17:36:35 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbfillarc.c,v 3.3 2000/02/12 03:39:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbfillarc.c,v 3.4 2001/01/17 22:36:35 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -21,7 +21,7 @@ ********************************************************/ -/* $TOG: cfbfillarc.c /main/18 1998/02/09 14:05:10 kaleb $ */ +/* $Xorg: cfbfillarc.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ #include "X.h" #include "Xprotostr.h" Index: xc/programs/Xserver/cfb/cfbfillrct.c diff -u xc/programs/Xserver/cfb/cfbfillrct.c:3.6 xc/programs/Xserver/cfb/cfbfillrct.c:3.7 --- xc/programs/Xserver/cfb/cfbfillrct.c:3.6 Fri Feb 11 22:39:24 2000 +++ xc/programs/Xserver/cfb/cfbfillrct.c Wed Jan 17 17:36:35 2001 @@ -1,7 +1,7 @@ /* * Fill rectangles. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbfillrct.c,v 3.6 2000/02/12 03:39:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbfillrct.c,v 3.7 2001/01/17 22:36:35 dawes Exp $ */ /* @@ -24,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $TOG: cfbfillrct.c /main/20 1998/02/09 14:05:17 kaleb $ */ +/* $Xorg: cfbfillrct.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/cfb/cfbfillsp.c diff -u xc/programs/Xserver/cfb/cfbfillsp.c:3.4 xc/programs/Xserver/cfb/cfbfillsp.c:3.5 --- xc/programs/Xserver/cfb/cfbfillsp.c:3.4 Fri Feb 11 22:39:24 2000 +++ xc/programs/Xserver/cfb/cfbfillsp.c Wed Jan 17 17:36:35 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbfillsp.c,v 3.4 2000/02/12 03:39:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbfillsp.c,v 3.5 2001/01/17 22:36:35 dawes Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -71,7 +71,7 @@ ******************************************************************/ -/* $TOG: cfbfillsp.c /main/47 1998/02/09 14:05:23 kaleb $ */ +/* $Xorg: cfbfillsp.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/cfb/cfbgc.c diff -u xc/programs/Xserver/cfb/cfbgc.c:1.4 xc/programs/Xserver/cfb/cfbgc.c:1.5 --- xc/programs/Xserver/cfb/cfbgc.c:1.4 Fri Feb 11 22:39:25 2000 +++ xc/programs/Xserver/cfb/cfbgc.c Wed Jan 17 17:36:35 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbgc.c,v 1.4 2000/02/12 03:39:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbgc.c,v 1.5 2001/01/17 22:36:35 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -42,7 +42,7 @@ ******************************************************************/ -/* $TOG: cfbgc.c /main/92 1998/02/09 14:05:32 kaleb $ */ +/* $Xorg: cfbgc.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/cfb/cfbgetsp.c diff -u xc/programs/Xserver/cfb/cfbgetsp.c:3.6 xc/programs/Xserver/cfb/cfbgetsp.c:3.7 --- xc/programs/Xserver/cfb/cfbgetsp.c:3.6 Fri Feb 11 22:39:25 2000 +++ xc/programs/Xserver/cfb/cfbgetsp.c Wed Jan 17 17:36:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: cfbgetsp.c /main/29 1998/02/09 14:05:39 kaleb $ */ +/* $Xorg: cfbgetsp.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbgetsp.c,v 3.6 2000/02/12 03:39:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbgetsp.c,v 3.7 2001/01/17 22:36:35 dawes Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/cfb/cfbglblt8.c diff -u xc/programs/Xserver/cfb/cfbglblt8.c:3.3 xc/programs/Xserver/cfb/cfbglblt8.c:3.4 --- xc/programs/Xserver/cfb/cfbglblt8.c:3.3 Fri Feb 11 22:39:26 2000 +++ xc/programs/Xserver/cfb/cfbglblt8.c Wed Jan 17 17:36:35 2001 @@ -1,4 +1,4 @@ -/* $TOG: cfbglblt8.c /main/33 1998/02/09 14:05:46 kaleb $ */ +/* $Xorg: cfbglblt8.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ /* Copyright 1989, 1998 The Open Group @@ -19,7 +19,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbglblt8.c,v 3.3 2000/02/12 03:39:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbglblt8.c,v 3.4 2001/01/17 22:36:35 dawes Exp $ */ /* * Poly glyph blt. Accepts an arbitrary font <= 32 bits wide, in Copy mode Index: xc/programs/Xserver/cfb/cfbhrzvert.c diff -u xc/programs/Xserver/cfb/cfbhrzvert.c:3.4 xc/programs/Xserver/cfb/cfbhrzvert.c:3.5 --- xc/programs/Xserver/cfb/cfbhrzvert.c:3.4 Fri Feb 11 22:39:26 2000 +++ xc/programs/Xserver/cfb/cfbhrzvert.c Wed Jan 17 17:36:35 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbhrzvert.c,v 3.4 2000/02/12 03:39:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbhrzvert.c,v 3.5 2001/01/17 22:36:35 dawes Exp $ */ /*********************************************************** Copyright 1987,1998 The Open Group @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $TOG: cfbhrzvert.c /main/9 1998/02/09 14:05:53 kaleb $ */ +/* $Xorg: cfbhrzvert.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ #include "X.h" #include "gc.h" Index: xc/programs/Xserver/cfb/cfbigblt8.c diff -u xc/programs/Xserver/cfb/cfbigblt8.c:1.3 xc/programs/Xserver/cfb/cfbigblt8.c:1.4 --- xc/programs/Xserver/cfb/cfbigblt8.c:1.3 Sun Oct 4 05:37:44 1998 +++ xc/programs/Xserver/cfb/cfbigblt8.c Wed Jan 17 17:36:35 2001 @@ -1,5 +1,5 @@ /* - * $TOG: cfbigblt8.c /main/10 1998/02/09 14:05:59 kaleb $ + * $Xorg: cfbigblt8.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ * Copyright 1990, 1998 The Open Group @@ -22,7 +22,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbigblt8.c,v 1.3 1998/10/04 09:37:44 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbigblt8.c,v 1.4 2001/01/17 22:36:35 dawes Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/cfb/cfbimage.c diff -u xc/programs/Xserver/cfb/cfbimage.c:1.10 xc/programs/Xserver/cfb/cfbimage.c:1.11 --- xc/programs/Xserver/cfb/cfbimage.c:1.10 Fri Feb 11 22:39:26 2000 +++ xc/programs/Xserver/cfb/cfbimage.c Wed Jan 17 17:36:35 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbimage.c,v 1.10 2000/02/12 03:39:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbimage.c,v 1.11 2001/01/17 22:36:35 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $TOG: cfbimage.c /main/20 1998/02/09 14:06:06 kaleb $ */ +/* $Xorg: cfbimage.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ #include "X.h" #include "windowstr.h" Index: xc/programs/Xserver/cfb/cfbline.c diff -u xc/programs/Xserver/cfb/cfbline.c:3.3 xc/programs/Xserver/cfb/cfbline.c:3.4 --- xc/programs/Xserver/cfb/cfbline.c:3.3 Fri Feb 11 22:39:27 2000 +++ xc/programs/Xserver/cfb/cfbline.c Wed Jan 17 17:36:35 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbline.c,v 3.3 2000/02/12 03:39:27 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbline.c,v 3.4 2001/01/17 22:36:35 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $TOG: cfbline.c /main/25 1998/02/09 14:06:12 kaleb $ */ +/* $Xorg: cfbline.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ #include "X.h" #include "gcstruct.h" Index: xc/programs/Xserver/cfb/cfbmap.h diff -u xc/programs/Xserver/cfb/cfbmap.h:3.8 xc/programs/Xserver/cfb/cfbmap.h:3.9 --- xc/programs/Xserver/cfb/cfbmap.h:3.8 Sun Dec 12 21:13:07 1999 +++ xc/programs/Xserver/cfb/cfbmap.h Wed Jan 17 17:36:35 2001 @@ -1,5 +1,5 @@ /* - * $TOG: cfbmap.h /main/12 1998/02/09 14:06:19 kaleb $ + * $Xorg: cfbmap.h,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ * Copyright 1991, 1998 The Open Group @@ -22,7 +22,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbmap.h,v 3.8 1999/12/13 02:13:07 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbmap.h,v 3.9 2001/01/17 22:36:35 dawes Exp $ */ /* * Map names around so that multiple depths can be supported simultaneously Index: xc/programs/Xserver/cfb/cfbmskbits.c diff -u xc/programs/Xserver/cfb/cfbmskbits.c:3.1 xc/programs/Xserver/cfb/cfbmskbits.c:3.2 --- xc/programs/Xserver/cfb/cfbmskbits.c:3.1 Sun Oct 4 05:37:46 1998 +++ xc/programs/Xserver/cfb/cfbmskbits.c Wed Jan 17 17:36:35 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbmskbits.c,v 3.1 1998/10/04 09:37:46 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbmskbits.c,v 3.2 2001/01/17 22:36:35 dawes Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -28,7 +28,7 @@ ********************************************************/ -/* $TOG: cfbmskbits.c /main/16 1998/02/09 14:06:25 kaleb $ */ +/* $Xorg: cfbmskbits.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ /* * ========================================================================== Index: xc/programs/Xserver/cfb/cfbmskbits.h diff -u xc/programs/Xserver/cfb/cfbmskbits.h:3.10 xc/programs/Xserver/cfb/cfbmskbits.h:3.12 --- xc/programs/Xserver/cfb/cfbmskbits.h:3.10 Tue Oct 24 14:07:46 2000 +++ xc/programs/Xserver/cfb/cfbmskbits.h Wed Jan 17 17:36:36 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbmskbits.h,v 3.10 2000/10/24 18:07:46 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbmskbits.h,v 3.12 2001/01/17 22:36:36 dawes Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -28,7 +28,7 @@ ********************************************************/ -/* $TOG: cfbmskbits.h /main/28 1998/02/09 14:06:32 kaleb $ */ +/* $Xorg: cfbmskbits.h,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ /* Optimizations for PSZ == 32 added by Kyle Marvin (marvin@vitec.com) */ #include "X.h" @@ -37,7 +37,6 @@ #if defined(XFREE86) || ( defined(__OpenBSD__) && defined(__alpha__) ) \ || (defined(__bsdi__)) #include "xf86_ansic.h" -#define NO_COMPILER_H_EXTRAS #include "compiler.h" #endif Index: xc/programs/Xserver/cfb/cfbpixmap.c diff -u xc/programs/Xserver/cfb/cfbpixmap.c:1.3 xc/programs/Xserver/cfb/cfbpixmap.c:1.4 --- xc/programs/Xserver/cfb/cfbpixmap.c:1.3 Sat Feb 12 00:43:17 2000 +++ xc/programs/Xserver/cfb/cfbpixmap.c Wed Jan 17 17:36:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: cfbpixmap.c /main/34 1998/02/09 14:06:38 kaleb $ */ +/* $Xorg: cfbpixmap.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbpixmap.c,v 1.3 2000/02/12 05:43:17 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbpixmap.c,v 1.4 2001/01/17 22:36:36 dawes Exp $ */ /* pixmap management written by drewry, september 1986 Index: xc/programs/Xserver/cfb/cfbply1rct.c diff -u xc/programs/Xserver/cfb/cfbply1rct.c:3.6 xc/programs/Xserver/cfb/cfbply1rct.c:3.7 --- xc/programs/Xserver/cfb/cfbply1rct.c:3.6 Fri Feb 11 22:39:28 2000 +++ xc/programs/Xserver/cfb/cfbply1rct.c Wed Jan 17 17:36:36 2001 @@ -1,5 +1,5 @@ /* - * $TOG: cfbply1rct.c /main/17 1998/02/09 14:06:45 kaleb $ + * $Xorg: cfbply1rct.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ * Copyright 1990, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbply1rct.c,v 3.6 2000/02/12 03:39:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbply1rct.c,v 3.7 2001/01/17 22:36:36 dawes Exp $ */ #include "X.h" Index: xc/programs/Xserver/cfb/cfbpntwin.c diff -u xc/programs/Xserver/cfb/cfbpntwin.c:3.3 xc/programs/Xserver/cfb/cfbpntwin.c:3.4 --- xc/programs/Xserver/cfb/cfbpntwin.c:3.3 Fri Feb 11 22:39:28 2000 +++ xc/programs/Xserver/cfb/cfbpntwin.c Wed Jan 17 17:36:36 2001 @@ -1,4 +1,4 @@ -/* $TOG: cfbpntwin.c /main/26 1998/02/09 14:06:51 kaleb $ */ +/* $Xorg: cfbpntwin.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbpntwin.c,v 3.3 2000/02/12 03:39:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbpntwin.c,v 3.4 2001/01/17 22:36:36 dawes Exp $ */ #include "X.h" Index: xc/programs/Xserver/cfb/cfbpolypnt.c diff -u xc/programs/Xserver/cfb/cfbpolypnt.c:3.3 xc/programs/Xserver/cfb/cfbpolypnt.c:3.4 --- xc/programs/Xserver/cfb/cfbpolypnt.c:3.3 Fri Feb 11 22:39:29 2000 +++ xc/programs/Xserver/cfb/cfbpolypnt.c Wed Jan 17 17:36:36 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbpolypnt.c,v 3.3 2000/02/12 03:39:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbpolypnt.c,v 3.4 2001/01/17 22:36:36 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -21,7 +21,7 @@ ********************************************************/ -/* $TOG: cfbpolypnt.c /main/19 1998/02/09 14:06:58 kaleb $ */ +/* $Xorg: cfbpolypnt.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ #include "X.h" #include "gcstruct.h" Index: xc/programs/Xserver/cfb/cfbpush8.c diff -u xc/programs/Xserver/cfb/cfbpush8.c:1.4 xc/programs/Xserver/cfb/cfbpush8.c:1.5 --- xc/programs/Xserver/cfb/cfbpush8.c:1.4 Fri Feb 11 22:39:29 2000 +++ xc/programs/Xserver/cfb/cfbpush8.c Wed Jan 17 17:36:36 2001 @@ -2,7 +2,7 @@ * Push Pixels for 8 bit displays. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbpush8.c,v 1.4 2000/02/12 03:39:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbpush8.c,v 1.5 2001/01/17 22:36:36 dawes Exp $ */ /* @@ -24,7 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $TOG: cfbpush8.c /main/18 1998/02/09 14:07:04 kaleb $ */ +/* $Xorg: cfbpush8.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ #if PSZ == 8 Index: xc/programs/Xserver/cfb/cfbrctstp8.c diff -u xc/programs/Xserver/cfb/cfbrctstp8.c:3.3 xc/programs/Xserver/cfb/cfbrctstp8.c:3.4 --- xc/programs/Xserver/cfb/cfbrctstp8.c:3.3 Fri Feb 11 22:39:29 2000 +++ xc/programs/Xserver/cfb/cfbrctstp8.c Wed Jan 17 17:36:36 2001 @@ -1,7 +1,7 @@ /* * Fill 32 bit stippled rectangles for 8 bit frame buffers */ -/* $XFree86: xc/programs/Xserver/cfb/cfbrctstp8.c,v 3.3 2000/02/12 03:39:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbrctstp8.c,v 3.4 2001/01/17 22:36:36 dawes Exp $ */ /* Copyright 1989, 1998 The Open Group @@ -26,7 +26,7 @@ */ -/* $TOG: cfbrctstp8.c /main/18 1998/02/09 14:07:10 kaleb $ */ +/* $Xorg: cfbrctstp8.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ #if PSZ == 8 Index: xc/programs/Xserver/cfb/cfbrrop.c diff -u xc/programs/Xserver/cfb/cfbrrop.c:1.3 xc/programs/Xserver/cfb/cfbrrop.c:1.4 --- xc/programs/Xserver/cfb/cfbrrop.c:1.3 Sat Feb 12 00:43:18 2000 +++ xc/programs/Xserver/cfb/cfbrrop.c Wed Jan 17 17:36:36 2001 @@ -1,5 +1,5 @@ /* - * $TOG: cfbrrop.c /main/9 1998/02/09 14:07:18 kaleb $ + * $Xorg: cfbrrop.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ * Copyright 1989, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbrrop.c,v 1.3 2000/02/12 05:43:18 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbrrop.c,v 1.4 2001/01/17 22:36:36 dawes Exp $ */ /* cfb reduced rasterop computations */ Index: xc/programs/Xserver/cfb/cfbrrop.h diff -u xc/programs/Xserver/cfb/cfbrrop.h:3.6 xc/programs/Xserver/cfb/cfbrrop.h:3.8 --- xc/programs/Xserver/cfb/cfbrrop.h:3.6 Tue Oct 24 14:07:46 2000 +++ xc/programs/Xserver/cfb/cfbrrop.h Tue Jan 30 17:06:15 2001 @@ -1,5 +1,5 @@ /* - * $TOG: cfbrrop.h /main/11 1998/02/09 14:07:24 kaleb $ + * $Xorg: cfbrrop.h,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ * Copyright 1989, 1998 The Open Group @@ -22,7 +22,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbrrop.h,v 3.6 2000/10/24 18:07:46 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbrrop.h,v 3.8 2001/01/30 22:06:15 tsi Exp $ */ #ifndef GXcopy #include "X.h" @@ -67,8 +67,6 @@ #define RROP_DECLARE register CfbBits rrop_xor; #define RROP_SOLID(dst) (*(dst) = (rrop_xor)) #define RROP_SOLID_MASK(dst,mask) (*(dst) = (*(dst) & ~(mask)) | ((rrop_xor) & (mask))) -#define RROP_SOLID_lu(dst) stq_u(rrop_xor, dst) -#define RROP_SOLID_MASK_lu(dst,mask) stq_u((ldq_u(dst) & ~(mask)) | ((rrop_xor) & (mask)), dst) #endif #define RROP_NAME(prefix) RROP_NAME_CAT(prefix,Copy) #endif /* GXcopy */ @@ -103,8 +101,6 @@ #define RROP_FETCH_GCPRIV(devPriv) rrop_xor = (devPriv)->xor; #define RROP_SOLID(dst) (*(dst) ^= (rrop_xor)) #define RROP_SOLID_MASK(dst,mask) (*(dst) ^= ((rrop_xor) & (mask))) -#define RROP_SOLID_lu(dst) stq_u(ldq_u(dst) ^ rrop_xor, dst) -#define RROP_SOLID_MASK_lu(dst,mask) stq_u(ldq_u(dst) ^ ((rrop_xor) & (mask)), dst) #endif #define RROP_NAME(prefix) RROP_NAME_CAT(prefix,Xor) #endif /* GXxor */ @@ -259,8 +255,6 @@ rrop_xor = (devPriv)->xor; #define RROP_SOLID(dst) (*(dst) = DoRRop (*(dst), rrop_and, rrop_xor)) #define RROP_SOLID_MASK(dst,mask) (*(dst) = DoMaskRRop (*(dst), rrop_and, rrop_xor, (mask))) -#define RROP_SOLID_lu(dst) stq_u(DoRRop (ldq_u(dst), rrop_and, rrop_xor), dst) -#define RROP_SOLID_MASK_lu(dst,mask) stq_u(DoMaskRRop (ldq_u(dst), rrop_and, rrop_xor, (mask)), dst) #endif #define RROP_NAME(prefix) RROP_NAME_CAT(prefix,General) #endif /* GXset */ @@ -321,12 +315,6 @@ (pdst) += sizeof (CfbBits) / sizeof (*pdst); \ } #endif - -#define RROP_SPAN_lu(pdst,nmiddle) \ - while (--(nmiddle) >= 0) { \ - RROP_SOLID_lu((CfbBits *) (pdst)); \ - (pdst) += sizeof (CfbBits) / sizeof (*pdst); \ - } #if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) #define RROP_NAME_CAT(prefix,suffix) prefix##suffix Index: xc/programs/Xserver/cfb/cfbscrinit.c diff -u xc/programs/Xserver/cfb/cfbscrinit.c:1.18 xc/programs/Xserver/cfb/cfbscrinit.c:1.19 --- xc/programs/Xserver/cfb/cfbscrinit.c:1.18 Fri Feb 11 22:39:31 2000 +++ xc/programs/Xserver/cfb/cfbscrinit.c Wed Jan 17 17:36:36 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbscrinit.c,v 1.18 2000/02/12 03:39:31 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbscrinit.c,v 1.19 2001/01/17 22:36:36 dawes Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -27,7 +27,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $TOG: cfbscrinit.c /main/60 1998/02/09 14:07:30 kaleb $ */ +/* $Xorg: cfbscrinit.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/cfb/cfbsetsp.c diff -u xc/programs/Xserver/cfb/cfbsetsp.c:3.2 xc/programs/Xserver/cfb/cfbsetsp.c:3.3 --- xc/programs/Xserver/cfb/cfbsetsp.c:3.2 Fri Feb 11 22:39:31 2000 +++ xc/programs/Xserver/cfb/cfbsetsp.c Wed Jan 17 17:36:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: cfbsetsp.c /main/21 1998/02/09 14:07:36 kaleb $ */ +/* $Xorg: cfbsetsp.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbsetsp.c,v 3.2 2000/02/12 03:39:31 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbsetsp.c,v 3.3 2001/01/17 22:36:37 dawes Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/cfb/cfbsolid.c diff -u xc/programs/Xserver/cfb/cfbsolid.c:3.4 xc/programs/Xserver/cfb/cfbsolid.c:3.5 --- xc/programs/Xserver/cfb/cfbsolid.c:3.4 Fri Feb 11 22:39:31 2000 +++ xc/programs/Xserver/cfb/cfbsolid.c Wed Jan 17 17:36:37 2001 @@ -1,5 +1,5 @@ /* - * $TOG: cfbsolid.c /main/10 1998/02/09 14:07:43 kaleb $ + * $Xorg: cfbsolid.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ * Copyright 1990, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbsolid.c,v 3.4 2000/02/12 03:39:31 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbsolid.c,v 3.5 2001/01/17 22:36:37 dawes Exp $ */ #include "X.h" Index: xc/programs/Xserver/cfb/cfbteblt8.c diff -u xc/programs/Xserver/cfb/cfbteblt8.c:1.3 xc/programs/Xserver/cfb/cfbteblt8.c:1.4 --- xc/programs/Xserver/cfb/cfbteblt8.c:1.3 Sat Feb 12 00:43:18 2000 +++ xc/programs/Xserver/cfb/cfbteblt8.c Wed Jan 17 17:36:37 2001 @@ -3,7 +3,7 @@ * 8 bit displays, in Copy mode with no clipping. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbteblt8.c,v 1.3 2000/02/12 05:43:18 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbteblt8.c,v 1.4 2001/01/17 22:36:37 dawes Exp $ */ /* Copyright 1989, 1998 The Open Group @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $TOG: cfbteblt8.c /main/26 1998/02/09 14:07:48 kaleb $ */ +/* $Xorg: cfbteblt8.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ #if PSZ == 8 Index: xc/programs/Xserver/cfb/cfbtegblt.c diff -u xc/programs/Xserver/cfb/cfbtegblt.c:3.3 xc/programs/Xserver/cfb/cfbtegblt.c:3.4 --- xc/programs/Xserver/cfb/cfbtegblt.c:3.3 Fri Feb 11 22:39:32 2000 +++ xc/programs/Xserver/cfb/cfbtegblt.c Wed Jan 17 17:36:37 2001 @@ -1,4 +1,4 @@ -/* $TOG: cfbtegblt.c /main/15 1998/02/09 14:07:55 kaleb $ */ +/* $Xorg: cfbtegblt.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbtegblt.c,v 3.3 2000/02/12 03:39:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbtegblt.c,v 3.4 2001/01/17 22:36:37 dawes Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/cfb/cfbtile32.c diff -u xc/programs/Xserver/cfb/cfbtile32.c:3.3 xc/programs/Xserver/cfb/cfbtile32.c:3.4 --- xc/programs/Xserver/cfb/cfbtile32.c:3.3 Fri Feb 11 22:39:33 2000 +++ xc/programs/Xserver/cfb/cfbtile32.c Wed Jan 17 17:36:37 2001 @@ -2,7 +2,7 @@ * Fill 32 bit tiled rectangles. Used by both PolyFillRect and PaintWindow. * no depth dependencies. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbtile32.c,v 3.3 2000/02/12 03:39:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbtile32.c,v 3.4 2001/01/17 22:36:37 dawes Exp $ */ /* @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $TOG: cfbtile32.c /main/9 1998/02/09 14:08:01 kaleb $ */ +/* $Xorg: cfbtile32.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/cfb/cfbtileodd.c diff -u xc/programs/Xserver/cfb/cfbtileodd.c:3.3 xc/programs/Xserver/cfb/cfbtileodd.c:3.4 --- xc/programs/Xserver/cfb/cfbtileodd.c:3.3 Fri Feb 11 22:39:33 2000 +++ xc/programs/Xserver/cfb/cfbtileodd.c Wed Jan 17 17:36:37 2001 @@ -2,7 +2,7 @@ * Fill odd tiled rectangles and spans. * no depth dependencies. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbtileodd.c,v 3.3 2000/02/12 03:39:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbtileodd.c,v 3.4 2001/01/17 22:36:37 dawes Exp $ */ /* @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $TOG: cfbtileodd.c /main/17 1998/02/09 14:08:07 kaleb $ */ +/* $Xorg: cfbtileodd.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/cfb/cfbwindow.c diff -u xc/programs/Xserver/cfb/cfbwindow.c:1.1.1.2 xc/programs/Xserver/cfb/cfbwindow.c:1.1.1.3 --- xc/programs/Xserver/cfb/cfbwindow.c:1.1.1.2 Sun Sep 27 04:05:36 1998 +++ xc/programs/Xserver/cfb/cfbwindow.c Tue Jan 16 17:42:26 2001 @@ -1,4 +1,4 @@ -/* $TOG: cfbwindow.c /main/43 1998/02/09 14:08:14 kaleb $ */ +/* $Xorg: cfbwindow.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group Index: xc/programs/Xserver/cfb/cfbzerarc.c diff -u xc/programs/Xserver/cfb/cfbzerarc.c:3.1 xc/programs/Xserver/cfb/cfbzerarc.c:3.2 --- xc/programs/Xserver/cfb/cfbzerarc.c:3.1 Sun Oct 4 05:37:53 1998 +++ xc/programs/Xserver/cfb/cfbzerarc.c Wed Jan 17 17:36:37 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbzerarc.c,v 3.1 1998/10/04 09:37:53 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbzerarc.c,v 3.2 2001/01/17 22:36:37 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -21,7 +21,7 @@ ********************************************************/ -/* $TOG: cfbzerarc.c /main/25 1998/02/09 14:08:20 kaleb $ */ +/* $Xorg: cfbzerarc.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ /* Derived from: * "Algorithm for drawing ellipses or hyperbolae with a digital plotter" Index: xc/programs/Xserver/cfb/stip68kgnu.h diff -u xc/programs/Xserver/cfb/stip68kgnu.h:3.2 xc/programs/Xserver/cfb/stip68kgnu.h:3.3 --- xc/programs/Xserver/cfb/stip68kgnu.h:3.2 Sun Oct 4 05:37:54 1998 +++ xc/programs/Xserver/cfb/stip68kgnu.h Wed Jan 17 17:36:37 2001 @@ -1,5 +1,5 @@ /* - * $TOG: stip68kgnu.h /main/4 1998/02/09 14:08:34 kaleb $ + * $Xorg: stip68kgnu.h,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ * Copyright 1990, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/stip68kgnu.h,v 3.2 1998/10/04 09:37:54 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/stip68kgnu.h,v 3.3 2001/01/17 22:36:37 dawes Exp $ */ /* * Stipple stack macro for 68k GCC Index: xc/programs/Xserver/cfb/stipmips.s diff -u xc/programs/Xserver/cfb/stipmips.s:1.1.1.2 xc/programs/Xserver/cfb/stipmips.s:1.1.1.3 --- xc/programs/Xserver/cfb/stipmips.s:1.1.1.2 Sun Sep 27 04:05:38 1998 +++ xc/programs/Xserver/cfb/stipmips.s Tue Jan 16 17:42:28 2001 @@ -1,5 +1,5 @@ /* - * $TOG: stipmips.s /main/11 1998/02/09 14:08:40 kaleb $ + * $Xorg: stipmips.s,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ * Copyright 1990, 1998 The Open Group Index: xc/programs/Xserver/cfb/stipple68k.s diff -u xc/programs/Xserver/cfb/stipple68k.s:3.1 xc/programs/Xserver/cfb/stipple68k.s:3.2 --- xc/programs/Xserver/cfb/stipple68k.s:3.1 Sun Oct 4 05:37:54 1998 +++ xc/programs/Xserver/cfb/stipple68k.s Wed Jan 17 17:36:38 2001 @@ -1,5 +1,5 @@ /* - * $TOG: stipple68k.s /main/4 1998/02/09 14:08:48 kaleb $ + * $Xorg: stipple68k.s,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ * Copyright 1990, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/stipple68k.s,v 3.1 1998/10/04 09:37:54 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/stipple68k.s,v 3.2 2001/01/17 22:36:38 dawes Exp $ */ /* * Stipple code for 68k processors Index: xc/programs/Xserver/cfb/stipsparc.s diff -u xc/programs/Xserver/cfb/stipsparc.s:1.3 xc/programs/Xserver/cfb/stipsparc.s:1.4 --- xc/programs/Xserver/cfb/stipsparc.s:1.3 Mon Mar 29 08:17:03 1999 +++ xc/programs/Xserver/cfb/stipsparc.s Wed Jan 17 17:36:38 2001 @@ -1,5 +1,5 @@ /* - * $TOG: stipsparc.s /main/10 1998/02/09 14:08:53 kaleb $ + * $Xorg: stipsparc.s,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ * Copyright 1990, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/stipsparc.s,v 1.3 1999/03/29 13:17:03 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/stipsparc.s,v 1.4 2001/01/17 22:36:38 dawes Exp $ */ /* * SPARC assembly code for optimized text rendering. Index: xc/programs/Xserver/cfb/stipsprc32.s diff -u xc/programs/Xserver/cfb/stipsprc32.s:1.3 xc/programs/Xserver/cfb/stipsprc32.s:1.4 --- xc/programs/Xserver/cfb/stipsprc32.s:1.3 Mon Mar 29 08:17:03 1999 +++ xc/programs/Xserver/cfb/stipsprc32.s Wed Jan 17 17:36:38 2001 @@ -1,5 +1,5 @@ /* - * $TOG: stipsprc32.s /main/4 1998/02/09 14:09:00 kaleb $ + * $Xorg: stipsprc32.s,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ * Copyright 1990, 1998 The Open Group @@ -21,7 +21,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/stipsprc32.s,v 1.3 1999/03/29 13:17:03 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/stipsprc32.s,v 1.4 2001/01/17 22:36:38 dawes Exp $ */ /* * SPARC assembly code for optimized text rendering. Index: xc/programs/Xserver/cfb16/Imakefile diff -u xc/programs/Xserver/cfb16/Imakefile:1.1.1.1 xc/programs/Xserver/cfb16/Imakefile:1.1.1.2 --- xc/programs/Xserver/cfb16/Imakefile:1.1.1.1 Wed Apr 27 03:14:24 1994 +++ xc/programs/Xserver/cfb16/Imakefile Tue Jan 16 17:42:30 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: Imakefile,v 1.1 91/12/28 13:32:27 rws Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ #define PixelSize 16 #define LinkDirectory ../cfb Index: xc/programs/Xserver/cfb32/Imakefile diff -u xc/programs/Xserver/cfb32/Imakefile:1.1.1.1 xc/programs/Xserver/cfb32/Imakefile:1.1.1.2 --- xc/programs/Xserver/cfb32/Imakefile:1.1.1.1 Wed Apr 27 03:14:24 1994 +++ xc/programs/Xserver/cfb32/Imakefile Tue Jan 16 17:42:30 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: Imakefile,v 1.1 91/12/28 13:32:46 rws Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ #define PixelSize 32 #define LinkDirectory ../cfb Index: xc/programs/Xserver/dbe/Imakefile diff -u xc/programs/Xserver/dbe/Imakefile:3.9 xc/programs/Xserver/dbe/Imakefile:3.10 --- xc/programs/Xserver/dbe/Imakefile:3.9 Thu Apr 6 10:47:46 2000 +++ xc/programs/Xserver/dbe/Imakefile Wed Jan 17 17:36:41 2001 @@ -1,9 +1,9 @@ -XCOMM $XConsortium: Imakefile /main/2 1996/09/28 17:06:40 rws $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ -XCOMM $XFree86: xc/programs/Xserver/dbe/Imakefile,v 3.9 2000/04/06 14:47:46 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/dbe/Imakefile,v 3.10 2001/01/17 22:36:41 dawes Exp $ #if DoLoadableServer #define IHaveSubdirs Index: xc/programs/Xserver/dbe/dbe.c diff -u xc/programs/Xserver/dbe/dbe.c:3.7 xc/programs/Xserver/dbe/dbe.c:3.8 --- xc/programs/Xserver/dbe/dbe.c:3.7 Wed Nov 10 22:38:15 1999 +++ xc/programs/Xserver/dbe/dbe.c Wed Jan 17 17:36:41 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: dbe.c /main/4 1996/08/01 19:24:47 dpw $ */ +/* $Xorg: dbe.c,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ */ /****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company @@ -30,7 +30,7 @@ * DIX DBE code * *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/dbe/dbe.c,v 3.7 1999/11/11 03:38:15 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/dbe/dbe.c,v 3.8 2001/01/17 22:36:41 dawes Exp $ */ /* INCLUDES */ Index: xc/programs/Xserver/dbe/dbestruct.h diff -u xc/programs/Xserver/dbe/dbestruct.h:3.0 xc/programs/Xserver/dbe/dbestruct.h:3.1 --- xc/programs/Xserver/dbe/dbestruct.h:3.0 Fri Jan 5 08:17:37 1996 +++ xc/programs/Xserver/dbe/dbestruct.h Wed Jan 17 17:36:41 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: dbestruct.h /main/3 1995/09/22 10:21:05 dpw $ */ +/* $Xorg: dbestruct.h,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ */ /****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company Index: xc/programs/Xserver/dbe/midbe.c diff -u xc/programs/Xserver/dbe/midbe.c:3.2 xc/programs/Xserver/dbe/midbe.c:3.4 --- xc/programs/Xserver/dbe/midbe.c:3.2 Thu Apr 6 10:47:46 2000 +++ xc/programs/Xserver/dbe/midbe.c Tue Mar 6 12:31:34 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: midbe.c /main/4 1995/09/25 15:19:01 dpw $ */ +/* $Xorg: midbe.c,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ */ /****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company @@ -30,7 +30,7 @@ * Machine-independent DBE code * *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/dbe/midbe.c,v 3.2 2000/04/06 14:47:46 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dbe/midbe.c,v 3.4 2001/03/06 17:31:34 dawes Exp $ */ /* INCLUDES */ @@ -821,16 +821,16 @@ miDbeWindowPrivPrivIndex = (*pDbeScreenPriv->AllocWinPrivPrivIndex)(); - if (!(*pDbeScreenPriv->AllocWinPrivPriv)(pScreen, - miDbeWindowPrivPrivIndex, sizeof(MiDbeWindowPrivPrivRec))) - { - return(FALSE); - } - /* Make sure we only do this code once. */ miDbePrivPrivGeneration = serverGeneration; } /* if -- Reset priv privs. */ + + if (!(*pDbeScreenPriv->AllocWinPrivPriv)(pScreen, + miDbeWindowPrivPrivIndex, sizeof(MiDbeWindowPrivPrivRec))) + { + return(FALSE); + } /* Wrap functions. */ pDbeScreenPriv->PositionWindow = pScreen->PositionWindow; Index: xc/programs/Xserver/dbe/midbe.h diff -u xc/programs/Xserver/dbe/midbe.h:3.0 xc/programs/Xserver/dbe/midbe.h:3.1 --- xc/programs/Xserver/dbe/midbe.h:3.0 Fri Jan 5 08:17:39 1996 +++ xc/programs/Xserver/dbe/midbe.h Wed Jan 17 17:36:42 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: midbe.h /main/3 1995/09/22 10:21:33 dpw $ */ +/* $Xorg: midbe.h,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ */ /****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company Index: xc/programs/Xserver/dbe/midbestr.h diff -u xc/programs/Xserver/dbe/midbestr.h:3.0 xc/programs/Xserver/dbe/midbestr.h:3.1 --- xc/programs/Xserver/dbe/midbestr.h:3.0 Fri Jan 5 08:17:40 1996 +++ xc/programs/Xserver/dbe/midbestr.h Wed Jan 17 17:36:42 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: midbestruct.h /main/3 1995/09/22 10:21:49 dpw $ */ +/* $Xorg: midbestr.h,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ */ /****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company Index: xc/programs/Xserver/dix/Imakefile diff -u xc/programs/Xserver/dix/Imakefile:3.10 xc/programs/Xserver/dix/Imakefile:3.13 --- xc/programs/Xserver/dix/Imakefile:3.10 Mon Sep 27 02:29:17 1999 +++ xc/programs/Xserver/dix/Imakefile Sun Mar 4 12:40:04 2001 @@ -1,5 +1,10 @@ -XCOMM $XConsortium: Imakefile /main/52 1996/12/02 10:20:03 lehors $ -XCOMM $XFree86: xc/programs/Xserver/dix/Imakefile,v 3.10 1999/09/27 06:29:17 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/dix/Imakefile,v 3.13 2001/03/04 17:40:04 herrb Exp $ + #include #if PrintOnlyServer @@ -58,16 +63,20 @@ #ifdef XVendorRelease VENDORRELEASE = XVendorRelease - VENDOR_RELEASE = -DVENDOR_RELEASE=$(VENDORRELEASE) + VENDOR_RELEASE = -DVENDOR_RELEASE="$(VENDORRELEASE)" #endif #if HasKrb5 K5DEFS = Krb5Defines #endif +#if DarwinQuartzSupport + QUARTZ_DEFINES = -DDARWIN_WITH_QUARTZ +#endif + SITE_DEFINES = $(SITE_FONT_PATH) $(SITE_RGB_DB) $(SITE_DISPLAY_CLASS) -VENDOR_DEFINES = $(VENDOR_STRING) $(VENDOR_RELEASE) +VENDOR_DEFINES = $(VENDOR_STRING) $(VENDOR_RELEASE) $(QUARTZ_DEFINES) NormalLibraryObjectRule() NormalLibraryTarget(dix,$(OBJS)) Index: xc/programs/Xserver/dix/atom.c diff -u xc/programs/Xserver/dix/atom.c:3.1 xc/programs/Xserver/dix/atom.c:3.2 --- xc/programs/Xserver/dix/atom.c:3.1 Sun Oct 4 05:38:01 1998 +++ xc/programs/Xserver/dix/atom.c Wed Jan 17 17:36:42 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/atom.c,v 3.1 1998/10/04 09:38:01 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/atom.c,v 3.2 2001/01/17 22:36:42 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -42,7 +42,7 @@ ******************************************************************/ -/* $TOG: atom.c /main/11 1998/02/09 14:17:45 kaleb $ */ +/* $Xorg: atom.c,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ */ #include "X.h" #include "Xatom.h" Index: xc/programs/Xserver/dix/colormap.c diff -u xc/programs/Xserver/dix/colormap.c:3.4 xc/programs/Xserver/dix/colormap.c:3.5 --- xc/programs/Xserver/dix/colormap.c:3.4 Fri Jan 21 20:59:55 2000 +++ xc/programs/Xserver/dix/colormap.c Wed Jan 17 17:36:42 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/colormap.c,v 3.4 2000/01/22 01:59:55 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/colormap.c,v 3.5 2001/01/17 22:36:42 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -42,7 +42,7 @@ ******************************************************************/ -/* $TOG: colormap.c /main/74 1998/03/24 18:17:31 kaleb $ */ +/* $Xorg: colormap.c,v 1.3 2000/08/17 19:48:17 cpqbld Exp $ */ #include "X.h" #define NEED_EVENTS Index: xc/programs/Xserver/dix/cursor.c diff -u xc/programs/Xserver/dix/cursor.c:3.3 xc/programs/Xserver/dix/cursor.c:3.4 --- xc/programs/Xserver/dix/cursor.c:3.3 Sun Oct 4 05:38:02 1998 +++ xc/programs/Xserver/dix/cursor.c Wed Jan 17 17:36:42 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/cursor.c,v 3.3 1998/10/04 09:38:02 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/cursor.c,v 3.4 2001/01/17 22:36:42 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -43,7 +43,7 @@ ******************************************************************/ -/* $TOG: cursor.c /main/20 1998/02/09 14:18:18 kaleb $ */ +/* $Xorg: cursor.c,v 1.3 2000/08/17 19:48:17 cpqbld Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/dix/devices.c diff -u xc/programs/Xserver/dix/devices.c:3.15 xc/programs/Xserver/dix/devices.c:3.17 --- xc/programs/Xserver/dix/devices.c:3.15 Sun May 16 02:55:40 1999 +++ xc/programs/Xserver/dix/devices.c Fri Feb 16 08:24:06 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/devices.c,v 3.15 1999/05/16 06:55:40 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/devices.c,v 3.17 2001/02/16 13:24:06 eich Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group @@ -43,7 +43,7 @@ ********************************************************/ -/* $TOG: devices.c /main/55 1998/02/09 14:18:25 kaleb $ */ +/* $Xorg: devices.c,v 1.3 2000/08/17 19:48:17 cpqbld Exp $ */ #include "X.h" #include "misc.h" @@ -293,6 +293,8 @@ next = dev->next; CloseDevice(dev); } + inputInfo.devices = NULL; + inputInfo.off_devices = NULL; inputInfo.keyboard = NULL; inputInfo.pointer = NULL; } Index: xc/programs/Xserver/dix/dispatch.c diff -u xc/programs/Xserver/dix/dispatch.c:3.22 xc/programs/Xserver/dix/dispatch.c:3.23 --- xc/programs/Xserver/dix/dispatch.c:3.22 Fri Sep 22 02:21:18 2000 +++ xc/programs/Xserver/dix/dispatch.c Wed Jan 17 17:36:42 2001 @@ -1,4 +1,4 @@ -/* $TOG: dispatch.c /main/196 1998/02/09 14:18:32 kaleb $ */ +/* $Xorg: dispatch.c,v 1.4 2000/08/17 19:48:17 cpqbld Exp $ */ /************************************************************ Copyright 1987, 1989, 1998 The Open Group @@ -64,7 +64,7 @@ * * *****************************************************************/ -/* $XFree86: xc/programs/Xserver/dix/dispatch.c,v 3.22 2000/09/22 06:21:18 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/dispatch.c,v 3.23 2001/01/17 22:36:42 dawes Exp $ */ #ifdef PANORAMIX_DEBUG #include @@ -3674,8 +3674,11 @@ { int i; for (i=1; icloseDownMode = DestroyAll; CloseDownClient(clients[i]); + } } /********************* Index: xc/programs/Xserver/dix/dixfonts.c diff -u xc/programs/Xserver/dix/dixfonts.c:3.23 xc/programs/Xserver/dix/dixfonts.c:3.24 --- xc/programs/Xserver/dix/dixfonts.c:3.23 Tue Apr 4 15:24:47 2000 +++ xc/programs/Xserver/dix/dixfonts.c Wed Jan 17 17:36:43 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/dixfonts.c,v 3.23 2000/04/04 19:24:47 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/dixfonts.c,v 3.24 2001/01/17 22:36:43 dawes Exp $ */ /************************************************************************ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. @@ -22,31 +22,8 @@ ************************************************************************/ -/* The panoramix components contained the following notice */ -/**************************************************************** -* * -* Copyright (c) Digital Equipment Corporation, 1991, 1997 * -* * -* All Rights Reserved. Unpublished rights reserved under * -* the copyright laws of the United States. * -* * -* The software contained on this media is proprietary to * -* and embodies the confidential technology of Digital * -* Equipment Corporation. Possession, use, duplication or * -* dissemination of the software and media is authorized only * -* pursuant to a valid written license from Digital Equipment * -* Corporation. * -* * -* RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure * -* by the U.S. Government is subject to restrictions as set * -* forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, * -* or in FAR 52.227-19, as applicable. * -* * -*****************************************************************/ +/* $Xorg: dixfonts.c,v 1.4 2000/08/17 19:48:18 cpqbld Exp $ */ - -/* $TOG: dixfonts.c /main/61 1998/05/28 15:47:54 kaleb $ */ - #define NEED_REPLIES #include "X.h" #include "Xmd.h" @@ -490,7 +467,7 @@ if (pfont == NullFont) return (Success); if (--pfont->refcnt == 0) { - if (patternCache && pfont->info.cachable) + if (patternCache) RemoveCachedFontPattern (patternCache, pfont); /* * since the last reference is gone, ask each screen to free any Index: xc/programs/Xserver/dix/dixutils.c diff -u xc/programs/Xserver/dix/dixutils.c:3.5 xc/programs/Xserver/dix/dixutils.c:3.6 --- xc/programs/Xserver/dix/dixutils.c:3.5 Wed Oct 13 18:32:48 1999 +++ xc/programs/Xserver/dix/dixutils.c Wed Jan 17 17:36:43 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/dixutils.c,v 3.5 1999/10/13 22:32:48 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/dixutils.c,v 3.6 2001/01/17 22:36:43 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -78,7 +78,7 @@ */ -/* $TOG: dixutils.c /main/34 1998/02/09 14:18:57 kaleb $ */ +/* $Xorg: dixutils.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/dix/events.c diff -u xc/programs/Xserver/dix/events.c:3.35.2.1 xc/programs/Xserver/dix/events.c:3.38 --- xc/programs/Xserver/dix/events.c:3.35.2.1 Fri Feb 9 15:45:14 2001 +++ xc/programs/Xserver/dix/events.c Fri Feb 16 08:24:07 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/events.c,v 3.35.2.1 2001/02/09 20:45:14 paulo Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/events.c,v 3.38 2001/02/16 13:24:07 eich Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group @@ -64,10 +64,8 @@ * * *****************************************************************/ +/* $Xorg: events.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ - -/* $TOG: events.c /main/188 1998/02/09 14:19:04 kaleb $ */ - #include "X.h" #include "misc.h" #include "resource.h" @@ -4074,6 +4072,14 @@ DontPropagateMasks[i] = 0; DontPropagateRefCnts[i] = 0; } +} + +void +CloseDownEvents(void) +{ + xfree(spriteTrace); + spriteTrace = NULL; + spriteTraceSize = 0; } int Index: xc/programs/Xserver/dix/extension.c diff -u xc/programs/Xserver/dix/extension.c:3.8 xc/programs/Xserver/dix/extension.c:3.9 --- xc/programs/Xserver/dix/extension.c:3.8 Sat Jan 29 12:16:54 2000 +++ xc/programs/Xserver/dix/extension.c Wed Jan 17 17:36:43 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/extension.c,v 3.8 2000/01/29 17:16:54 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/extension.c,v 3.9 2001/01/17 22:36:43 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $TOG: extension.c /main/37 1998/02/09 14:19:21 kaleb $ */ +/* $Xorg: extension.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ #include "X.h" #define NEED_EVENTS Index: xc/programs/Xserver/dix/ffs.c diff -u xc/programs/Xserver/dix/ffs.c:1.1.1.2 xc/programs/Xserver/dix/ffs.c:1.1.1.3 --- xc/programs/Xserver/dix/ffs.c:1.1.1.2 Sun Sep 27 04:03:32 1998 +++ xc/programs/Xserver/dix/ffs.c Tue Jan 16 17:42:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: ffs.c /main/2 1998/02/09 14:19:26 kaleb $ */ +/* $Xorg: ffs.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ /* Copyright 1996, 1998 The Open Group Index: xc/programs/Xserver/dix/gc.c diff -u xc/programs/Xserver/dix/gc.c:3.5 xc/programs/Xserver/dix/gc.c:3.7 --- xc/programs/Xserver/dix/gc.c:3.5 Sun Oct 4 05:38:08 1998 +++ xc/programs/Xserver/dix/gc.c Mon Apr 23 16:31:06 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/gc.c,v 3.5 1998/10/04 09:38:08 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/gc.c,v 3.7 2001/04/23 20:31:06 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -42,7 +42,7 @@ ******************************************************************/ -/* $TOG: gc.c /main/71 1998/02/09 14:19:32 kaleb $ */ +/* $Xorg: gc.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ #include "X.h" #include "Xmd.h" @@ -95,14 +95,16 @@ * or pUnion, but not both; one of them must be NULL. If you don't need * to pass any pointers, you can use either one: * - * /* example calling dixChangeGC using pC32 parameter + * example calling dixChangeGC using pC32 parameter + * * CARD32 v[2]; * v[0] = foreground; * v[1] = background; * dixChangeGC(client, pGC, GCForeground|GCBackground, v, NULL); * - * /* example calling dixChangeGC using pUnion parameter; - * /* same effect as above + * example calling dixChangeGC using pUnion parameter; + * same effect as above + * * ChangeGCVal v[2]; * v[0].val = foreground; * v[1].val = background; @@ -111,10 +113,12 @@ * However, if you need to pass a pointer to a pixmap or font, you MUST * use the pUnion parameter. * - * /* example calling dixChangeGC passing pointers in the value list + * example calling dixChangeGC passing pointers in the value list + * v[1].ptr is a pointer to a pixmap + * * ChangeGCVal v[2]; * v[0].val = FillTiled; - * v[1].ptr = pPixmap; /* pointer to a pixmap + * v[1].ptr = pPixmap; * dixChangeGC(client, pGC, GCFillStyle|GCTile, NULL, v); * * Note: we could have gotten by with just the pUnion parameter, but on Index: xc/programs/Xserver/dix/globals.c diff -u xc/programs/Xserver/dix/globals.c:1.7 xc/programs/Xserver/dix/globals.c:1.8 --- xc/programs/Xserver/dix/globals.c:1.7 Sat Sep 25 10:36:51 1999 +++ xc/programs/Xserver/dix/globals.c Wed Jan 17 17:36:43 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/globals.c,v 1.7 1999/09/25 14:36:51 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/globals.c,v 1.8 2001/01/17 22:36:43 dawes Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group @@ -42,7 +42,7 @@ ********************************************************/ -/* $TOG: globals.c /main/21 1998/02/09 14:19:40 kaleb $ */ +/* $Xorg: globals.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/dix/glyphcurs.c diff -u xc/programs/Xserver/dix/glyphcurs.c:1.1.1.3 xc/programs/Xserver/dix/glyphcurs.c:1.1.1.4 --- xc/programs/Xserver/dix/glyphcurs.c:1.1.1.3 Sun Sep 27 04:03:21 1998 +++ xc/programs/Xserver/dix/glyphcurs.c Tue Jan 16 17:42:44 2001 @@ -41,7 +41,7 @@ ************************************************************************/ -/* $TOG: glyphcurs.c /main/29 1998/02/09 14:19:46 kaleb $ */ +/* $Xorg: glyphcurs.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ #include "misc.h" #include "fontstruct.h" Index: xc/programs/Xserver/dix/grabs.c diff -u xc/programs/Xserver/dix/grabs.c:3.1 xc/programs/Xserver/dix/grabs.c:3.2 --- xc/programs/Xserver/dix/grabs.c:3.1 Sun Oct 4 05:38:09 1998 +++ xc/programs/Xserver/dix/grabs.c Wed Jan 17 17:36:43 2001 @@ -1,4 +1,4 @@ -/* $TOG: grabs.c /main/23 1998/02/09 14:19:51 kaleb $ */ +/* $Xorg: grabs.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -42,7 +42,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/dix/grabs.c,v 3.1 1998/10/04 09:38:09 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/grabs.c,v 3.2 2001/01/17 22:36:43 dawes Exp $ */ #include "X.h" #include "misc.h" Index: xc/programs/Xserver/dix/main.c diff -u xc/programs/Xserver/dix/main.c:3.31 xc/programs/Xserver/dix/main.c:3.35 --- xc/programs/Xserver/dix/main.c:3.31 Thu Nov 30 18:30:02 2000 +++ xc/programs/Xserver/dix/main.c Sat Apr 28 16:42:17 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/main.c,v 3.31 2000/11/30 23:30:02 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/main.c,v 3.35 2001/04/28 20:42:17 torrey Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -41,6 +41,7 @@ SOFTWARE. ******************************************************************/ +/* $Xorg: main.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ /* The panoramix components contained the following notice */ /**************************************************************** @@ -123,6 +124,7 @@ extern void InitProcVectors(); extern void InitEvents(); +extern void CloseDownEvents(void); extern void DefineInitialRootWindow(); extern Bool CreateGCperDepthArray(); @@ -259,6 +261,15 @@ char *xauthfile; HWEventQueueType alwaysCheckForInput[2]; + display = "0"; + + /* Quartz support on Mac OS X requires that the Cocoa event loop be in + * the main thread. This allows the X server main to be called again + * from another thread. */ +#if defined(__DARWIN__) && defined(DARWIN_WITH_QUARTZ) + DarwinHandleGUI(argc, argv, envp); +#endif + /* Notice if we're restarted. Probably this is because we jumped through * an uninitialized pointer */ if (restart) @@ -281,7 +292,6 @@ * can't be passed argc, argv as parameters */ argcGlobal = argc; argvGlobal = argv; - display = "0"; /* prep X authority file from environment; this can be overriden by a * command line option */ xauthfile = getenv("XAUTHORITY"); @@ -464,9 +474,13 @@ FreeScreen(screenInfo.screens[i]); screenInfo.numScreens = i; } + CloseDownEvents(); xfree(WindowTable); + WindowTable = NULL; FreeFonts (); + xfree(serverClient->devPrivates); + serverClient->devPrivates = NULL; if (dispatchException & DE_TERMINATE) { @@ -477,6 +491,7 @@ } xfree(ConnectionInfo); + ConnectionInfo = NULL; } return(0); } Index: xc/programs/Xserver/dix/pixmap.c diff -u xc/programs/Xserver/dix/pixmap.c:3.3 xc/programs/Xserver/dix/pixmap.c:3.4 --- xc/programs/Xserver/dix/pixmap.c:3.3 Sun Oct 4 05:38:10 1998 +++ xc/programs/Xserver/dix/pixmap.c Wed Jan 17 17:36:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: pixmap.c /main/5 1998/02/09 14:20:10 kaleb $ */ +/* $Xorg: pixmap.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ /* Copyright 1993, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/dix/pixmap.c,v 3.3 1998/10/04 09:38:10 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/pixmap.c,v 3.4 2001/01/17 22:36:44 dawes Exp $ */ #include "X.h" #include "scrnintstr.h" Index: xc/programs/Xserver/dix/privates.c diff -u xc/programs/Xserver/dix/privates.c:3.6 xc/programs/Xserver/dix/privates.c:3.7 --- xc/programs/Xserver/dix/privates.c:3.6 Wed Dec 29 21:37:06 1999 +++ xc/programs/Xserver/dix/privates.c Wed Jan 17 17:36:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: privates.c /main/6 1998/02/09 14:20:16 kaleb $ */ +/* $Xorg: privates.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ /* Copyright 1993, 1998 The Open Group @@ -22,7 +22,7 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/dix/privates.c,v 3.6 1999/12/30 02:37:06 robin Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/privates.c,v 3.7 2001/01/17 22:36:44 dawes Exp $ */ #include "X.h" #include "scrnintstr.h" Index: xc/programs/Xserver/dix/property.c diff -u xc/programs/Xserver/dix/property.c:3.7 xc/programs/Xserver/dix/property.c:3.8 --- xc/programs/Xserver/dix/property.c:3.7 Wed Jan 13 03:30:54 1999 +++ xc/programs/Xserver/dix/property.c Wed Jan 17 17:36:44 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/property.c,v 3.7 1999/01/13 08:30:54 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/property.c,v 3.8 2001/01/17 22:36:44 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $TOG: property.c /main/42 1998/02/09 14:20:24 kaleb $ */ +/* $Xorg: property.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ #include "X.h" #define NEED_REPLIES Index: xc/programs/Xserver/dix/resource.c diff -u xc/programs/Xserver/dix/resource.c:3.6 xc/programs/Xserver/dix/resource.c:3.8 --- xc/programs/Xserver/dix/resource.c:3.6 Sat Jan 1 19:23:47 2000 +++ xc/programs/Xserver/dix/resource.c Fri Feb 16 08:24:07 2001 @@ -41,27 +41,7 @@ ********************************************************/ -/* The panoramix components contained the following notice */ -/**************************************************************** -* * -* Copyright (c) Digital Equipment Corporation, 1991, 1997 * -* * -* All Rights Reserved. Unpublished rights reserved under * -* the copyright laws of the United States. * -* * -* The software contained on this media is proprietary to * -* and embodies the confidential technology of Digital * -* Equipment Corporation. Possession, use, duplication or * -* dissemination of the software and media is authorized only * -* pursuant to a valid written license from Digital Equipment * -* Corporation. * -* * -* RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure * -* by the U.S. Government is subject to restrictions as set * -* forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, * -* or in FAR 52.227-19, as applicable. * -* * -*****************************************************************/ +/* $Xorg: resource.c,v 1.4 2000/08/17 19:48:19 cpqbld Exp $ */ /* $TOG: resource.c /main/41 1998/02/09 14:20:31 kaleb $ */ @@ -74,8 +54,8 @@ */ /* - * A resource ID is a 32 bit quantity, the upper 3 bits of which are - * off-limits for client-visible resources. The next 7 bits are + * A resource ID is a 32 bit quantity, the upper 2 bits of which are + * off-limits for client-visible resources. The next 8 bits are * used as client ID, and the low 22 bits come from the client. * A resource ID is "hashed" by extracting and xoring subfields * (varying with the size of the hash table). @@ -83,12 +63,12 @@ * It is sometimes necessary for the server to create an ID that looks * like it belongs to a client. This ID, however, must not be one * the client actually can create, or we have the potential for conflict. - * The 30th bit of the ID is reserved for the server's use for this + * The 31st bit of the ID is reserved for the server's use for this * purpose. By setting CLIENT_ID(id) to the client, the SERVER_BIT to * 1, and an otherwise arbitrary ID in the low 22 bits, we can create a * resource "owned" by the client. */ -/* $XFree86: xc/programs/Xserver/dix/resource.c,v 3.6 2000/01/02 00:23:47 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/resource.c,v 3.8 2001/02/16 13:24:07 eich Exp $ */ #define NEED_EVENTS #include "X.h" @@ -753,6 +733,7 @@ } } xfree(clientTable[client->index].resources); + clientTable[client->index].resources = NULL; clientTable[client->index].buckets = 0; } Index: xc/programs/Xserver/dix/swaprep.c diff -u xc/programs/Xserver/dix/swaprep.c:3.5 xc/programs/Xserver/dix/swaprep.c:3.6 --- xc/programs/Xserver/dix/swaprep.c:3.5 Thu Nov 2 19:06:35 2000 +++ xc/programs/Xserver/dix/swaprep.c Wed Jan 17 17:36:44 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/swaprep.c,v 3.5 2000/11/03 00:06:35 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/swaprep.c,v 3.6 2001/01/17 22:36:44 dawes Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group @@ -42,7 +42,7 @@ ********************************************************/ -/* $TOG: swaprep.c /main/26 1998/02/09 14:20:38 kaleb $ */ +/* $Xorg: swaprep.c,v 1.3 2000/08/17 19:48:19 cpqbld Exp $ */ #include "X.h" #define NEED_REPLIES Index: xc/programs/Xserver/dix/swapreq.c diff -u xc/programs/Xserver/dix/swapreq.c:3.2 xc/programs/Xserver/dix/swapreq.c:3.3 --- xc/programs/Xserver/dix/swapreq.c:3.2 Sun Oct 4 05:38:15 1998 +++ xc/programs/Xserver/dix/swapreq.c Wed Jan 17 17:36:44 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/swapreq.c,v 3.2 1998/10/04 09:38:15 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/swapreq.c,v 3.3 2001/01/17 22:36:44 dawes Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group @@ -42,7 +42,7 @@ ********************************************************/ -/* $TOG: swapreq.c /main/20 1998/02/09 14:20:46 kaleb $ */ +/* $Xorg: swapreq.c,v 1.3 2000/08/17 19:48:19 cpqbld Exp $ */ #include "X.h" #define NEED_EVENTS Index: xc/programs/Xserver/dix/tables.c diff -u xc/programs/Xserver/dix/tables.c:3.2 xc/programs/Xserver/dix/tables.c:3.3 --- xc/programs/Xserver/dix/tables.c:3.2 Sun Oct 4 05:38:16 1998 +++ xc/programs/Xserver/dix/tables.c Wed Jan 17 17:36:44 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/tables.c,v 3.2 1998/10/04 09:38:16 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/tables.c,v 3.3 2001/01/17 22:36:44 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -41,7 +41,7 @@ SOFTWARE. ******************************************************************/ -/* $TOG: tables.c /main/15 1998/02/09 14:20:53 kaleb $ */ +/* $Xorg: tables.c,v 1.3 2000/08/17 19:48:19 cpqbld Exp $ */ #include "X.h" #define NEED_EVENTS Index: xc/programs/Xserver/dix/window.c diff -u xc/programs/Xserver/dix/window.c:3.21 xc/programs/Xserver/dix/window.c:3.22 --- xc/programs/Xserver/dix/window.c:3.21 Sun Feb 20 20:16:28 2000 +++ xc/programs/Xserver/dix/window.c Wed Jan 17 17:36:44 2001 @@ -1,4 +1,4 @@ -/* $TOG: window.c /main/215 1998/04/22 16:33:01 msr $ */ +/* $Xorg: window.c,v 1.3 2000/08/17 19:48:19 cpqbld Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -66,7 +66,7 @@ * * *****************************************************************/ -/* $XFree86: xc/programs/Xserver/dix/window.c,v 3.21 2000/02/21 01:16:28 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/window.c,v 3.22 2001/01/17 22:36:44 dawes Exp $ */ #include "misc.h" #include "scrnintstr.h" Index: xc/programs/Xserver/dix/xpstubs.c diff -u xc/programs/Xserver/dix/xpstubs.c:1.1.1.2 xc/programs/Xserver/dix/xpstubs.c:1.1.1.3 --- xc/programs/Xserver/dix/xpstubs.c:1.1.1.2 Sun Sep 27 04:03:31 1998 +++ xc/programs/Xserver/dix/xpstubs.c Tue Jan 16 17:42:51 2001 @@ -20,7 +20,7 @@ from The Open Group. */ -/* $TOG: xpstubs.c /main/2 1998/02/09 14:21:15 kaleb $ */ +/* $Xorg: xpstubs.c,v 1.3 2000/08/17 19:48:19 cpqbld Exp $ */ #include "misc.h" #include "font.h" Index: xc/programs/Xserver/fb/Imakefile diff -u xc/programs/Xserver/fb/Imakefile:1.12 xc/programs/Xserver/fb/Imakefile:1.13 --- xc/programs/Xserver/fb/Imakefile:1.12 Mon Oct 2 01:25:46 2000 +++ xc/programs/Xserver/fb/Imakefile Sun Jan 21 16:19:09 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/fb/Imakefile,v 1.12 2000/10/02 05:25:46 keithp Exp $ +XCOMM $XFree86: xc/programs/Xserver/fb/Imakefile,v 1.13 2001/01/21 21:19:09 tsi Exp $ XCOMM XCOMM XCOMM Id: Imakefile,v 1.1 1999/11/02 03:54:44 keithp Exp $ @@ -10,16 +10,10 @@ DEFINES=-DFBNOPIXADDR -DFBNO24BIT #endif -#ifdef XFree86Version -#if DoLoadableServer +#if defined(XFree86Version) && DoLoadableServer XFMODSRC = fbmodule.c XFMODOBJ = fbmodule.o #endif -#endif -#if BuildRender -PICTSRCS = fbpict.c -PICTOBJS = fbpict.o -#endif SRCS = $(XFMODSRC) \ fballpriv.c \ @@ -51,7 +45,7 @@ fbutil.c \ fbwindow.c \ fb24_32.c \ - $(PICTSRCS) + fbpict.c OBJS = $(XFMODOBJ) \ fbarc.o \ @@ -84,7 +78,7 @@ fbutil.o \ fbwindow.o \ fb24_32.o \ - $(PICTOBJS) + fbpict.o INCLUDES = -I. -I../mi -I../include -I$(XINCLUDESRC) \ -I$(FONTINCSRC) -I$(XF86SRC)/common $(EXTRAINCLUDES) \ Index: xc/programs/Xserver/fb/fb.h diff -u xc/programs/Xserver/fb/fb.h:1.22 xc/programs/Xserver/fb/fb.h:1.26 --- xc/programs/Xserver/fb/fb.h:1.22 Thu Nov 2 11:33:26 2000 +++ xc/programs/Xserver/fb/fb.h Thu Mar 29 21:15:19 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/fb/fb.h,v 1.22 2000/11/02 16:33:26 tsi Exp $ + * $XFree86: xc/programs/Xserver/fb/fb.h,v 1.26 2001/03/30 02:15:19 keithp Exp $ * * Copyright © 1998 Keith Packard * @@ -40,6 +40,8 @@ #include "mibstore.h" #ifdef RENDER #include "picturestr.h" +#else +#include "picture.h" #endif /* @@ -112,6 +114,10 @@ typedef CARD32 FbBits; #endif +#if FB_SHIFT == 4 +typedef CARD16 FbBits; +#endif + #if LOG2_BITMAP_PAD == FB_SHIFT typedef FbBits FbStip; #else @@ -509,6 +515,49 @@ /* Whether 24-bit specific code is needed for this filled pixel value */ #define FbCheck24Pix(p) ((p) == FbNext24Pix(p)) +/* Macros for dealing with dashing */ + +#define FbDashDeclare \ + unsigned char *__dash, *__firstDash, *__lastDash + +#define FbDashInit(pGC,pPriv,dashOffset,dashlen,even) { \ + (even) = TRUE; \ + __firstDash = (pGC)->dash; \ + __lastDash = __firstDash + (pGC)->numInDashList; \ + (dashOffset) %= (pPriv)->dashLength; \ + \ + __dash = __firstDash; \ + while ((dashOffset) >= ((dashlen) = *__dash)) \ + { \ + (dashOffset) -= (dashlen); \ + (even) = 1-(even); \ + if (++__dash == __lastDash) \ + __dash = __firstDash; \ + } \ + (dashlen) -= (dashOffset); \ +} + +#define FbDashNext(dashlen) { \ + if (++__dash == __lastDash) \ + __dash = __firstDash; \ + (dashlen) = *__dash; \ +} + +/* as numInDashList is always even, this case can skip a test */ + +#define FbDashNextEven(dashlen) { \ + (dashlen) = *++__dash; \ +} + +#define FbDashNextOdd(dashlen) FbDashNext(dashlen) + +#define FbDashStep(dashlen,even) { \ + if (!--(dashlen)) { \ + FbDashNext(dashlen); \ + (even) = 1-(even); \ + } \ +} + extern int fbGCPrivateIndex; #ifndef FB_NO_WINDOW_PIXMAPS extern int fbWinPrivateIndex; @@ -1184,6 +1233,10 @@ fbSetVisualTypes (int depth, int visuals, int bitsPerRGB); Bool +fbSetVisualTypesAndMasks (int depth, int visuals, int bitsPerRGB, + Pixel redMask, Pixel greenMask, Pixel blueMask); + +Bool fbInitVisuals (VisualPtr *visualp, DepthPtr *depthp, int *nvisualp, @@ -1505,9 +1558,12 @@ CARD16 width, CARD16 height); -Bool -fbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats); #endif + +Bool +fbPictureInit (ScreenPtr pScreen, + PictFormatPtr formats, + int nformats); /* * fbpixmap.c Index: xc/programs/Xserver/fb/fbbits.h diff -u xc/programs/Xserver/fb/fbbits.h:1.8 xc/programs/Xserver/fb/fbbits.h:1.10 --- xc/programs/Xserver/fb/fbbits.h:1.8 Tue Feb 29 19:25:14 2000 +++ xc/programs/Xserver/fb/fbbits.h Sun Mar 18 03:35:30 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbbits.h,v 1.8 2000/03/01 00:25:14 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbbits.h,v 1.10 2001/03/18 08:35:30 keithp Exp $ */ /* * This file defines functions for drawing some primitives using @@ -141,27 +141,18 @@ FbStride bitsStride; FbStride majorStep, minorStep; BITS xorfg, xorbg; - unsigned char *dash, *lastDash, *firstDash; + FbDashDeclare; int dashlen; Bool even; Bool doOdd; fbGetDrawable (pDrawable, dst, dstStride, dstBpp); doOdd = pGC->lineStyle == LineDoubleDash; - even = TRUE; xorfg = (BITS) pPriv->xor; xorbg = (BITS) pPriv->bgxor; - firstDash = pGC->dash; - lastDash = firstDash + pGC->numInDashList; - dash = firstDash; - while (dashOffset >= (dashlen = *dash++)) - { - dashOffset -= dashlen; - if (dash == lastDash) - dash = firstDash; - even ^= 1; - } - dashlen -= dashOffset; + + FbDashInit (pGC, pPriv, dashOffset, dashlen, even); + bits = ((UNIT *) (dst + (y1 * dstStride))) + x1 * MUL; bitsStride = dstStride * (sizeof (FbBits) / sizeof (UNIT)); if (signdy < 0) @@ -197,9 +188,9 @@ } if (!len) break; - dashlen = *dash++; - if (dash == lastDash) - dash = firstDash; + + FbDashNextEven(dashlen); + if (dashlen >= len) dashlen = len; doubleOdd: @@ -216,8 +207,9 @@ } if (!len) break; - dashlen = *dash++; - /* numInDashList is even, no need to check here */ + + FbDashNextOdd(dashlen); + if (dashlen >= len) dashlen = len; } @@ -241,9 +233,9 @@ } if (!len) break; - dashlen = *dash++; - if (dash == lastDash) - dash = firstDash; + + FbDashNextEven (dashlen); + if (dashlen >= len) dashlen = len; onOffOdd: @@ -259,7 +251,9 @@ } if (!len) break; - dashlen = *dash++; + + FbDashNextOdd (dashlen); + if (dashlen >= len) dashlen = len; } @@ -777,7 +771,9 @@ { if (pGC->capStyle != CapNotLast && pt2 != *((INT32 *) ptsOrig)) - *bits = FbDoRRop (*bits, and, xor); + { + RROP(bits,and,xor); + } return; } pt1 = pt2; Index: xc/programs/Xserver/fb/fbglyph.c diff -u xc/programs/Xserver/fb/fbglyph.c:1.9 xc/programs/Xserver/fb/fbglyph.c:1.10 --- xc/programs/Xserver/fb/fbglyph.c:1.9 Tue Sep 26 20:14:08 2000 +++ xc/programs/Xserver/fb/fbglyph.c Sat Mar 3 17:14:44 2001 @@ -1,5 +1,5 @@ /* - * Id: fbglyph.c,v 1.1 1999/11/02 03:54:45 keithp Exp $ + * $XFree86: xc/programs/Xserver/fb/fbglyph.c,v 1.10 2001/03/03 22:14:44 tsi Exp $ * * Copyright © 1998 Keith Packard * @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbglyph.c,v 1.9 2000/09/27 00:14:08 keithp Exp $ */ #include "fb.h" #include "fontstruct.h" @@ -81,8 +80,18 @@ * C A B C f2 f0 */ +#undef _A +#undef _B +#undef _C +#undef _AB +#undef _BC +#undef _CA +#undef _ABCA +#undef _BCAB +#undef _CABC + #if IMAGE_BYTE_ORDER == MSBFirst -#define _A f1 +#define _A f1 #define _B f2 #define _C f0 #define _AB f2 @@ -93,7 +102,7 @@ #define _CABC f0 #define CASE(a,b,c,d) ((a << 3) | (b << 2) | (c << 1) | d) #else -#define _A f0 +#define _A f0 #define _B f1 #define _C f2 #define _AB f0 Index: xc/programs/Xserver/fb/fbline.c diff -u xc/programs/Xserver/fb/fbline.c:1.6 xc/programs/Xserver/fb/fbline.c:1.7 --- xc/programs/Xserver/fb/fbline.c:1.6 Mon Mar 6 20:37:33 2000 +++ xc/programs/Xserver/fb/fbline.c Wed Jan 17 02:40:02 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbline.c,v 1.6 2000/03/07 01:37:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbline.c,v 1.7 2001/01/17 07:40:02 keithp Exp $ */ #include "fb.h" @@ -42,7 +42,7 @@ y = pDrawable->y; x1 = ppt->x; y1 = ppt->y; - dashOffset = 0; + dashOffset = pGC->dashOffset; totalDash = 0; if (pGC->lineStyle != LineSolid) totalDash = pPriv->dashLength; @@ -60,8 +60,6 @@ x2 + x, y2 + y, npt == 1 && pGC->capStyle != CapNotLast, &dashOffset); - if (totalDash) - dashOffset = dashOffset % totalDash; x1 = x2; y1 = y2; } @@ -81,7 +79,7 @@ y = pDrawable->y; while (nseg--) { - dashOffset = 0; + dashOffset = pGC->dashOffset; fbSegment (pDrawable, pGC, pSegs->x1 + x, pSegs->y1 + y, pSegs->x2 + x, pSegs->y2 + y, Index: xc/programs/Xserver/fb/fbpict.c diff -u xc/programs/Xserver/fb/fbpict.c:1.5 xc/programs/Xserver/fb/fbpict.c:1.8 --- xc/programs/Xserver/fb/fbpict.c:1.5 Wed Nov 29 03:43:08 2000 +++ xc/programs/Xserver/fb/fbpict.c Thu Feb 8 21:12:17 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/fb/fbpict.c,v 1.5 2000/11/29 08:43:08 keithp Exp $ + * $XFree86: xc/programs/Xserver/fb/fbpict.c,v 1.8 2001/02/09 02:12:17 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -24,6 +24,9 @@ */ #include "fb.h" + +#ifdef RENDER + #include "picturestr.h" #include "mipict.h" #include "fbpict.h" @@ -70,6 +73,19 @@ } CARD32 +fbOver24 (CARD32 x, CARD32 y) +{ + CARD16 a = ~x >> 24; + CARD16 t; + CARD32 m,n,o; + + m = FbOverU(x,y,0,a,t); + n = FbOverU(x,y,8,a,t); + o = FbOverU(x,y,16,a,t); + return m|n|o; +} + +CARD32 fbIn (CARD32 x, CARD8 y) { CARD16 a = y; @@ -123,13 +139,15 @@ src = *(CARD16 *) srcBits; src = cvt0565to8888(src); break; + default: + return; } /* manage missing src alpha */ if (pSrc->pFormat->direct.alphaMask == 0) src |= 0xff000000; dstMask = FbFullMask (pDst->pDrawable->depth); srca = src >> 24; - if (srca == 0) + if (src == 0) return; fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp); @@ -211,7 +229,7 @@ src |= 0xff000000; dstMask = FbFullMask (pDst->pDrawable->depth); srca = src >> 24; - if (srca == 0) + if (src == 0) return; fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp); @@ -306,7 +324,7 @@ if (pSrc->pFormat->direct.alphaMask == 0) src |= 0xff000000; srca = src >> 24; - if (srca == 0) + if (src == 0) return; fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp); @@ -337,13 +355,13 @@ else { d = Fetch24(dst); - d = fbOver (src, d); + d = fbOver24 (src, d); } Store24(dst,d); } else if (m) { - d = fbOver (fbIn(src,m), Fetch24(dst)); + d = fbOver24 (fbIn(src,m), Fetch24(dst)); Store24(dst,d); } dst += 3; @@ -391,7 +409,7 @@ if (pSrc->pFormat->direct.alphaMask == 0) src |= 0xff000000; srca = src >> 24; - if (srca == 0) + if (src == 0) return; fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp); @@ -422,14 +440,14 @@ else { d = *dst; - d = fbOver (src, cvt0565to8888(d)); + d = fbOver24 (src, cvt0565to8888(d)); } *dst = cvt8888to0565(d); } else if (m) { d = *dst; - d = fbOver (fbIn(src,m), cvt0565to8888(d)); + d = fbOver24 (fbIn(src,m), cvt0565to8888(d)); *dst = cvt8888to0565(d); } dst++; @@ -541,7 +559,7 @@ if (a == 0xff) d = s; else - d = fbOver (s, Fetch24(dst)); + d = fbOver24 (s, Fetch24(dst)); Store24(dst,d); } dst += 3; @@ -601,7 +619,7 @@ else { d = *dst; - d = fbOver (s, cvt0565to8888(d)); + d = fbOver24 (s, cvt0565to8888(d)); } *dst = cvt8888to0565(d); } @@ -709,6 +727,114 @@ } } +void +fbCompositeSrcAdd_1000x1000 (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) +{ + FbBits *dstBits, *srcBits; + FbStride dstStride, srcStride; + int dstBpp, srcBpp; + + fbGetDrawable(pSrc->pDrawable, srcBits, srcStride, srcBpp); + + fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp); + + fbBlt (srcBits + srcStride * ySrc, + srcStride, + xSrc, + + dstBits + dstStride * yDst, + dstStride, + xDst, + + width, + height, + + GXor, + FB_ALLONES, + srcBpp, + + FALSE, + FALSE); +} + +void +fbCompositeSolidMask_nx1xn (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) +{ + FbBits *dstBits, *srcBits; + FbStip *maskBits; + FbStride dstStride, maskStride, srcStride; + int dstBpp, maskBpp, srcBpp; + FbBits src; + + fbGetDrawable(pSrc->pDrawable, srcBits, srcStride, srcBpp); + switch (srcBpp) { + case 32: + src = *(CARD32 *) srcBits; + break; + case 24: + src = Fetch24 ((CARD8 *) srcBits); + break; + case 16: + src = *(CARD16 *) srcBits; + src = cvt0565to8888(src); + break; + } + + fbGetStipDrawable (pMask->pDrawable, maskBits, maskStride, maskBpp); + fbGetDrawable (pDst->pDrawable, dstBits, dstStride, dstBpp); + + switch (dstBpp) { + case 32: + break; + case 24: + break; + case 16: + src = cvt8888to0565(src); + break; + } + + src = fbReplicatePixel (src, dstBpp); + + fbBltOne (maskBits + maskStride * yMask, + maskStride, + xMask, + + dstBits + dstStride * yDst, + dstStride, + xDst * dstBpp, + dstBpp, + + width * dstBpp, + height, + + 0x0, + src, + FB_ALLONES, + 0x0); +} + # define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b)) void @@ -809,6 +935,19 @@ } } break; + case PICT_a1: + switch (pDst->format) { + case PICT_r5g6b5: + case PICT_b5g6r5: + case PICT_r8g8b8: + case PICT_b8g8r8: + case PICT_a8r8g8b8: + case PICT_x8r8g8b8: + case PICT_a8b8g8r8: + case PICT_x8b8g8r8: + func = fbCompositeSolidMask_nx1xn; + break; + } } } } @@ -873,6 +1012,12 @@ func = fbCompositeSrcAdd_8000x8000; break; } + case PICT_a1: + switch (pDst->format) { + case PICT_a1: + func = fbCompositeSrcAdd_1000x1000; + break; + } } } break; @@ -937,9 +1082,14 @@ REGION_UNINIT (pDst->pDrawable->pScreen, ®ion); } +#endif /* RENDER */ + Bool fbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) { + +#ifdef RENDER + PictureScreenPtr ps; if (!miPictureInit (pScreen, formats, nformats)) @@ -948,5 +1098,8 @@ ps->Composite = fbComposite; ps->Glyphs = miGlyphs; ps->CompositeRects = miCompositeRects; + +#endif /* RENDER */ + return TRUE; } Index: xc/programs/Xserver/fb/fbpict.h diff -u xc/programs/Xserver/fb/fbpict.h:1.2 xc/programs/Xserver/fb/fbpict.h:1.3 --- xc/programs/Xserver/fb/fbpict.h:1.2 Mon Nov 20 02:13:07 2000 +++ xc/programs/Xserver/fb/fbpict.h Sun Jan 21 16:19:09 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/fb/fbpict.h,v 1.2 2000/11/20 07:13:07 keithp Exp $ + * $XFree86: xc/programs/Xserver/fb/fbpict.h,v 1.3 2001/01/21 21:19:09 tsi Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -461,7 +461,4 @@ CARD16 width, CARD16 height); -Bool -fbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats); - #endif /* _FBPICT_H_ */ Index: xc/programs/Xserver/fb/fbseg.c diff -u xc/programs/Xserver/fb/fbseg.c:1.6 xc/programs/Xserver/fb/fbseg.c:1.7 --- xc/programs/Xserver/fb/fbseg.c:1.6 Fri Sep 22 01:58:01 2000 +++ xc/programs/Xserver/fb/fbseg.c Wed Jan 17 02:40:02 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbseg.c,v 1.6 2000/09/22 05:58:01 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbseg.c,v 1.7 2001/01/17 07:40:02 keithp Exp $ */ #include "fb.h" #include "miline.h" @@ -134,25 +134,16 @@ FbStip bgand = (FbStip) pPriv->bgand; FbStip bgxor = (FbStip) pPriv->bgxor; FbStip mask, mask0; - unsigned char *dash, *lastDash; + FbDashDeclare; int dashlen; Bool even; Bool doOdd; fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp); doOdd = pGC->lineStyle == LineDoubleDash; - even = TRUE; - dash = pGC->dash; - lastDash = dash + pGC->numInDashList; - dashOffset %= pPriv->dashLength; - while (dashOffset >= *dash) - { - dashOffset -= *dash++; - if (dash == lastDash) - dash = pGC->dash; - even = !even; - } - dashlen = *dash - dashOffset; + + FbDashInit (pGC, pPriv, dashOffset, dashlen, even); + dst += (y1 * dstStride); x1 *= dstBpp; dst += x1 >> FB_STIP_SHIFT; @@ -198,14 +189,8 @@ mask = mask0; } } - } - if (!--dashlen) - { - if (++dash == lastDash) - dash = pGC->dash; - dashlen = *dash; - even = !even; } + FbDashStep (dashlen, even); } } @@ -276,7 +261,7 @@ int len) { FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); - unsigned char *dash, *lastDash; + FbDashDeclare; int dashlen; Bool even; Bool doOdd; @@ -291,19 +276,10 @@ /* whether to switch fg to bg when filling odd dashes */ doBg = doOdd && (pGC->fillStyle == FillSolid || pGC->fillStyle == FillStippled); + /* compute current dash position */ - even = TRUE; - dash = pGC->dash; - lastDash = dash + pGC->numInDashList; - dashOffset %= pPriv->dashLength; - while (dashOffset >= *dash) - { - dashOffset -= *dash++; - if (dash == lastDash) - dash = pGC->dash; - even = !even; - } - dashlen = *dash - dashOffset; + FbDashInit (pGC, pPriv, dashOffset, dashlen, even); + while (len--) { if (even || doOdd) @@ -337,13 +313,7 @@ x1 += signdx; } } - if (!--dashlen) - { - if (++dash == lastDash) - dash = pGC->dash; - dashlen = *dash; - even = !even; - } + FbDashStep (dashlen, even); } if (doBg) fbSetFg (pDrawable, pGC, fg); @@ -451,25 +421,17 @@ FbStip *d; int x; int rot; - unsigned char *dash, *lastDash; + FbDashDeclare; int dashlen; Bool even; Bool doOdd; fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp); doOdd = pGC->lineStyle == LineDoubleDash; - even = TRUE; - dash = pGC->dash; - lastDash = dash + pGC->numInDashList; - dashOffset %= pPriv->dashLength; - while (dashOffset >= *dash) - { - dashOffset -= *dash++; - if (dash == lastDash) - dash = pGC->dash; - even = !even; - } - dashlen = *dash - dashOffset; + + /* compute current dash position */ + FbDashInit(pGC, pPriv, dashOffset, dashlen, even); + dst += (y1 * dstStride); x1 *= 24; if (signdy < 0) @@ -524,14 +486,8 @@ e += e3; x1 += signdx; } - } - if (!--dashlen) - { - if (++dash == lastDash) - dash = pGC->dash; - dashlen = *dash; - even = !even; } + FbDashStep (dashlen, even); } } #endif Index: xc/programs/Xserver/fb/fbutil.c diff -u xc/programs/Xserver/fb/fbutil.c:1.4 xc/programs/Xserver/fb/fbutil.c:1.5 --- xc/programs/Xserver/fb/fbutil.c:1.4 Wed Feb 23 15:29:48 2000 +++ xc/programs/Xserver/fb/fbutil.c Wed Mar 28 09:37:03 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbutil.c,v 1.4 2000/02/23 20:29:48 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbutil.c,v 1.5 2001/03/28 14:37:03 alanh Exp $ */ #include "fb.h" @@ -176,6 +176,20 @@ SelMask(b,6,w) | \ SelMask(b,7,w)) +#if FB_UNIT == 16 +#define fbStipple16Bits 0 +#define fbStipple8Bits 0 +const FbBits fbStipple4Bits[16] = { + C4( 0,4), C4( 1,4), C4( 2,4), C4( 3,4), C4( 4,4), C4( 5,4), + C4( 6,4), C4( 7,4), C4( 8,4), C4( 9,4), C4( 10,4), C4( 11,4), + C4( 12,4), C4( 13,4), C4( 14,4), C4( 15,4),}; +const FbBits fbStipple2Bits[4] = { + C2( 0,8), C2( 1,8), C2( 2,8), C2( 3,8), +}; +const FbBits fbStipple1Bits[2] = { + C1( 0,16), C1( 1,16), +}; +#endif #if FB_UNIT == 32 #define fbStipple16Bits 0 const FbBits fbStipple8Bits[256] = { Index: xc/programs/Xserver/hw/Imakefile diff -u xc/programs/Xserver/hw/Imakefile:1.1.1.1 xc/programs/Xserver/hw/Imakefile:1.1.1.2 --- xc/programs/Xserver/hw/Imakefile:1.1.1.1 Sat Dec 21 22:34:55 1996 +++ xc/programs/Xserver/hw/Imakefile Tue Jan 16 17:42:51 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: Imakefile /main/1 1996/12/02 10:20:16 lehors $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ XCOMM This is only used on NT where we do not know how to jump over this dir #ifdef Win32Architecture Index: xc/programs/Xserver/hw/darwin/Imakefile diff -u xc/programs/Xserver/hw/darwin/Imakefile:1.4 xc/programs/Xserver/hw/darwin/Imakefile:1.11 --- xc/programs/Xserver/hw/darwin/Imakefile:1.4 Mon Dec 11 15:29:38 2000 +++ xc/programs/Xserver/hw/darwin/Imakefile Fri May 18 13:48:32 2001 @@ -1,34 +1,43 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/darwin/Imakefile,v 1.4 2000/12/11 20:29:38 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/darwin/Imakefile,v 1.11 2001/05/18 17:48:32 torrey Exp $ #include #define IHaveSubdirs -SUBDIRS = utils - SRCS = darwin.c \ - darwinCursor.c \ - darwinKeyboard.c + darwinKeyboard.c \ + xfIOKit.c \ + xfIOKitCursor.c OBJS = darwin.o \ - darwinCursor.o \ - darwinKeyboard.o + darwinKeyboard.o \ + xfIOKit.o \ + xfIOKitCursor.o + +INCLUDES = -I. -I$(SERVERSRC)/mi -I$(SERVERSRC)/fb -I$(EXTINCSRC) \ + -I$(SERVERSRC)/render -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ + -I$(SERVERSRC)/os -I$(INCLUDESRC) -I$(FONTINCSRC) -INCLUDES = -I. -I$(SERVERSRC)/mi -I$(SERVERSRC)/mfb -I$(SERVERSRC)/cfb \ - -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(SERVERSRC)/os \ - -I$(INCLUDESRC) -I$(FONTINCSRC) - #if defined(XFree86CustomVersion) CUSTOMVERSION = XFree86CustomVersion CUSTOMVERDEF = -DXF86_CUSTOM_VERSION='$(CUSTOMVERSION)' #endif -DEFINES = $(CUSTOMVERDEF) +#if DarwinQuartzSupport +SUBDIRS = bundle utils +QUARTZDEF = -DDARWIN_WITH_QUARTZ +#else +SUBDIRS = utils +#endif + +DEFINES = $(CUSTOMVERDEF) $(QUARTZDEF) +EXTRAMANDEFS = $(QUARTZDEF) NormalLibraryObjectRule() NormalLibraryTarget(darwin,$(OBJS)) + +AllTarget(xfIOKitStartup.o) -CppManTarget(Xdarwin,) -InstallManPage(Xdarwin,$(MANDIR)) +InstallManPage(XDarwin,$(MANDIR)) DependTarget() Index: xc/programs/Xserver/hw/darwin/XDarwin.man diff -u /dev/null xc/programs/Xserver/hw/darwin/XDarwin.man:1.1.2.1 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/XDarwin.man Mon May 21 00:56:06 2001 @@ -0,0 +1,132 @@ +.\" $XFree86: xc/programs/Xserver/hw/darwin/XDarwin.man,v 1.1.2.1 2001/05/21 04:56:06 torrey Exp $ +.\" +.TH XDARWIN 1 __vendorversion__ +.SH NAME +XDarwin \- X window system server for Darwin operating system +.SH SYNOPSIS +.B XDarwin +[ options ] ... +.SH DESCRIPTION +#ifdef DARWIN_WITH_QUARTZ +.I XDarwin +is the window server for Version 11 of the X window system on the Darwin +operating system. +.I XDarwin +can be started from the Darwin text console, or while running the Mac OS X +Aqua GUI. +.PP +When running from the console, +.I XDarwin +acts as the window server and uses IOKit services to accesss the display framebuffer, +mouse and keyboard and to provide a layer of hardware abstraction. In console mode, +.I XDarwin +will normally be started by the \fIxdm(1)\fP display manager or by a script +that runs the program \fIxinit(1)\fP. +.PP +When running with the Mac OS X Aqua GUI, +.I XDarwin +will normally be started by launching it from the Finder, but it may also be started from the command line with the \fB\-quartz\fP option. The +.I XDarwin +application allows easy switching between the Mac OS X and X window +desktops. CoreGraphics is used to capture and draw to the screen. Note that the defaults for various command line options are set by the application preferences in this mode. +#else +.I XDarwin +is the window server for Version 11 of the X window system on the Darwin +operating system. This version of +.I XDarwin +can only be started from the Darwin text console. The Mac OS X Aqua GUI, if present, must be shut down. +.I XDarwin +uses IOKit services to accesss the display +framebuffer, mouse and keyboard and to provide a layer of hardware abstraction. +.I XDarwin +will normally be started by the \fIxdm(1)\fP display manager or by a script +that runs the program \fIxinit(1)\fP. +#endif +.SH OPTIONS +.PP +In addition to the normal server options described in the \fIXserver(1)\fP +manual page, \fIXDarwin\fP accepts the following command line switches: +.TP 8 +.B \-fakebuttons +Emulates a 3 button mouse using the Command and Option keys. Clicking the +first mouse button while holding down Command will act like clicking +button 2. Holding down Option will simulate button 3. +.TP 8 +.B \-nofakebuttons +Do not emulate a 3 button mouse. This is the default. +.TP 8 +.B "\-keymap \fIfile\fP" +On startup \fIXDarwin\fP translates a Darwin keymapping into an X keymap. With this option the keymapping is read from a file instead of the kernel. If the file's path is not specified, it will be searched for in Library/Keyboards/ underneath the following directories (in order): ~, /, /Network, /System. +#ifdef DARWIN_WITH_QUARTZ +.TP 8 +.B "\-size \fIwidth\fP \fIheight\fP" +Sets the screeen resolution for the X server to use. +This option is ignored if \fB\-quartz\fP is specified. +.TP 8 +.B "\-depth \fIdepth\fP" +Specifies the color bit depth to use. Currently only 8, 15, and 24 color bits +per pixel are supported. +This option is ignored if \fB\-quartz\fP is specified. +.TP 8 +.B "\-refresh \fIrate\fP" +Gives the refresh rate to use in Hz. For LCD displays this should be 0. +This option is ignored if \fB\-quartz\fP is specified. +.TP 8 +.B "\-screen \fIscreenum\fP" +Specifies which screen number the X server should run on. Screen number 0 is the default. This option is ignored if \fB\-quartz\fP is specified. +.TP 8 +.B \-quartz +Run in parallel with the Mac OS X Aqua GUI. +#else +.TP 8 +.B "\-size \fIwidth\fP \fIheight\fP" +Sets the screeen resolution for the X server to use. +.TP 8 +.B "\-depth \fIdepth\fP" +Specifies the color bit depth to use. Currently only 8, 15, and 24 color bits +per pixel are supported. +.TP 8 +.B "\-refresh \fIrate\fP" +Gives the refresh rate to use in Hz. For LCD displays this should be 0. +.TP 8 +.B "\-screen \fIscreenum\fP" +Specifies which screen number the X server should run on. Screen number 0 is the default. +#endif +.TP 8 +.B \-showconfig +Print out the server version and patchlevel. +.TP 8 +.B \-version +Same as \fB\-showconfig\fP. +.SH "SEE ALSO" +.PP +X(__miscmansuffix__), Xserver(1), xdm(1), xinit(1) +.SH BUGS +.I XDarwin +and this man page still have many limitations. Some of the more obvious +ones are: +.br +- There is no rootless mode with Aqua. +.br +- Only one display is supported. +.br +- The display mode can not be changed once the X server has started. +.br +- A screen saver is not supported. +.PP +.SH AUTHORS +XFree86 was originally ported to Mac OS X Server by John Carmack. Dave Zarzycki used this as the basis of his port of XFree86 4.0 to Darwin 1.0. Torrey T. Lyons improved and integrated this code into the XFree86 Project's mainline for the 4.0.2 release. +.PP +The following members of the XonX Team contributed to the XFree86 4.1 release: +.PP +Rob Braun - Darwin x86 support +.br +Torrey T. Lyons - Project Lead +.br +Andreas Monitzer - Cocoa version of XDarwin front end +.br +Gregory Robert Parker - Original Quartz implementation +.br +Christoph Pfisterer - Dynamic shared X libraries +.br +Toshimitsu Tanaka - Japanese localization Index: xc/programs/Xserver/hw/darwin/Xdarwin.cpp diff -u xc/programs/Xserver/hw/darwin/Xdarwin.cpp:1.1 xc/programs/Xserver/hw/darwin/Xdarwin.cpp:removed --- xc/programs/Xserver/hw/darwin/Xdarwin.cpp:1.1 Mon Dec 11 15:29:39 2000 +++ xc/programs/Xserver/hw/darwin/Xdarwin.cpp Mon Jun 4 12:40:10 2001 @@ -1,69 +0,0 @@ -.\" $XFree86: xc/programs/Xserver/hw/darwin/Xdarwin.cpp,v 1.1 2000/12/11 20:29:39 dawes Exp $ -.\" -.TH XDARWIN 1 "Release 4.0.2" "XFree86" -.SH NAME -Xdarwin \- X window system server for Darwin operating system -.SH SYNOPSIS -.B Xdarwin -[ options ] ... -.SH DESCRIPTION -.I Xdarwin -is the window server for Version 11 of the X window system on the Darwin -operating system. It uses IOKit services to accesss the display framebuffer, -mouse and keyboard and to provide a layer of hardware abstraction. -.I Xdarwin -will normally be started by the \fIxdm(1)\fP display manager or by a script -that runs the program \fIxinit(1)\fP. -.SH OPTIONS -.PP -In addition to the normal server options described in the \fIXserver(1)\fP -manual page, \fIXdarwin\fP accepts the following command line switches: -.TP 8 -.B \-fakebuttons -Emulates a 3 button mouse using the Command and Option keys. Clicking the -first mouse button while holding down Command will act like clicking -button 2. Holding down Option will simulate button 3. -.TP 8 -.B \-nofakebuttons -Do not emulate a 3 button mouse. This is the default. -.TP 8 -.B "\-size \fIwidth\fP \fIheight\fP" -Sets the screeen resolution for the X server to use. -.TP 8 -.B "\-depth \fIdepth\fP" -Specifies the color bit depth to use. Currently only 8, 15, and 24 color bits -per pixel are supported. -.TP 8 -.B "\-refresh \fIrate\fP" -Gives the refresh rate to use in Hz. For LCD displays this should be 0. -.TP 8 -.B \-showconfig -Print out the server version and patchlevel. -.TP 8 -.B \-version -Same as \fB\-showconfig\fP. -.SH "SEE ALSO" -.PP -X(__miscmansuffix__), Xserver(1), xdm(1), xinit(1) -.SH BUGS -.I Xdarwin -and this man page still have many limitations. Some of the more obvious -ones are: -.br -- Only one display is supported. -.br -- The display mode can not be changed once the X server has started. -.br -- A screen saver is not supported. -.br -- The X server does not wake from sleep correctly. -.br -- The key repeat rate can not be changed. -.PP -.SH AUTHORS -Original Port to Mac OS X Server - John Carmack -.br -Port to Darwin 1.0 - Dave Zarzycki -.br -Improvements and bug fixes - Torrey T. Lyons - Index: xc/programs/Xserver/hw/darwin/darwin.c diff -u xc/programs/Xserver/hw/darwin/darwin.c:1.2 xc/programs/Xserver/hw/darwin/darwin.c:1.23.2.2 --- xc/programs/Xserver/hw/darwin/darwin.c:1.2 Fri Dec 1 14:47:38 2000 +++ xc/programs/Xserver/hw/darwin/darwin.c Fri Jun 1 02:36:12 2001 @@ -1,16 +1,10 @@ /************************************************************** * - * IOKit support for the Darwin X Server + * Shared code for the Darwin X Server + * running with Quartz or the IOKit * - * HISTORY: - * Original port to Mac OS X Server by John Carmack - * Port to Darwin 1.0 by Dave Zarzycki - * Significantly rewritten for XFree86 4.0.1 by Torrey Lyons - * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.c,v 1.2 2000/12/01 19:47:38 dawes Exp $ */ - -#define NDEBUG 1 +/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.c,v 1.23.2.2 2001/06/01 06:36:12 torrey Exp $ */ #include "X.h" #include "Xproto.h" @@ -18,48 +12,55 @@ #include "servermd.h" #include "inputstr.h" #include "scrnintstr.h" -#include "mi.h" -#include "mibstore.h" -#include "mipointer.h" -#include "micmap.h" +#include "mibstore.h" // mi backing store implementation +#include "mipointer.h" // mi software cursor +#include "micmap.h" // mi colormap code +#include "fb.h" // fb framebuffer code #include "site.h" +#include "globals.h" #include "xf86Version.h" #include #include -#include +#include +#include #include -#include -#include - #define NO_CFPLUGIN #include -#include -#include -#include - -// Define this to work around bugs in the display drivers for -// older PowerBook G3's. If the X server starts without this -// #define, you don't need it. -#undef OLD_POWERBOOK_G3 +#include +#include #include "darwin.h" +#include "darwinClut8.h" +#include "bundle/quartz.h" +#include "xfIOKit.h" +// X server shared global variables DarwinFramebufferRec dfb; -unsigned char darwinKeyCommandL = 0, darwinKeyOptionL = 0; +int darwinEventFD = -1; +Bool quartz = FALSE; +int quartzEventWriteFD = -1; +int quartzStartClients = 1; +int quartzUseSysBeep = 0; +int darwinFakeButtons = 0; +UInt32 darwinDesiredWidth = 0, darwinDesiredHeight = 0; +IOIndex darwinDesiredDepth = -1; +SInt32 darwinDesiredRefresh = -1; +UInt32 darwinScreenNumber = 0; +char *darwinKeymapFile = NULL; + +// Quit after this many seconds if no quartz event poster is found. +// Leave undefined for no safety quit. +#undef QUARTZ_SAFETY_DELAY /* Fake button press/release for scroll wheel move. */ #define SCROLLWHEELUPFAKE 4 #define SCROLLWHEELDOWNFAKE 5 -static int darwinEventFD; -static Bool fake3Buttons = FALSE; -static DeviceIntPtr darwinPointer; -static DeviceIntPtr darwinKeyboard; -static UInt32 darwinDesiredWidth = 0, darwinDesiredHeight = 0; -static IOIndex darwinDesiredDepth = -1; -static SInt32 darwinDesiredRefresh = -1; +static DeviceIntPtr darwinPointer; +static DeviceIntPtr darwinKeyboard; +static unsigned char darwinKeyCommandL = 0, darwinKeyOptionL = 0; // Common pixmap formats static PixmapFormatRec formats[] = { @@ -68,7 +69,8 @@ { 8, 8, BITMAP_SCANLINE_PAD }, { 15, 16, BITMAP_SCANLINE_PAD }, { 16, 16, BITMAP_SCANLINE_PAD }, - { 24, 32, BITMAP_SCANLINE_PAD } + { 24, 32, BITMAP_SCANLINE_PAD }, + { 32, 32, BITMAP_SCANLINE_PAD } }; const int NUMFORMATS = sizeof(formats)/sizeof(formats[0]); @@ -79,7 +81,7 @@ #define OSVENDOR "" #endif #ifndef PRE_RELEASE -#define PRE_RELEASE (XF86_VERSION_BETA || XF86_VERSION_ALPHA) +#define PRE_RELEASE XF86_VERSION_SNAP #endif static void @@ -92,12 +94,16 @@ "to fixes@XFree86.Org. Before reporting bugs in pre-release versions,\n" "please check the latest version in the XFree86 CVS repository\n" "(http://www.XFree86.Org/cvs)\n"); +#endif + ErrorF("\nXFree86 Version %d.%d.%d", XF86_VERSION_MAJOR, XF86_VERSION_MINOR, + XF86_VERSION_PATCH); +#if XF86_VERSION_SNAP > 0 + ErrorF(".%d", XF86_VERSION_SNAP); #endif - ErrorF("\nXFree86 Version%s", XF86_VERSION); #ifdef XF86_CUSTOM_VERSION - ErrorF("(%s) ", XF86_CUSTOM_VERSION); + ErrorF(" (%s)", XF86_CUSTOM_VERSION); #endif - ErrorF("/ X Window System\n"); + ErrorF(" / X Window System\n"); ErrorF("(protocol Version %d, revision %d, vendor release %d)\n", X_PROTOCOL, X_PROTOCOL_REVISION, VENDOR_RELEASE ); ErrorF("Release Date: %s\n", XF86_DATE); @@ -110,52 +116,24 @@ #endif } -static Bool DarwinSaveScreen(ScreenPtr pScreen, int on) -{ // FIXME - if (on == SCREEN_SAVER_FORCER) { - } else if (on == SCREEN_SAVER_ON) { - } else { - } - return TRUE; -} /* - * DarwinStoreColors - * This is a callback from X to change the hardware colormap - * when using PsuedoColor + * DarwinSaveScreen + * X screensaver support. Not implemented. */ -static void DarwinStoreColors( - ColormapPtr pmap, - int numEntries, - xColorItem *pdefs) +static Bool DarwinSaveScreen(ScreenPtr pScreen, int on) { - kern_return_t kr; - int i; - IOColorEntry *newColors; - - assert( newColors = (IOColorEntry *) - xalloc( numEntries*sizeof(IOColorEntry) )); - - // Convert xColorItem values to IOColorEntry - // assume the colormap is PsuedoColor - // as we do not support DirectColor - for (i = 0; i < numEntries; i++) { - newColors[i].index = pdefs[i].pixel; - newColors[i].red = pdefs[i].red; - newColors[i].green = pdefs[i].green; - newColors[i].blue = pdefs[i].blue; - } - - kr = IOFBSetCLUT( dfb.fbService, 0, numEntries, - kSetCLUTByValue, newColors ); - kern_assert( kr ); - - xfree( newColors ); + // FIXME + if (on == SCREEN_SAVER_FORCER) { + } else if (on == SCREEN_SAVER_ON) { + } else { + } + return TRUE; } /* * DarwinAddScreen - * This is a callback from X during AddScreen() from InitOutput() + * This is a callback from X during AddScreen() from InitOutput() */ static Bool DarwinAddScreen( int index, @@ -163,8 +141,9 @@ int argc, char **argv ) { - int bitsPerRGB, i; + int bitsPerRGB, i, dpi; VisualPtr visual; + ColormapPtr pmap; /* Communicate the information about our initialized screen back to X. */ bitsPerRGB = dfb.pixelInfo.bitsPerComponent; @@ -193,38 +172,27 @@ return FALSE; } + miSetPixmapDepths(); + // machine independent screen init // setup _Screen structure in pScreen - if ( dfb.bitsPerPixel == 32 ) { - if (!cfb32ScreenInit(pScreen, - dfb.framebuffer, - dfb.width, dfb.height, - 75, 75, /* screen size in dpi, which we have no accurate knowledge of */ - dfb.pitch / (dfb.bitsPerPixel/8))) { - return FALSE; - } - } else if ( dfb.bitsPerPixel == 16 ) { - if (!cfb16ScreenInit(pScreen, - dfb.framebuffer, - dfb.width, dfb.height, - 75, 75, /* screen size in dpi, which we have no accurate knowledge of */ - dfb.pitch / (dfb.bitsPerPixel/8))) { - return FALSE; - } - } else if ( dfb.bitsPerPixel == 8 ) { - if (!cfbScreenInit(pScreen, - dfb.framebuffer, - dfb.width, dfb.height, - 75, 75, /* screen size in dpi, which we have no accurate knowledge of */ - dfb.pitch / (dfb.bitsPerPixel/8))) { - return FALSE; - } - } else { + if (monitorResolution) + dpi = monitorResolution; + else + dpi = 75; + + // initialize fb + if (! fbScreenInit(pScreen, + dfb.framebuffer, // pointer to screen bitmap + dfb.width, dfb.height, // screen size in pixels + dpi, dpi, // dots per inch + dfb.pitch/(dfb.bitsPerPixel/8), // pixel width of framebuffer + dfb.bitsPerPixel)) // bits per pixel for screen + { return FALSE; } - // set the RGB order correctly for TrueColor, it is byte swapped by X - // FIXME: make work on x86 darwin if it ever gets buildable + // set the RGB order correctly for TrueColor if (dfb.bitsPerPixel > 8) { for (i = 0, visual = pScreen->visuals; // someday we may have more than 1 i < pScreen->numVisuals; i++, visual++) { @@ -232,7 +200,7 @@ visual->offsetRed = bitsPerRGB * 2; visual->offsetGreen = bitsPerRGB; visual->offsetBlue = 0; -#if FALSE +#if TRUE visual->redMask = ((1<offsetRed; visual->greenMask = ((1<offsetGreen; visual->blueMask = ((1<offsetBlue; @@ -245,21 +213,26 @@ } } +#ifdef RENDER + fbPictureInit(pScreen, 0, 0); +#endif + #ifdef MITSHM ShmRegisterFbFuncs(pScreen); #endif - // setup cursor support, use hardware if possible - if (!DarwinInitCursor(pScreen)) { - return FALSE; - } - // this must be initialized (why doesn't X have a default?) pScreen->SaveScreen = DarwinSaveScreen; - - // initialize colormap handling as needed - if (dfb.pixelInfo.pixelType == kIOCLUTPixels) { - pScreen->StoreColors = DarwinStoreColors; + + // Perform operations specific to the screen interface + if (quartz) { + if (! QuartzAddScreen(pScreen)) { + return FALSE; + } + } else { + if (! XFIOKitAddScreen(pScreen)) { + return FALSE; + } } // create and install the default colormap and @@ -267,35 +240,37 @@ if (!miCreateDefColormap( pScreen )) { return FALSE; } - - return TRUE; -} -/* - * DarwinShutdownScreen - */ -void DarwinShutdownScreen( void ) -{ -#if 0 - // we must close the HID System first - // because it is a client of the framebuffer - NXCloseEventStatus( dfb.hidParam ); - IOServiceClose( dfb.hidService ); - IOServiceClose( dfb.fbService ); -#endif + /* Set the colormap to the statically defined one if we're in 8 bit + * mode and we're using a fixed color map. Essentially this translates + * to Darwin/x86 in 8-bit mode. + */ + if( (dfb.colorBitsPerPixel == 8) && + (dfb.pixelInfo.pixelType == kIOFixedCLUTPixels) ) { + pmap = miInstalledMaps[pScreen->myNum]; + visual = pmap->pVisual; + for( i = 0; i < visual->ColormapEntries; i++ ) { + pmap->red[i].co.local.red = darwinClut8[i].red; + pmap->red[i].co.local.green = darwinClut8[i].green; + pmap->red[i].co.local.blue = darwinClut8[i].blue; + } + } + + return TRUE; } /* ============================================================================= - mouse callbacks + mouse and keyboard callbacks ============================================================================= */ /* - * Set mouse acceleration and thresholding - * FIXME: We currently ignore the threshold in ctrl->threshold. + * DarwinChangePointerControl + * Set mouse acceleration and thresholding + * FIXME: We currently ignore the threshold in ctrl->threshold. */ static void DarwinChangePointerControl( DeviceIntPtr device, @@ -312,66 +287,61 @@ /* - * Motion history between events is not required to be supported. + * DarwinMouseProc + * Handle the initialization, etc. of a mouse */ -static int DarwinGetMotionEvents( DeviceIntPtr pDevice, xTimecoord *buff, - unsigned long start, unsigned long stop, ScreenPtr pScr) -{ - return 0; -} - -/* - * DarwinMouseProc -- - * Handle the initialization, etc. of a mouse - */ +static int DarwinMouseProc( + DeviceIntPtr pPointer, + int what ) +{ + char map[6]; -static int DarwinMouseProc( DeviceIntPtr pPointer, int what ) { + switch (what) { - char map[6]; + case DEVICE_INIT: + pPointer->public.on = FALSE; - switch (what) { + // Set button map. + map[1] = 1; + map[2] = 2; + map[3] = 3; + map[4] = 4; + map[5] = 5; + InitPointerDeviceStruct( (DevicePtr)pPointer, + map, + 5, // numbuttons (4 & 5 are scroll wheel) + miPointerGetMotionEvents, + DarwinChangePointerControl, + 0 ); + break; - case DEVICE_INIT: - pPointer->public.on = FALSE; + case DEVICE_ON: + pPointer->public.on = TRUE; + AddEnabledDevice( darwinEventFD ); + return Success; - map[1] = 1; - map[2] = 2; - map[3] = 3; - map[4] = 4; - map[5] = 5; - InitPointerDeviceStruct( (DevicePtr)pPointer, - map, - 5, // numbuttons (4 & 5 are scroll wheel) - DarwinGetMotionEvents, // miPointerGetMotionEvents ?? - DarwinChangePointerControl, - 0 ); - break; - - case DEVICE_ON: - pPointer->public.on = TRUE; - AddEnabledDevice( darwinEventFD ); - return Success; + case DEVICE_CLOSE: + case DEVICE_OFF: + pPointer->public.on = FALSE; + RemoveEnabledDevice( darwinEventFD ); + return Success; + } - case DEVICE_CLOSE: - case DEVICE_OFF: - pPointer->public.on = FALSE; - RemoveEnabledDevice( darwinEventFD ); return Success; - } - - return Success; } /* * DarwinKeybdProc - * callback from X + * Callback from X */ static int DarwinKeybdProc( DeviceIntPtr pDev, int onoff ) { switch ( onoff ) { case DEVICE_INIT: DarwinKeyboardInit( pDev ); + darwinKeyCommandL = DarwinModifierKeycode(NX_MODIFIERKEY_COMMAND, 0); + darwinKeyOptionL = DarwinModifierKeycode(NX_MODIFIERKEY_ALTERNATE, 0); break; case DEVICE_ON: pDev->public.on = TRUE; @@ -391,6 +361,149 @@ /* =========================================================================== + Utility routines + +=========================================================================== +*/ + +/* + * DarwinFindLibraryFile + * Search for a file in the standard Library paths, which are (in order): + * + * ~/Library/ user specific + * /Library/ host specific + * /Network/Library/ LAN specific + * /System/Library/ OS specific + * + * A sub-path can be specified to search in below the various Library + * directories. Returns a new character string (owned by the caller) + * containing the full path to the first file found. + */ +static char * DarwinFindLibraryFile( + const char *file, + const char *pathext ) +{ + // Library search paths + char *pathList[] = { + "", + "/Network", + "/System", + NULL + }; + char *home; + char *fullPath; + int i = 0; + + // Return the file name as is if it is already a fully qualified path. + if (!access(file, F_OK)) { + fullPath = xalloc(strlen(file)+1); + strcpy(fullPath, file); + return fullPath; + } + + fullPath = xalloc(PATH_MAX); + + home = getenv("HOME"); + if (home) { + snprintf(fullPath, PATH_MAX, "%s/Library/%s/%s", home, pathext, file); + if (!access(fullPath, F_OK)) + return fullPath; + } + + while (pathList[i]) { + snprintf(fullPath, PATH_MAX, "%s/Library/%s/%s", pathList[i++], + pathext, file); + if (!access(fullPath, F_OK)) + return fullPath; + } + + xfree(fullPath); + return NULL; +} + +/* + * DarwinSimulateMouseClick + * Send a mouse click to X when multiple mouse buttons are simulated + * with modifier-clicks, such as command-click for button 2. The dix + * layer is told that the previously pressed modifier key(s) are + * released, the simulated click event is sent, and the modifier keys + * are reverted to their actual (pressed) state. This is usually + * closest to what the user wants. Ie. the user typically wants to + * simulate a button 2 press instead of Command-button 2. + */ +static void DarwinSimulateMouseClick( + xEvent xe, // event template with time and + // mouse position filled in + int whichButton, // mouse button to be pressed + int whichEvent, // ButtonPress or ButtonRelease + int keycodesUsed[], // list of keycodes of the modifiers used + // to create the fake click + MIN_KEYCODE + int numKeycodes ) // number of keycodes in list +{ + int i; + + // first fool X into forgetting about the keys + for (i = 0; i < numKeycodes; i++) { + xe.u.u.type = KeyRelease; + xe.u.u.detail = keycodesUsed[i]; + (darwinKeyboard->public.processInputProc) + ( &xe, darwinKeyboard, 1 ); + } + + // push the mouse button + xe.u.u.type = whichEvent; + xe.u.u.detail = whichButton; + (darwinPointer->public.processInputProc) + ( &xe, darwinPointer, 1 ); + + // reset the keys + for (i = 0; i < numKeycodes; i++) { + xe.u.u.type = KeyPress; + xe.u.u.detail = keycodesUsed[i]; + (darwinKeyboard->public.processInputProc) + ( &xe, darwinKeyboard, 1 ); + } +} + +/* + * DarwinUpdateModifiers + * Send events to update the modifier state. + */ +static void DarwinUpdateModifiers( + xEvent xe, // event template with time, mouse position, + // and KeyPress or KeyRelease filled in + int flags ) // modifier flags that have changed +{ + if (flags & NX_ALPHASHIFTMASK) { + xe.u.u.detail = DarwinModifierKeycode(NX_MODIFIERKEY_ALPHALOCK, 0); + (darwinKeyboard->public.processInputProc) + (&xe, darwinKeyboard, 1); + } + if (flags & NX_COMMANDMASK) { + xe.u.u.detail = DarwinModifierKeycode(NX_MODIFIERKEY_COMMAND, 0); + (darwinKeyboard->public.processInputProc) + (&xe, darwinKeyboard, 1); + } + if (flags & NX_CONTROLMASK) { + xe.u.u.detail = DarwinModifierKeycode(NX_MODIFIERKEY_CONTROL, 0); + (darwinKeyboard->public.processInputProc) + (&xe, darwinKeyboard, 1); + } + if (flags & NX_ALTERNATEMASK) { + xe.u.u.detail = DarwinModifierKeycode(NX_MODIFIERKEY_ALTERNATE, 0); + (darwinKeyboard->public.processInputProc) + (&xe, darwinKeyboard, 1); + } + if (flags & NX_SHIFTMASK) { + xe.u.u.detail = DarwinModifierKeycode(NX_MODIFIERKEY_SHIFT, 0); + (darwinKeyboard->public.processInputProc) + (&xe, darwinKeyboard, 1); + } +} + +/* +=========================================================================== + Functions needed to link against device independent X =========================================================================== @@ -398,7 +511,7 @@ /* * ProcessInputEvents - * Read events from the event queue + * Read and process events from the event pipe until it is empty. */ void ProcessInputEvents(void) { @@ -407,521 +520,334 @@ int r; struct timeval tv; struct timezone tz; + static int old_state = 0; + +#if defined(DARWIN_WITH_QUARTZ) && defined(QUARTZ_SAFETY_DELAY) + static Bool gotread = false; + static int startsec = 0; + + // Quartz safety quit. Bail if we don't get any events from the event pipe. + // If the event writer fails to find us, we will have captured the screen + // but not be seeing any events and be unkillable from the console. + if (quartz && ! gotread) { + gettimeofday(&tv, &tz); + if (startsec == 0) startsec = tv.tv_sec; + if (startsec + QUARTZ_SAFETY_DELAY< tv.tv_sec) { + QuartzGiveUp(); + FatalError("%d second safety quit\n", QUARTZ_SAFETY_DELAY); + } + } +#endif + + while (TRUE) { - // try to read from our pipe - r = read( darwinEventFD, &ev, sizeof(ev)); - if ((r == -1) && (errno != EAGAIN)) { - ErrorF("read(darwinEventFD) failed, errno=%d: %s\n", errno, strerror(errno)); - return; - } else if ((r == -1) && (errno == EAGAIN)) { - return; - } else if ( r != sizeof( ev ) ) { - ErrorF( "Only read %i bytes from darwinPipe!", r ); - return; - } - - gettimeofday(&tv, &tz); - - // translate it to an X event and post it - memset(&xe, 0, sizeof(xe)); - - xe.u.keyButtonPointer.rootX = ev.location.x; - xe.u.keyButtonPointer.rootY = ev.location.y; - //xe.u.keyButtonPointer.time = ev.time; - xe.u.keyButtonPointer.time = tv.tv_sec * 1000 + tv.tv_usec / 1000; - - /* A newer kernel generates multi-button events by NX_SYSDEFINED. - See iokit/Families/IOHIDSystem/IOHIDSystem.cpp version 1.1.1.7, - 2000/08/10 00:23:37 or later. */ - - switch( ev.type ) { - case NX_MOUSEMOVED: - xe.u.u.type = MotionNotify; - (darwinPointer->public.processInputProc)( &xe, darwinPointer, 1 ); + // try to read from our pipe + r = read( darwinEventFD, &ev, sizeof(ev)); + + if ((r == -1) && (errno == EAGAIN)) { + // no event available break; - - case NX_LMOUSEDOWN: - // Mimic multi-button mouse with Command and Option - if (fake3Buttons && ev.flags & (NX_COMMANDMASK | NX_ALTERNATEMASK)) { - if (ev.flags & NX_COMMANDMASK) { - // first fool X into forgetting about Command key - xe.u.u.type = KeyRelease; - xe.u.u.detail = darwinKeyCommandL; - (darwinKeyboard->public.processInputProc) - ( &xe, darwinKeyboard, 1 ); - // push button 2 - xe.u.u.type = ButtonPress; - xe.u.u.detail = 2; // de.key = button 2 - (darwinPointer->public.processInputProc) - ( &xe, darwinPointer, 1 ); - // reset Command key down - xe.u.u.type = KeyPress; - xe.u.u.detail = darwinKeyCommandL; - (darwinKeyboard->public.processInputProc) - ( &xe, darwinKeyboard, 1 ); + } else if (r == -1) { + // FIXME: FatalError here? Reading may be permanently broken. + ErrorF( "Event pipe read failed, errno=%d: %s\n", + errno, strerror(errno) ); + break; + } else if ( r == 0 ) { + FatalError("Darwin ProcessInputEvents: EOF on event pipe!\n"); + } else if ( r != sizeof( ev ) ) { + ErrorF( "Only read %i bytes from event pipe!\n", r ); + break; + } + +#if defined(DARWIN_WITH_QUARTZ) && defined(QUARTZ_SAFETY_DELAY) + gotread = true; +#endif + gettimeofday(&tv, &tz); + + // translate it to an X event and post it + memset(&xe, 0, sizeof(xe)); + + xe.u.keyButtonPointer.rootX = ev.location.x; + xe.u.keyButtonPointer.rootY = ev.location.y; + //xe.u.keyButtonPointer.time = ev.time; + xe.u.keyButtonPointer.time = tv.tv_sec * 1000 + tv.tv_usec / 1000; + + /* A newer kernel generates multi-button events by NX_SYSDEFINED. + See iokit/Families/IOHIDSystem/IOHIDSystem.cpp version 1.1.1.7, + 2000/08/10 00:23:37 or later. */ + + switch( ev.type ) { + case NX_MOUSEMOVED: + xe.u.u.type = MotionNotify; + (darwinPointer->public.processInputProc) + ( &xe, darwinPointer, 1 ); + break; + +#ifdef __i386__ + // x86 drivers currently reverse mouse up and down + case NX_LMOUSEUP: +#else + case NX_LMOUSEDOWN: +#endif + // Mimic multi-button mouse with Command and Option + if (darwinFakeButtons && + ev.flags & (NX_COMMANDMASK | NX_ALTERNATEMASK)) { + int button; + int keycode; + if (ev.flags & NX_COMMANDMASK) { + button = 2; + keycode = darwinKeyCommandL; + } else { + button = 3; + keycode = darwinKeyOptionL; + } + DarwinSimulateMouseClick(xe, button, ButtonPress, + &keycode, 1); } else { - // first fool X into forgetting about Option key - xe.u.u.type = KeyRelease; - xe.u.u.detail = darwinKeyOptionL; - (darwinKeyboard->public.processInputProc) - ( &xe, darwinKeyboard, 1 ); - // push button 3 + xe.u.u.detail = 1; xe.u.u.type = ButtonPress; - xe.u.u.detail = 3; // de.key = button 3 (darwinPointer->public.processInputProc) ( &xe, darwinPointer, 1 ); - // reset Option key down - xe.u.u.type = KeyPress; - xe.u.u.detail = darwinKeyOptionL; - (darwinKeyboard->public.processInputProc) - ( &xe, darwinKeyboard, 1 ); } - } else { - xe.u.u.detail = 1; //de.key = button 1; - xe.u.u.type = ButtonPress; - (darwinPointer->public.processInputProc) - ( &xe, darwinPointer, 1 ); - } - break; - - case NX_LMOUSEUP: - // Mimic multi-button mouse with Command and Option - if (fake3Buttons && ev.flags & (NX_COMMANDMASK | NX_ALTERNATEMASK)) { - if (ev.flags & NX_COMMANDMASK) { - // first fool X into forgetting about Command key - xe.u.u.type = KeyRelease; - xe.u.u.detail = darwinKeyCommandL; - (darwinKeyboard->public.processInputProc) - ( &xe, darwinKeyboard, 1 ); - // push button 2 - xe.u.u.type = ButtonRelease; - xe.u.u.detail = 2; // de.key = button 2 - (darwinPointer->public.processInputProc) - ( &xe, darwinPointer, 1 ); - // reset Command key down - xe.u.u.type = KeyPress; - xe.u.u.detail = darwinKeyCommandL; - (darwinKeyboard->public.processInputProc) - ( &xe, darwinKeyboard, 1 ); + break; + +#ifdef __i386__ + case NX_LMOUSEDOWN: +#else + case NX_LMOUSEUP: +#endif + // Mimic multi-button mouse with Command and Option + if (darwinFakeButtons && + ev.flags & (NX_COMMANDMASK | NX_ALTERNATEMASK)) { + int button; + int keycode; + if (ev.flags & NX_COMMANDMASK) { + button = 2; + keycode = darwinKeyCommandL; + } else { + button = 3; + keycode = darwinKeyOptionL; + } + DarwinSimulateMouseClick(xe, button, ButtonRelease, + &keycode, 1); } else { - // first fool X into forgetting about Option key - xe.u.u.type = KeyRelease; - xe.u.u.detail = darwinKeyOptionL; - (darwinKeyboard->public.processInputProc) - ( &xe, darwinKeyboard, 1 ); - // push button 3 + xe.u.u.detail = 1; xe.u.u.type = ButtonRelease; - xe.u.u.detail = 3; // de.key = button 3 (darwinPointer->public.processInputProc) ( &xe, darwinPointer, 1 ); - // reset Option key down - xe.u.u.type = KeyPress; - xe.u.u.detail = darwinKeyOptionL; - (darwinKeyboard->public.processInputProc) - ( &xe, darwinKeyboard, 1 ); } - } else { - xe.u.u.detail = 1; //de.key = button 1; - xe.u.u.type = ButtonRelease; + break; + + // Button 2 isn't handled correctly by older kernels anyway. + // Just let NX_SYSDEFINED events handle these. + case NX_RMOUSEDOWN: +#if 0 + xe.u.u.detail = 2; + xe.u.u.type = ButtonPress; (darwinPointer->public.processInputProc) ( &xe, darwinPointer, 1 ); - } - break; - -// Button 2 isn't handled correctly by older kernels anyway. Just let -// NX_SYSDEFINED events handle these. - case NX_RMOUSEDOWN: -#if 0 - xe.u.u.detail = 2; //de.key; - xe.u.u.type = ButtonPress; - (darwinPointer->public.processInputProc)( &xe, darwinPointer, 1 ); #endif - break; - - case NX_RMOUSEUP: + break; + + case NX_RMOUSEUP: #if 0 - xe.u.u.detail = 2; //de.key; - xe.u.u.type = ButtonRelease; - (darwinPointer->public.processInputProc)( &xe, darwinPointer, 1 ); + xe.u.u.detail = 2; + xe.u.u.type = ButtonRelease; + (darwinPointer->public.processInputProc) + ( &xe, darwinPointer, 1 ); #endif - break; - - case NX_KEYDOWN: - xe.u.u.type = KeyPress; - xe.u.u.detail = ev.data.key.keyCode + MIN_KEYCODE; - (darwinKeyboard->public.processInputProc)( &xe, darwinKeyboard, 1 ); - break; - - case NX_KEYUP: - xe.u.u.type = KeyRelease; - xe.u.u.detail = ev.data.key.keyCode + MIN_KEYCODE; - (darwinKeyboard->public.processInputProc)(&xe, darwinKeyboard, 1); - break; - - case NX_FLAGSCHANGED: - { - static int old_state = 0; - int new_on_flags = ~old_state & ev.flags; - int new_off_flags = old_state & ~ev.flags; - old_state = ev.flags; - xe.u.u.detail = ev.data.key.keyCode + MIN_KEYCODE; - - // alphalock is toggled rather than held on, - // so we have to handle it differently - if (new_on_flags & NX_ALPHASHIFTMASK || - new_off_flags & NX_ALPHASHIFTMASK) { + break; + + case NX_KEYDOWN: xe.u.u.type = KeyPress; + xe.u.u.detail = ev.data.key.keyCode + MIN_KEYCODE; (darwinKeyboard->public.processInputProc) - (&xe, darwinKeyboard, 1); + ( &xe, darwinKeyboard, 1 ); + break; + + case NX_KEYUP: xe.u.u.type = KeyRelease; + xe.u.u.detail = ev.data.key.keyCode + MIN_KEYCODE; (darwinKeyboard->public.processInputProc) (&xe, darwinKeyboard, 1); break; - } - - if (new_on_flags) { - xe.u.u.type = KeyPress; - } else if (new_off_flags) { - xe.u.u.type = KeyRelease; - } else { + + case NX_FLAGSCHANGED: + { + // Assumes only one flag has changed. In Quartz mode, this + // restriction must be enforced by the Quartz event feeder. + int new_on_flags = ~old_state & ev.flags; + int new_off_flags = old_state & ~ev.flags; + old_state = ev.flags; + xe.u.u.detail = ev.data.key.keyCode + MIN_KEYCODE; + + // Alphalock is toggled rather than held on, + // so we have to handle it differently. + if (new_on_flags & NX_ALPHASHIFTMASK || + new_off_flags & NX_ALPHASHIFTMASK) { + xe.u.u.type = KeyPress; + (darwinKeyboard->public.processInputProc) + (&xe, darwinKeyboard, 1); + xe.u.u.type = KeyRelease; + (darwinKeyboard->public.processInputProc) + (&xe, darwinKeyboard, 1); + break; + } + + if (new_on_flags) { + xe.u.u.type = KeyPress; + } else if (new_off_flags) { + xe.u.u.type = KeyRelease; + } else { + break; + } + (darwinKeyboard->public.processInputProc) + (&xe, darwinKeyboard, 1); break; } - (darwinKeyboard->public.processInputProc)(&xe, darwinKeyboard, 1); - break; - } - - case NX_SYSDEFINED: - if (ev.data.compound.subType == 7) { - long hwDelta = ev.data.compound.misc.L[0]; - long hwButtons = ev.data.compound.misc.L[1]; - int i; - - for (i = 1; i < 4; i++) { - if (hwDelta & (1 << i)) { - xe.u.u.detail = i + 1; - if (hwButtons & (1 << i)) { - xe.u.u.type = ButtonPress; - } else { - xe.u.u.type = ButtonRelease; + + case NX_SYSDEFINED: + if (ev.data.compound.subType == 7) { + long hwDelta = ev.data.compound.misc.L[0]; + long hwButtons = ev.data.compound.misc.L[1]; + int i; + + for (i = 1; i < 5; i++) { + if (hwDelta & (1 << i)) { + // IOKit and X have different numbering for the + // middle and right mouse buttons. + if (i == 1) { + xe.u.u.detail = 3; + } else if (i == 2) { + xe.u.u.detail = 2; + } else { + xe.u.u.detail = i + 1; + } + if (hwButtons & (1 << i)) { +#ifdef __i386__ + xe.u.u.type = ButtonRelease; + } else { + xe.u.u.type = ButtonPress; +#else + xe.u.u.type = ButtonPress; + } else { + xe.u.u.type = ButtonRelease; +#endif + } + (darwinPointer->public.processInputProc) + ( &xe, darwinPointer, 1 ); } - (darwinPointer->public.processInputProc) - ( &xe, darwinPointer, 1 ); } } + break; + + case NX_SCROLLWHEELMOVED: + { + short count = ev.data.scrollWheel.deltaAxis1; + + if (count > 0) { + xe.u.u.detail = SCROLLWHEELUPFAKE; + } else { + xe.u.u.detail = SCROLLWHEELDOWNFAKE; + count = -count; + } + + for (; count; --count) { + xe.u.u.type = ButtonPress; + (darwinPointer->public.processInputProc) + ( &xe, darwinPointer, 1 ); + xe.u.u.type = ButtonRelease; + (darwinPointer->public.processInputProc) + ( &xe, darwinPointer, 1 ); + } + break; } - break; - case NX_SCROLLWHEELMOVED: - { - short count = ev.data.scrollWheel.deltaAxis1; - - if (count > 0) { - xe.u.u.detail = SCROLLWHEELUPFAKE; - } else { - xe.u.u.detail = SCROLLWHEELDOWNFAKE; - count = -count; - } + // Special events for Quartz support + case NX_APPDEFINED: + if (quartz) { + switch (ev.data.compound.subType) { + + // Update modifier state. As opposed to NX_FLAGSCHANGED, + // in this case any amount of modifiers may have changed. + case kXDarwinUpdateModifiers: + xe.u.u.type = KeyRelease; + DarwinUpdateModifiers(xe, old_state & ~ev.flags); + xe.u.u.type = KeyPress; + DarwinUpdateModifiers(xe, ~old_state & ev.flags); + old_state = ev.flags; + break; - for (; count; --count) { - xe.u.u.type = ButtonPress; - (darwinPointer->public.processInputProc) - ( &xe, darwinPointer, 1 ); - xe.u.u.type = ButtonRelease; - (darwinPointer->public.processInputProc) - ( &xe, darwinPointer, 1 ); - } - break; - } + case kXDarwinShow: + QuartzShow(ev.location.x, ev.location.y); + // The mouse location will have moved; track it. + xe.u.u.type = MotionNotify; + (darwinPointer->public.processInputProc) + ( &xe, darwinPointer, 1 ); + break; + + case kXDarwinHide: + QuartzHide(); + break; + + case kXDarwinQuit: + GiveUp(0); + break; + + case kXDarwinReadPasteboard: + QuartzReadPasteboard(); + break; + + case kXDarwinWritePasteboard: + QuartzWritePasteboard(); + break; - default: - ErrorF("unknown event caught: %d\n", ev.type); - ErrorF("\tev.type = %d\n", ev.type); - ErrorF("\tev.location.x,y = %d,%d\n", ev.location.x, ev.location.y); - ErrorF("\tev.time = %ld\n", ev.time); - ErrorF("\tev.flags = 0x%x\n", ev.flags); - ErrorF("\tev.window = %d\n", ev.window); - ErrorF("\tev.data.key.origCharSet = %d\n", ev.data.key.origCharSet); - ErrorF("\tev.data.key.charSet = %d\n", ev.data.key.charSet); - ErrorF("\tev.data.key.charCode = %d\n", ev.data.key.charCode); - ErrorF("\tev.data.key.keyCode = %d\n", ev.data.key.keyCode); - ErrorF("\tev.data.key.origCharCode = %d\n", ev.data.key.origCharCode); + default: + ErrorF("Unknown application defined event.\n"); + } // switch (ev.data.compound.subType) + } // if (quartz) break; + + default: + ErrorF("Unknown event caught: %d\n", ev.type); + ErrorF("\tev.type = %d\n", ev.type); + ErrorF("\tev.location.x,y = %d,%d\n", ev.location.x, ev.location.y); + ErrorF("\tev.time = %ld\n", ev.time); + ErrorF("\tev.flags = 0x%x\n", ev.flags); + ErrorF("\tev.window = %d\n", ev.window); + ErrorF("\tev.data.key.origCharSet = %d\n", ev.data.key.origCharSet); + ErrorF("\tev.data.key.charSet = %d\n", ev.data.key.charSet); + ErrorF("\tev.data.key.charCode = %d\n", ev.data.key.charCode); + ErrorF("\tev.data.key.keyCode = %d\n", ev.data.key.keyCode); + ErrorF("\tev.data.key.origCharCode = %d\n", ev.data.key.origCharCode); + break; + } + + // why isn't this handled automatically by X??? + //miPointerAbsoluteCursor( ev.location.x, ev.location.y, ev.time ); + miPointerAbsoluteCursor( ev.location.x, ev.location.y, + tv.tv_sec * 1000 + tv.tv_usec / 1000 ); } - // why isn't this handled automatically by X??? - //miPointerAbsoluteCursor( ev.location.x, ev.location.y, ev.time ); - miPointerAbsoluteCursor( ev.location.x, ev.location.y, - tv.tv_sec * 1000 + tv.tv_usec / 1000 ); miPointerUpdate(); } -static void *DarwinHIDThread(void *arg); - /* * InitInput - * Register the keyboard and mouse devices + * Register the keyboard and mouse devices */ void InitInput( int argc, char **argv ) -{ - if (serverGeneration == 1) { - int fd[2]; - - assert( pipe(fd) == 0 ); - darwinEventFD = fd[0]; - fcntl(darwinEventFD, F_SETFL, O_NONBLOCK); - pthread_create(&dfb.hidThread, NULL, DarwinHIDThread, (void *) fd[1]); - - darwinPointer = AddInputDevice(DarwinMouseProc, TRUE); - RegisterPointerDevice( darwinPointer ); - - darwinKeyboard = AddInputDevice(DarwinKeybdProc, TRUE); - RegisterKeyboardDevice( darwinKeyboard ); - } -} - -EvGlobals * evg; -mach_port_t masterPort; -mach_port_t notificationPort; -IONotificationPortRef NotificationPortRef; - -static void ClearEvent(NXEvent * ep) -{ - static NXEvent nullEvent = {NX_NULLEVENT, {0, 0 }, 0, -1, 0 }; - - *ep = nullEvent; - ep->data.compound.subType = ep->data.compound.misc.L[0] = - ep->data.compound.misc.L[1] = 0; -} - -static void *DarwinHIDThread(void *arg) -{ - int darwinEventWriteFD = (int)arg; - - for (;;) { - IOReturn kr; - NXEvent ev; - NXEQElement *oldHead; - struct { - mach_msg_header_t header; - mach_msg_trailer_t trailer; - } msg; - - kr = mach_msg((mach_msg_header_t*) &msg, MACH_RCV_MSG, 0, - sizeof(msg), notificationPort, 0, MACH_PORT_NULL); - assert(KERN_SUCCESS == kr); - - while (evg->LLEHead != evg->LLETail) { - oldHead = (NXEQElement*)&evg->lleq[evg->LLEHead]; - ev_lock(&oldHead->sema); - ev = oldHead->event; - ClearEvent(&oldHead->event); - evg->LLEHead = oldHead->next; - ev_unlock(&oldHead->sema); - - write(darwinEventWriteFD, &ev, sizeof(ev)); - } - } - return NULL; -} - -void SetupFBandHID(void) { - kern_return_t kr; - io_service_t service; - io_iterator_t iter; - io_name_t name; - vm_address_t shmem, vram; - vm_size_t shmemSize; - int i; - UInt32 numModes; - IODisplayModeInformation modeInfo; - IODisplayModeID displayMode, *allModes; - IOIndex displayDepth; - IOFramebufferInformation fbInfo; - StdFBShmem_t *cshmem; - - dfb.fbService = 0; - dfb.hidService = 0; - - // find and open the IOFrameBuffer service - kr = IOServiceGetMatchingServices( masterPort, - IOServiceMatching( IOFRAMEBUFFER_CONFORMSTO ), - &iter ); - kern_assert( kr ); - - assert(service = IOIteratorNext(iter)); - - kr = IOServiceOpen( service, mach_task_self(), - kIOFBServerConnectType, &dfb.fbService ); - if (kr != KERN_SUCCESS) - FatalError("failed to connect as window server!\nMake sure you have quit the Mac OS X window server.\n"); - - IOObjectRelease( service ); - IOObjectRelease( iter ); - - // create the slice of shared memory containing cursor state data - kr = IOFBCreateSharedCursor( dfb.fbService, kIOFBCurrentShmemVersion, - 32, 32 ); - kern_assert( kr ); - - // SET THE SCREEN PARAMETERS - // get the current screen resolution, refresh rate and depth - kr = IOFBGetCurrentDisplayModeAndDepth( dfb.fbService, &displayMode, - &displayDepth ); - kern_assert( kr ); - - // use the current screen resolution if the user - // only wants to change the refresh rate - if (darwinDesiredRefresh != -1 && darwinDesiredWidth == 0) { - kr = IOFBGetDisplayModeInformation( dfb.fbService, displayMode, - &modeInfo ); - kern_assert( kr ); - darwinDesiredWidth = modeInfo.nominalWidth; - darwinDesiredHeight = modeInfo.nominalHeight; - } - - // use the current resolution and refresh rate - // if the user doesn't have a preference - if (darwinDesiredWidth == 0) { - - // change the pixel depth if desired - if (darwinDesiredDepth != -1) { - kr = IOFBGetDisplayModeInformation( dfb.fbService, displayMode, - &modeInfo ); - kern_assert( kr ); - if (modeInfo.maxDepthIndex < darwinDesiredDepth) - FatalError("Current screen resolution does not support desired pixel depth!\n"); - - displayDepth = darwinDesiredDepth; - kr = IOFBSetDisplayModeAndDepth( dfb.fbService, displayMode, - displayDepth ); - kern_assert( kr ); - } - - // look for display mode with correct resolution and refresh rate - } else { - - // get an array of all supported display modes - kr = IOFBGetDisplayModeCount( dfb.fbService, &numModes ); - kern_assert( kr ); - assert(allModes = (IODisplayModeID *) - xalloc( numModes * sizeof(IODisplayModeID) )); - kr = IOFBGetDisplayModes( dfb.fbService, numModes, allModes ); - kern_assert( kr ); - - for (i = 0; i < numModes; i++) { - kr = IOFBGetDisplayModeInformation( dfb.fbService, allModes[i], - &modeInfo ); - kern_assert( kr ); - - if (modeInfo.flags & kDisplayModeValidFlag && - modeInfo.nominalWidth == darwinDesiredWidth && - modeInfo.nominalHeight == darwinDesiredHeight) { - - if (darwinDesiredDepth == -1) - darwinDesiredDepth = modeInfo.maxDepthIndex; - if (modeInfo.maxDepthIndex < darwinDesiredDepth) - FatalError("Desired screen resolution does not support desired pixel depth!\n"); - if ((darwinDesiredRefresh == -1 || - (darwinDesiredRefresh << 16) == modeInfo.refreshRate)) { - displayMode = allModes[i]; - displayDepth = darwinDesiredDepth; - kr = IOFBSetDisplayModeAndDepth( dfb.fbService, displayMode, - displayDepth ); - kern_assert( kr ); - break; - } - } - } + if (serverGeneration == 1) { + darwinPointer = AddInputDevice(DarwinMouseProc, TRUE); + RegisterPointerDevice( darwinPointer ); - xfree( allModes ); - if (i >= numModes) - FatalError("Desired screen resolution or refresh rate is not supported!\n"); + darwinKeyboard = AddInputDevice(DarwinKeybdProc, TRUE); + RegisterKeyboardDevice( darwinKeyboard ); } - - kr = IOFBGetPixelInformation( dfb.fbService, displayMode, displayDepth, - kIOFBSystemAperture, &dfb.pixelInfo ); - kern_assert( kr ); - -#ifdef OLD_POWERBOOK_G3 - if (dfb.pixelInfo.pixelType == kIOCLUTPixels) - dfb.pixelInfo.pixelType = kIOFixedCLUTPixels; -#endif - - kr = IOFBGetFramebufferInformationForAperture( dfb.fbService, kIOFBSystemAperture, - &fbInfo ); - kern_assert( kr ); - - kr = IOConnectMapMemory( dfb.fbService, kIOFBCursorMemory, - mach_task_self(), (vm_address_t *) &cshmem, - &shmemSize, kIOMapAnywhere ); - kern_assert( kr ); - dfb.cursorShmem = cshmem; - - kr = IOConnectMapMemory( dfb.fbService, kIOFBSystemAperture, mach_task_self(), - &vram, &shmemSize, kIOMapAnywhere ); - kern_assert( kr ); - - dfb.framebuffer = (void*)vram; - dfb.width = fbInfo.activeWidth; - dfb.height = fbInfo.activeHeight; - dfb.pitch = fbInfo.bytesPerRow; - dfb.bitsPerPixel = fbInfo.bitsPerPixel; - dfb.colorBitsPerPixel = dfb.pixelInfo.componentCount * - dfb.pixelInfo.bitsPerComponent; - - // find and open the HID System Service - kr = IOServiceGetMatchingServices( masterPort, - IOServiceMatching( kIOHIDSystemClass ), - &iter ); - kern_assert( kr ); - - assert( service = IOIteratorNext( iter ) ); - - kr = IORegistryEntryGetName( service, name ); - kern_assert( kr ); - - kr = IOServiceOpen( service, mach_task_self(), kIOHIDServerConnectType, - &dfb.hidService ); - kern_assert( kr ); - - IOObjectRelease( service ); - IOObjectRelease( iter ); - - kr = IOHIDCreateSharedMemory( dfb.hidService, kIOHIDCurrentShmemVersion ); - kern_assert( kr ); - - kr = IOHIDSetEventsEnable(dfb.hidService, TRUE); - kern_assert( kr ); - - // Inform the HID system that the framebuffer is also connected to it - kr = IOConnectAddClient( dfb.hidService, dfb.fbService ); - kern_assert( kr ); - - kr = IOHIDSetCursorEnable(dfb.hidService, TRUE); - kern_assert( kr ); - - kr = IOConnectMapMemory( dfb.hidService, kIOHIDGlobalMemory, mach_task_self(), - &shmem, &shmemSize, kIOMapAnywhere ); - kern_assert( kr ); - - evg = (EvGlobals *)(shmem + ((EvOffsets *)shmem)->evGlobalsOffset); - - assert(sizeof(EvGlobals) == evg->structSize); - - NotificationPortRef = IONotificationPortCreate( masterPort ); - - notificationPort = IONotificationPortGetMachPort(NotificationPortRef); - - kr = IOConnectSetNotificationPort( dfb.hidService, kIOHIDEventNotification, - notificationPort, 0 ); - kern_assert( kr ); - - evg->movedMask |= NX_MOUSEMOVEDMASK; } - /* * InitOutput * Initialize screenInfo for all actually accessible framebuffers. @@ -943,24 +869,28 @@ AddScreen( DarwinAddScreen, argc, argv ); } +/* + * OsVendorFataError + */ void OsVendorFatalError( void ) -{ ErrorF( " OsVendorFatalError\n" ); +{ + ErrorF( " OsVendorFatalError\n" ); } /* - * OSVendorInit - * One-time initialization of Darwin support. - * Connect to framebuffer and HID system. + * OsVendorInit + * Initialization of Darwin support. + * Initialize display and event handling. */ void OsVendorInit(void) { - kern_return_t kr; - - kr = IOMasterPort(bootstrap_port, &masterPort); - kern_assert( kr ); - DarwinPrintBanner(); - SetupFBandHID(); + + if (quartz) { + QuartzOsVendorInit(); + } else { + XFIOKitOsVendorInit(); + } } /* @@ -971,35 +901,66 @@ */ int ddxProcessArgument( int argc, char *argv[], int i ) { -#if 0 if ( !strcmp( argv[i], "-screen" ) ) { if ( i == argc-1 ) { - FatalError( "-screen must be followed by a number" ); + FatalError( "-screen must be followed by a number\n" ); } darwinScreenNumber = atoi( argv[i+1] ); ErrorF( "Attempting to use screen number %i\n", darwinScreenNumber ); - return 2; + return 2; } -#endif if ( !strcmp( argv[i], "-fakebuttons" ) ) { - fake3Buttons = TRUE; + darwinFakeButtons = TRUE; ErrorF( "Faking a three button mouse\n" ); - return 1; + return 1; } if ( !strcmp( argv[i], "-nofakebuttons" ) ) { - fake3Buttons = FALSE; + darwinFakeButtons = FALSE; ErrorF( "Not faking a three button mouse\n" ); - return 1; + return 1; + } + + if ( !strcmp( argv[i], "-keymap" ) ) { + if ( i == argc-1 ) { + FatalError( "-keymap must be followed by a filename\n" ); + } + darwinKeymapFile = DarwinFindLibraryFile(argv[i+1], "Keyboards"); + if ( !darwinKeymapFile ) + FatalError( "Could not find keymapping file %s.\n", argv[i+1] ); + ErrorF( "Using keymapping provided in %s.\n", darwinKeymapFile ); + return 2; + } + +#ifdef DARWIN_WITH_QUARTZ + if ( !strcmp( argv[i], "-quartz" ) ) { + quartz = TRUE; + ErrorF( "Running in parallel with Mac OS X Quartz window server.\n" ); +#ifdef QUARTZ_SAFETY_DELAY + ErrorF( "Quitting in %d seconds if no controller is found.\n", + QUARTZ_SAFETY_DELAY ); +#endif + return 1; + } + + // The Mac OS X front end uses this argument, which we just ignore here. + if ( !strcmp( argv[i], "-nostartx" ) ) { + return 1; + } + + // This command line arg is passed when launched from the Aqua GUI. + if ( !strncmp( argv[i], "-psn_", 5 ) ) { + return 1; } +#endif if ( !strcmp( argv[i], "-size" ) ) { if ( i >= argc-2 ) { - FatalError( "-size must be followed by two numbers" ); + FatalError( "-size must be followed by two numbers\n" ); } #ifdef OLD_POWERBOOK_G3 - ErrorF( "Ignoring unsupported -size option on old PowerBook G3\n"); + ErrorF( "Ignoring unsupported -size option on old PowerBook G3\n" ); #else darwinDesiredWidth = atoi( argv[i+1] ); darwinDesiredHeight = atoi( argv[i+2] ); @@ -1012,7 +973,7 @@ if ( !strcmp( argv[i], "-depth" ) ) { int bitDepth; if ( i == argc-1 ) { - FatalError( "-depth must be followed by a number" ); + FatalError( "-depth must be followed by a number\n" ); } #ifdef OLD_POWERBOOK_G3 ErrorF( "Ignoring unsupported -depth option on old PowerBook G3\n"); @@ -1025,7 +986,7 @@ else if (bitDepth == 24) darwinDesiredDepth = 2; else - FatalError( "Unsupported pixel depth. Use 8, 15, or 24 bits" ); + FatalError( "Unsupported pixel depth. Use 8, 15, or 24 bits\n" ); ErrorF( "Attempting to use pixel depth of %i\n", bitDepth ); #endif return 2; @@ -1033,7 +994,7 @@ if ( !strcmp( argv[i], "-refresh" ) ) { if ( i == argc-1 ) { - FatalError( "-refresh must be followed by a number" ); + FatalError( "-refresh must be followed by a number\n" ); } #ifdef OLD_POWERBOOK_G3 ErrorF( "Ignoring unsupported -refresh option on old PowerBook G3\n"); @@ -1063,15 +1024,19 @@ ErrorF("\n"); ErrorF("Device Dependent Usage:\n"); ErrorF("\n"); -#if 0 - ErrorF("-screen <0,1,...> : use this mac screen num.\n" ); -#endif ErrorF("-fakebuttons : fake a three button mouse with Command and Option keys.\n"); ErrorF("-nofakebuttons : don't fake a three button mouse.\n"); + ErrorF("-keymap : read the keymapping from a file instead of the kernel.\n"); + ErrorF("-version : show the server version.\n"); +#ifdef DARWIN_WITH_QUARTZ + ErrorF("-quartz : run in parallel with Mac OS X Quartz window server.\n"); + ErrorF("\n"); + ErrorF("IOKit specific options (ignored with -quartz):\n"); +#endif + ErrorF("-screen <0,1,...> : use this screen number.\n"); ErrorF("-size : use a screen resolution of x .\n"); ErrorF("-depth <8,15,24> : use this bit depth.\n"); ErrorF("-refresh : use a monitor refresh rate of Hz.\n"); - ErrorF("-version : show the server version\n"); ErrorF("\n"); } @@ -1079,8 +1044,15 @@ * ddxGiveUp -- * Device dependent cleanup. Called by dix before normal server death. */ -void ddxGiveUp( void ) { - ErrorF( " ddxGiveUp\n" ); +void ddxGiveUp( void ) +{ + ErrorF( "Quitting XDarwin...\n" ); + + if (quartz) { + QuartzGiveUp(); + } else { + XFIOKitGiveUp(); + } } /* @@ -1089,15 +1061,14 @@ * made to restore all original setting of the displays. Also all devices * are closed. */ -void AbortDDX( void ) { -#if TRUE - ErrorF( " AbortDDX\n" ); +void AbortDDX( void ) +{ + ErrorF( " AbortDDX\n" ); /* * This is needed for a abnormal server exit, since the normal exit stuff * MUST also be performed (i.e. the vt must be left in a defined state) */ ddxGiveUp(); -#endif } Bool DPMSSupported(void) @@ -1106,4 +1077,151 @@ void DPMSSet(void) { return; +} + + +#include "mivalidate.h" // for union _Validate used by windowstr.h +#include "windowstr.h" // for struct _Window +#include "scrnintstr.h" // for struct _Screen + +// This is copied from Xserver/hw/xfree86/common/xf86Helper.c. +// Quartz mode uses this when switching in and out of Quartz. +// Quartz or IOKit can use this when waking from sleep. +// Copyright (c) 1997-1998 by The XFree86 Project, Inc. + +/* + * xf86SetRootClip -- + * Enable or disable rendering to the screen by + * setting the root clip list and revalidating + * all of the windows + */ + +void +xf86SetRootClip (ScreenPtr pScreen, BOOL enable) +{ + WindowPtr pWin = WindowTable[pScreen->myNum]; + WindowPtr pChild; + Bool WasViewable = (Bool)(pWin->viewable); + Bool anyMarked = TRUE; + RegionPtr pOldClip = NULL, bsExposed; +#ifdef DO_SAVE_UNDERS + Bool dosave = FALSE; +#endif + WindowPtr pLayerWin; + BoxRec box; + + if (WasViewable) + { + for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) + { + (void) (*pScreen->MarkOverlappedWindows)(pChild, + pChild, + &pLayerWin); + } + (*pScreen->MarkWindow) (pWin); + anyMarked = TRUE; + if (pWin->valdata) + { + if (HasBorder (pWin)) + { + RegionPtr borderVisible; + + borderVisible = REGION_CREATE(pScreen, NullBox, 1); + REGION_SUBTRACT(pScreen, borderVisible, + &pWin->borderClip, &pWin->winSize); + pWin->valdata->before.borderVisible = borderVisible; + } + pWin->valdata->before.resized = TRUE; + } + } + + /* + * Use REGION_BREAK to avoid optimizations in ValidateTree + * that assume the root borderClip can't change well, normally + * it doesn't...) + */ + if (enable) + { + box.x1 = 0; + box.y1 = 0; + box.x2 = pScreen->width; + box.y2 = pScreen->height; + REGION_RESET(pScreen, &pWin->borderClip, &box); + REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList); + } + else + { + REGION_EMPTY(pScreen, &pWin->borderClip); + REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList); + } + + ResizeChildrenWinSize (pWin, 0, 0, 0, 0); + + if (WasViewable) + { + if (pWin->backStorage) + { + pOldClip = REGION_CREATE(pScreen, NullBox, 1); + REGION_COPY(pScreen, pOldClip, &pWin->clipList); + } + + if (pWin->firstChild) + { + anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild, + pWin->firstChild, + (WindowPtr *)NULL); + } + else + { + (*pScreen->MarkWindow) (pWin); + anyMarked = TRUE; + } + +#ifdef DO_SAVE_UNDERS + if (DO_SAVE_UNDERS(pWin)) + { + dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin); + } +#endif /* DO_SAVE_UNDERS */ + + if (anyMarked) + (*pScreen->ValidateTree)(pWin, NullWindow, VTOther); + } + + if (pWin->backStorage && + ((pWin->backingStore == Always) || WasViewable)) + { + if (!WasViewable) + pOldClip = &pWin->clipList; /* a convenient empty region */ + bsExposed = (*pScreen->TranslateBackingStore) + (pWin, 0, 0, pOldClip, + pWin->drawable.x, pWin->drawable.y); + if (WasViewable) + REGION_DESTROY(pScreen, pOldClip); + if (bsExposed) + { + RegionPtr valExposed = NullRegion; + + if (pWin->valdata) + valExposed = &pWin->valdata->after.exposed; + (*pScreen->WindowExposures) (pWin, valExposed, bsExposed); + if (valExposed) + REGION_EMPTY(pScreen, valExposed); + REGION_DESTROY(pScreen, bsExposed); + } + } + if (WasViewable) + { + if (anyMarked) + (*pScreen->HandleExposures)(pWin); +#ifdef DO_SAVE_UNDERS + if (dosave) + (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin); +#endif /* DO_SAVE_UNDERS */ + if (anyMarked && pScreen->PostValidateTree) + (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther); + } + if (pWin->realized) + WindowsRestructured (); + FlushAllOutput (); } Index: xc/programs/Xserver/hw/darwin/darwin.h diff -u xc/programs/Xserver/hw/darwin/darwin.h:1.1 xc/programs/Xserver/hw/darwin/darwin.h:1.5 --- xc/programs/Xserver/hw/darwin/darwin.h:1.1 Tue Nov 14 20:36:13 2000 +++ xc/programs/Xserver/hw/darwin/darwin.h Mon Apr 2 01:39:36 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.h,v 1.1 2000/11/15 01:36:13 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.h,v 1.5 2001/04/02 05:39:36 torrey Exp $ */ #ifndef _DARWIN_H #define _DARWIN_H @@ -25,8 +25,10 @@ } DarwinFramebufferRec; void DarwinKeyboardInit(DeviceIntPtr pDev); -Bool DarwinInitCursor(ScreenPtr pScreen); +int DarwinModifierKeycode(int modifier, int side); +void xf86SetRootClip (ScreenPtr pScreen, BOOL enable); +#undef assert #define assert(x) { if ((x) == 0) \ FatalError("assert failed on line %d of %s!\n", __LINE__, __FILE__); } #define kern_assert(x) { if ((x) != KERN_SUCCESS) \ @@ -34,5 +36,14 @@ __LINE__, __FILE__, x); } #define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0... + +// Global variables from darwin.c +extern DarwinFramebufferRec dfb; +extern int darwinEventFD; +extern Bool quartz; +extern UInt32 darwinDesiredWidth, darwinDesiredHeight; +extern IOIndex darwinDesiredDepth; +extern SInt32 darwinDesiredRefresh; +extern UInt32 darwinScreenNumber; #endif /* _DARWIN_H */ Index: xc/programs/Xserver/hw/darwin/darwinClut8.h diff -u /dev/null xc/programs/Xserver/hw/darwin/darwinClut8.h:1.1 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/darwinClut8.h Thu Apr 12 16:09:53 2001 @@ -0,0 +1 @@ +/* * Darwin default 8-bit Colormap for StaticColor */ /* $XFree86: xc/programs/Xserver/hw/darwin/darwinClut8.h,v 1.1 2001/04/12 20:09:53 torrey Exp $ */ #ifndef _DARWIN_CLUT8_ #define _DARWIN_CLUT8_ static xColorItem darwinClut8[] = { { 0, 0x0000, 0x0000, 0x0000, 0, 0 }, { 1, 0xffff, 0xffff, 0xcccc, 0, 0 }, { 2, 0xffff, 0xffff, 0x9999, 0, 0 }, { 3, 0xffff, 0xffff, 0x6666, 0, 0 }, { 4, 0xffff, 0xffff, 0x3333, 0, 0 }, { 5, 0xffff, 0xffff, 0x0000, 0, 0 }, { 6, 0xffff, 0xcccc, 0xffff, 0, 0 }, { 7, 0xffff, 0xcccc, 0xcccc, 0, 0 }, { 8, 0xffff, 0xcccc, 0x9999, 0, 0 }, { 9, 0xffff, 0xcccc, 0x6666, 0, 0 }, { 10, 0xffff, 0xcccc, 0x3333, 0, 0 }, { 11, 0xffff, 0xcccc, 0x0000, 0, 0 }, { 12, 0xffff, 0x9999, 0xffff, 0, 0 }, { 13, 0xffff, 0x9999, 0xcccc, 0, 0 }, { 14, 0xffff, 0x9999, 0x9999, 0, 0 }, { 15, 0xffff, 0x9999, 0x6666, 0, 0 }, { 16, 0xffff, 0x9999, 0x3333, 0, 0 }, { 17, 0xffff, 0x9999, 0x0000, 0, 0 }, { 18, 0xffff, 0x6666, 0xffff, 0, 0 }, { 19, 0xffff, 0x6666, 0xcccc, 0, 0 }, { 20, 0xffff, 0x6666, 0x9999, 0, 0 }, { 21, 0xffff, 0x6666, 0x6666, 0, 0 }, { 22, 0xffff, 0x6666, 0x3333, 0, 0 }, { 23, 0xffff, 0x6666, 0x0000, 0, 0 }, { 24, 0xffff, 0x3333, 0xffff, 0, 0 }, { 25, 0xffff, 0x3333, 0xcccc, 0, 0 }, { 26, 0xffff, 0x3333, 0x9999, 0, 0 }, { 27, 0xffff, 0x3333, 0x6666, 0, 0 }, { 28, 0xffff, 0x3333, 0x3333, 0, 0 }, { 29, 0xffff, 0x3333, 0x0000, 0, 0 }, { 30, 0xffff, 0x0000, 0xffff, 0, 0 }, { 31, 0xffff, 0x0000, 0xcccc, 0, 0 }, { 32, 0xffff, 0x0000, 0x9999, 0, 0 }, { 33, 0xffff, 0x0000, 0x6666, 0, 0 }, { 34, 0xffff, 0x0000, 0x3333, 0, 0 }, { 35, 0xffff, 0x0000, 0x0000, 0, 0 }, { 36, 0xcccc, 0xffff, 0xffff, 0, 0 }, { 37, 0xcccc, 0xffff, 0xcccc, 0, 0 }, { 38, 0xcccc, 0xffff, 0x9999, 0, 0 }, { 39, 0xcccc, 0xffff, 0x6666, 0, 0 }, { 40, 0xcccc, 0xffff, 0x3333, 0, 0 }, { 41, 0xcccc, 0xffff, 0x0000, 0, 0 }, { 42, 0xcccc, 0xcccc, 0xffff, 0, 0 }, { 43, 0xcccc, 0xcccc, 0xcccc, 0, 0 }, { 44, 0xcccc, 0xcccc, 0x9999, 0, 0 }, { 45, 0xcccc, 0xcccc, 0x6666, 0, 0 }, { 46, 0xcccc, 0xcccc, 0x3333, 0, 0 }, { 47, 0xcccc, 0xcccc, 0x0000, 0, 0 }, { 48, 0xcccc, 0x9999, 0xffff, 0, 0 }, { 49, 0xcccc, 0x9999, 0xcccc, 0, 0 }, { 50, 0xcccc, 0x9999, 0x9999, 0, 0 }, { 51, 0xcccc, 0x9999, 0x6666, 0, 0 }, { 52, 0xcccc, 0x9999, 0x3333, 0, 0 }, { 53, 0xcccc, 0x9999, 0x0000, 0, 0 }, { 54, 0xcccc, 0x6666, 0xffff, 0, 0 }, { 55, 0xcccc, 0x6666, 0xcccc, 0, 0 }, { 56, 0xcccc, 0x6666, 0x9999, 0, 0 }, { 57, 0xcccc, 0x6666, 0x6666, 0, 0 }, { 58, 0xcccc, 0x6666, 0x3333, 0, 0 }, { 59, 0xcccc, 0x6666, 0x0000, 0, 0 }, { 60, 0xcccc, 0x3333, 0xffff, 0, 0 }, { 61, 0xcccc, 0x3333, 0xcccc, 0, 0 }, { 62, 0xcccc, 0x3333, 0x9999, 0, 0 }, { 63, 0xcccc, 0x3333, 0x6666, 0, 0 }, { 64, 0xcccc, 0x3333, 0x3333, 0, 0 }, { 65, 0xcccc, 0x3333, 0x0000, 0, 0 }, { 66, 0xcccc, 0x0000, 0xffff, 0, 0 }, { 67, 0xcccc, 0x0000, 0xcccc, 0, 0 }, { 68, 0xcccc, 0x0000, 0x9999, 0, 0 }, { 69, 0xcccc, 0x0000, 0x6666, 0, 0 }, { 70, 0xcccc, 0x0000, 0x3333, 0, 0 }, { 71, 0xcccc, 0x0000, 0x0000, 0, 0 }, { 72, 0x9999, 0xffff, 0xffff, 0, 0 }, { 73, 0x9999, 0xffff, 0xcccc, 0, 0 }, { 74, 0x9999, 0xffff, 0x9999, 0, 0 }, { 75, 0x9999, 0xffff, 0x6666, 0, 0 }, { 76, 0x9999, 0xffff, 0x3333, 0, 0 }, { 77, 0x9999, 0xffff, 0x0000, 0, 0 }, { 78, 0x9999, 0xcccc, 0xffff, 0, 0 }, { 79, 0x9999, 0xcccc, 0xcccc, 0, 0 }, { 80, 0x9999, 0xcccc, 0x9999, 0, 0 }, { 81, 0x9999, 0xcccc, 0x6666, 0, 0 }, { 82, 0x9999, 0xcccc, 0x3333, 0, 0 }, { 83, 0x9999, 0xcccc, 0x0000, 0, 0 }, { 84, 0x9999, 0x9999, 0xffff, 0, 0 }, { 85, 0x9999, 0x9999, 0xcccc, 0, 0 }, { 86, 0x9999, 0x9999, 0x9999, 0, 0 }, { 87, 0x9999, 0x9999, 0x6666, 0, 0 }, { 88, 0x9999, 0x9999, 0x3333, 0, 0 }, { 89, 0x9999, 0x9999, 0x0000, 0, 0 }, { 90, 0x9999, 0x6666, 0xffff, 0, 0 }, { 91, 0x9999, 0x6666, 0xcccc, 0, 0 }, { 92, 0x9999, 0x6666, 0x9999, 0, 0 }, { 93, 0x9999, 0x6666, 0x6666, 0, 0 }, { 94, 0x9999, 0x6666, 0x3333, 0, 0 }, { 95, 0x9999, 0x6666, 0x0000, 0, 0 }, { 96, 0x9999, 0x3333, 0xffff, 0, 0 }, { 97, 0x9999, 0x3333, 0xcccc, 0, 0 }, { 98, 0x9999, 0x3333, 0x9999, 0, 0 }, { 99, 0x9999, 0x3333, 0x6666, 0, 0 }, { 100, 0x9999, 0x3333, 0x3333, 0, 0 }, { 101, 0x9999, 0x3333, 0x0000, 0, 0 }, { 102, 0x9999, 0x0000, 0xffff, 0, 0 }, { 103, 0x9999, 0x0000, 0xcccc, 0, 0 }, { 104, 0x9999, 0x0000, 0x9999, 0, 0 }, { 105, 0x9999, 0x0000, 0x6666, 0, 0 }, { 106, 0x9999, 0x0000, 0x3333, 0, 0 }, { 107, 0x9999, 0x0000, 0x0000, 0, 0 }, { 108, 0x6666, 0xffff, 0xffff, 0, 0 }, { 109, 0x6666, 0xffff, 0xcccc, 0, 0 }, { 110, 0x6666, 0xffff, 0x9999, 0, 0 }, { 111, 0x6666, 0xffff, 0x6666, 0, 0 }, { 112, 0x6666, 0xffff, 0x3333, 0, 0 }, { 113, 0x6666, 0xffff, 0x0000, 0, 0 }, { 114, 0x6666, 0xcccc, 0xffff, 0, 0 }, { 115, 0x6666, 0xcccc, 0xcccc, 0, 0 }, { 116, 0x6666, 0xcccc, 0x9999, 0, 0 }, { 117, 0x6666, 0xcccc, 0x6666, 0, 0 }, { 118, 0x6666, 0xcccc, 0x3333, 0, 0 }, { 119, 0x6666, 0xcccc, 0x0000, 0, 0 }, { 120, 0x6666, 0x9999, 0xffff, 0, 0 }, { 121, 0x6666, 0x9999, 0xcccc, 0, 0 }, { 122, 0x6666, 0x9999, 0x9999, 0, 0 }, { 123, 0x6666, 0x9999, 0x6666, 0, 0 }, { 124, 0x6666, 0x9999, 0x3333, 0, 0 }, { 125, 0x6666, 0x9999, 0x0000, 0, 0 }, { 126, 0x6666, 0x6666, 0xffff, 0, 0 }, { 127, 0x6666, 0x6666, 0xcccc, 0, 0 }, { 128, 0x6666, 0x6666, 0x9999, 0, 0 }, { 129, 0x6666, 0x6666, 0x6666, 0, 0 }, { 130, 0x6666, 0x6666, 0x3333, 0, 0 }, { 131, 0x6666, 0x6666, 0x0000, 0, 0 }, { 132, 0x6666, 0x3333, 0xffff, 0, 0 }, { 133, 0x6666, 0x3333, 0xcccc, 0, 0 }, { 134, 0x6666, 0x3333, 0x9999, 0, 0 }, { 135, 0x6666, 0x3333, 0x6666, 0, 0 }, { 136, 0x6666, 0x3333, 0x3333, 0, 0 }, { 137, 0x6666, 0x3333, 0x0000, 0, 0 }, { 138, 0x6666, 0x0000, 0xffff, 0, 0 }, { 139, 0x6666, 0x0000, 0xcccc, 0, 0 }, { 140, 0x6666, 0x0000, 0x9999, 0, 0 }, { 141, 0x6666, 0x0000, 0x6666, 0, 0 }, { 142, 0x6666, 0x0000, 0x3333, 0, 0 }, { 143, 0x6666, 0x0000, 0x0000, 0, 0 }, { 144, 0x3333, 0xffff, 0xffff, 0, 0 }, { 145, 0x3333, 0xffff, 0xcccc, 0, 0 }, { 146, 0x3333, 0xffff, 0x9999, 0, 0 }, { 147, 0x3333, 0xffff, 0x6666, 0, 0 }, { 148, 0x3333, 0xffff, 0x3333, 0, 0 }, { 149, 0x3333, 0xffff, 0x0000, 0, 0 }, { 150, 0x3333, 0xcccc, 0xffff, 0, 0 }, { 151, 0x3333, 0xcccc, 0xcccc, 0, 0 }, { 152, 0x3333, 0xcccc, 0x9999, 0, 0 }, { 153, 0x3333, 0xcccc, 0x6666, 0, 0 }, { 154, 0x3333, 0xcccc, 0x3333, 0, 0 }, { 155, 0x3333, 0xcccc, 0x0000, 0, 0 }, { 156, 0x3333, 0x9999, 0xffff, 0, 0 }, { 157, 0x3333, 0x9999, 0xcccc, 0, 0 }, { 158, 0x3333, 0x9999, 0x9999, 0, 0 }, { 159, 0x3333, 0x9999, 0x6666, 0, 0 }, { 160, 0x3333, 0x9999, 0x3333, 0, 0 }, { 161, 0x3333, 0x9999, 0x0000, 0, 0 }, { 162, 0x3333, 0x6666, 0xffff, 0, 0 }, { 163, 0x3333, 0x6666, 0xcccc, 0, 0 }, { 164, 0x3333, 0x6666, 0x9999, 0, 0 }, { 165, 0x3333, 0x6666, 0x6666, 0, 0 }, { 166, 0x3333, 0x6666, 0x3333, 0, 0 }, { 167, 0x3333, 0x6666, 0x0000, 0, 0 }, { 168, 0x3333, 0x3333, 0xffff, 0, 0 }, { 169, 0x3333, 0x3333, 0xcccc, 0, 0 }, { 170, 0x3333, 0x3333, 0x9999, 0, 0 }, { 171, 0x3333, 0x3333, 0x6666, 0, 0 }, { 172, 0x3333, 0x3333, 0x3333, 0, 0 }, { 173, 0x3333, 0x3333, 0x0000, 0, 0 }, { 174, 0x3333, 0x0000, 0xffff, 0, 0 }, { 175, 0x3333, 0x0000, 0xcccc, 0, 0 }, { 176, 0x3333, 0x0000, 0x9999, 0, 0 }, { 177, 0x3333, 0x0000, 0x6666, 0, 0 }, { 178, 0x3333, 0x0000, 0x3333, 0, 0 }, { 179, 0x3333, 0x0000, 0x0000, 0, 0 }, { 180, 0x0000, 0xffff, 0xffff, 0, 0 }, { 181, 0x0000, 0xffff, 0xcccc, 0, 0 }, { 182, 0x0000, 0xffff, 0x9999, 0, 0 }, { 183, 0x0000, 0xffff, 0x6666, 0, 0 }, { 184, 0x0000, 0xffff, 0x3333, 0, 0 }, { 185, 0x0000, 0xffff, 0x0000, 0, 0 }, { 186, 0x0000, 0xcccc, 0xffff, 0, 0 }, { 187, 0x0000, 0xcccc, 0xcccc, 0, 0 }, { 188, 0x0000, 0xcccc, 0x9999, 0, 0 }, { 189, 0x0000, 0xcccc, 0x6666, 0, 0 }, { 190, 0x0000, 0xcccc, 0x3333, 0, 0 }, { 191, 0x0000, 0xcccc, 0x0000, 0, 0 }, { 192, 0x0000, 0x9999, 0xffff, 0, 0 }, { 193, 0x0000, 0x9999, 0xcccc, 0, 0 }, { 194, 0x0000, 0x9999, 0x9999, 0, 0 }, { 195, 0x0000, 0x9999, 0x6666, 0, 0 }, { 196, 0x0000, 0x9999, 0x3333, 0, 0 }, { 197, 0x0000, 0x9999, 0x0000, 0, 0 }, { 198, 0x0000, 0x6666, 0xffff, 0, 0 }, { 199, 0x0000, 0x6666, 0xcccc, 0, 0 }, { 200, 0x0000, 0x6666, 0x9999, 0, 0 }, { 201, 0x0000, 0x6666, 0x6666, 0, 0 }, { 202, 0x0000, 0x6666, 0x3333, 0, 0 }, { 203, 0x0000, 0x6666, 0x0000, 0, 0 }, { 204, 0x0000, 0x3333, 0xffff, 0, 0 }, { 205, 0x0000, 0x3333, 0xcccc, 0, 0 }, { 206, 0x0000, 0x3333, 0x9999, 0, 0 }, { 207, 0x0000, 0x3333, 0x6666, 0, 0 }, { 208, 0x0000, 0x3333, 0x3333, 0, 0 }, { 209, 0x0000, 0x3333, 0x0000, 0, 0 }, { 210, 0x0000, 0x0000, 0xffff, 0, 0 }, { 211, 0x0000, 0x0000, 0xcccc, 0, 0 }, { 212, 0x0000, 0x0000, 0x9999, 0, 0 }, { 213, 0x0000, 0x0000, 0x6666, 0, 0 }, { 214, 0x0000, 0x0000, 0x3333, 0, 0 }, { 215, 0xeeee, 0x0000, 0x0000, 0, 0 }, { 216, 0xdddd, 0x0000, 0x0000, 0, 0 }, { 217, 0xbbbb, 0x0000, 0x0000, 0, 0 }, { 218, 0xaaaa, 0x0000, 0x0000, 0, 0 }, { 219, 0x8888, 0x0000, 0x0000, 0, 0 }, { 220, 0x7777, 0x0000, 0x0000, 0, 0 }, { 221, 0x5555, 0x0000, 0x0000, 0, 0 }, { 222, 0x4444, 0x0000, 0x0000, 0, 0 }, { 223, 0x2222, 0x0000, 0x0000, 0, 0 }, { 224, 0x1111, 0x0000, 0x0000, 0, 0 }, { 225, 0x0000, 0xeeee, 0x0000, 0, 0 }, { 226, 0x0000, 0xdddd, 0x0000, 0, 0 }, { 227, 0x0000, 0xbbbb, 0x0000, 0, 0 }, { 228, 0x0000, 0xaaaa, 0x0000, 0, 0 }, { 229, 0x0000, 0x8888, 0x0000, 0, 0 }, { 230, 0x0000, 0x7777, 0x0000, 0, 0 }, { 231, 0x0000, 0x5555, 0x0000, 0, 0 }, { 232, 0x0000, 0x4444, 0x0000, 0, 0 }, { 233, 0x0000, 0x2222, 0x0000, 0, 0 }, { 234, 0x0000, 0x1111, 0x0000, 0, 0 }, { 235, 0x0000, 0x0000, 0xeeee, 0, 0 }, { 236, 0x0000, 0x0000, 0xdddd, 0, 0 }, { 237, 0x0000, 0x0000, 0xbbbb, 0, 0 }, { 238, 0x0000, 0x0000, 0xaaaa, 0, 0 }, { 239, 0x0000, 0x0000, 0x8888, 0, 0 }, { 240, 0x0000, 0x0000, 0x7777, 0, 0 }, { 241, 0x0000, 0x0000, 0x5555, 0, 0 }, { 242, 0x0000, 0x0000, 0x4444, 0, 0 }, { 243, 0x0000, 0x0000, 0x2222, 0, 0 }, { 244, 0x0000, 0x0000, 0x1111, 0, 0 }, { 245, 0xeeee, 0xeeee, 0xeeee, 0, 0 }, { 246, 0xdddd, 0xdddd, 0xdddd, 0, 0 }, { 247, 0xbbbb, 0xbbbb, 0xbbbb, 0, 0 }, { 248, 0xaaaa, 0xaaaa, 0xaaaa, 0, 0 }, { 249, 0x8888, 0x8888, 0x8888, 0, 0 }, { 250, 0x7777, 0x7777, 0x7777, 0, 0 }, { 251, 0x5555, 0x5555, 0x5555, 0, 0 }, { 252, 0x4444, 0x4444, 0x4444, 0, 0 }, { 253, 0x2222, 0x2222, 0x2222, 0, 0 }, { 254, 0x1111, 0x1111, 0x1111, 0, 0 }, { 255, 0xffff, 0xffff, 0xffff, 0, 0 } }; #endif /* _DARWIN_CLUT8_ */ \ No newline at end of file Index: xc/programs/Xserver/hw/darwin/darwinCursor.c diff -u xc/programs/Xserver/hw/darwin/darwinCursor.c:1.2 xc/programs/Xserver/hw/darwin/darwinCursor.c:removed --- xc/programs/Xserver/hw/darwin/darwinCursor.c:1.2 Tue Nov 28 12:25:10 2000 +++ xc/programs/Xserver/hw/darwin/darwinCursor.c Mon Jun 4 12:40:10 2001 @@ -1,706 +0,0 @@ -/************************************************************** - * - * Cursor support for Darwin X Server - * - * Three different cursor modes are possible: - * X (0) - tracking via Darwin kernel, - * display via X machine independent - * Kernel (1) - tracking and display via Darwin kernel - * (not currently supported) - * Hardware (2) - tracking and display via hardware - * - * The X software cursor uses the Darwin software cursor - * routines in IOFramebuffer.cpp to track the cursor, but - * displays the cursor image using the X machine - * independent display cursor routines in midispcur.c. - * - * The kernel cursor uses IOFramebuffer.cpp routines to - * track and display the cursor. This gives better - * performance as the display calls don't have to cross - * the kernel boundary. Unfortunately, this mode has - * synchronization issues with the user land X server - * and isn't currently used. - * - * Hardware cursor support lets the hardware handle these - * details. - * - * Kernel and hardware cursor mode only work for cursors - * up to a certain size, currently 16x16 pixels. If a - * bigger cursor is set, we fallback to X cursor mode. - * - * HISTORY: - * 1.0 by Torrey T. Lyons, October 30, 2000 - * - **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/darwinCursor.c,v 1.2 2000/11/28 17:25:10 dawes Exp $ */ - -#include "scrnintstr.h" -#include "cursorstr.h" -#include "micmap.h" -#define NO_CFPLUGIN -#include -#include -#include "darwin.h" -#include "mipointrst.h" - -#define DUMP_DARWIN_CURSOR FALSE - -// The cursors format are documented in IOFramebufferShared.h. -#define RGBto34WithGamma(red, green, blue) \ - ( 0x000F \ - | (((red) & 0xF) << 12) \ - | (((green) & 0xF) << 8) \ - | (((blue) & 0xF) << 4) ) -#define RGBto38WithGamma(red, green, blue) \ - ( 0xFF << 24 \ - | (((red) & 0xFF) << 16) \ - | (((green) & 0xFF) << 8) \ - | (((blue) & 0xFF)) ) -#define HighBitOf32 0x80000000 - -typedef struct { - Bool canHWCursor; - short cursorMode; - RecolorCursorProcPtr RecolorCursor; - InstallColormapProcPtr InstallColormap; - QueryBestSizeProcPtr QueryBestSize; - miPointerSpriteFuncPtr spriteFuncs; - ColormapPtr pInstalledMap; -} DarwinCursorScreenRec, *DarwinCursorScreenPtr; - -extern DarwinFramebufferRec dfb; -static int darwinCursorScreenIndex = -1; -static unsigned long darwinCursorGeneration = 0; - -/* -=========================================================================== - - Pointer sprite functions - -=========================================================================== -*/ - -/* - Realizing the Darwin hardware cursor (ie. converting from the - X representation to the Darwin representation) is complicated - by the fact that we have three different potential cursor - formats to go to, one for each bit depth (8, 15, or 24). - The Darwin formats are documented in IOFramebufferShared.h. - X cursors are represented as two pieces, a source and a mask. - The mask is a bitmap indicating which parts of the cursor are - transparent and which parts are drawn. The source is a bitmap - indicating which parts of the non-transparent portion of the the - cursor should be painted in the foreground color and which should - be painted in the background color. The bitmaps are given in - 32-bit format with least significant byte and bit first. - (This is opposite PowerPC Darwin.) -*/ - -typedef struct { - unsigned char image[CURSORWIDTH*CURSORHEIGHT]; - unsigned char mask[CURSORWIDTH*CURSORHEIGHT]; -} cursorPrivRec, *cursorPrivPtr; - -/* - * DarwinRealizeCursor8 - * Convert the X cursor representation to an 8-bit depth - * format for Darwin. This function assumes the maximum cursor - * width is a multiple of 8. - */ -static Bool -DarwinRealizeCursor8( - ScreenPtr pScreen, - CursorPtr pCursor) -{ - cursorPrivPtr newCursor; - unsigned char *newSourceP, *newMaskP; - CARD32 *oldSourceP, *oldMaskP; - xColorItem fgColor, bgColor; - int index, x, y, rowPad; - int cursorWidth, cursorHeight; - ColormapPtr pmap; - - // check cursor size just to be sure - cursorWidth = pCursor->bits->width; - cursorHeight = pCursor->bits->height; - if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH) - return FALSE; - - // get cursor colors in colormap - index = pScreen->myNum; - pmap = miInstalledMaps[index]; - if (!pmap) return FALSE; - - fgColor.red = pCursor->foreRed; - fgColor.green = pCursor->foreGreen; - fgColor.blue = pCursor->foreBlue; - FakeAllocColor(pmap, &fgColor); - bgColor.red = pCursor->backRed; - bgColor.green = pCursor->backGreen; - bgColor.blue = pCursor->backBlue; - FakeAllocColor(pmap, &bgColor); - FakeFreeColor(pmap, fgColor.pixel); - FakeFreeColor(pmap, bgColor.pixel); - - // allocate memory for new cursor image - newCursor = xalloc( sizeof(cursorPrivRec) ); - if (!newCursor) - return FALSE; - memset( newCursor->image, pScreen->blackPixel, CURSORWIDTH*CURSORHEIGHT ); - memset( newCursor->mask, 0, CURSORWIDTH*CURSORHEIGHT ); - - // convert to 8-bit Darwin cursor format - oldSourceP = (CARD32 *) pCursor->bits->source; - oldMaskP = (CARD32 *) pCursor->bits->mask; - newSourceP = newCursor->image; - newMaskP = newCursor->mask; - rowPad = CURSORWIDTH - cursorWidth; - - for (y = 0; y < cursorHeight; y++) { - for (x = 0; x < cursorWidth; x++) { - if (*oldSourceP & (HighBitOf32 >> x)) - *newSourceP = fgColor.pixel; - else - *newSourceP = bgColor.pixel; - if (*oldMaskP & (HighBitOf32 >> x)) - *newMaskP = 255; - else - *newSourceP = pScreen->blackPixel; - newSourceP++; newMaskP++; - } - oldSourceP++; oldMaskP++; - newSourceP += rowPad; newMaskP += rowPad; - } - - // save the result - pCursor->devPriv[pScreen->myNum] = (pointer) newCursor; - return TRUE; -} - - -/* - * DarwinRealizeCursor15 - * Convert the X cursor representation to an 15-bit depth - * format for Darwin. - */ -static Bool -DarwinRealizeCursor15( - ScreenPtr pScreen, - CursorPtr pCursor) -{ - unsigned short *newCursor; - unsigned short fgPixel, bgPixel; - unsigned short *newSourceP; - CARD32 *oldSourceP, *oldMaskP; - int x, y, rowPad; - int cursorWidth, cursorHeight; - - // check cursor size just to be sure - cursorWidth = pCursor->bits->width; - cursorHeight = pCursor->bits->height; - if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH) - return FALSE; - - // allocate memory for new cursor image - newCursor = xalloc( CURSORWIDTH*CURSORHEIGHT*sizeof(short) ); - if (!newCursor) - return FALSE; - memset( newCursor, 0, CURSORWIDTH*CURSORHEIGHT*sizeof(short) ); - - // calculate pixel values - fgPixel = RGBto34WithGamma( pCursor->foreRed, pCursor->foreGreen, - pCursor->foreBlue ); - bgPixel = RGBto34WithGamma( pCursor->backRed, pCursor->backGreen, - pCursor->backBlue ); - - // convert to 15-bit Darwin cursor format - oldSourceP = (CARD32 *) pCursor->bits->source; - oldMaskP = (CARD32 *) pCursor->bits->mask; - newSourceP = newCursor; - rowPad = CURSORWIDTH - cursorWidth; - - for (y = 0; y < cursorHeight; y++) { - for (x = 0; x < cursorWidth; x++) { - if (*oldMaskP & (HighBitOf32 >> x)) { - if (*oldSourceP & (HighBitOf32 >> x)) - *newSourceP = fgPixel; - else - *newSourceP = bgPixel; - } else { - *newSourceP = 0; - } - newSourceP++; - } - oldSourceP++; oldMaskP++; - newSourceP += rowPad; - } - -#if DUMP_DARWIN_CURSOR - // Write out the cursor - ErrorF("Cursor: 0x%x\n", pCursor); - ErrorF("Width = %i, Height = %i, RowPad = %i\n", cursorWidth, - cursorHeight, rowPad); - for (y = 0; y < cursorHeight; y++) { - newSourceP = newCursor + y*CURSORWIDTH; - for (x = 0; x < cursorWidth; x++) { - if (*newSourceP == fgPixel) - ErrorF("x"); - else if (*newSourceP == bgPixel) - ErrorF("o"); - else - ErrorF(" "); - newSourceP++; - } - ErrorF("\n"); - } -#endif - - // save the result - pCursor->devPriv[pScreen->myNum] = (pointer) newCursor; - return TRUE; -} - - -/* - * DarwinRealizeCursor24 - * Convert the X cursor representation to an 24-bit depth - * format for Darwin. This function assumes the maximum cursor - * width is a multiple of 8. - */ -static Bool -DarwinRealizeCursor24( - ScreenPtr pScreen, - CursorPtr pCursor) -{ - unsigned int *newCursor; - unsigned int fgPixel, bgPixel; - unsigned int *newSourceP; - CARD32 *oldSourceP, *oldMaskP; - int x, y, rowPad; - int cursorWidth, cursorHeight; - - // check cursor size just to be sure - cursorWidth = pCursor->bits->width; - cursorHeight = pCursor->bits->height; - if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH) - return FALSE; - - // allocate memory for new cursor image - newCursor = xalloc( CURSORWIDTH*CURSORHEIGHT*sizeof(int) ); - if (!newCursor) - return FALSE; - memset( newCursor, 0, CURSORWIDTH*CURSORHEIGHT*sizeof(int) ); - - // calculate pixel values - fgPixel = RGBto38WithGamma( pCursor->foreRed, pCursor->foreGreen, - pCursor->foreBlue ); - bgPixel = RGBto38WithGamma( pCursor->backRed, pCursor->backGreen, - pCursor->backBlue ); - - // convert to 24-bit Darwin cursor format - oldSourceP = (CARD32 *) pCursor->bits->source; - oldMaskP = (CARD32 *) pCursor->bits->mask; - newSourceP = newCursor; - rowPad = CURSORWIDTH - cursorWidth; - - for (y = 0; y < cursorHeight; y++) { - for (x = 0; x < cursorWidth; x++) { - if (*oldMaskP & (HighBitOf32 >> x)) { - if (*oldSourceP & (HighBitOf32 >> x)) - *newSourceP = fgPixel; - else - *newSourceP = bgPixel; - } else { - *newSourceP = 0; - } - newSourceP++; - } - oldSourceP++; oldMaskP++; - newSourceP += rowPad; - } - -#if DUMP_DARWIN_CURSOR - // Write out the cursor - ErrorF("Cursor: 0x%x\n", pCursor); - ErrorF("Width = %i, Height = %i, RowPad = %i\n", cursorWidth, - cursorHeight, rowPad); - for (y = 0; y < cursorHeight; y++) { - newSourceP = newCursor + y*CURSORWIDTH; - for (x = 0; x < cursorWidth; x++) { - if (*newSourceP == fgPixel) - ErrorF("x"); - else if (*newSourceP == bgPixel) - ErrorF("o"); - else - ErrorF(" "); - newSourceP++; - } - ErrorF("\n"); - } -#endif - - // save the result - pCursor->devPriv[pScreen->myNum] = (pointer) newCursor; - return TRUE; -} - - -/* - * DarwinRealizeCursor - * - */ -static Bool -DarwinRealizeCursor( - ScreenPtr pScreen, - CursorPtr pCursor) -{ - Bool result; - DarwinCursorScreenPtr ScreenPriv = (DarwinCursorScreenPtr) - pScreen->devPrivates[darwinCursorScreenIndex].ptr; - - if ((pCursor->bits->height > CURSORHEIGHT) || - (pCursor->bits->width > CURSORWIDTH) || - // FIXME: this condition is not needed after kernel cursor works - !ScreenPriv->canHWCursor) { - result = (*ScreenPriv->spriteFuncs->RealizeCursor)(pScreen, pCursor); - } else if (dfb.bitsPerPixel == 8) { - result = DarwinRealizeCursor8(pScreen, pCursor); - } else if (dfb.bitsPerPixel == 16) { - result = DarwinRealizeCursor15(pScreen, pCursor); - } else { - result = DarwinRealizeCursor24(pScreen, pCursor); - } - - return result; -} - - -/* - * DarwinUnrealizeCursor - * - */ -static Bool -DarwinUnrealizeCursor( - ScreenPtr pScreen, - CursorPtr pCursor) -{ - Bool result; - DarwinCursorScreenPtr ScreenPriv = (DarwinCursorScreenPtr) - pScreen->devPrivates[darwinCursorScreenIndex].ptr; - - if ((pCursor->bits->height > CURSORHEIGHT) || - (pCursor->bits->width > CURSORWIDTH) || - // FIXME: this condition is not needed after kernel cursor works - !ScreenPriv->canHWCursor) { - result = (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pScreen, pCursor); - } else { - xfree( pCursor->devPriv[pScreen->myNum] ); - result = TRUE; - } - - return result; -} - - -/* - * DarwinSetCursor - * Set the cursor sprite and position - * Use hardware cursor if possible - */ -static void -DarwinSetCursor( - ScreenPtr pScreen, - CursorPtr pCursor, - int x, - int y) -{ - kern_return_t kr; - StdFBShmem_t *cshmem = dfb.cursorShmem; - DarwinCursorScreenPtr ScreenPriv = (DarwinCursorScreenPtr) - pScreen->devPrivates[darwinCursorScreenIndex].ptr; - - // are we supposed to remove the cursor? - if (!pCursor) { - if (ScreenPriv->cursorMode == 0) - (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); - else { - if (!cshmem->cursorShow) { - cshmem->cursorShow++; - if (cshmem->hardwareCursorActive) { - kr = IOFBSetCursorVisible(dfb.fbService, FALSE); - kern_assert( kr ); - } - } - } - return; - } - - // can we use the kernel or hardware cursor? - if ((pCursor->bits->height <= CURSORHEIGHT) && - (pCursor->bits->width <= CURSORWIDTH) && - // FIXME: condition not needed when kernel cursor works - ScreenPriv->canHWCursor) { - - if (ScreenPriv->cursorMode == 0) // remove the X cursor - (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); - ScreenPriv->cursorMode = 1; // kernel cursor - - // change the cursor image in shared memory - if (dfb.bitsPerPixel == 8) { - cursorPrivPtr newCursor = - (cursorPrivPtr) pCursor->devPriv[pScreen->myNum]; - memcpy(cshmem->cursor.bw8.image[0], newCursor->image, - CURSORWIDTH*CURSORHEIGHT); - memcpy(cshmem->cursor.bw8.mask[0], newCursor->mask, - CURSORWIDTH*CURSORHEIGHT); - } else if (dfb.bitsPerPixel == 16) { - unsigned short *newCursor = - (unsigned short *) pCursor->devPriv[pScreen->myNum]; - memcpy(cshmem->cursor.rgb.image[0], newCursor, - 2*CURSORWIDTH*CURSORHEIGHT); - } else { - unsigned int *newCursor = - (unsigned int *) pCursor->devPriv[pScreen->myNum]; - memcpy(cshmem->cursor.rgb24.image[0], newCursor, - 4*CURSORWIDTH*CURSORHEIGHT); - } - - // FIXME: We always use a full size cursor, even if the image - // is smaller because I couldn't get the padding to come out - // right otherwise. - cshmem->cursorSize[0].width = CURSORWIDTH; - cshmem->cursorSize[0].height = CURSORHEIGHT; - cshmem->hotSpot[0].x = pCursor->bits->xhot; - cshmem->hotSpot[0].y = pCursor->bits->yhot; - - // try to use a hardware cursor - if (ScreenPriv->canHWCursor) { - kr = IOFBSetNewCursor(dfb.fbService, 0, 0, 0); - // FIXME: this is a fatal error without the kernel cursor - kern_assert( kr ); -#if 0 - if (kr != KERN_SUCCESS) { - ErrorF("Could not set new cursor with kernel return 0x%x.\n", kr); - ScreenPriv->canHWCursor = FALSE; - } -#endif - } - - // make the new cursor visible - if (cshmem->cursorShow) - cshmem->cursorShow--; - - if (!cshmem->cursorShow && ScreenPriv->canHWCursor) { - kr = IOFBSetCursorVisible(dfb.fbService, TRUE); - // FIXME: this is a fatal error without the kernel cursor - kern_assert( kr ); -#if 0 - if (kr != KERN_SUCCESS) { - ErrorF("Couldn't set hardware cursor visible with kernel return 0x%x.\n", kr); - ScreenPriv->canHWCursor = FALSE; - } else -#endif - ScreenPriv->cursorMode = 2; // hardware cursor - } - - return; - } - - // otherwise we use a software cursor - if (ScreenPriv->cursorMode) { - /* remove the kernel or hardware cursor */ - DarwinSetCursor(pScreen, 0, x, y); - } - - ScreenPriv->cursorMode = 0; - (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, pCursor, x, y); -} - - -/* - * DarwinMoveCursor - * Move the cursor. This is a noop for a kernel or hardware cursor. - */ -static void -DarwinMoveCursor( - ScreenPtr pScreen, - int x, - int y) -{ - DarwinCursorScreenPtr ScreenPriv = (DarwinCursorScreenPtr) - pScreen->devPrivates[darwinCursorScreenIndex].ptr; - - // only the X cursor needs to be explicitly moved - if (!ScreenPriv->cursorMode) - (*ScreenPriv->spriteFuncs->MoveCursor)(pScreen, x, y); -} - -static miPointerSpriteFuncRec darwinSpriteFuncsRec = { - DarwinRealizeCursor, - DarwinUnrealizeCursor, - DarwinSetCursor, - DarwinMoveCursor -}; - - -/* -=========================================================================== - - Pointer screen functions - -=========================================================================== -*/ - -/* - * DarwinCursorOffScreen - */ -static Bool DarwinCursorOffScreen(ScreenPtr *pScreen, int *x, int *y) -{ return FALSE; -} - - -/* - * DarwinCrossScreen - */ -static void DarwinCrossScreen(ScreenPtr pScreen, Bool entering) -{ return; -} - - -/* - * DarwinWarpCursor - * Change the cursor position without generating an event or motion history - */ -static void -DarwinWarpCursor( - ScreenPtr pScreen, - int x, - int y) -{ - kern_return_t kr; - - kr = IOHIDSetMouseLocation( dfb.hidService, x, y ); - if (kr != KERN_SUCCESS) { - ErrorF("Could not set cursor position with kernel return 0x%x.\n", kr); - } - miPointerWarpCursor(pScreen, x, y); -} - -static miPointerScreenFuncRec darwinScreenFuncsRec = { - DarwinCursorOffScreen, - DarwinCrossScreen, - DarwinWarpCursor, -}; - - -/* -=========================================================================== - - Other screen functions - -=========================================================================== -*/ - -/* - * DarwinCursorQueryBestSize - * Handle queries for best cursor size - */ -static void -DarwinCursorQueryBestSize( - int class, - unsigned short *width, - unsigned short *height, - ScreenPtr pScreen) -{ - DarwinCursorScreenPtr ScreenPriv = (DarwinCursorScreenPtr) - pScreen->devPrivates[darwinCursorScreenIndex].ptr; - - if (class == CursorShape) { - *width = CURSORWIDTH; - *height = CURSORHEIGHT; - } else - (*ScreenPriv->QueryBestSize)(class, width, height, pScreen); -} - - -/* - * DarwinInitCursor - * Initialize cursor support - */ -Bool -DarwinInitCursor( - ScreenPtr pScreen) -{ - DarwinCursorScreenPtr ScreenPriv; - miPointerScreenPtr PointPriv; - kern_return_t kr; - - // start with no cursor displayed - if (!dfb.cursorShmem->cursorShow++) { - if (dfb.cursorShmem->hardwareCursorActive) { - kr = IOFBSetCursorVisible(dfb.fbService, FALSE); - kern_assert( kr ); - } - } - - // initialize software cursor handling (always needed as backup) - if (!miDCInitialize(pScreen, &darwinScreenFuncsRec)) { - return FALSE; - } - - // allocate private storage for this screen's hardware cursor info - if (darwinCursorGeneration != serverGeneration) { - if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - darwinCursorGeneration = serverGeneration; - } - - ScreenPriv = xcalloc( 1, sizeof(DarwinCursorScreenRec) ); - if (!ScreenPriv) return FALSE; - - pScreen->devPrivates[darwinCursorScreenIndex].ptr = (pointer) ScreenPriv; - - // check if a hardware cursor is supported - if (!dfb.cursorShmem->hardwareCursorCapable) { - ScreenPriv->canHWCursor = FALSE; - ErrorF("Hardware cursor not supported.\n"); - } else { - // we need to make sure that the hardware cursor really works - ScreenPriv->canHWCursor = TRUE; - kr = IOFBSetNewCursor(dfb.fbService, 0, 0, 0); - if (kr != KERN_SUCCESS) { - ErrorF("Could not set hardware cursor with kernel return 0x%x.\n", kr); - ScreenPriv->canHWCursor = FALSE; - } - kr = IOFBSetCursorVisible(dfb.fbService, TRUE); - if (kr != KERN_SUCCESS) { - ErrorF("Couldn't set hardware cursor visible with kernel return 0x%x.\n", kr); - ScreenPriv->canHWCursor = FALSE; - } - IOFBSetCursorVisible(dfb.fbService, FALSE); - } - - ScreenPriv->cursorMode = 0; - ScreenPriv->pInstalledMap = NULL; - - // override some screen procedures - ScreenPriv->QueryBestSize = pScreen->QueryBestSize; - pScreen->QueryBestSize = DarwinCursorQueryBestSize; -// ScreenPriv->ConstrainCursor = pScreen->ConstrainCursor; -// pScreen->ConstrainCursor = DarwinConstrainCursor; - - // initialize hardware cursor handling - PointPriv = (miPointerScreenPtr) - pScreen->devPrivates[miPointerScreenIndex].ptr; - - ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; - PointPriv->spriteFuncs = &darwinSpriteFuncsRec; - - /* Other routines that might be overridden */ -/* - CursorLimitsProcPtr CursorLimits; - RecolorCursorProcPtr RecolorCursor; -*/ - - return TRUE; -} Index: xc/programs/Xserver/hw/darwin/darwinKeyboard.c diff -u xc/programs/Xserver/hw/darwin/darwinKeyboard.c:1.1 xc/programs/Xserver/hw/darwin/darwinKeyboard.c:1.5 --- xc/programs/Xserver/hw/darwin/darwinKeyboard.c:1.1 Tue Nov 14 20:36:14 2000 +++ xc/programs/Xserver/hw/darwin/darwinKeyboard.c Tue Apr 24 22:23:47 2001 @@ -36,7 +36,7 @@ // //============================================================================= -/* $XFree86: xc/programs/Xserver/hw/darwin/darwinKeyboard.c,v 1.1 2000/11/15 01:36:14 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/darwinKeyboard.c,v 1.5 2001/04/25 02:23:47 torrey Exp $ */ /* =========================================================================== @@ -61,9 +61,13 @@ #include #include +#include +#include +#include #include "darwin.h" -extern DarwinFramebufferRec dfb; -extern unsigned char darwinKeyCommandL, darwinKeyOptionL; +#include "xfIOKit.h" +#include "bundle/quartzAudio.h" +#include "bundle/quartzShared.h" #define XK_TECHNICAL // needed to get XK_Escape #include "keysym.h" @@ -191,16 +195,15 @@ }; int const NUM_KEYPAD = sizeof(normal_to_keypad) / sizeof(normal_to_keypad[0]); -static void DarwinBell( int loud, DeviceIntPtr pDevice, pointer ctrl, int fbclass) { - // FIXME -} - static void DarwinChangeKeyboardControl( DeviceIntPtr device, KeybdCtrl *ctrl ) { // keyclick, bell volume / pitch, autorepead, LED's } static CARD8 modMap[MAP_LENGTH]; static KeySym map[256 * GLYPHS_PER_KEY]; +static unsigned char modifierKeycodes[NX_NUMMODIFIERS][2]; +static FILE *fref = NULL; +static char *inBuffer = NULL; //----------------------------------------------------------------------------- // Data Stream Object @@ -308,6 +311,102 @@ } /* + * DarwinReadKeymapFile + * Read the appropriate keymapping from a keymapping file. + */ +Bool DarwinReadKeymapFile( + NXKeyMapping *keyMap ) +{ + struct stat st; + NXEventSystemDevice info[20]; + int interface = 0, handler_id = 0; + int map_interface, map_handler_id, map_size = 0; + unsigned int i, size; + Boolean hasMatch = FALSE; + union km_tag { + int *intP; + char *charP; + } km; + + fref = fopen( darwinKeymapFile, "rb" ); + if (fref == 0) { + ErrorF("Unable to open keymapping file %s.\n", darwinKeymapFile); + return FALSE; + } + assert( !fstat(fileno(fref), &st) ); + + // check to make sure we don't crash later + if (st.st_size <= 16*sizeof(int)) { + ErrorF("Invalid keymapping file.\n"); + return FALSE; + } + + inBuffer = (char*) xalloc( st.st_size ); + assert( fread(inBuffer, st.st_size, 1, fref) ); + + // find the keyboard interface and handler id + size = sizeof( info ) / sizeof( int ); + if (!NXEventSystemInfo( dfb.hidParam, NX_EVS_DEVICE_INFO, + (NXEventSystemInfoType) info, &size )) { + ErrorF("Error reading event status driver info.\n"); + return FALSE; + } + size = size * sizeof( int ) / sizeof( info[0] ); + for( i = 0; i < size; i++) { + if (info[i].dev_type == NX_EVS_DEVICE_TYPE_KEYBOARD) { + interface = info[i].interface; + handler_id = info[i].id; + break; + } + } + + // Find the appropriate keymapping: + // The first time through we try to match both interface and handler_id. + // If we can't match both, we take the first match for interface. + if (strncmp( inBuffer, "KYM1", 4 ) == 0) { + Bool hasInterface = FALSE; + int *bufferEnd = (int *) (inBuffer + st.st_size); + do { + km.charP = inBuffer; + km.intP++; + while (km.intP+3 < bufferEnd) { + map_interface = *(km.intP++); + map_handler_id = *(km.intP++); + map_size = *(km.intP++); + if (map_interface == interface) { + if (map_handler_id == handler_id || hasInterface) { + hasMatch = TRUE; + break; + } else { + hasInterface = TRUE; + } + } + km.charP += map_size; + } + if (hasMatch) break; + } while (hasInterface); + } else if (strncmp( inBuffer, "KYMP", 4 ) == 0) { + ErrorF("This old style keymapping file is intended for use with the original NeXT keyboards.\n"); + return FALSE; + } else { + ErrorF("The keymapping file has a bad magic number.\n"); + return FALSE; + } + + if (hasMatch) { + // fill in NXKeyMapping structure + keyMap->size = map_size; + keyMap->mapping = (char*) xalloc(map_size); + memcpy(keyMap->mapping, km.charP, map_size); + } else { + ErrorF("Keymapping file did not contain appropriate keyboard interface.\n"); + return FALSE; + } + + return TRUE; +} + +/* * DarwinKeyboardInit * Get the Darwin keyboard map and compute an equivalent * X keyboard map and modifier map. Set the new keyboard @@ -318,24 +417,43 @@ { KeySym *k; int i; - short numMods, numKeys, numPadKeys = 0; + short numMods, numKeys, numPadKeys = 0; KeySymsRec keySyms; NXKeyMapping keyMap; - DataStream *keyMapStream; + DataStream *keyMapStream; unsigned char const *numPadStart = 0; + BellProcPtr bellProc; + Bool haveKeymap = FALSE; memset( modMap, NoSymbol, sizeof( modMap ) ); memset( map, 0, sizeof( map ) ); + for (i = 0; i < NX_NUMMODIFIERS; i++) { + modifierKeycodes[i][0] = modifierKeycodes[i][1] = 0; + } // Open a shared connection to the HID System. // Note that the Event Status Driver is really just a wrapper // for a kIOHIDParamConnectType connection. assert( dfb.hidParam = NXOpenEventStatus() ); + + if (darwinKeymapFile) { + haveKeymap = DarwinReadKeymapFile(&keyMap); + if (fref) + fclose(fref); + if (inBuffer) + xfree(inBuffer); + if (!haveKeymap) { + ErrorF("Reverting to kernel keymapping.\n"); + } + } + + if (!haveKeymap) { + // get the Darwin keyboard map + keyMap.size = NXKeyMappingLength( dfb.hidParam ); + keyMap.mapping = (char*) xalloc( keyMap.size ); + assert( NXGetKeyMapping( dfb.hidParam, &keyMap )); + } - // get the Darwin keyboard map - keyMap.size = NXKeyMappingLength( dfb.hidParam ); - keyMap.mapping = (char*) xalloc( keyMap.size ); - assert( NXGetKeyMapping( dfb.hidParam, &keyMap )); keyMapStream = new_data_stream( (unsigned char const*)keyMap.mapping, keyMap.size ); @@ -347,9 +465,10 @@ // Compute the modifier map and // insert X modifier KeySyms into keyboard map. + // Store modifier keycodes in modifierKeycodes. numMods = get_number(keyMapStream); while (numMods-- > 0) { - int left = 1; // first keycode is left + int left = 1; // first keycode is left short const charCode = get_number(keyMapStream); short numKeyCodes = get_number(keyMapStream); if (charCode == NX_MODIFIERKEY_NUMERICPAD) { @@ -361,32 +480,32 @@ if (charCode == NX_MODIFIERKEY_ALPHALOCK) { modMap[keyCode + MIN_KEYCODE] = LockMask; map[keyCode * GLYPHS_PER_KEY] = XK_Caps_Lock; + modifierKeycodes[charCode][1-left] = keyCode + MIN_KEYCODE; } else if (charCode == NX_MODIFIERKEY_SHIFT) { modMap[keyCode + MIN_KEYCODE] = ShiftMask; map[keyCode * GLYPHS_PER_KEY] = (left ? XK_Shift_L : XK_Shift_R); + modifierKeycodes[charCode][1-left] = keyCode + MIN_KEYCODE; } else if (charCode == NX_MODIFIERKEY_CONTROL) { modMap[keyCode + MIN_KEYCODE] = ControlMask; map[keyCode * GLYPHS_PER_KEY] = (left ? XK_Control_L : XK_Control_R); + modifierKeycodes[charCode][1-left] = keyCode + MIN_KEYCODE; } else if (charCode == NX_MODIFIERKEY_ALTERNATE) { modMap[keyCode + MIN_KEYCODE] = AltMask; - if (left) { - map[keyCode * GLYPHS_PER_KEY] = XK_Alt_L; - darwinKeyOptionL = keyCode + MIN_KEYCODE; - } else - map[keyCode * GLYPHS_PER_KEY] = XK_Alt_R; + map[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Alt_L : XK_Alt_R); + modifierKeycodes[charCode][1-left] = keyCode + MIN_KEYCODE; } else if (charCode == NX_MODIFIERKEY_COMMAND) { modMap[keyCode + MIN_KEYCODE] = MetaMask; - if (left) { - map[keyCode * GLYPHS_PER_KEY] = XK_Meta_L; - darwinKeyCommandL = keyCode + MIN_KEYCODE; - } else - map[keyCode * GLYPHS_PER_KEY] = XK_Meta_R; + map[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Meta_L : XK_Meta_R); + modifierKeycodes[charCode][1-left] = keyCode + MIN_KEYCODE; } else if (charCode == NX_MODIFIERKEY_NUMERICPAD) { continue; } else if (charCode == NX_MODIFIERKEY_HELP) { map[keyCode * GLYPHS_PER_KEY] = XK_Help; + modifierKeycodes[charCode][1-left] = keyCode + MIN_KEYCODE; } else { break; } @@ -486,9 +605,24 @@ keySyms.minKeyCode = MIN_KEYCODE; keySyms.maxKeyCode = MAX_KEYCODE; + if (quartz) + bellProc = QuartzBell; + else + bellProc = XFIOKitBell; + assert( InitKeyboardDeviceStruct( (DevicePtr)pDev, &keySyms, modMap, - DarwinBell, + bellProc, DarwinChangeKeyboardControl )); +} + +/* + * DarwinModifierKeycode + * Return the keycode + MIN_KEYCODE for an NX_MODIFIERKEY_* modifier. + * side = 0 for left or 1 for right. + */ +int DarwinModifierKeycode(int modifier, int side) +{ + return modifierKeycodes[modifier][side]; } /* Index: xc/programs/Xserver/hw/darwin/xfIOKit.c diff -u /dev/null xc/programs/Xserver/hw/darwin/xfIOKit.c:1.8 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/xfIOKit.c Mon Apr 30 12:26:01 2001 @@ -0,0 +1,460 @@ +/************************************************************** + * + * IOKit support for the Darwin X Server + * + * HISTORY: + * Original port to Mac OS X Server by John Carmack + * Port to Darwin 1.0 by Dave Zarzycki + * Significantly rewritten for XFree86 4.0.1 by Torrey Lyons + * + **************************************************************/ +/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKit.c,v 1.8 2001/04/30 16:26:01 torrey Exp $ */ + +#define NDEBUG 1 + +#include "X.h" +#include "Xproto.h" +#include "os.h" +#include "servermd.h" +#include "inputstr.h" +#include "scrnintstr.h" +#include "mi.h" +#include "mibstore.h" +#include "mipointer.h" +#include "micmap.h" + +#include +#include +#include +#include +#include + +#include + +#define NO_CFPLUGIN +#include +#include +#include +#include + +// Define this to work around bugs in the display drivers for +// older PowerBook G3's. If the X server starts without this +// #define, you don't need it. +#undef OLD_POWERBOOK_G3 + +#include "darwin.h" +#include "xfIOKit.h" + +static EvGlobals * evg; +static mach_port_t masterPort; +static mach_port_t notificationPort; +static IONotificationPortRef NotificationPortRef; +static mach_port_t pmNotificationPort; + + +/* + * XFIOKitStoreColors + * This is a callback from X to change the hardware colormap + * when using PsuedoColor. + */ +static void XFIOKitStoreColors( + ColormapPtr pmap, + int numEntries, + xColorItem *pdefs) +{ + kern_return_t kr; + int i; + IOColorEntry *newColors; + + assert( newColors = (IOColorEntry *) + xalloc( numEntries*sizeof(IOColorEntry) )); + + // Convert xColorItem values to IOColorEntry + // assume the colormap is PsuedoColor + // as we do not support DirectColor + for (i = 0; i < numEntries; i++) { + newColors[i].index = pdefs[i].pixel; + newColors[i].red = pdefs[i].red; + newColors[i].green = pdefs[i].green; + newColors[i].blue = pdefs[i].blue; + } + + kr = IOFBSetCLUT( dfb.fbService, 0, numEntries, + kSetCLUTByValue, newColors ); + kern_assert( kr ); + + xfree( newColors ); +} + +/* + * XFIOKitBell + * FIXME + */ +void XFIOKitBell( + int loud, + DeviceIntPtr pDevice, + pointer ctrl, + int fbclass) +{ +} + +/* + * XFIOKitGiveUp + * FIXME: Crashes kernel if used + */ +void XFIOKitGiveUp( void ) +{ +#if 1 + // we must close the HID System first + // because it is a client of the framebuffer + NXCloseEventStatus( dfb.hidParam ); + IOServiceClose( dfb.hidService ); + IOServiceClose( dfb.fbService ); +#endif +} + +/* + * ClearEvent + * Clear an event from the HID System event queue + */ +static void ClearEvent(NXEvent * ep) +{ + static NXEvent nullEvent = {NX_NULLEVENT, {0, 0 }, 0, -1, 0 }; + + *ep = nullEvent; + ep->data.compound.subType = ep->data.compound.misc.L[0] = + ep->data.compound.misc.L[1] = 0; +} + +/* + * XFIOKitHIDThread + * Read the HID System event queue and pass to pipe + */ +static void *XFIOKitHIDThread(void *arg) +{ + int iokitEventWriteFD = (int)arg; + + for (;;) { + NXEvent ev; + NXEQElement *oldHead; + mach_msg_return_t kr; + mach_msg_empty_rcv_t msg; + + kr = mach_msg((mach_msg_header_t*) &msg, MACH_RCV_MSG, 0, + sizeof(msg), notificationPort, 0, MACH_PORT_NULL); + kern_assert(kr); + + while (evg->LLEHead != evg->LLETail) { + oldHead = (NXEQElement*)&evg->lleq[evg->LLEHead]; + ev_lock(&oldHead->sema); + ev = oldHead->event; + ClearEvent(&oldHead->event); + evg->LLEHead = oldHead->next; + ev_unlock(&oldHead->sema); + + write(iokitEventWriteFD, &ev, sizeof(ev)); + } + } + return NULL; +} + +/* + * XFIOKitPMThread + * Handle power state notifications + */ +static void *XFIOKitPMThread(void *arg) +{ + ScreenPtr pScreen = (ScreenPtr)arg; + + for (;;) { + mach_msg_return_t kr; + mach_msg_empty_rcv_t msg; + + kr = mach_msg((mach_msg_header_t*) &msg, MACH_RCV_MSG, 0, + sizeof(msg), pmNotificationPort, 0, MACH_PORT_NULL); + kern_assert(kr); + + // display is powering down + if (msg.header.msgh_id == 0) { + IOFBAcknowledgePM( dfb.fbService ); + xf86SetRootClip(pScreen, FALSE); + } + // display just woke up + else if (msg.header.msgh_id == 1) { + xf86SetRootClip(pScreen, TRUE); + } + } + return NULL; +} + +static void SetupFBandHID(void) +{ + kern_return_t kr; + io_service_t service; + io_iterator_t iter; + io_name_t name; + vm_address_t shmem, vram; + vm_size_t shmemSize; + int i; + UInt32 numModes; + IODisplayModeInformation modeInfo; + IODisplayModeID displayMode, *allModes; + IOIndex displayDepth; + IOFramebufferInformation fbInfo; + StdFBShmem_t *cshmem; + + dfb.fbService = 0; + dfb.hidService = 0; + + // find and open the IOFrameBuffer service + kr = IOServiceGetMatchingServices( masterPort, + IOServiceMatching( IOFRAMEBUFFER_CONFORMSTO ), + &iter ); + kern_assert( kr ); + + // find the requested screen + assert(service = IOIteratorNext(iter)); + for (i = 0; i < darwinScreenNumber; i++) { + IOObjectRelease( service ); + service = IOIteratorNext(iter); + if (service == 0) + FatalError("Could not find the requested screen number %i.\n", + darwinScreenNumber); + } + + kr = IOServiceOpen( service, mach_task_self(), + kIOFBServerConnectType, &dfb.fbService ); + if (kr != KERN_SUCCESS) +#ifdef DARWIN_WITH_QUARTZ + FatalError("Failed to connect as window server!\nQuit the Mac OS X window server or use the -quartz option.\n"); +#else + FatalError("Failed to connect as window server!\nMake sure you have quit the Mac OS X window server.\n"); +#endif + + IOObjectRelease( service ); + IOObjectRelease( iter ); + + // create the slice of shared memory containing cursor state data + kr = IOFBCreateSharedCursor( dfb.fbService, kIOFBCurrentShmemVersion, + 32, 32 ); + kern_assert( kr ); + + // Register for power management events for the framebuffer's device + kr = IOCreateReceivePort(kOSNotificationMessageID, &pmNotificationPort); + kern_assert(kr); + kr = IOConnectSetNotificationPort( dfb.fbService, 0, + pmNotificationPort, 0 ); + if (kr != KERN_SUCCESS) { + ErrorF("Power management registration failed.\n"); + } + + // SET THE SCREEN PARAMETERS + // get the current screen resolution, refresh rate and depth + kr = IOFBGetCurrentDisplayModeAndDepth( dfb.fbService, &displayMode, + &displayDepth ); + kern_assert( kr ); + + // use the current screen resolution if the user + // only wants to change the refresh rate + if (darwinDesiredRefresh != -1 && darwinDesiredWidth == 0) { + kr = IOFBGetDisplayModeInformation( dfb.fbService, displayMode, + &modeInfo ); + kern_assert( kr ); + darwinDesiredWidth = modeInfo.nominalWidth; + darwinDesiredHeight = modeInfo.nominalHeight; + } + + // use the current resolution and refresh rate + // if the user doesn't have a preference + if (darwinDesiredWidth == 0) { + + // change the pixel depth if desired + if (darwinDesiredDepth != -1) { + kr = IOFBGetDisplayModeInformation( dfb.fbService, displayMode, + &modeInfo ); + kern_assert( kr ); + if (modeInfo.maxDepthIndex < darwinDesiredDepth) + FatalError("Current screen resolution does not support desired pixel depth!\n"); + + displayDepth = darwinDesiredDepth; + kr = IOFBSetDisplayModeAndDepth( dfb.fbService, displayMode, + displayDepth ); + kern_assert( kr ); + } + + // look for display mode with correct resolution and refresh rate + } else { + + // get an array of all supported display modes + kr = IOFBGetDisplayModeCount( dfb.fbService, &numModes ); + kern_assert( kr ); + assert(allModes = (IODisplayModeID *) + xalloc( numModes * sizeof(IODisplayModeID) )); + kr = IOFBGetDisplayModes( dfb.fbService, numModes, allModes ); + kern_assert( kr ); + + for (i = 0; i < numModes; i++) { + kr = IOFBGetDisplayModeInformation( dfb.fbService, allModes[i], + &modeInfo ); + kern_assert( kr ); + + if (modeInfo.flags & kDisplayModeValidFlag && + modeInfo.nominalWidth == darwinDesiredWidth && + modeInfo.nominalHeight == darwinDesiredHeight) { + + if (darwinDesiredDepth == -1) + darwinDesiredDepth = modeInfo.maxDepthIndex; + if (modeInfo.maxDepthIndex < darwinDesiredDepth) + FatalError("Desired screen resolution does not support desired pixel depth!\n"); + if ((darwinDesiredRefresh == -1 || + (darwinDesiredRefresh << 16) == modeInfo.refreshRate)) { + displayMode = allModes[i]; + displayDepth = darwinDesiredDepth; + kr = IOFBSetDisplayModeAndDepth( dfb.fbService, displayMode, + displayDepth ); + kern_assert( kr ); + break; + } + } + } + + xfree( allModes ); + if (i >= numModes) + FatalError("Desired screen resolution or refresh rate is not supported!\n"); + } + + kr = IOFBGetPixelInformation( dfb.fbService, displayMode, displayDepth, + kIOFBSystemAperture, &dfb.pixelInfo ); + kern_assert( kr ); + +#ifdef __i386__ + /* x86 in 8bit mode currently needs fixed color map... */ + if( dfb.pixelInfo.bitsPerComponent == 8 ) { + dfb.pixelInfo.pixelType = kIOFixedCLUTPixels; + } +#endif + +#ifdef OLD_POWERBOOK_G3 + if (dfb.pixelInfo.pixelType == kIOCLUTPixels) + dfb.pixelInfo.pixelType = kIOFixedCLUTPixels; +#endif + + kr = IOFBGetFramebufferInformationForAperture( dfb.fbService, kIOFBSystemAperture, + &fbInfo ); + kern_assert( kr ); + + kr = IOConnectMapMemory( dfb.fbService, kIOFBCursorMemory, + mach_task_self(), (vm_address_t *) &cshmem, + &shmemSize, kIOMapAnywhere ); + kern_assert( kr ); + dfb.cursorShmem = cshmem; + + kr = IOConnectMapMemory( dfb.fbService, kIOFBSystemAperture, mach_task_self(), + &vram, &shmemSize, kIOMapAnywhere ); + kern_assert( kr ); + + dfb.framebuffer = (void*)vram; + dfb.width = fbInfo.activeWidth; + dfb.height = fbInfo.activeHeight; + dfb.pitch = fbInfo.bytesPerRow; + dfb.bitsPerPixel = fbInfo.bitsPerPixel; + dfb.colorBitsPerPixel = dfb.pixelInfo.componentCount * + dfb.pixelInfo.bitsPerComponent; + + // find and open the HID System Service + kr = IOServiceGetMatchingServices( masterPort, + IOServiceMatching( kIOHIDSystemClass ), + &iter ); + kern_assert( kr ); + + assert( service = IOIteratorNext( iter ) ); + + kr = IORegistryEntryGetName( service, name ); + kern_assert( kr ); + + kr = IOServiceOpen( service, mach_task_self(), kIOHIDServerConnectType, + &dfb.hidService ); + kern_assert( kr ); + + IOObjectRelease( service ); + IOObjectRelease( iter ); + + kr = IOHIDCreateSharedMemory( dfb.hidService, kIOHIDCurrentShmemVersion ); + kern_assert( kr ); + + kr = IOHIDSetEventsEnable(dfb.hidService, TRUE); + kern_assert( kr ); + + // Inform the HID system that the framebuffer is also connected to it + kr = IOConnectAddClient( dfb.hidService, dfb.fbService ); + kern_assert( kr ); + + kr = IOHIDSetCursorEnable(dfb.hidService, TRUE); + kern_assert( kr ); + + kr = IOConnectMapMemory( dfb.hidService, kIOHIDGlobalMemory, mach_task_self(), + &shmem, &shmemSize, kIOMapAnywhere ); + kern_assert( kr ); + + evg = (EvGlobals *)(shmem + ((EvOffsets *)shmem)->evGlobalsOffset); + + assert(sizeof(EvGlobals) == evg->structSize); + + NotificationPortRef = IONotificationPortCreate( masterPort ); + + notificationPort = IONotificationPortGetMachPort(NotificationPortRef); + + kr = IOConnectSetNotificationPort( dfb.hidService, kIOHIDEventNotification, + notificationPort, 0 ); + kern_assert( kr ); + + evg->movedMask |= NX_MOUSEMOVEDMASK; +} + +/* + * XFIOKitAddScreen + * IOKit specific initialization for each screen. + */ +Bool XFIOKitAddScreen(ScreenPtr pScreen) +{ + pthread_t pmThread; + + // setup cursor support, use hardware cursor if possible + if (! XFIOKitInitCursor(pScreen)) { + return FALSE; + } + + // initialize colormap handling as needed + if (dfb.pixelInfo.pixelType == kIOCLUTPixels) { + pScreen->StoreColors = XFIOKitStoreColors; + } + + // initialize power manager handling + pthread_create( &pmThread, NULL, XFIOKitPMThread, + (void *) pScreen ); + + return TRUE; +} + +/* + * XFIOKitOsVendorInit + * One-time initialization of IOKit support. + * Connect to framebuffer and HID system. + */ +void XFIOKitOsVendorInit(void) +{ + kern_return_t kr; + int fd[2]; + + ErrorF("Display mode: IOKit\n"); + + kr = IOMasterPort(bootstrap_port, &masterPort); + kern_assert( kr ); + + SetupFBandHID(); + + assert( pipe(fd) == 0 ); + darwinEventFD = fd[0]; + fcntl(darwinEventFD, F_SETFL, O_NONBLOCK); + pthread_create(&dfb.hidThread, NULL, XFIOKitHIDThread, (void *) fd[1]); +} Index: xc/programs/Xserver/hw/darwin/xfIOKit.h diff -u /dev/null xc/programs/Xserver/hw/darwin/xfIOKit.h:1.3 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/xfIOKit.h Sun Apr 1 03:12:13 2001 @@ -0,0 +1,20 @@ +/* + xfIOKit.h + + IOKit specific functions and definitions +*/ +/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKit.h,v 1.3 2001/04/01 07:12:13 torrey Exp $ */ + +#ifndef _XFIOKIT_H +#define _XFIOKIT_H + +#include "X11/Xproto.h" +#include "screenint.h" + +Bool XFIOKitAddScreen(ScreenPtr pScreen); +Bool XFIOKitInitCursor(ScreenPtr pScreen); +void XFIOKitOsVendorInit(void); +void XFIOKitGiveUp(void); +void XFIOKitBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class); + +#endif Index: xc/programs/Xserver/hw/darwin/xfIOKitCursor.c diff -u /dev/null xc/programs/Xserver/hw/darwin/xfIOKitCursor.c:1.2 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/xfIOKitCursor.c Fri Feb 2 16:37:59 2001 @@ -0,0 +1,706 @@ +/************************************************************** + * + * Cursor support for Darwin X Server + * + * Three different cursor modes are possible: + * X (0) - tracking via Darwin kernel, + * display via X machine independent + * Kernel (1) - tracking and display via Darwin kernel + * (not currently supported) + * Hardware (2) - tracking and display via hardware + * + * The X software cursor uses the Darwin software cursor + * routines in IOFramebuffer.cpp to track the cursor, but + * displays the cursor image using the X machine + * independent display cursor routines in midispcur.c. + * + * The kernel cursor uses IOFramebuffer.cpp routines to + * track and display the cursor. This gives better + * performance as the display calls don't have to cross + * the kernel boundary. Unfortunately, this mode has + * synchronization issues with the user land X server + * and isn't currently used. + * + * Hardware cursor support lets the hardware handle these + * details. + * + * Kernel and hardware cursor mode only work for cursors + * up to a certain size, currently 16x16 pixels. If a + * bigger cursor is set, we fallback to X cursor mode. + * + * HISTORY: + * 1.0 by Torrey T. Lyons, October 30, 2000 + * + **************************************************************/ +/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKitCursor.c,v 1.2 2001/02/02 21:37:59 herrb Exp $ */ + +#include "scrnintstr.h" +#include "cursorstr.h" +#include "micmap.h" +#define NO_CFPLUGIN +#include +#include +#include "darwin.h" +#include "mipointrst.h" + +#define DUMP_DARWIN_CURSOR FALSE + +// The cursors format are documented in IOFramebufferShared.h. +#define RGBto34WithGamma(red, green, blue) \ + ( 0x000F \ + | (((red) & 0xF) << 12) \ + | (((green) & 0xF) << 8) \ + | (((blue) & 0xF) << 4) ) +#define RGBto38WithGamma(red, green, blue) \ + ( 0xFF << 24 \ + | (((red) & 0xFF) << 16) \ + | (((green) & 0xFF) << 8) \ + | (((blue) & 0xFF)) ) +#define HighBitOf32 0x80000000 + +typedef struct { + Bool canHWCursor; + short cursorMode; + RecolorCursorProcPtr RecolorCursor; + InstallColormapProcPtr InstallColormap; + QueryBestSizeProcPtr QueryBestSize; + miPointerSpriteFuncPtr spriteFuncs; + ColormapPtr pInstalledMap; +} XFIOKitCursorScreenRec, *XFIOKitCursorScreenPtr; + +extern DarwinFramebufferRec dfb; +static int darwinCursorScreenIndex = -1; +static unsigned long darwinCursorGeneration = 0; + +/* +=========================================================================== + + Pointer sprite functions + +=========================================================================== +*/ + +/* + Realizing the Darwin hardware cursor (ie. converting from the + X representation to the IOKit representation) is complicated + by the fact that we have three different potential cursor + formats to go to, one for each bit depth (8, 15, or 24). + The IOKit formats are documented in IOFramebufferShared.h. + X cursors are represented as two pieces, a source and a mask. + The mask is a bitmap indicating which parts of the cursor are + transparent and which parts are drawn. The source is a bitmap + indicating which parts of the non-transparent portion of the the + cursor should be painted in the foreground color and which should + be painted in the background color. The bitmaps are given in + 32-bit format with least significant byte and bit first. + (This is opposite PowerPC Darwin.) +*/ + +typedef struct { + unsigned char image[CURSORWIDTH*CURSORHEIGHT]; + unsigned char mask[CURSORWIDTH*CURSORHEIGHT]; +} cursorPrivRec, *cursorPrivPtr; + +/* + * XFIOKitRealizeCursor8 + * Convert the X cursor representation to an 8-bit depth + * format for Darwin. This function assumes the maximum cursor + * width is a multiple of 8. + */ +static Bool +XFIOKitRealizeCursor8( + ScreenPtr pScreen, + CursorPtr pCursor) +{ + cursorPrivPtr newCursor; + unsigned char *newSourceP, *newMaskP; + CARD32 *oldSourceP, *oldMaskP; + xColorItem fgColor, bgColor; + int index, x, y, rowPad; + int cursorWidth, cursorHeight; + ColormapPtr pmap; + + // check cursor size just to be sure + cursorWidth = pCursor->bits->width; + cursorHeight = pCursor->bits->height; + if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH) + return FALSE; + + // get cursor colors in colormap + index = pScreen->myNum; + pmap = miInstalledMaps[index]; + if (!pmap) return FALSE; + + fgColor.red = pCursor->foreRed; + fgColor.green = pCursor->foreGreen; + fgColor.blue = pCursor->foreBlue; + FakeAllocColor(pmap, &fgColor); + bgColor.red = pCursor->backRed; + bgColor.green = pCursor->backGreen; + bgColor.blue = pCursor->backBlue; + FakeAllocColor(pmap, &bgColor); + FakeFreeColor(pmap, fgColor.pixel); + FakeFreeColor(pmap, bgColor.pixel); + + // allocate memory for new cursor image + newCursor = xalloc( sizeof(cursorPrivRec) ); + if (!newCursor) + return FALSE; + memset( newCursor->image, pScreen->blackPixel, CURSORWIDTH*CURSORHEIGHT ); + memset( newCursor->mask, 0, CURSORWIDTH*CURSORHEIGHT ); + + // convert to 8-bit Darwin cursor format + oldSourceP = (CARD32 *) pCursor->bits->source; + oldMaskP = (CARD32 *) pCursor->bits->mask; + newSourceP = newCursor->image; + newMaskP = newCursor->mask; + rowPad = CURSORWIDTH - cursorWidth; + + for (y = 0; y < cursorHeight; y++) { + for (x = 0; x < cursorWidth; x++) { + if (*oldSourceP & (HighBitOf32 >> x)) + *newSourceP = fgColor.pixel; + else + *newSourceP = bgColor.pixel; + if (*oldMaskP & (HighBitOf32 >> x)) + *newMaskP = 255; + else + *newSourceP = pScreen->blackPixel; + newSourceP++; newMaskP++; + } + oldSourceP++; oldMaskP++; + newSourceP += rowPad; newMaskP += rowPad; + } + + // save the result + pCursor->devPriv[pScreen->myNum] = (pointer) newCursor; + return TRUE; +} + + +/* + * XFIOKitRealizeCursor15 + * Convert the X cursor representation to an 15-bit depth + * format for Darwin. + */ +static Bool +XFIOKitRealizeCursor15( + ScreenPtr pScreen, + CursorPtr pCursor) +{ + unsigned short *newCursor; + unsigned short fgPixel, bgPixel; + unsigned short *newSourceP; + CARD32 *oldSourceP, *oldMaskP; + int x, y, rowPad; + int cursorWidth, cursorHeight; + + // check cursor size just to be sure + cursorWidth = pCursor->bits->width; + cursorHeight = pCursor->bits->height; + if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH) + return FALSE; + + // allocate memory for new cursor image + newCursor = xalloc( CURSORWIDTH*CURSORHEIGHT*sizeof(short) ); + if (!newCursor) + return FALSE; + memset( newCursor, 0, CURSORWIDTH*CURSORHEIGHT*sizeof(short) ); + + // calculate pixel values + fgPixel = RGBto34WithGamma( pCursor->foreRed, pCursor->foreGreen, + pCursor->foreBlue ); + bgPixel = RGBto34WithGamma( pCursor->backRed, pCursor->backGreen, + pCursor->backBlue ); + + // convert to 15-bit Darwin cursor format + oldSourceP = (CARD32 *) pCursor->bits->source; + oldMaskP = (CARD32 *) pCursor->bits->mask; + newSourceP = newCursor; + rowPad = CURSORWIDTH - cursorWidth; + + for (y = 0; y < cursorHeight; y++) { + for (x = 0; x < cursorWidth; x++) { + if (*oldMaskP & (HighBitOf32 >> x)) { + if (*oldSourceP & (HighBitOf32 >> x)) + *newSourceP = fgPixel; + else + *newSourceP = bgPixel; + } else { + *newSourceP = 0; + } + newSourceP++; + } + oldSourceP++; oldMaskP++; + newSourceP += rowPad; + } + +#if DUMP_DARWIN_CURSOR + // Write out the cursor + ErrorF("Cursor: 0x%x\n", pCursor); + ErrorF("Width = %i, Height = %i, RowPad = %i\n", cursorWidth, + cursorHeight, rowPad); + for (y = 0; y < cursorHeight; y++) { + newSourceP = newCursor + y*CURSORWIDTH; + for (x = 0; x < cursorWidth; x++) { + if (*newSourceP == fgPixel) + ErrorF("x"); + else if (*newSourceP == bgPixel) + ErrorF("o"); + else + ErrorF(" "); + newSourceP++; + } + ErrorF("\n"); + } +#endif + + // save the result + pCursor->devPriv[pScreen->myNum] = (pointer) newCursor; + return TRUE; +} + + +/* + * XFIOKitRealizeCursor24 + * Convert the X cursor representation to an 24-bit depth + * format for Darwin. This function assumes the maximum cursor + * width is a multiple of 8. + */ +static Bool +XFIOKitRealizeCursor24( + ScreenPtr pScreen, + CursorPtr pCursor) +{ + unsigned int *newCursor; + unsigned int fgPixel, bgPixel; + unsigned int *newSourceP; + CARD32 *oldSourceP, *oldMaskP; + int x, y, rowPad; + int cursorWidth, cursorHeight; + + // check cursor size just to be sure + cursorWidth = pCursor->bits->width; + cursorHeight = pCursor->bits->height; + if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH) + return FALSE; + + // allocate memory for new cursor image + newCursor = xalloc( CURSORWIDTH*CURSORHEIGHT*sizeof(int) ); + if (!newCursor) + return FALSE; + memset( newCursor, 0, CURSORWIDTH*CURSORHEIGHT*sizeof(int) ); + + // calculate pixel values + fgPixel = RGBto38WithGamma( pCursor->foreRed, pCursor->foreGreen, + pCursor->foreBlue ); + bgPixel = RGBto38WithGamma( pCursor->backRed, pCursor->backGreen, + pCursor->backBlue ); + + // convert to 24-bit Darwin cursor format + oldSourceP = (CARD32 *) pCursor->bits->source; + oldMaskP = (CARD32 *) pCursor->bits->mask; + newSourceP = newCursor; + rowPad = CURSORWIDTH - cursorWidth; + + for (y = 0; y < cursorHeight; y++) { + for (x = 0; x < cursorWidth; x++) { + if (*oldMaskP & (HighBitOf32 >> x)) { + if (*oldSourceP & (HighBitOf32 >> x)) + *newSourceP = fgPixel; + else + *newSourceP = bgPixel; + } else { + *newSourceP = 0; + } + newSourceP++; + } + oldSourceP++; oldMaskP++; + newSourceP += rowPad; + } + +#if DUMP_DARWIN_CURSOR + // Write out the cursor + ErrorF("Cursor: 0x%x\n", pCursor); + ErrorF("Width = %i, Height = %i, RowPad = %i\n", cursorWidth, + cursorHeight, rowPad); + for (y = 0; y < cursorHeight; y++) { + newSourceP = newCursor + y*CURSORWIDTH; + for (x = 0; x < cursorWidth; x++) { + if (*newSourceP == fgPixel) + ErrorF("x"); + else if (*newSourceP == bgPixel) + ErrorF("o"); + else + ErrorF(" "); + newSourceP++; + } + ErrorF("\n"); + } +#endif + + // save the result + pCursor->devPriv[pScreen->myNum] = (pointer) newCursor; + return TRUE; +} + + +/* + * XFIOKitRealizeCursor + * + */ +static Bool +XFIOKitRealizeCursor( + ScreenPtr pScreen, + CursorPtr pCursor) +{ + Bool result; + XFIOKitCursorScreenPtr ScreenPriv = (XFIOKitCursorScreenPtr) + pScreen->devPrivates[darwinCursorScreenIndex].ptr; + + if ((pCursor->bits->height > CURSORHEIGHT) || + (pCursor->bits->width > CURSORWIDTH) || + // FIXME: this condition is not needed after kernel cursor works + !ScreenPriv->canHWCursor) { + result = (*ScreenPriv->spriteFuncs->RealizeCursor)(pScreen, pCursor); + } else if (dfb.bitsPerPixel == 8) { + result = XFIOKitRealizeCursor8(pScreen, pCursor); + } else if (dfb.bitsPerPixel == 16) { + result = XFIOKitRealizeCursor15(pScreen, pCursor); + } else { + result = XFIOKitRealizeCursor24(pScreen, pCursor); + } + + return result; +} + + +/* + * XFIOKitUnrealizeCursor + * + */ +static Bool +XFIOKitUnrealizeCursor( + ScreenPtr pScreen, + CursorPtr pCursor) +{ + Bool result; + XFIOKitCursorScreenPtr ScreenPriv = (XFIOKitCursorScreenPtr) + pScreen->devPrivates[darwinCursorScreenIndex].ptr; + + if ((pCursor->bits->height > CURSORHEIGHT) || + (pCursor->bits->width > CURSORWIDTH) || + // FIXME: this condition is not needed after kernel cursor works + !ScreenPriv->canHWCursor) { + result = (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pScreen, pCursor); + } else { + xfree( pCursor->devPriv[pScreen->myNum] ); + result = TRUE; + } + + return result; +} + + +/* + * XFIOKitSetCursor + * Set the cursor sprite and position + * Use hardware cursor if possible + */ +static void +XFIOKitSetCursor( + ScreenPtr pScreen, + CursorPtr pCursor, + int x, + int y) +{ + kern_return_t kr; + StdFBShmem_t *cshmem = dfb.cursorShmem; + XFIOKitCursorScreenPtr ScreenPriv = (XFIOKitCursorScreenPtr) + pScreen->devPrivates[darwinCursorScreenIndex].ptr; + + // are we supposed to remove the cursor? + if (!pCursor) { + if (ScreenPriv->cursorMode == 0) + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); + else { + if (!cshmem->cursorShow) { + cshmem->cursorShow++; + if (cshmem->hardwareCursorActive) { + kr = IOFBSetCursorVisible(dfb.fbService, FALSE); + kern_assert( kr ); + } + } + } + return; + } + + // can we use the kernel or hardware cursor? + if ((pCursor->bits->height <= CURSORHEIGHT) && + (pCursor->bits->width <= CURSORWIDTH) && + // FIXME: condition not needed when kernel cursor works + ScreenPriv->canHWCursor) { + + if (ScreenPriv->cursorMode == 0) // remove the X cursor + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); + ScreenPriv->cursorMode = 1; // kernel cursor + + // change the cursor image in shared memory + if (dfb.bitsPerPixel == 8) { + cursorPrivPtr newCursor = + (cursorPrivPtr) pCursor->devPriv[pScreen->myNum]; + memcpy(cshmem->cursor.bw8.image[0], newCursor->image, + CURSORWIDTH*CURSORHEIGHT); + memcpy(cshmem->cursor.bw8.mask[0], newCursor->mask, + CURSORWIDTH*CURSORHEIGHT); + } else if (dfb.bitsPerPixel == 16) { + unsigned short *newCursor = + (unsigned short *) pCursor->devPriv[pScreen->myNum]; + memcpy(cshmem->cursor.rgb.image[0], newCursor, + 2*CURSORWIDTH*CURSORHEIGHT); + } else { + unsigned int *newCursor = + (unsigned int *) pCursor->devPriv[pScreen->myNum]; + memcpy(cshmem->cursor.rgb24.image[0], newCursor, + 4*CURSORWIDTH*CURSORHEIGHT); + } + + // FIXME: We always use a full size cursor, even if the image + // is smaller because I couldn't get the padding to come out + // right otherwise. + cshmem->cursorSize[0].width = CURSORWIDTH; + cshmem->cursorSize[0].height = CURSORHEIGHT; + cshmem->hotSpot[0].x = pCursor->bits->xhot; + cshmem->hotSpot[0].y = pCursor->bits->yhot; + + // try to use a hardware cursor + if (ScreenPriv->canHWCursor) { + kr = IOFBSetNewCursor(dfb.fbService, 0, 0, 0); + // FIXME: this is a fatal error without the kernel cursor + kern_assert( kr ); +#if 0 + if (kr != KERN_SUCCESS) { + ErrorF("Could not set new cursor with kernel return 0x%x.\n", kr); + ScreenPriv->canHWCursor = FALSE; + } +#endif + } + + // make the new cursor visible + if (cshmem->cursorShow) + cshmem->cursorShow--; + + if (!cshmem->cursorShow && ScreenPriv->canHWCursor) { + kr = IOFBSetCursorVisible(dfb.fbService, TRUE); + // FIXME: this is a fatal error without the kernel cursor + kern_assert( kr ); +#if 0 + if (kr != KERN_SUCCESS) { + ErrorF("Couldn't set hardware cursor visible with kernel return 0x%x.\n", kr); + ScreenPriv->canHWCursor = FALSE; + } else +#endif + ScreenPriv->cursorMode = 2; // hardware cursor + } + + return; + } + + // otherwise we use a software cursor + if (ScreenPriv->cursorMode) { + /* remove the kernel or hardware cursor */ + XFIOKitSetCursor(pScreen, 0, x, y); + } + + ScreenPriv->cursorMode = 0; + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, pCursor, x, y); +} + + +/* + * XFIOKitMoveCursor + * Move the cursor. This is a noop for a kernel or hardware cursor. + */ +static void +XFIOKitMoveCursor( + ScreenPtr pScreen, + int x, + int y) +{ + XFIOKitCursorScreenPtr ScreenPriv = (XFIOKitCursorScreenPtr) + pScreen->devPrivates[darwinCursorScreenIndex].ptr; + + // only the X cursor needs to be explicitly moved + if (!ScreenPriv->cursorMode) + (*ScreenPriv->spriteFuncs->MoveCursor)(pScreen, x, y); +} + +static miPointerSpriteFuncRec darwinSpriteFuncsRec = { + XFIOKitRealizeCursor, + XFIOKitUnrealizeCursor, + XFIOKitSetCursor, + XFIOKitMoveCursor +}; + + +/* +=========================================================================== + + Pointer screen functions + +=========================================================================== +*/ + +/* + * XFIOKitCursorOffScreen + */ +static Bool XFIOKitCursorOffScreen(ScreenPtr *pScreen, int *x, int *y) +{ return FALSE; +} + + +/* + * XFIOKitCrossScreen + */ +static void XFIOKitCrossScreen(ScreenPtr pScreen, Bool entering) +{ return; +} + + +/* + * XFIOKitWarpCursor + * Change the cursor position without generating an event or motion history + */ +static void +XFIOKitWarpCursor( + ScreenPtr pScreen, + int x, + int y) +{ + kern_return_t kr; + + kr = IOHIDSetMouseLocation( dfb.hidService, x, y ); + if (kr != KERN_SUCCESS) { + ErrorF("Could not set cursor position with kernel return 0x%x.\n", kr); + } + miPointerWarpCursor(pScreen, x, y); +} + +static miPointerScreenFuncRec darwinScreenFuncsRec = { + XFIOKitCursorOffScreen, + XFIOKitCrossScreen, + XFIOKitWarpCursor, +}; + + +/* +=========================================================================== + + Other screen functions + +=========================================================================== +*/ + +/* + * XFIOKitCursorQueryBestSize + * Handle queries for best cursor size + */ +static void +XFIOKitCursorQueryBestSize( + int class, + unsigned short *width, + unsigned short *height, + ScreenPtr pScreen) +{ + XFIOKitCursorScreenPtr ScreenPriv = (XFIOKitCursorScreenPtr) + pScreen->devPrivates[darwinCursorScreenIndex].ptr; + + if (class == CursorShape) { + *width = CURSORWIDTH; + *height = CURSORHEIGHT; + } else + (*ScreenPriv->QueryBestSize)(class, width, height, pScreen); +} + + +/* + * XFIOKitInitCursor + * Initialize cursor support + */ +Bool +XFIOKitInitCursor( + ScreenPtr pScreen) +{ + XFIOKitCursorScreenPtr ScreenPriv; + miPointerScreenPtr PointPriv; + kern_return_t kr; + + // start with no cursor displayed + if (!dfb.cursorShmem->cursorShow++) { + if (dfb.cursorShmem->hardwareCursorActive) { + kr = IOFBSetCursorVisible(dfb.fbService, FALSE); + kern_assert( kr ); + } + } + + // initialize software cursor handling (always needed as backup) + if (!miDCInitialize(pScreen, &darwinScreenFuncsRec)) { + return FALSE; + } + + // allocate private storage for this screen's hardware cursor info + if (darwinCursorGeneration != serverGeneration) { + if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex()) < 0) + return FALSE; + darwinCursorGeneration = serverGeneration; + } + + ScreenPriv = xcalloc( 1, sizeof(XFIOKitCursorScreenRec) ); + if (!ScreenPriv) return FALSE; + + pScreen->devPrivates[darwinCursorScreenIndex].ptr = (pointer) ScreenPriv; + + // check if a hardware cursor is supported + if (!dfb.cursorShmem->hardwareCursorCapable) { + ScreenPriv->canHWCursor = FALSE; + ErrorF("Hardware cursor not supported.\n"); + } else { + // we need to make sure that the hardware cursor really works + ScreenPriv->canHWCursor = TRUE; + kr = IOFBSetNewCursor(dfb.fbService, 0, 0, 0); + if (kr != KERN_SUCCESS) { + ErrorF("Could not set hardware cursor with kernel return 0x%x.\n", kr); + ScreenPriv->canHWCursor = FALSE; + } + kr = IOFBSetCursorVisible(dfb.fbService, TRUE); + if (kr != KERN_SUCCESS) { + ErrorF("Couldn't set hardware cursor visible with kernel return 0x%x.\n", kr); + ScreenPriv->canHWCursor = FALSE; + } + IOFBSetCursorVisible(dfb.fbService, FALSE); + } + + ScreenPriv->cursorMode = 0; + ScreenPriv->pInstalledMap = NULL; + + // override some screen procedures + ScreenPriv->QueryBestSize = pScreen->QueryBestSize; + pScreen->QueryBestSize = XFIOKitCursorQueryBestSize; +// ScreenPriv->ConstrainCursor = pScreen->ConstrainCursor; +// pScreen->ConstrainCursor = XFIOKitConstrainCursor; + + // initialize hardware cursor handling + PointPriv = (miPointerScreenPtr) + pScreen->devPrivates[miPointerScreenIndex].ptr; + + ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; + PointPriv->spriteFuncs = &darwinSpriteFuncsRec; + + /* Other routines that might be overridden */ +/* + CursorLimitsProcPtr CursorLimits; + RecolorCursorProcPtr RecolorCursor; +*/ + + return TRUE; +} Index: xc/programs/Xserver/hw/darwin/xfIOKitStartup.c diff -u /dev/null xc/programs/Xserver/hw/darwin/xfIOKitStartup.c:1.3 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/xfIOKitStartup.c Wed Apr 11 04:34:18 2001 @@ -0,0 +1,56 @@ +/************************************************************** + * + * Startup code for the IOKit Darwin X Server + * + **************************************************************/ +/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKitStartup.c,v 1.3 2001/04/11 08:34:18 torrey Exp $ */ + +#include "mi.h" +#include "mipointer.h" +#include "scrnintstr.h" + +/* + * DarwinHandleGUI + * This function is called first from main(). + * It does nothing for the IOKit X server. + */ +void DarwinHandleGUI( + int argc, + char *argv[], + char *envp[] ) +{ +} + +// No Quartz support. All Quartz functions are no-ops. + +BOOL QuartzAddScreen(ScreenPtr pScreen) { + FatalError("QuartzAddScreen called without Quartz support.\n"); +} + +void QuartzOsVendorInit(void) { + FatalError("QuartzOsVendorInit called without Quartz support.\n"); +} + +void QuartzGiveUp(void) { + FatalError("QuartzGiveUp called without Quartz support.\n"); +} + +void QuartzHide(void) { + FatalError("QuartzHide called without Quartz support.\n"); +} + +void QuartzShow(int x, int y) { + FatalError("QuartzShow called without Quartz support.\n"); +} + +void QuartzReadPasteboard(void) { + FatalError("QuartzReadPasteboard called without Quartz support.\n"); +} + +void QuartzWritePasteboard(void) { + FatalError("QuartzWritePasteboard called without Quartz support.\n"); +} + +void QuartzBell(void) { + FatalError("QuartzBell called without Quartz support.\n"); +} Index: xc/programs/Xserver/hw/darwin/bundle/Imakefile diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/Imakefile:1.10.2.1 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Imakefile Mon May 21 00:56:06 2001 @@ -0,0 +1,74 @@ +XCOMM $XFree86: xc/programs/Xserver/hw/darwin/bundle/Imakefile,v 1.10.2.1 2001/05/21 04:56:06 torrey Exp $ + +#include +#define IHaveSubdirs + +SRCS = Preferences.m \ + XApplication.m \ + Xserver.m \ + quartz.c \ + quartzAudio.c \ + quartzCocoa.m \ + quartzCursor.c \ + quartzPasteboard.c + +OBJS = Preferences.o \ + XApplication.o \ + Xserver.o \ + quartz.o \ + quartzAudio.o \ + quartzCocoa.o \ + quartzCursor.o \ + quartzPasteboard.o + +INCLUDES = -I. -I$(SERVERSRC)/mi -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ + -I$(FONTINCSRC) + +#if defined(XFree86CustomVersion) +CUSTOMVERSION = XFree86CustomVersion +CUSTOMVERDEF = -DXF86_CUSTOM_VERSION='$(CUSTOMVERSION)' +#endif + +DEFINES = $(CUSTOMVERDEF) -DXBINDIR=$(BINDIR) -DXINITDIR=$(XINITDIR) +#if NothingOutsideProjectRoot +XDARWINROOT = $(BINDIR) +#else +XDARWINROOT = /Applications +#endif + +#if XFree86Devel +PBXBUILDSTYLE = -buildstyle Development +#else +PBXBUILDSTYLE = -buildstyle Deployment +#endif + +SUBDIRS = English.lproj Japanese.lproj + +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) + +NormalLibraryObjectRule() +NormalLibraryTarget(XQuartz,$(OBJS)) + +AllTarget(quartzStartup.o) + +AllTarget(XDarwinStartup) +NormalProgramTarget(XDarwinStartup,XDarwinStartup.o,NullParameter, \ + NullParameter,NullParameter) +InstallProgram(XDarwinStartup,$(BINDIR)) +install:: + -(cd $(DESTDIR)$(BINDIR); $(RM) X; $(LN) XDarwinStartup X) + +AllTarget(XDarwin) +XDarwin: + pbxbuild -target XDarwin $(PBXBUILDSTYLE) + +install:: + pbxbuild install -target XDarwin $(PBXBUILDSTYLE) \ + DSTROOT=$(DESTDIR)$(XDARWINROOT) + +clean:: + pbxbuild "clean" -target XDarwin $(PBXBUILDSTYLE) + +DependTarget() + Index: xc/programs/Xserver/hw/darwin/bundle/Preferences.h diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/Preferences.h:1.5 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Preferences.h Wed May 9 03:16:19 2001 @@ -0,0 +1,56 @@ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Preferences.h,v 1.5 2001/05/09 07:16:19 torrey Exp $ */ + +#import + +@interface Preferences : NSObject +{ + IBOutlet NSPanel *window; + IBOutlet id displayNumber; + IBOutlet id dockSwitchButton; + IBOutlet id fakeButton; + IBOutlet id keyField; + IBOutlet id keymapFileField; + IBOutlet id loadKeymapFileButton; + IBOutlet id pickKeymapFileButton; + IBOutlet id splashStartupHelpButton; + IBOutlet id startupHelpButton; + IBOutlet id systemBeepButton; + + BOOL isGettingKeyCode; + int keyCode; + int modifiers; + NSMutableString *switchString; +} +- (IBAction)close:(id)sender; +- (IBAction)pickFile:(id)sender; +- (IBAction)saveChanges:(id)sender; +- (IBAction)setKey:(id)sender; + +- (BOOL)sendEvent:(NSEvent*)anEvent; + +- (void)awakeFromNib; + ++ (void)setUseKeymapFile:(BOOL)newUseKeymapFile; ++ (void)setKeymapFile:(NSString*)newFile; ++ (void)setSwitchString:(NSString*)newString; ++ (void)setKeyCode:(int)newKeyCode; ++ (void)setModifiers:(int)newModifiers; ++ (void)setDisplay:(int)newDisplay; ++ (void)setDockSwitch:(BOOL)newDockSwitch; ++ (void)setFakeButtons:(BOOL)newFakeButtons; ++ (void)setStartupHelp:(BOOL)newStartupHelp; ++ (void)setSystemBeep:(BOOL)newSystemBeep; ++ (void)saveToDisk; + ++ (BOOL)useKeymapFile; ++ (NSString*)keymapFile; ++ (NSString*)switchString; ++ (unsigned int)keyCode; ++ (unsigned int)modifiers; ++ (int)display; ++ (BOOL)dockSwitch; ++ (BOOL)fakeButtons; ++ (BOOL)startupHelp; ++ (BOOL)systemBeep; + +@end Index: xc/programs/Xserver/hw/darwin/bundle/Preferences.m diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/Preferences.m:1.6 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Preferences.m Wed May 9 03:16:19 2001 @@ -0,0 +1,241 @@ +// +// Preferences.m +// +// This class keeps track of the user preferences. +// +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Preferences.m,v 1.6 2001/05/09 07:16:19 torrey Exp $ */ + +#import "Preferences.h" +#import "quartzShared.h" + +@implementation Preferences + ++ (void)initialize { + // Provide user defaults if needed + NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithInt:0], @"Display", + @"YES", @"FakeButtons", + @"/System/Library/Keyboards/USA.keymapping", @"KeymappingFile", + @"NO", @"UseKeymappingFile", + @"Cmd-Opt-a", @"SwitchString", + @"YES", @"ShowStartupHelp", + [NSNumber numberWithInt:0], @"SwitchKeyCode", + [NSNumber numberWithInt:(NSCommandKeyMask | NSAlternateKeyMask)], + @"SwitchModifiers", @"NO", @"UseSystemBeep", + @"NO", @"DockSwitch", nil]; + + [super initialize]; + [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults]; +} + +// Initialize internal state info of switch key button +- (void)initSwitchKey { + keyCode = [Preferences keyCode]; + modifiers = [Preferences modifiers]; + [switchString setString:[Preferences switchString]]; +} + +- (id)init { + self = [super init]; + + isGettingKeyCode=NO; + switchString=[[NSMutableString alloc] init]; + [self initSwitchKey]; + + return self; +} + +// Set the window controls to the state in user defaults +- (void)resetWindow { + [loadKeymapFileButton setIntValue:[Preferences useKeymapFile]]; + + if ([Preferences keymapFile] == nil) + [keymapFileField setStringValue:@" "]; + else + [keymapFileField setStringValue:[Preferences keymapFile]]; + + if ([Preferences switchString] == nil) + [keyField setTitle:@"--"]; + else + [keyField setTitle:[Preferences switchString]]; + + [displayNumber setIntValue:[Preferences display]]; + [dockSwitchButton setIntValue:[Preferences dockSwitch]]; + [fakeButton setIntValue:[Preferences fakeButtons]]; + [startupHelpButton setIntValue:[Preferences startupHelp]]; + [systemBeepButton setIntValue:[Preferences systemBeep]]; +} + +- (void)awakeFromNib { + [self resetWindow]; + [splashStartupHelpButton setIntValue:[Preferences startupHelp]]; +} + +// User cancelled the changes +- (IBAction)close:(id)sender +{ + [window orderOut:nil]; + [self resetWindow]; // reset window controls + [self initSwitchKey]; // reset switch key state +} + +// Pick keymapping file +- (IBAction)pickFile:(id)sender +{ + int result; + NSArray *fileTypes = [NSArray arrayWithObject:@"keymapping"]; + NSOpenPanel *oPanel = [NSOpenPanel openPanel]; + + [oPanel setAllowsMultipleSelection:NO]; + result = [oPanel runModalForDirectory:@"/System/Library/Keyboards" file:nil types:fileTypes]; + if (result == NSOKButton) { + [keymapFileField setStringValue:[oPanel filename]]; + } +} + +// User saved changes +- (IBAction)saveChanges:(id)sender +{ + [Preferences setKeyCode:keyCode]; + [Preferences setModifiers:modifiers]; + [Preferences setSwitchString:switchString]; + [Preferences setKeymapFile:[keymapFileField stringValue]]; + [Preferences setUseKeymapFile:[loadKeymapFileButton intValue]]; + [Preferences setDisplay:[displayNumber intValue]]; + [Preferences setDockSwitch:[dockSwitchButton intValue]]; + [Preferences setFakeButtons:[fakeButton intValue]]; + [Preferences setStartupHelp:[startupHelpButton intValue]]; + [Preferences setSystemBeep:[systemBeepButton intValue]]; + [Preferences saveToDisk]; + + [window orderOut:nil]; +} + +- (IBAction)setKey:(id)sender +{ + [keyField setTitle:@"Press key"]; + isGettingKeyCode=YES; + [switchString setString:@""]; +} + +- (BOOL)sendEvent:(NSEvent*)anEvent { + if(isGettingKeyCode) { + if([anEvent type]==NSKeyDown) //wait for keyup + return YES; + if([anEvent type]!=NSKeyUp) + return NO; + + if([anEvent modifierFlags] & NSCommandKeyMask) + [switchString appendString:@"Cmd-"]; + if([anEvent modifierFlags] & NSControlKeyMask) + [switchString appendString:@"Ctrl-"]; + if([anEvent modifierFlags] & NSAlternateKeyMask) + [switchString appendString:@"Opt-"]; + if([anEvent modifierFlags] & NSNumericPadKeyMask) // doesn't work + [switchString appendString:@"Num-"]; + if([anEvent modifierFlags] & NSHelpKeyMask) + [switchString appendString:@"Help-"]; + if([anEvent modifierFlags] & NSFunctionKeyMask) // powerbooks only + [switchString appendString:@"Fn-"]; + + [switchString appendString:[anEvent charactersIgnoringModifiers]]; + [keyField setTitle:switchString]; + + keyCode = [anEvent keyCode]; + modifiers = [anEvent modifierFlags]; + isGettingKeyCode=NO; + + return YES; + } + return NO; +} + ++ (void)setKeymapFile:(NSString*)newFile { + [[NSUserDefaults standardUserDefaults] setObject:newFile forKey:@"KeymappingFile"]; +} + ++ (void)setUseKeymapFile:(BOOL)newUseKeymapFile { + [[NSUserDefaults standardUserDefaults] setBool:newUseKeymapFile forKey:@"UseKeymappingFile"]; +} + ++ (void)setSwitchString:(NSString*)newString { + [[NSUserDefaults standardUserDefaults] setObject:newString forKey:@"SwitchString"]; +} + ++ (void)setKeyCode:(int)newKeyCode { + [[NSUserDefaults standardUserDefaults] setInteger:newKeyCode forKey:@"SwitchKeyCode"]; +} + ++ (void)setModifiers:(int)newModifiers { + [[NSUserDefaults standardUserDefaults] setInteger:newModifiers forKey:@"SwitchModifiers"]; +} + ++ (void)setDisplay:(int)newDisplay { + [[NSUserDefaults standardUserDefaults] setInteger:newDisplay forKey:@"Display"]; +} + ++ (void)setDockSwitch:(BOOL)newDockSwitch { + [[NSUserDefaults standardUserDefaults] setBool:newDockSwitch forKey:@"DockSwitch"]; +} + ++ (void)setFakeButtons:(BOOL)newFakeButtons { + [[NSUserDefaults standardUserDefaults] setBool:newFakeButtons forKey:@"FakeButtons"]; + // Update the setting used by the X server thread + darwinFakeButtons = newFakeButtons; +} + ++ (void)setStartupHelp:(BOOL)newStartupHelp { + [[NSUserDefaults standardUserDefaults] setBool:newStartupHelp forKey:@"ShowStartupHelp"]; +} + ++ (void)setSystemBeep:(BOOL)newSystemBeep { + [[NSUserDefaults standardUserDefaults] setBool:newSystemBeep forKey:@"UseSystemBeep"]; + // Update the setting used by the X server thread + quartzUseSysBeep = newSystemBeep; +} + ++ (void)saveToDisk { + [[NSUserDefaults standardUserDefaults] synchronize]; +} + ++ (BOOL)useKeymapFile { + return [[NSUserDefaults standardUserDefaults] boolForKey:@"UseKeymappingFile"]; +} + ++ (NSString*)keymapFile { + return [[NSUserDefaults standardUserDefaults] stringForKey:@"KeymappingFile"]; +} + ++ (NSString*)switchString { + return [[NSUserDefaults standardUserDefaults] stringForKey:@"SwitchString"]; +} + ++ (unsigned int)keyCode { + return [[NSUserDefaults standardUserDefaults] integerForKey:@"SwitchKeyCode"]; +} + ++ (unsigned int)modifiers { + return [[NSUserDefaults standardUserDefaults] integerForKey:@"SwitchModifiers"]; +} + ++ (int)display { + return [[NSUserDefaults standardUserDefaults] integerForKey:@"Display"]; +} + ++ (BOOL)dockSwitch { + return [[NSUserDefaults standardUserDefaults] boolForKey:@"DockSwitch"]; +} + ++ (BOOL)fakeButtons { + return [[NSUserDefaults standardUserDefaults] boolForKey:@"FakeButtons"]; +} + ++ (BOOL)startupHelp { + return [[NSUserDefaults standardUserDefaults] boolForKey:@"ShowStartupHelp"]; +} + ++ (BOOL)systemBeep { + return [[NSUserDefaults standardUserDefaults] boolForKey:@"UseSystemBeep"]; +} + +@end Index: xc/programs/Xserver/hw/darwin/bundle/XApplication.h diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/XApplication.h:1.1 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/XApplication.h Sun Mar 4 12:40:05 2001 @@ -0,0 +1,20 @@ +// +// NSXApplication.h +// Xmaster project +// +// Created by Andreas Monitzer on January 6, 2001. +// + +#import + +#import "Xserver.h" +#import "Preferences.h" + +@interface XApplication : NSApplication { + IBOutlet Xserver *xserver; + IBOutlet Preferences *preferences; +} + +- (void)sendEvent:(NSEvent *)anEvent; + +@end Index: xc/programs/Xserver/hw/darwin/bundle/XApplication.m diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/XApplication.m:1.1 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/XApplication.m Sun Mar 4 12:40:05 2001 @@ -0,0 +1,20 @@ +// +// XApplication.m +// Xmaster project +// +// Created by Andreas Monitzer on January 6, 2001. +// + +#import "XApplication.h" + + +@implementation XApplication + +- (void)sendEvent:(NSEvent*)anEvent { + if(![xserver translateEvent:anEvent]) { + if(![preferences sendEvent:anEvent]) + [super sendEvent:anEvent]; + } +} + +@end Index: xc/programs/Xserver/hw/darwin/bundle/XDarwin.icns Index: xc/programs/Xserver/hw/darwin/bundle/XDarwinStartup.c diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/XDarwinStartup.c:1.3 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/XDarwinStartup.c Mon Apr 16 02:51:48 2001 @@ -0,0 +1,85 @@ +/************************************************************** + * + * Startup program for Darwin X servers + * + * This program selects the appropriate X server to launch: + * XDarwin IOKit X server (default) + * XDarwinQuartz A soft link to the Quartz X server + * executable (-quartz option) + * + * If told to idle, the program will simply pause and not + * launch any X server. This is to support startx being + * run by XDarwin.app. + * + **************************************************************/ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/XDarwinStartup.c,v 1.3 2001/04/16 06:51:48 torrey Exp $ */ + +#include +#include +#include +#include + +extern int errno; + +// Macros to build the path name +#ifndef XBINDIR +#define XBINDIR /usr/X11R6/bin +#endif +#define STR(s) #s +#define XSTRPATH(s) STR(s) "/" +#define XPATH(file) XSTRPATH(XBINDIR) STR(file) + +int main( + int argc, + char *argv[] ) +{ + int i, j; + char **newargv; + + // Check if we are going to run in Quartz mode or idle + // to support startx from the Quartz server. The last + // parameter in the list is the one used. + for (i = argc-1; i; i--) { + if (!strcmp(argv[i], "-idle")) { + pause(); + return 0; + + } else if (!strcmp(argv[i], "-quartz")) { + char quartzPath[PATH_MAX+1]; + int pathLength; + + // Find the path to the Quartz executable + pathLength = readlink(XPATH(XDarwinQuartz), quartzPath, PATH_MAX); + if (!pathLength) { + fprintf(stderr, "The symbolic link " XPATH(XDarwinQuartz) + " is not valid.\n"); + return errno; + } + quartzPath[pathLength] = '\0'; + + // Build the new argument list + newargv = (char **) malloc((argc+2) * sizeof(char *)); + for (j = argc; j; j--) + newargv[j] = argv[j]; + newargv[0] = quartzPath; + newargv[argc] = "-nostartx"; + newargv[argc+1] = NULL; + + execv(newargv[0], newargv); + fprintf(stderr, "Could not start XDarwin Quartz X server.\n"); + return errno; + } + } + + // Build the new argument list + newargv = (char **) malloc((argc+1) * sizeof(char *)); + for (j = argc; j; j--) + newargv[j] = argv[j]; + newargv[0] = XPATH(XDarwin); + newargv[argc] = NULL; + + // Launch the IOKit X server + execv(newargv[0], newargv); + fprintf(stderr, "Could not start XDarwin IOKit X server.\n"); + return errno; +} Index: xc/programs/Xserver/hw/darwin/bundle/Xserver.h diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/Xserver.h:1.8 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Xserver.h Wed May 16 02:10:08 2001 @@ -0,0 +1,66 @@ +// +// Xserver.h +// +// Created by Andreas Monitzer on January 6, 2001. +// +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Xserver.h,v 1.8 2001/05/16 06:10:08 torrey Exp $ */ + +#import + +#include // for NXEvent +#include +#include +#include + +@interface Xserver : NSObject { + // server state + NSLock *serverLock; + NSTask *clientTask; + NSPort *signalPort; + BOOL serverVisible; + BOOL appQuitting; + UInt32 mouseState; + + // server event queue + int eventWriteFD; + + // Aqua interface + IBOutlet NSPanel *helpWindow; + IBOutlet id startupHelpButton; + IBOutlet NSPanel *switchWindow; +} + +- (id)init; + +- (BOOL)translateEvent:(NSEvent *)anEvent; + +- (void)getNXMouse:(NXEvent*)ev; ++ (void)append:(NSString*)value toEnv:(NSString*)name; + +- (void)run; +- (void)toggle; +- (void)show; +- (void)hide; +- (void)killServer; +- (void)readPasteboard; +- (void)writePasteboard; +- (void)clientTaskDone:(NSNotification *)aNotification; +- (void)sendNXEvent:(NXEvent*)ev; +- (void)sendShowHide:(BOOL)show; + +// Aqua interface actions +- (IBAction)closeHelpAndShow:(id)sender; +- (IBAction)showAction:(id)sender; + +// NSApplication delegate +- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender; +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification; +- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag; +- (void)applicationWillResignActive:(NSNotification *)aNotification; +- (void)applicationWillBecomeActive:(NSNotification *)aNotification; + +// NSPort delegate +- (void)handlePortMessage:(NSPortMessage *)portMessage; + +@end + Index: xc/programs/Xserver/hw/darwin/bundle/Xserver.m diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/Xserver.m:1.18 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Xserver.m Wed May 16 02:10:08 2001 @@ -0,0 +1,426 @@ +// +// Xserver.m +// +// This class handles the interaction between the Cocoa front-end +// and the Darwin X server thread. +// +// Created by Andreas Monitzer on January 6, 2001. +// +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Xserver.m,v 1.18 2001/05/16 06:10:08 torrey Exp $ */ + +#import "Xserver.h" +#import "Preferences.h" +#import "quartzShared.h" + +// Macros to build the path name +#ifndef XBINDIR +#define XBINDIR /usr/X11R6/bin +#endif +#define STR(s) #s +#define XSTRPATH(s) STR(s) +#define XPATH(file) XSTRPATH(XBINDIR) "/" STR(file) + +extern int argcGlobal; +extern char **argvGlobal; +extern char **envpGlobal; +extern int main(int argc, char *argv[], char *envp[]); +extern void HideMenuBar(void); +extern void ShowMenuBar(void); + +static NSPortMessage *signalMessage; + +@implementation Xserver + +- (id)init { + self=[super init]; + + serverLock = [[NSLock alloc] init]; + clientTask = nil; + serverVisible = NO; + appQuitting = NO; + mouseState = 0; + eventWriteFD = quartzEventWriteFD; + + // set up a port to safely send messages to main thread from server thread + signalPort = [[NSPort port] retain]; + signalMessage = [[NSPortMessage alloc] initWithSendPort:signalPort receivePort:signalPort components:nil]; + + // set up receiving end + [signalPort setDelegate:self]; + [[NSRunLoop currentRunLoop] addPort:signalPort forMode:NSDefaultRunLoopMode]; + [[NSRunLoop currentRunLoop] addPort:signalPort forMode:NSModalPanelRunLoopMode]; + + return self; +} + +- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender { + // Quit if the X server is not running + if ([serverLock tryLock]) + return NSTerminateNow; + + if ([clientTask isRunning] || !quartzStartClients) { + int but; + + [self hide]; + but = NSRunAlertPanel(NSLocalizedString(@"Quit X server?",@""), + NSLocalizedString(@"Quitting the X server will terminate any running X Window programs.",@""), + NSLocalizedString(@"Quit",@""), + NSLocalizedString(@"Cancel",@""), + nil); + + switch (but) { + case NSAlertDefaultReturn: // quit + break; + case NSAlertAlternateReturn: // cancel + return NSTerminateCancel; + } + } + + appQuitting = YES; + [self killServer]; + + // Wait until the X server shuts down + return NSTerminateLater; +} + +// returns YES when event was handled +- (BOOL)translateEvent:(NSEvent *)anEvent { + NXEvent ev; + + if(([anEvent type]==NSKeyDown) && (![anEvent isARepeat]) && + ([anEvent keyCode]==[Preferences keyCode]) && + ([anEvent modifierFlags]==[Preferences modifiers])) { + [self toggle]; + return YES; + } + + if(!serverVisible) + return NO; + + [self getNXMouse:&ev]; + ev.type=[anEvent type]; + ev.flags=[anEvent modifierFlags]; + switch(ev.type) { + case NSLeftMouseDown: + case NSLeftMouseUp: + case NSMouseMoved: + break; + case NSLeftMouseDragged: + case NSRightMouseDragged: + case 27: // undocumented high button MouseDragged event + ev.type=NSMouseMoved; + break; + case NSSystemDefined: + if (![anEvent subtype]==7) + return NO; // we only use multibutton mouse events + if ([anEvent data1] & 1) + return NO; // skip mouse button 1 events + if (mouseState==[anEvent data2]) + return NO; // ignore double events + ev.data.compound.subType=[anEvent subtype]; + ev.data.compound.misc.L[0]=[anEvent data1]; + ev.data.compound.misc.L[1]=mouseState=[anEvent data2]; + break; + case NSScrollWheel: + ev.data.scrollWheel.deltaAxis1=[anEvent deltaY]; + break; + case NSKeyDown: + case NSKeyUp: + ev.data.key.keyCode = [anEvent keyCode]; + ev.data.key.repeat = [anEvent isARepeat]; + break; + case NSFlagsChanged: + ev.data.key.keyCode = [anEvent keyCode]; + break; + case 25: // undocumented MouseDown + case 26: // undocumented MouseUp + // Hide these from AppKit to avoid its log messages + return YES; + default: + return NO; + } + + [self sendNXEvent:&ev]; + + return YES; +} + +- (void)getNXMouse:(NXEvent*)ev { + NSPoint pt=[NSEvent mouseLocation]; + ev->location.x=(int)(pt.x); + ev->location.y=[[NSScreen mainScreen] frame].size.height-(int)(pt.y); // invert mouse +} + +// Append a string to the given enviroment variable ++ (void)append:(NSString*)value toEnv:(NSString*)name { + setenv([name cString], + [[[NSString stringWithCString:getenv([name cString])] + stringByAppendingString:value] cString],1); +} + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + // Start the X server thread + [NSThread detachNewThreadSelector:@selector(run) toTarget:self withObject:nil]; + + // If we are going to display a splash screen, hide the X11 screen immediately + if ([Preferences startupHelp]) + [self sendShowHide:NO]; + + // Start the X clients if started from GUI + if (quartzStartClients) { + char *home; + char xinitrcbuf[PATH_MAX]; + NSString *path = [NSString stringWithCString:XPATH(xinit)]; + NSString *server = [NSString stringWithCString:XPATH(XDarwinStartup)]; + NSString *client, *displayName; + BOOL hasClient = YES; + NSArray *args; + + // Register to receive notification when the client task finishes + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(clientTaskDone:) + name:NSTaskDidTerminateNotification + object:nil]; + + // Change to user's home directory (so xterms etc. start there) + home = getenv("HOME"); + if (home) + chdir(home); + else + home = ""; + + // Add X binary directory to path + [Xserver append:@":" toEnv:@"PATH"]; + [Xserver append:@XSTRPATH(XBINDIR) toEnv:@"PATH"]; + + displayName = [NSString localizedStringWithFormat:@":%d", + [Preferences display]]; + + // Find the client init file to use + snprintf(xinitrcbuf, PATH_MAX, "%s/.xinitrc", home); + if (access(xinitrcbuf, F_OK)) { + snprintf(xinitrcbuf, PATH_MAX, XSTRPATH(XINITDIR) "/xinitrc"); + if (access(xinitrcbuf, F_OK)) { + hasClient = NO; + } + } + if (hasClient) { + client = [NSString stringWithCString:xinitrcbuf]; + args = [NSArray arrayWithObjects:client, @"--", server, + displayName, @"-idle", nil]; + } else { + args = [NSArray arrayWithObjects:@"--", server, displayName, + @"-idle", nil]; + } + + // Launch a new task to run start X clients + clientTask = [NSTask launchedTaskWithLaunchPath:path arguments:args]; + } + + // Make sure the menu bar gets drawn + [NSApp setWindowsNeedUpdate:YES]; + + // Show the X switch window if not using dock icon switching + if (![Preferences dockSwitch]) + [switchWindow orderFront:nil]; + + // Display the help splash screen or show the X server + if ([Preferences startupHelp]) { + [helpWindow makeKeyAndOrderFront:nil]; + } else { + ShowMenuBar(); + [self closeHelpAndShow:nil]; + } +} + +// Run the X server thread +- (void)run { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + [serverLock lock]; + main(argcGlobal, argvGlobal, envpGlobal); + serverVisible = NO; + [serverLock unlock]; + [pool release]; + QuartzMessageMainThread(kQuartzServerDied); +} + +// Close the help splash screen and show the X server +- (IBAction)closeHelpAndShow:(id)sender { + int helpVal; + + helpVal = [startupHelpButton intValue]; + [Preferences setStartupHelp:helpVal]; + [Preferences saveToDisk]; + + [helpWindow close]; + + serverVisible = YES; + [self sendShowHide:YES]; + [NSApp activateIgnoringOtherApps:YES]; +} + +// Show the X server when sent message from GUI +- (IBAction)showAction:(id)sender { + [self sendShowHide:YES]; +} + +// Show or hide the X server +- (void)toggle { + if (serverVisible) + [self hide]; + else + [self show]; +} + +// Show the X server on screen +- (void)show { + if (!serverVisible) { + [self sendShowHide:YES]; + } +} + +// Hide the X server from the screen +- (void)hide { + if (serverVisible) { + [self sendShowHide:NO]; + } +} + +// Kill the Xserver thread +- (void)killServer { + NXEvent ev; + + if (serverVisible) + [self hide]; + + ev.type = NX_APPDEFINED; + ev.data.compound.subType = kXDarwinQuit; + [self sendNXEvent:&ev]; +} + +// Tell the X server to show or hide itself. +// This ignores the current X server visible state. +- (void)sendShowHide:(BOOL)show { + NXEvent ev; + + [self getNXMouse:&ev]; + ev.type = NX_APPDEFINED; + + if (show) { + QuartzCapture(); + HideMenuBar(); + ev.data.compound.subType = kXDarwinShow; + [self sendNXEvent:&ev]; + + // inform the X server of the current modifier state + ev.flags = [[NSApp currentEvent] modifierFlags]; + ev.data.compound.subType = kXDarwinUpdateModifiers; + [self sendNXEvent:&ev]; + + // put the pasteboard into the X cut buffer + [self readPasteboard]; + } else { + // put the X cut buffer on the pasteboard + [self writePasteboard]; + + ev.data.compound.subType = kXDarwinHide; + [self sendNXEvent:&ev]; + ShowMenuBar(); + } + + serverVisible = show; +} + +// Tell the X server to read from the pasteboard into the X cut buffer +- (void)readPasteboard +{ + NXEvent ev; + + ev.type = NX_APPDEFINED; + ev.data.compound.subType = kXDarwinReadPasteboard; + [self sendNXEvent:&ev]; +} + +// Tell the X server to write the X cut buffer into the pasteboard +- (void)writePasteboard +{ + NXEvent ev; + + ev.type = NX_APPDEFINED; + ev.data.compound.subType = kXDarwinWritePasteboard; + [self sendNXEvent:&ev]; +} + +- (void)sendNXEvent:(NXEvent*)ev { + if (write(eventWriteFD, ev, sizeof(*ev)) == sizeof(*ev)) + return; + NSLog(@"Bad write to event pipe."); + // FIXME: handle bad writes better? +} + +// Handle messages from the X server thread +- (void)handlePortMessage:(NSPortMessage *)portMessage { + unsigned msg = [portMessage msgid]; + + switch(msg) { + case kQuartzServerHidden: + // FIXME: This hack is necessary (but not completely effective) + // since Mac OS X 10.0.2 + [NSCursor unhide]; + break; + case kQuartzServerDied: + if (appQuitting) { + // If we quit before the clients start, they may sit and wait + // for the X server to start. Kill them instead. + if ([clientTask isRunning]) + [clientTask terminate]; + [NSApp replyToApplicationShouldTerminate:YES]; + } else { + [NSApp terminate:nil]; // quit if we aren't already + } + break; + default: + NSLog(@"Unknown message from server thread."); + } +} + +// Quit the X server when the X client task finishes +- (void)clientTaskDone:(NSNotification *)aNotification { + // Make sure it was the client task that finished + if (![clientTask isRunning]) { + int status = [[aNotification object] terminationStatus]; + + if (status != 0) + NSLog(@"X client task terminated abnormally."); + + if (!appQuitting) + [NSApp terminate:nil]; // quit if we aren't already + } +} + +// Called when the user clicks the application icon, but not when Cmd-Tab is used +- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag { + if ([Preferences dockSwitch]) { + [self show]; + } + return NO; +} + +- (void)applicationWillResignActive:(NSNotification *)aNotification { + [self hide]; +} + +- (void)applicationWillBecomeActive:(NSNotification *)aNotification { + [self readPasteboard]; +} + +@end + +// Send a message to the main thread, which calls handlePortMessage in +// response. Must only be called from the X server thread because +// NSPort is not thread safe. +void QuartzMessageMainThread(unsigned msg) { + [signalMessage setMsgid:msg]; + [signalMessage sendBeforeDate:[NSDate distantPast]]; +} Index: xc/programs/Xserver/hw/darwin/bundle/quartz.c diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/quartz.c:1.9 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartz.c Wed May 16 02:10:08 2001 @@ -0,0 +1,245 @@ +/************************************************************** + * + * Quartz-specific support for the Darwin X Server + * + * By Gregory Robert Parker + * + **************************************************************/ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartz.c,v 1.9 2001/05/16 06:10:08 torrey Exp $ */ + +// X headers +#include "scrnintstr.h" + +// System headers +#include +#include +#include +#include + +// We need CoreGraphics in ApplicationServices, but we leave out +// QuickDraw, which has symbol conflicts with the basic X includes. +#define __QD__ +#define __PRINTCORE__ +#include + +#include "../darwin.h" +#include "quartz.h" +#include "quartzAudio.h" +#include "quartzCursor.h" + +#define kDarwinMaxScreens 100 +static ScreenPtr darwinScreens[kDarwinMaxScreens]; +static int darwinNumScreens = 0; +static BOOL xhidden = FALSE; + + +/* + * QuartzStoreColors + * FIXME: need to implement if Quartz supports PsuedoColor + */ +static void QuartzStoreColors( + ColormapPtr pmap, + int numEntries, + xColorItem *pdefs) +{ +} + +/* +=========================================================================== + + Screen functions + +=========================================================================== +*/ + +/* + * QuartzPMThread + * Handle power state notifications, FIXME + */ +#if 0 +static void *QuartzPMThread(void *arg) +{ + for (;;) { + mach_msg_return_t kr; + mach_msg_empty_rcv_t msg; + + kr = mach_msg((mach_msg_header_t*) &msg, MACH_RCV_MSG, 0, + sizeof(msg), pmNotificationPort, 0, MACH_PORT_NULL); + kern_assert(kr); + + // computer just woke up + if (msg.header.msgh_id == 1) { + if (!xhidden) { + int i; + + for (i = 0; i < darwinNumScreens; i++) { + if (darwinScreens[i]) + xf86SetRootClip(darwinScreens[i], true); + } + } + } + } + return NULL; +} +#endif + + +/* + * QuartzAddScreen + * Quartz keeps a list of all screens for QuartzShow and QuartzHide. + * FIXME: So does ddx, use that instead. + */ +Bool QuartzAddScreen(ScreenPtr pScreen) +{ + if (darwinNumScreens == kDarwinMaxScreens) { + return FALSE; + } + + darwinScreens[darwinNumScreens++] = pScreen; + + // setup cursor support + if (! QuartzInitCursor(pScreen)) { + return FALSE; + } + + // initialize colormap handling as needed + if (dfb.pixelInfo.pixelType == kIOCLUTPixels) { + pScreen->StoreColors = QuartzStoreColors; + } + + return TRUE; +} + + +/* + * QuartzCapture + * Capture the screen so we can draw. + */ +void QuartzCapture(void) +{ + if (! CGDisplayIsCaptured(kCGDirectMainDisplay)) { + CGDisplayCapture(kCGDirectMainDisplay); + } +} + + +/* + * QuartzRelease + * Release the screen so others can draw. + */ +static void QuartzRelease(void) +{ + if (CGDisplayIsCaptured(kCGDirectMainDisplay)) { + CGDisplayRelease(kCGDirectMainDisplay); + } + QuartzMessageMainThread(kQuartzServerHidden); +} + + +/* + * QuartzDisplayInit + * Init the framebuffer and claim the display from CoreGraphics. + */ +static void QuartzDisplayInit(void) +{ + dfb.pixelInfo.pixelType = kIORGBDirectPixels; + dfb.pixelInfo.bitsPerComponent=CGDisplayBitsPerSample(kCGDirectMainDisplay); + dfb.pixelInfo.componentCount=CGDisplaySamplesPerPixel(kCGDirectMainDisplay); +#if FALSE + // FIXME: endian and 24 bit color specific + dfb.pixelInfo.componentMasks[0] = 0x00ff0000; + dfb.pixelInfo.componentMasks[1] = 0x0000ff00; + dfb.pixelInfo.componentMasks[2] = 0x000000ff; +#endif + + dfb.width = CGDisplayPixelsWide(kCGDirectMainDisplay); + dfb.height = CGDisplayPixelsHigh(kCGDirectMainDisplay); + dfb.pitch = CGDisplayBytesPerRow(kCGDirectMainDisplay); + dfb.bitsPerPixel = CGDisplayBitsPerPixel(kCGDirectMainDisplay); + dfb.colorBitsPerPixel = (dfb.pixelInfo.componentCount * + dfb.pixelInfo.bitsPerComponent); + + dfb.framebuffer = CGDisplayBaseAddress(kCGDirectMainDisplay); + + // need to capture because X doesn't like read-only framebuffer... + QuartzCapture(); + atexit(QuartzRelease); +} + + +/* + * QuartzOsVendorInit + * Quartz display initialization. + */ +void QuartzOsVendorInit(void) +{ + ErrorF("Display mode: Quartz\n"); + + QuartzAudioInit(); + QuartzDisplayInit(); +} + + +/* + * QuartzShow + * Show the X server on screen. Does nothing if already shown. + * Restore the X clip regions the X server cursor state. + */ +void QuartzShow( + int x, // cursor location + int y ) +{ + int i; + + if (xhidden) { + for (i = 0; i < darwinNumScreens; i++) { + if (darwinScreens[i]) { + xf86SetRootClip(darwinScreens[i], true); + QuartzResumeXCursor(darwinScreens[i], x, y); + } + } + } + xhidden = FALSE; +} + + +/* + * QuartzHide + * Remove the X server display from the screen. Does nothing if already hidden. + * Release the screen, set X clip regions to prevent drawing, and restore the + * Aqua cursor. + */ +void QuartzHide(void) +{ + int i; + + if (!xhidden) { + for (i = 0; i < darwinNumScreens; i++) { + if (darwinScreens[i]) { + QuartzSuspendXCursor(darwinScreens[i]); + xf86SetRootClip(darwinScreens[i], false); + } + } + } + QuartzRelease(); + xhidden = TRUE; +} + + +/* + * QuartzGiveUp + * Cleanup before X server shutdown + * Release the screen and restore the Aqua cursor. + */ +void QuartzGiveUp(void) +{ + int i; + + for (i = 0; i < darwinNumScreens; i++) { + if (darwinScreens[i]) { + QuartzSuspendXCursor(darwinScreens[i]); + } + } + QuartzRelease(); +} + Index: xc/programs/Xserver/hw/darwin/bundle/quartz.h diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/quartz.h:1.3 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartz.h Wed Apr 11 04:34:18 2001 @@ -0,0 +1,22 @@ +/* + quartz.h + + Quartz-specific functions and definitions +*/ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartz.h,v 1.3 2001/04/11 08:34:18 torrey Exp $ */ + +#ifndef _QUARTZ_H +#define _QUARTZ_H + +#include "X11/Xproto.h" +#include "screenint.h" +#include "quartzShared.h" +#include "quartzPasteboard.h" + +void QuartzOsVendorInit(void); +Bool QuartzAddScreen(ScreenPtr screen); +void QuartzGiveUp(void); +void QuartzHide(void); +void QuartzShow(int x, int y); + +#endif Index: xc/programs/Xserver/hw/darwin/bundle/quartzAudio.c diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/quartzAudio.c:1.3 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartzAudio.c Sat Apr 7 14:01:29 2001 @@ -0,0 +1,315 @@ +// +// QuartzAudio.m +// +// X Window bell support using CoreAudio or AppKit. +// Greg Parker gparker@cs.stanford.edu 19 Feb 2001 +// +// Info about sine wave sound playback: +// CoreAudio code derived from macosx-dev posting by Tim Wood +// http://www.omnigroup.com/mailman/archive/macosx-dev/2000-May/002004.html +// Smoothing transitions between sounds +// http://www.wam.umd.edu/~mphoenix/dss/dss.html +// +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzAudio.c,v 1.3 2001/04/07 18:01:29 torrey Exp $ */ + +#include +#include + +#include "inputstr.h" +#include "extensions/XI.h" + +#include "quartzAudio.h" +#include "quartzShared.h" + +typedef struct QuartzAudioRec { + double frequency; + double amplitude; + + UInt32 curFrame; + UInt32 remainingFrames; + UInt32 totalFrames; + UInt32 bytesPerFrame; + double sampleRate; + UInt32 fadeLength; + + UInt32 bufferByteCount; + Boolean playing; + pthread_mutex_t lock; + + // used to fade out interrupted sound and avoid 'pop' + double prevFrequency; + double prevAmplitude; + UInt32 prevFrame; +} QuartzAudioRec; + +static AudioDeviceID quartzAudioDevice = kAudioDeviceUnknown; +static QuartzAudioRec data; + + +/* + * QuartzAudioEnvelope + * Fade sound in and out to avoid pop. + * Sounds with shorter duration will never reach full amplitude. Deal. + */ +static double QuartzAudioEnvelope( + UInt32 curFrame, + UInt32 totalFrames, + UInt32 fadeLength ) +{ + double fadeFrames = min(fadeLength, totalFrames / 2); + if (fadeFrames < 1) return 0; + + if (curFrame < fadeFrames) { + return curFrame / fadeFrames; + } else if (curFrame > totalFrames - fadeFrames) { + return (totalFrames-curFrame) / fadeFrames; + } else { + return 1.0; + } +} + + +/* + * QuartzFillBuffer + * Fill this buffer with data and update the data position. + * FIXME: this is ugly + */ +static void QuartzFillBuffer( + AudioBuffer *audiobuffer, + QuartzAudioRec *data ) +{ + float *buffer, *b; + unsigned int frame, frameCount; + unsigned int bufferFrameCount; + float multiplier, v; + int i; + + buffer = (float *)audiobuffer->mData; + bufferFrameCount = audiobuffer->mDataByteSize / data->bytesPerFrame; + + frameCount = min(bufferFrameCount, data->remainingFrames); + + // Fade out previous sine wave, if any. + b = buffer; + if (data->prevFrame) { + multiplier = 2*M_PI*(data->prevFrequency/data->sampleRate); + for (frame = 0; frame < data->fadeLength; frame++) { + v = data->prevAmplitude * + QuartzAudioEnvelope(frame+data->fadeLength, + 2*data->fadeLength, + data->fadeLength) * + sin(multiplier * (data->prevFrame+frame)); + for (i = 0; i < audiobuffer->mNumberChannels; i++) { + *b++ = v; + } + } + // no more prev fade + data->prevFrame = 0; + + // adjust for space eaten by prev fade + buffer += audiobuffer->mNumberChannels*frame; + bufferFrameCount -= frame; + frameCount = min(bufferFrameCount, data->remainingFrames); + } + + // Write a sine wave with the specified frequency and amplitude + multiplier = 2*M_PI*(data->frequency/data->sampleRate); + for (frame = 0; frame < frameCount; frame++) { + v = data->amplitude * + QuartzAudioEnvelope(data->curFrame+frame, data->totalFrames, + data->fadeLength) * + sin(multiplier * (data->curFrame+frame)); + for (i = 0; i < audiobuffer->mNumberChannels; i++) { + *b++ = v; + } + } + + // Zero out the rest of the buffer, if any + memset(b, 0, sizeof(float) * audiobuffer->mNumberChannels * + (bufferFrameCount-frame)); + + data->curFrame += frameCount; + data->remainingFrames -= frameCount; + if (data->remainingFrames == 0) { + data->playing = FALSE; + data->curFrame = 0; + } +} + + +/* + * QuartzAudioIOProc + * Callback function for audio playback. + * FIXME: use inOutputTime to correct for skipping + */ +static OSStatus +QuartzAudioIOProc( + AudioDeviceID inDevice, + const AudioTimeStamp *inNow, + const AudioBufferList *inInputData, + const AudioTimeStamp *inInputTime, + AudioBufferList *outOutputData, + const AudioTimeStamp *inOutputTime, + void *inClientData ) +{ + QuartzAudioRec *data = (QuartzAudioRec *)inClientData; + int i; + Boolean wasPlaying; + + pthread_mutex_lock(&data->lock); + wasPlaying = data->playing; + for (i = 0; i < outOutputData->mNumberBuffers; i++) { + if (data->playing) { + QuartzFillBuffer(outOutputData->mBuffers+i, data); + } + else { + memset(outOutputData->mBuffers[i].mData, 0, + outOutputData->mBuffers[i].mDataByteSize); + } + } + if (wasPlaying && !data->playing) { + OSStatus err; + err = AudioDeviceStop(inDevice, QuartzAudioIOProc); + } + pthread_mutex_unlock(&data->lock); + return 0; +} + + +/* + * QuartzCoreAudioBell + * Play a tone using the CoreAudio API + */ +static void QuartzCoreAudioBell( + int volume, // volume is % of max + int pitch, // pitch is Hz + int duration ) // duration is milliseconds +{ + if (quartzAudioDevice == kAudioDeviceUnknown) return; + + pthread_mutex_lock(&data.lock); + + // fade previous sound, if any + data.prevFrequency = data.frequency; + data.prevAmplitude = data.amplitude; + data.prevFrame = data.curFrame; + + // set new sound + data.frequency = pitch; + data.amplitude = volume / 100.0; + data.curFrame = 0; + data.totalFrames = (int)(data.sampleRate * duration / 1000.0); + data.remainingFrames = data.totalFrames; + + if (! data.playing) { + OSStatus status; + status = AudioDeviceStart(quartzAudioDevice, QuartzAudioIOProc); + if (status) { + ErrorF("QuartzAudioBell: AudioDeviceStart returned %d\n", status); + } else { + data.playing = TRUE; + } + } + pthread_mutex_unlock(&data.lock); +} + + +/* + * QuartzBell + * Ring the bell + */ +void QuartzBell( + int volume, // volume in percent of max + DeviceIntPtr pDevice, + pointer ctrl, + int class ) +{ + int pitch; // pitch in Hz + int duration; // duration in milliseconds + + if (class == BellFeedbackClass) { + pitch = ((BellCtrl*)ctrl)->pitch; + duration = ((BellCtrl*)ctrl)->duration; + } else if (class == KbdFeedbackClass) { + pitch = ((KeybdCtrl*)ctrl)->bell_pitch; + duration = ((KeybdCtrl*)ctrl)->bell_duration; + } else { + ErrorF("QuartzBell: bad bell class %d\n", class); + return; + } + + if (quartzUseSysBeep) { + if (volume) + NSBeep(); + } else { + QuartzCoreAudioBell(volume, pitch, duration); + } +} + + +/* + * QuartzAudioInit + * Prepare to play the bell with the CoreAudio API + */ +void QuartzAudioInit(void) +{ + UInt32 propertySize; + OSStatus status; + AudioDeviceID outputDevice; + AudioStreamBasicDescription outputStreamDescription; + double sampleRate; + + // Get the default output device + propertySize = sizeof(outputDevice); + status = AudioHardwareGetProperty( + kAudioHardwarePropertyDefaultOutputDevice, + &propertySize, &outputDevice); + if (status) { + ErrorF("QuartzAudioInit: AudioHardwareGetProperty returned %d\n", + status); + return; + } + if (outputDevice == kAudioDeviceUnknown) { + ErrorF("QuartzAudioInit: No audio output devices available.\n"); + return; + } + + // Get the basic device description + propertySize = sizeof(outputStreamDescription); + status = AudioDeviceGetProperty(outputDevice, 0, FALSE, + kAudioDevicePropertyStreamFormat, + &propertySize, &outputStreamDescription); + if (status) { + ErrorF("QuartzAudioInit: GetProperty(stream format) returned %d\n", + status); + return; + } + sampleRate = outputStreamDescription.mSampleRate; + + // Fill in the playback data + data.frequency = 0; + data.amplitude = 0; + data.curFrame = 0; + data.remainingFrames = 0; + data.bytesPerFrame = outputStreamDescription.mBytesPerFrame; + data.sampleRate = sampleRate; + // data.bufferByteCount = bufferByteCount; + data.playing = FALSE; + data.prevAmplitude = 0; + data.prevFrame = 0; + data.prevFrequency = 0; + data.fadeLength = data.sampleRate / 200; + pthread_mutex_init(&data.lock, NULL); // fixme error check + + // fixme assert fadeLength + +#import "Preferences.h" +#include "quartzShared.h" + +extern void FatalError(const char *, ...); +extern char *display; + +// Read the user preferences from the Cocoa front end +void QuartzReadPreferences(void) +{ + char *fileString; + + darwinFakeButtons = [Preferences fakeButtons]; + quartzUseSysBeep = [Preferences systemBeep]; + + if ([Preferences useKeymapFile]) { + fileString = (char *) [[Preferences keymapFile] lossyCString]; + darwinKeymapFile = (char *) malloc(strlen(fileString)+1); + if (! darwinKeymapFile) + FatalError("malloc failed in QuartzReadPreferences()!\n"); + strcpy(darwinKeymapFile, fileString); + } + + display = (char *) malloc(8); + if (! display) + FatalError("malloc failed in QuartzReadPreferences()!\n"); + snprintf(display, 8, "%i", [Preferences display]); +} + +// Write text to the Mac OS X pasteboard. +void QuartzWriteCocoaPasteboard(char *text) +{ + NSPasteboard *pasteboard; + NSArray *pasteboardTypes; + NSString *string; + + if (! text) return; + pasteboard = [NSPasteboard generalPasteboard]; + if (! pasteboard) return; + string = [NSString stringWithCString:text]; + if (! string) return; + pasteboardTypes = [NSArray arrayWithObject:NSStringPboardType]; + + // nil owner because we don't provide type translations + [pasteboard declareTypes:pasteboardTypes owner:nil]; + [pasteboard setString:string forType:NSStringPboardType]; +} + +// Read text from the Mac OS X pasteboard and return it as a heap string. +// The caller must free the string. +char *QuartzReadCocoaPasteboard(void) +{ + NSPasteboard *pasteboard; + NSArray *pasteboardTypes; + NSString *existingType; + char *text = NULL; + + pasteboardTypes = [NSArray arrayWithObject:NSStringPboardType]; + pasteboard = [NSPasteboard generalPasteboard]; + if (! pasteboard) return NULL; + + existingType = [pasteboard availableTypeFromArray:pasteboardTypes]; + if (existingType) { + NSString *string = [pasteboard stringForType:existingType]; + char *buffer; + + if (! string) return NULL; + buffer = (char *) [string lossyCString]; + text = (char *) malloc(strlen(buffer)+1); + if (text) + strcpy(text, buffer); + } + + return text; +} Index: xc/programs/Xserver/hw/darwin/bundle/quartzCursor.c diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/quartzCursor.c:1.4 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartzCursor.c Wed May 9 03:16:19 2001 @@ -0,0 +1,501 @@ +/************************************************************** + * + * Support for using the Quartz Window Manager cursor + * + **************************************************************/ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzCursor.c,v 1.4 2001/05/09 07:16:19 torrey Exp $ */ + +#include "mi.h" +#include "scrnintstr.h" +#include "cursorstr.h" +#include "mipointrst.h" + +#include "quartzCursor.h" + +#undef AllocCursor +#define Cursor QD_Cursor +#define WindowPtr QD_WindowPtr +#include + +// Size of the QuickDraw cursor +#define CURSORWIDTH 16 +#define CURSORHEIGHT 16 + +typedef struct { + int qdCursorMode; + int qdCursorVisible; + int serverVisible; + CursorPtr latentCursor; + QueryBestSizeProcPtr QueryBestSize; + miPointerSpriteFuncPtr spriteFuncs; +} QuartzCursorScreenRec, *QuartzCursorScreenPtr; + +static int darwinCursorScreenIndex = -1; +static unsigned long darwinCursorGeneration = 0; +static QD_Cursor gQDArrow; // QuickDraw arrow cursor + +#define CURSOR_PRIV(pScreen) \ + ((QuartzCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr) +#define HIDE_QD_CURSOR(display, visible) \ + if (visible) { CGDisplayHideCursor(display); visible = FALSE; } +#define SHOW_QD_CURSOR(display, visible) \ + CGDisplayShowCursor(display); visible = TRUE; + + +/* + * MakeQDCursor helpers: CTAB_ENTER, interleave + */ + +// Add a color entry to a ctab +#define CTAB_ENTER(ctab, index, r, g, b) \ + ctab->ctTable[index].rgb.red = r; \ + ctab->ctTable[index].rgb.green = g; \ + ctab->ctTable[index].rgb.blue = b + +// Make an unsigned short by interleaving the bits of bytes c1 and c2. +// High bit of c1 is first; low bit of c2 is last. +// Interleave is a built-in INTERCAL operator. +static unsigned short +interleave( + unsigned char c1, + unsigned char c2 ) +{ + return + ((c1 & 0x80) << 8) | ((c2 & 0x80) << 7) | + ((c1 & 0x40) << 7) | ((c2 & 0x40) << 6) | + ((c1 & 0x20) << 6) | ((c2 & 0x20) << 5) | + ((c1 & 0x10) << 5) | ((c2 & 0x10) << 4) | + ((c1 & 0x08) << 4) | ((c2 & 0x08) << 3) | + ((c1 & 0x04) << 3) | ((c2 & 0x04) << 2) | + ((c1 & 0x02) << 2) | ((c2 & 0x02) << 1) | + ((c1 & 0x01) << 1) | ((c2 & 0x01) << 0) ; +} + +/* + * MakeQDCursor + * Make a QuickDraw color cursor from the given X11 cursor. + * Warning: This code is nasty. Color cursors were meant to be read + * from resources; constructing the structures programmatically is messy. + */ +/* + QuickDraw cursor representation: + Our color cursor is a 2 bit per pixel pixmap. + Each pixel's bits are (source<<1 | mask) from the original X cursor pixel. + The cursor's color table maps the colors like this: + (2-bit value | X result | colortable | Mac result) + 00 | transparent | white | transparent (white outside mask) + 01 | back color | back color | back color + 10 | undefined | black | invert background (just for fun) + 11 | fore color | fore color | fore color +*/ +static CCrsrHandle +MakeQDCursor( + CursorPtr pCursor ) +{ + CCrsrHandle result; + CCrsrPtr curs; + int i, w, h; + unsigned short rowMask; + PixMap *pix; + ColorTable *ctab; + unsigned short *image; + + result = (CCrsrHandle) NewHandleClear(sizeof(CCrsr)); + if (!result) return NULL; + HLock((Handle)result); + curs = *result; + + // Initialize CCrsr + curs->crsrType = 0x8001; // 0x8000 = b&w, 0x8001 = color + curs->crsrMap = (PixMapHandle) NewHandleClear(sizeof(PixMap)); + if (!curs->crsrMap) goto pixAllocFailed; + HLock((Handle)curs->crsrMap); + pix = *curs->crsrMap; + curs->crsrData = NULL; // raw cursor image data (set below) + curs->crsrXData = NULL; // QD's processed data + curs->crsrXValid = 0; // zero means QD must re-process cursor data + curs->crsrXHandle = NULL; // reserved + memset(curs->crsr1Data, 0, CURSORWIDTH*CURSORHEIGHT/8); // b&w data + memset(curs->crsrMask, 0, CURSORWIDTH*CURSORHEIGHT/8); // b&w & color mask + curs->crsrHotSpot.h = min(CURSORWIDTH, pCursor->bits->xhot); // hot spot + curs->crsrHotSpot.v = min(CURSORHEIGHT, pCursor->bits->yhot); // hot spot + curs->crsrXTable = 0; // reserved + curs->crsrID = GetCTSeed(); // unique ID from Color Manager + + // Set the b&w data and mask + w = min(pCursor->bits->width, CURSORWIDTH); + h = min(pCursor->bits->height, CURSORHEIGHT); + rowMask = ~((1 << (CURSORWIDTH - w)) - 1); + for (i = 0; i < h; i++) { + curs->crsr1Data[i] = rowMask & + ((pCursor->bits->source[i*4]<<8) | pCursor->bits->source[i*4+1]); + curs->crsrMask[i] = rowMask & + ((pCursor->bits->mask[i*4]<<8) | pCursor->bits->mask[i*4+1]); + } + + // Set the color data and mask + // crsrMap: defines bit depth and size and colortable only + pix->rowBytes = (CURSORWIDTH * 2 / 8) | 0x8000; // last bit on means PixMap + SetRect(&pix->bounds, 0, 0, CURSORWIDTH, CURSORHEIGHT); // see TN 1020 + pix->pixelSize = 2; + pix->cmpCount = 1; + pix->cmpSize = 2; + // pix->pmTable set below + + // crsrData is the pixel data. crsrMap's baseAddr is not used. + curs->crsrData = NewHandleClear(CURSORWIDTH*CURSORHEIGHT * 2 / 8); + if (!curs->crsrData) goto imageAllocFailed; + HLock((Handle)curs->crsrData); + image = (unsigned short *) *curs->crsrData; + // Pixel data is just 1-bit data and mask interleaved (see above) + for (i = 0; i < h; i++) { + unsigned char s, m; + s = pCursor->bits->source[i*4] & (rowMask >> 8); + m = pCursor->bits->mask[i*4] & (rowMask >> 8); + image[2*i] = interleave(s, m); + s = pCursor->bits->source[i*4+1] & (rowMask & 0x00ff); + m = pCursor->bits->mask[i*4+1] & (rowMask & 0x00ff); + image[2*i+1] = interleave(s, m); + } + + // Build the color table (entries described above) + // NewPixMap allocates a color table handle. + pix->pmTable = (CTabHandle) NewHandleClear(sizeof(ColorTable) + 3 + * sizeof(ColorSpec)); + if (!pix->pmTable) goto ctabAllocFailed; + HLock((Handle)pix->pmTable); + ctab = *pix->pmTable; + ctab->ctSeed = GetCTSeed(); + ctab->ctFlags = 0; + ctab->ctSize = 3; // color count - 1 + CTAB_ENTER(ctab, 0, 0xffff, 0xffff, 0xffff); + CTAB_ENTER(ctab, 1, pCursor->backRed, pCursor->backGreen, + pCursor->backBlue); + CTAB_ENTER(ctab, 2, 0x0000, 0x0000, 0x0000); + CTAB_ENTER(ctab, 3, pCursor->foreRed, pCursor->foreGreen, + pCursor->foreBlue); + + HUnlock((Handle)pix->pmTable); // ctab + HUnlock((Handle)curs->crsrData); // image data + HUnlock((Handle)curs->crsrMap); // pix + HUnlock((Handle)result); // cursor + + return result; + + // "What we have here is a failure to allocate" +ctabAllocFailed: + HUnlock((Handle)curs->crsrData); + DisposeHandle((Handle)curs->crsrData); +imageAllocFailed: + HUnlock((Handle)curs->crsrMap); + DisposeHandle((Handle)curs->crsrMap); +pixAllocFailed: + HUnlock((Handle)result); + DisposeHandle((Handle)result); + return NULL; +} + + +/* +=========================================================================== + + Pointer sprite functions + +=========================================================================== +*/ + +/* + * QuartzRealizeCursor + * Convert the X cursor representation to QuickDraw format if possible. + */ +Bool +QuartzRealizeCursor( + ScreenPtr pScreen, + CursorPtr pCursor ) +{ + CCrsrHandle qdCursor; + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + if(!pCursor || !pCursor->bits) + return FALSE; + + // if the cursor is too big we use a software cursor + if ((pCursor->bits->height > CURSORHEIGHT) || + (pCursor->bits->width > CURSORWIDTH)) + return (*ScreenPriv->spriteFuncs->RealizeCursor)(pScreen, pCursor); + + // make new cursor image + qdCursor = MakeQDCursor(pCursor); + if (!qdCursor) return FALSE; + + // save the result + pCursor->devPriv[pScreen->myNum] = (pointer) qdCursor; + + return TRUE; +} + + +/* + * QuartzUnrealizeCursor + * Free the storage space associated with a realized cursor. + */ +Bool +QuartzUnrealizeCursor( + ScreenPtr pScreen, + CursorPtr pCursor ) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + if ((pCursor->bits->height > CURSORHEIGHT) || + (pCursor->bits->width > CURSORWIDTH)) { + return (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pScreen, pCursor); + } else { + DisposeCCursor((CCrsrHandle) pCursor->devPriv[pScreen->myNum]); + return TRUE; + } +} + + +/* + * QuartzSetCursor + * Set the cursor sprite and position. + * Use QuickDraw cursor if possible. + */ +static void +QuartzSetCursor( + ScreenPtr pScreen, + CursorPtr pCursor, + int x, + int y) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + ScreenPriv->latentCursor = pCursor; + + // Don't touch Mac OS cursor if X is hidden! + if (! ScreenPriv->serverVisible) + return; + + if (!pCursor) { + // Remove the cursor completely. + HIDE_QD_CURSOR(kCGDirectMainDisplay, ScreenPriv->qdCursorVisible); + if (! ScreenPriv->qdCursorMode) + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); + } + else if ((pCursor->bits->height <= CURSORHEIGHT) && + (pCursor->bits->width <= CURSORWIDTH)) + { + // Cursor is small enough to use QuickDraw directly. + CCrsrHandle curs; + + if (! ScreenPriv->qdCursorMode) // remove the X cursor + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); + ScreenPriv->qdCursorMode = TRUE; + + curs = (CCrsrHandle) pCursor->devPriv[pScreen->myNum]; + SetCCursor(curs); + SHOW_QD_CURSOR(kCGDirectMainDisplay, ScreenPriv->qdCursorVisible); + } + else { + // Cursor is too big for QuickDraw. Use X software cursor. + HIDE_QD_CURSOR(kCGDirectMainDisplay, ScreenPriv->qdCursorVisible); + ScreenPriv->qdCursorMode = FALSE; + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, pCursor, x, y); + } +} + + +/* + * QuartzMoveCursor + * Move the cursor. This is a noop for QuickDraw. + */ +static void +QuartzMoveCursor( + ScreenPtr pScreen, + int x, + int y) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + // only the X cursor needs to be explicitly moved + if (!ScreenPriv->qdCursorMode) + (*ScreenPriv->spriteFuncs->MoveCursor)(pScreen, x, y); +} + + +static miPointerSpriteFuncRec quartzSpriteFuncsRec = { + QuartzRealizeCursor, + QuartzUnrealizeCursor, + QuartzSetCursor, + QuartzMoveCursor +}; + +/* +=========================================================================== + + Pointer screen functions + +=========================================================================== +*/ + +/* + * QuartzCursorOffScreen + */ +static Bool QuartzCursorOffScreen(ScreenPtr *pScreen, int *x, int *y) +{ + return FALSE; +} + + +/* + * QuartzCrossScreen + */ +static void QuartzCrossScreen(ScreenPtr pScreen, Bool entering) +{ + return; +} + + +/* + * QuartzWarpCursor + * Change the cursor position without generating an event or motion history + */ +static void +QuartzWarpCursor( + ScreenPtr pScreen, + int x, + int y) +{ + CGDisplayErr cgErr; + CGPoint cgPoint; + int neverMoved = TRUE; + + if (neverMoved) { + // Don't move the cursor the first time. This is the jump-to-center + // initialization, and it's annoying because we may still be in MacOS. + neverMoved = FALSE; + return; + } + + if (CURSOR_PRIV(pScreen)->serverVisible) { + cgPoint = CGPointMake(x, y); + cgErr = CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cgPoint); + if (cgErr != CGDisplayNoErr) { + ErrorF("Could not set cursor position with error code 0x%x.\n", + cgErr); + } + } + + miPointerWarpCursor(pScreen, x, y); +} + + +static miPointerScreenFuncRec quartzScreenFuncsRec = { + QuartzCursorOffScreen, + QuartzCrossScreen, + QuartzWarpCursor, +}; + +/* +=========================================================================== + + Other screen functions + +=========================================================================== +*/ + +/* + * QuartzCursorQueryBestSize + * Handle queries for best cursor size + */ +static void +QuartzCursorQueryBestSize( + int class, + unsigned short *width, + unsigned short *height, + ScreenPtr pScreen) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + if (class == CursorShape) { + *width = CURSORWIDTH; + *height = CURSORHEIGHT; + } else { + (*ScreenPriv->QueryBestSize)(class, width, height, pScreen); + } +} + + +/* + * QuartzInitCursor + * Initialize cursor support + */ +Bool +QuartzInitCursor( + ScreenPtr pScreen ) +{ + QuartzCursorScreenPtr ScreenPriv; + miPointerScreenPtr PointPriv; + + // initialize software cursor handling (always needed as backup) + if (!miDCInitialize(pScreen, &quartzScreenFuncsRec)) { + return FALSE; + } + + // allocate private storage for this screen's QuickDraw cursor info + if (darwinCursorGeneration != serverGeneration) { + if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex()) < 0) + return FALSE; + darwinCursorGeneration = serverGeneration; + } + + ScreenPriv = xcalloc( 1, sizeof(QuartzCursorScreenRec) ); + if (!ScreenPriv) return FALSE; + + CURSOR_PRIV(pScreen) = ScreenPriv; + + // override some screen procedures + ScreenPriv->QueryBestSize = pScreen->QueryBestSize; + pScreen->QueryBestSize = QuartzCursorQueryBestSize; + + // initialize QuickDraw cursor handling + GetQDGlobalsArrow(&gQDArrow); + PointPriv = (miPointerScreenPtr) + pScreen->devPrivates[miPointerScreenIndex].ptr; + + ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; + PointPriv->spriteFuncs = &quartzSpriteFuncsRec; + + ScreenPriv->qdCursorMode = TRUE; + ScreenPriv->qdCursorVisible = TRUE; + ScreenPriv->latentCursor = NULL; + ScreenPriv->serverVisible = FALSE; + return TRUE; +} + + +// X server is hiding. Restore the Aqua cursor. +void QuartzSuspendXCursor( + ScreenPtr pScreen ) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + SetCursor(&gQDArrow); + SHOW_QD_CURSOR(kCGDirectMainDisplay, ScreenPriv->qdCursorVisible); + + ScreenPriv->serverVisible = FALSE; +} + + +// X server is showing. Restore the X cursor. +void QuartzResumeXCursor( + ScreenPtr pScreen, + int x, + int y ) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + ScreenPriv->serverVisible = TRUE; + + QuartzSetCursor(pScreen, ScreenPriv->latentCursor, x, y); +} Index: xc/programs/Xserver/hw/darwin/bundle/quartzCursor.h diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/quartzCursor.h:1.1 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartzCursor.h Wed Apr 11 04:34:18 2001 @@ -0,0 +1,15 @@ +/* + * quartzCursor.h + * + * Quartz hardware cursor + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzCursor.h,v 1.1 2001/04/11 08:34:18 torrey Exp $ */ + +#ifndef QUARTZCURSOR_H +#define QUARTZCURSOR_H + +Bool QuartzInitCursor(ScreenPtr pScreen); +void QuartzSuspendXCursor(ScreenPtr pScreen); +void QuartzResumeXCursor(ScreenPtr pScreen, int x, int y); + +#endif Index: xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c:1.2 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c Tue May 1 21:03:40 2001 @@ -0,0 +1,125 @@ +/************************************************************** + * quartzPasteboard.c + * + * Aqua pasteboard <-> X cut buffer + * Greg Parker gparker@cs.stanford.edu March 8, 2001 + **************************************************************/ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c,v 1.2 2001/05/02 01:03:40 torrey Exp $ */ + +#include "quartzPasteboard.h" + +#include "Xatom.h" +#include "windowstr.h" +#include "propertyst.h" +#include "scrnintstr.h" +#include "selection.h" + +extern WindowPtr *WindowTable; +extern Selection *CurrentSelections; +extern int NumCurrentSelections; + + +// Helper function to read the X11 cut buffer +// FIXME: What about multiple screens? Currently, this reads the first +// CUT_BUFFER0 from the first screen where the buffer content is a string. +// Returns a string on the heap that the caller must free. +// Returns NULL if there is no cut text or there is not enough memory. +static char * QuartzReadCutBuffer(void) +{ + int i; + char *text = NULL; + + for (i = 0; i < screenInfo.numScreens; i++) { + ScreenPtr pScreen = screenInfo.screens[i]; + PropertyPtr pProp; + + pProp = wUserProps (WindowTable[pScreen->myNum]); + while (pProp && pProp->propertyName != XA_CUT_BUFFER0) { + pProp = pProp->next; + } + if (! pProp) continue; + if (pProp->type != XA_STRING) continue; + if (pProp->format != 8) continue; + + text = xalloc(1 + pProp->size); + if (! text) continue; + memcpy(text, pProp->data, pProp->size); + text[pProp->size] = '\0'; + return text; + } + + // didn't find any text + return NULL; +} + +// Write X cut buffer to Mac OS X pasteboard +// Called by ProcessInputEvents() in response to request from X server thread. +void QuartzWritePasteboard(void) +{ + char *text; + text = QuartzReadCutBuffer(); + if (text) { + QuartzWriteCocoaPasteboard(text); + free(text); + } +} + +#define strequal(a, b) (0 == strcmp((a), (b))) + +// Read Mac OS X pasteboard into X cut buffer +// Called by ProcessInputEvents() in response to request from X server thread. +void QuartzReadPasteboard(void) +{ + char *oldText = QuartzReadCutBuffer(); + char *text = QuartzReadCocoaPasteboard(); + + // Compare text with current cut buffer contents. + // Change the buffer if both exist and are different + // OR if there is new text but no old text. + // Otherwise, don't clear the selection unnecessarily. + + if ((text && oldText && !strequal(text, oldText)) || + (text && !oldText)) { + int scrn, sel; + + for (scrn = 0; scrn < screenInfo.numScreens; scrn++) { + ScreenPtr pScreen = screenInfo.screens[scrn]; + // Set the cut buffers on each screen + // fixme really on each screen? + ChangeWindowProperty(WindowTable[pScreen->myNum], XA_CUT_BUFFER0, + XA_STRING, 8, PropModeReplace, + strlen(text), (pointer)text, TRUE); + } + + // Undo any current X selection (similar to code in dispatch.c) + // FIXME: what about secondary selection? + // FIXME: only touch first XA_PRIMARY selection? + sel = 0; + while ((sel < NumCurrentSelections) && + CurrentSelections[sel].selection != XA_PRIMARY) + sel++; + if (sel < NumCurrentSelections) { + // Notify client if necessary + if (CurrentSelections[sel].client) { + xEvent event; + + event.u.u.type = SelectionClear; + event.u.selectionClear.time = GetTimeInMillis(); + event.u.selectionClear.window = CurrentSelections[sel].window; + event.u.selectionClear.atom = CurrentSelections[sel].selection; + TryClientEvents(CurrentSelections[sel].client, &event, 1, + NoEventMask, NoEventMask /*CantBeFiltered*/, + NullGrab); + } + + // Erase it + // FIXME: need to erase .selection too? dispatch.c doesn't + CurrentSelections[sel].pWin = NullWindow; + CurrentSelections[sel].window = None; + CurrentSelections[sel].client = NullClient; + } + } + + if (text) free(text); + if (oldText) free(oldText); +} Index: xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.h diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.h:1.1 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.h Thu Mar 15 17:24:27 2001 @@ -0,0 +1,20 @@ +/* + QuartzPasteboard.h + + Mac OS X pasteboard <-> X cut buffer + Greg Parker gparker@cs.stanford.edu March 8, 2001 +*/ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.h,v 1.1 2001/03/15 22:24:27 torrey Exp $ */ + +#ifndef _QUARTZPASTEBOARD_H +#define _QUARTZPASTEBOARD_H + +// Aqua->X +void QuartzReadPasteboard(); +char * QuartzReadCocoaPasteboard(void); // caller must free string + +// X->Aqua +void QuartzWritePasteboard(); +void QuartzWriteCocoaPasteboard(char *text); + +#endif /* _QUARTZPASTEBOARD_H */ \ No newline at end of file Index: xc/programs/Xserver/hw/darwin/bundle/quartzShared.h diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/quartzShared.h:1.5 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartzShared.h Wed May 16 02:10:08 2001 @@ -0,0 +1,47 @@ +/* + * Shared definitions between the Darwin X Server + * and the Cocoa front end. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzShared.h,v 1.5 2001/05/16 06:10:08 torrey Exp $ */ + +#ifndef _QUARTZSHARED_H +#define _QUARTZSHARED_H + +// Data stored at startup for Cocoa front end +extern int quartzEventWriteFD; +extern int quartzStartClients; + +// User preferences used by X server +extern int quartzUseSysBeep; +extern int darwinFakeButtons; +extern char *darwinKeymapFile; + +void QuartzCapture(void); +void QuartzReadPreferences(void); +void QuartzMessageMainThread(unsigned msg); + +// NX_APPDEFINED event subtypes for special commands to the X server +// update modifiers: update all modifier keys +// show: vt switch to X server; recapture screen and restore X drawing +// hide: vt switch away from X server; release screen and clip X drawing +// quit: kill the X server and release the display +// read pasteboard: copy Mac OS X pasteboard into X cut buffer +// write pasteboard: copy X cut buffer onto Mac OS X pasteboard + +enum { + kXDarwinUpdateModifiers, + kXDarwinShow, + kXDarwinHide, + kXDarwinQuit, + kXDarwinReadPasteboard, + kXDarwinWritePasteboard +}; + +// Messages that can be sent to the main thread. +enum { + kQuartzServerHidden, + kQuartzServerDied +}; + +#endif /* _QUARTZSHARED_H */ + Index: xc/programs/Xserver/hw/darwin/bundle/quartzStartup.c diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/quartzStartup.c:1.3 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartzStartup.c Thu Apr 5 02:08:46 2001 @@ -0,0 +1,61 @@ +/************************************************************** + * + * Startup code for the Quartz Darwin X Server + * + **************************************************************/ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzStartup.c,v 1.3 2001/04/05 06:08:46 torrey Exp $ */ + +#include +#include "opaque.h" +#include "../darwin.h" +#include "quartzShared.h" + +char **envpGlobal; // argcGlobal and argvGlobal + // are from dix/globals.c + +/* + * DarwinHandleGUI + * This function is called first from main(). The first time + * it is called we start the Mac OS X front end. The front end + * will call main() again from another thread to run the X + * server. On the second call this function loads the user + * preferences set by the Mac OS X front end. + */ +void DarwinHandleGUI( + int argc, + char *argv[], + char *envp[] ) +{ + static Bool been_here = FALSE; + int main_exit, i; + int fd[2]; + + if (been_here) { + QuartzReadPreferences(); + return; + } + been_here = TRUE; + + // Make a pipe to pass events + assert( pipe(fd) == 0 ); + darwinEventFD = fd[0]; + quartzEventWriteFD = fd[1]; + fcntl(darwinEventFD, F_SETFL, O_NONBLOCK); + + // Store command line arguments to pass back to main() + argcGlobal = argc; + argvGlobal = argv; + envpGlobal = envp; + + // Determine if we need to start X clients + quartzStartClients = 1; + for (i = argc-1; i; i--) { + if (!strcmp(argv[i], "-nostartx")) { + quartzStartClients = 0; + } + } + + quartz = TRUE; + main_exit = NSApplicationMain(argc, argv); + exit(main_exit); +} Index: xc/programs/Xserver/hw/darwin/bundle/English.lproj/Credits.rtf diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/English.lproj/Credits.rtf:1.1.2.2 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/English.lproj/Credits.rtf Wed May 30 01:52:32 2001 @@ -0,0 +1,62 @@ +{\rtf1\mac\ansicpg10000\cocoartf100 +{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;\f2\fswiss\fcharset77 Helvetica-Oblique; +} +{\colortbl;\red255\green255\blue255;} +\vieww5160\viewh4480\viewkind0 +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f0\b\fs24 \cf0 XonX Team Members\ +Contributing to XFree86 4.1: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f1\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f1\i0 \ +Andreas Monitzer\ + +\f2\i Cocoa version of XDarwin front end +\f1\i0 \ +Gregory Robert Parker\ + +\f2\i Original Quartz implementation +\f1\i0 \ +Christoph Pfisterer\ + +\f2\i Dynamic shared libraries +\f1\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f1\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f0\b \cf0 Special Thanks: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Tiago Ribeiro\ + +\f2\i XDarwin icon +\f1\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f0\b \cf0 History: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Carmack\ + +\f2\i Original XFree86 port to Mac OS X Server +\f1\i0 \ +Dave Zarzycki\ + +\f2\i XFree86 4.0 port to Darwin 1.0 +\f1\i0 \ +Torrey T. Lyons\ + +\f2\i Integration into XFree86 Project for 4.0.2} Index: xc/programs/Xserver/hw/darwin/bundle/English.lproj/Imakefile diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/English.lproj/Imakefile:1.1.2.1 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/English.lproj/Imakefile Mon May 21 00:56:07 2001 @@ -0,0 +1,19 @@ +XCOMM $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/Imakefile,v 1.1.2.1 2001/05/21 04:56:07 torrey Exp $ + +#include + +INCLUDES = -I$(SERVERSRC)/include + +VERS = XFree86VersionString +DATE = XFree86DateString +XF86_DEFS = $(INCLUDES) -DXF86_VERSION=$(VERS) -DXF86_REL_DATE=$(DATE) \ + -DXF86_COPYRIGHT='"XFree86 $(VERS)\nCopyright 2001 XFree86 Project, Inc."' + +AllTarget(XDarwinHelp.html) +CppFileTarget(XDarwinHelp.html,XDarwinHelp.html.cpp,$(XF86_DEFS), \ + NullParameter) + +AllTarget(InfoPlist.strings) +CppFileTarget(InfoPlist.strings,InfoPlist.strings.cpp,$(XF86_DEFS), \ + NullParameter) + Index: xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp:1.1.2.1 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp Mon May 21 00:56:07 2001 @@ -0,0 +1,5 @@ +/* English localized versions of Info.plist keys. */ +/* Most of these are set in the target application settings. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp,v 1.1.2.1 2001/05/21 04:56:07 torrey Exp $ */ + +NSHumanReadableCopyright = XF86_COPYRIGHT Index: xc/programs/Xserver/hw/darwin/bundle/English.lproj/Localizable.strings diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/English.lproj/Localizable.strings:1.1 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/English.lproj/Localizable.strings Tue Mar 27 15:42:39 2001 @@ -0,0 +1,14 @@ +/* English localized versions of strings used by the Mac OS X front end. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/Localizable.strings,v 1.1 2001/03/27 20:42:39 torrey Exp $ */ + +/* Title of alert panel */ +"Quit X server?" = "Quit X server?"; + +/* Text of alert panel */ +"Quitting the X server will terminate any running X Window programs." = "Quitting the X server will terminate any running X Window programs."; + +/* Quit */ +"Quit" = "Quit"; + +/* Cancel */ +"Cancel" = "Cancel"; Index: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp:1.1.2.1 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp Mon May 21 00:56:07 2001 @@ -0,0 +1,90 @@ + + +#include "xf86Version.h" +#ifndef PRE_RELEASE +#define PRE_RELEASE XF86_VERSION_SNAP +#endif + + + +XFree86 for Mac OS X + + +

+

XFree86 on Darwin and Mac OS X

+ XFree86 XF86_VERSION
+ Release Date: XF86_REL_DATE +
+

Contents

+
    +
  1. Important Notice
  2. +
  3. Usage
  4. +
  5. Setting Your Path
  6. +
  7. User Preferences
  8. +
  9. License
  10. +
+
+

Important Notice

+
+
+#if PRE_RELEASE +This is a pre-release version of XFree86, and is not supported in any way. Bugs may be reported and patches may be submitted to the XonX project page at SourceForge. Before reporting bugs in pre-release versions, please check the latest version from XonX or in the XFree86 CVS repository. +#else +If the server is older than 6-12 months, or if your hardware is newer than the above date, look for a newer version before reporting problems. Bugs may be reported and patches may be submitted to the XonX project page at SourceForge. +#endif +
+
+This software is distributed under the terms of the MIT X11 / X Consortium License and is provided AS IS, with no warranty. Please read the License before using.
+

Usage

+

XFree86 is a freely redistributable open-source implementation of the X Window System produced by the XFree86 Project, Inc. XFree86 runs on Mac OS X in full screen mode. When the X window system is active, it takes over the entire screen. You can switch back to the Mac OS X desktop by holding down Command-Option-A. This key combination can be changed in the user preferences. From the Mac OS X desktop, just click on the XDarwin icon in the floating switch window to switch back to the X window system. You can change this behavior in the user preferences so that clicking on the XDarwin icon in the Dock switches as well.

+

Multi-Button Mouse Emulation

+

Many X11 applications rely on the use of a 3-button mouse. To emulate a 3-button mouse with a single button, select "Enable emulation of multiple mouse buttons" in the Preferences. When emulating a 3-button mouse, holding down the left command key and clicking the mouse button will simulate clicking the second mouse button. Holding down the left option key and clicking will simulate the third button.

+

Notes:

+
    +
  • With most keyboards the left and right command and option keys are not differentiated so either will work. +
  • Even with command and/or option keys mapped to some other key with xmodmap, you still must use the original command and option keys for multibutton mouse emulation. +
  • The only way to simulate holding down the left command key and clicking the second mouse button is to map some other key to be the left command key. The same is true for simulating holding down the left option key and clicking the third mouse button. +
+

Setting Your Path

+

The X11 binaries are located in /usr/X11R6/bin, which you may need to add to your path. Your path is the list of directories to be searched for executable commands. The way to do this depends on the shell you are using. The following directions are for tcsh, which is the default shell on Darwin and Mac OS X.

+

You can check your path by typing "printenv PATH". You should see /usr/X11R6/bin listed as one of the directories. If not, you should add it to your default path. To do so, you can add the following line to the file ~/Library/init/tcsh/path: (You may need to create this file and directory path if it does not exist already.)

+
setenv PATH "${PATH}:/usr/X11R6/bin"
+

Note that if you have created a .cshrc or .tcshrc file, these files will override your settings in ~/Library/init/tcsh/ and you will need to change one of these files instead. These changes will not take effect until you open a new Terminal window. You may also want to add the man pages from XFree86 to the list of pages to be searched when you are looking for documentation. The X11 man pages are located in /usr/X11R6/man and the MANPATH environment variable contains the list of directories to search.

+

User Preferences

+

A number of options may be set from the user preferences, accessible from the "Preferences..." menu item in the "XDarwin" menu. The options listed under Startup Options will not take effect until you have restarted XDarwin. All other options take effect immediately. The various options are described below:

+
    +
  • Key combination button: Click this button and then press any number of modifiers followed by a standard key to change the key combination to switch between Aqua and X11.
  • +
  • Use System beep for X11: When enabled the standard Mac OS X alert sound is used as X11 bell. When disabled (default) a simple tone is used.
  • +
  • Click on icon in Dock switches to X11: Enable this to activate switching to X11 by clicking on the XDarwin icon in the Dock. On some versions of Mac OS X, switching by clicking in the Dock can cause the cursor to disappear on returning to Aqua.
  • +
  • Show help on startup: This will show the introductory splash screen when XDarwin is launched.
  • +
  • Display number: This sets what X display number XDarwin should assign to the display. Note that XDarwin always takes over the main display when showing X11.
  • +
  • Keymapping: By default, XDarwin loads the keymapping from the Darwin kernel on startup. On portables, this keymapping is sometimes empty so that the keyboard will appear to be dead in X11. If "Load from file" is selected, XDarwin will load the keymapping from the specified file instead.
  • +
+

License

+The XFree86 Project is committed to providing freely redistributable binary and source releases. The main license we use is one based on the traditional MIT X11 / X Consortium License, which doesn't impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please see the XFree86 +License page. +

X Consortium License

+

Copyright (C) 1996 X Consortium

+

Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without +limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons to +whom the Software is furnished to do so, subject to the following conditions:

+

The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software.

+

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE.

+

Except as contained in this notice, the name of the X Consortium shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization from +the X Consortium.

+

X Window System is a trademark of X Consortium, Inc.

+ + Index: xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib:1.5 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib Wed May 9 03:16:20 2001 @@ -0,0 +1,43 @@ +{ + IBClasses = ( + { + ACTIONS = {showHelp = id; }; + CLASS = FirstResponder; + LANGUAGE = ObjC; + SUPERCLASS = NSObject; + }, + { + ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; + CLASS = Preferences; + LANGUAGE = ObjC; + OUTLETS = { + displayNumber = id; + dockSwitchButton = id; + fakeButton = id; + keyField = id; + keymapFileField = id; + loadKeymapFileButton = id; + pickKeymapFileButton = id; + splashStartupHelpButton = id; + startupHelpButton = id; + systemBeepButton = id; + window = id; + }; + SUPERCLASS = NSObject; + }, + { + CLASS = XApplication; + LANGUAGE = ObjC; + OUTLETS = {preferences = id; xserver = id; }; + SUPERCLASS = NSApplication; + }, + { + ACTIONS = {applicationWillResignActive = id; closeHelpAndShow = id; showAction = id; }; + CLASS = Xserver; + LANGUAGE = ObjC; + OUTLETS = {helpWindow = id; startupHelpButton = id; switchWindow = id; }; + SUPERCLASS = NSObject; + } + ); + IBVersion = 1; +} \ No newline at end of file Index: xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/info.nib diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/info.nib:1.4 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/info.nib Wed May 9 03:16:20 2001 @@ -0,0 +1,34 @@ + + + + + IBDocumentLocation + 20 11 367 304 0 4 800 574 + IBMainMenuLocation + 20 320 285 44 0 4 800 574 + IBUserGuides + + Help Window + + guideLocations + + guidesLocked + NO + + Pref Window + + guideLocations + + guidesLocked + NO + + X Panel + + guideLocations + + guidesLocked + NO + + + + Index: xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib Index: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Credits.rtf diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Credits.rtf:1.2.2.2 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Credits.rtf Wed May 30 01:52:32 2001 @@ -0,0 +1,62 @@ +{\rtf1\mac\ansicpg10000\cocoartf100 +{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;\f2\fswiss\fcharset77 Helvetica-Oblique; +} +{\colortbl;\red255\green255\blue255;} +\vieww5160\viewh4480\viewkind0 +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f0\b\fs24 \cf0 XonX Team Members\ +Contributing to XFree86 4.1: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f1\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f1\i0 \ +Andreas Monitzer\ + +\f2\i Cocoa version of XDarwin front end +\f1\i0 \ +Gregory Robert Parker\ + +\f2\i Original Quartz implementation +\f1\i0 \ +Christoph Pfisterer\ + +\f2\i Dynamic shared libraries +\f1\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f1\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f0\b \cf0 Special Thanks: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Tiago Ribeiro\ + +\f2\i XDarwin icon +\f1\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f0\b \cf0 History: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Carmack\ + +\f2\i Original XFree86 port to Mac OS X Server +\f1\i0 \ +Dave Zarzycki\ + +\f2\i XFree86 4.0 port to Darwin 1.0 +\f1\i0 \ +Torrey T. Lyons\ + +\f2\i Integration into XFree86 Project for 4.0.2} Index: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Imakefile diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Imakefile:1.1.2.1 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Imakefile Mon May 21 00:56:07 2001 @@ -0,0 +1,19 @@ +XCOMM $XFree86: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Imakefile,v 1.1.2.1 2001/05/21 04:56:07 torrey Exp $ + +#include + +INCLUDES = -I$(SERVERSRC)/include + +VERS = XFree86VersionString +DATE = XFree86DateString +XF86_DEFS = $(INCLUDES) -DXF86_VERSION=$(VERS) -DXF86_REL_DATE=$(DATE) \ + -DXF86_COPYRIGHT='"XFree86 $(VERS)\nCopyright 2001 XFree86 Project, Inc."' + +AllTarget(XDarwinHelp.html) +CppFileTarget(XDarwinHelp.html,XDarwinHelp.html.cpp,$(XF86_DEFS), \ + NullParameter) + +AllTarget(InfoPlist.strings) +CppFileTarget(InfoPlist.strings,InfoPlist.strings.cpp,$(XF86_DEFS), \ + NullParameter) + Index: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings.cpp diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings.cpp:1.1.2.1 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings.cpp Mon May 21 00:56:07 2001 @@ -0,0 +1,5 @@ +/* Japanese localized versions of Info.plist keys. */ +/* Most of these are set in the target application settings. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings.cpp,v 1.1.2.1 2001/05/21 04:56:07 torrey Exp $ */ + +NSHumanReadableCopyright = XF86_COPYRIGHT Index: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Localizable.strings Index: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp:1.1.2.2 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp Mon May 21 23:36:53 2001 @@ -0,0 +1,144 @@ + + +#include "xf86Version.h" +#ifndef PRE_RELEASE +#define PRE_RELEASE XF86_VERSION_SNAP +#endif + + + + + +XFree86 for Mac OS X + +
+

XFree86 on Darwin and Mac OS X

+ XFree86 XF86_VERSION
+ Release Date: XF86_REL_DATE +
+

Ìܼ¡

+
    +
  1. Ãí°Õ»ö¹à
  2. +
  3. »ÈÍÑË¡
  4. +
  5. ¥Ñ¥¹¤ÎÀßÄê
  6. +
  7. ´Ä¶­ÀßÄê
  8. +
  9. ¥é¥¤¥»¥ó¥¹
  10. +
+
+

Ãí°Õ»ö¹à

+
+
+#if PRE_RELEASE +¤³¤ì¤Ï¡¤XFree86 ¤Î¥×¥ì¥ê¥ê¡¼¥¹¥Ð¡¼¥¸¥ç¥ó¤Ç¤¢¤ê¡¤¤¤¤«¤Ê¤ë¾ì¹ç¤Ë¤ª¤¤¤Æ¤â¥µ¥Ý¡¼¥È¤µ¤ì¤Þ¤»¤ó¡£ +¥Ð¥°¤ÎÊó¹ð¤ä¥Ñ¥Ã¥Á¤¬ SourceForge ¤Î XonX ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸¤ËÄó½Ð¤µ¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£ +¥×¥ì¥ê¥ê¡¼¥¹¥Ð¡¼¥¸¥ç¥ó¤Î¥Ð¥°¤òÊó¹ð¤¹¤ëÁ°¤Ë¡¤XonX ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸¤Þ¤¿¤Ï XFree86 CVS ¥ê¥Ý¥¸¥È¥ê¤ÇºÇ¿·ÈǤΥÁ¥§¥Ã¥¯¤ò¤·¤Æ²¼¤µ¤¤¡£ +
+#else +¤â¤·¡¤¥µ¡¼¥Ð¡¼¤¬ 6 -12 ¥ö·î°Ê¾åÁ°¤Î¤â¤Î¤«¡¤¤Þ¤¿¤Ï¤¢¤Ê¤¿¤Î¥Ï¡¼¥É¥¦¥§¥¢¤¬¾åµ­¤ÎÆüÉÕ¤è¤ê¤â¿·¤·¤¤¤â¤Î¤Ê¤é¤Ð¡¤ÌäÂê¤òÊó¹ð¤¹¤ëÁ°¤Ë¤è¤ê¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤òõ¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£ +¥Ð¥°¤ÎÊó¹ð¤ä¥Ñ¥Ã¥Á¤¬ SourceForge ¤Î XonX ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸¤ËÄó½Ð¤µ¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£ +#endif + +
+ËÜ¥½¥Õ¥È¥¦¥§¥¢¤Ï¡¤MIT X11/X Consortium License ¤Î¾ò·ï¤Ë´ð¤Å¤­¡¤ÌµÊݾڤǡ¤¡Ö¤½¤Î¤Þ¤Þ¡×¤Î·Á¤Ç¶¡µë¤µ¤ì¤Þ¤¹¡£ +¤´»ÈÍѤˤʤëÁ°¤Ë¡¤¥é¥¤¥»¥ó¥¹¾ò·ï¤ò¤ªÆɤ߲¼¤µ¤¤¡£ +
+ +

»ÈÍÑË¡

+

+XFree86 ¤Ï¡¤XFree86 Project, Inc.¤Ë¤è¤Ã¤ÆºîÀ®¤µ¤ì¤¿¡¤ºÆÇÛÉÛ²Äǽ¤Ê¥ª¡¼¥×¥ó¥½¡¼¥¹¤Î X Window System ¤Î¼ÂÁõ¤Ç¤¹¡£ +Mac OS X ¾å¤Ç¡¤XFree86 ¤Ï¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤ÇÆ°ºî¤·¤Þ¤¹¡£X Window System ¤¬¥¢¥¯¥Æ¥£¥Ö¤Ê»þ¡¤¤½¤ì¤ÏÁ´²èÌ̤òÀêÍ­¤·¤Þ¤¹¡£ +¤¢¤Ê¤¿¤Ï¡¤Command-Option-A ¥­¡¼¤ò²¡¤¹¤³¤È¤Ë¤è¤Ã¤Æ Mac OS X ¥Ç¥¹¥¯¥È¥Ã¥×¤ØÀÚ¤êÂؤ¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤³¤Î¥­¡¼¤ÎÁȤ߹ç¤ï¤»¤Ï¡¤´Ä¶­ÀßÄê¤ÇÊѹ¹²Äǽ¤Ç¤¹¡£ +Mac OS X ¥Ç¥¹¥¯¥È¥Ã¥×¤«¤éX Window System ¤ØÀÚ¤êÂؤ¨¤ë¾ì¹ç¤Ï¡¤¥Õ¥í¡¼¥Æ¥£¥ó¥°¡¦¥¦¥£¥ó¥É¥¦¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£ +¥É¥Ã¥¯¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç X Window System ¤ØÀÚ¤êÂؤï¤ë¤è¤¦¤Ë¡¤´Ä¶­ÀßÄê¤ÇÆ°ºî¤òÊѹ¹¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£ +

+ +

Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó

+

+¿¤¯¤Î X11 ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¤3 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤òɬÍפȤ·¤Þ¤¹¡£ +1 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤Ç 3 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤ò¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤¹¤ë¤Ë¤Ï¡¤´Ä¶­ÀßÄê¤Ç¡ÖÊ£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤òÍ­¸ú¤Ë¤¹¤ë¡×¤òÁªÂò¤·¤Þ¤¹¡£ +¤³¤ì¤Ï¡¤¼¡²ó¤Î X ¥µ¡¼¥Ð¡¼¤Îµ¯Æ°»þ¤è¤êÍ­¸ú¤È¤Ê¤ê¤Þ¤¹¡£ + +3 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤ò¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤¹¤ë»þ¡¤º¸¤Î¥³¥Þ¥ó¥É¥­¡¼¤ò²¡¤·¤Ê¤¬¤é¥Þ¥¦¥¹¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤ÏÂè 2 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ËÁêÅö¤·¤Þ¤¹¡£º¸¤Î¥ª¥×¥·¥ç¥ó¥­¡¼¤ò²¡¤·¤Ê¤¬¤é¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤ÏÂè 3 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ËÁêÅö¤·¤Þ¤¹¡£ +

+

Ãí¡§

+
    +
  • ¿¤¯¤Î¥­¡¼¥Ü¡¼¥É¤Ç¤Ï¡¤º¸±¦¤Î¥³¥Þ¥ó¥É¥­¡¼¤È¥ª¥×¥·¥ç¥ó¥­¡¼¤Ï¶èÊ̤µ¤ì¤º¡¤Æ±¤¸Æ°ºî¤ò¤·¤Þ¤¹¡£ +
  • xmodmap ¤Ç¥³¥Þ¥ó¥É¥­¡¼¤ä¥ª¥×¥·¥ç¥ó¥­¡¼¤ò¾¤Î¥­¡¼¤Ë³ä¤êÅö¤Æ¤Æ¤¤¤ë¾ì¹ç¤Ç¤â¡¤Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤Ç¤ÏËÜÍè¤Î¥³¥Þ¥ó¥É¥­¡¼¤ä¥ª¥×¥·¥ç¥ó¥­¡¼¤ò»È¤ï¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +
  • º¸¤Î¥³¥Þ¥ó¥É¥­¡¼¤ò²¡¤·¤Ê¤¬¤éÂè 2 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤ò¼Â¸½¤¹¤ë¤Ë¤Ï¡¤º¸¤Î¥³¥Þ¥ó¥É¥­¡¼¤ò¾¤Î¥­¡¼¤Ë³ä¤êÅö¤Æ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£º¸¤Î¥ª¥×¥·¥ç¥ó¥­¡¼¤ò²¡¤·¤Ê¤¬¤éÂè 3 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¾ì¹ç¤âƱÍͤǤ¹¡£ +
+

+¥Ñ¥¹¤ÎÀßÄê +

+

+X11 ¥Ð¥¤¥Ê¥ê¤Ï¡¤/usr/X11R6/bin ¤ËÃÖ¤«¤ì¤Þ¤¹¡£¤¢¤Ê¤¿¤Ï¤½¤ì¤ò¥Ñ¥¹¤Ë²Ã¤¨¤ëɬÍפ¬¤¢¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£ +¥Ñ¥¹¤Ï¡¤ ¼Â¹Ô²Äǽ¤Ê¥³¥Þ¥ó¥É¤ò¸¡º÷¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î¥ê¥¹¥È¤Ç¤¹¡£ +¤³¤ì¤ò³Îǧ¤¹¤ëÊýË¡¤Ï¡¤»ÈÍѤ·¤Æ¤¤¤ë¥·¥§¥ë¤Ë°Í¸¤·¤Þ¤¹¡£ +tcsh ¤Ç¤Ï¡¤¡Öprintenv PATH¡×¤È¥¿¥¤¥×¤¹¤ë¤³¤È¤Ç¥Ñ¥¹¤ò¥Á¥§¥Ã¥¯¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +¥Ñ¥¹¤ò¥Á¥§¥Ã¥¯¤·¤¿»þ¡¤/usr/X11R6/bin ¤¬¥Ç¥£¥ì¥¯¥È¥ê¤Î¤Ò¤È¤Ä¤È¤·¤Æɽ¼¨¤µ¤ì¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +¤â¤·¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¤¤¢¤Ê¤¿¤Ï¤½¤ì¤ò¥Ç¥Õ¥©¥ë¥È¤Î¥Ñ¥¹¤ËÄɲ乤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +¤½¤Î¤¿¤á¤Ë¡¤~/Library/init/tcsh/path ¥Õ¥¡¥¤¥ë¤Ë¼¡¤Î¹Ô¤òÄɲ䷤Ʋ¼¤µ¤¤¡£ +¡Ê¤â¤·¤³¤Î¥Õ¥¡¥¤¥ë¤¬Ìµ¤±¤ì¤ÐºîÀ®¤·¤Æ²¼¤µ¤¤¡Ë +

+
+setenv PATH "${PATH}:/usr/X11R6/bin" +
+

+¤â¤·¡¤¤¢¤Ê¤¿¤¬ .cshrc ¥Õ¥¡¥¤¥ë¤Þ¤¿¤Ï .tcshrc ¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹¤ë¤Ê¤é¤Ð¡¤¤½¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ï ~/Library/init/tcsh/path ¥Õ¥¡¥¤¥ë¤ÎÀßÄêÃͤò¾å½ñ¤­¤·¤Þ¤¹¡£ +¤½¤·¤Æ¡¤¤¢¤Ê¤¿¤Ï¤½¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Î¤¦¤Á¤Î°ì¤Ä¤À¤±¤òÊѹ¹¤¹¤ëɬÍפ¬¤¢¤ë¤³¤È¤ËÃí°Õ¤·¤Æ²¼¤µ¤¤¡£ +¤³¤ì¤é¤ÎÊѹ¹¤Ï¡¤¤¢¤Ê¤¿¤¬¿·¤¿¤Ê Terminal ¥¦¥£¥ó¥É¥¦¤ò³«»Ï¤¹¤ë¤Þ¤ÇÍ­¸ú¤È¤Ê¤ê¤Þ¤»¤ó¡£ +¤Þ¤¿¡¤¤¢¤Ê¤¿¤Ï¥É¥­¥å¥á¥ó¥È¤òõ¤·¤Æ¤¤¤ë»þ¡¤XFree86 ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤ò¸¡º÷¤µ¤ì¤ë¥Ú¡¼¥¸¤Î¥ê¥¹¥È¤ËÄɲä·¤¿¤¤¤È»×¤¦¤«¤â¤·¤ì¤Þ¤»¤ó¡£ +X11 ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Ï /usr/X11R6/man ¤ËÃÖ¤«¤ì¤Þ¤¹¡£¤½¤·¤Æ MANPATH ´Ä¶­ÊÑ¿ô¤Ï¸¡º÷¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î¥ê¥¹¥È¤ò´Þ¤ó¤Ç¤¤¤Þ¤¹¡£ +

+ +

´Ä¶­ÀßÄê

+

¡ÖXDarwin¡×¥á¥Ë¥å¡¼¤Î¡Ö´Ä¶­ÀßÄê...¡×¥á¥Ë¥å¡¼¹àÌܤ«¤é¡¤¤¤¤¯¤Ä¤«¤ÎÀßÄê¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +¡Öµ¯Æ°¥ª¥×¥·¥ç¥ó¡×¤ÎÆâÍƤϡ¤XDarwin ¤òºÆµ¯Æ°¤¹¤ë¤Þ¤ÇÍ­¸ú¤È¤Ê¤ê¤Þ¤»¤ó¡£ +¾¤ÎÁ´¤Æ¤Î¥ª¥×¥·¥ç¥ó¤ÎÆâÍƤϡ¤Ä¾¤Á¤ËÍ­¸ú¤È¤Ê¤ê¤Þ¤¹¡£ +°Ê²¼¡¤¤½¤ì¤¾¤ì¤Î¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤ÆÀâÌÀ¤·¤Þ¤¹:

+
    +
  • ¥­¡¼ÀßÄê¥Ü¥¿¥ó: X11 ¤È Aqua ¤òÀÚ¤êÂؤ¨¤ë¤¿¤á¤Î¥­¡¼¤ÎÁȤ߹ç¤ï¤»¤òÊѹ¹¤¹¤ë¤¿¤á¤Ë¡¤¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¡¤¤¤¤¯¤Ä¤«¤Î½¤¾þ¥­¡¼¤Ë³¤¤¤ÆÄ̾ï¤Î¥­¡¼¤ò²¡¤·¤Þ¤¹¡£
  • +
  • X11 ¤Ç¥·¥¹¥Æ¥à¤Î¥Ó¡¼¥×²»¤ò»ÈÍѤ¹¤ë: ¥ª¥ó¤Î¾ì¹ç¡¤Mac OS X ¤Î¥Ó¡¼¥×²»¤¬ X11 ¤Î¥Ù¥ë¤È¤·¤Æ»ÈÍѤµ¤ì¤Þ¤¹¡£¥ª¥Õ¤Î¾ì¹ç¡Ê¥Ç¥Õ¥©¥ë¥È¡Ë¡¤¥·¥ó¥×¥ë ¥È¡¼¥ó¤¬»È¤ï¤ì¤Þ¤¹¡£
  • +
  • ¥É¥Ã¥¯¤Î¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç X11 ¤ËÌá¤ë: ¥ª¥ó¤Î¾ì¹ç¡¤¥É¥Ã¥¯¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç X11 ¤Ø¤ÎÀÚ¤êÂؤ¨¤¬²Äǽ¤È¤Ê¤ê¤Þ¤¹¡£ + Mac OS X ¤Î¥Ð¡¼¥¸¥ç¥ó¤Ë¤è¤Ã¤Æ¤Ï¡¤¥É¥Ã¥¯¤Î¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç²èÌ̤òÀÚ¤êÂؤ¨¤ë¤È¡¤Aqua ¤ËÌá¤Ã¤¿»þ¤Ë¥«¡¼¥½¥ë¤¬¾Ã¼º¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£
  • +
  • µ¯Æ°»þ¤Ë¥Ø¥ë¥×¤òɽ¼¨¤¹¤ë: XDarwin ¤Îµ¯Æ°»þ¤Ë¡¤¥¹¥×¥é¥Ã¥·¥å ¥¹¥¯¥ê¡¼¥ó¤òɽ¼¨¤·¤Þ¤¹¡£
  • +
  • ¥Ç¥£¥¹¥×¥ì¥¤ÈÖ¹æ: XDarwin ¤¬¥Ç¥£¥¹¥×¥ì¥¤¤Ë³ä¤êÅö¤Æ¤ë X ¤Î Display Number ¤ò»ØÄꤷ¤Þ¤¹¡£ + X11 ¤òɽ¼¨¤¹¤ë¤È¤­¡¤XDarwin ¤Ï¾ï¤Ë¥á¥¤¥ó¥Ç¥£¥¹¥×¥ì¥¤¤ò°ú¤­·Ñ¤°¤³¤È¤ËÃí°Õ¤·¤Æ²¼¤µ¤¤¡£
  • +
  • ¥­¡¼¥Þ¥Ã¥Ô¥ó¥°: ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¤XDarwin ¤Ï Darwin ¥«¡¼¥Í¥ë¤«¤é¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¤ò¥í¡¼¥É¤·¤Þ¤¹¡£ + ¥Ý¡¼¥¿¥Ö¥ëµ¡¼ï¤Ç¤Ï¡¤»þ¡¹¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¤¬¶õ¤È¤Ê¤ê¡¤X11 ¤Ç¥­¡¼¥Ü¡¼¥É¤¬Æ°ºî¤·¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£ + ¡Ö¥Õ¥¡¥¤¥ë¤«¤é¥í¡¼¥É¤¹¤ë¡×¤òÁªÂò¤¹¤ë¤È¡¤XDarwin ¤Ï»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤«¤é¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¤ò¥í¡¼¥É¤·¤Þ¤¹¡£
    + ¡ÊÌõÃí¡§¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¤Ç Japanese ¤òÁªÂò¤¹¤ë¤È¡¤ÉÔ¶ñ¹ç¤¬À¸¤¸¤Þ¤¹¡£USA ¤òÁªÂò¤·¤¿¾å¤Ç ~/.Xmodmap ¤òŬÍѤ·¤Æ²¼¤µ¤¤¡£¡Ë
  • +
+ +

+¥é¥¤¥»¥ó¥¹ +

+XFree86 Project ¤Ï¡¤¼«Í³¤ËºÆÇÛÉÛ²Äǽ¤Ê¥Ð¥¤¥Ê¥ê¤È¥½¡¼¥¹¥³¡¼¥É¤òÄ󶡤¹¤ë¤³¤È¤Ë¥³¥ß¥Ã¥È¤·¤Æ¤¤¤Þ¤¹¡£ +»ä¤¿¤Á¤¬»ÈÍѤ¹¤ë¼ç¤Ê¥é¥¤¥»¥ó¥¹¤Ï¡¤ÅÁÅýŪ¤Ê MIT X11/X Consortium License ¤Ë´ð¤Å¤¯¤â¤Î¤Ç¤¹¡£ +¤½¤·¤Æ¡¤¤½¤ì¤Ï½¤Àµ¤Þ¤¿¤ÏºÆÇÛÉÛ¤µ¤ì¤ë¥½¡¼¥¹¥³¡¼¥É¤Þ¤¿¤Ï¥Ð¥¤¥Ê¥ê¤Ë¡¤¤½¤Î Copyright/¥é¥¤¥»¥ó¥¹¹ð¼¨¤¬¤½¤Î¤Þ¤Þ»Ä¤µ¤ì¤ë¤³¤È¤òÍ׵᤹¤ë°Ê³°¤Î¾ò·ï¤ò¶¯À©¤·¤Þ¤»¤ó¡£ +¤è¤ê¿¤¯¤Î¾ðÊó¤È¡¤¥³¡¼¥É¤Î°ìÉô¤ò¥«¥Ð¡¼¤¹¤ëÄɲäΠCopyright/¥é¥¤¥»¥ó¥¹¹ð¼¨¤Î¤¿¤á¤Ë¡¤XFree86 ¤Î License ¥Ú¡¼¥¸¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡£ +

+ +X Consortium License

+

Copyright (C) 1996 X Consortium

+

Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without +limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons to +whom the Software is furnished to do so, subject to the following conditions:

+

The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software.

+

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE.

+

Except as contained in this notice, the name of the X Consortium shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization from +the X Consortium.

+

X Window System is a trademark of X Consortium, Inc.

+ + Index: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib:1.4 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib Thu May 10 03:49:39 2001 @@ -0,0 +1,43 @@ +{ + IBClasses = ( + { + ACTIONS = {showHelp = id; }; + CLASS = FirstResponder; + LANGUAGE = ObjC; + SUPERCLASS = NSObject; + }, + { + ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; + CLASS = Preferences; + LANGUAGE = ObjC; + OUTLETS = { + displayNumber = id; + dockSwitchButton = id; + fakeButton = id; + keyField = id; + keymapFileField = id; + loadKeymapFileButton = id; + pickKeymapFileButton = id; + splashStartupHelpButton = id; + startupHelpButton = id; + systemBeepButton = id; + window = id; + }; + SUPERCLASS = NSObject; + }, + { + CLASS = XApplication; + LANGUAGE = ObjC; + OUTLETS = {preferences = id; xserver = id; }; + SUPERCLASS = NSApplication; + }, + { + ACTIONS = {applicationWillResignActive = id; closeHelpAndShow = id; showAction = id; }; + CLASS = Xserver; + LANGUAGE = ObjC; + OUTLETS = {helpWindow = id; startupHelpButton = id; switchWindow = id; }; + SUPERCLASS = NSObject; + } + ); + IBVersion = 1; +} \ No newline at end of file Index: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/info.nib diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/info.nib:1.5 --- /dev/null Mon Jun 4 12:40:10 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/info.nib Thu May 10 03:49:39 2001 @@ -0,0 +1,34 @@ + + + + + IBDocumentLocation + 29 444 369 278 0 64 1024 682 + IBMainMenuLocation + 44 386 343 44 0 71 1024 675 + IBUserGuides + + Help Window + + guideLocations + + guidesLocked + NO + + Pref Window + + guideLocations + + guidesLocked + NO + + X Panel + + guideLocations + + guidesLocked + NO + + + + Index: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib Index: xc/programs/Xserver/hw/darwin/bundle/XDarwin.pbproj/project.pbxproj diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/XDarwin.pbproj/project.pbxproj:1.12.2.1 --- /dev/null Mon Jun 4 12:40:11 2001 +++ xc/programs/Xserver/hw/darwin/bundle/XDarwin.pbproj/project.pbxproj Mon May 21 00:56:07 2001 @@ -0,0 +1,793 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 32; + objects = { + 01279092000747AA0A000002 = { + isa = PBXFileReference; + path = Xserver.m; + refType = 4; + }; + 0127909600074AF60A000002 = { + isa = PBXFileReference; + path = XApplication.m; + refType = 4; + }; + 0127909800074B1A0A000002 = { + isa = PBXFileReference; + path = XApplication.h; + refType = 4; + }; + 015698ED003DF345CE6F79C2 = { + isa = PBXFileReference; + path = XDarwin.icns; + refType = 4; + }; + 0157A37D002CF6D7CE6F79C2 = { + children = ( + 0157A37E002CF6D7CE6F79C2, + 43B962E200617B93416877C2, + ); + isa = PBXVariantGroup; + name = Credits.rtf; + path = ""; + refType = 4; + }; + 0157A37E002CF6D7CE6F79C2 = { + isa = PBXFileReference; + name = English; + path = English.lproj/Credits.rtf; + refType = 4; + }; + 015EDCC000420083CE6F79C2 = { + isa = PBXFileReference; + name = libdix.a; + path = dix/libdix.a; + refType = 4; + }; + 015EDCC20042012ACE6F79C2 = { + isa = PBXFileReference; + name = libos.a; + path = os/libos.a; + refType = 4; + }; + 015EDCC400420160CE6F79C2 = { + isa = PBXFileReference; + name = libXau.a; + path = ../../lib/Xau/libXau.a; + refType = 4; + }; + 015EDCC60042017CCE6F79C2 = { + isa = PBXFileReference; + name = libXdmcp.a; + path = ../../lib/Xdmcp/libXdmcp.a; + refType = 4; + }; + 015EDCC8004201A8CE6F79C2 = { + isa = PBXFileReference; + name = libdarwin.a; + path = hw/darwin/libdarwin.a; + refType = 4; + }; + 015EDCCA004201C1CE6F79C2 = { + isa = PBXFileReference; + name = libcfb.a; + path = cfb/libcfb.a; + refType = 4; + }; + 015EDCCC004201E4CE6F79C2 = { + isa = PBXFileReference; + name = libcfb16.a; + path = cfb16/libcfb16.a; + refType = 4; + }; + 015EDCCE004201F2CE6F79C2 = { + isa = PBXFileReference; + name = libcfb.a; + path = cfb/libcfb.a; + refType = 4; + }; + 015EDCD0004201FCCE6F79C2 = { + isa = PBXFileReference; + name = libcfb32.a; + path = cfb32/libcfb32.a; + refType = 4; + }; + 015EDCD20042020BCE6F79C2 = { + isa = PBXFileReference; + name = libcfb.a; + path = cfb/libcfb.a; + refType = 4; + }; + 015EDCD400420227CE6F79C2 = { + isa = PBXFileReference; + name = libmfb.a; + path = mfb/libmfb.a; + refType = 4; + }; + 015EDCD60042023DCE6F79C2 = { + isa = PBXFileReference; + name = libxpstubs.a; + path = dix/libxpstubs.a; + refType = 4; + }; + 015EDCD80042024ECE6F79C2 = { + isa = PBXFileReference; + name = libmi.a; + path = mi/libmi.a; + refType = 4; + }; + 015EDCDA00420266CE6F79C2 = { + isa = PBXFileReference; + name = libext.a; + path = Xext/libext.a; + refType = 4; + }; + 015EDCDC00420279CE6F79C2 = { + isa = PBXFileReference; + name = libxkb.a; + path = xkb/libxkb.a; + refType = 4; + }; + 015EDCDE00420295CE6F79C2 = { + isa = PBXFileReference; + name = liblbx.a; + path = lbx/liblbx.a; + refType = 4; + }; + 015EDCE0004202BACE6F79C2 = { + isa = PBXFileReference; + name = liblbxutil.a; + path = ../../lib/lbxutil/liblbxutil.a; + refType = 4; + }; + 015EDCE2004202DECE6F79C2 = { + isa = PBXFileReference; + name = libdbe.a; + path = dbe/libdbe.a; + refType = 4; + }; + 015EDCE4004202F2CE6F79C2 = { + isa = PBXFileReference; + name = librecord.a; + path = record/librecord.a; + refType = 4; + }; + 015EDCE600420319CE6F79C2 = { + isa = PBXFileReference; + name = libXfont.a; + path = ../../lib/font/libXfont.a; + refType = 4; + }; + 015EDCE800420346CE6F79C2 = { + isa = PBXFileReference; + name = libxpstubs.a; + path = dix/libxpstubs.a; + refType = 4; + }; + 015EDCEA004203A8CE6F79C2 = { + isa = PBXFrameworkReference; + name = IOKit.framework; + path = /System/Library/Frameworks/IOKit.framework; + refType = 0; + }; + 018F40F2003E1902CE6F79C2 = { + children = ( + 018F40F3003E1916CE6F79C2, + 021D6BA9003E1BACCE6F79C2, + 3E74E03600863F047F000001, + 018F40F6003E1974CE6F79C2, + ); + isa = PBXGroup; + name = "X Server"; + path = ..; + refType = 2; + }; + 018F40F3003E1916CE6F79C2 = { + isa = PBXFileReference; + path = darwin.c; + refType = 4; + }; + 018F40F6003E1974CE6F79C2 = { + isa = PBXFileReference; + path = darwinKeyboard.c; + refType = 4; + }; + 018F40F8003E1979CE6F79C2 = { + isa = PBXFileReference; + path = quartz.c; + refType = 4; + }; + 018F40FA003E197ECE6F79C2 = { + isa = PBXFileReference; + path = quartz.h; + refType = 4; + }; + 018F40FC003E1983CE6F79C2 = { + isa = PBXFileReference; + path = xfIOKit.c; + refType = 4; + }; + 018F40FE003E1988CE6F79C2 = { + isa = PBXFileReference; + path = xfIOKit.h; + refType = 4; + }; + 018F4100003E19E4CE6F79C2 = { + isa = PBXFileReference; + path = xfIOKitCursor.c; + refType = 4; + }; + 021D6BA9003E1BACCE6F79C2 = { + isa = PBXFileReference; + path = darwin.h; + refType = 4; + }; + 02A1FEA6006D34BE416877C2 = { + isa = PBXFileReference; + path = xfIOKitStartup.c; + refType = 4; + }; + 02A1FEA8006D38F0416877C2 = { + isa = PBXFileReference; + path = quartzStartup.c; + refType = 4; + }; + 02E03CA000348209CE6F79C2 = { + children = ( + 02E03CA100348209CE6F79C2, + 43B962E300617B93416877C2, + ); + isa = PBXVariantGroup; + name = XDarwinHelp.html; + path = ""; + refType = 4; + }; + 02E03CA100348209CE6F79C2 = { + isa = PBXFileReference; + name = English; + path = English.lproj/XDarwinHelp.html; + refType = 4; + }; + 0338412F0083BFE57F000001 = { + isa = PBXFileReference; + path = quartzCursor.h; + refType = 4; + }; + 04329610000763920A000002 = { + isa = PBXFileReference; + path = Preferences.m; + refType = 4; + }; + 04329611000763920A000002 = { + isa = PBXFileReference; + path = Preferences.h; + refType = 4; + }; + 06EB6C3B004099E7CE6F79C2 = { + isa = PBXFileReference; + path = quartzShared.h; + refType = 4; + }; + 080E96DDFE201D6D7F000001 = { + children = ( + 01279092000747AA0A000002, + 1C4A3109004D8F24CE6F79C2, + 0127909600074AF60A000002, + 0127909800074B1A0A000002, + 04329610000763920A000002, + 04329611000763920A000002, + ); + isa = PBXGroup; + name = Classes; + refType = 4; + }; + 089C165CFE840E0CC02AAC07 = { + children = ( + 089C165DFE840E0CC02AAC07, + 43B962E100617B49416877C2, + ); + isa = PBXVariantGroup; + name = InfoPlist.strings; + refType = 4; + }; + 089C165DFE840E0CC02AAC07 = { + isa = PBXFileReference; + name = English; + path = English.lproj/InfoPlist.strings; + refType = 4; + }; + 0A79E19E004499A1CE6F79C2 = { + isa = PBXApplicationReference; + path = XDarwin.app; + refType = 3; + }; + 0A79E19F004499A1CE6F79C2 = { + buildPhases = ( + 0A79E1A0004499A1CE6F79C2, + 0A79E1A1004499A1CE6F79C2, + 0A79E1A2004499A1CE6F79C2, + 0A79E1A3004499A1CE6F79C2, + 0A79E1A4004499A1CE6F79C2, + ); + buildSettings = { + INSTALL_PATH = ""; + OPTIMIZATION_CFLAGS = ""; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = XDarwin; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + WRAPPER_EXTENSION = app; + }; + conditionalBuildSettings = { + }; + dependencies = ( + ); + isa = PBXApplicationTarget; + name = XDarwin; + productInstallPath = ""; + productName = XDarwin; + productReference = 0A79E19E004499A1CE6F79C2; + productSettingsXML = " + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + XDarwin + CFBundleGetInfoString + XDarwin 1.0, ©2001 XFree86 Project, Inc. + CFBundleIconFile + XDarwin.icns + CFBundleIdentifier + org.xfree86.XDarwin + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + XDarwin + CFBundlePackageType + APPL + CFBundleShortVersionString + XDarwin 1.0 + CFBundleSignature + ???? + CFBundleVersion + + NSHelpFile + XDarwinHelp.html + NSMainNibFile + MainMenu + NSPrincipalClass + XApplication + + +"; + shouldUseHeadermap = 0; + }; + 0A79E1A0004499A1CE6F79C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + name = Headers; + }; + 0A79E1A1004499A1CE6F79C2 = { + buildActionMask = 2147483647; + files = ( + 0A79E1A600449EB2CE6F79C2, + 0A79E1A700449EB2CE6F79C2, + 0A79E1A800449EB2CE6F79C2, + 0A79E1A900449EB2CE6F79C2, + 0A79E1AA00449EB2CE6F79C2, + 1220774500712D2D416877C2, + ); + isa = PBXResourcesBuildPhase; + name = "Bundle Resources"; + }; + 0A79E1A2004499A1CE6F79C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXSourcesBuildPhase; + name = Sources; + }; + 0A79E1A3004499A1CE6F79C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXFrameworksBuildPhase; + name = "Frameworks & Libraries"; + }; + 0A79E1A4004499A1CE6F79C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + name = "ResourceManager Resources"; + }; + 0A79E1A600449EB2CE6F79C2 = { + fileRef = 29B97318FDCFA39411CA2CEA; + isa = PBXBuildFile; + settings = { + }; + }; + 0A79E1A700449EB2CE6F79C2 = { + fileRef = 089C165CFE840E0CC02AAC07; + isa = PBXBuildFile; + settings = { + }; + }; + 0A79E1A800449EB2CE6F79C2 = { + fileRef = 0157A37D002CF6D7CE6F79C2; + isa = PBXBuildFile; + settings = { + }; + }; + 0A79E1A900449EB2CE6F79C2 = { + fileRef = 02E03CA000348209CE6F79C2; + isa = PBXBuildFile; + settings = { + }; + }; + 0A79E1AA00449EB2CE6F79C2 = { + fileRef = 015698ED003DF345CE6F79C2; + isa = PBXBuildFile; + settings = { + }; + }; + 1058C7A0FEA54F0111CA2CBB = { + children = ( + 1058C7A1FEA54F0111CA2CBB, + 1BE4F84D0006C9890A000002, + 015EDCEA004203A8CE6F79C2, + ); + isa = PBXGroup; + name = "Linked Frameworks"; + refType = 4; + }; + 1058C7A1FEA54F0111CA2CBB = { + isa = PBXFrameworkReference; + name = Cocoa.framework; + path = /System/Library/Frameworks/Cocoa.framework; + refType = 0; + }; + 1058C7A2FEA54F0111CA2CBB = { + children = ( + 29B97325FDCFA39411CA2CEA, + 29B97324FDCFA39411CA2CEA, + ); + isa = PBXGroup; + name = "Other Frameworks"; + refType = 4; + }; + 1220774300712D2D416877C2 = { + children = ( + 1220774400712D2D416877C2, + 1220774600712D75416877C2, + ); + isa = PBXVariantGroup; + name = Localizable.strings; + path = ""; + refType = 4; + }; + 1220774400712D2D416877C2 = { + isa = PBXFileReference; + name = English; + path = English.lproj/Localizable.strings; + refType = 4; + }; + 1220774500712D2D416877C2 = { + fileRef = 1220774300712D2D416877C2; + isa = PBXBuildFile; + settings = { + }; + }; + 1220774600712D75416877C2 = { + isa = PBXFileReference; + name = Japanese; + path = Japanese.lproj/Localizable.strings; + refType = 4; + }; + 170DFAFF00729A35416877C2 = { + isa = PBXFileReference; + path = XDarwinStartup.c; + refType = 4; + }; + 170DFB0000729C86416877C2 = { + children = ( + 018F40FC003E1983CE6F79C2, + 018F40FE003E1988CE6F79C2, + 018F4100003E19E4CE6F79C2, + 02A1FEA6006D34BE416877C2, + ); + isa = PBXGroup; + name = "IOKit Support"; + path = ..; + refType = 2; + }; + 19C28FACFE9D520D11CA2CBB = { + children = ( + 0A79E19E004499A1CE6F79C2, + ); + isa = PBXGroup; + name = Products; + refType = 4; + }; + 1BD8DE4200B8A3567F000001 = { + children = ( + 1BD8DE4300B8A3567F000001, + 1BD8DE4700B8A3C77F000001, + ); + isa = PBXVariantGroup; + name = InfoPlist.strings.cpp; + path = ""; + refType = 4; + }; + 1BD8DE4300B8A3567F000001 = { + isa = PBXFileReference; + name = English; + path = English.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + 1BD8DE4400B8A38E7F000001 = { + children = ( + 1BD8DE4500B8A38E7F000001, + 1BD8DE4800B8A4167F000001, + ); + isa = PBXVariantGroup; + name = XDarwinHelp.html.cpp; + path = ""; + refType = 4; + }; + 1BD8DE4500B8A38E7F000001 = { + isa = PBXFileReference; + name = English; + path = English.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + 1BD8DE4700B8A3C77F000001 = { + isa = PBXFileReference; + name = Japanese; + path = Japanese.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + 1BD8DE4800B8A4167F000001 = { + isa = PBXFileReference; + name = Japanese; + path = Japanese.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + 1BE4F84D0006C9890A000002 = { + isa = PBXFrameworkReference; + name = Carbon.framework; + path = /System/Library/Frameworks/Carbon.framework; + refType = 0; + }; + 1C4A3109004D8F24CE6F79C2 = { + isa = PBXFileReference; + path = Xserver.h; + refType = 4; + }; + 237A34C10076E37E7F000001 = { + isa = PBXFileReference; + path = quartzAudio.c; + refType = 4; + }; + 237A34C20076E37E7F000001 = { + buildRules = ( + ); + buildSettings = { + COPY_PHASE_STRIP = NO; + }; + isa = PBXBuildStyle; + name = Development; + }; + 237A34C30076E37E7F000001 = { + buildRules = ( + ); + buildSettings = { + COPY_PHASE_STRIP = YES; + }; + isa = PBXBuildStyle; + name = Deployment; + }; + 237A34C40076F4F07F000001 = { + isa = PBXFileReference; + path = quartzAudio.h; + refType = 4; + }; + 29B97313FDCFA39411CA2CEA = { + buildStyles = ( + 237A34C20076E37E7F000001, + 237A34C30076E37E7F000001, + ); + isa = PBXProject; + mainGroup = 29B97314FDCFA39411CA2CEA; + targets = ( + 0A79E19F004499A1CE6F79C2, + ); + }; + 29B97314FDCFA39411CA2CEA = { + children = ( + 080E96DDFE201D6D7F000001, + 29B97315FDCFA39411CA2CEA, + 29B97317FDCFA39411CA2CEA, + 618092480041B0E4CE6F79C2, + 29B97323FDCFA39411CA2CEA, + 19C28FACFE9D520D11CA2CBB, + ); + isa = PBXGroup; + name = "Xmaster-Cocoa"; + path = ""; + refType = 4; + }; + 29B97315FDCFA39411CA2CEA = { + children = ( + 170DFAFF00729A35416877C2, + 018F40F2003E1902CE6F79C2, + 170DFB0000729C86416877C2, + 43B962CE00617089416877C2, + ); + isa = PBXGroup; + name = "Other Sources"; + path = ""; + refType = 2; + }; + 29B97317FDCFA39411CA2CEA = { + children = ( + 29B97318FDCFA39411CA2CEA, + 089C165CFE840E0CC02AAC07, + 1BD8DE4200B8A3567F000001, + 1220774300712D2D416877C2, + 0157A37D002CF6D7CE6F79C2, + 02E03CA000348209CE6F79C2, + 1BD8DE4400B8A38E7F000001, + 015698ED003DF345CE6F79C2, + ); + isa = PBXGroup; + name = Resources; + path = ""; + refType = 4; + }; + 29B97318FDCFA39411CA2CEA = { + children = ( + 29B97319FDCFA39411CA2CEA, + 43B962E000617B49416877C2, + ); + isa = PBXVariantGroup; + name = MainMenu.nib; + path = ""; + refType = 4; + }; + 29B97319FDCFA39411CA2CEA = { + isa = PBXFileReference; + name = English; + path = English.lproj/MainMenu.nib; + refType = 4; + }; + 29B97323FDCFA39411CA2CEA = { + children = ( + 1058C7A0FEA54F0111CA2CBB, + 1058C7A2FEA54F0111CA2CBB, + ); + isa = PBXGroup; + name = Frameworks; + path = ""; + refType = 4; + }; + 29B97324FDCFA39411CA2CEA = { + isa = PBXFrameworkReference; + name = AppKit.framework; + path = /System/Library/Frameworks/AppKit.framework; + refType = 0; + }; + 29B97325FDCFA39411CA2CEA = { + isa = PBXFrameworkReference; + name = Foundation.framework; + path = /System/Library/Frameworks/Foundation.framework; + refType = 0; + }; + 3576829A0077B8F17F000001 = { + isa = PBXFileReference; + path = quartzCursor.c; + refType = 4; + }; + 3E74E03600863F047F000001 = { + isa = PBXFileReference; + path = darwinClut8.h; + refType = 4; + }; + 43B962CE00617089416877C2 = { + children = ( + 018F40F8003E1979CE6F79C2, + 018F40FA003E197ECE6F79C2, + 237A34C10076E37E7F000001, + 237A34C40076F4F07F000001, + 3576829A0077B8F17F000001, + 0338412F0083BFE57F000001, + 43B962D000617089416877C2, + 43B962CF00617089416877C2, + 43B962D100617089416877C2, + 06EB6C3B004099E7CE6F79C2, + 02A1FEA8006D38F0416877C2, + ); + isa = PBXGroup; + name = "Quartz Support"; + refType = 4; + }; + 43B962CF00617089416877C2 = { + isa = PBXFileReference; + path = quartzCocoa.m; + refType = 4; + }; + 43B962D000617089416877C2 = { + isa = PBXFileReference; + path = quartzPasteboard.c; + refType = 4; + }; + 43B962D100617089416877C2 = { + isa = PBXFileReference; + path = quartzPasteboard.h; + refType = 4; + }; + 43B962E000617B49416877C2 = { + isa = PBXFileReference; + name = Japanese; + path = Japanese.lproj/MainMenu.nib; + refType = 4; + }; + 43B962E100617B49416877C2 = { + isa = PBXFileReference; + name = Japanese; + path = Japanese.lproj/InfoPlist.strings; + refType = 4; + }; + 43B962E200617B93416877C2 = { + isa = PBXFileReference; + name = Japanese; + path = Japanese.lproj/Credits.rtf; + refType = 4; + }; + 43B962E300617B93416877C2 = { + isa = PBXFileReference; + name = Japanese; + path = Japanese.lproj/XDarwinHelp.html; + refType = 4; + }; + 618092480041B0E4CE6F79C2 = { + children = ( + 015EDCC000420083CE6F79C2, + 015EDCC20042012ACE6F79C2, + 015EDCC400420160CE6F79C2, + 015EDCC60042017CCE6F79C2, + 015EDCC8004201A8CE6F79C2, + 015EDCCA004201C1CE6F79C2, + 015EDCCC004201E4CE6F79C2, + 015EDCCE004201F2CE6F79C2, + 015EDCD0004201FCCE6F79C2, + 015EDCD20042020BCE6F79C2, + 015EDCD400420227CE6F79C2, + 015EDCD60042023DCE6F79C2, + 015EDCD80042024ECE6F79C2, + 015EDCDA00420266CE6F79C2, + 015EDCDC00420279CE6F79C2, + 015EDCDE00420295CE6F79C2, + 015EDCE0004202BACE6F79C2, + 015EDCE2004202DECE6F79C2, + 015EDCE4004202F2CE6F79C2, + 015EDCE600420319CE6F79C2, + 015EDCE800420346CE6F79C2, + ); + isa = PBXGroup; + name = Libraries; + path = ../../..; + refType = 2; + }; + }; + rootObject = 29B97313FDCFA39411CA2CEA; +} Index: xc/programs/Xserver/hw/dec/ws/Imakefile diff -u xc/programs/Xserver/hw/dec/ws/Imakefile:1.1.1.2 xc/programs/Xserver/hw/dec/ws/Imakefile:1.1.1.3 --- xc/programs/Xserver/hw/dec/ws/Imakefile:1.1.1.2 Sat Dec 21 22:35:50 1996 +++ xc/programs/Xserver/hw/dec/ws/Imakefile Tue Jan 16 17:42:51 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: Imakefile /main/13 1996/09/28 17:12:22 rws $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ #include XCOMM Index: xc/programs/Xserver/hw/dec/ws/Xdec.man diff -u xc/programs/Xserver/hw/dec/ws/Xdec.man:1.4 xc/programs/Xserver/hw/dec/ws/Xdec.man:1.6 --- xc/programs/Xserver/hw/dec/ws/Xdec.man:1.4 Sun Oct 4 05:38:21 1998 +++ xc/programs/Xserver/hw/dec/ws/Xdec.man Sat Jan 27 13:20:39 2001 @@ -1,4 +1,4 @@ -.\" $TOG: Xdec.man /main/9 1998/02/10 12:45:43 kaleb $ +.\" $Xorg: Xdec.man,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ .\" Copyright 1991 Digital Equipment Corporation .\" Copyright 1993, 1998 The Open Group .\" @@ -18,8 +18,11 @@ .\" Except as contained in this notice, the name of The Open Group shall .\" not be used in advertising or otherwise to promote the sale, use or .\" other dealings in this Software without prior written authorization +.\" +.\" $XFree86: xc/programs/Xserver/hw/dec/ws/Xdec.man,v 1.6 2001/01/27 18:20:39 dawes Exp $ +.\" .\" from The Open Group. -.TH XDEC 1 "Release 6.4" "X Version 11" +.TH XDEC 1 __xorgversion__ .SH Name Xdec \- X server for Digital RISC machines .SH Syntax Index: xc/programs/Xserver/hw/dec/ws/acc_2da.c diff -u xc/programs/Xserver/hw/dec/ws/acc_2da.c:1.1.1.2 xc/programs/Xserver/hw/dec/ws/acc_2da.c:1.1.1.3 --- xc/programs/Xserver/hw/dec/ws/acc_2da.c:1.1.1.2 Sun Sep 27 04:06:05 1998 +++ xc/programs/Xserver/hw/dec/ws/acc_2da.c Tue Jan 16 17:42:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: acc_2da.c /main/4 1998/02/10 12:44:34 kaleb $ */ +/* $Xorg: acc_2da.c,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ /*********************************************************** Copyright 1991, 1998 The Open Group Index: xc/programs/Xserver/hw/dec/ws/acc_3d.c diff -u xc/programs/Xserver/hw/dec/ws/acc_3d.c:1.1.1.2 xc/programs/Xserver/hw/dec/ws/acc_3d.c:1.1.1.3 --- xc/programs/Xserver/hw/dec/ws/acc_3d.c:1.1.1.2 Sun Sep 27 04:06:06 1998 +++ xc/programs/Xserver/hw/dec/ws/acc_3d.c Tue Jan 16 17:42:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: acc_3d.c /main/4 1998/02/10 12:44:39 kaleb $ */ +/* $Xorg: acc_3d.c,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ /*********************************************************** Copyright 1991, 1998 The Open Group Index: xc/programs/Xserver/hw/dec/ws/acc_none.c diff -u xc/programs/Xserver/hw/dec/ws/acc_none.c:1.1.1.2 xc/programs/Xserver/hw/dec/ws/acc_none.c:1.1.1.3 --- xc/programs/Xserver/hw/dec/ws/acc_none.c:1.1.1.2 Sun Sep 27 04:06:06 1998 +++ xc/programs/Xserver/hw/dec/ws/acc_none.c Tue Jan 16 17:42:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: acc_none.c /main/5 1998/02/10 12:44:46 kaleb $ */ +/* $Xorg: acc_none.c,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ /*********************************************************** Copyright 1991, 1998 The Open Group Index: xc/programs/Xserver/hw/dec/ws/cfbinit.c diff -u xc/programs/Xserver/hw/dec/ws/cfbinit.c:1.4 xc/programs/Xserver/hw/dec/ws/cfbinit.c:1.5 --- xc/programs/Xserver/hw/dec/ws/cfbinit.c:1.4 Sun Oct 4 05:38:22 1998 +++ xc/programs/Xserver/hw/dec/ws/cfbinit.c Wed Jan 17 17:36:45 2001 @@ -1,4 +1,4 @@ -/* $TOG: cfbinit.c /main/14 1998/03/17 17:41:19 kaleb $ */ +/* $Xorg: cfbinit.c,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ /*********************************************************** Copyright 1991, 1998 The Open Group Index: xc/programs/Xserver/hw/dec/ws/ext_device.c diff -u xc/programs/Xserver/hw/dec/ws/ext_device.c:1.1.1.2 xc/programs/Xserver/hw/dec/ws/ext_device.c:1.1.1.3 --- xc/programs/Xserver/hw/dec/ws/ext_device.c:1.1.1.2 Sun Sep 27 04:06:08 1998 +++ xc/programs/Xserver/hw/dec/ws/ext_device.c Tue Jan 16 17:42:53 2001 @@ -48,7 +48,7 @@ * */ -/* $TOG: ext_device.c /main/4 1998/02/10 12:44:58 kaleb $ */ +/* $Xorg: ext_device.c,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ #ifdef XINPUT Index: xc/programs/Xserver/hw/dec/ws/init.c diff -u xc/programs/Xserver/hw/dec/ws/init.c:1.1.1.5 xc/programs/Xserver/hw/dec/ws/init.c:1.1.1.6 --- xc/programs/Xserver/hw/dec/ws/init.c:1.1.1.5 Sun Sep 27 07:06:23 1998 +++ xc/programs/Xserver/hw/dec/ws/init.c Tue Jan 16 17:42:53 2001 @@ -41,7 +41,7 @@ ******************************************************************/ -/* $TOG: init.c /main/14 1998/03/17 16:39:04 kaleb $ */ +/* $Xorg: init.c,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ #include #include Index: xc/programs/Xserver/hw/dec/ws/keynames.h diff -u xc/programs/Xserver/hw/dec/ws/keynames.h:1.1.1.2 xc/programs/Xserver/hw/dec/ws/keynames.h:1.1.1.3 --- xc/programs/Xserver/hw/dec/ws/keynames.h:1.1.1.2 Sun Sep 27 04:06:09 1998 +++ xc/programs/Xserver/hw/dec/ws/keynames.h Tue Jan 16 17:42:54 2001 @@ -1,4 +1,4 @@ -/* $TOG: keynames.h /main/4 1998/02/10 12:45:11 kaleb $ */ +/* $Xorg: keynames.h,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ /*********************************************************** Copyright 1991, 1998 The Open Group Index: xc/programs/Xserver/hw/dec/ws/mdepthinit.c diff -u xc/programs/Xserver/hw/dec/ws/mdepthinit.c:1.5 xc/programs/Xserver/hw/dec/ws/mdepthinit.c:1.6 --- xc/programs/Xserver/hw/dec/ws/mdepthinit.c:1.5 Sun Jan 31 07:21:43 1999 +++ xc/programs/Xserver/hw/dec/ws/mdepthinit.c Wed Jan 17 17:36:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: mdepthinit.c /main/10 1998/03/17 16:39:08 kaleb $ */ +/* $Xorg: mdepthinit.c,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group @@ -23,7 +23,7 @@ */ -/* $XFree86: xc/programs/Xserver/hw/dec/ws/mdepthinit.c,v 1.5 1999/01/31 12:21:43 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/dec/ws/mdepthinit.c,v 1.6 2001/01/17 22:36:46 dawes Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/hw/dec/ws/ws.h diff -u xc/programs/Xserver/hw/dec/ws/ws.h:1.3 xc/programs/Xserver/hw/dec/ws/ws.h:1.4 --- xc/programs/Xserver/hw/dec/ws/ws.h:1.3 Sun Oct 4 05:38:23 1998 +++ xc/programs/Xserver/hw/dec/ws/ws.h Wed Jan 17 17:36:46 2001 @@ -39,7 +39,7 @@ SOFTWARE. ******************************************************************/ -/* $TOG: ws.h /main/6 1998/02/10 12:45:22 kaleb $ */ +/* $Xorg: ws.h,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ #ifndef NO_DEC_VALUE_ADDED #define SCREENW6 640 Index: xc/programs/Xserver/hw/dec/ws/ws_color.c diff -u xc/programs/Xserver/hw/dec/ws/ws_color.c:1.3 xc/programs/Xserver/hw/dec/ws/ws_color.c:1.4 --- xc/programs/Xserver/hw/dec/ws/ws_color.c:1.3 Sun Oct 4 05:38:23 1998 +++ xc/programs/Xserver/hw/dec/ws/ws_color.c Wed Jan 17 17:36:46 2001 @@ -40,7 +40,7 @@ SOFTWARE. ******************************************************************/ -/* $TOG: ws_color.c /main/9 1998/03/17 16:39:12 kaleb $ */ +/* $Xorg: ws_color.c,v 1.3 2000/08/17 19:48:21 cpqbld Exp $ */ /* * ws_color.c - device specific color routines, stored in screen Index: xc/programs/Xserver/hw/dec/ws/ws_io.c diff -u xc/programs/Xserver/hw/dec/ws/ws_io.c:1.3 xc/programs/Xserver/hw/dec/ws/ws_io.c:1.4 --- xc/programs/Xserver/hw/dec/ws/ws_io.c:1.3 Sun Oct 4 05:38:24 1998 +++ xc/programs/Xserver/hw/dec/ws/ws_io.c Wed Jan 17 17:36:46 2001 @@ -41,7 +41,7 @@ ******************************************************************/ -/* $TOG: ws_io.c /main/22 1998/02/27 10:30:37 kaleb $ */ +/* $Xorg: ws_io.c,v 1.3 2000/08/17 19:48:21 cpqbld Exp $ */ #include #include Index: xc/programs/Xserver/hw/hp/Imakefile diff -u xc/programs/Xserver/hw/hp/Imakefile:1.1.1.4 xc/programs/Xserver/hw/hp/Imakefile:1.1.1.5 --- xc/programs/Xserver/hw/hp/Imakefile:1.1.1.4 Sat Dec 21 22:36:23 1996 +++ xc/programs/Xserver/hw/hp/Imakefile Tue Jan 16 17:42:56 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: Imakefile /main/9 1996/09/28 17:12:28 rws $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:21 cpqbld Exp $ #include #define IHaveSubdirs Index: xc/programs/Xserver/hw/hp/Xhp.man diff -u xc/programs/Xserver/hw/hp/Xhp.man:1.4 xc/programs/Xserver/hw/hp/Xhp.man:1.6 --- xc/programs/Xserver/hw/hp/Xhp.man:1.4 Sun Oct 4 05:38:25 1998 +++ xc/programs/Xserver/hw/hp/Xhp.man Sat Jan 27 13:20:40 2001 @@ -1,4 +1,4 @@ -.\" $TOG: Xhp.man /main/6 1998/02/10 13:10:34 kaleb $ +.\" $Xorg: Xhp.man,v 1.3 2000/08/17 19:48:21 cpqbld Exp $ .\" Copyright 1994 Hewlett-Packard Company .\" Copyright 1994, 1998 The Open Group .\" @@ -26,7 +26,10 @@ .\" for errors contained herein or direct, indirect, special, incidental or .\" consequential damages in connection with the furnishing, performance, or .\" use of this material. -.TH Xhp 1 "Release 6.4" "X Version 11" +.\" +.\" $XFree86: xc/programs/Xserver/hw/hp/Xhp.man,v 1.6 2001/01/27 18:20:40 dawes Exp $ +.\" +.TH Xhp 1 __xorgversion__ .SH NAME Xhp \- cfb-based X window system server for Hewlett-Packard workstations .SH SYNOPSIS Index: xc/programs/Xserver/hw/hp/ddx_info.c diff -u xc/programs/Xserver/hw/hp/ddx_info.c:1.1.1.4 xc/programs/Xserver/hw/hp/ddx_info.c:1.1.1.5 --- xc/programs/Xserver/hw/hp/ddx_info.c:1.1.1.4 Sun Sep 27 04:06:40 1998 +++ xc/programs/Xserver/hw/hp/ddx_info.c Tue Jan 16 17:42:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: ddx_info.c /main/4 1997/07/17 21:20:02 kaleb $ */ +/* $Xorg: ddx_info.c,v 1.3 2000/08/17 19:48:21 cpqbld Exp $ */ /************************************************************************* * Index: xc/programs/Xserver/hw/hp/hpCursorUtils.c diff -u xc/programs/Xserver/hw/hp/hpCursorUtils.c:1.1.1.3 xc/programs/Xserver/hw/hp/hpCursorUtils.c:1.1.1.4 --- xc/programs/Xserver/hw/hp/hpCursorUtils.c:1.1.1.3 Sun Sep 27 04:06:41 1998 +++ xc/programs/Xserver/hw/hp/hpCursorUtils.c Tue Jan 16 17:42:56 2001 @@ -1,4 +1,4 @@ -/* $TOG: hpCursorUtils.c /main/4 1998/02/10 13:10:25 kaleb $ */ +/* $Xorg: hpCursorUtils.c,v 1.3 2000/08/17 19:48:21 cpqbld Exp $ */ /************************************************************************* * * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. Index: xc/programs/Xserver/hw/hp/hpInit.c diff -u xc/programs/Xserver/hw/hp/hpInit.c:1.2 xc/programs/Xserver/hw/hp/hpInit.c:1.3 --- xc/programs/Xserver/hw/hp/hpInit.c:1.2 Sat Nov 22 01:50:23 1997 +++ xc/programs/Xserver/hw/hp/hpInit.c Wed Jan 17 17:36:46 2001 @@ -1,4 +1,4 @@ -/* $TOG: hpInit.c /main/6 1997/11/12 14:38:12 kaleb $ */ +/* $Xorg: hpInit.c,v 1.3 2000/08/17 19:48:21 cpqbld Exp $ */ /************************************************************************* * * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. Index: xc/programs/Xserver/hw/hp/include/XHPproto.h diff -u xc/programs/Xserver/hw/hp/include/XHPproto.h:1.1.1.2 xc/programs/Xserver/hw/hp/include/XHPproto.h:1.1.1.3 --- xc/programs/Xserver/hw/hp/include/XHPproto.h:1.1.1.2 Fri Jan 27 18:55:34 1995 +++ xc/programs/Xserver/hw/hp/include/XHPproto.h Tue Jan 16 17:42:57 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XHPproto.h,v 1.2 95/01/24 01:46:26 dpw Exp $ */ +/* $Xorg: XHPproto.h,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ */ /************************************************************************* * * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. Index: xc/programs/Xserver/hw/hp/include/hppriv.h diff -u xc/programs/Xserver/hw/hp/include/hppriv.h:1.1.1.2 xc/programs/Xserver/hw/hp/include/hppriv.h:1.1.1.3 --- xc/programs/Xserver/hw/hp/include/hppriv.h:1.1.1.2 Sun Sep 27 04:06:44 1998 +++ xc/programs/Xserver/hw/hp/include/hppriv.h Tue Jan 16 17:42:58 2001 @@ -1,4 +1,4 @@ -/* $TOG: hppriv.h /main/3 1998/02/10 13:10:38 kaleb $ */ +/* $Xorg: hppriv.h,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ */ /************************************************************************* * * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. Index: xc/programs/Xserver/hw/hp/input/Imakefile diff -u xc/programs/Xserver/hw/hp/input/Imakefile:1.1.1.4 xc/programs/Xserver/hw/hp/input/Imakefile:1.1.1.5 --- xc/programs/Xserver/hw/hp/input/Imakefile:1.1.1.4 Sat Dec 21 22:36:39 1996 +++ xc/programs/Xserver/hw/hp/input/Imakefile Tue Jan 16 17:42:58 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: Imakefile /main/7 1996/09/28 17:12:35 rws $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ #include #define IHaveSubdirs Index: xc/programs/Xserver/hw/hp/input/cr16.s diff -u xc/programs/Xserver/hw/hp/input/cr16.s:3.0 xc/programs/Xserver/hw/hp/input/cr16.s:3.1 --- xc/programs/Xserver/hw/hp/input/cr16.s:3.0 Sat Jul 1 06:46:04 1995 +++ xc/programs/Xserver/hw/hp/input/cr16.s Wed Jan 17 17:36:47 2001 @@ -1,4 +1,4 @@ -; $XConsortium: cr16.s,v 1.2 95/06/15 15:25:19 dpw Exp $ +; $Xorg: cr16.s,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ .SPACE $TEXT$ .SUBSPA $CODE$ .export cr16 Index: xc/programs/Xserver/hw/hp/input/get_tv.c diff -u xc/programs/Xserver/hw/hp/input/get_tv.c:1.1.1.1 xc/programs/Xserver/hw/hp/input/get_tv.c:1.1.1.2 --- xc/programs/Xserver/hw/hp/input/get_tv.c:1.1.1.1 Wed Apr 27 03:15:16 1994 +++ xc/programs/Xserver/hw/hp/input/get_tv.c Tue Jan 16 17:42:59 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: get_tv.c,v 1.1 93/08/08 12:58:41 rws Exp $ */ +/* $Xorg: get_tv.c,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ */ /* Index: xc/programs/Xserver/hw/hp/input/getkeysym.c diff -u xc/programs/Xserver/hw/hp/input/getkeysym.c:1.1.1.3 xc/programs/Xserver/hw/hp/input/getkeysym.c:1.1.1.4 --- xc/programs/Xserver/hw/hp/input/getkeysym.c:1.1.1.3 Fri Jan 27 18:56:05 1995 +++ xc/programs/Xserver/hw/hp/input/getkeysym.c Tue Jan 16 17:43:00 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: getkeysym.c,v 1.7 95/01/24 02:45:23 dpw Exp $ */ +/* $Xorg: getkeysym.c,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ */ /* Copyright (c) 1986, 1987 by Hewlett-Packard Company Index: xc/programs/Xserver/hw/hp/input/hildef.h diff -u xc/programs/Xserver/hw/hp/input/hildef.h:1.1.1.3 xc/programs/Xserver/hw/hp/input/hildef.h:1.1.1.4 --- xc/programs/Xserver/hw/hp/input/hildef.h:1.1.1.3 Sun Sep 27 04:06:55 1998 +++ xc/programs/Xserver/hw/hp/input/hildef.h Tue Jan 16 17:43:00 2001 @@ -1,6 +1,6 @@ #ifndef HILDEF_H #define HILDEF_H -/* $TOG: hildef.h /main/5 1998/02/10 13:10:59 kaleb $ */ +/* $Xorg: hildef.h,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ */ /* Copyright 1988, 1998 The Open Group Index: xc/programs/Xserver/hw/hp/input/hpKeyMap.c diff -u xc/programs/Xserver/hw/hp/input/hpKeyMap.c:3.2 xc/programs/Xserver/hw/hp/input/hpKeyMap.c:3.3 --- xc/programs/Xserver/hw/hp/input/hpKeyMap.c:3.2 Sun Oct 4 05:38:26 1998 +++ xc/programs/Xserver/hw/hp/input/hpKeyMap.c Wed Jan 17 17:36:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: hpKeyMap.c /main/5 1998/02/10 13:11:10 kaleb $ */ +/* $Xorg: hpKeyMap.c,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ */ /* Copyright 1986, 1987, 1998 The Open Group Index: xc/programs/Xserver/hw/hp/input/hpext.h diff -u xc/programs/Xserver/hw/hp/input/hpext.h:1.1.1.3 xc/programs/Xserver/hw/hp/input/hpext.h:1.1.1.4 --- xc/programs/Xserver/hw/hp/input/hpext.h:1.1.1.3 Sat Feb 10 00:32:36 1996 +++ xc/programs/Xserver/hw/hp/input/hpext.h Tue Jan 16 17:43:02 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: hpext.h /main/4 1996/01/22 18:29:38 gildea $ */ +/* $Xorg: hpext.h,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ */ /* Index: xc/programs/Xserver/hw/hp/input/hpkeys.h diff -u xc/programs/Xserver/hw/hp/input/hpkeys.h:1.1.1.2 xc/programs/Xserver/hw/hp/input/hpkeys.h:1.1.1.3 --- xc/programs/Xserver/hw/hp/input/hpkeys.h:1.1.1.2 Sun Sep 27 04:06:57 1998 +++ xc/programs/Xserver/hw/hp/input/hpkeys.h Tue Jan 16 17:43:02 2001 @@ -1,6 +1,6 @@ #ifndef HPKEYS_H #define HPKEYS_H -/* $TOG: hpkeys.h /main/3 1998/02/10 13:11:15 kaleb $ */ +/* $Xorg: hpkeys.h,v 1.3 2000/08/17 19:48:23 cpqbld Exp $ */ /* Copyright 1986, 1987, 1998 The Open Group Index: xc/programs/Xserver/hw/hp/input/screentab.h diff -u xc/programs/Xserver/hw/hp/input/screentab.h:1.1.1.3 xc/programs/Xserver/hw/hp/input/screentab.h:1.1.1.4 --- xc/programs/Xserver/hw/hp/input/screentab.h:1.1.1.3 Sun Sep 27 04:06:58 1998 +++ xc/programs/Xserver/hw/hp/input/screentab.h Tue Jan 16 17:43:02 2001 @@ -1,4 +1,4 @@ -/* $TOG: screentab.h /main/5 1998/02/10 13:11:20 kaleb $ */ +/* $Xorg: screentab.h,v 1.3 2000/08/17 19:48:23 cpqbld Exp $ */ /* Copyright 1988, 1998 The Open Group Index: xc/programs/Xserver/hw/hp/input/x_hil.c diff -u xc/programs/Xserver/hw/hp/input/x_hil.c:3.1 xc/programs/Xserver/hw/hp/input/x_hil.c:3.2 --- xc/programs/Xserver/hw/hp/input/x_hil.c:3.1 Sun Oct 4 05:38:27 1998 +++ xc/programs/Xserver/hw/hp/input/x_hil.c Wed Jan 17 17:36:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: x_hil.c /main/9 1998/02/10 13:11:38 kaleb $ */ +/* $Xorg: x_hil.c,v 1.3 2000/08/17 19:48:23 cpqbld Exp $ */ /******************************************************************* ** @@ -24,7 +24,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/hp/input/x_hil.c,v 3.1 1998/10/04 09:38:27 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/hp/input/x_hil.c,v 3.2 2001/01/17 22:36:47 dawes Exp $ */ /* Index: xc/programs/Xserver/hw/hp/input/x_hil.h diff -u xc/programs/Xserver/hw/hp/input/x_hil.h:1.1.1.3 xc/programs/Xserver/hw/hp/input/x_hil.h:1.1.1.4 --- xc/programs/Xserver/hw/hp/input/x_hil.h:1.1.1.3 Sun Sep 27 04:07:00 1998 +++ xc/programs/Xserver/hw/hp/input/x_hil.h Tue Jan 16 17:43:04 2001 @@ -1,6 +1,6 @@ #ifndef X_HIL_H #define X_HIL_H -/* $TOG: x_hil.h /main/5 1998/02/10 13:11:44 kaleb $ */ +/* $Xorg: x_hil.h,v 1.3 2000/08/17 19:48:23 cpqbld Exp $ */ /* Copyright 1988, 1998 The Open Group Index: xc/programs/Xserver/hw/hp/input/x_hilinit.c diff -u xc/programs/Xserver/hw/hp/input/x_hilinit.c:3.3 xc/programs/Xserver/hw/hp/input/x_hilinit.c:3.4 --- xc/programs/Xserver/hw/hp/input/x_hilinit.c:3.3 Sun Oct 4 05:38:28 1998 +++ xc/programs/Xserver/hw/hp/input/x_hilinit.c Wed Jan 17 17:36:47 2001 @@ -1,4 +1,4 @@ -/* $TOG: x_hilinit.c /main/10 1998/02/10 13:11:28 kaleb $ */ +/* $Xorg: x_hilinit.c,v 1.3 2000/08/17 19:48:24 cpqbld Exp $ */ /* Copyright 1988, 1998 The Open Group @@ -46,7 +46,7 @@ University of California. */ -/* $XFree86: xc/programs/Xserver/hw/hp/input/x_hilinit.c,v 3.3 1998/10/04 09:38:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/hp/input/x_hilinit.c,v 3.4 2001/01/17 22:36:47 dawes Exp $ */ #define NEED_EVENTS #define NITEMS(array) (sizeof(array)/sizeof(array[0])) Index: xc/programs/Xserver/hw/hp/input/x_hilinit.h diff -u xc/programs/Xserver/hw/hp/input/x_hilinit.h:1.1.1.2 xc/programs/Xserver/hw/hp/input/x_hilinit.h:1.1.1.3 --- xc/programs/Xserver/hw/hp/input/x_hilinit.h:1.1.1.2 Sun Sep 27 04:07:02 1998 +++ xc/programs/Xserver/hw/hp/input/x_hilinit.h Tue Jan 16 17:43:06 2001 @@ -1,6 +1,6 @@ #ifndef X_HILINIT_H #define X_HILINIT_H -/* $TOG: x_hilinit.h /main/3 1998/02/10 13:11:34 kaleb $ */ +/* $Xorg: x_hilinit.h,v 1.3 2000/08/17 19:48:24 cpqbld Exp $ */ /* Copyright 1986, 1987, 1998 The Open Group Index: xc/programs/Xserver/hw/hp/input/x_serialdrv.h diff -u xc/programs/Xserver/hw/hp/input/x_serialdrv.h:1.1.1.2 xc/programs/Xserver/hw/hp/input/x_serialdrv.h:1.1.1.3 --- xc/programs/Xserver/hw/hp/input/x_serialdrv.h:1.1.1.2 Fri Jan 27 18:56:19 1995 +++ xc/programs/Xserver/hw/hp/input/x_serialdrv.h Tue Jan 16 17:43:06 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: x_serialdrv.h,v 1.3 95/01/24 23:37:51 gildea Exp $ */ +/* $Xorg: x_serialdrv.h,v 1.3 2000/08/17 19:48:24 cpqbld Exp $ */ /************************************************************ Copyright (c) 1992 by Hewlett-Packard Company, Palo Alto, California. Index: xc/programs/Xserver/hw/hp/input/xtest1imp.c diff -u xc/programs/Xserver/hw/hp/input/xtest1imp.c:1.1.1.3 xc/programs/Xserver/hw/hp/input/xtest1imp.c:1.1.1.4 --- xc/programs/Xserver/hw/hp/input/xtest1imp.c:1.1.1.3 Sun Sep 27 04:07:03 1998 +++ xc/programs/Xserver/hw/hp/input/xtest1imp.c Tue Jan 16 17:43:07 2001 @@ -1,4 +1,4 @@ -/* $TOG: xtest1imp.c /main/4 1998/02/10 13:11:24 kaleb $ */ +/* $Xorg: xtest1imp.c,v 1.3 2000/08/17 19:48:24 cpqbld Exp $ */ /* * File: xtest1dd.c * Index: xc/programs/Xserver/hw/hp/input/X11/XHPlib.h diff -u xc/programs/Xserver/hw/hp/input/X11/XHPlib.h:1.1.1.3 xc/programs/Xserver/hw/hp/input/X11/XHPlib.h:1.1.1.4 --- xc/programs/Xserver/hw/hp/input/X11/XHPlib.h:1.1.1.3 Sat Dec 21 22:36:49 1996 +++ xc/programs/Xserver/hw/hp/input/X11/XHPlib.h Tue Jan 16 17:43:07 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: XHPlib.h /main/4 1996/12/04 10:23:16 lehors $ */ +/* $Xorg: XHPlib.h,v 1.3 2000/08/17 19:48:24 cpqbld Exp $ */ /************************************************************ Copyright (c) 1992 by Hewlett-Packard Company, Palo Alto, California. Index: xc/programs/Xserver/hw/hp/input/drivers/Imakefile diff -u xc/programs/Xserver/hw/hp/input/drivers/Imakefile:3.2 xc/programs/Xserver/hw/hp/input/drivers/Imakefile:3.3 --- xc/programs/Xserver/hw/hp/input/drivers/Imakefile:3.2 Sat Dec 28 03:11:42 1996 +++ xc/programs/Xserver/hw/hp/input/drivers/Imakefile Wed Jan 17 17:36:48 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: Imakefile /main/5 1996/12/26 09:00:56 kaleb $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:24 cpqbld Exp $ #include Index: xc/programs/Xserver/hw/hp/input/drivers/X0screens diff -u xc/programs/Xserver/hw/hp/input/drivers/X0screens:1.1.1.1 xc/programs/Xserver/hw/hp/input/drivers/X0screens:1.1.1.2 --- xc/programs/Xserver/hw/hp/input/drivers/X0screens:1.1.1.1 Fri Jan 27 18:56:26 1995 +++ xc/programs/Xserver/hw/hp/input/drivers/X0screens Tue Jan 16 17:43:07 2001 @@ -1,3 +1,3 @@ -# $XConsortium: X0screens,v 1.1 95/01/23 21:56:39 dpw Exp $ +# $Xorg: X0screens,v 1.3 2000/08/17 19:48:25 cpqbld Exp $ /dev/crt Index: xc/programs/Xserver/hw/hp/input/drivers/hil_driver.c diff -u xc/programs/Xserver/hw/hp/input/drivers/hil_driver.c:3.0 xc/programs/Xserver/hw/hp/input/drivers/hil_driver.c:3.1 --- xc/programs/Xserver/hw/hp/input/drivers/hil_driver.c:3.0 Tue Feb 20 09:33:05 1996 +++ xc/programs/Xserver/hw/hp/input/drivers/hil_driver.c Wed Jan 17 17:36:48 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: hil_driver.c,v 1.2 95/01/25 17:24:43 gildea Exp $ */ +/* $Xorg: hil_driver.c,v 1.3 2000/08/17 19:48:25 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Hewlett-Packard Company, Palo Alto, California Index: xc/programs/Xserver/hw/hp/input/drivers/hp7lc2k.c diff -u xc/programs/Xserver/hw/hp/input/drivers/hp7lc2k.c:3.1 xc/programs/Xserver/hw/hp/input/drivers/hp7lc2k.c:3.2 --- xc/programs/Xserver/hw/hp/input/drivers/hp7lc2k.c:3.1 Mon Dec 23 01:29:59 1996 +++ xc/programs/Xserver/hw/hp/input/drivers/hp7lc2k.c Wed Jan 17 17:36:48 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: hp7lc2k.c /main/2 1996/12/04 10:23:28 lehors $ */ +/* $Xorg: hp7lc2k.c,v 1.3 2000/08/17 19:48:26 cpqbld Exp $ */ /************************************************************ Copyright (c) 1993 by Hewlett-Packard Company, Palo Alto, California Index: xc/programs/Xserver/hw/hp/input/drivers/hp7lc2m.c diff -u xc/programs/Xserver/hw/hp/input/drivers/hp7lc2m.c:3.1 xc/programs/Xserver/hw/hp/input/drivers/hp7lc2m.c:3.2 --- xc/programs/Xserver/hw/hp/input/drivers/hp7lc2m.c:3.1 Mon Dec 23 01:30:01 1996 +++ xc/programs/Xserver/hw/hp/input/drivers/hp7lc2m.c Wed Jan 17 17:36:48 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: hp7lc2m.c /main/2 1996/12/04 10:23:42 lehors $ */ +/* $Xorg: hp7lc2m.c,v 1.3 2000/08/17 19:48:26 cpqbld Exp $ */ /************************************************************ Copyright (c) 1992 by Hewlett-Packard Company, Palo Alto, California Index: xc/programs/Xserver/hw/hp/input/drivers/ps2io.h diff -u xc/programs/Xserver/hw/hp/input/drivers/ps2io.h:3.4 xc/programs/Xserver/hw/hp/input/drivers/ps2io.h:3.5 --- xc/programs/Xserver/hw/hp/input/drivers/ps2io.h:3.4 Sun Oct 4 05:38:30 1998 +++ xc/programs/Xserver/hw/hp/input/drivers/ps2io.h Wed Jan 17 17:36:48 2001 @@ -1,4 +1,4 @@ -/* $TOG: ps2io.h /main/3 1997/09/08 13:19:15 kaleb $ */ +/* $Xorg: ps2io.h,v 1.3 2000/08/17 19:48:26 cpqbld Exp $ */ #ifndef _SYS_PS2IO_INCLUDED /* allows multiple inclusion */ #define _SYS_PS2IO_INCLUDED Index: xc/programs/Xserver/hw/hp/ngle/Imakefile diff -u xc/programs/Xserver/hw/hp/ngle/Imakefile:1.1.1.3 xc/programs/Xserver/hw/hp/ngle/Imakefile:1.1.1.4 --- xc/programs/Xserver/hw/hp/ngle/Imakefile:1.1.1.3 Sat Dec 21 22:36:29 1996 +++ xc/programs/Xserver/hw/hp/ngle/Imakefile Tue Jan 16 17:43:11 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: Imakefile /main/7 1996/09/28 17:12:41 rws $ */ +/* $Xorg: Imakefile,v 1.4 2000/08/18 11:07:45 xorgcvs Exp $ */ #include ORIG_SRCS = nglescreen.c \ Index: xc/programs/Xserver/hw/hp/ngle/dregs.h diff -u xc/programs/Xserver/hw/hp/ngle/dregs.h:1.1.1.3 xc/programs/Xserver/hw/hp/ngle/dregs.h:1.1.1.4 --- xc/programs/Xserver/hw/hp/ngle/dregs.h:1.1.1.3 Fri Jan 27 18:55:38 1995 +++ xc/programs/Xserver/hw/hp/ngle/dregs.h Tue Jan 16 17:43:11 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: dregs.h,v 1.3 95/01/24 01:54:12 dpw Exp $ */ +/* $Xorg: dregs.h,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ /************************************************************************* * * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. Index: xc/programs/Xserver/hw/hp/ngle/hyperScrn.c diff -u xc/programs/Xserver/hw/hp/ngle/hyperScrn.c:1.1.1.1 xc/programs/Xserver/hw/hp/ngle/hyperScrn.c:1.1.1.2 --- xc/programs/Xserver/hw/hp/ngle/hyperScrn.c:1.1.1.1 Fri Jan 27 18:55:57 1995 +++ xc/programs/Xserver/hw/hp/ngle/hyperScrn.c Tue Jan 16 17:43:11 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: hyperScrn.c,v 1.1 95/01/25 16:14:36 gildea Exp $ */ +/* $Xorg: hyperScrn.c,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ /************************************************************************* * * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. Index: xc/programs/Xserver/hw/hp/ngle/ngle.h diff -u xc/programs/Xserver/hw/hp/ngle/ngle.h:1.1.1.3 xc/programs/Xserver/hw/hp/ngle/ngle.h:1.1.1.4 --- xc/programs/Xserver/hw/hp/ngle/ngle.h:1.1.1.3 Fri Jan 27 18:55:40 1995 +++ xc/programs/Xserver/hw/hp/ngle/ngle.h Tue Jan 16 17:43:12 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: ngle.h,v 1.3 95/01/24 01:55:45 dpw Exp $ */ +/* $Xorg: ngle.h,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ /************************************************************************* * * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. Index: xc/programs/Xserver/hw/hp/ngle/ngleblt.c diff -u xc/programs/Xserver/hw/hp/ngle/ngleblt.c:1.1.1.1 xc/programs/Xserver/hw/hp/ngle/ngleblt.c:1.1.1.2 --- xc/programs/Xserver/hw/hp/ngle/ngleblt.c:1.1.1.1 Wed Apr 27 03:15:11 1994 +++ xc/programs/Xserver/hw/hp/ngle/ngleblt.c Tue Jan 16 17:43:12 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: ngleblt.c,v 1.1 93/08/08 12:56:35 rws Exp $ */ +/* $Xorg: ngleblt.c,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ /* **************************************************************************** Index: xc/programs/Xserver/hw/hp/ngle/nglecolormap.c diff -u xc/programs/Xserver/hw/hp/ngle/nglecolormap.c:1.2 xc/programs/Xserver/hw/hp/ngle/nglecolormap.c:1.3 --- xc/programs/Xserver/hw/hp/ngle/nglecolormap.c:1.2 Sun Nov 16 01:17:59 1997 +++ xc/programs/Xserver/hw/hp/ngle/nglecolormap.c Wed Jan 17 17:36:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: nglecolormap.c /main/3 1997/10/16 16:26:56 kaleb $ */ +/* $Xorg: nglecolormap.c,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ /************************************************************************* * Index: xc/programs/Xserver/hw/hp/ngle/nglecolormap.h diff -u xc/programs/Xserver/hw/hp/ngle/nglecolormap.h:1.1.1.2 xc/programs/Xserver/hw/hp/ngle/nglecolormap.h:1.1.1.3 --- xc/programs/Xserver/hw/hp/ngle/nglecolormap.h:1.1.1.2 Fri Jan 27 18:55:43 1995 +++ xc/programs/Xserver/hw/hp/ngle/nglecolormap.h Tue Jan 16 17:43:13 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: nglecolormap.h,v 1.2 95/01/24 02:02:01 dpw Exp $ */ +/* $Xorg: nglecolormap.h,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ /************************************************************************* * Index: xc/programs/Xserver/hw/hp/ngle/nglecopy.c diff -u xc/programs/Xserver/hw/hp/ngle/nglecopy.c:1.1.1.2 xc/programs/Xserver/hw/hp/ngle/nglecopy.c:1.1.1.3 --- xc/programs/Xserver/hw/hp/ngle/nglecopy.c:1.1.1.2 Sun Sep 27 04:06:48 1998 +++ xc/programs/Xserver/hw/hp/ngle/nglecopy.c Tue Jan 16 17:43:13 2001 @@ -1,4 +1,4 @@ -/* $TOG: nglecopy.c /main/2 1997/11/11 15:45:45 msr $ */ +/* $Xorg: nglecopy.c,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ /* **************************************************************************** Index: xc/programs/Xserver/hw/hp/ngle/nglecopy.h diff -u xc/programs/Xserver/hw/hp/ngle/nglecopy.h:1.1.1.1 xc/programs/Xserver/hw/hp/ngle/nglecopy.h:1.1.1.2 --- xc/programs/Xserver/hw/hp/ngle/nglecopy.h:1.1.1.1 Wed Apr 27 03:15:12 1994 +++ xc/programs/Xserver/hw/hp/ngle/nglecopy.h Tue Jan 16 17:43:14 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: nglecopy.h,v 1.1 93/08/08 12:57:01 rws Exp $ */ +/* $Xorg: nglecopy.h,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ /************************************************************************* * * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. Index: xc/programs/Xserver/hw/hp/ngle/nglecursor.c diff -u xc/programs/Xserver/hw/hp/ngle/nglecursor.c:1.1.1.3 xc/programs/Xserver/hw/hp/ngle/nglecursor.c:1.1.1.4 --- xc/programs/Xserver/hw/hp/ngle/nglecursor.c:1.1.1.3 Fri Jan 27 18:55:46 1995 +++ xc/programs/Xserver/hw/hp/ngle/nglecursor.c Tue Jan 16 17:43:14 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: nglecursor.c,v 1.3 95/01/24 02:05:50 dpw Exp $ */ +/* $Xorg: nglecursor.c,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ /************************************************************************* * Index: xc/programs/Xserver/hw/hp/ngle/nglecursor.h diff -u xc/programs/Xserver/hw/hp/ngle/nglecursor.h:1.1.1.2 xc/programs/Xserver/hw/hp/ngle/nglecursor.h:1.1.1.3 --- xc/programs/Xserver/hw/hp/ngle/nglecursor.h:1.1.1.2 Fri Jan 27 18:55:48 1995 +++ xc/programs/Xserver/hw/hp/ngle/nglecursor.h Tue Jan 16 17:43:15 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: nglecursor.h,v 1.2 95/01/24 02:07:13 dpw Exp $ */ +/* $Xorg: nglecursor.h,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ /************************************************************************* * Index: xc/programs/Xserver/hw/hp/ngle/ngledevrom.h diff -u xc/programs/Xserver/hw/hp/ngle/ngledevrom.h:1.1.1.1 xc/programs/Xserver/hw/hp/ngle/ngledevrom.h:1.1.1.2 --- xc/programs/Xserver/hw/hp/ngle/ngledevrom.h:1.1.1.1 Wed Apr 27 03:15:13 1994 +++ xc/programs/Xserver/hw/hp/ngle/ngledevrom.h Tue Jan 16 17:43:15 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: ngledevrom.h,v 1.1 93/08/08 12:57:21 rws Exp $ */ +/* $Xorg: ngledevrom.h,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ /************************************************************************* * Index: xc/programs/Xserver/hw/hp/ngle/ngleextern.h diff -u xc/programs/Xserver/hw/hp/ngle/ngleextern.h:1.1.1.1 xc/programs/Xserver/hw/hp/ngle/ngleextern.h:1.1.1.2 --- xc/programs/Xserver/hw/hp/ngle/ngleextern.h:1.1.1.1 Wed Apr 27 03:15:13 1994 +++ xc/programs/Xserver/hw/hp/ngle/ngleextern.h Tue Jan 16 17:43:16 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: ngleextern.h,v 1.1 93/08/08 12:57:27 rws Exp $ */ +/* $Xorg: ngleextern.h,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ /************************************************************************* * Index: xc/programs/Xserver/hw/hp/ngle/nglehdw.h diff -u xc/programs/Xserver/hw/hp/ngle/nglehdw.h:1.1.1.3 xc/programs/Xserver/hw/hp/ngle/nglehdw.h:1.1.1.4 --- xc/programs/Xserver/hw/hp/ngle/nglehdw.h:1.1.1.3 Fri Jan 27 18:55:50 1995 +++ xc/programs/Xserver/hw/hp/ngle/nglehdw.h Tue Jan 16 17:43:16 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: nglehdw.h,v 1.3 95/01/24 01:58:28 dpw Exp $ */ +/* $Xorg: nglehdw.h,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ /************************************************************************* * Index: xc/programs/Xserver/hw/hp/ngle/nglenoop.c diff -u xc/programs/Xserver/hw/hp/ngle/nglenoop.c:1.1.1.1 xc/programs/Xserver/hw/hp/ngle/nglenoop.c:1.1.1.2 --- xc/programs/Xserver/hw/hp/ngle/nglenoop.c:1.1.1.1 Wed Apr 27 03:15:13 1994 +++ xc/programs/Xserver/hw/hp/ngle/nglenoop.c Tue Jan 16 17:43:17 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: nglenoop.c,v 1.1 93/08/08 12:57:40 rws Exp $ */ +/* $Xorg: nglenoop.c,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ /************************************************************************* * Index: xc/programs/Xserver/hw/hp/ngle/nglenoop.h diff -u xc/programs/Xserver/hw/hp/ngle/nglenoop.h:1.1.1.1 xc/programs/Xserver/hw/hp/ngle/nglenoop.h:1.1.1.2 --- xc/programs/Xserver/hw/hp/ngle/nglenoop.h:1.1.1.1 Wed Apr 27 03:15:14 1994 +++ xc/programs/Xserver/hw/hp/ngle/nglenoop.h Tue Jan 16 17:43:17 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: nglenoop.h,v 1.1 93/08/08 12:57:46 rws Exp $ */ +/* $Xorg: nglenoop.h,v 1.3 2000/08/17 19:48:28 cpqbld Exp $ */ /************************************************************************* * * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. Index: xc/programs/Xserver/hw/hp/ngle/nglescreen.c diff -u xc/programs/Xserver/hw/hp/ngle/nglescreen.c:1.3 xc/programs/Xserver/hw/hp/ngle/nglescreen.c:1.4 --- xc/programs/Xserver/hw/hp/ngle/nglescreen.c:1.3 Sun Oct 4 05:38:31 1998 +++ xc/programs/Xserver/hw/hp/ngle/nglescreen.c Wed Jan 17 17:36:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: nglescreen.c /main/4 1997/11/11 15:45:50 msr $ */ +/* $Xorg: nglescreen.c,v 1.3 2000/08/17 19:48:28 cpqbld Exp $ */ /************************************************************************* * * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. @@ -23,7 +23,7 @@ * *************************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/hp/ngle/nglescreen.c,v 1.3 1998/10/04 09:38:31 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/hp/ngle/nglescreen.c,v 1.4 2001/01/17 22:36:49 dawes Exp $ */ /****************************************************************************** * Index: xc/programs/Xserver/hw/hp/ngle/nglescreen.h diff -u xc/programs/Xserver/hw/hp/ngle/nglescreen.h:1.2 xc/programs/Xserver/hw/hp/ngle/nglescreen.h:1.3 --- xc/programs/Xserver/hw/hp/ngle/nglescreen.h:1.2 Sat Jun 27 08:53:51 1998 +++ xc/programs/Xserver/hw/hp/ngle/nglescreen.h Wed Jan 17 17:36:49 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: nglescreen.h,v 1.2 95/01/24 02:10:27 dpw Exp $ */ +/* $Xorg: nglescreen.h,v 1.3 2000/08/17 19:48:28 cpqbld Exp $ */ /************************************************************************* * @@ -24,7 +24,7 @@ * *************************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/hp/ngle/nglescreen.h,v 1.2 1998/06/27 12:53:51 hohndel Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/hp/ngle/nglescreen.h,v 1.3 2001/01/17 22:36:49 dawes Exp $ */ /****************************************************************************** * Index: xc/programs/Xserver/hw/kdrive/Imakefile diff -u xc/programs/Xserver/hw/kdrive/Imakefile:1.5 xc/programs/Xserver/hw/kdrive/Imakefile:1.6 --- xc/programs/Xserver/hw/kdrive/Imakefile:1.5 Thu Nov 30 19:01:30 2000 +++ xc/programs/Xserver/hw/kdrive/Imakefile Thu Mar 29 21:15:19 2001 @@ -1,5 +1,5 @@ XCOMM $XConsortium: Imakefile /main/10 1996/12/02 10:20:33 lehors $ -XCOMM $XFree86: xc/programs/Xserver/hw/kdrive/Imakefile,v 1.5 2000/12/01 00:01:30 keithp Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/kdrive/Imakefile,v 1.6 2001/03/30 02:15:19 keithp Exp $ KDRIVE=. #include "Kdrive.tmpl" @@ -8,11 +8,16 @@ RENDEROBJS=kpict.o #endif +#if BuildXvExt +XVSRCS=kxv.c +XVOBJS=kxv.o +#endif + SRCS = kcmap.c kcolor.c kdrive.c kinfo.c kinput.c kmap.c knoop.c ktest.c \ - vga.c kasync.c kmode.c kcurscol.c kshadow.c $(RENDERSRCS) + vga.c kasync.c kmode.c kcurscol.c kshadow.c $(RENDERSRCS) $(XVSRCS) OBJS = kcmap.o kcolor.o kdrive.o kinfo.o kinput.o kmap.o knoop.o ktest.o \ - vga.o kasync.o kmode.o kcurscol.o kshadow.o $(RENDEROBJS) + vga.o kasync.o kmode.o kcurscol.o kshadow.o $(RENDEROBJS) $(XVOBJS) INCLUDES = $(KDINCS) Index: xc/programs/Xserver/hw/kdrive/Xkdrive.man diff -u xc/programs/Xserver/hw/kdrive/Xkdrive.man:1.2 xc/programs/Xserver/hw/kdrive/Xkdrive.man:1.4 --- xc/programs/Xserver/hw/kdrive/Xkdrive.man:1.2 Mon Dec 4 16:01:00 2000 +++ xc/programs/Xserver/hw/kdrive/Xkdrive.man Sat Jan 27 13:20:40 2001 @@ -1,6 +1,6 @@ -.\" $XFree86: xc/programs/Xserver/hw/kdrive/Xkdrive.man,v 1.2 2000/12/04 21:01:00 dawes Exp $ +.\" $XFree86: xc/programs/Xserver/hw/kdrive/Xkdrive.man,v 1.4 2001/01/27 18:20:40 dawes Exp $ .\" -.TH Xkdrive 1 +.TH Xkdrive 1 __vendorversion__ .SH NAME Xkdrive \- tiny X server .SH SYNOPSIS @@ -71,7 +71,7 @@ .B -standalone not documented. .SH SEE ALSO -X(1), Xserver(1), xdm(1), xinit(1), Xvesa(1), Xfbdev(1). +X(__miscmansuffix__), Xserver(1), xdm(1), xinit(1), Xvesa(1), Xfbdev(1). .SH AUTHORS The Xkdrive common core was written by Keith Packard, based on XFree86 which, in turn, is based on the Sample Implementation of X. Index: xc/programs/Xserver/hw/kdrive/kasync.c diff -u xc/programs/Xserver/hw/kdrive/kasync.c:1.7 xc/programs/Xserver/hw/kdrive/kasync.c:1.8 --- xc/programs/Xserver/hw/kdrive/kasync.c:1.7 Fri Sep 22 02:25:29 2000 +++ xc/programs/Xserver/hw/kdrive/kasync.c Thu Mar 29 21:15:19 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/kasync.c,v 1.7 2000/09/22 06:25:29 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/kasync.c,v 1.8 2001/03/30 02:15:19 keithp Exp $ */ #include "kdrive.h" @@ -287,12 +287,12 @@ KdCheckCopyPlane, fbPolyPoint, fbPolyLine, - miPolySegment, - miPolyRectangle, + fbPolySegment, + fbPolyRectangle, fbPolyArc, - miFillPolygon, + fbFillPolygon, fbPolyFillRect, - miPolyFillArc, + fbPolyFillArc, miPolyText8, miPolyText16, miImageText8, Index: xc/programs/Xserver/hw/kdrive/kcolor.c diff -u xc/programs/Xserver/hw/kdrive/kcolor.c:1.3 xc/programs/Xserver/hw/kdrive/kcolor.c:1.4 --- xc/programs/Xserver/hw/kdrive/kcolor.c:1.3 Wed Feb 23 15:29:52 2000 +++ xc/programs/Xserver/hw/kdrive/kcolor.c Thu Mar 29 21:15:19 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/kcolor.c,v 1.3 2000/02/23 20:29:52 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/kcolor.c,v 1.4 2001/03/30 02:15:19 keithp Exp $ */ #include "kdrive.h" #include @@ -73,758 +73,758 @@ #define C 0x101 const KdNamedColor KdColors[] = { -240*C, 248*C, 255*C, "alice blue", -240*C, 248*C, 255*C, "AliceBlue", -250*C, 235*C, 215*C, "antique white", -250*C, 235*C, 215*C, "AntiqueWhite", -255*C, 239*C, 219*C, "AntiqueWhite1", -238*C, 223*C, 204*C, "AntiqueWhite2", -205*C, 192*C, 176*C, "AntiqueWhite3", -139*C, 131*C, 120*C, "AntiqueWhite4", -127*C, 255*C, 212*C, "aquamarine", -127*C, 255*C, 212*C, "aquamarine1", -118*C, 238*C, 198*C, "aquamarine2", -102*C, 205*C, 170*C, "aquamarine3", - 69*C, 139*C, 116*C, "aquamarine4", -240*C, 255*C, 255*C, "azure", -240*C, 255*C, 255*C, "azure1", -224*C, 238*C, 238*C, "azure2", -193*C, 205*C, 205*C, "azure3", -131*C, 139*C, 139*C, "azure4", -245*C, 245*C, 220*C, "beige", -255*C, 228*C, 196*C, "bisque", -255*C, 228*C, 196*C, "bisque1", -238*C, 213*C, 183*C, "bisque2", -205*C, 183*C, 158*C, "bisque3", -139*C, 125*C, 107*C, "bisque4", - 0*C, 0*C, 0*C, "black", -255*C, 235*C, 205*C, "blanched almond", -255*C, 235*C, 205*C, "BlanchedAlmond", - 0*C, 0*C, 255*C, "blue", -138*C, 43*C, 226*C, "blue violet", - 0*C, 0*C, 255*C, "blue1", - 0*C, 0*C, 238*C, "blue2", - 0*C, 0*C, 205*C, "blue3", - 0*C, 0*C, 139*C, "blue4", -138*C, 43*C, 226*C, "BlueViolet", -165*C, 42*C, 42*C, "brown", -255*C, 64*C, 64*C, "brown1", -238*C, 59*C, 59*C, "brown2", -205*C, 51*C, 51*C, "brown3", -139*C, 35*C, 35*C, "brown4", -222*C, 184*C, 135*C, "burlywood", -255*C, 211*C, 155*C, "burlywood1", -238*C, 197*C, 145*C, "burlywood2", -205*C, 170*C, 125*C, "burlywood3", -139*C, 115*C, 85*C, "burlywood4", - 95*C, 158*C, 160*C, "cadet blue", - 95*C, 158*C, 160*C, "CadetBlue", -152*C, 245*C, 255*C, "CadetBlue1", -142*C, 229*C, 238*C, "CadetBlue2", -122*C, 197*C, 205*C, "CadetBlue3", - 83*C, 134*C, 139*C, "CadetBlue4", -127*C, 255*C, 0*C, "chartreuse", -127*C, 255*C, 0*C, "chartreuse1", -118*C, 238*C, 0*C, "chartreuse2", -102*C, 205*C, 0*C, "chartreuse3", -69*C, 139*C, 0*C, "chartreuse4", -210*C, 105*C, 30*C, "chocolate", -255*C, 127*C, 36*C, "chocolate1", -238*C, 118*C, 33*C, "chocolate2", -205*C, 102*C, 29*C, "chocolate3", -139*C, 69*C, 19*C, "chocolate4", -255*C, 127*C, 80*C, "coral", -255*C, 114*C, 86*C, "coral1", -238*C, 106*C, 80*C, "coral2", -205*C, 91*C, 69*C, "coral3", -139*C, 62*C, 47*C, "coral4", -100*C, 149*C, 237*C, "cornflower blue", -100*C, 149*C, 237*C, "CornflowerBlue", -255*C, 248*C, 220*C, "cornsilk", -255*C, 248*C, 220*C, "cornsilk1", -238*C, 232*C, 205*C, "cornsilk2", -205*C, 200*C, 177*C, "cornsilk3", -139*C, 136*C, 120*C, "cornsilk4", - 0*C, 255*C, 255*C, "cyan", - 0*C, 255*C, 255*C, "cyan1", - 0*C, 238*C, 238*C, "cyan2", - 0*C, 205*C, 205*C, "cyan3", - 0*C, 139*C, 139*C, "cyan4", -0*C, 0*C, 139*C, "dark blue", -0*C, 139*C, 139*C, "dark cyan", -184*C, 134*C, 11*C, "dark goldenrod", -169*C, 169*C, 169*C, "dark gray", - 0*C, 100*C, 0*C, "dark green", -169*C, 169*C, 169*C, "dark grey", -189*C, 183*C, 107*C, "dark khaki", -139*C, 0*C, 139*C, "dark magenta", - 85*C, 107*C, 47*C, "dark olive green", -255*C, 140*C, 0*C, "dark orange", -153*C, 50*C, 204*C, "dark orchid", -139*C, 0*C, 0*C, "dark red", -233*C, 150*C, 122*C, "dark salmon", -143*C, 188*C, 143*C, "dark sea green", - 72*C, 61*C, 139*C, "dark slate blue", - 47*C, 79*C, 79*C, "dark slate gray", - 47*C, 79*C, 79*C, "dark slate grey", - 0*C, 206*C, 209*C, "dark turquoise", -148*C, 0*C, 211*C, "dark violet", -0*C, 0*C, 139*C, "DarkBlue", -0*C, 139*C, 139*C, "DarkCyan", -184*C, 134*C, 11*C, "DarkGoldenrod", -255*C, 185*C, 15*C, "DarkGoldenrod1", -238*C, 173*C, 14*C, "DarkGoldenrod2", -205*C, 149*C, 12*C, "DarkGoldenrod3", -139*C, 101*C, 8*C, "DarkGoldenrod4", -169*C, 169*C, 169*C, "DarkGray", - 0*C, 100*C, 0*C, "DarkGreen", -169*C, 169*C, 169*C, "DarkGrey", -189*C, 183*C, 107*C, "DarkKhaki", -139*C, 0*C, 139*C, "DarkMagenta", - 85*C, 107*C, 47*C, "DarkOliveGreen", -202*C, 255*C, 112*C, "DarkOliveGreen1", -188*C, 238*C, 104*C, "DarkOliveGreen2", -162*C, 205*C, 90*C, "DarkOliveGreen3", -110*C, 139*C, 61*C, "DarkOliveGreen4", -255*C, 140*C, 0*C, "DarkOrange", -255*C, 127*C, 0*C, "DarkOrange1", -238*C, 118*C, 0*C, "DarkOrange2", -205*C, 102*C, 0*C, "DarkOrange3", -139*C, 69*C, 0*C, "DarkOrange4", -153*C, 50*C, 204*C, "DarkOrchid", -191*C, 62*C, 255*C, "DarkOrchid1", -178*C, 58*C, 238*C, "DarkOrchid2", -154*C, 50*C, 205*C, "DarkOrchid3", -104*C, 34*C, 139*C, "DarkOrchid4", -139*C, 0*C, 0*C, "DarkRed", -233*C, 150*C, 122*C, "DarkSalmon", -143*C, 188*C, 143*C, "DarkSeaGreen", -193*C, 255*C, 193*C, "DarkSeaGreen1", -180*C, 238*C, 180*C, "DarkSeaGreen2", -155*C, 205*C, 155*C, "DarkSeaGreen3", -105*C, 139*C, 105*C, "DarkSeaGreen4", - 72*C, 61*C, 139*C, "DarkSlateBlue", - 47*C, 79*C, 79*C, "DarkSlateGray", -151*C, 255*C, 255*C, "DarkSlateGray1", -141*C, 238*C, 238*C, "DarkSlateGray2", -121*C, 205*C, 205*C, "DarkSlateGray3", - 82*C, 139*C, 139*C, "DarkSlateGray4", - 47*C, 79*C, 79*C, "DarkSlateGrey", - 0*C, 206*C, 209*C, "DarkTurquoise", -148*C, 0*C, 211*C, "DarkViolet", -255*C, 20*C, 147*C, "deep pink", - 0*C, 191*C, 255*C, "deep sky blue", -255*C, 20*C, 147*C, "DeepPink", -255*C, 20*C, 147*C, "DeepPink1", -238*C, 18*C, 137*C, "DeepPink2", -205*C, 16*C, 118*C, "DeepPink3", -139*C, 10*C, 80*C, "DeepPink4", - 0*C, 191*C, 255*C, "DeepSkyBlue", - 0*C, 191*C, 255*C, "DeepSkyBlue1", - 0*C, 178*C, 238*C, "DeepSkyBlue2", - 0*C, 154*C, 205*C, "DeepSkyBlue3", - 0*C, 104*C, 139*C, "DeepSkyBlue4", -105*C, 105*C, 105*C, "dim gray", -105*C, 105*C, 105*C, "dim grey", -105*C, 105*C, 105*C, "DimGray", -105*C, 105*C, 105*C, "DimGrey", - 30*C, 144*C, 255*C, "dodger blue", - 30*C, 144*C, 255*C, "DodgerBlue", - 30*C, 144*C, 255*C, "DodgerBlue1", - 28*C, 134*C, 238*C, "DodgerBlue2", - 24*C, 116*C, 205*C, "DodgerBlue3", - 16*C, 78*C, 139*C, "DodgerBlue4", -178*C, 34*C, 34*C, "firebrick", -255*C, 48*C, 48*C, "firebrick1", -238*C, 44*C, 44*C, "firebrick2", -205*C, 38*C, 38*C, "firebrick3", -139*C, 26*C, 26*C, "firebrick4", -255*C, 250*C, 240*C, "floral white", -255*C, 250*C, 240*C, "FloralWhite", - 34*C, 139*C, 34*C, "forest green", - 34*C, 139*C, 34*C, "ForestGreen", -220*C, 220*C, 220*C, "gainsboro", -248*C, 248*C, 255*C, "ghost white", -248*C, 248*C, 255*C, "GhostWhite", -255*C, 215*C, 0*C, "gold", -255*C, 215*C, 0*C, "gold1", -238*C, 201*C, 0*C, "gold2", -205*C, 173*C, 0*C, "gold3", -139*C, 117*C, 0*C, "gold4", -218*C, 165*C, 32*C, "goldenrod", -255*C, 193*C, 37*C, "goldenrod1", -238*C, 180*C, 34*C, "goldenrod2", -205*C, 155*C, 29*C, "goldenrod3", -139*C, 105*C, 20*C, "goldenrod4", -190*C, 190*C, 190*C, "gray", - 0*C, 0*C, 0*C, "gray0", - 3*C, 3*C, 3*C, "gray1", - 26*C, 26*C, 26*C, "gray10", -255*C, 255*C, 255*C, "gray100", - 28*C, 28*C, 28*C, "gray11", - 31*C, 31*C, 31*C, "gray12", - 33*C, 33*C, 33*C, "gray13", - 36*C, 36*C, 36*C, "gray14", - 38*C, 38*C, 38*C, "gray15", - 41*C, 41*C, 41*C, "gray16", - 43*C, 43*C, 43*C, "gray17", - 46*C, 46*C, 46*C, "gray18", - 48*C, 48*C, 48*C, "gray19", - 5*C, 5*C, 5*C, "gray2", - 51*C, 51*C, 51*C, "gray20", - 54*C, 54*C, 54*C, "gray21", - 56*C, 56*C, 56*C, "gray22", - 59*C, 59*C, 59*C, "gray23", - 61*C, 61*C, 61*C, "gray24", - 64*C, 64*C, 64*C, "gray25", - 66*C, 66*C, 66*C, "gray26", - 69*C, 69*C, 69*C, "gray27", - 71*C, 71*C, 71*C, "gray28", - 74*C, 74*C, 74*C, "gray29", - 8*C, 8*C, 8*C, "gray3", - 77*C, 77*C, 77*C, "gray30", - 79*C, 79*C, 79*C, "gray31", - 82*C, 82*C, 82*C, "gray32", - 84*C, 84*C, 84*C, "gray33", - 87*C, 87*C, 87*C, "gray34", - 89*C, 89*C, 89*C, "gray35", - 92*C, 92*C, 92*C, "gray36", - 94*C, 94*C, 94*C, "gray37", - 97*C, 97*C, 97*C, "gray38", - 99*C, 99*C, 99*C, "gray39", - 10*C, 10*C, 10*C, "gray4", -102*C, 102*C, 102*C, "gray40", -105*C, 105*C, 105*C, "gray41", -107*C, 107*C, 107*C, "gray42", -110*C, 110*C, 110*C, "gray43", -112*C, 112*C, 112*C, "gray44", -115*C, 115*C, 115*C, "gray45", -117*C, 117*C, 117*C, "gray46", -120*C, 120*C, 120*C, "gray47", -122*C, 122*C, 122*C, "gray48", -125*C, 125*C, 125*C, "gray49", - 13*C, 13*C, 13*C, "gray5", -127*C, 127*C, 127*C, "gray50", -130*C, 130*C, 130*C, "gray51", -133*C, 133*C, 133*C, "gray52", -135*C, 135*C, 135*C, "gray53", -138*C, 138*C, 138*C, "gray54", -140*C, 140*C, 140*C, "gray55", -143*C, 143*C, 143*C, "gray56", -145*C, 145*C, 145*C, "gray57", -148*C, 148*C, 148*C, "gray58", -150*C, 150*C, 150*C, "gray59", - 15*C, 15*C, 15*C, "gray6", -153*C, 153*C, 153*C, "gray60", -156*C, 156*C, 156*C, "gray61", -158*C, 158*C, 158*C, "gray62", -161*C, 161*C, 161*C, "gray63", -163*C, 163*C, 163*C, "gray64", -166*C, 166*C, 166*C, "gray65", -168*C, 168*C, 168*C, "gray66", -171*C, 171*C, 171*C, "gray67", -173*C, 173*C, 173*C, "gray68", -176*C, 176*C, 176*C, "gray69", - 18*C, 18*C, 18*C, "gray7", -179*C, 179*C, 179*C, "gray70", -181*C, 181*C, 181*C, "gray71", -184*C, 184*C, 184*C, "gray72", -186*C, 186*C, 186*C, "gray73", -189*C, 189*C, 189*C, "gray74", -191*C, 191*C, 191*C, "gray75", -194*C, 194*C, 194*C, "gray76", -196*C, 196*C, 196*C, "gray77", -199*C, 199*C, 199*C, "gray78", -201*C, 201*C, 201*C, "gray79", - 20*C, 20*C, 20*C, "gray8", -204*C, 204*C, 204*C, "gray80", -207*C, 207*C, 207*C, "gray81", -209*C, 209*C, 209*C, "gray82", -212*C, 212*C, 212*C, "gray83", -214*C, 214*C, 214*C, "gray84", -217*C, 217*C, 217*C, "gray85", -219*C, 219*C, 219*C, "gray86", -222*C, 222*C, 222*C, "gray87", -224*C, 224*C, 224*C, "gray88", -227*C, 227*C, 227*C, "gray89", - 23*C, 23*C, 23*C, "gray9", -229*C, 229*C, 229*C, "gray90", -232*C, 232*C, 232*C, "gray91", -235*C, 235*C, 235*C, "gray92", -237*C, 237*C, 237*C, "gray93", -240*C, 240*C, 240*C, "gray94", -242*C, 242*C, 242*C, "gray95", -245*C, 245*C, 245*C, "gray96", -247*C, 247*C, 247*C, "gray97", -250*C, 250*C, 250*C, "gray98", -252*C, 252*C, 252*C, "gray99", - 0*C, 255*C, 0*C, "green", -173*C, 255*C, 47*C, "green yellow", -0*C, 255*C, 0*C, "green1", -0*C, 238*C, 0*C, "green2", -0*C, 205*C, 0*C, "green3", -0*C, 139*C, 0*C, "green4", -173*C, 255*C, 47*C, "GreenYellow", -190*C, 190*C, 190*C, "grey", - 0*C, 0*C, 0*C, "grey0", - 3*C, 3*C, 3*C, "grey1", - 26*C, 26*C, 26*C, "grey10", -255*C, 255*C, 255*C, "grey100", - 28*C, 28*C, 28*C, "grey11", - 31*C, 31*C, 31*C, "grey12", - 33*C, 33*C, 33*C, "grey13", - 36*C, 36*C, 36*C, "grey14", - 38*C, 38*C, 38*C, "grey15", - 41*C, 41*C, 41*C, "grey16", - 43*C, 43*C, 43*C, "grey17", - 46*C, 46*C, 46*C, "grey18", - 48*C, 48*C, 48*C, "grey19", - 5*C, 5*C, 5*C, "grey2", - 51*C, 51*C, 51*C, "grey20", - 54*C, 54*C, 54*C, "grey21", - 56*C, 56*C, 56*C, "grey22", - 59*C, 59*C, 59*C, "grey23", - 61*C, 61*C, 61*C, "grey24", - 64*C, 64*C, 64*C, "grey25", - 66*C, 66*C, 66*C, "grey26", - 69*C, 69*C, 69*C, "grey27", - 71*C, 71*C, 71*C, "grey28", - 74*C, 74*C, 74*C, "grey29", - 8*C, 8*C, 8*C, "grey3", - 77*C, 77*C, 77*C, "grey30", - 79*C, 79*C, 79*C, "grey31", - 82*C, 82*C, 82*C, "grey32", - 84*C, 84*C, 84*C, "grey33", - 87*C, 87*C, 87*C, "grey34", - 89*C, 89*C, 89*C, "grey35", - 92*C, 92*C, 92*C, "grey36", - 94*C, 94*C, 94*C, "grey37", - 97*C, 97*C, 97*C, "grey38", - 99*C, 99*C, 99*C, "grey39", - 10*C, 10*C, 10*C, "grey4", -102*C, 102*C, 102*C, "grey40", -105*C, 105*C, 105*C, "grey41", -107*C, 107*C, 107*C, "grey42", -110*C, 110*C, 110*C, "grey43", -112*C, 112*C, 112*C, "grey44", -115*C, 115*C, 115*C, "grey45", -117*C, 117*C, 117*C, "grey46", -120*C, 120*C, 120*C, "grey47", -122*C, 122*C, 122*C, "grey48", -125*C, 125*C, 125*C, "grey49", - 13*C, 13*C, 13*C, "grey5", -127*C, 127*C, 127*C, "grey50", -130*C, 130*C, 130*C, "grey51", -133*C, 133*C, 133*C, "grey52", -135*C, 135*C, 135*C, "grey53", -138*C, 138*C, 138*C, "grey54", -140*C, 140*C, 140*C, "grey55", -143*C, 143*C, 143*C, "grey56", -145*C, 145*C, 145*C, "grey57", -148*C, 148*C, 148*C, "grey58", -150*C, 150*C, 150*C, "grey59", - 15*C, 15*C, 15*C, "grey6", -153*C, 153*C, 153*C, "grey60", -156*C, 156*C, 156*C, "grey61", -158*C, 158*C, 158*C, "grey62", -161*C, 161*C, 161*C, "grey63", -163*C, 163*C, 163*C, "grey64", -166*C, 166*C, 166*C, "grey65", -168*C, 168*C, 168*C, "grey66", -171*C, 171*C, 171*C, "grey67", -173*C, 173*C, 173*C, "grey68", -176*C, 176*C, 176*C, "grey69", - 18*C, 18*C, 18*C, "grey7", -179*C, 179*C, 179*C, "grey70", -181*C, 181*C, 181*C, "grey71", -184*C, 184*C, 184*C, "grey72", -186*C, 186*C, 186*C, "grey73", -189*C, 189*C, 189*C, "grey74", -191*C, 191*C, 191*C, "grey75", -194*C, 194*C, 194*C, "grey76", -196*C, 196*C, 196*C, "grey77", -199*C, 199*C, 199*C, "grey78", -201*C, 201*C, 201*C, "grey79", - 20*C, 20*C, 20*C, "grey8", -204*C, 204*C, 204*C, "grey80", -207*C, 207*C, 207*C, "grey81", -209*C, 209*C, 209*C, "grey82", -212*C, 212*C, 212*C, "grey83", -214*C, 214*C, 214*C, "grey84", -217*C, 217*C, 217*C, "grey85", -219*C, 219*C, 219*C, "grey86", -222*C, 222*C, 222*C, "grey87", -224*C, 224*C, 224*C, "grey88", -227*C, 227*C, 227*C, "grey89", - 23*C, 23*C, 23*C, "grey9", -229*C, 229*C, 229*C, "grey90", -232*C, 232*C, 232*C, "grey91", -235*C, 235*C, 235*C, "grey92", -237*C, 237*C, 237*C, "grey93", -240*C, 240*C, 240*C, "grey94", -242*C, 242*C, 242*C, "grey95", -245*C, 245*C, 245*C, "grey96", -247*C, 247*C, 247*C, "grey97", -250*C, 250*C, 250*C, "grey98", -252*C, 252*C, 252*C, "grey99", -240*C, 255*C, 240*C, "honeydew", -240*C, 255*C, 240*C, "honeydew1", -224*C, 238*C, 224*C, "honeydew2", -193*C, 205*C, 193*C, "honeydew3", -131*C, 139*C, 131*C, "honeydew4", -255*C, 105*C, 180*C, "hot pink", -255*C, 105*C, 180*C, "HotPink", -255*C, 110*C, 180*C, "HotPink1", -238*C, 106*C, 167*C, "HotPink2", -205*C, 96*C, 144*C, "HotPink3", -139*C, 58*C, 98*C, "HotPink4", -205*C, 92*C, 92*C, "indian red", -205*C, 92*C, 92*C, "IndianRed", -255*C, 106*C, 106*C, "IndianRed1", -238*C, 99*C, 99*C, "IndianRed2", -205*C, 85*C, 85*C, "IndianRed3", -139*C, 58*C, 58*C, "IndianRed4", -255*C, 255*C, 240*C, "ivory", -255*C, 255*C, 240*C, "ivory1", -238*C, 238*C, 224*C, "ivory2", -205*C, 205*C, 193*C, "ivory3", -139*C, 139*C, 131*C, "ivory4", -240*C, 230*C, 140*C, "khaki", -255*C, 246*C, 143*C, "khaki1", -238*C, 230*C, 133*C, "khaki2", -205*C, 198*C, 115*C, "khaki3", -139*C, 134*C, 78*C, "khaki4", -230*C, 230*C, 250*C, "lavender", -255*C, 240*C, 245*C, "lavender blush", -255*C, 240*C, 245*C, "LavenderBlush", -255*C, 240*C, 245*C, "LavenderBlush1", -238*C, 224*C, 229*C, "LavenderBlush2", -205*C, 193*C, 197*C, "LavenderBlush3", -139*C, 131*C, 134*C, "LavenderBlush4", -124*C, 252*C, 0*C, "lawn green", -124*C, 252*C, 0*C, "LawnGreen", -255*C, 250*C, 205*C, "lemon chiffon", -255*C, 250*C, 205*C, "LemonChiffon", -255*C, 250*C, 205*C, "LemonChiffon1", -238*C, 233*C, 191*C, "LemonChiffon2", -205*C, 201*C, 165*C, "LemonChiffon3", -139*C, 137*C, 112*C, "LemonChiffon4", -173*C, 216*C, 230*C, "light blue", -240*C, 128*C, 128*C, "light coral", -224*C, 255*C, 255*C, "light cyan", -238*C, 221*C, 130*C, "light goldenrod", -250*C, 250*C, 210*C, "light goldenrod yellow", -211*C, 211*C, 211*C, "light gray", -144*C, 238*C, 144*C, "light green", -211*C, 211*C, 211*C, "light grey", -255*C, 182*C, 193*C, "light pink", -255*C, 160*C, 122*C, "light salmon", - 32*C, 178*C, 170*C, "light sea green", -135*C, 206*C, 250*C, "light sky blue", -132*C, 112*C, 255*C, "light slate blue", -119*C, 136*C, 153*C, "light slate gray", -119*C, 136*C, 153*C, "light slate grey", -176*C, 196*C, 222*C, "light steel blue", -255*C, 255*C, 224*C, "light yellow", -173*C, 216*C, 230*C, "LightBlue", -191*C, 239*C, 255*C, "LightBlue1", -178*C, 223*C, 238*C, "LightBlue2", -154*C, 192*C, 205*C, "LightBlue3", -104*C, 131*C, 139*C, "LightBlue4", -240*C, 128*C, 128*C, "LightCoral", -224*C, 255*C, 255*C, "LightCyan", -224*C, 255*C, 255*C, "LightCyan1", -209*C, 238*C, 238*C, "LightCyan2", -180*C, 205*C, 205*C, "LightCyan3", -122*C, 139*C, 139*C, "LightCyan4", -238*C, 221*C, 130*C, "LightGoldenrod", -255*C, 236*C, 139*C, "LightGoldenrod1", -238*C, 220*C, 130*C, "LightGoldenrod2", -205*C, 190*C, 112*C, "LightGoldenrod3", -139*C, 129*C, 76*C, "LightGoldenrod4", -250*C, 250*C, 210*C, "LightGoldenrodYellow", -211*C, 211*C, 211*C, "LightGray", -144*C, 238*C, 144*C, "LightGreen", -211*C, 211*C, 211*C, "LightGrey", -255*C, 182*C, 193*C, "LightPink", -255*C, 174*C, 185*C, "LightPink1", -238*C, 162*C, 173*C, "LightPink2", -205*C, 140*C, 149*C, "LightPink3", -139*C, 95*C, 101*C, "LightPink4", -255*C, 160*C, 122*C, "LightSalmon", -255*C, 160*C, 122*C, "LightSalmon1", -238*C, 149*C, 114*C, "LightSalmon2", -205*C, 129*C, 98*C, "LightSalmon3", -139*C, 87*C, 66*C, "LightSalmon4", - 32*C, 178*C, 170*C, "LightSeaGreen", -135*C, 206*C, 250*C, "LightSkyBlue", -176*C, 226*C, 255*C, "LightSkyBlue1", -164*C, 211*C, 238*C, "LightSkyBlue2", -141*C, 182*C, 205*C, "LightSkyBlue3", - 96*C, 123*C, 139*C, "LightSkyBlue4", -132*C, 112*C, 255*C, "LightSlateBlue", -119*C, 136*C, 153*C, "LightSlateGray", -119*C, 136*C, 153*C, "LightSlateGrey", -176*C, 196*C, 222*C, "LightSteelBlue", -202*C, 225*C, 255*C, "LightSteelBlue1", -188*C, 210*C, 238*C, "LightSteelBlue2", -162*C, 181*C, 205*C, "LightSteelBlue3", -110*C, 123*C, 139*C, "LightSteelBlue4", -255*C, 255*C, 224*C, "LightYellow", -255*C, 255*C, 224*C, "LightYellow1", -238*C, 238*C, 209*C, "LightYellow2", -205*C, 205*C, 180*C, "LightYellow3", -139*C, 139*C, 122*C, "LightYellow4", - 50*C, 205*C, 50*C, "lime green", - 50*C, 205*C, 50*C, "LimeGreen", -250*C, 240*C, 230*C, "linen", -255*C, 0*C, 255*C, "magenta", -255*C, 0*C, 255*C, "magenta1", -238*C, 0*C, 238*C, "magenta2", -205*C, 0*C, 205*C, "magenta3", -139*C, 0*C, 139*C, "magenta4", -176*C, 48*C, 96*C, "maroon", -255*C, 52*C, 179*C, "maroon1", -238*C, 48*C, 167*C, "maroon2", -205*C, 41*C, 144*C, "maroon3", -139*C, 28*C, 98*C, "maroon4", -102*C, 205*C, 170*C, "medium aquamarine", - 0*C, 0*C, 205*C, "medium blue", -186*C, 85*C, 211*C, "medium orchid", -147*C, 112*C, 219*C, "medium purple", - 60*C, 179*C, 113*C, "medium sea green", -123*C, 104*C, 238*C, "medium slate blue", - 0*C, 250*C, 154*C, "medium spring green", - 72*C, 209*C, 204*C, "medium turquoise", -199*C, 21*C, 133*C, "medium violet red", -102*C, 205*C, 170*C, "MediumAquamarine", - 0*C, 0*C, 205*C, "MediumBlue", -186*C, 85*C, 211*C, "MediumOrchid", -224*C, 102*C, 255*C, "MediumOrchid1", -209*C, 95*C, 238*C, "MediumOrchid2", -180*C, 82*C, 205*C, "MediumOrchid3", -122*C, 55*C, 139*C, "MediumOrchid4", -147*C, 112*C, 219*C, "MediumPurple", -171*C, 130*C, 255*C, "MediumPurple1", -159*C, 121*C, 238*C, "MediumPurple2", -137*C, 104*C, 205*C, "MediumPurple3", - 93*C, 71*C, 139*C, "MediumPurple4", - 60*C, 179*C, 113*C, "MediumSeaGreen", -123*C, 104*C, 238*C, "MediumSlateBlue", - 0*C, 250*C, 154*C, "MediumSpringGreen", - 72*C, 209*C, 204*C, "MediumTurquoise", -199*C, 21*C, 133*C, "MediumVioletRed", - 25*C, 25*C, 112*C, "midnight blue", - 25*C, 25*C, 112*C, "MidnightBlue", -245*C, 255*C, 250*C, "mint cream", -245*C, 255*C, 250*C, "MintCream", -255*C, 228*C, 225*C, "misty rose", -255*C, 228*C, 225*C, "MistyRose", -255*C, 228*C, 225*C, "MistyRose1", -238*C, 213*C, 210*C, "MistyRose2", -205*C, 183*C, 181*C, "MistyRose3", -139*C, 125*C, 123*C, "MistyRose4", -255*C, 228*C, 181*C, "moccasin", -255*C, 222*C, 173*C, "navajo white", -255*C, 222*C, 173*C, "NavajoWhite", -255*C, 222*C, 173*C, "NavajoWhite1", -238*C, 207*C, 161*C, "NavajoWhite2", -205*C, 179*C, 139*C, "NavajoWhite3", -139*C, 121*C, 94*C, "NavajoWhite4", - 0*C, 0*C, 128*C, "navy", - 0*C, 0*C, 128*C, "navy blue", - 0*C, 0*C, 128*C, "NavyBlue", -253*C, 245*C, 230*C, "old lace", -253*C, 245*C, 230*C, "OldLace", -107*C, 142*C, 35*C, "olive drab", -107*C, 142*C, 35*C, "OliveDrab", -192*C, 255*C, 62*C, "OliveDrab1", -179*C, 238*C, 58*C, "OliveDrab2", -154*C, 205*C, 50*C, "OliveDrab3", -105*C, 139*C, 34*C, "OliveDrab4", -255*C, 165*C, 0*C, "orange", -255*C, 69*C, 0*C, "orange red", -255*C, 165*C, 0*C, "orange1", -238*C, 154*C, 0*C, "orange2", -205*C, 133*C, 0*C, "orange3", -139*C, 90*C, 0*C, "orange4", -255*C, 69*C, 0*C, "OrangeRed", -255*C, 69*C, 0*C, "OrangeRed1", -238*C, 64*C, 0*C, "OrangeRed2", -205*C, 55*C, 0*C, "OrangeRed3", -139*C, 37*C, 0*C, "OrangeRed4", -218*C, 112*C, 214*C, "orchid", -255*C, 131*C, 250*C, "orchid1", -238*C, 122*C, 233*C, "orchid2", -205*C, 105*C, 201*C, "orchid3", -139*C, 71*C, 137*C, "orchid4", -238*C, 232*C, 170*C, "pale goldenrod", -152*C, 251*C, 152*C, "pale green", -175*C, 238*C, 238*C, "pale turquoise", -219*C, 112*C, 147*C, "pale violet red", -238*C, 232*C, 170*C, "PaleGoldenrod", -152*C, 251*C, 152*C, "PaleGreen", -154*C, 255*C, 154*C, "PaleGreen1", -144*C, 238*C, 144*C, "PaleGreen2", -124*C, 205*C, 124*C, "PaleGreen3", -84*C, 139*C, 84*C, "PaleGreen4", -175*C, 238*C, 238*C, "PaleTurquoise", -187*C, 255*C, 255*C, "PaleTurquoise1", -174*C, 238*C, 238*C, "PaleTurquoise2", -150*C, 205*C, 205*C, "PaleTurquoise3", -102*C, 139*C, 139*C, "PaleTurquoise4", -219*C, 112*C, 147*C, "PaleVioletRed", -255*C, 130*C, 171*C, "PaleVioletRed1", -238*C, 121*C, 159*C, "PaleVioletRed2", -205*C, 104*C, 137*C, "PaleVioletRed3", -139*C, 71*C, 93*C, "PaleVioletRed4", -255*C, 239*C, 213*C, "papaya whip", -255*C, 239*C, 213*C, "PapayaWhip", -255*C, 218*C, 185*C, "peach puff", -255*C, 218*C, 185*C, "PeachPuff", -255*C, 218*C, 185*C, "PeachPuff1", -238*C, 203*C, 173*C, "PeachPuff2", -205*C, 175*C, 149*C, "PeachPuff3", -139*C, 119*C, 101*C, "PeachPuff4", -205*C, 133*C, 63*C, "peru", -255*C, 192*C, 203*C, "pink", -255*C, 181*C, 197*C, "pink1", -238*C, 169*C, 184*C, "pink2", -205*C, 145*C, 158*C, "pink3", -139*C, 99*C, 108*C, "pink4", -221*C, 160*C, 221*C, "plum", -255*C, 187*C, 255*C, "plum1", -238*C, 174*C, 238*C, "plum2", -205*C, 150*C, 205*C, "plum3", -139*C, 102*C, 139*C, "plum4", -176*C, 224*C, 230*C, "powder blue", -176*C, 224*C, 230*C, "PowderBlue", -160*C, 32*C, 240*C, "purple", -155*C, 48*C, 255*C, "purple1", -145*C, 44*C, 238*C, "purple2", -125*C, 38*C, 205*C, "purple3", - 85*C, 26*C, 139*C, "purple4", -255*C, 0*C, 0*C, "red", -255*C, 0*C, 0*C, "red1", -238*C, 0*C, 0*C, "red2", -205*C, 0*C, 0*C, "red3", -139*C, 0*C, 0*C, "red4", -188*C, 143*C, 143*C, "rosy brown", -188*C, 143*C, 143*C, "RosyBrown", -255*C, 193*C, 193*C, "RosyBrown1", -238*C, 180*C, 180*C, "RosyBrown2", -205*C, 155*C, 155*C, "RosyBrown3", -139*C, 105*C, 105*C, "RosyBrown4", - 65*C, 105*C, 225*C, "royal blue", - 65*C, 105*C, 225*C, "RoyalBlue", - 72*C, 118*C, 255*C, "RoyalBlue1", - 67*C, 110*C, 238*C, "RoyalBlue2", - 58*C, 95*C, 205*C, "RoyalBlue3", - 39*C, 64*C, 139*C, "RoyalBlue4", -139*C, 69*C, 19*C, "saddle brown", -139*C, 69*C, 19*C, "SaddleBrown", -250*C, 128*C, 114*C, "salmon", -255*C, 140*C, 105*C, "salmon1", -238*C, 130*C, 98*C, "salmon2", -205*C, 112*C, 84*C, "salmon3", -139*C, 76*C, 57*C, "salmon4", -244*C, 164*C, 96*C, "sandy brown", -244*C, 164*C, 96*C, "SandyBrown", - 46*C, 139*C, 87*C, "sea green", - 46*C, 139*C, 87*C, "SeaGreen", - 84*C, 255*C, 159*C, "SeaGreen1", - 78*C, 238*C, 148*C, "SeaGreen2", - 67*C, 205*C, 128*C, "SeaGreen3", -46*C, 139*C, 87*C, "SeaGreen4", -255*C, 245*C, 238*C, "seashell", -255*C, 245*C, 238*C, "seashell1", -238*C, 229*C, 222*C, "seashell2", -205*C, 197*C, 191*C, "seashell3", -139*C, 134*C, 130*C, "seashell4", -160*C, 82*C, 45*C, "sienna", -255*C, 130*C, 71*C, "sienna1", -238*C, 121*C, 66*C, "sienna2", -205*C, 104*C, 57*C, "sienna3", -139*C, 71*C, 38*C, "sienna4", -135*C, 206*C, 235*C, "sky blue", -135*C, 206*C, 235*C, "SkyBlue", -135*C, 206*C, 255*C, "SkyBlue1", -126*C, 192*C, 238*C, "SkyBlue2", -108*C, 166*C, 205*C, "SkyBlue3", - 74*C, 112*C, 139*C, "SkyBlue4", -106*C, 90*C, 205*C, "slate blue", -112*C, 128*C, 144*C, "slate gray", -112*C, 128*C, 144*C, "slate grey", -106*C, 90*C, 205*C, "SlateBlue", -131*C, 111*C, 255*C, "SlateBlue1", -122*C, 103*C, 238*C, "SlateBlue2", -105*C, 89*C, 205*C, "SlateBlue3", - 71*C, 60*C, 139*C, "SlateBlue4", -112*C, 128*C, 144*C, "SlateGray", -198*C, 226*C, 255*C, "SlateGray1", -185*C, 211*C, 238*C, "SlateGray2", -159*C, 182*C, 205*C, "SlateGray3", -108*C, 123*C, 139*C, "SlateGray4", -112*C, 128*C, 144*C, "SlateGrey", -255*C, 250*C, 250*C, "snow", -255*C, 250*C, 250*C, "snow1", -238*C, 233*C, 233*C, "snow2", -205*C, 201*C, 201*C, "snow3", -139*C, 137*C, 137*C, "snow4", - 0*C, 255*C, 127*C, "spring green", - 0*C, 255*C, 127*C, "SpringGreen", - 0*C, 255*C, 127*C, "SpringGreen1", - 0*C, 238*C, 118*C, "SpringGreen2", - 0*C, 205*C, 102*C, "SpringGreen3", -0*C, 139*C, 69*C, "SpringGreen4", - 70*C, 130*C, 180*C, "steel blue", - 70*C, 130*C, 180*C, "SteelBlue", - 99*C, 184*C, 255*C, "SteelBlue1", - 92*C, 172*C, 238*C, "SteelBlue2", - 79*C, 148*C, 205*C, "SteelBlue3", - 54*C, 100*C, 139*C, "SteelBlue4", -210*C, 180*C, 140*C, "tan", -255*C, 165*C, 79*C, "tan1", -238*C, 154*C, 73*C, "tan2", -205*C, 133*C, 63*C, "tan3", -139*C, 90*C, 43*C, "tan4", -216*C, 191*C, 216*C, "thistle", -255*C, 225*C, 255*C, "thistle1", -238*C, 210*C, 238*C, "thistle2", -205*C, 181*C, 205*C, "thistle3", -139*C, 123*C, 139*C, "thistle4", -255*C, 99*C, 71*C, "tomato", -255*C, 99*C, 71*C, "tomato1", -238*C, 92*C, 66*C, "tomato2", -205*C, 79*C, 57*C, "tomato3", -139*C, 54*C, 38*C, "tomato4", - 64*C, 224*C, 208*C, "turquoise", - 0*C, 245*C, 255*C, "turquoise1", - 0*C, 229*C, 238*C, "turquoise2", - 0*C, 197*C, 205*C, "turquoise3", - 0*C, 134*C, 139*C, "turquoise4", -238*C, 130*C, 238*C, "violet", -208*C, 32*C, 144*C, "violet red", -208*C, 32*C, 144*C, "VioletRed", -255*C, 62*C, 150*C, "VioletRed1", -238*C, 58*C, 140*C, "VioletRed2", -205*C, 50*C, 120*C, "VioletRed3", -139*C, 34*C, 82*C, "VioletRed4", -245*C, 222*C, 179*C, "wheat", -255*C, 231*C, 186*C, "wheat1", -238*C, 216*C, 174*C, "wheat2", -205*C, 186*C, 150*C, "wheat3", -139*C, 126*C, 102*C, "wheat4", -255*C, 255*C, 255*C, "white", -245*C, 245*C, 245*C, "white smoke", -245*C, 245*C, 245*C, "WhiteSmoke", -255*C, 255*C, 0*C, "yellow", -154*C, 205*C, 50*C, "yellow green", -255*C, 255*C, 0*C, "yellow1", -238*C, 238*C, 0*C, "yellow2", -205*C, 205*C, 0*C, "yellow3", -139*C, 139*C, 0*C, "yellow4", -154*C, 205*C, 50*C, "YellowGreen", + { 240*C, 248*C, 255*C, "alice blue" }, + { 240*C, 248*C, 255*C, "AliceBlue" }, + { 250*C, 235*C, 215*C, "antique white" }, + { 250*C, 235*C, 215*C, "AntiqueWhite" }, + { 255*C, 239*C, 219*C, "AntiqueWhite1" }, + { 238*C, 223*C, 204*C, "AntiqueWhite2" }, + { 205*C, 192*C, 176*C, "AntiqueWhite3" }, + { 139*C, 131*C, 120*C, "AntiqueWhite4" }, + { 127*C, 255*C, 212*C, "aquamarine" }, + { 127*C, 255*C, 212*C, "aquamarine1" }, + { 118*C, 238*C, 198*C, "aquamarine2" }, + { 102*C, 205*C, 170*C, "aquamarine3" }, + { 69*C, 139*C, 116*C, "aquamarine4" }, + { 240*C, 255*C, 255*C, "azure" }, + { 240*C, 255*C, 255*C, "azure1" }, + { 224*C, 238*C, 238*C, "azure2" }, + { 193*C, 205*C, 205*C, "azure3" }, + { 131*C, 139*C, 139*C, "azure4" }, + { 245*C, 245*C, 220*C, "beige" }, + { 255*C, 228*C, 196*C, "bisque" }, + { 255*C, 228*C, 196*C, "bisque1" }, + { 238*C, 213*C, 183*C, "bisque2" }, + { 205*C, 183*C, 158*C, "bisque3" }, + { 139*C, 125*C, 107*C, "bisque4" }, + { 0*C, 0*C, 0*C, "black" }, + { 255*C, 235*C, 205*C, "blanched almond" }, + { 255*C, 235*C, 205*C, "BlanchedAlmond" }, + { 0*C, 0*C, 255*C, "blue" }, + { 138*C, 43*C, 226*C, "blue violet" }, + { 0*C, 0*C, 255*C, "blue1" }, + { 0*C, 0*C, 238*C, "blue2" }, + { 0*C, 0*C, 205*C, "blue3" }, + { 0*C, 0*C, 139*C, "blue4" }, + { 138*C, 43*C, 226*C, "BlueViolet" }, + { 165*C, 42*C, 42*C, "brown" }, + { 255*C, 64*C, 64*C, "brown1" }, + { 238*C, 59*C, 59*C, "brown2" }, + { 205*C, 51*C, 51*C, "brown3" }, + { 139*C, 35*C, 35*C, "brown4" }, + { 222*C, 184*C, 135*C, "burlywood" }, + { 255*C, 211*C, 155*C, "burlywood1" }, + { 238*C, 197*C, 145*C, "burlywood2" }, + { 205*C, 170*C, 125*C, "burlywood3" }, + { 139*C, 115*C, 85*C, "burlywood4" }, + { 95*C, 158*C, 160*C, "cadet blue" }, + { 95*C, 158*C, 160*C, "CadetBlue" }, + { 152*C, 245*C, 255*C, "CadetBlue1" }, + { 142*C, 229*C, 238*C, "CadetBlue2" }, + { 122*C, 197*C, 205*C, "CadetBlue3" }, + { 83*C, 134*C, 139*C, "CadetBlue4" }, + { 127*C, 255*C, 0*C, "chartreuse" }, + { 127*C, 255*C, 0*C, "chartreuse1" }, + { 118*C, 238*C, 0*C, "chartreuse2" }, + { 102*C, 205*C, 0*C, "chartreuse3" }, + { 69*C, 139*C, 0*C, "chartreuse4" }, + { 210*C, 105*C, 30*C, "chocolate" }, + { 255*C, 127*C, 36*C, "chocolate1" }, + { 238*C, 118*C, 33*C, "chocolate2" }, + { 205*C, 102*C, 29*C, "chocolate3" }, + { 139*C, 69*C, 19*C, "chocolate4" }, + { 255*C, 127*C, 80*C, "coral" }, + { 255*C, 114*C, 86*C, "coral1" }, + { 238*C, 106*C, 80*C, "coral2" }, + { 205*C, 91*C, 69*C, "coral3" }, + { 139*C, 62*C, 47*C, "coral4" }, + { 100*C, 149*C, 237*C, "cornflower blue" }, + { 100*C, 149*C, 237*C, "CornflowerBlue" }, + { 255*C, 248*C, 220*C, "cornsilk" }, + { 255*C, 248*C, 220*C, "cornsilk1" }, + { 238*C, 232*C, 205*C, "cornsilk2" }, + { 205*C, 200*C, 177*C, "cornsilk3" }, + { 139*C, 136*C, 120*C, "cornsilk4" }, + { 0*C, 255*C, 255*C, "cyan" }, + { 0*C, 255*C, 255*C, "cyan1" }, + { 0*C, 238*C, 238*C, "cyan2" }, + { 0*C, 205*C, 205*C, "cyan3" }, + { 0*C, 139*C, 139*C, "cyan4" }, + { 0*C, 0*C, 139*C, "dark blue" }, + { 0*C, 139*C, 139*C, "dark cyan" }, + { 184*C, 134*C, 11*C, "dark goldenrod" }, + { 169*C, 169*C, 169*C, "dark gray" }, + { 0*C, 100*C, 0*C, "dark green" }, + { 169*C, 169*C, 169*C, "dark grey" }, + { 189*C, 183*C, 107*C, "dark khaki" }, + { 139*C, 0*C, 139*C, "dark magenta" }, + { 85*C, 107*C, 47*C, "dark olive green" }, + { 255*C, 140*C, 0*C, "dark orange" }, + { 153*C, 50*C, 204*C, "dark orchid" }, + { 139*C, 0*C, 0*C, "dark red" }, + { 233*C, 150*C, 122*C, "dark salmon" }, + { 143*C, 188*C, 143*C, "dark sea green" }, + { 72*C, 61*C, 139*C, "dark slate blue" }, + { 47*C, 79*C, 79*C, "dark slate gray" }, + { 47*C, 79*C, 79*C, "dark slate grey" }, + { 0*C, 206*C, 209*C, "dark turquoise" }, + { 148*C, 0*C, 211*C, "dark violet" }, + { 0*C, 0*C, 139*C, "DarkBlue" }, + { 0*C, 139*C, 139*C, "DarkCyan" }, + { 184*C, 134*C, 11*C, "DarkGoldenrod" }, + { 255*C, 185*C, 15*C, "DarkGoldenrod1" }, + { 238*C, 173*C, 14*C, "DarkGoldenrod2" }, + { 205*C, 149*C, 12*C, "DarkGoldenrod3" }, + { 139*C, 101*C, 8*C, "DarkGoldenrod4" }, + { 169*C, 169*C, 169*C, "DarkGray" }, + { 0*C, 100*C, 0*C, "DarkGreen" }, + { 169*C, 169*C, 169*C, "DarkGrey" }, + { 189*C, 183*C, 107*C, "DarkKhaki" }, + { 139*C, 0*C, 139*C, "DarkMagenta" }, + { 85*C, 107*C, 47*C, "DarkOliveGreen" }, + { 202*C, 255*C, 112*C, "DarkOliveGreen1" }, + { 188*C, 238*C, 104*C, "DarkOliveGreen2" }, + { 162*C, 205*C, 90*C, "DarkOliveGreen3" }, + { 110*C, 139*C, 61*C, "DarkOliveGreen4" }, + { 255*C, 140*C, 0*C, "DarkOrange" }, + { 255*C, 127*C, 0*C, "DarkOrange1" }, + { 238*C, 118*C, 0*C, "DarkOrange2" }, + { 205*C, 102*C, 0*C, "DarkOrange3" }, + { 139*C, 69*C, 0*C, "DarkOrange4" }, + { 153*C, 50*C, 204*C, "DarkOrchid" }, + { 191*C, 62*C, 255*C, "DarkOrchid1" }, + { 178*C, 58*C, 238*C, "DarkOrchid2" }, + { 154*C, 50*C, 205*C, "DarkOrchid3" }, + { 104*C, 34*C, 139*C, "DarkOrchid4" }, + { 139*C, 0*C, 0*C, "DarkRed" }, + { 233*C, 150*C, 122*C, "DarkSalmon" }, + { 143*C, 188*C, 143*C, "DarkSeaGreen" }, + { 193*C, 255*C, 193*C, "DarkSeaGreen1" }, + { 180*C, 238*C, 180*C, "DarkSeaGreen2" }, + { 155*C, 205*C, 155*C, "DarkSeaGreen3" }, + { 105*C, 139*C, 105*C, "DarkSeaGreen4" }, + { 72*C, 61*C, 139*C, "DarkSlateBlue" }, + { 47*C, 79*C, 79*C, "DarkSlateGray" }, + { 151*C, 255*C, 255*C, "DarkSlateGray1" }, + { 141*C, 238*C, 238*C, "DarkSlateGray2" }, + { 121*C, 205*C, 205*C, "DarkSlateGray3" }, + { 82*C, 139*C, 139*C, "DarkSlateGray4" }, + { 47*C, 79*C, 79*C, "DarkSlateGrey" }, + { 0*C, 206*C, 209*C, "DarkTurquoise" }, + { 148*C, 0*C, 211*C, "DarkViolet" }, + { 255*C, 20*C, 147*C, "deep pink" }, + { 0*C, 191*C, 255*C, "deep sky blue" }, + { 255*C, 20*C, 147*C, "DeepPink" }, + { 255*C, 20*C, 147*C, "DeepPink1" }, + { 238*C, 18*C, 137*C, "DeepPink2" }, + { 205*C, 16*C, 118*C, "DeepPink3" }, + { 139*C, 10*C, 80*C, "DeepPink4" }, + { 0*C, 191*C, 255*C, "DeepSkyBlue" }, + { 0*C, 191*C, 255*C, "DeepSkyBlue1" }, + { 0*C, 178*C, 238*C, "DeepSkyBlue2" }, + { 0*C, 154*C, 205*C, "DeepSkyBlue3" }, + { 0*C, 104*C, 139*C, "DeepSkyBlue4" }, + { 105*C, 105*C, 105*C, "dim gray" }, + { 105*C, 105*C, 105*C, "dim grey" }, + { 105*C, 105*C, 105*C, "DimGray" }, + { 105*C, 105*C, 105*C, "DimGrey" }, + { 30*C, 144*C, 255*C, "dodger blue" }, + { 30*C, 144*C, 255*C, "DodgerBlue" }, + { 30*C, 144*C, 255*C, "DodgerBlue1" }, + { 28*C, 134*C, 238*C, "DodgerBlue2" }, + { 24*C, 116*C, 205*C, "DodgerBlue3" }, + { 16*C, 78*C, 139*C, "DodgerBlue4" }, + { 178*C, 34*C, 34*C, "firebrick" }, + { 255*C, 48*C, 48*C, "firebrick1" }, + { 238*C, 44*C, 44*C, "firebrick2" }, + { 205*C, 38*C, 38*C, "firebrick3" }, + { 139*C, 26*C, 26*C, "firebrick4" }, + { 255*C, 250*C, 240*C, "floral white" }, + { 255*C, 250*C, 240*C, "FloralWhite" }, + { 34*C, 139*C, 34*C, "forest green" }, + { 34*C, 139*C, 34*C, "ForestGreen" }, + { 220*C, 220*C, 220*C, "gainsboro" }, + { 248*C, 248*C, 255*C, "ghost white" }, + { 248*C, 248*C, 255*C, "GhostWhite" }, + { 255*C, 215*C, 0*C, "gold" }, + { 255*C, 215*C, 0*C, "gold1" }, + { 238*C, 201*C, 0*C, "gold2" }, + { 205*C, 173*C, 0*C, "gold3" }, + { 139*C, 117*C, 0*C, "gold4" }, + { 218*C, 165*C, 32*C, "goldenrod" }, + { 255*C, 193*C, 37*C, "goldenrod1" }, + { 238*C, 180*C, 34*C, "goldenrod2" }, + { 205*C, 155*C, 29*C, "goldenrod3" }, + { 139*C, 105*C, 20*C, "goldenrod4" }, + { 190*C, 190*C, 190*C, "gray" }, + { 0*C, 0*C, 0*C, "gray0" }, + { 3*C, 3*C, 3*C, "gray1" }, + { 26*C, 26*C, 26*C, "gray10" }, + { 255*C, 255*C, 255*C, "gray100" }, + { 28*C, 28*C, 28*C, "gray11" }, + { 31*C, 31*C, 31*C, "gray12" }, + { 33*C, 33*C, 33*C, "gray13" }, + { 36*C, 36*C, 36*C, "gray14" }, + { 38*C, 38*C, 38*C, "gray15" }, + { 41*C, 41*C, 41*C, "gray16" }, + { 43*C, 43*C, 43*C, "gray17" }, + { 46*C, 46*C, 46*C, "gray18" }, + { 48*C, 48*C, 48*C, "gray19" }, + { 5*C, 5*C, 5*C, "gray2" }, + { 51*C, 51*C, 51*C, "gray20" }, + { 54*C, 54*C, 54*C, "gray21" }, + { 56*C, 56*C, 56*C, "gray22" }, + { 59*C, 59*C, 59*C, "gray23" }, + { 61*C, 61*C, 61*C, "gray24" }, + { 64*C, 64*C, 64*C, "gray25" }, + { 66*C, 66*C, 66*C, "gray26" }, + { 69*C, 69*C, 69*C, "gray27" }, + { 71*C, 71*C, 71*C, "gray28" }, + { 74*C, 74*C, 74*C, "gray29" }, + { 8*C, 8*C, 8*C, "gray3" }, + { 77*C, 77*C, 77*C, "gray30" }, + { 79*C, 79*C, 79*C, "gray31" }, + { 82*C, 82*C, 82*C, "gray32" }, + { 84*C, 84*C, 84*C, "gray33" }, + { 87*C, 87*C, 87*C, "gray34" }, + { 89*C, 89*C, 89*C, "gray35" }, + { 92*C, 92*C, 92*C, "gray36" }, + { 94*C, 94*C, 94*C, "gray37" }, + { 97*C, 97*C, 97*C, "gray38" }, + { 99*C, 99*C, 99*C, "gray39" }, + { 10*C, 10*C, 10*C, "gray4" }, + { 102*C, 102*C, 102*C, "gray40" }, + { 105*C, 105*C, 105*C, "gray41" }, + { 107*C, 107*C, 107*C, "gray42" }, + { 110*C, 110*C, 110*C, "gray43" }, + { 112*C, 112*C, 112*C, "gray44" }, + { 115*C, 115*C, 115*C, "gray45" }, + { 117*C, 117*C, 117*C, "gray46" }, + { 120*C, 120*C, 120*C, "gray47" }, + { 122*C, 122*C, 122*C, "gray48" }, + { 125*C, 125*C, 125*C, "gray49" }, + { 13*C, 13*C, 13*C, "gray5" }, + { 127*C, 127*C, 127*C, "gray50" }, + { 130*C, 130*C, 130*C, "gray51" }, + { 133*C, 133*C, 133*C, "gray52" }, + { 135*C, 135*C, 135*C, "gray53" }, + { 138*C, 138*C, 138*C, "gray54" }, + { 140*C, 140*C, 140*C, "gray55" }, + { 143*C, 143*C, 143*C, "gray56" }, + { 145*C, 145*C, 145*C, "gray57" }, + { 148*C, 148*C, 148*C, "gray58" }, + { 150*C, 150*C, 150*C, "gray59" }, + { 15*C, 15*C, 15*C, "gray6" }, + { 153*C, 153*C, 153*C, "gray60" }, + { 156*C, 156*C, 156*C, "gray61" }, + { 158*C, 158*C, 158*C, "gray62" }, + { 161*C, 161*C, 161*C, "gray63" }, + { 163*C, 163*C, 163*C, "gray64" }, + { 166*C, 166*C, 166*C, "gray65" }, + { 168*C, 168*C, 168*C, "gray66" }, + { 171*C, 171*C, 171*C, "gray67" }, + { 173*C, 173*C, 173*C, "gray68" }, + { 176*C, 176*C, 176*C, "gray69" }, + { 18*C, 18*C, 18*C, "gray7" }, + { 179*C, 179*C, 179*C, "gray70" }, + { 181*C, 181*C, 181*C, "gray71" }, + { 184*C, 184*C, 184*C, "gray72" }, + { 186*C, 186*C, 186*C, "gray73" }, + { 189*C, 189*C, 189*C, "gray74" }, + { 191*C, 191*C, 191*C, "gray75" }, + { 194*C, 194*C, 194*C, "gray76" }, + { 196*C, 196*C, 196*C, "gray77" }, + { 199*C, 199*C, 199*C, "gray78" }, + { 201*C, 201*C, 201*C, "gray79" }, + { 20*C, 20*C, 20*C, "gray8" }, + { 204*C, 204*C, 204*C, "gray80" }, + { 207*C, 207*C, 207*C, "gray81" }, + { 209*C, 209*C, 209*C, "gray82" }, + { 212*C, 212*C, 212*C, "gray83" }, + { 214*C, 214*C, 214*C, "gray84" }, + { 217*C, 217*C, 217*C, "gray85" }, + { 219*C, 219*C, 219*C, "gray86" }, + { 222*C, 222*C, 222*C, "gray87" }, + { 224*C, 224*C, 224*C, "gray88" }, + { 227*C, 227*C, 227*C, "gray89" }, + { 23*C, 23*C, 23*C, "gray9" }, + { 229*C, 229*C, 229*C, "gray90" }, + { 232*C, 232*C, 232*C, "gray91" }, + { 235*C, 235*C, 235*C, "gray92" }, + { 237*C, 237*C, 237*C, "gray93" }, + { 240*C, 240*C, 240*C, "gray94" }, + { 242*C, 242*C, 242*C, "gray95" }, + { 245*C, 245*C, 245*C, "gray96" }, + { 247*C, 247*C, 247*C, "gray97" }, + { 250*C, 250*C, 250*C, "gray98" }, + { 252*C, 252*C, 252*C, "gray99" }, + { 0*C, 255*C, 0*C, "green" }, + { 173*C, 255*C, 47*C, "green yellow" }, + { 0*C, 255*C, 0*C, "green1" }, + { 0*C, 238*C, 0*C, "green2" }, + { 0*C, 205*C, 0*C, "green3" }, + { 0*C, 139*C, 0*C, "green4" }, + { 173*C, 255*C, 47*C, "GreenYellow" }, + { 190*C, 190*C, 190*C, "grey" }, + { 0*C, 0*C, 0*C, "grey0" }, + { 3*C, 3*C, 3*C, "grey1" }, + { 26*C, 26*C, 26*C, "grey10" }, + { 255*C, 255*C, 255*C, "grey100" }, + { 28*C, 28*C, 28*C, "grey11" }, + { 31*C, 31*C, 31*C, "grey12" }, + { 33*C, 33*C, 33*C, "grey13" }, + { 36*C, 36*C, 36*C, "grey14" }, + { 38*C, 38*C, 38*C, "grey15" }, + { 41*C, 41*C, 41*C, "grey16" }, + { 43*C, 43*C, 43*C, "grey17" }, + { 46*C, 46*C, 46*C, "grey18" }, + { 48*C, 48*C, 48*C, "grey19" }, + { 5*C, 5*C, 5*C, "grey2" }, + { 51*C, 51*C, 51*C, "grey20" }, + { 54*C, 54*C, 54*C, "grey21" }, + { 56*C, 56*C, 56*C, "grey22" }, + { 59*C, 59*C, 59*C, "grey23" }, + { 61*C, 61*C, 61*C, "grey24" }, + { 64*C, 64*C, 64*C, "grey25" }, + { 66*C, 66*C, 66*C, "grey26" }, + { 69*C, 69*C, 69*C, "grey27" }, + { 71*C, 71*C, 71*C, "grey28" }, + { 74*C, 74*C, 74*C, "grey29" }, + { 8*C, 8*C, 8*C, "grey3" }, + { 77*C, 77*C, 77*C, "grey30" }, + { 79*C, 79*C, 79*C, "grey31" }, + { 82*C, 82*C, 82*C, "grey32" }, + { 84*C, 84*C, 84*C, "grey33" }, + { 87*C, 87*C, 87*C, "grey34" }, + { 89*C, 89*C, 89*C, "grey35" }, + { 92*C, 92*C, 92*C, "grey36" }, + { 94*C, 94*C, 94*C, "grey37" }, + { 97*C, 97*C, 97*C, "grey38" }, + { 99*C, 99*C, 99*C, "grey39" }, + { 10*C, 10*C, 10*C, "grey4" }, + { 102*C, 102*C, 102*C, "grey40" }, + { 105*C, 105*C, 105*C, "grey41" }, + { 107*C, 107*C, 107*C, "grey42" }, + { 110*C, 110*C, 110*C, "grey43" }, + { 112*C, 112*C, 112*C, "grey44" }, + { 115*C, 115*C, 115*C, "grey45" }, + { 117*C, 117*C, 117*C, "grey46" }, + { 120*C, 120*C, 120*C, "grey47" }, + { 122*C, 122*C, 122*C, "grey48" }, + { 125*C, 125*C, 125*C, "grey49" }, + { 13*C, 13*C, 13*C, "grey5" }, + { 127*C, 127*C, 127*C, "grey50" }, + { 130*C, 130*C, 130*C, "grey51" }, + { 133*C, 133*C, 133*C, "grey52" }, + { 135*C, 135*C, 135*C, "grey53" }, + { 138*C, 138*C, 138*C, "grey54" }, + { 140*C, 140*C, 140*C, "grey55" }, + { 143*C, 143*C, 143*C, "grey56" }, + { 145*C, 145*C, 145*C, "grey57" }, + { 148*C, 148*C, 148*C, "grey58" }, + { 150*C, 150*C, 150*C, "grey59" }, + { 15*C, 15*C, 15*C, "grey6" }, + { 153*C, 153*C, 153*C, "grey60" }, + { 156*C, 156*C, 156*C, "grey61" }, + { 158*C, 158*C, 158*C, "grey62" }, + { 161*C, 161*C, 161*C, "grey63" }, + { 163*C, 163*C, 163*C, "grey64" }, + { 166*C, 166*C, 166*C, "grey65" }, + { 168*C, 168*C, 168*C, "grey66" }, + { 171*C, 171*C, 171*C, "grey67" }, + { 173*C, 173*C, 173*C, "grey68" }, + { 176*C, 176*C, 176*C, "grey69" }, + { 18*C, 18*C, 18*C, "grey7" }, + { 179*C, 179*C, 179*C, "grey70" }, + { 181*C, 181*C, 181*C, "grey71" }, + { 184*C, 184*C, 184*C, "grey72" }, + { 186*C, 186*C, 186*C, "grey73" }, + { 189*C, 189*C, 189*C, "grey74" }, + { 191*C, 191*C, 191*C, "grey75" }, + { 194*C, 194*C, 194*C, "grey76" }, + { 196*C, 196*C, 196*C, "grey77" }, + { 199*C, 199*C, 199*C, "grey78" }, + { 201*C, 201*C, 201*C, "grey79" }, + { 20*C, 20*C, 20*C, "grey8" }, + { 204*C, 204*C, 204*C, "grey80" }, + { 207*C, 207*C, 207*C, "grey81" }, + { 209*C, 209*C, 209*C, "grey82" }, + { 212*C, 212*C, 212*C, "grey83" }, + { 214*C, 214*C, 214*C, "grey84" }, + { 217*C, 217*C, 217*C, "grey85" }, + { 219*C, 219*C, 219*C, "grey86" }, + { 222*C, 222*C, 222*C, "grey87" }, + { 224*C, 224*C, 224*C, "grey88" }, + { 227*C, 227*C, 227*C, "grey89" }, + { 23*C, 23*C, 23*C, "grey9" }, + { 229*C, 229*C, 229*C, "grey90" }, + { 232*C, 232*C, 232*C, "grey91" }, + { 235*C, 235*C, 235*C, "grey92" }, + { 237*C, 237*C, 237*C, "grey93" }, + { 240*C, 240*C, 240*C, "grey94" }, + { 242*C, 242*C, 242*C, "grey95" }, + { 245*C, 245*C, 245*C, "grey96" }, + { 247*C, 247*C, 247*C, "grey97" }, + { 250*C, 250*C, 250*C, "grey98" }, + { 252*C, 252*C, 252*C, "grey99" }, + { 240*C, 255*C, 240*C, "honeydew" }, + { 240*C, 255*C, 240*C, "honeydew1" }, + { 224*C, 238*C, 224*C, "honeydew2" }, + { 193*C, 205*C, 193*C, "honeydew3" }, + { 131*C, 139*C, 131*C, "honeydew4" }, + { 255*C, 105*C, 180*C, "hot pink" }, + { 255*C, 105*C, 180*C, "HotPink" }, + { 255*C, 110*C, 180*C, "HotPink1" }, + { 238*C, 106*C, 167*C, "HotPink2" }, + { 205*C, 96*C, 144*C, "HotPink3" }, + { 139*C, 58*C, 98*C, "HotPink4" }, + { 205*C, 92*C, 92*C, "indian red" }, + { 205*C, 92*C, 92*C, "IndianRed" }, + { 255*C, 106*C, 106*C, "IndianRed1" }, + { 238*C, 99*C, 99*C, "IndianRed2" }, + { 205*C, 85*C, 85*C, "IndianRed3" }, + { 139*C, 58*C, 58*C, "IndianRed4" }, + { 255*C, 255*C, 240*C, "ivory" }, + { 255*C, 255*C, 240*C, "ivory1" }, + { 238*C, 238*C, 224*C, "ivory2" }, + { 205*C, 205*C, 193*C, "ivory3" }, + { 139*C, 139*C, 131*C, "ivory4" }, + { 240*C, 230*C, 140*C, "khaki" }, + { 255*C, 246*C, 143*C, "khaki1" }, + { 238*C, 230*C, 133*C, "khaki2" }, + { 205*C, 198*C, 115*C, "khaki3" }, + { 139*C, 134*C, 78*C, "khaki4" }, + { 230*C, 230*C, 250*C, "lavender" }, + { 255*C, 240*C, 245*C, "lavender blush" }, + { 255*C, 240*C, 245*C, "LavenderBlush" }, + { 255*C, 240*C, 245*C, "LavenderBlush1" }, + { 238*C, 224*C, 229*C, "LavenderBlush2" }, + { 205*C, 193*C, 197*C, "LavenderBlush3" }, + { 139*C, 131*C, 134*C, "LavenderBlush4" }, + { 124*C, 252*C, 0*C, "lawn green" }, + { 124*C, 252*C, 0*C, "LawnGreen" }, + { 255*C, 250*C, 205*C, "lemon chiffon" }, + { 255*C, 250*C, 205*C, "LemonChiffon" }, + { 255*C, 250*C, 205*C, "LemonChiffon1" }, + { 238*C, 233*C, 191*C, "LemonChiffon2" }, + { 205*C, 201*C, 165*C, "LemonChiffon3" }, + { 139*C, 137*C, 112*C, "LemonChiffon4" }, + { 173*C, 216*C, 230*C, "light blue" }, + { 240*C, 128*C, 128*C, "light coral" }, + { 224*C, 255*C, 255*C, "light cyan" }, + { 238*C, 221*C, 130*C, "light goldenrod" }, + { 250*C, 250*C, 210*C, "light goldenrod yellow" }, + { 211*C, 211*C, 211*C, "light gray" }, + { 144*C, 238*C, 144*C, "light green" }, + { 211*C, 211*C, 211*C, "light grey" }, + { 255*C, 182*C, 193*C, "light pink" }, + { 255*C, 160*C, 122*C, "light salmon" }, + { 32*C, 178*C, 170*C, "light sea green" }, + { 135*C, 206*C, 250*C, "light sky blue" }, + { 132*C, 112*C, 255*C, "light slate blue" }, + { 119*C, 136*C, 153*C, "light slate gray" }, + { 119*C, 136*C, 153*C, "light slate grey" }, + { 176*C, 196*C, 222*C, "light steel blue" }, + { 255*C, 255*C, 224*C, "light yellow" }, + { 173*C, 216*C, 230*C, "LightBlue" }, + { 191*C, 239*C, 255*C, "LightBlue1" }, + { 178*C, 223*C, 238*C, "LightBlue2" }, + { 154*C, 192*C, 205*C, "LightBlue3" }, + { 104*C, 131*C, 139*C, "LightBlue4" }, + { 240*C, 128*C, 128*C, "LightCoral" }, + { 224*C, 255*C, 255*C, "LightCyan" }, + { 224*C, 255*C, 255*C, "LightCyan1" }, + { 209*C, 238*C, 238*C, "LightCyan2" }, + { 180*C, 205*C, 205*C, "LightCyan3" }, + { 122*C, 139*C, 139*C, "LightCyan4" }, + { 238*C, 221*C, 130*C, "LightGoldenrod" }, + { 255*C, 236*C, 139*C, "LightGoldenrod1" }, + { 238*C, 220*C, 130*C, "LightGoldenrod2" }, + { 205*C, 190*C, 112*C, "LightGoldenrod3" }, + { 139*C, 129*C, 76*C, "LightGoldenrod4" }, + { 250*C, 250*C, 210*C, "LightGoldenrodYellow" }, + { 211*C, 211*C, 211*C, "LightGray" }, + { 144*C, 238*C, 144*C, "LightGreen" }, + { 211*C, 211*C, 211*C, "LightGrey" }, + { 255*C, 182*C, 193*C, "LightPink" }, + { 255*C, 174*C, 185*C, "LightPink1" }, + { 238*C, 162*C, 173*C, "LightPink2" }, + { 205*C, 140*C, 149*C, "LightPink3" }, + { 139*C, 95*C, 101*C, "LightPink4" }, + { 255*C, 160*C, 122*C, "LightSalmon" }, + { 255*C, 160*C, 122*C, "LightSalmon1" }, + { 238*C, 149*C, 114*C, "LightSalmon2" }, + { 205*C, 129*C, 98*C, "LightSalmon3" }, + { 139*C, 87*C, 66*C, "LightSalmon4" }, + { 32*C, 178*C, 170*C, "LightSeaGreen" }, + { 135*C, 206*C, 250*C, "LightSkyBlue" }, + { 176*C, 226*C, 255*C, "LightSkyBlue1" }, + { 164*C, 211*C, 238*C, "LightSkyBlue2" }, + { 141*C, 182*C, 205*C, "LightSkyBlue3" }, + { 96*C, 123*C, 139*C, "LightSkyBlue4" }, + { 132*C, 112*C, 255*C, "LightSlateBlue" }, + { 119*C, 136*C, 153*C, "LightSlateGray" }, + { 119*C, 136*C, 153*C, "LightSlateGrey" }, + { 176*C, 196*C, 222*C, "LightSteelBlue" }, + { 202*C, 225*C, 255*C, "LightSteelBlue1" }, + { 188*C, 210*C, 238*C, "LightSteelBlue2" }, + { 162*C, 181*C, 205*C, "LightSteelBlue3" }, + { 110*C, 123*C, 139*C, "LightSteelBlue4" }, + { 255*C, 255*C, 224*C, "LightYellow" }, + { 255*C, 255*C, 224*C, "LightYellow1" }, + { 238*C, 238*C, 209*C, "LightYellow2" }, + { 205*C, 205*C, 180*C, "LightYellow3" }, + { 139*C, 139*C, 122*C, "LightYellow4" }, + { 50*C, 205*C, 50*C, "lime green" }, + { 50*C, 205*C, 50*C, "LimeGreen" }, + { 250*C, 240*C, 230*C, "linen" }, + { 255*C, 0*C, 255*C, "magenta" }, + { 255*C, 0*C, 255*C, "magenta1" }, + { 238*C, 0*C, 238*C, "magenta2" }, + { 205*C, 0*C, 205*C, "magenta3" }, + { 139*C, 0*C, 139*C, "magenta4" }, + { 176*C, 48*C, 96*C, "maroon" }, + { 255*C, 52*C, 179*C, "maroon1" }, + { 238*C, 48*C, 167*C, "maroon2" }, + { 205*C, 41*C, 144*C, "maroon3" }, + { 139*C, 28*C, 98*C, "maroon4" }, + { 102*C, 205*C, 170*C, "medium aquamarine" }, + { 0*C, 0*C, 205*C, "medium blue" }, + { 186*C, 85*C, 211*C, "medium orchid" }, + { 147*C, 112*C, 219*C, "medium purple" }, + { 60*C, 179*C, 113*C, "medium sea green" }, + { 123*C, 104*C, 238*C, "medium slate blue" }, + { 0*C, 250*C, 154*C, "medium spring green" }, + { 72*C, 209*C, 204*C, "medium turquoise" }, + { 199*C, 21*C, 133*C, "medium violet red" }, + { 102*C, 205*C, 170*C, "MediumAquamarine" }, + { 0*C, 0*C, 205*C, "MediumBlue" }, + { 186*C, 85*C, 211*C, "MediumOrchid" }, + { 224*C, 102*C, 255*C, "MediumOrchid1" }, + { 209*C, 95*C, 238*C, "MediumOrchid2" }, + { 180*C, 82*C, 205*C, "MediumOrchid3" }, + { 122*C, 55*C, 139*C, "MediumOrchid4" }, + { 147*C, 112*C, 219*C, "MediumPurple" }, + { 171*C, 130*C, 255*C, "MediumPurple1" }, + { 159*C, 121*C, 238*C, "MediumPurple2" }, + { 137*C, 104*C, 205*C, "MediumPurple3" }, + { 93*C, 71*C, 139*C, "MediumPurple4" }, + { 60*C, 179*C, 113*C, "MediumSeaGreen" }, + { 123*C, 104*C, 238*C, "MediumSlateBlue" }, + { 0*C, 250*C, 154*C, "MediumSpringGreen" }, + { 72*C, 209*C, 204*C, "MediumTurquoise" }, + { 199*C, 21*C, 133*C, "MediumVioletRed" }, + { 25*C, 25*C, 112*C, "midnight blue" }, + { 25*C, 25*C, 112*C, "MidnightBlue" }, + { 245*C, 255*C, 250*C, "mint cream" }, + { 245*C, 255*C, 250*C, "MintCream" }, + { 255*C, 228*C, 225*C, "misty rose" }, + { 255*C, 228*C, 225*C, "MistyRose" }, + { 255*C, 228*C, 225*C, "MistyRose1" }, + { 238*C, 213*C, 210*C, "MistyRose2" }, + { 205*C, 183*C, 181*C, "MistyRose3" }, + { 139*C, 125*C, 123*C, "MistyRose4" }, + { 255*C, 228*C, 181*C, "moccasin" }, + { 255*C, 222*C, 173*C, "navajo white" }, + { 255*C, 222*C, 173*C, "NavajoWhite" }, + { 255*C, 222*C, 173*C, "NavajoWhite1" }, + { 238*C, 207*C, 161*C, "NavajoWhite2" }, + { 205*C, 179*C, 139*C, "NavajoWhite3" }, + { 139*C, 121*C, 94*C, "NavajoWhite4" }, + { 0*C, 0*C, 128*C, "navy" }, + { 0*C, 0*C, 128*C, "navy blue" }, + { 0*C, 0*C, 128*C, "NavyBlue" }, + { 253*C, 245*C, 230*C, "old lace" }, + { 253*C, 245*C, 230*C, "OldLace" }, + { 107*C, 142*C, 35*C, "olive drab" }, + { 107*C, 142*C, 35*C, "OliveDrab" }, + { 192*C, 255*C, 62*C, "OliveDrab1" }, + { 179*C, 238*C, 58*C, "OliveDrab2" }, + { 154*C, 205*C, 50*C, "OliveDrab3" }, + { 105*C, 139*C, 34*C, "OliveDrab4" }, + { 255*C, 165*C, 0*C, "orange" }, + { 255*C, 69*C, 0*C, "orange red" }, + { 255*C, 165*C, 0*C, "orange1" }, + { 238*C, 154*C, 0*C, "orange2" }, + { 205*C, 133*C, 0*C, "orange3" }, + { 139*C, 90*C, 0*C, "orange4" }, + { 255*C, 69*C, 0*C, "OrangeRed" }, + { 255*C, 69*C, 0*C, "OrangeRed1" }, + { 238*C, 64*C, 0*C, "OrangeRed2" }, + { 205*C, 55*C, 0*C, "OrangeRed3" }, + { 139*C, 37*C, 0*C, "OrangeRed4" }, + { 218*C, 112*C, 214*C, "orchid" }, + { 255*C, 131*C, 250*C, "orchid1" }, + { 238*C, 122*C, 233*C, "orchid2" }, + { 205*C, 105*C, 201*C, "orchid3" }, + { 139*C, 71*C, 137*C, "orchid4" }, + { 238*C, 232*C, 170*C, "pale goldenrod" }, + { 152*C, 251*C, 152*C, "pale green" }, + { 175*C, 238*C, 238*C, "pale turquoise" }, + { 219*C, 112*C, 147*C, "pale violet red" }, + { 238*C, 232*C, 170*C, "PaleGoldenrod" }, + { 152*C, 251*C, 152*C, "PaleGreen" }, + { 154*C, 255*C, 154*C, "PaleGreen1" }, + { 144*C, 238*C, 144*C, "PaleGreen2" }, + { 124*C, 205*C, 124*C, "PaleGreen3" }, + { 84*C, 139*C, 84*C, "PaleGreen4" }, + { 175*C, 238*C, 238*C, "PaleTurquoise" }, + { 187*C, 255*C, 255*C, "PaleTurquoise1" }, + { 174*C, 238*C, 238*C, "PaleTurquoise2" }, + { 150*C, 205*C, 205*C, "PaleTurquoise3" }, + { 102*C, 139*C, 139*C, "PaleTurquoise4" }, + { 219*C, 112*C, 147*C, "PaleVioletRed" }, + { 255*C, 130*C, 171*C, "PaleVioletRed1" }, + { 238*C, 121*C, 159*C, "PaleVioletRed2" }, + { 205*C, 104*C, 137*C, "PaleVioletRed3" }, + { 139*C, 71*C, 93*C, "PaleVioletRed4" }, + { 255*C, 239*C, 213*C, "papaya whip" }, + { 255*C, 239*C, 213*C, "PapayaWhip" }, + { 255*C, 218*C, 185*C, "peach puff" }, + { 255*C, 218*C, 185*C, "PeachPuff" }, + { 255*C, 218*C, 185*C, "PeachPuff1" }, + { 238*C, 203*C, 173*C, "PeachPuff2" }, + { 205*C, 175*C, 149*C, "PeachPuff3" }, + { 139*C, 119*C, 101*C, "PeachPuff4" }, + { 205*C, 133*C, 63*C, "peru" }, + { 255*C, 192*C, 203*C, "pink" }, + { 255*C, 181*C, 197*C, "pink1" }, + { 238*C, 169*C, 184*C, "pink2" }, + { 205*C, 145*C, 158*C, "pink3" }, + { 139*C, 99*C, 108*C, "pink4" }, + { 221*C, 160*C, 221*C, "plum" }, + { 255*C, 187*C, 255*C, "plum1" }, + { 238*C, 174*C, 238*C, "plum2" }, + { 205*C, 150*C, 205*C, "plum3" }, + { 139*C, 102*C, 139*C, "plum4" }, + { 176*C, 224*C, 230*C, "powder blue" }, + { 176*C, 224*C, 230*C, "PowderBlue" }, + { 160*C, 32*C, 240*C, "purple" }, + { 155*C, 48*C, 255*C, "purple1" }, + { 145*C, 44*C, 238*C, "purple2" }, + { 125*C, 38*C, 205*C, "purple3" }, + { 85*C, 26*C, 139*C, "purple4" }, + { 255*C, 0*C, 0*C, "red" }, + { 255*C, 0*C, 0*C, "red1" }, + { 238*C, 0*C, 0*C, "red2" }, + { 205*C, 0*C, 0*C, "red3" }, + { 139*C, 0*C, 0*C, "red4" }, + { 188*C, 143*C, 143*C, "rosy brown" }, + { 188*C, 143*C, 143*C, "RosyBrown" }, + { 255*C, 193*C, 193*C, "RosyBrown1" }, + { 238*C, 180*C, 180*C, "RosyBrown2" }, + { 205*C, 155*C, 155*C, "RosyBrown3" }, + { 139*C, 105*C, 105*C, "RosyBrown4" }, + { 65*C, 105*C, 225*C, "royal blue" }, + { 65*C, 105*C, 225*C, "RoyalBlue" }, + { 72*C, 118*C, 255*C, "RoyalBlue1" }, + { 67*C, 110*C, 238*C, "RoyalBlue2" }, + { 58*C, 95*C, 205*C, "RoyalBlue3" }, + { 39*C, 64*C, 139*C, "RoyalBlue4" }, + { 139*C, 69*C, 19*C, "saddle brown" }, + { 139*C, 69*C, 19*C, "SaddleBrown" }, + { 250*C, 128*C, 114*C, "salmon" }, + { 255*C, 140*C, 105*C, "salmon1" }, + { 238*C, 130*C, 98*C, "salmon2" }, + { 205*C, 112*C, 84*C, "salmon3" }, + { 139*C, 76*C, 57*C, "salmon4" }, + { 244*C, 164*C, 96*C, "sandy brown" }, + { 244*C, 164*C, 96*C, "SandyBrown" }, + { 46*C, 139*C, 87*C, "sea green" }, + { 46*C, 139*C, 87*C, "SeaGreen" }, + { 84*C, 255*C, 159*C, "SeaGreen1" }, + { 78*C, 238*C, 148*C, "SeaGreen2" }, + { 67*C, 205*C, 128*C, "SeaGreen3" }, + { 46*C, 139*C, 87*C, "SeaGreen4" }, + { 255*C, 245*C, 238*C, "seashell" }, + { 255*C, 245*C, 238*C, "seashell1" }, + { 238*C, 229*C, 222*C, "seashell2" }, + { 205*C, 197*C, 191*C, "seashell3" }, + { 139*C, 134*C, 130*C, "seashell4" }, + { 160*C, 82*C, 45*C, "sienna" }, + { 255*C, 130*C, 71*C, "sienna1" }, + { 238*C, 121*C, 66*C, "sienna2" }, + { 205*C, 104*C, 57*C, "sienna3" }, + { 139*C, 71*C, 38*C, "sienna4" }, + { 135*C, 206*C, 235*C, "sky blue" }, + { 135*C, 206*C, 235*C, "SkyBlue" }, + { 135*C, 206*C, 255*C, "SkyBlue1" }, + { 126*C, 192*C, 238*C, "SkyBlue2" }, + { 108*C, 166*C, 205*C, "SkyBlue3" }, + { 74*C, 112*C, 139*C, "SkyBlue4" }, + { 106*C, 90*C, 205*C, "slate blue" }, + { 112*C, 128*C, 144*C, "slate gray" }, + { 112*C, 128*C, 144*C, "slate grey" }, + { 106*C, 90*C, 205*C, "SlateBlue" }, + { 131*C, 111*C, 255*C, "SlateBlue1" }, + { 122*C, 103*C, 238*C, "SlateBlue2" }, + { 105*C, 89*C, 205*C, "SlateBlue3" }, + { 71*C, 60*C, 139*C, "SlateBlue4" }, + { 112*C, 128*C, 144*C, "SlateGray" }, + { 198*C, 226*C, 255*C, "SlateGray1" }, + { 185*C, 211*C, 238*C, "SlateGray2" }, + { 159*C, 182*C, 205*C, "SlateGray3" }, + { 108*C, 123*C, 139*C, "SlateGray4" }, + { 112*C, 128*C, 144*C, "SlateGrey" }, + { 255*C, 250*C, 250*C, "snow" }, + { 255*C, 250*C, 250*C, "snow1" }, + { 238*C, 233*C, 233*C, "snow2" }, + { 205*C, 201*C, 201*C, "snow3" }, + { 139*C, 137*C, 137*C, "snow4" }, + { 0*C, 255*C, 127*C, "spring green" }, + { 0*C, 255*C, 127*C, "SpringGreen" }, + { 0*C, 255*C, 127*C, "SpringGreen1" }, + { 0*C, 238*C, 118*C, "SpringGreen2" }, + { 0*C, 205*C, 102*C, "SpringGreen3" }, + { 0*C, 139*C, 69*C, "SpringGreen4" }, + { 70*C, 130*C, 180*C, "steel blue" }, + { 70*C, 130*C, 180*C, "SteelBlue" }, + { 99*C, 184*C, 255*C, "SteelBlue1" }, + { 92*C, 172*C, 238*C, "SteelBlue2" }, + { 79*C, 148*C, 205*C, "SteelBlue3" }, + { 54*C, 100*C, 139*C, "SteelBlue4" }, + { 210*C, 180*C, 140*C, "tan" }, + { 255*C, 165*C, 79*C, "tan1" }, + { 238*C, 154*C, 73*C, "tan2" }, + { 205*C, 133*C, 63*C, "tan3" }, + { 139*C, 90*C, 43*C, "tan4" }, + { 216*C, 191*C, 216*C, "thistle" }, + { 255*C, 225*C, 255*C, "thistle1" }, + { 238*C, 210*C, 238*C, "thistle2" }, + { 205*C, 181*C, 205*C, "thistle3" }, + { 139*C, 123*C, 139*C, "thistle4" }, + { 255*C, 99*C, 71*C, "tomato" }, + { 255*C, 99*C, 71*C, "tomato1" }, + { 238*C, 92*C, 66*C, "tomato2" }, + { 205*C, 79*C, 57*C, "tomato3" }, + { 139*C, 54*C, 38*C, "tomato4" }, + { 64*C, 224*C, 208*C, "turquoise" }, + { 0*C, 245*C, 255*C, "turquoise1" }, + { 0*C, 229*C, 238*C, "turquoise2" }, + { 0*C, 197*C, 205*C, "turquoise3" }, + { 0*C, 134*C, 139*C, "turquoise4" }, + { 238*C, 130*C, 238*C, "violet" }, + { 208*C, 32*C, 144*C, "violet red" }, + { 208*C, 32*C, 144*C, "VioletRed" }, + { 255*C, 62*C, 150*C, "VioletRed1" }, + { 238*C, 58*C, 140*C, "VioletRed2" }, + { 205*C, 50*C, 120*C, "VioletRed3" }, + { 139*C, 34*C, 82*C, "VioletRed4" }, + { 245*C, 222*C, 179*C, "wheat" }, + { 255*C, 231*C, 186*C, "wheat1" }, + { 238*C, 216*C, 174*C, "wheat2" }, + { 205*C, 186*C, 150*C, "wheat3" }, + { 139*C, 126*C, 102*C, "wheat4" }, + { 255*C, 255*C, 255*C, "white" }, + { 245*C, 245*C, 245*C, "white smoke" }, + { 245*C, 245*C, 245*C, "WhiteSmoke" }, + { 255*C, 255*C, 0*C, "yellow" }, + { 154*C, 205*C, 50*C, "yellow green" }, + { 255*C, 255*C, 0*C, "yellow1" }, + { 238*C, 238*C, 0*C, "yellow2" }, + { 205*C, 205*C, 0*C, "yellow3" }, + { 139*C, 139*C, 0*C, "yellow4" }, + { 154*C, 205*C, 50*C, "YellowGreen" } }; #undef C Index: xc/programs/Xserver/hw/kdrive/kdrive.c diff -u xc/programs/Xserver/hw/kdrive/kdrive.c:1.11 xc/programs/Xserver/hw/kdrive/kdrive.c:1.12 --- xc/programs/Xserver/hw/kdrive/kdrive.c:1.11 Fri Dec 8 17:59:37 2000 +++ xc/programs/Xserver/hw/kdrive/kdrive.c Thu Mar 29 21:15:20 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.c,v 1.11 2000/12/08 22:59:37 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.c,v 1.12 2001/03/30 02:15:20 keithp Exp $ */ #include "kdrive.h" #ifdef PSEUDO8 @@ -30,6 +30,10 @@ #include #include +#ifdef XV +#include "kxv.h" +#endif + CARD8 kdBpp[] = { 1, 4, 8, 16, 24, 32 }; #define NUM_KD_BPP (sizeof (kdBpp) / sizeof (kdBpp[0])) @@ -243,6 +247,7 @@ KdSetRootClip (pScreen, TRUE); if (pScreenPriv->card->cfuncs->dpms) (*pScreenPriv->card->cfuncs->dpms) (pScreen, pScreenPriv->dpmsState); + return TRUE; } void @@ -755,6 +760,8 @@ miInitializeBackingStore (pScreen); #endif #endif + + /* * Wrap CloseScreen, the order now is: * KdCloseScreen @@ -811,7 +818,6 @@ char **argv) { KdCardInfo *card = screen->card; - int i; (*card->cfuncs->scrinit) (screen); @@ -927,6 +933,8 @@ AddScreen (KdScreenInit, argc, argv); } +#if 0 /* This function is not used currently */ + int KdDepthToFb (ScreenPtr pScreen, int depth) { @@ -938,12 +946,13 @@ return fb; } +#endif + void KdInitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) { - int i; KdCardInfo *card; KdScreenInfo *screen; Index: xc/programs/Xserver/hw/kdrive/kdrive.h diff -u xc/programs/Xserver/hw/kdrive/kdrive.h:1.12 xc/programs/Xserver/hw/kdrive/kdrive.h:1.13 --- xc/programs/Xserver/hw/kdrive/kdrive.h:1.12 Fri Dec 8 17:59:37 2000 +++ xc/programs/Xserver/hw/kdrive/kdrive.h Thu Mar 29 21:15:20 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.h,v 1.12 2000/12/08 22:59:37 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.h,v 1.13 2001/03/30 02:15:20 keithp Exp $ */ #include #include "X.h" @@ -67,6 +67,7 @@ CARD32 io; CARD32 address[KD_MAX_CARD_ADDRESS]; int naddr; + int bus; } KdCardAttr; typedef struct _KdCardInfo { @@ -612,3 +613,6 @@ int KdFrameBufferSize (CARD8 *base, int max); +/* function prototypes to be imlpemented by the drivers */ +void +InitCard (char *name); Index: xc/programs/Xserver/hw/kdrive/kinput.c diff -u xc/programs/Xserver/hw/kdrive/kinput.c:1.11 xc/programs/Xserver/hw/kdrive/kinput.c:1.13.2.1 --- xc/programs/Xserver/hw/kdrive/kinput.c:1.11 Fri Dec 8 16:40:02 2000 +++ xc/programs/Xserver/hw/kdrive/kinput.c Fri May 25 14:50:08 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/kinput.c,v 1.11 2000/12/08 21:40:02 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/kinput.c,v 1.13.2.1 2001/05/25 18:50:08 dawes Exp $ */ #include "kdrive.h" #include "inputstr.h" @@ -48,8 +48,8 @@ static Bool kdOffScreen; static unsigned long kdOffScreenTime; static KdMouseMatrix kdMouseMatrix = { - 1, 0, 0, - 0, 1, 0 + { { 1, 0, 0 }, + { 0, 1, 0 } } }; #ifdef TOUCHSCREEN @@ -403,29 +403,29 @@ } const KdKeySymModsRec kdKeySymMods[] = { - XK_Control_L, ControlMask, - XK_Control_R, ControlMask, - XK_Shift_L, ShiftMask, - XK_Shift_R, ShiftMask, - XK_Caps_Lock, LockMask, - XK_Shift_Lock, LockMask, - XK_Alt_L, Mod1Mask, - XK_Alt_R, Mod1Mask, - XK_Meta_L, Mod1Mask, - XK_Meta_R, Mod1Mask, - XK_Num_Lock, Mod2Mask, - XK_Super_L, Mod3Mask, - XK_Super_R, Mod3Mask, - XK_Hyper_L, Mod3Mask, - XK_Hyper_R, Mod3Mask, - XK_Mode_switch, Mod4Mask, + { XK_Control_L, ControlMask }, + { XK_Control_R, ControlMask }, + { XK_Shift_L, ShiftMask }, + { XK_Shift_R, ShiftMask }, + { XK_Caps_Lock, LockMask }, + { XK_Shift_Lock, LockMask }, + { XK_Alt_L, Mod1Mask }, + { XK_Alt_R, Mod1Mask }, + { XK_Meta_L, Mod1Mask }, + { XK_Meta_R, Mod1Mask }, + { XK_Num_Lock, Mod2Mask }, + { XK_Super_L, Mod3Mask }, + { XK_Super_R, Mod3Mask }, + { XK_Hyper_L, Mod3Mask }, + { XK_Hyper_R, Mod3Mask }, + { XK_Mode_switch, Mod4Mask }, #ifdef TOUCHSCREEN - /* iPAQ specific hacks */ - XF86XK_Start, ControlMask, - XK_Menu, ShiftMask, - XF86XK_Calendar, LockMask, - XK_telephone, Mod1Mask, - XF86XK_AudioRecord, Mod2Mask, + /* PDA specific hacks */ + { XF86XK_Start, ControlMask }, + { XK_Menu, ShiftMask }, + { XK_telephone, Mod1Mask }, + { XF86XK_AudioRecord, Mod2Mask }, + { XF86XK_Calendar, Mod3Mask } #endif }; @@ -787,6 +787,7 @@ #define EventX(e) ((e)->u.keyButtonPointer.rootX) #define EventY(e) ((e)->u.keyButtonPointer.rootY) +int KdInsideEmulationWindow (xEvent *ev) { if (ev->u.keyButtonPointer.pad1) @@ -829,6 +830,7 @@ default: return keyboard; } + return keyboard; } #ifndef NDEBUG @@ -1450,7 +1452,7 @@ void ProcessInputEvents () { - (void)mieqProcessInputEvents(); + mieqProcessInputEvents(); miPointerUpdate(); if (kdSwitchPending) KdProcessSwitch (); Index: xc/programs/Xserver/hw/kdrive/kmap.c diff -u xc/programs/Xserver/hw/kdrive/kmap.c:1.6 xc/programs/Xserver/hw/kdrive/kmap.c:1.7 --- xc/programs/Xserver/hw/kdrive/kmap.c:1.6 Wed Dec 13 13:06:54 2000 +++ xc/programs/Xserver/hw/kdrive/kmap.c Thu Mar 29 21:15:20 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/kmap.c,v 1.6 2000/12/13 18:06:54 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/kmap.c,v 1.7 2001/03/30 02:15:20 keithp Exp $ */ #include "kdrive.h" @@ -37,6 +37,8 @@ #ifdef HAS_MTRR #include #endif + +#include void * KdMapDevice (CARD32 addr, CARD32 size) Index: xc/programs/Xserver/hw/kdrive/kmode.c diff -u xc/programs/Xserver/hw/kdrive/kmode.c:1.5 xc/programs/Xserver/hw/kdrive/kmode.c:1.6 --- xc/programs/Xserver/hw/kdrive/kmode.c:1.5 Wed May 24 19:57:56 2000 +++ xc/programs/Xserver/hw/kdrive/kmode.c Thu Mar 29 21:15:20 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/hw/kdrive/kmode.c,v 1.5 2000/05/24 23:57:56 keithp Exp $ + * $XFree86: xc/programs/Xserver/hw/kdrive/kmode.c,v 1.6 2001/03/30 02:15:20 keithp Exp $ * * Copyright 1999 SuSE, Inc. * @@ -40,6 +40,14 @@ { 720, 400, 85, 35500, /* VESA */ 36, 108, 216, KdSyncNegative, /* 37.927 */ 1, 42, 46, KdSyncPositive, /* 85.039 */ + }, + + + /* Modeline "720x576" 29.000 720 736 800 880 576 577 580 625 */ + { + 720, 576, 52, 32954, /* PAL Video */ + 16, 80, 160, KdSyncPositive, /* 32.954 */ + 1, 45, 49, KdSyncPositive, /* 52.727 */ }, /* 640x480 modes */ Index: xc/programs/Xserver/hw/kdrive/kxv.c diff -u /dev/null xc/programs/Xserver/hw/kdrive/kxv.c:1.1 --- /dev/null Mon Jun 4 12:40:16 2001 +++ xc/programs/Xserver/hw/kdrive/kxv.c Thu Mar 29 21:18:41 2001 @@ -0,0 +1,1784 @@ +/* + + XFree86 Xv DDX written by Mark Vojkovich (markv@valinux.com) + Adapted for KDrive by Pontus Lidman + + Copyright (C) 2000, 2001 - Nokia Home Communications + Copyright (C) 1998, 1999 - The XFree86 Project Inc. + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY +SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + +*/ + +/* $XFree86: xc/programs/Xserver/hw/kdrive/kxv.c,v 1.1 2001/03/30 02:18:41 keithp Exp $ */ + +#include "kdrive.h" + +#include "scrnintstr.h" +#include "regionstr.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "mivalidate.h" +#include "validate.h" +#include "resource.h" +#include "gcstruct.h" +#include "dixstruct.h" + +#include "Xv.h" +#include "Xvproto.h" + +#include "kxv.h" + + +/* XvScreenRec fields */ + +static Bool KdXVCloseScreen(int, ScreenPtr); +static int KdXVQueryAdaptors(ScreenPtr, XvAdaptorPtr *, int *); + +/* XvAdaptorRec fields */ + +static int KdXVAllocatePort(unsigned long, XvPortPtr, XvPortPtr*); +static int KdXVFreePort(XvPortPtr); +static int KdXVPutVideo(ClientPtr, DrawablePtr,XvPortPtr, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); +static int KdXVPutStill(ClientPtr, DrawablePtr,XvPortPtr, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); +static int KdXVGetVideo(ClientPtr, DrawablePtr,XvPortPtr, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); +static int KdXVGetStill(ClientPtr, DrawablePtr,XvPortPtr, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); +static int KdXVStopVideo(ClientPtr, XvPortPtr, DrawablePtr); +static int KdXVSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32); +static int KdXVGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32 *); +static int KdXVQueryBestSize(ClientPtr, XvPortPtr, CARD8, + CARD16, CARD16,CARD16, CARD16, + unsigned int*, unsigned int*); +static int KdXVPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16, + XvImagePtr, unsigned char*, Bool, + CARD16, CARD16); +static int KdXVQueryImageAttributes(ClientPtr, XvPortPtr, XvImagePtr, + CARD16*, CARD16*, int*, int*); + + +/* ScreenRec fields */ + +static Bool KdXVCreateWindow(WindowPtr pWin); +static Bool KdXVDestroyWindow(WindowPtr pWin); +static void KdXVWindowExposures(WindowPtr pWin, RegionPtr r1, RegionPtr r2); +static void KdXVClipNotify(WindowPtr pWin, int dx, int dy); + +/* KdCardInfo functions */ +static Bool KdXVEnable(ScreenPtr); +static void KdXVDisable(ScreenPtr); + +/* misc */ + +static Bool KdXVInitAdaptors(ScreenPtr, KdVideoAdaptorPtr*, int); + + +int KdXVWindowIndex = -1; +int KdXvScreenIndex = -1; +static unsigned long KdXVGeneration = 0; +static unsigned long PortResource = 0; + +int (*XvGetScreenIndexProc)(void) = XvGetScreenIndex; +unsigned long (*XvGetRTPortProc)(void) = XvGetRTPort; +int (*XvScreenInitProc)(ScreenPtr) = XvScreenInit; + +#define GET_XV_SCREEN(pScreen) \ + ((XvScreenPtr)((pScreen)->devPrivates[KdXvScreenIndex].ptr)) + +#define GET_KDXV_SCREEN(pScreen) \ + ((KdXVScreenPtr)(GET_XV_SCREEN(pScreen)->devPriv.ptr)) + +#define GET_KDXV_WINDOW(pWin) \ + ((KdXVWindowPtr)((pWin)->devPrivates[KdXVWindowIndex].ptr)) + +static KdXVInitGenericAdaptorPtr *GenDrivers = NULL; +static int NumGenDrivers = 0; + +int +KdXVRegisterGenericAdaptorDriver( + KdXVInitGenericAdaptorPtr InitFunc +){ + KdXVInitGenericAdaptorPtr *newdrivers; + +/* fprintf(stderr,"KdXVRegisterGenericAdaptorDriver\n"); */ + + newdrivers = xrealloc(GenDrivers, sizeof(KdXVInitGenericAdaptorPtr) * + (1 + NumGenDrivers)); + if (!newdrivers) + return 0; + GenDrivers = newdrivers; + + GenDrivers[NumGenDrivers++] = InitFunc; + + return 1; +} + +int +KdXVListGenericAdaptors( + KdScreenInfo * screen, + KdVideoAdaptorPtr **adaptors +){ + int i,j,n,num; + KdVideoAdaptorPtr *DrivAdap,*new; + + num = 0; + *adaptors = NULL; + for (i = 0; i < NumGenDrivers; i++) { + n = GenDrivers[i](screen,&DrivAdap); + if (0 == n) + continue; + new = xrealloc(*adaptors, sizeof(KdVideoAdaptorPtr) * (num+n)); + if (NULL == new) + continue; + *adaptors = new; + for (j = 0; j < n; j++, num++) + (*adaptors)[num] = DrivAdap[j]; + } + return num; +} + +KdVideoAdaptorPtr +KdXVAllocateVideoAdaptorRec(KdScreenInfo * screen) +{ + return xcalloc(1, sizeof(KdVideoAdaptorRec)); +} + +void +KdXVFreeVideoAdaptorRec(KdVideoAdaptorPtr ptr) +{ + xfree(ptr); +} + + +Bool +KdXVScreenInit( + ScreenPtr pScreen, + KdVideoAdaptorPtr *adaptors, + int num +){ + KdScreenPriv(pScreen); + KdCardInfo *card = pScreenPriv->card; + KdXVScreenPtr ScreenPriv; + XvScreenPtr pxvs; + +/* fprintf(stderr,"KdXVScreenInit initializing %d adaptors\n",num); */ + + if(KdXVGeneration != serverGeneration) { + if((KdXVWindowIndex = AllocateWindowPrivateIndex()) < 0) + return FALSE; + KdXVGeneration = serverGeneration; + } + + if(!AllocateWindowPrivate(pScreen,KdXVWindowIndex,sizeof(KdXVWindowRec))) + return FALSE; + + if(!XvGetScreenIndexProc || !XvGetRTPortProc || !XvScreenInitProc) + return FALSE; + + if(Success != (*XvScreenInitProc)(pScreen)) return FALSE; + + KdXvScreenIndex = (*XvGetScreenIndexProc)(); + PortResource = (*XvGetRTPortProc)(); + + pxvs = GET_XV_SCREEN(pScreen); + + + /* Anyone initializing the Xv layer must provide these two. + The Xv di layer calls them without even checking if they exist! */ + + pxvs->ddCloseScreen = KdXVCloseScreen; + pxvs->ddQueryAdaptors = KdXVQueryAdaptors; + + /* The Xv di layer provides us with a private hook so that we don't + have to allocate our own screen private. They also provide + a CloseScreen hook so that we don't have to wrap it. I'm not + sure that I appreciate that. */ + + ScreenPriv = xalloc(sizeof(KdXVScreenRec)); + pxvs->devPriv.ptr = (pointer)ScreenPriv; + + if(!ScreenPriv) return FALSE; + + + ScreenPriv->CreateWindow = pScreen->CreateWindow; + ScreenPriv->DestroyWindow = pScreen->DestroyWindow; + ScreenPriv->WindowExposures = pScreen->WindowExposures; + ScreenPriv->ClipNotify = pScreen->ClipNotify; + +/* fprintf(stderr,"XV: Wrapping screen & card funcs\n"); */ + + ScreenPriv->enable = card->cfuncs->enable; + ScreenPriv->disable = card->cfuncs->disable; + + pScreen->CreateWindow = KdXVCreateWindow; + pScreen->DestroyWindow = KdXVDestroyWindow; + pScreen->WindowExposures = KdXVWindowExposures; + pScreen->ClipNotify = KdXVClipNotify; + + card->cfuncs->disable = KdXVDisable; + card->cfuncs->enable = KdXVEnable; + + if(!KdXVInitAdaptors(pScreen, adaptors, num)) + return FALSE; + + return TRUE; +} + +static void +KdXVFreeAdaptor(XvAdaptorPtr pAdaptor) +{ + int i; + + if(pAdaptor->name) + xfree(pAdaptor->name); + + if(pAdaptor->pEncodings) { + XvEncodingPtr pEncode = pAdaptor->pEncodings; + + for(i = 0; i < pAdaptor->nEncodings; i++, pEncode++) { + if(pEncode->name) xfree(pEncode->name); + } + xfree(pAdaptor->pEncodings); + } + + if(pAdaptor->pFormats) + xfree(pAdaptor->pFormats); + + if(pAdaptor->pPorts) { + XvPortPtr pPort = pAdaptor->pPorts; + XvPortRecPrivatePtr pPriv; + + for(i = 0; i < pAdaptor->nPorts; i++, pPort++) { + pPriv = (XvPortRecPrivatePtr)pPort->devPriv.ptr; + if(pPriv) { + if(pPriv->clientClip) + REGION_DESTROY(pAdaptor->pScreen, pPriv->clientClip); + if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) + REGION_DESTROY(pAdaptor->pScreen, pPriv->pCompositeClip); + xfree(pPriv); + } + } + xfree(pAdaptor->pPorts); + } + + if(pAdaptor->nAttributes) { + XvAttributePtr pAttribute = pAdaptor->pAttributes; + + for(i = 0; i < pAdaptor->nAttributes; i++, pAttribute++) { + if(pAttribute->name) xfree(pAttribute->name); + } + + xfree(pAdaptor->pAttributes); + } + + if(pAdaptor->nImages) + xfree(pAdaptor->pImages); + + if(pAdaptor->devPriv.ptr) + xfree(pAdaptor->devPriv.ptr); +} + +static Bool +KdXVInitAdaptors( + ScreenPtr pScreen, + KdVideoAdaptorPtr *infoPtr, + int number +) { + KdScreenPriv(pScreen); + KdScreenInfo * screen = pScreenPriv->screen; + + XvScreenPtr pxvs = GET_XV_SCREEN(pScreen); + KdVideoAdaptorPtr adaptorPtr; + XvAdaptorPtr pAdaptor, pa; + XvAdaptorRecPrivatePtr adaptorPriv; + int na, numAdaptor; + XvPortRecPrivatePtr portPriv; + XvPortPtr pPort, pp; + int numPort; + KdAttributePtr attributePtr; + XvAttributePtr pAttribute, pat; + KdVideoFormatPtr formatPtr; + XvFormatPtr pFormat, pf; + int numFormat, totFormat; + KdVideoEncodingPtr encodingPtr; + XvEncodingPtr pEncode, pe; + KdImagePtr imagePtr; + XvImagePtr pImage, pi; + int numVisuals; + VisualPtr pVisual; + int i; + + pxvs->nAdaptors = 0; + pxvs->pAdaptors = NULL; + + if(!(pAdaptor = xcalloc(number, sizeof(XvAdaptorRec)))) + return FALSE; + + for(pa = pAdaptor, na = 0, numAdaptor = 0; na < number; na++, adaptorPtr++) { + adaptorPtr = infoPtr[na]; + + if(!adaptorPtr->StopVideo || !adaptorPtr->SetPortAttribute || + !adaptorPtr->GetPortAttribute || !adaptorPtr->QueryBestSize) + continue; + + /* client libs expect at least one encoding */ + if(!adaptorPtr->nEncodings || !adaptorPtr->pEncodings) + continue; + + pa->type = adaptorPtr->type; + + if(!adaptorPtr->PutVideo && !adaptorPtr->GetVideo) + pa->type &= ~XvVideoMask; + + if(!adaptorPtr->PutStill && !adaptorPtr->GetStill) + pa->type &= ~XvStillMask; + + if(!adaptorPtr->PutImage || !adaptorPtr->QueryImageAttributes) + pa->type &= ~XvImageMask; + + if(!adaptorPtr->PutVideo && !adaptorPtr->PutImage && + !adaptorPtr->PutStill) + pa->type &= ~XvInputMask; + + if(!adaptorPtr->GetVideo && !adaptorPtr->GetStill) + pa->type &= ~XvOutputMask; + + if(!(adaptorPtr->type & (XvPixmapMask | XvWindowMask))) + continue; + if(!(adaptorPtr->type & (XvImageMask | XvVideoMask | XvStillMask))) + continue; + + pa->pScreen = pScreen; + pa->ddAllocatePort = KdXVAllocatePort; + pa->ddFreePort = KdXVFreePort; + pa->ddPutVideo = KdXVPutVideo; + pa->ddPutStill = KdXVPutStill; + pa->ddGetVideo = KdXVGetVideo; + pa->ddGetStill = KdXVGetStill; + pa->ddStopVideo = KdXVStopVideo; + pa->ddPutImage = KdXVPutImage; + pa->ddSetPortAttribute = KdXVSetPortAttribute; + pa->ddGetPortAttribute = KdXVGetPortAttribute; + pa->ddQueryBestSize = KdXVQueryBestSize; + pa->ddQueryImageAttributes = KdXVQueryImageAttributes; + if((pa->name = xalloc(strlen(adaptorPtr->name) + 1))) + strcpy(pa->name, adaptorPtr->name); + + if(adaptorPtr->nEncodings && + (pEncode = xcalloc(adaptorPtr->nEncodings, sizeof(XvEncodingRec)))) { + + for(pe = pEncode, encodingPtr = adaptorPtr->pEncodings, i = 0; + i < adaptorPtr->nEncodings; pe++, i++, encodingPtr++) + { + pe->id = encodingPtr->id; + pe->pScreen = pScreen; + if((pe->name = xalloc(strlen(encodingPtr->name) + 1))) + strcpy(pe->name, encodingPtr->name); + pe->width = encodingPtr->width; + pe->height = encodingPtr->height; + pe->rate.numerator = encodingPtr->rate.numerator; + pe->rate.denominator = encodingPtr->rate.denominator; + } + pa->nEncodings = adaptorPtr->nEncodings; + pa->pEncodings = pEncode; + } + + if(adaptorPtr->nImages && + (pImage = xcalloc(adaptorPtr->nImages, sizeof(XvImageRec)))) { + + for(i = 0, pi = pImage, imagePtr = adaptorPtr->pImages; + i < adaptorPtr->nImages; i++, pi++, imagePtr++) + { + pi->id = imagePtr->id; + pi->type = imagePtr->type; + pi->byte_order = imagePtr->byte_order; + memcpy(pi->guid, imagePtr->guid, 16); + pi->bits_per_pixel = imagePtr->bits_per_pixel; + pi->format = imagePtr->format; + pi->num_planes = imagePtr->num_planes; + pi->depth = imagePtr->depth; + pi->red_mask = imagePtr->red_mask; + pi->green_mask = imagePtr->green_mask; + pi->blue_mask = imagePtr->blue_mask; + pi->y_sample_bits = imagePtr->y_sample_bits; + pi->u_sample_bits = imagePtr->u_sample_bits; + pi->v_sample_bits = imagePtr->v_sample_bits; + pi->horz_y_period = imagePtr->horz_y_period; + pi->horz_u_period = imagePtr->horz_u_period; + pi->horz_v_period = imagePtr->horz_v_period; + pi->vert_y_period = imagePtr->vert_y_period; + pi->vert_u_period = imagePtr->vert_u_period; + pi->vert_v_period = imagePtr->vert_v_period; + memcpy(pi->component_order, imagePtr->component_order, 32); + pi->scanline_order = imagePtr->scanline_order; + } + pa->nImages = adaptorPtr->nImages; + pa->pImages = pImage; + } + + if(adaptorPtr->nAttributes && + (pAttribute = xcalloc(adaptorPtr->nAttributes, sizeof(XvAttributeRec)))) + { + for(pat = pAttribute, attributePtr = adaptorPtr->pAttributes, i = 0; + i < adaptorPtr->nAttributes; pat++, i++, attributePtr++) + { + pat->flags = attributePtr->flags; + pat->min_value = attributePtr->min_value; + pat->max_value = attributePtr->max_value; + if((pat->name = xalloc(strlen(attributePtr->name) + 1))) + strcpy(pat->name, attributePtr->name); + } + pa->nAttributes = adaptorPtr->nAttributes; + pa->pAttributes = pAttribute; + } + + + totFormat = adaptorPtr->nFormats; + + if(!(pFormat = xcalloc(totFormat, sizeof(XvFormatRec)))) { + KdXVFreeAdaptor(pa); + continue; + } + for(pf = pFormat, i = 0, numFormat = 0, formatPtr = adaptorPtr->pFormats; + i < adaptorPtr->nFormats; i++, formatPtr++) + { + numVisuals = pScreen->numVisuals; + pVisual = pScreen->visuals; + + while(numVisuals--) { + if((pVisual->class == formatPtr->class) && + (pVisual->nplanes == formatPtr->depth)) { + + if(numFormat >= totFormat) { + void *moreSpace; + totFormat *= 2; + moreSpace = xrealloc(pFormat, + totFormat * sizeof(XvFormatRec)); + if(!moreSpace) break; + pFormat = moreSpace; + pf = pFormat + numFormat; + } + + pf->visual = pVisual->vid; + pf->depth = formatPtr->depth; + + pf++; + numFormat++; + } + pVisual++; + } + } + pa->nFormats = numFormat; + pa->pFormats = pFormat; + if(!numFormat) { + KdXVFreeAdaptor(pa); + continue; + } + + if(!(adaptorPriv = xcalloc(1, sizeof(XvAdaptorRecPrivate)))) { + KdXVFreeAdaptor(pa); + continue; + } + + adaptorPriv->flags = adaptorPtr->flags; + adaptorPriv->PutVideo = adaptorPtr->PutVideo; + adaptorPriv->PutStill = adaptorPtr->PutStill; + adaptorPriv->GetVideo = adaptorPtr->GetVideo; + adaptorPriv->GetStill = adaptorPtr->GetStill; + adaptorPriv->StopVideo = adaptorPtr->StopVideo; + adaptorPriv->SetPortAttribute = adaptorPtr->SetPortAttribute; + adaptorPriv->GetPortAttribute = adaptorPtr->GetPortAttribute; + adaptorPriv->QueryBestSize = adaptorPtr->QueryBestSize; + adaptorPriv->QueryImageAttributes = adaptorPtr->QueryImageAttributes; + adaptorPriv->PutImage = adaptorPtr->PutImage; + adaptorPriv->ReputImage = adaptorPtr->ReputImage; + + pa->devPriv.ptr = (pointer)adaptorPriv; + + if(!(pPort = xcalloc(adaptorPtr->nPorts, sizeof(XvPortRec)))) { + KdXVFreeAdaptor(pa); + continue; + } + for(pp = pPort, i = 0, numPort = 0; + i < adaptorPtr->nPorts; i++) { + + if(!(pp->id = FakeClientID(0))) + continue; + + if(!(portPriv = xcalloc(1, sizeof(XvPortRecPrivate)))) + continue; + + if(!AddResource(pp->id, PortResource, pp)) { + xfree(portPriv); + continue; + } + + pp->pAdaptor = pa; + pp->pNotify = (XvPortNotifyPtr)NULL; + pp->pDraw = (DrawablePtr)NULL; + pp->client = (ClientPtr)NULL; + pp->grab.client = (ClientPtr)NULL; + pp->time = currentTime; + pp->devPriv.ptr = portPriv; + + portPriv->screen = screen; + portPriv->AdaptorRec = adaptorPriv; + portPriv->DevPriv.ptr = adaptorPtr->pPortPrivates[i].ptr; + + pp++; + numPort++; + } + pa->nPorts = numPort; + pa->pPorts = pPort; + if(!numPort) { + KdXVFreeAdaptor(pa); + continue; + } + + pa->base_id = pPort->id; + + pa++; + numAdaptor++; + } + + if(numAdaptor) { + pxvs->nAdaptors = numAdaptor; + pxvs->pAdaptors = pAdaptor; + } else { + xfree(pAdaptor); + return FALSE; + } + + return TRUE; +} + +/* Video should be clipped to the intersection of the window cliplist + and the client cliplist specified in the GC for which the video was + initialized. When we need to reclip a window, the GC that started + the video may not even be around anymore. That's why we save the + client clip from the GC when the video is initialized. We then + use KdXVUpdateCompositeClip to calculate the new composite clip + when we need it. This is different from what DEC did. They saved + the GC and used it's clip list when they needed to reclip the window, + even if the client clip was different from the one the video was + initialized with. If the original GC was destroyed, they had to stop + the video. I like the new method better (MArk). + + This function only works for windows. Will need to rewrite when + (if) we support pixmap rendering. +*/ + +static void +KdXVUpdateCompositeClip(XvPortRecPrivatePtr portPriv) +{ + RegionPtr pregWin, pCompositeClip; + WindowPtr pWin; + Bool freeCompClip = FALSE; + + if(portPriv->pCompositeClip) + return; + + pWin = (WindowPtr)portPriv->pDraw; + + /* get window clip list */ + if(portPriv->subWindowMode == IncludeInferiors) { + pregWin = NotClippedByChildren(pWin); + freeCompClip = TRUE; + } else + pregWin = &pWin->clipList; + + if(!portPriv->clientClip) { + portPriv->pCompositeClip = pregWin; + portPriv->FreeCompositeClip = freeCompClip; + return; + } + + pCompositeClip = REGION_CREATE(pWin->pScreen, NullBox, 1); + REGION_COPY(pWin->pScreen, pCompositeClip, portPriv->clientClip); + REGION_TRANSLATE(pWin->pScreen, pCompositeClip, + portPriv->pDraw->x + portPriv->clipOrg.x, + portPriv->pDraw->y + portPriv->clipOrg.y); + REGION_INTERSECT(pWin->pScreen, pCompositeClip, pregWin, pCompositeClip); + + portPriv->pCompositeClip = pCompositeClip; + portPriv->FreeCompositeClip = TRUE; + + if(freeCompClip) { + REGION_DESTROY(pWin->pScreen, pregWin); + } +} + +/* Save the current clientClip and update the CompositeClip whenever + we have a fresh GC */ + +static void +KdXVCopyClip( + XvPortRecPrivatePtr portPriv, + GCPtr pGC +){ + /* copy the new clip if it exists */ + if((pGC->clientClipType == CT_REGION) && pGC->clientClip) { + if(!portPriv->clientClip) + portPriv->clientClip = REGION_CREATE(pGC->pScreen, NullBox, 1); + /* Note: this is in window coordinates */ + REGION_COPY(pGC->pScreen, portPriv->clientClip, pGC->clientClip); + } else if(portPriv->clientClip) { /* free the old clientClip */ + REGION_DESTROY(pGC->pScreen, portPriv->clientClip); + portPriv->clientClip = NULL; + } + + /* get rid of the old clip list */ + if(portPriv->pCompositeClip && portPriv->FreeCompositeClip) { + REGION_DESTROY(pWin->pScreen, portPriv->pCompositeClip); + } + + portPriv->clipOrg = pGC->clipOrg; + portPriv->pCompositeClip = pGC->pCompositeClip; + portPriv->FreeCompositeClip = FALSE; + portPriv->subWindowMode = pGC->subWindowMode; +} + +static int +KdXVRegetVideo(XvPortRecPrivatePtr portPriv) +{ + RegionRec WinRegion; + RegionRec ClipRegion; + BoxRec WinBox; + ScreenPtr pScreen = portPriv->pDraw->pScreen; + int ret = Success; + Bool clippedAway = FALSE; + + KdXVUpdateCompositeClip(portPriv); + + /* translate the video region to the screen */ + WinBox.x1 = portPriv->pDraw->x + portPriv->drw_x; + WinBox.y1 = portPriv->pDraw->y + portPriv->drw_y; + WinBox.x2 = WinBox.x1 + portPriv->drw_w; + WinBox.y2 = WinBox.y1 + portPriv->drw_h; + + /* clip to the window composite clip */ + REGION_INIT(pScreen, &WinRegion, &WinBox, 1); + REGION_INIT(pScreen, &ClipRegion, NullBox, 1); + REGION_INTERSECT(Screen, &ClipRegion, &WinRegion, portPriv->pCompositeClip); + + /* that's all if it's totally obscured */ + if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + clippedAway = TRUE; + goto CLIP_VIDEO_BAILOUT; + } + + if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { + REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + } + + ret = (*portPriv->AdaptorRec->GetVideo)(portPriv->screen, + portPriv->vid_x, portPriv->vid_y, + WinBox.x1, WinBox.y1, + portPriv->vid_w, portPriv->vid_h, + portPriv->drw_w, portPriv->drw_h, + &ClipRegion, portPriv->DevPriv.ptr); + + if(ret == Success) + portPriv->isOn = XV_ON; + +CLIP_VIDEO_BAILOUT: + + if((clippedAway || (ret != Success)) && portPriv->isOn == XV_ON) { + (*portPriv->AdaptorRec->StopVideo)( + portPriv->screen, portPriv->DevPriv.ptr, FALSE); + portPriv->isOn = XV_PENDING; + } + + /* This clip was copied and only good for one shot */ + if(!portPriv->FreeCompositeClip) + portPriv->pCompositeClip = NULL; + + REGION_UNINIT(pScreen, &WinRegion); + REGION_UNINIT(pScreen, &ClipRegion); + + return ret; +} + + +static int +KdXVReputVideo(XvPortRecPrivatePtr portPriv) +{ + RegionRec WinRegion; + RegionRec ClipRegion; + BoxRec WinBox; + ScreenPtr pScreen = portPriv->pDraw->pScreen; + KdScreenPriv(pScreen); + KdScreenInfo *screen=pScreenPriv->screen; + int ret = Success; + Bool clippedAway = FALSE; + + KdXVUpdateCompositeClip(portPriv); + + /* translate the video region to the screen */ + WinBox.x1 = portPriv->pDraw->x + portPriv->drw_x; + WinBox.y1 = portPriv->pDraw->y + portPriv->drw_y; + WinBox.x2 = WinBox.x1 + portPriv->drw_w; + WinBox.y2 = WinBox.y1 + portPriv->drw_h; + + /* clip to the window composite clip */ + REGION_INIT(pScreen, &WinRegion, &WinBox, 1); + REGION_INIT(pScreen, &ClipRegion, NullBox, 1); + REGION_INTERSECT(Screen, &ClipRegion, &WinRegion, portPriv->pCompositeClip); + + /* clip and translate to the viewport */ + if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { + RegionRec VPReg; + BoxRec VPBox; + + VPBox.x1 = 0; + VPBox.y1 = 0; + VPBox.x2 = screen->width; + VPBox.y2 = screen->height; + + REGION_INIT(pScreen, &VPReg, &VPBox, 1); + REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg); + REGION_UNINIT(pScreen, &VPReg); + } + + /* that's all if it's totally obscured */ + if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + clippedAway = TRUE; + goto CLIP_VIDEO_BAILOUT; + } + + /* bailout if we have to clip but the hardware doesn't support it */ + if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { + BoxPtr clipBox = REGION_RECTS(&ClipRegion); + if( (REGION_NUM_RECTS(&ClipRegion) != 1) || + (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || + (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) + { + clippedAway = TRUE; + goto CLIP_VIDEO_BAILOUT; + } + } + + if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { + REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + } + + ret = (*portPriv->AdaptorRec->PutVideo)(portPriv->screen, + portPriv->vid_x, portPriv->vid_y, + WinBox.x1, WinBox.y1, + portPriv->vid_w, portPriv->vid_h, + portPriv->drw_w, portPriv->drw_h, + &ClipRegion, portPriv->DevPriv.ptr); + + if(ret == Success) portPriv->isOn = XV_ON; + +CLIP_VIDEO_BAILOUT: + + if((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) { + (*portPriv->AdaptorRec->StopVideo)( + portPriv->screen, portPriv->DevPriv.ptr, FALSE); + portPriv->isOn = XV_PENDING; + } + + /* This clip was copied and only good for one shot */ + if(!portPriv->FreeCompositeClip) + portPriv->pCompositeClip = NULL; + + REGION_UNINIT(pScreen, &WinRegion); + REGION_UNINIT(pScreen, &ClipRegion); + + return ret; +} + +static int +KdXVReputImage(XvPortRecPrivatePtr portPriv) +{ + RegionRec WinRegion; + RegionRec ClipRegion; + BoxRec WinBox; + ScreenPtr pScreen = portPriv->pDraw->pScreen; + KdScreenPriv(pScreen); + KdScreenInfo *screen=pScreenPriv->screen; + int ret = Success; + Bool clippedAway = FALSE; + + KdXVUpdateCompositeClip(portPriv); + + /* translate the video region to the screen */ + WinBox.x1 = portPriv->pDraw->x + portPriv->drw_x; + WinBox.y1 = portPriv->pDraw->y + portPriv->drw_y; + WinBox.x2 = WinBox.x1 + portPriv->drw_w; + WinBox.y2 = WinBox.y1 + portPriv->drw_h; + + /* clip to the window composite clip */ + REGION_INIT(pScreen, &WinRegion, &WinBox, 1); + REGION_INIT(pScreen, &ClipRegion, NullBox, 1); + REGION_INTERSECT(Screen, &ClipRegion, &WinRegion, portPriv->pCompositeClip); + + /* clip and translate to the viewport */ + if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { + RegionRec VPReg; + BoxRec VPBox; + + VPBox.x1 = 0; + VPBox.y1 = 0; + VPBox.x2 = screen->width; + VPBox.y2 = screen->height; + + REGION_INIT(pScreen, &VPReg, &VPBox, 1); + REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg); + REGION_UNINIT(pScreen, &VPReg); + } + + /* that's all if it's totally obscured */ + if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + clippedAway = TRUE; + goto CLIP_VIDEO_BAILOUT; + } + + /* bailout if we have to clip but the hardware doesn't support it */ + if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { + BoxPtr clipBox = REGION_RECTS(&ClipRegion); + if( (REGION_NUM_RECTS(&ClipRegion) != 1) || + (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || + (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) + { + clippedAway = TRUE; + goto CLIP_VIDEO_BAILOUT; + } + } + + if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { + REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + } + + ret = (*portPriv->AdaptorRec->ReputImage)(portPriv->screen, + WinBox.x1, WinBox.y1, + &ClipRegion, portPriv->DevPriv.ptr); + + portPriv->isOn = (ret == Success) ? XV_ON : XV_OFF; + +CLIP_VIDEO_BAILOUT: + + if((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) { + (*portPriv->AdaptorRec->StopVideo)( + portPriv->screen, portPriv->DevPriv.ptr, FALSE); + portPriv->isOn = XV_PENDING; + } + + /* This clip was copied and only good for one shot */ + if(!portPriv->FreeCompositeClip) + portPriv->pCompositeClip = NULL; + + REGION_UNINIT(pScreen, &WinRegion); + REGION_UNINIT(pScreen, &ClipRegion); + + return ret; +} + + +static int +KdXVReputAllVideo(WindowPtr pWin, pointer data) +{ + KdXVWindowPtr WinPriv = GET_KDXV_WINDOW(pWin); + + while(WinPriv) { + if(WinPriv->PortRec->type == XvInputMask) + KdXVReputVideo(WinPriv->PortRec); + else + KdXVRegetVideo(WinPriv->PortRec); + WinPriv = WinPriv->next; + } + + return WT_WALKCHILDREN; +} + +static int +KdXVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) +{ + KdXVWindowPtr winPriv, PrivRoot; + + winPriv = PrivRoot = GET_KDXV_WINDOW(pWin); + + /* Enlist our port in the window private */ + while(winPriv) { + if(winPriv->PortRec == portPriv) /* we're already listed */ + break; + winPriv = winPriv->next; + } + + if(!winPriv) { + winPriv = xalloc(sizeof(KdXVWindowRec)); + if(!winPriv) return BadAlloc; + winPriv->PortRec = portPriv; + winPriv->next = PrivRoot; + pWin->devPrivates[KdXVWindowIndex].ptr = (pointer)winPriv; + } + return Success; +} + + +static void +KdXVRemovePortFromWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) +{ + KdXVWindowPtr winPriv, prevPriv = NULL; + + winPriv = GET_KDXV_WINDOW(pWin); + + while(winPriv) { + if(winPriv->PortRec == portPriv) { + if(prevPriv) + prevPriv->next = winPriv->next; + else + pWin->devPrivates[KdXVWindowIndex].ptr = + (pointer)winPriv->next; + xfree(winPriv); + break; + } + prevPriv = winPriv; + winPriv = winPriv->next; + } + portPriv->pDraw = NULL; +} + +/**** ScreenRec fields ****/ + + +static Bool +KdXVCreateWindow(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen); + int ret; + + pScreen->CreateWindow = ScreenPriv->CreateWindow; + ret = (*pScreen->CreateWindow)(pWin); + pScreen->CreateWindow = KdXVCreateWindow; + + if(ret) pWin->devPrivates[KdXVWindowIndex].ptr = NULL; + + return ret; +} + + +static Bool +KdXVDestroyWindow(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen); + KdXVWindowPtr tmp, WinPriv = GET_KDXV_WINDOW(pWin); + int ret; + + while(WinPriv) { + XvPortRecPrivatePtr pPriv = WinPriv->PortRec; + + if(pPriv->isOn > XV_OFF) { + (*pPriv->AdaptorRec->StopVideo)( + pPriv->screen, pPriv->DevPriv.ptr, TRUE); + pPriv->isOn = XV_OFF; + } + + pPriv->pDraw = NULL; + tmp = WinPriv; + WinPriv = WinPriv->next; + xfree(tmp); + } + + pWin->devPrivates[KdXVWindowIndex].ptr = NULL; + + pScreen->DestroyWindow = ScreenPriv->DestroyWindow; + ret = (*pScreen->DestroyWindow)(pWin); + pScreen->DestroyWindow = KdXVDestroyWindow; + + return ret; +} + + +static void +KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen); + KdXVWindowPtr WinPriv = GET_KDXV_WINDOW(pWin); + KdXVWindowPtr pPrev; + XvPortRecPrivatePtr pPriv; + Bool AreasExposed; + + AreasExposed = (WinPriv && reg1 && REGION_NOTEMPTY(pScreen, reg1)); + + pScreen->WindowExposures = ScreenPriv->WindowExposures; + (*pScreen->WindowExposures)(pWin, reg1, reg2); + pScreen->WindowExposures = KdXVWindowExposures; + + /* filter out XClearWindow/Area */ + if (!pWin->valdata) return; + + pPrev = NULL; + + while(WinPriv) { + pPriv = WinPriv->PortRec; + + /* Reput anyone with a reput function */ + + switch(pPriv->type) { + case XvInputMask: + KdXVReputVideo(pPriv); + break; + case XvOutputMask: + KdXVRegetVideo(pPriv); + break; + default: /* overlaid still/image*/ + if (pPriv->AdaptorRec->ReputImage) + KdXVReputImage(pPriv); + else if(AreasExposed) { + KdXVWindowPtr tmp; + + if (pPriv->isOn == XV_ON) { + (*pPriv->AdaptorRec->StopVideo)( + pPriv->screen, pPriv->DevPriv.ptr, FALSE); + pPriv->isOn = XV_PENDING; + } + pPriv->pDraw = NULL; + + if(!pPrev) + pWin->devPrivates[KdXVWindowIndex].ptr = + (pointer)(WinPriv->next); + else + pPrev->next = WinPriv->next; + tmp = WinPriv; + WinPriv = WinPriv->next; + xfree(tmp); + continue; + } + break; + } + pPrev = WinPriv; + WinPriv = WinPriv->next; + } +} + + +static void +KdXVClipNotify(WindowPtr pWin, int dx, int dy) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen); + KdXVWindowPtr WinPriv = GET_KDXV_WINDOW(pWin); + KdXVWindowPtr tmp, pPrev = NULL; + XvPortRecPrivatePtr pPriv; + Bool visible = (pWin->visibility == VisibilityUnobscured) || + (pWin->visibility == VisibilityPartiallyObscured); + + while(WinPriv) { + pPriv = WinPriv->PortRec; + + if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) + REGION_DESTROY(pScreen, pPriv->pCompositeClip); + + pPriv->pCompositeClip = NULL; + + /* Stop everything except images, but stop them too if the + window isn't visible. But we only remove the images. */ + + if(pPriv->type || !visible) { + if(pPriv->isOn == XV_ON) { + (*pPriv->AdaptorRec->StopVideo)( + pPriv->screen, pPriv->DevPriv.ptr, FALSE); + pPriv->isOn = XV_PENDING; + } + + if(!pPriv->type) { /* overlaid still/image */ + pPriv->pDraw = NULL; + + if(!pPrev) + pWin->devPrivates[KdXVWindowIndex].ptr = + (pointer)(WinPriv->next); + else + pPrev->next = WinPriv->next; + tmp = WinPriv; + WinPriv = WinPriv->next; + xfree(tmp); + continue; + } + } + + pPrev = WinPriv; + WinPriv = WinPriv->next; + } + + if(ScreenPriv->ClipNotify) { + pScreen->ClipNotify = ScreenPriv->ClipNotify; + (*pScreen->ClipNotify)(pWin, dx, dy); + pScreen->ClipNotify = KdXVClipNotify; + } +} + + + +/**** Required XvScreenRec fields ****/ + +static Bool +KdXVCloseScreen(int i, ScreenPtr pScreen) +{ + KdScreenPriv(pScreen); + KdCardInfo *card = pScreenPriv->card; + KdScreenInfo *screen=pScreenPriv->screen; + XvScreenPtr pxvs = GET_XV_SCREEN(pScreen); + KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen); + XvAdaptorPtr pa; + int c; + + if(!ScreenPriv) return TRUE; + + pScreen->CreateWindow = ScreenPriv->CreateWindow; + pScreen->DestroyWindow = ScreenPriv->DestroyWindow; + pScreen->WindowExposures = ScreenPriv->WindowExposures; + pScreen->ClipNotify = ScreenPriv->ClipNotify; + +/* fprintf(stderr,"XV: Unwrapping screen & card funcs\n"); */ + + card->cfuncs->enable = ScreenPriv->enable; + card->cfuncs->disable = ScreenPriv->disable; + + for(c = 0, pa = pxvs->pAdaptors; c < pxvs->nAdaptors; c++, pa++) { + KdXVFreeAdaptor(pa); + } + + if(pxvs->pAdaptors) + xfree(pxvs->pAdaptors); + + xfree(ScreenPriv); + + + return TRUE; +} + + +static int +KdXVQueryAdaptors( + ScreenPtr pScreen, + XvAdaptorPtr *p_pAdaptors, + int *p_nAdaptors +){ + XvScreenPtr pxvs = GET_XV_SCREEN(pScreen); + + *p_nAdaptors = pxvs->nAdaptors; + *p_pAdaptors = pxvs->pAdaptors; + + return (Success); +} + +static Bool +KdXVEnable(ScreenPtr pScreen) +{ + static int count=0; + KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen); + Bool ret; + + ret = (*ScreenPriv->enable)(pScreen); + + if(ret) WalkTree(pScreen, KdXVReputAllVideo, 0); + + return ret; +} + +static void +KdXVDisable(ScreenPtr pScreen) +{ + XvScreenPtr pxvs = GET_XV_SCREEN(pScreen); + KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen); + XvAdaptorPtr pAdaptor; + XvPortPtr pPort; + XvPortRecPrivatePtr pPriv; + int i, j; + + for(i = 0; i < pxvs->nAdaptors; i++) { + pAdaptor = &pxvs->pAdaptors[i]; + for(j = 0; j < pAdaptor->nPorts; j++) { + pPort = &pAdaptor->pPorts[j]; + pPriv = (XvPortRecPrivatePtr)pPort->devPriv.ptr; + if(pPriv->isOn > XV_OFF) { + + (*pPriv->AdaptorRec->StopVideo)( + pPriv->screen, pPriv->DevPriv.ptr, TRUE); + pPriv->isOn = XV_OFF; + + if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) + REGION_DESTROY(pScreen, pPriv->pCompositeClip); + + pPriv->pCompositeClip = NULL; + + if(!pPriv->type && pPriv->pDraw) { /* still */ + KdXVRemovePortFromWindow((WindowPtr)pPriv->pDraw, pPriv); + } + } + } + } + + (*ScreenPriv->disable)(pScreen); +} + +/**** XvAdaptorRec fields ****/ + +static int +KdXVAllocatePort( + unsigned long port, + XvPortPtr pPort, + XvPortPtr *ppPort +){ + *ppPort = pPort; + return Success; +} + +static int +KdXVFreePort(XvPortPtr pPort) +{ + return Success; +} + +static int +KdXVPutVideo( + ClientPtr client, + DrawablePtr pDraw, + XvPortPtr pPort, + GCPtr pGC, + INT16 vid_x, INT16 vid_y, + CARD16 vid_w, CARD16 vid_h, + INT16 drw_x, INT16 drw_y, + CARD16 drw_w, CARD16 drw_h +){ + XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr); + KdScreenPriv(portPriv->screen->pScreen); + int result; + + /* No dumping video to pixmaps... For now anyhow */ + if(pDraw->type != DRAWABLE_WINDOW) { + pPort->pDraw = (DrawablePtr)NULL; + return BadAlloc; + } + + /* If we are changing windows, unregister our port in the old window */ + if(portPriv->pDraw && (portPriv->pDraw != pDraw)) + KdXVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv); + + /* Register our port with the new window */ + result = KdXVEnlistPortInWindow((WindowPtr)pDraw, portPriv); + if(result != Success) return result; + + portPriv->pDraw = pDraw; + portPriv->type = XvInputMask; + + /* save a copy of these parameters */ + portPriv->vid_x = vid_x; portPriv->vid_y = vid_y; + portPriv->vid_w = vid_w; portPriv->vid_h = vid_h; + portPriv->drw_x = drw_x; portPriv->drw_y = drw_y; + portPriv->drw_w = drw_w; portPriv->drw_h = drw_h; + + /* make sure we have the most recent copy of the clientClip */ + KdXVCopyClip(portPriv, pGC); + + /* To indicate to the DI layer that we were successful */ + pPort->pDraw = pDraw; + + if (!pScreenPriv->enabled) return Success; + + return(KdXVReputVideo(portPriv)); +} + +static int +KdXVPutStill( + ClientPtr client, + DrawablePtr pDraw, + XvPortPtr pPort, + GCPtr pGC, + INT16 vid_x, INT16 vid_y, + CARD16 vid_w, CARD16 vid_h, + INT16 drw_x, INT16 drw_y, + CARD16 drw_w, CARD16 drw_h +){ + XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr); + ScreenPtr pScreen = pDraw->pScreen; + KdScreenPriv(pScreen); + KdScreenInfo *screen=pScreenPriv->screen; + RegionRec WinRegion; + RegionRec ClipRegion; + BoxRec WinBox; + int ret = Success; + Bool clippedAway = FALSE; + + if (pDraw->type != DRAWABLE_WINDOW) + return BadAlloc; + + if (!pScreenPriv->enabled) return Success; + + WinBox.x1 = pDraw->x + drw_x; + WinBox.y1 = pDraw->y + drw_y; + WinBox.x2 = WinBox.x1 + drw_w; + WinBox.y2 = WinBox.y1 + drw_h; + + REGION_INIT(pScreen, &WinRegion, &WinBox, 1); + REGION_INIT(pScreen, &ClipRegion, NullBox, 1); + REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip); + + if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { + RegionRec VPReg; + BoxRec VPBox; + + VPBox.x1 = 0; + VPBox.y1 = 0; + VPBox.x2 = screen->width; + VPBox.y2 = screen->height; + + REGION_INIT(pScreen, &VPReg, &VPBox, 1); + REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg); + REGION_UNINIT(pScreen, &VPReg); + } + + if(portPriv->pDraw) { + KdXVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv); + } + + if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + clippedAway = TRUE; + goto PUT_STILL_BAILOUT; + } + + if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { + BoxPtr clipBox = REGION_RECTS(&ClipRegion); + if( (REGION_NUM_RECTS(&ClipRegion) != 1) || + (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || + (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) + { + clippedAway = TRUE; + goto PUT_STILL_BAILOUT; + } + } + + if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { + REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + } + + ret = (*portPriv->AdaptorRec->PutStill)(portPriv->screen, + vid_x, vid_y, WinBox.x1, WinBox.y1, + vid_w, vid_h, drw_w, drw_h, + &ClipRegion, portPriv->DevPriv.ptr); + + if((ret == Success) && + (portPriv->AdaptorRec->flags & VIDEO_OVERLAID_STILLS)) { + + KdXVEnlistPortInWindow((WindowPtr)pDraw, portPriv); + portPriv->isOn = XV_ON; + portPriv->pDraw = pDraw; + portPriv->drw_x = drw_x; portPriv->drw_y = drw_y; + portPriv->drw_w = drw_w; portPriv->drw_h = drw_h; + portPriv->type = 0; /* no mask means it's transient and should + not be reput once it's removed */ + pPort->pDraw = pDraw; /* make sure we can get stop requests */ + } + +PUT_STILL_BAILOUT: + + if((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) { + (*portPriv->AdaptorRec->StopVideo)( + portPriv->screen, portPriv->DevPriv.ptr, FALSE); + portPriv->isOn = XV_PENDING; + } + + REGION_UNINIT(pScreen, &WinRegion); + REGION_UNINIT(pScreen, &ClipRegion); + + return ret; +} + +static int +KdXVGetVideo( + ClientPtr client, + DrawablePtr pDraw, + XvPortPtr pPort, + GCPtr pGC, + INT16 vid_x, INT16 vid_y, + CARD16 vid_w, CARD16 vid_h, + INT16 drw_x, INT16 drw_y, + CARD16 drw_w, CARD16 drw_h +){ + XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr); + int result; + KdScreenPriv(portPriv->screen->pScreen); + + /* No pixmaps... For now anyhow */ + if(pDraw->type != DRAWABLE_WINDOW) { + pPort->pDraw = (DrawablePtr)NULL; + return BadAlloc; + } + + /* If we are changing windows, unregister our port in the old window */ + if(portPriv->pDraw && (portPriv->pDraw != pDraw)) + KdXVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv); + + /* Register our port with the new window */ + result = KdXVEnlistPortInWindow((WindowPtr)pDraw, portPriv); + if(result != Success) return result; + + portPriv->pDraw = pDraw; + portPriv->type = XvOutputMask; + + /* save a copy of these parameters */ + portPriv->vid_x = vid_x; portPriv->vid_y = vid_y; + portPriv->vid_w = vid_w; portPriv->vid_h = vid_h; + portPriv->drw_x = drw_x; portPriv->drw_y = drw_y; + portPriv->drw_w = drw_w; portPriv->drw_h = drw_h; + + /* make sure we have the most recent copy of the clientClip */ + KdXVCopyClip(portPriv, pGC); + + /* To indicate to the DI layer that we were successful */ + pPort->pDraw = pDraw; + + if(!pScreenPriv->enabled) return Success; + + return(KdXVRegetVideo(portPriv)); +} + +static int +KdXVGetStill( + ClientPtr client, + DrawablePtr pDraw, + XvPortPtr pPort, + GCPtr pGC, + INT16 vid_x, INT16 vid_y, + CARD16 vid_w, CARD16 vid_h, + INT16 drw_x, INT16 drw_y, + CARD16 drw_w, CARD16 drw_h +){ + XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr); + ScreenPtr pScreen = pDraw->pScreen; + KdScreenPriv(pScreen); + RegionRec WinRegion; + RegionRec ClipRegion; + BoxRec WinBox; + int ret = Success; + Bool clippedAway = FALSE; + + if (pDraw->type != DRAWABLE_WINDOW) + return BadAlloc; + + if(!pScreenPriv->enabled) return Success; + + WinBox.x1 = pDraw->x + drw_x; + WinBox.y1 = pDraw->y + drw_y; + WinBox.x2 = WinBox.x1 + drw_w; + WinBox.y2 = WinBox.y1 + drw_h; + + REGION_INIT(pScreen, &WinRegion, &WinBox, 1); + REGION_INIT(pScreen, &ClipRegion, NullBox, 1); + REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip); + + if(portPriv->pDraw) { + KdXVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv); + } + + if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + clippedAway = TRUE; + goto GET_STILL_BAILOUT; + } + + if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { + REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + } + + ret = (*portPriv->AdaptorRec->GetStill)(portPriv->screen, + vid_x, vid_y, WinBox.x1, WinBox.y1, + vid_w, vid_h, drw_w, drw_h, + &ClipRegion, portPriv->DevPriv.ptr); + +GET_STILL_BAILOUT: + + if((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) { + (*portPriv->AdaptorRec->StopVideo)( + portPriv->screen, portPriv->DevPriv.ptr, FALSE); + portPriv->isOn = XV_PENDING; + } + + REGION_UNINIT(pScreen, &WinRegion); + REGION_UNINIT(pScreen, &ClipRegion); + + return ret; +} + + + +static int +KdXVStopVideo( + ClientPtr client, + XvPortPtr pPort, + DrawablePtr pDraw +){ + XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr); + KdScreenPriv(portPriv->screen->pScreen); + + if(pDraw->type != DRAWABLE_WINDOW) + return BadAlloc; + + KdXVRemovePortFromWindow((WindowPtr)pDraw, portPriv); + + if(!pScreenPriv->enabled) return Success; + + /* Must free resources. */ + + if(portPriv->isOn > XV_OFF) { + (*portPriv->AdaptorRec->StopVideo)( + portPriv->screen, portPriv->DevPriv.ptr, TRUE); + portPriv->isOn = XV_OFF; + } + + return Success; +} + +static int +KdXVSetPortAttribute( + ClientPtr client, + XvPortPtr pPort, + Atom attribute, + INT32 value +){ + XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr); + + return((*portPriv->AdaptorRec->SetPortAttribute)(portPriv->screen, + attribute, value, portPriv->DevPriv.ptr)); +} + + +static int +KdXVGetPortAttribute( + ClientPtr client, + XvPortPtr pPort, + Atom attribute, + INT32 *p_value +){ + XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr); + + return((*portPriv->AdaptorRec->GetPortAttribute)(portPriv->screen, + attribute, (int *) p_value, portPriv->DevPriv.ptr)); +} + + + +static int +KdXVQueryBestSize( + ClientPtr client, + XvPortPtr pPort, + CARD8 motion, + CARD16 vid_w, CARD16 vid_h, + CARD16 drw_w, CARD16 drw_h, + unsigned int *p_w, unsigned int *p_h +){ + XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr); + + (*portPriv->AdaptorRec->QueryBestSize)(portPriv->screen, + (Bool)motion, vid_w, vid_h, drw_w, drw_h, + p_w, p_h, portPriv->DevPriv.ptr); + + return Success; +} + + +static int +KdXVPutImage( + ClientPtr client, + DrawablePtr pDraw, + XvPortPtr pPort, + GCPtr pGC, + INT16 src_x, INT16 src_y, + CARD16 src_w, CARD16 src_h, + INT16 drw_x, INT16 drw_y, + CARD16 drw_w, CARD16 drw_h, + XvImagePtr format, + unsigned char* data, + Bool sync, + CARD16 width, CARD16 height +){ + XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr); + ScreenPtr pScreen = pDraw->pScreen; + KdScreenPriv(pScreen); + KdScreenInfo *screen=pScreenPriv->screen; + RegionRec WinRegion; + RegionRec ClipRegion; + BoxRec WinBox; + int ret = Success; + Bool clippedAway = FALSE; + + if (pDraw->type != DRAWABLE_WINDOW) + return BadAlloc; + + if(!pScreenPriv->enabled) return Success; + + WinBox.x1 = pDraw->x + drw_x; + WinBox.y1 = pDraw->y + drw_y; + WinBox.x2 = WinBox.x1 + drw_w; + WinBox.y2 = WinBox.y1 + drw_h; + + REGION_INIT(pScreen, &WinRegion, &WinBox, 1); + REGION_INIT(pScreen, &ClipRegion, NullBox, 1); + REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip); + + if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { + RegionRec VPReg; + BoxRec VPBox; + + VPBox.x1 = 0; + VPBox.y1 = 0; + VPBox.x2 = screen->width; + VPBox.y2 = screen->height; + + REGION_INIT(pScreen, &VPReg, &VPBox, 1); + REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg); + REGION_UNINIT(pScreen, &VPReg); + } + + if(portPriv->pDraw) { + KdXVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv); + } + + if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + clippedAway = TRUE; + goto PUT_IMAGE_BAILOUT; + } + + if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { + BoxPtr clipBox = REGION_RECTS(&ClipRegion); + if( (REGION_NUM_RECTS(&ClipRegion) != 1) || + (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || + (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) + { + clippedAway = TRUE; + goto PUT_IMAGE_BAILOUT; + } + } + + if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { + REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + } + + ret = (*portPriv->AdaptorRec->PutImage)(portPriv->screen, + src_x, src_y, WinBox.x1, WinBox.y1, + src_w, src_h, drw_w, drw_h, format->id, data, width, height, + sync, &ClipRegion, portPriv->DevPriv.ptr); + + if((ret == Success) && + (portPriv->AdaptorRec->flags & VIDEO_OVERLAID_IMAGES)) { + + KdXVEnlistPortInWindow((WindowPtr)pDraw, portPriv); + portPriv->isOn = XV_ON; + portPriv->pDraw = pDraw; + portPriv->drw_x = drw_x; portPriv->drw_y = drw_y; + portPriv->drw_w = drw_w; portPriv->drw_h = drw_h; + portPriv->type = 0; /* no mask means it's transient and should + not be reput once it's removed */ + pPort->pDraw = pDraw; /* make sure we can get stop requests */ + } + +PUT_IMAGE_BAILOUT: + + if((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) { + (*portPriv->AdaptorRec->StopVideo)( + portPriv->screen, portPriv->DevPriv.ptr, FALSE); + portPriv->isOn = XV_PENDING; + } + + REGION_UNINIT(pScreen, &WinRegion); + REGION_UNINIT(pScreen, &ClipRegion); + + return ret; +} + + +static int +KdXVQueryImageAttributes( + ClientPtr client, + XvPortPtr pPort, + XvImagePtr format, + CARD16 *width, + CARD16 *height, + int *pitches, + int *offsets +){ + XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr); + + return (*portPriv->AdaptorRec->QueryImageAttributes)(portPriv->screen, + format->id, width, height, pitches, offsets); +} + + +/**************** Offscreen surface stuff *******************/ + +typedef struct { + KdOffscreenImagePtr images; + int num; +} OffscreenImageRec; + +static OffscreenImageRec OffscreenImages[MAXSCREENS]; +static Bool offscreenInited = FALSE; + +Bool +KdXVRegisterOffscreenImages( + ScreenPtr pScreen, + KdOffscreenImagePtr images, + int num +){ + if(!offscreenInited) { + bzero(OffscreenImages, sizeof(OffscreenImages[MAXSCREENS])); + offscreenInited = TRUE; + } + + OffscreenImages[pScreen->myNum].num = num; + OffscreenImages[pScreen->myNum].images = images; + + return TRUE; +} + +KdOffscreenImagePtr +KdXVQueryOffscreenImages( + ScreenPtr pScreen, + int *num +){ + if(!offscreenInited) { + *num = 0; + return NULL; + } + + *num = OffscreenImages[pScreen->myNum].num; + return OffscreenImages[pScreen->myNum].images; +} Index: xc/programs/Xserver/hw/kdrive/kxv.h diff -u /dev/null xc/programs/Xserver/hw/kdrive/kxv.h:1.1 --- /dev/null Mon Jun 4 12:40:16 2001 +++ xc/programs/Xserver/hw/kdrive/kxv.h Thu Mar 29 21:18:41 2001 @@ -0,0 +1,302 @@ +/* + + XFree86 Xv DDX written by Mark Vojkovich (markv@valinux.com) + Adapted for KDrive by Pontus Lidman + + Copyright (C) 2000, 2001 - Nokia Home Communications + Copyright (C) 1998, 1999 - The XFree86 Project Inc. + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY +SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + +*/ + +/* $XFree86: xc/programs/Xserver/hw/kdrive/kxv.h,v 1.1 2001/03/30 02:18:41 keithp Exp $ */ + +#ifndef _XVDIX_H_ +#define _XVDIX_H_ + +#include "scrnintstr.h" +#include "regionstr.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "mivalidate.h" +#include "validate.h" +#include "resource.h" +#include "gcstruct.h" +#include "dixstruct.h" + +#include "../../Xext/xvdix.h" + +#define VIDEO_NO_CLIPPING 0x00000001 +#define VIDEO_INVERT_CLIPLIST 0x00000002 +#define VIDEO_OVERLAID_IMAGES 0x00000004 +#define VIDEO_OVERLAID_STILLS 0x00000008 +#define VIDEO_CLIP_TO_VIEWPORT 0x00000010 + +typedef struct { + int id; + int type; + int byte_order; + unsigned char guid[16]; + int bits_per_pixel; + int format; + int num_planes; + + /* for RGB formats only */ + int depth; + unsigned int red_mask; + unsigned int green_mask; + unsigned int blue_mask; + + /* for YUV formats only */ + unsigned int y_sample_bits; + unsigned int u_sample_bits; + unsigned int v_sample_bits; + unsigned int horz_y_period; + unsigned int horz_u_period; + unsigned int horz_v_period; + unsigned int vert_y_period; + unsigned int vert_u_period; + unsigned int vert_v_period; + char component_order[32]; + int scanline_order; +} KdImageRec, *KdImagePtr; + + +typedef struct { + KdScreenInfo * screen; + int id; + unsigned short width, height; + int *pitches; /* bytes */ + int *offsets; /* in bytes from start of framebuffer */ + DevUnion devPrivate; +} KdSurfaceRec, *KdSurfacePtr; + + +typedef int (* PutVideoFuncPtr)( KdScreenInfo * screen, + short vid_x, short vid_y, short drw_x, short drw_y, + short vid_w, short vid_h, short drw_w, short drw_h, + RegionPtr clipBoxes, pointer data ); +typedef int (* PutStillFuncPtr)( KdScreenInfo * screen, + short vid_x, short vid_y, short drw_x, short drw_y, + short vid_w, short vid_h, short drw_w, short drw_h, + RegionPtr clipBoxes, pointer data ); +typedef int (* GetVideoFuncPtr)( KdScreenInfo * screen, + short vid_x, short vid_y, short drw_x, short drw_y, + short vid_w, short vid_h, short drw_w, short drw_h, + RegionPtr clipBoxes, pointer data ); +typedef int (* GetStillFuncPtr)( KdScreenInfo * screen, + short vid_x, short vid_y, short drw_x, short drw_y, + short vid_w, short vid_h, short drw_w, short drw_h, + RegionPtr clipBoxes, pointer data ); +typedef void (* StopVideoFuncPtr)(KdScreenInfo * screen, pointer data, Bool Exit); +typedef int (* SetPortAttributeFuncPtr)(KdScreenInfo * screen, Atom attribute, + int value, pointer data); +typedef int (* GetPortAttributeFuncPtr)(KdScreenInfo * screen, Atom attribute, + int *value, pointer data); +typedef void (* QueryBestSizeFuncPtr)(KdScreenInfo * screen, Bool motion, + short vid_w, short vid_h, short drw_w, short drw_h, + unsigned int *p_w, unsigned int *p_h, pointer data); +typedef int (* PutImageFuncPtr)( KdScreenInfo * screen, + short src_x, short src_y, short drw_x, short drw_y, + short src_w, short src_h, short drw_w, short drw_h, + int image, unsigned char* buf, short width, short height, Bool Sync, + RegionPtr clipBoxes, pointer data ); +typedef int (* ReputImageFuncPtr)( KdScreenInfo * screen, short drw_x, short drw_y, + RegionPtr clipBoxes, pointer data ); +typedef int (*QueryImageAttributesFuncPtr)(KdScreenInfo * screen, + int image, unsigned short *width, unsigned short *height, + int *pitches, int *offsets); + +typedef enum { + XV_OFF, + XV_PENDING, + XV_ON +} XvStatus; + +/*** this is what the driver needs to fill out ***/ + +typedef struct { + int id; + char *name; + unsigned short width, height; + XvRationalRec rate; +} KdVideoEncodingRec, *KdVideoEncodingPtr; + +typedef struct { + char depth; + short class; +} KdVideoFormatRec, *KdVideoFormatPtr; + +typedef struct { + int flags; + int min_value; + int max_value; + char *name; +} KdAttributeRec, *KdAttributePtr; + +typedef struct { + unsigned int type; + int flags; + char *name; + int nEncodings; + KdVideoEncodingPtr pEncodings; + int nFormats; + KdVideoFormatPtr pFormats; + int nPorts; + DevUnion *pPortPrivates; + int nAttributes; + KdAttributePtr pAttributes; + int nImages; + KdImagePtr pImages; + PutVideoFuncPtr PutVideo; + PutStillFuncPtr PutStill; + GetVideoFuncPtr GetVideo; + GetStillFuncPtr GetStill; + StopVideoFuncPtr StopVideo; + SetPortAttributeFuncPtr SetPortAttribute; + GetPortAttributeFuncPtr GetPortAttribute; + QueryBestSizeFuncPtr QueryBestSize; + PutImageFuncPtr PutImage; + ReputImageFuncPtr ReputImage; + QueryImageAttributesFuncPtr QueryImageAttributes; +} KdVideoAdaptorRec, *KdVideoAdaptorPtr; + +typedef struct { + KdImagePtr image; + int flags; + int (*alloc_surface)(KdScreenInfo * screen, + int id, + unsigned short width, + unsigned short height, + KdSurfacePtr surface); + int (*free_surface)(KdSurfacePtr surface); + int (*display) (KdSurfacePtr surface, + short vid_x, short vid_y, + short drw_x, short drw_y, + short vid_w, short vid_h, + short drw_w, short drw_h, + RegionPtr clipBoxes); + int (*stop) (KdSurfacePtr surface); + int (*getAttribute) (KdScreenInfo * screen, Atom attr, INT32 *value); + int (*setAttribute) (KdScreenInfo * screen, Atom attr, INT32 value); + int max_width; + int max_height; + int num_attributes; + KdAttributePtr attributes; +} KdOffscreenImageRec, *KdOffscreenImagePtr; + +Bool +KdXVScreenInit( + ScreenPtr pScreen, + KdVideoAdaptorPtr *Adaptors, + int num +); + +typedef int (* KdXVInitGenericAdaptorPtr)(KdScreenInfo * screen, + KdVideoAdaptorPtr **Adaptors); + +int +KdXVRegisterGenericAdaptorDriver( + KdXVInitGenericAdaptorPtr InitFunc +); + +int +KdXVListGenericAdaptors( + KdScreenInfo * screen, + KdVideoAdaptorPtr **Adaptors +); + +Bool +KdXVRegisterOffscreenImages( + ScreenPtr pScreen, + KdOffscreenImagePtr images, + int num +); + +KdOffscreenImagePtr +KdXVQueryOffscreenImages( + ScreenPtr pScreen, + int *num +); + +KdVideoAdaptorPtr KdXVAllocateVideoAdaptorRec(KdScreenInfo * screen); + +void KdXVFreeVideoAdaptorRec(KdVideoAdaptorPtr ptr); + +/*** These are DDX layer privates ***/ + + +typedef struct { + CreateWindowProcPtr CreateWindow; + DestroyWindowProcPtr DestroyWindow; + ClipNotifyProcPtr ClipNotify; + WindowExposuresProcPtr WindowExposures; + void (*disable) (ScreenPtr); /* turn off rendering */ + Bool (*enable) (ScreenPtr); /* set up for rendering */ +} KdXVScreenRec, *KdXVScreenPtr; + +typedef struct { + int flags; + PutVideoFuncPtr PutVideo; + PutStillFuncPtr PutStill; + GetVideoFuncPtr GetVideo; + GetStillFuncPtr GetStill; + StopVideoFuncPtr StopVideo; + SetPortAttributeFuncPtr SetPortAttribute; + GetPortAttributeFuncPtr GetPortAttribute; + QueryBestSizeFuncPtr QueryBestSize; + PutImageFuncPtr PutImage; + ReputImageFuncPtr ReputImage; + QueryImageAttributesFuncPtr QueryImageAttributes; +} XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr; + +typedef struct { + KdScreenInfo * screen; + DrawablePtr pDraw; + unsigned char type; + unsigned int subWindowMode; + DDXPointRec clipOrg; + RegionPtr clientClip; + RegionPtr pCompositeClip; + Bool FreeCompositeClip; + XvAdaptorRecPrivatePtr AdaptorRec; + XvStatus isOn; + Bool moved; + int vid_x, vid_y, vid_w, vid_h; + int drw_x, drw_y, drw_w, drw_h; + DevUnion DevPriv; +} XvPortRecPrivate, *XvPortRecPrivatePtr; + +typedef struct _KdXVWindowRec{ + XvPortRecPrivatePtr PortRec; + struct _KdXVWindowRec *next; +} KdXVWindowRec, *KdXVWindowPtr; + +#endif /* _XVDIX_H_ */ + Index: xc/programs/Xserver/hw/kdrive/fbdev/Xfbdev.man diff -u xc/programs/Xserver/hw/kdrive/fbdev/Xfbdev.man:1.2.2.1 xc/programs/Xserver/hw/kdrive/fbdev/Xfbdev.man:1.5 --- xc/programs/Xserver/hw/kdrive/fbdev/Xfbdev.man:1.2.2.1 Wed Feb 28 16:44:20 2001 +++ xc/programs/Xserver/hw/kdrive/fbdev/Xfbdev.man Tue Feb 13 16:15:15 2001 @@ -1,6 +1,6 @@ -.\" $XFree86: xc/programs/Xserver/hw/kdrive/fbdev/Xfbdev.man,v 1.2.2.1 2001/02/28 21:44:20 dawes Exp $ +.\" $XFree86: xc/programs/Xserver/hw/kdrive/fbdev/Xfbdev.man,v 1.5 2001/02/13 21:15:15 dawes Exp $ .\" -.TH Xfbdev 1 +.TH Xfbdev 1 __vendorversion__ .SH NAME Xfbdev \- Linux framebuffer device tiny X server .SH SYNOPSIS @@ -20,7 +20,7 @@ .SH KEYBOARD To be written. .SH SEE ALSO -X(1), Xserver(1), Xkdrive(1), xdm(1), xinit(1). +X(__miscmansuffix__), Xserver(1), Xkdrive(1), xdm(1), xinit(1). .SH AUTHORS The .B Xfbdev Index: xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c diff -u xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c:1.10 xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c:1.11 --- xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c:1.10 Tue Oct 3 13:22:14 2000 +++ xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c Thu Mar 29 21:15:20 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c,v 1.10 2000/10/03 17:22:14 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c,v 1.11 2001/03/30 02:15:20 keithp Exp $ */ #include "fbdev.h" @@ -119,6 +119,11 @@ screen->fb[0].redMask = Mask (priv->var.red.offset, priv->var.red.length); screen->fb[0].greenMask = Mask (priv->var.green.offset, priv->var.green.length); screen->fb[0].blueMask = Mask (priv->var.blue.offset, priv->var.blue.length); +#ifdef ITSY + screen->fb[0].redMask = 0xf800; + screen->fb[0].greenMask = 0x07e0; + screen->fb[0].blueMask = 0x001f; +#endif allbits = screen->fb[0].redMask | screen->fb[0].greenMask | screen->fb[0].blueMask; depth = 32; while (depth && !(allbits & (1 << (depth - 1)))) Index: xc/programs/Xserver/hw/kdrive/i810/Imakefile diff -u /dev/null xc/programs/Xserver/hw/kdrive/i810/Imakefile:1.1 --- /dev/null Mon Jun 4 12:40:16 2001 +++ xc/programs/Xserver/hw/kdrive/i810/Imakefile Thu Mar 29 21:18:41 2001 @@ -0,0 +1,21 @@ +XCOMM $XConsortium: Imakefile /main/10 1996/12/02 10:20:33 lehors $ +XCOMM $XFree86: xc/programs/Xserver/hw/kdrive/i810/Imakefile,v 1.1 2001/03/30 02:18:41 keithp Exp $ +KDRIVE=.. +#include "../Kdrive.tmpl" + +#if BuildXvExt +XVSRCS = i810_video.c +XVOBJS = i810_video.o +#endif + +SRCS = i810.c i810stub.c i810draw.c i810_cursor.c $(XVSRCS) + +OBJS = i810.o i810stub.o i810draw.o i810_cursor.o $(XVOBJS) + +DEFINES = XvExtensionDefines /* -DI810CFG_SHOW_OVERSCAN */ + +INCLUDES = -I. $(KDINCS) + +NormalLibraryObjectRule() +NormalLibraryTarget(i810,$(OBJS)) +DependTarget() Index: xc/programs/Xserver/hw/kdrive/i810/i810.c diff -u /dev/null xc/programs/Xserver/hw/kdrive/i810/i810.c:1.1 --- /dev/null Mon Jun 4 12:40:16 2001 +++ xc/programs/Xserver/hw/kdrive/i810/i810.c Thu Mar 29 21:18:41 2001 @@ -0,0 +1,2096 @@ +/* COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 2000, 2001 Nokia Home Communications + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY +SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + +X Window System is a trademark of The Open Group */ + + +/* $XFree86: xc/programs/Xserver/hw/kdrive/i810/i810.c,v 1.1 2001/03/30 02:18:41 keithp Exp $ */ + +/* + * i810.c - KDrive driver for the i810 chipset + * + * Authors: + * Pontus Lidman + * + */ + +#include "kdrive.h" +#include "kxv.h" + +#include "i810.h" +#include "linux/agp.h" + +#include "i810draw.h" + +Bool i810InitVideo(ScreenPtr pScreen); + +#ifndef I810_DEBUG +int I810_DEBUG = (0 +/* | DEBUG_ALWAYS_SYNC */ +/* | DEBUG_VERBOSE_ACCEL */ +/* | DEBUG_VERBOSE_SYNC */ +/* | DEBUG_VERBOSE_VGA */ +/* | DEBUG_VERBOSE_RING */ +/* | DEBUG_VERBOSE_OUTREG */ +/* | DEBUG_VERBOSE_MEMORY */ +/* | DEBUG_VERBOSE_CURSOR */ + ); +#endif + + +static Bool +i810ModeInit(KdScreenInfo *screen, const KdMonitorTiming *t); + +static void +i810PrintMode( vgaRegPtr vgaReg, I810RegPtr mode ); + +Bool +i810CardInit (KdCardInfo *card) +{ + int i; + + I810CardInfo *i810c; + +/* fprintf(stderr,"i810CardInit\n"); */ + + i810c = (I810CardInfo *) xalloc (sizeof (I810CardInfo)); + + if (!i810c) + return FALSE; + + /* 2MB Video RAM */ + i810c->videoRam=2048; + + /* Find FB address */ + + if (card->attr.address[1] != 0) { + i810c->LinearAddr = card->attr.address[0] & 0xFF000000; + + if (!i810c->LinearAddr) { + fprintf(stderr,"No valid FB address in PCI config space(1)\n"); + xfree(i810c); + return FALSE; + } else { +/* fprintf(stderr,"Linear framebuffer at %lx\n",i810c->LinearAddr); */ + } + } else { + fprintf(stderr,"No valid FB address in PCI config space(2)\n"); + xfree(i810c); + return FALSE; + } + + if (card->attr.address[1]) { + + i810c->MMIOAddr = card->attr.address[1] & 0xFFF80000; + + i810c->MMIOBase = + KdMapDevice (i810c->MMIOAddr, I810_REG_SIZE); + if (!i810c->MMIOBase) { + fprintf(stderr,"No valid MMIO address in PCI config space(1)\n"); + xfree(i810c); + return FALSE; + } else { + + } + } else { + fprintf(stderr,"No valid MMIO address in PCI config space(2)\n"); + xfree(i810c); + return FALSE; + } + +/* fprintf(stderr,"Mapped 0x%x bytes of MMIO regs at phys 0x%lx virt %p\n", */ +/* I810_REG_SIZE,i810c->MMIOAddr,i810c->MMIOBase); */ + + /* Find out memory bus frequency. + */ + + { + unsigned long *p; + unsigned char *LinuxGetPciCfg(KdCardAttr *attr); + + + if (!(p= (unsigned long *) LinuxGetPciCfg(&card->attr))) + return FALSE; + +/* fprintf(stderr,"Frequency long %lx\n",p[WHTCFG_PAMR_DRP]); */ + + if ( (p[WHTCFG_PAMR_DRP] & LM_FREQ_MASK) == LM_FREQ_133 ) + i810c->LmFreqSel = 133; + else + i810c->LmFreqSel = 100; + + xfree(p); + +/* fprintf(stderr,"Selected frequency %d\n",i810c->LmFreqSel); */ + } + +/* fprintf(stderr,"Will alloc AGP framebuffer: %d kByte\n",i810c->videoRam); */ + + /* Since we always want write combining on first 32 mb of framebuffer + * we pass a mapsize of 32 mb */ + i810c->FbMapSize = 32*1024*1024; + + for (i = 2 ; i < i810c->FbMapSize ; i <<= 1); + i810c->FbMapSize = i; + + i810c->FbBase = + KdMapDevice (i810c->LinearAddr, i810c->FbMapSize); + + if (!i810c->FbBase) return FALSE; +/* fprintf(stderr,"Mapped 0x%lx bytes of framebuffer at %p\n", */ +/* i810c->FbMapSize,i810c->FbBase); */ + + card->driver=i810c; + + return TRUE; +} + +void +i810ScreenFini (KdScreenInfo *screen) +{ + I810ScreenInfo *i810s = (I810ScreenInfo *) screen->driver; + + xfree (i810s); + screen->driver = 0; +} + +Bool +i810InitScreen (ScreenPtr pScreen) { + +#ifdef XV + i810InitVideo(pScreen); +#endif + return TRUE; +} + +void +i810CardFini (KdCardInfo *card) +{ + I810CardInfo *i810c = (I810CardInfo *) card->driver; + + KdUnmapDevice (i810c->FbBase, i810c->FbMapSize); + KdUnmapDevice (i810c->MMIOBase, I810_REG_SIZE); + xfree (i810c); + card->driver = 0; +} + +struct wm_info { + double freq; + unsigned int wm; +}; + +struct wm_info i810_wm_8_100[] = { + { 0, 0x22003000 }, + { 25.2, 0x22003000 }, + { 28.0, 0x22003000 }, + { 31.5, 0x22003000 }, + { 36.0, 0x22007000 }, + { 40.0, 0x22007000 }, + { 45.0, 0x22007000 }, + { 49.5, 0x22008000 }, + { 50.0, 0x22008000 }, + { 56.3, 0x22008000 }, + { 65.0, 0x22008000 }, + { 75.0, 0x22008000 }, + { 78.8, 0x22008000 }, + { 80.0, 0x22008000 }, + { 94.0, 0x22008000 }, + { 96.0, 0x22107000 }, + { 99.0, 0x22107000 }, + { 108.0, 0x22107000 }, + { 121.0, 0x22107000 }, + { 128.9, 0x22107000 }, + { 132.0, 0x22109000 }, + { 135.0, 0x22109000 }, + { 157.5, 0x2210b000 }, + { 162.0, 0x2210b000 }, + { 175.5, 0x2210b000 }, + { 189.0, 0x2220e000 }, + { 202.5, 0x2220e000 } +}; + +struct wm_info i810_wm_16_100[] = { + { 0, 0x22004000 }, + { 25.2, 0x22006000 }, + { 28.0, 0x22006000 }, + { 31.5, 0x22007000 }, + { 36.0, 0x22007000 }, + { 40.0, 0x22007000 }, + { 45.0, 0x22007000 }, + { 49.5, 0x22009000 }, + { 50.0, 0x22009000 }, + { 56.3, 0x22108000 }, + { 65.0, 0x2210e000 }, + { 75.0, 0x2210e000 }, + { 78.8, 0x2210e000 }, + { 80.0, 0x22210000 }, + { 94.5, 0x22210000 }, + { 96.0, 0x22210000 }, + { 99.0, 0x22210000 }, + { 108.0, 0x22210000 }, + { 121.0, 0x22210000 }, + { 128.9, 0x22210000 }, + { 132.0, 0x22314000 }, + { 135.0, 0x22314000 }, + { 157.5, 0x22415000 }, + { 162.0, 0x22416000 }, + { 175.5, 0x22416000 }, + { 189.0, 0x22416000 }, + { 195.0, 0x22416000 }, + { 202.5, 0x22416000 } +}; + + +struct wm_info i810_wm_24_100[] = { + { 0, 0x22006000 }, + { 25.2, 0x22009000 }, + { 28.0, 0x22009000 }, + { 31.5, 0x2200a000 }, + { 36.0, 0x2210c000 }, + { 40.0, 0x2210c000 }, + { 45.0, 0x2210c000 }, + { 49.5, 0x22111000 }, + { 50.0, 0x22111000 }, + { 56.3, 0x22111000 }, + { 65.0, 0x22214000 }, + { 75.0, 0x22214000 }, + { 78.8, 0x22215000 }, + { 80.0, 0x22216000 }, + { 94.5, 0x22218000 }, + { 96.0, 0x22418000 }, + { 99.0, 0x22418000 }, + { 108.0, 0x22418000 }, + { 121.0, 0x22418000 }, + { 128.9, 0x22419000 }, + { 132.0, 0x22519000 }, + { 135.0, 0x4441d000 }, + { 157.5, 0x44419000 }, + { 162.0, 0x44419000 }, + { 175.5, 0x44419000 }, + { 189.0, 0x44419000 }, + { 195.0, 0x44419000 }, + { 202.5, 0x44419000 } +}; + +struct wm_info i810_wm_32_100[] = { + { 0, 0x2210b000 }, + { 60, 0x22415000 }, /* 0x314000 works too */ + { 80, 0x22419000 } /* 0x518000 works too */ +}; + + +struct wm_info i810_wm_8_133[] = { + { 0, 0x22003000 }, + { 25.2, 0x22003000 }, + { 28.0, 0x22003000 }, + { 31.5, 0x22003000 }, + { 36.0, 0x22007000 }, + { 40.0, 0x22007000 }, + { 45.0, 0x22007000 }, + { 49.5, 0x22008000 }, + { 50.0, 0x22008000 }, + { 56.3, 0x22008000 }, + { 65.0, 0x22008000 }, + { 75.0, 0x22008000 }, + { 78.8, 0x22008000 }, + { 80.0, 0x22008000 }, + { 94.0, 0x22008000 }, + { 96.0, 0x22107000 }, + { 99.0, 0x22107000 }, + { 108.0, 0x22107000 }, + { 121.0, 0x22107000 }, + { 128.9, 0x22107000 }, + { 132.0, 0x22109000 }, + { 135.0, 0x22109000 }, + { 157.5, 0x2210b000 }, + { 162.0, 0x2210b000 }, + { 175.5, 0x2210b000 }, + { 189.0, 0x2220e000 }, + { 202.5, 0x2220e000 } +}; + + +struct wm_info i810_wm_16_133[] = { + { 0, 0x22004000 }, + { 25.2, 0x22006000 }, + { 28.0, 0x22006000 }, + { 31.5, 0x22007000 }, + { 36.0, 0x22007000 }, + { 40.0, 0x22007000 }, + { 45.0, 0x22007000 }, + { 49.5, 0x22009000 }, + { 50.0, 0x22009000 }, + { 56.3, 0x22108000 }, + { 65.0, 0x2210e000 }, + { 75.0, 0x2210e000 }, + { 78.8, 0x2210e000 }, + { 80.0, 0x22210000 }, + { 94.5, 0x22210000 }, + { 96.0, 0x22210000 }, + { 99.0, 0x22210000 }, + { 108.0, 0x22210000 }, + { 121.0, 0x22210000 }, + { 128.9, 0x22210000 }, + { 132.0, 0x22314000 }, + { 135.0, 0x22314000 }, + { 157.5, 0x22415000 }, + { 162.0, 0x22416000 }, + { 175.5, 0x22416000 }, + { 189.0, 0x22416000 }, + { 195.0, 0x22416000 }, + { 202.5, 0x22416000 } +}; + +struct wm_info i810_wm_24_133[] = { + { 0, 0x22006000 }, + { 25.2, 0x22009000 }, + { 28.0, 0x22009000 }, + { 31.5, 0x2200a000 }, + { 36.0, 0x2210c000 }, + { 40.0, 0x2210c000 }, + { 45.0, 0x2210c000 }, + { 49.5, 0x22111000 }, + { 50.0, 0x22111000 }, + { 56.3, 0x22111000 }, + { 65.0, 0x22214000 }, + { 75.0, 0x22214000 }, + { 78.8, 0x22215000 }, + { 80.0, 0x22216000 }, + { 94.5, 0x22218000 }, + { 96.0, 0x22418000 }, + { 99.0, 0x22418000 }, + { 108.0, 0x22418000 }, + { 121.0, 0x22418000 }, + { 128.9, 0x22419000 }, + { 132.0, 0x22519000 }, + { 135.0, 0x4441d000 }, + { 157.5, 0x44419000 }, + { 162.0, 0x44419000 }, + { 175.5, 0x44419000 }, + { 189.0, 0x44419000 }, + { 195.0, 0x44419000 }, + { 202.5, 0x44419000 } +}; + +static void +i810WriteControlMMIO(I810CardInfo *i810c, int addr, CARD8 index, CARD8 val) { + moutb(addr, index); + moutb(addr+1, val); +} + +static CARD8 +i810ReadControlMMIO(I810CardInfo *i810c, int addr, CARD8 index) { + moutb(addr, index); + return minb(addr+1); +} + +Bool +i810ModeSupported (KdScreenInfo *screen, const KdMonitorTiming *t) +{ + /* This is just a guess. */ + if (t->horizontal > 1600 || t->horizontal < 640) return FALSE; + if (t->vertical > 1200 || t->horizontal < 350) return FALSE; + return TRUE; +} + +Bool +i810ModeUsable (KdScreenInfo *screen) +{ + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + int byte_width, pixel_width, screen_size; + +/* fprintf(stderr,"i810ModeUsable\n"); */ + + if (screen->fb[0].depth >= 24) + { + screen->fb[0].depth = 24; + screen->fb[0].bitsPerPixel = 24; + screen->dumb = TRUE; + } + else if (screen->fb[0].depth >= 16) + { + screen->fb[0].depth = 16; + screen->fb[0].bitsPerPixel = 16; + } + else if (screen->fb[0].depth >= 15) + { + screen->fb[0].depth = 15; + screen->fb[0].bitsPerPixel = 16; + } + else + { + screen->fb[0].depth = 8; + screen->fb[0].bitsPerPixel = 8; + } + byte_width = screen->width * (screen->fb[0].bitsPerPixel >> 3); + pixel_width = screen->width; + + screen->fb[0].pixelStride = pixel_width; + screen->fb[0].byteStride = byte_width; + + screen_size = byte_width * screen->height; + + return screen_size <= (i810c->videoRam * 1024); +} + +int i810AllocateGARTMemory( KdScreenInfo *screen ) +{ + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + unsigned long size = i810c->videoRam * 1024; + + int key; + long tom = 0; + unsigned long physical; + + if (!KdAgpGARTSupported()) + return FALSE; + + if (!KdAcquireGART(screen->mynum)) + return FALSE; + + /* This allows the 2d only Xserver to regen */ + i810c->agpAcquired2d = TRUE; + + /* Treat the gart like video memory - we assume we own all that is + * there, so ignore EBUSY errors. Don't try to remove it on + * failure, either, as other X server may be using it. + */ + + if ((key = KdAllocateGARTMemory(screen->mynum, size, 0, NULL)) == -1) + return FALSE; + + i810c->VramOffset = 0; + i810c->VramKey = key; + + if (!KdBindGARTMemory(screen->mynum, key, 0)) + return FALSE; + + + i810c->SysMem.Start = 0; + i810c->SysMem.Size = size; + i810c->SysMem.End = size; + i810c->SavedSysMem = i810c->SysMem; + + tom = i810c->SysMem.End; + + i810c->DcacheMem.Start = 0; + i810c->DcacheMem.End = 0; + i810c->DcacheMem.Size = 0; + i810c->CursorPhysical = 0; + + /* Dcache - half the speed of normal ram, so not really useful for + * a 2d server. Don't bother reporting its presence. This is + * mapped in addition to the requested amount of system ram. + */ + size = 1024 * 4096; + + /* Keep it 512K aligned for the sake of tiled regions. + */ + tom += 0x7ffff; + tom &= ~0x7ffff; + + if ((key = KdAllocateGARTMemory(screen->mynum, size, AGP_DCACHE_MEMORY, NULL)) != -1) { + i810c->DcacheOffset= tom; + i810c->DcacheKey = key; + if (!KdBindGARTMemory(screen->mynum, key, tom)) { + fprintf(stderr,"Allocation of %ld bytes for DCACHE failed\n", size); + i810c->DcacheKey = -1; + } else { + i810c->DcacheMem.Start = tom; + i810c->DcacheMem.Size = size; + i810c->DcacheMem.End = i810c->DcacheMem.Start + i810c->DcacheMem.Size; + tom = i810c->DcacheMem.End; + } + } else { + fprintf(stderr, + "No physical memory available for %ld bytes of DCACHE\n", + size); + i810c->DcacheKey = -1; + } + + /* Mouse cursor -- The i810 (crazy) needs a physical address in + * system memory from which to upload the cursor. We get this from + * the agpgart module using a special memory type. + */ + + /* 4k for the cursor is excessive, I'm going to steal 3k for + * overlay registers later + */ + + size = 4096; + + if ((key = KdAllocateGARTMemory(screen->mynum, size, AGP_PHYS_MEMORY, + &physical)) == -1) { + fprintf(stderr, + "No physical memory available for HW cursor\n"); + i810c->HwcursKey = -1; + } else { + i810c->HwcursOffset= tom; + i810c->HwcursKey = key; + if (!KdBindGARTMemory(screen->mynum, key, tom)) { + fprintf(stderr, + "Allocation of %ld bytes for HW cursor failed\n", + size); + i810c->HwcursKey = -1; + } else { + i810c->CursorPhysical = physical; + i810c->CursorStart = tom; + tom += size; + } + } + + /* Overlay register buffer -- Just like the cursor, the i810 needs a + * physical address in system memory from which to upload the overlay + * registers. + */ + if (i810c->CursorStart != 0) { + i810c->OverlayPhysical = i810c->CursorPhysical + 1024; + i810c->OverlayStart = i810c->CursorStart + 1024; + } + + + i810c->GttBound = 1; + + return TRUE; +} + +/* Allocate from a memrange, returns success */ + +int i810AllocLow( I810MemRange *result, I810MemRange *pool, int size ) +{ + if (size > pool->Size) return FALSE; + + pool->Size -= size; + result->Size = size; + result->Start = pool->Start; + result->End = pool->Start += size; + return TRUE; +} + +int i810AllocHigh( I810MemRange *result, I810MemRange *pool, int size ) +{ + if (size > pool->Size) return 0; + + pool->Size -= size; + result->Size = size; + result->End = pool->End; + result->Start = pool->End -= size; + return 1; +} + +Bool +i810AllocateFront(KdScreenInfo *screen) { + + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + + int cache_lines = -1; + + if(i810c->DoneFrontAlloc) + return TRUE; + + memset(&(i810c->FbMemBox), 0, sizeof(BoxRec)); + /* Alloc FrontBuffer/Ring/Accel memory */ + i810c->FbMemBox.x1=0; + i810c->FbMemBox.x2=screen->width; + i810c->FbMemBox.y1=0; + i810c->FbMemBox.y2=screen->height; + + /* This could be made a command line option */ + cache_lines = 0; + + if(cache_lines >= 0) + i810c->FbMemBox.y2 += cache_lines; + else { + /* make sure there is enough for two DVD sized YUV buffers */ + i810c->FbMemBox.y2 += (screen->fb[0].depth == 24) ? 256 : 384; + if (screen->width <= 1024) + i810c->FbMemBox.y2 += (screen->fb[0].depth == 24) ? 256 : 384; + cache_lines = i810c->FbMemBox.y2 - screen->height; + } + + if (I810_DEBUG) + ErrorF("Adding %i scanlines for pixmap caching\n", cache_lines); + + /* Reserve room for the framebuffer and pixcache. Put at the top + * of memory so we can have nice alignment for the tiled regions at + * the start of memory. + */ + i810AllocLow( &(i810c->FrontBuffer), + &(i810c->SysMem), + ((i810c->FbMemBox.x2 * + i810c->FbMemBox.y2 * + i810c->cpp) + 4095) & ~4095); + + memset( &(i810c->LpRing), 0, sizeof( I810RingBuffer ) ); + if(i810AllocLow( &(i810c->LpRing.mem), &(i810c->SysMem), 16*4096 )) { + if (I810_DEBUG & DEBUG_VERBOSE_MEMORY) + ErrorF( "ring buffer at local %lx\n", + i810c->LpRing.mem.Start); + + i810c->LpRing.tail_mask = i810c->LpRing.mem.Size - 1; + i810c->LpRing.virtual_start = i810c->FbBase + i810c->LpRing.mem.Start; + i810c->LpRing.head = 0; + i810c->LpRing.tail = 0; + i810c->LpRing.space = 0; + } + + if ( i810AllocLow( &i810c->Scratch, &(i810c->SysMem), 64*1024 ) || + i810AllocLow( &i810c->Scratch, &(i810c->SysMem), 16*1024 ) ) { + if (I810_DEBUG & DEBUG_VERBOSE_MEMORY) + ErrorF("Allocated Scratch Memory\n"); + } + +#ifdef XV + /* 720x720 is just how much memory the mpeg player needs for overlays */ + + if ( i810AllocHigh( &i810c->XvMem, &(i810c->SysMem), 720*720*2 )) { + if (I810_DEBUG & DEBUG_VERBOSE_MEMORY) + ErrorF("Allocated overlay Memory\n"); + } +#endif + + i810c->DoneFrontAlloc = TRUE; + return TRUE; +} + +static Bool +i810MapMem(KdScreenInfo *screen) +{ + + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + + i810c->LpRing.virtual_start = i810c->FbBase + i810c->LpRing.mem.Start; + + return TRUE; +} + + +Bool +i810ScreenInit (KdScreenInfo *screen) +{ + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + I810ScreenInfo *i810s; + + int i; + + const KdMonitorTiming *t; + +/* fprintf(stderr,"i810ScreenInit\n"); */ + + i810s = (I810ScreenInfo *) xalloc (sizeof (I810ScreenInfo)); + if (!i810s) + return FALSE; + + memset (i810s, '\0', sizeof (I810ScreenInfo)); + + /* Default dimensions */ + if (!screen->width || !screen->height) + { + screen->width = 720; + screen->height = 576; + screen->rate = 52; +#if 0 + screen->width = 1024; + screen->height = 768; + screen->rate = 72; +#endif + } + + if (!screen->fb[0].depth) + screen->fb[0].depth = 16; + + t = KdFindMode (screen, i810ModeSupported); + + screen->rate = t->rate; + screen->width = t->horizontal; + screen->height = t->vertical; + + if (!KdTuneMode (screen, i810ModeUsable, i810ModeSupported)) + { + xfree (i810c); + return FALSE; + } + +/* fprintf(stderr,"Screen rate %d horiz %d vert %d\n",t->rate,t->horizontal,t->vertical); */ + + switch (screen->fb[0].depth) { + case 8: + screen->fb[0].visuals = ((1 << StaticGray) | + (1 << GrayScale) | + (1 << StaticColor) | + (1 << PseudoColor) | + (1 << TrueColor) | + (1 << DirectColor)); + screen->fb[0].blueMask = 0x00; + screen->fb[0].greenMask = 0x00; + screen->fb[0].redMask = 0x00; + break; + case 15: + screen->fb[0].visuals = (1 << TrueColor); + screen->fb[0].blueMask = 0x001f; + screen->fb[0].greenMask = 0x03e0; + screen->fb[0].redMask = 0x7c00; + + i810c->colorKey = 0x043f; + + break; + case 16: + screen->fb[0].visuals = (1 << TrueColor); + screen->fb[0].blueMask = 0x001f; + screen->fb[0].greenMask = 0x07e0; + screen->fb[0].redMask = 0xf800; + + i810c->colorKey = 0x083f; + + break; + case 24: + screen->fb[0].visuals = (1 << TrueColor); + screen->fb[0].blueMask = 0x0000ff; + screen->fb[0].greenMask = 0x00ff00; + screen->fb[0].redMask = 0xff0000; + + i810c->colorKey = 0x0101ff; + + break; + default: + fprintf(stderr,"Unsupported depth %d\n",screen->fb[0].depth); + return FALSE; + } + + + + /* Set all colours to black */ + for (i=0; i<768; i++) i810c->vga.ModeReg.DAC[i] = 0x00; + + /* ... and the overscan */ + if (screen->fb[0].depth >= 4) + i810c->vga.ModeReg.Attribute[OVERSCAN] = 0xFF; + + /* Could be made a command-line option */ + +#ifdef I810CFG_SHOW_OVERSCAN + i810c->vga.ModeReg.DAC[765] = 0x3F; + i810c->vga.ModeReg.DAC[766] = 0x00; + i810c->vga.ModeReg.DAC[767] = 0x3F; + i810c->vga.ModeReg.Attribute[OVERSCAN] = 0xFF; + i810c->vga.ShowOverscan = TRUE; +#else + i810c->vga.ShowOverscan = FALSE; +#endif + + i810c->vga.paletteEnabled = FALSE; + i810c->vga.cmapSaved = FALSE; + i810c->vga.MMIOBase = i810c->MMIOBase; + + i810c->cpp = screen->fb[0].bitsPerPixel/8; + + /* move to initscreen? */ + + switch (screen->fb[0].bitsPerPixel) { + case 8: + i810c->MaxClock = 203000; + break; + case 16: + i810c->MaxClock = 163000; + break; + case 24: + i810c->MaxClock = 136000; + break; + case 32: /* not supported */ + i810c->MaxClock = 86000; + default: + fprintf(stderr,"Unsupported bpp %d\n",screen->fb[0].bitsPerPixel); + return FALSE; + } + + if (!i810AllocateGARTMemory( screen )) { + return FALSE; + } + + i810AllocateFront(screen); + + /* Map LpRing memory */ + if (!i810MapMem(screen)) return FALSE; + + screen->fb[0].frameBuffer = i810c->FbBase; + + screen->driver = i810s; + + return TRUE; +} + +/* + * I810Save -- + * + * This function saves the video state. It reads all of the SVGA registers + * into the vgaI810Rec data structure. There is in general no need to + * mask out bits here - just read the registers. + */ +static void +DoSave(KdCardInfo *card, vgaRegPtr vgaReg, I810RegPtr i810Reg, Bool saveFonts) +{ + + I810CardInfo *i810c = card->driver; + i810VGAPtr vgap = &i810c->vga; + + int i; + + /* Save VGA registers */ + + vgaReg->MiscOutReg = mmioReadMiscOut(vgap); + if (vgaReg->MiscOutReg & 0x01) + vgap->IOBase = VGA_IOBASE_COLOR; + else + vgap->IOBase = VGA_IOBASE_MONO; + + for (i = 0; i < VGA_NUM_CRTC; i++) { + vgaReg->CRTC[i] = mmioReadCrtc(vgap, i); + } + + mmioEnablePalette(vgap); + for (i = 0; i < VGA_NUM_ATTR; i++) { + vgaReg->Attribute[i] = mmioReadAttr(vgap, i); + } + mmioDisablePalette(vgap); + + for (i = 0; i < VGA_NUM_GFX; i++) { + vgaReg->Graphics[i] = mmioReadGr(vgap, i); + } + + for (i = 1; i < VGA_NUM_SEQ; i++) { + vgaReg->Sequencer[i] = mmioReadSeq(vgap, i); + } + + /* + * The port I/O code necessary to read in the extended registers + * into the fields of the I810Rec structure goes here. + */ + i810Reg->IOControl = mmioReadCrtc(vgap, IO_CTNL); + i810Reg->AddressMapping = i810ReadControlMMIO(i810c, GRX, ADDRESS_MAPPING); + i810Reg->BitBLTControl = INREG8(BITBLT_CNTL); + i810Reg->VideoClk2_M = INREG16(VCLK2_VCO_M); + i810Reg->VideoClk2_N = INREG16(VCLK2_VCO_N); + i810Reg->VideoClk2_DivisorSel = INREG8(VCLK2_VCO_DIV_SEL); + + i810Reg->ExtVertTotal=mmioReadCrtc(vgap, EXT_VERT_TOTAL); + i810Reg->ExtVertDispEnd=mmioReadCrtc(vgap, EXT_VERT_DISPLAY); + i810Reg->ExtVertSyncStart=mmioReadCrtc(vgap, EXT_VERT_SYNC_START); + i810Reg->ExtVertBlankStart=mmioReadCrtc(vgap, EXT_VERT_BLANK_START); + i810Reg->ExtHorizTotal=mmioReadCrtc(vgap, EXT_HORIZ_TOTAL); + i810Reg->ExtHorizBlank=mmioReadCrtc(vgap, EXT_HORIZ_BLANK); + i810Reg->ExtOffset=mmioReadCrtc(vgap, EXT_OFFSET); + i810Reg->InterlaceControl=mmioReadCrtc(vgap, INTERLACE_CNTL); + + i810Reg->PixelPipeCfg0 = INREG8(PIXPIPE_CONFIG_0); + i810Reg->PixelPipeCfg1 = INREG8(PIXPIPE_CONFIG_1); + i810Reg->PixelPipeCfg2 = INREG8(PIXPIPE_CONFIG_2); + i810Reg->DisplayControl = INREG8(DISPLAY_CNTL); + i810Reg->LMI_FIFO_Watermark = INREG(FWATER_BLC); + + for (i = 0 ; i < 8 ; i++) + i810Reg->Fence[i] = INREG(FENCE+i*4); + + i810Reg->LprbTail = INREG(LP_RING + RING_TAIL); + i810Reg->LprbHead = INREG(LP_RING + RING_HEAD); + i810Reg->LprbStart = INREG(LP_RING + RING_START); + i810Reg->LprbLen = INREG(LP_RING + RING_LEN); + + if ((i810Reg->LprbTail & TAIL_ADDR) != (i810Reg->LprbHead & HEAD_ADDR) && + i810Reg->LprbLen & RING_VALID) { + i810PrintErrorState( card ); + FatalError( "Active ring not flushed\n"); + } + + if (I810_DEBUG) { + fprintf(stderr,"Got mode in I810Save:\n"); + i810PrintMode( vgaReg, i810Reg ); + } +} + +void i810Preserve(KdCardInfo *card) { + I810CardInfo *i810c = card->driver; + i810VGAPtr vgap = &i810c->vga; + +/* fprintf(stderr,"i810Preserve\n"); */ + DoSave(card, &vgap->SavedReg, &i810c->SavedReg, TRUE); +} + +/* Famous last words + */ +void +i810PrintErrorState(KdCardInfo *card) +{ + + I810CardInfo *i810c = card->driver; + + fprintf(stderr, "pgetbl_ctl: 0x%lx pgetbl_err: 0x%lx\n", + INREG(PGETBL_CTL), + INREG(PGE_ERR)); + + fprintf(stderr, "ipeir: %lx iphdr: %lx\n", + INREG(IPEIR), + INREG(IPEHR)); + + fprintf(stderr, "LP ring tail: %lx head: %lx len: %lx start %lx\n", + INREG(LP_RING + RING_TAIL), + INREG(LP_RING + RING_HEAD) & HEAD_ADDR, + INREG(LP_RING + RING_LEN), + INREG(LP_RING + RING_START)); + + fprintf(stderr, "eir: %x esr: %x emr: %x\n", + INREG16(EIR), + INREG16(ESR), + INREG16(EMR)); + + fprintf(stderr, "instdone: %x instpm: %x\n", + INREG16(INST_DONE), + INREG8(INST_PM)); + + fprintf(stderr, "memmode: %lx instps: %lx\n", + INREG(MEMMODE), + INREG(INST_PS)); + + fprintf(stderr, "hwstam: %x ier: %x imr: %x iir: %x\n", + INREG16(HWSTAM), + INREG16(IER), + INREG16(IMR), + INREG16(IIR)); +} + +Bool +i810BindGARTMemory( KdScreenInfo *screen ) +{ + + KdCardInfo *card = screen->card; + I810CardInfo *i810c = card->driver; + + if (!i810c->GttBound) { + if (!KdAcquireGART(screen->mynum)) + return FALSE; + if (!KdBindGARTMemory(screen->mynum, i810c->VramKey, + i810c->VramOffset)) + + return FALSE; + if (i810c->DcacheKey != -1) { + if (!KdBindGARTMemory(screen->mynum, i810c->DcacheKey, + i810c->DcacheOffset)) + return FALSE; + } + if (i810c->HwcursKey != -1) { + if (!KdBindGARTMemory(screen->mynum, i810c->HwcursKey, + i810c->HwcursOffset)) + return FALSE; + } + i810c->GttBound = 1; + } + return TRUE; +} + +Bool +i810UnbindGARTMemory(KdScreenInfo *screen) +{ + KdCardInfo *card = screen->card; + I810CardInfo *i810c = card->driver; + + + if (KdAgpGARTSupported() && i810c->GttBound) { + if (!KdUnbindGARTMemory(screen->mynum, i810c->VramKey)) + return FALSE; + if (i810c->DcacheKey != -1) { + if (!KdUnbindGARTMemory(screen->mynum, i810c->DcacheKey)) + return FALSE; + } + if (i810c->HwcursKey != -1) { + if (!KdUnbindGARTMemory(screen->mynum, i810c->HwcursKey)) + return FALSE; + } + if (!KdReleaseGART(screen->mynum)) + return FALSE; + i810c->GttBound = 0; + } + return TRUE; +} + +/* + * I810CalcVCLK -- + * + * Determine the closest clock frequency to the one requested. + */ + +#define MAX_VCO_FREQ 600.0 +#define TARGET_MAX_N 30 +#define REF_FREQ 24.0 + +#define CALC_VCLK(m,n,p) \ + (double)m / ((double)n * (1 << p)) * 4 * REF_FREQ + +static void +i810CalcVCLK( KdScreenInfo *screen, double freq ) +{ + + KdCardInfo *card = screen->card; + I810CardInfo *i810c = card->driver; + I810RegPtr i810Reg = &i810c->ModeReg; + + int m, n, p; + double f_out, f_best; + double f_err; + double f_vco; + int m_best = 0, n_best = 0, p_best = 0; + double f_target = freq; + double err_max = 0.005; + double err_target = 0.001; + double err_best = 999999.0; + + p_best = p = log(MAX_VCO_FREQ/f_target)/log((double)2); + f_vco = f_target * (1 << p); + + n = 2; + do { + n++; + m = f_vco / (REF_FREQ / (double)n) / (double)4.0 + 0.5; + if (m < 3) m = 3; + f_out = CALC_VCLK(m,n,p); + f_err = 1.0 - (f_target/f_out); + if (fabs(f_err) < err_max) { + m_best = m; + n_best = n; + f_best = f_out; + err_best = f_err; + } + } while ((fabs(f_err) >= err_target) && + ((n <= TARGET_MAX_N) || (fabs(err_best) > err_max))); + + if (fabs(f_err) < err_target) { + m_best = m; + n_best = n; + } + + i810Reg->VideoClk2_M = (m_best-2) & 0x3FF; + i810Reg->VideoClk2_N = (n_best-2) & 0x3FF; + i810Reg->VideoClk2_DivisorSel = (p_best << 4); + +/* fprintf(stderr, "Setting dot clock to %.1f MHz " */ +/* "[ 0x%x 0x%x 0x%x ] " */ +/* "[ %d %d %d ]\n", */ +/* CALC_VCLK(m_best,n_best,p_best), */ +/* i810Reg->VideoClk2_M, */ +/* i810Reg->VideoClk2_N, */ +/* i810Reg->VideoClk2_DivisorSel, */ +/* m_best, n_best, p_best); */ +} + +/* + * I810CalcFIFO -- + * + * Calculate burst length and FIFO watermark. + */ + +#define Elements(x) (sizeof(x)/sizeof(*x)) + +unsigned int +i810CalcWatermark( KdScreenInfo *screen, double freq, Bool dcache ) +{ + + KdCardInfo *card = screen->card; + I810CardInfo *i810c = card->driver; + + + struct wm_info *tab; + int nr; + int i; + + if (i810c->LmFreqSel == 100) { + switch(screen->fb[0].bitsPerPixel) { + case 8: + tab = i810_wm_8_100; + nr = Elements(i810_wm_8_100); + break; + case 16: + tab = i810_wm_16_100; + nr = Elements(i810_wm_16_100); + break; + case 24: + tab = i810_wm_24_100; + nr = Elements(i810_wm_24_100); + break; + default: + return 0; + } + } else { + switch(screen->fb[0].bitsPerPixel) { + case 8: + tab = i810_wm_8_133; + nr = Elements(i810_wm_8_133); + break; + case 16: + tab = i810_wm_16_133; + nr = Elements(i810_wm_16_133); + break; + case 24: + tab = i810_wm_24_133; + nr = Elements(i810_wm_24_133); + break; + default: + return 0; + } + } + + for (i = 0 ; i < nr && tab[i].freq < freq ; i++); + + if (i == nr) + i--; + +/* fprintf(stderr,"chose watermark 0x%x: (tab.freq %.1f)\n", */ +/* tab[i].wm, tab[i].freq); */ + + /* None of these values (sourced from intel) have watermarks for + * the dcache memory. Fake it for now by using the same watermark + * for both... + * + * Update: this is probably because dcache isn't real useful as + * framebuffer memory, so intel's drivers don't need watermarks + * for that memory because they never use it to feed the ramdacs. + * We do use it in the fallback mode, so keep the watermarks for + * now. + */ + if (dcache) + return (tab[i].wm & ~0xffffff) | ((tab[i].wm>>12) & 0xfff); + else + return tab[i].wm; +} + +static void i810PrintMode( vgaRegPtr vgaReg, I810RegPtr mode ) +{ + int i; + + fprintf(stderr," MiscOut: %x\n", vgaReg->MiscOutReg); + + + fprintf(stderr,"SEQ: "); + for (i = 0 ; i < VGA_NUM_SEQ ; i++) { + if ((i&7)==0) fprintf(stderr,"\n"); + fprintf(stderr," %d: %x", i, vgaReg->Sequencer[i]); + } + fprintf(stderr,"\n"); + + fprintf(stderr,"CRTC: "); + for (i = 0 ; i < VGA_NUM_CRTC ; i++) { + if ((i&3)==0) fprintf(stderr,"\n"); + fprintf(stderr," CR%02x: %2x", i, vgaReg->CRTC[i]); + } + fprintf(stderr,"\n"); + + fprintf(stderr,"GFX: "); + for (i = 0 ; i < VGA_NUM_GFX ; i++) { + if ((i&3)==0) fprintf(stderr,"\n"); + fprintf(stderr," GR%02x: %02x", i, vgaReg->Graphics[i]); + } + fprintf(stderr,"\n"); + + fprintf(stderr,"ATTR: "); + for (i = 0 ; i < VGA_NUM_ATTR ; i++) { + if ((i&7)==0) fprintf(stderr,"\n"); + fprintf(stderr," %d: %x", i, vgaReg->Attribute[i]); + } + fprintf(stderr,"\n"); + + + fprintf(stderr," DisplayControl: %x\n", mode->DisplayControl); + fprintf(stderr," PixelPipeCfg0: %x\n", mode->PixelPipeCfg0); + fprintf(stderr," PixelPipeCfg1: %x\n", mode->PixelPipeCfg1); + fprintf(stderr," PixelPipeCfg2: %x\n", mode->PixelPipeCfg2); + fprintf(stderr," VideoClk2_M: %x\n", mode->VideoClk2_M); + fprintf(stderr," VideoClk2_N: %x\n", mode->VideoClk2_N); + fprintf(stderr," VideoClk2_DivisorSel: %x\n", mode->VideoClk2_DivisorSel); + fprintf(stderr," AddressMapping: %x\n", mode->AddressMapping); + fprintf(stderr," IOControl: %x\n", mode->IOControl); + fprintf(stderr," BitBLTControl: %x\n", mode->BitBLTControl); + fprintf(stderr," ExtVertTotal: %x\n", mode->ExtVertTotal); + fprintf(stderr," ExtVertDispEnd: %x\n", mode->ExtVertDispEnd); + fprintf(stderr," ExtVertSyncStart: %x\n", mode->ExtVertSyncStart); + fprintf(stderr," ExtVertBlankStart: %x\n", mode->ExtVertBlankStart); + fprintf(stderr," ExtHorizTotal: %x\n", mode->ExtHorizTotal); + fprintf(stderr," ExtHorizBlank: %x\n", mode->ExtHorizBlank); + fprintf(stderr," ExtOffset: %x\n", mode->ExtOffset); + fprintf(stderr," InterlaceControl: %x\n", mode->InterlaceControl); + fprintf(stderr," LMI_FIFO_Watermark: %x\n", mode->LMI_FIFO_Watermark); + fprintf(stderr," LprbTail: %x\n", mode->LprbTail); + fprintf(stderr," LprbHead: %x\n", mode->LprbHead); + fprintf(stderr," LprbStart: %x\n", mode->LprbStart); + fprintf(stderr," LprbLen: %x\n", mode->LprbLen); + fprintf(stderr," OverlayActiveStart: %x\n", mode->OverlayActiveStart); + fprintf(stderr," OverlayActiveEnd: %x\n", mode->OverlayActiveEnd); +} + + +/* + * i810VGASeqReset + * perform a sequencer reset. + * + * The i815 documentation states that these bits are not used by the + * HW, but still warns about not programming them... + */ + +void +i810VGASeqReset(i810VGAPtr vgap, Bool start) +{ + if (start) + { + mmioWriteSeq(vgap, 0x00, 0x01); /* Synchronous Reset */ + } + else + { + mmioWriteSeq(vgap, 0x00, 0x03); /* End Reset */ + } +} + +void +i810VGAProtect(KdCardInfo *card, Bool on) +{ + + I810CardInfo *i810c = card->driver; + i810VGAPtr vgap = &i810c->vga; + + unsigned char tmp; + + if (on) { + /* + * Turn off screen and disable sequencer. + */ + tmp = mmioReadSeq(vgap, 0x01); + + i810VGASeqReset(vgap, TRUE); /* start synchronous reset */ + mmioWriteSeq(vgap, 0x01, tmp | 0x20); /* disable the display */ + + mmioEnablePalette(vgap); + } else { + /* + * Reenable sequencer, then turn on screen. + */ + + tmp = mmioReadSeq(vgap, 0x01); + + mmioWriteSeq(vgap, 0x01, tmp & ~0x20); /* reenable display */ + i810VGASeqReset(vgap, FALSE); /* clear synchronousreset */ + + mmioDisablePalette(vgap); + } +} + +/* + * i810VGABlankScreen -- blank the screen. + */ + +void +i810VGABlankScreen(KdCardInfo *card, Bool on) +{ + I810CardInfo *i810c = card->driver; + i810VGAPtr vgap = &i810c->vga; + + unsigned char scrn; + + scrn = mmioReadSeq(vgap, 0x01); + + if (on) { + scrn &= ~0x20; /* enable screen */ + } else { + scrn |= 0x20; /* blank screen */ + } + + mmioWriteSeq(vgap,0x00,0x01); + mmioWriteSeq(vgap, 0x01, scrn); /* change mode */ + mmioWriteSeq(vgap,0x00,0x03); +} + +/* Restore hardware state */ + +static void +DoRestore(KdCardInfo *card, vgaRegPtr vgaReg, I810RegPtr i810Reg, + Bool restoreFonts) { + + + I810CardInfo *i810c = card->driver; + + i810VGAPtr vgap = &i810c->vga; + + unsigned char temp; + unsigned int itemp; + int i; + + if (I810_DEBUG & DEBUG_VERBOSE_VGA) { + fprintf(stderr,"Setting mode in DoRestore:\n"); + i810PrintMode( vgaReg, i810Reg ); + } + + /* Blank screen (i810vgaprotect) */ + i810VGAProtect(card, TRUE); + + /* Should wait for at least two hsync and no more than two vsync + before writing PIXCONF and turning the display on (?) */ + usleep(50000); + + /* Turn off DRAM Refresh */ + temp = INREG8( DRAM_ROW_CNTL_HI ); + temp &= ~DRAM_REFRESH_RATE; + temp |= DRAM_REFRESH_DISABLE; + OUTREG8( DRAM_ROW_CNTL_HI, temp ); + + usleep(1000); /* Wait 1 ms */ + + /* Write the M, N and P values */ + OUTREG16( VCLK2_VCO_M, i810Reg->VideoClk2_M); + OUTREG16( VCLK2_VCO_N, i810Reg->VideoClk2_N); + OUTREG8( VCLK2_VCO_DIV_SEL, i810Reg->VideoClk2_DivisorSel); + + /* + * Turn on 8 bit dac mode, if requested. This is needed to make + * sure that vgaHWRestore writes the values into the DAC properly. + * The problem occurs if 8 bit dac mode is requested and the HW is + * in 6 bit dac mode. If this happens, all the values are + * automatically shifted left twice by the HW and incorrect colors + * will be displayed on the screen. The only time this can happen + * is at server startup time and when switching back from a VT. + */ + temp = INREG8(PIXPIPE_CONFIG_0); + temp &= 0x7F; /* Save all but the 8 bit dac mode bit */ + temp |= (i810Reg->PixelPipeCfg0 & DAC_8_BIT); + OUTREG8( PIXPIPE_CONFIG_0, temp ); + + /* + * Code to restore any SVGA registers that have been saved/modified + * goes here. Note that it is allowable, and often correct, to + * only modify certain bits in a register by a read/modify/write cycle. + * + * A special case - when using an external clock-setting program, + * this function must not change bits associated with the clock + * selection. This condition can be checked by the condition: + * + * if (i810Reg->std.NoClock >= 0) + * restore clock-select bits. + */ + + /* VGA restore */ + if (vgaReg->MiscOutReg & 0x01) + vgap->IOBase = VGA_IOBASE_COLOR; + else + vgap->IOBase = VGA_IOBASE_MONO; + + mmioWriteMiscOut(vgap, vgaReg->MiscOutReg); + + for (i = 1; i < VGA_NUM_SEQ; i++) + mmioWriteSeq(vgap, i, vgaReg->Sequencer[i]); + + /* Ensure CRTC registers 0-7 are unlocked by clearing bit 7 or CRTC[17] */ + /* = CR11 */ + mmioWriteCrtc(vgap, 17, vgaReg->CRTC[17] & ~0x80); + + for (i = 0; i < VGA_NUM_CRTC; i++) { + mmioWriteCrtc(vgap, i, vgaReg->CRTC[i]); + } + + for (i = 0; i < VGA_NUM_GFX; i++) + mmioWriteGr(vgap, i, vgaReg->Graphics[i]); + + mmioEnablePalette(vgap); + for (i = 0; i < VGA_NUM_ATTR; i++) + mmioWriteAttr(vgap, i, vgaReg->Attribute[i]); + mmioDisablePalette(vgap); + + + mmioWriteCrtc(vgap, EXT_VERT_TOTAL, i810Reg->ExtVertTotal); + mmioWriteCrtc(vgap, EXT_VERT_DISPLAY, i810Reg->ExtVertDispEnd); + mmioWriteCrtc(vgap, EXT_VERT_SYNC_START, i810Reg->ExtVertSyncStart); + mmioWriteCrtc(vgap, EXT_VERT_BLANK_START, i810Reg->ExtVertBlankStart); + mmioWriteCrtc(vgap, EXT_HORIZ_TOTAL, i810Reg->ExtHorizTotal); + mmioWriteCrtc(vgap, EXT_HORIZ_BLANK, i810Reg->ExtHorizBlank); + + /* write CR40, CR42 first etc to get CR13 written as described in PRM */ + + mmioWriteCrtc(vgap, EXT_START_ADDR_HI, 0); + mmioWriteCrtc(vgap, EXT_START_ADDR, EXT_START_ADDR_ENABLE); + + mmioWriteCrtc(vgap, EXT_OFFSET, i810Reg->ExtOffset); + mmioWriteCrtc(vgap, 0x13, vgaReg->CRTC[0x13]); + + temp=mmioReadCrtc(vgap, INTERLACE_CNTL); + temp &= ~INTERLACE_ENABLE; + temp |= i810Reg->InterlaceControl; + mmioWriteCrtc(vgap, INTERLACE_CNTL, temp); + + temp=i810ReadControlMMIO(i810c, GRX, ADDRESS_MAPPING); + temp &= 0xE0; /* Save reserved bits 7:5 */ + temp |= i810Reg->AddressMapping; + i810WriteControlMMIO(i810c, GRX, ADDRESS_MAPPING, temp); + + /* Setting the OVRACT Register for video overlay*/ + OUTREG(0x6001C, (i810Reg->OverlayActiveEnd << 16) | i810Reg->OverlayActiveStart); + + /* Turn on DRAM Refresh */ + temp = INREG8( DRAM_ROW_CNTL_HI ); + temp &= ~DRAM_REFRESH_RATE; + temp |= DRAM_REFRESH_60HZ; + OUTREG8( DRAM_ROW_CNTL_HI, temp ); + + temp = INREG8( BITBLT_CNTL ); + temp &= ~COLEXP_MODE; + temp |= i810Reg->BitBLTControl; + OUTREG8( BITBLT_CNTL, temp ); + + temp = INREG8( DISPLAY_CNTL ); + temp &= ~(VGA_WRAP_MODE | GUI_MODE); + temp |= i810Reg->DisplayControl; + OUTREG8( DISPLAY_CNTL, temp ); + + + temp = INREG8( PIXPIPE_CONFIG_0 ); + temp &= 0x64; /* Save reserved bits 6:5,2 */ + temp |= i810Reg->PixelPipeCfg0; + OUTREG8( PIXPIPE_CONFIG_0, temp ); + + temp = INREG8( PIXPIPE_CONFIG_2 ); + temp &= 0xF3; /* Save reserved bits 7:4,1:0 */ + temp |= i810Reg->PixelPipeCfg2; + OUTREG8( PIXPIPE_CONFIG_2, temp ); + + temp = INREG8( PIXPIPE_CONFIG_1 ); + temp &= ~DISPLAY_COLOR_MODE; + temp &= 0xEF; /* Restore the CRT control bit */ + temp |= i810Reg->PixelPipeCfg1; + OUTREG8( PIXPIPE_CONFIG_1, temp ); + + OUTREG16(EIR, 0); + + itemp = INREG(FWATER_BLC); + itemp &= ~(LM_BURST_LENGTH | LM_FIFO_WATERMARK | + MM_BURST_LENGTH | MM_FIFO_WATERMARK ); + itemp |= i810Reg->LMI_FIFO_Watermark; + OUTREG(FWATER_BLC, itemp); + + + for (i = 0 ; i < 8 ; i++) { + OUTREG( FENCE+i*4, i810Reg->Fence[i] ); + if (I810_DEBUG & DEBUG_VERBOSE_VGA) + fprintf(stderr,"Fence Register : %x\n", i810Reg->Fence[i]); + } + + /* First disable the ring buffer (Need to wait for empty first?, if so + * should probably do it before entering this section) + */ + itemp = INREG(LP_RING + RING_LEN); + itemp &= ~RING_VALID_MASK; + OUTREG(LP_RING + RING_LEN, itemp ); + + /* Set up the low priority ring buffer. + */ + OUTREG(LP_RING + RING_TAIL, 0 ); + OUTREG(LP_RING + RING_HEAD, 0 ); + + i810c->LpRing.head = 0; + i810c->LpRing.tail = 0; + + itemp = INREG(LP_RING + RING_START); + itemp &= ~(START_ADDR); + itemp |= i810Reg->LprbStart; + OUTREG(LP_RING + RING_START, itemp ); + + itemp = INREG(LP_RING + RING_LEN); + itemp &= ~(RING_NR_PAGES | RING_REPORT_MASK | RING_VALID_MASK); + itemp |= i810Reg->LprbLen; + OUTREG(LP_RING + RING_LEN, itemp ); + + i810VGAProtect(card, FALSE); + + temp=mmioReadCrtc(vgap, IO_CTNL); + temp &= ~(EXTENDED_ATTR_CNTL | EXTENDED_CRTC_CNTL); + temp |= i810Reg->IOControl; + mmioWriteCrtc(vgap, IO_CTNL, temp); + /* Protect CRTC[0-7] */ + mmioWriteCrtc(vgap, 0x11, mmioReadCrtc(vgap, 0x11) | 0x80); +} + + +static Bool +i810SetMode(KdScreenInfo *screen, const KdMonitorTiming *t) +{ + + KdCardInfo *card = screen->card; + I810CardInfo *i810c = card->driver; + i810VGAPtr vgap = &i810c->vga; + + I810RegPtr i810Reg = &i810c->ModeReg; + vgaRegPtr pVga = &vgap->ModeReg; + + double dclk = t->clock/1000.0; + + switch (screen->fb[0].bitsPerPixel) { + case 8: + pVga->CRTC[0x13] = screen->width >> 3; + i810Reg->ExtOffset = screen->width >> 11; + i810Reg->PixelPipeCfg1 = DISPLAY_8BPP_MODE; + i810Reg->BitBLTControl = COLEXP_8BPP; + break; + case 16: + i810Reg->PixelPipeCfg1 = DISPLAY_16BPP_MODE; + pVga->CRTC[0x13] = screen->width >> 2; + i810Reg->ExtOffset = screen->width >> 10; + i810Reg->BitBLTControl = COLEXP_16BPP; + break; + case 24: + pVga->CRTC[0x13] = (screen->width * 3) >> 3; + i810Reg->ExtOffset = (screen->width * 3) >> 11; + + i810Reg->PixelPipeCfg1 = DISPLAY_24BPP_MODE; + i810Reg->BitBLTControl = COLEXP_24BPP; + break; + default: + break; + } + + i810Reg->PixelPipeCfg0 = DAC_8_BIT; + + /* Do not delay CRT Blank: needed for video overlay */ + i810Reg->PixelPipeCfg1 |= 0x10; + + /* Turn on Extended VGA Interpretation */ + i810Reg->IOControl = EXTENDED_CRTC_CNTL; + + /* Turn on linear and page mapping */ + i810Reg->AddressMapping = (LINEAR_MODE_ENABLE | + GTT_MEM_MAP_ENABLE); + + /* Turn on GUI mode */ + i810Reg->DisplayControl = HIRES_MODE; + + i810Reg->OverlayActiveStart = t->horizontal + t->hblank - 32; + i810Reg->OverlayActiveEnd = t->horizontal - 32; + + /* Turn on interlaced mode if necessary (it's not) */ + i810Reg->InterlaceControl = INTERLACE_DISABLE; + + /* + * Set the overscan color to 0. + * NOTE: This only affects >8bpp mode. + */ + pVga->Attribute[0x11] = 0; + + /* + * Calculate the VCLK that most closely matches the requested dot + * clock. + */ + i810CalcVCLK(screen, dclk); + + /* Since we program the clocks ourselves, always use VCLK2. */ + pVga->MiscOutReg |= 0x0C; + + /* Calculate the FIFO Watermark and Burst Length. */ + i810Reg->LMI_FIFO_Watermark = i810CalcWatermark(screen, dclk, FALSE); + + /* Setup the ring buffer */ + i810Reg->LprbTail = 0; + i810Reg->LprbHead = 0; + i810Reg->LprbStart = i810c->LpRing.mem.Start; + + if (i810Reg->LprbStart) + i810Reg->LprbLen = ((i810c->LpRing.mem.Size-4096) | + RING_NO_REPORT | RING_VALID); + else + i810Reg->LprbLen = RING_INVALID; + + return TRUE; +} + +static Bool +i810ModeInit(KdScreenInfo *screen, const KdMonitorTiming *t) +{ + + KdCardInfo *card = screen->card; + I810CardInfo *i810c = card->driver; + i810VGAPtr vgap = &i810c->vga; + vgaRegPtr pVga; + +/* fprintf(stderr,"i810ModeInit\n"); */ + + i810VGAUnlock(vgap); + + if (!i810VGAInit(screen, t)) return FALSE; + pVga = &vgap->ModeReg; + + if (!i810SetMode(screen, t)) return FALSE; + + DoRestore(screen->card, &vgap->ModeReg, &i810c->ModeReg, FALSE); + + return TRUE; +} + +Bool +i810VGAInit(KdScreenInfo *screen, const KdMonitorTiming *t) +{ + unsigned int i; + + int hactive, hblank, hbp, hfp; + int vactive, vblank, vbp, vfp; + int h_screen_off, h_adjust, h_total, h_display_end, h_blank_start; + int h_blank_end, h_sync_start, h_sync_end, v_total, v_retrace_start; + int v_retrace_end, v_display_end, v_blank_start, v_blank_end; + + KdCardInfo *card = screen->card; + I810CardInfo *i810c = card->driver; + + i810VGAPtr vgap = &i810c->vga; + I810RegPtr ireg = &i810c->ModeReg; + + + vgaRegPtr regp; + int depth = screen->fb[0].depth; + + regp = &vgap->ModeReg; + + /* + * compute correct Hsync & Vsync polarity + */ + + regp->MiscOutReg = 0x23; + if (t->vpol == KdSyncNegative) regp->MiscOutReg |= 0x40; + if (t->hpol == KdSyncNegative) regp->MiscOutReg |= 0x80; + + /* + * Time Sequencer + */ + if (depth == 4) + regp->Sequencer[0] = 0x02; + else + regp->Sequencer[0] = 0x00; + /* No support for 320 or 360 x resolution */ + regp->Sequencer[1] = 0x01; + + if (depth == 1) + regp->Sequencer[2] = 1 << BIT_PLANE; + else + regp->Sequencer[2] = 0x0F; + + regp->Sequencer[3] = 0x00; /* Font select */ + + if (depth < 8) + regp->Sequencer[4] = 0x06; /* Misc */ + else + regp->Sequencer[4] = 0x0E; /* Misc */ + + hactive = t->horizontal; + hblank = t->hblank; + hbp = t->hbp; + hfp = t->hfp; + + vactive = t->vertical; + vblank = t->vblank; + vbp = t->vbp; + vfp = t->vfp; + + switch (screen->fb[0].bitsPerPixel) { + case 8: + hactive /= 8; + hblank /= 8; + hfp /= 8; + hbp /= 8; + h_screen_off = hactive; + h_adjust = 1; + break; + case 16: + hactive /= 8; + hblank /= 8; + hfp /= 8; + hbp /= 8; + + h_screen_off = hactive * 2; + h_adjust = 1; + break; + case 24: + hactive /= 8; + hblank /= 8; + hfp /= 8; + hbp /= 8; + + h_screen_off = hactive * 3; + h_adjust = 1; + break; + case 32: + hactive /= 8; + hblank /= 8; + hfp /= 8; + hbp /= 8; + + h_screen_off = hactive * 4; + h_adjust = 1; + break; + } + + /* + * Compute horizontal register values from timings + */ + h_total = hactive + hblank - 5; + h_display_end = hactive - 1; + h_blank_start = h_display_end; + h_blank_end = h_blank_start + hblank; + + h_sync_start = hactive + hfp + h_adjust; + h_sync_end = h_sync_start + hblank - hbp - hfp; + + /* Set CRTC regs for horizontal timings */ + regp->CRTC[0x0] = h_total; + ireg->ExtHorizTotal=(h_total & 0x100) >> 8; + + regp->CRTC[0x1] = h_display_end; + + regp->CRTC[0x2] = h_blank_start; + + regp->CRTC[0x3] = 0x80 | (h_blank_end & 0x1f); + regp->CRTC[0x5] = (h_blank_end & 0x20) << 2; + + regp->CRTC[0x4] = h_sync_start; + + regp->CRTC[0x5] |= h_sync_end & 0x1f; + + regp->CRTC[0x13] = h_screen_off; + ireg->ExtOffset = h_screen_off >> 8; + + /* Compute vertical timings */ + v_total = vactive + vblank - 2; + v_retrace_start = vactive + vfp - 1; + v_retrace_end = v_retrace_start + vblank - vbp - vfp; + v_display_end = vactive - 1; + v_blank_start = vactive - 1; + v_blank_end = v_blank_start + vblank /* - 1 */; + + regp->CRTC[0x6] = v_total; + ireg->ExtVertTotal = v_total >> 8; + + regp->CRTC[0x10] = v_retrace_start; + ireg->ExtVertSyncStart = v_retrace_start >> 8; + + regp->CRTC[0x11] = v_retrace_end; + + regp->CRTC[0x12] = v_display_end; + ireg->ExtVertDispEnd = v_display_end >> 8; + + regp->CRTC[0x15] = v_blank_start; + ireg->ExtVertBlankStart = v_blank_start >> 8; + + regp->CRTC[0x16] = v_blank_end; + + if (depth < 8) + regp->CRTC[23] = 0xE3; + else + regp->CRTC[23] = 0xC3; + regp->CRTC[24] = 0xFF; + + /* + * Graphics Display Controller + */ + regp->Graphics[0] = 0x00; + regp->Graphics[1] = 0x00; + regp->Graphics[2] = 0x00; + regp->Graphics[3] = 0x00; + if (depth == 1) { + regp->Graphics[4] = BIT_PLANE; + regp->Graphics[5] = 0x00; + } else { + regp->Graphics[4] = 0x00; + if (depth == 4) + regp->Graphics[5] = 0x02; + else + regp->Graphics[5] = 0x40; + } + regp->Graphics[6] = 0x05; + regp->Graphics[7] = 0x0F; + regp->Graphics[8] = 0xFF; + + if (depth == 1) { + /* Initialise the Mono map according to which bit-plane gets used */ + + Bool flipPixels = FALSE; /* maybe support this in the future? */ + + for (i=0; i<16; i++) + if (((i & (1 << BIT_PLANE)) != 0) != flipPixels) + regp->Attribute[i] = WHITE_VALUE; + else + regp->Attribute[i] = BLACK_VALUE; + + regp->Attribute[16] = 0x01; /* -VGA2- */ + if (!vgap->ShowOverscan) + regp->Attribute[OVERSCAN] = OVERSCAN_VALUE; /* -VGA2- */ + } else { + regp->Attribute[0] = 0x00; /* standard colormap translation */ + regp->Attribute[1] = 0x01; + regp->Attribute[2] = 0x02; + regp->Attribute[3] = 0x03; + regp->Attribute[4] = 0x04; + regp->Attribute[5] = 0x05; + regp->Attribute[6] = 0x06; + regp->Attribute[7] = 0x07; + regp->Attribute[8] = 0x08; + regp->Attribute[9] = 0x09; + regp->Attribute[10] = 0x0A; + regp->Attribute[11] = 0x0B; + regp->Attribute[12] = 0x0C; + regp->Attribute[13] = 0x0D; + regp->Attribute[14] = 0x0E; + regp->Attribute[15] = 0x0F; + if (depth == 4) + regp->Attribute[16] = 0x81; + else + regp->Attribute[16] = 0x41; + /* Attribute[17] (overscan) was initialised earlier */ + } + regp->Attribute[18] = 0x0F; + regp->Attribute[19] = 0x00; + regp->Attribute[20] = 0x00; + + return(TRUE); +} + +void +i810VGALock(i810VGAPtr vgap) +{ + /* Protect CRTC[0-7] */ + mmioWriteCrtc(vgap, 0x11, mmioReadCrtc(vgap, 0x11) & ~0x80); +} + +void +i810VGAUnlock(i810VGAPtr vgap) +{ + /* Unprotect CRTC[0-7] */ + mmioWriteCrtc(vgap, 0x11, mmioReadCrtc(vgap, 0x11) | 0x80); +} + +static void +i810Restore(KdCardInfo *card) { + + I810CardInfo *i810c = card->driver; + + i810VGAPtr vgap = &i810c->vga; + + if (I810_DEBUG) + fprintf(stderr,"i810Restore\n"); + + DoRestore(card, &vgap->SavedReg, &i810c->SavedReg, TRUE); +} + +Bool +i810Enable (ScreenPtr pScreen) +{ + KdScreenPriv(pScreen); + KdScreenInfo *screen = pScreenPriv->screen; + KdCardInfo *card = pScreenPriv->card; + I810CardInfo *i810c = card->driver; + i810VGAPtr vgap = &i810c->vga; + const KdMonitorTiming *t; + + if (I810_DEBUG) + fprintf(stderr,"i810Enable\n"); + + vgap->IOBase = (mmioReadMiscOut(vgap) & 0x01) ? + VGA_IOBASE_COLOR : VGA_IOBASE_MONO; + + { + I810RegPtr i810Reg = &i810c->ModeReg; + int i; + + for (i = 0 ; i < 8 ; i++) + i810Reg->Fence[i] = 0; + } + + t = KdFindMode (screen, i810ModeSupported); + + if (!i810BindGARTMemory(screen)) + return FALSE; + + if (!i810ModeInit(screen, t)) return FALSE; + + { + /* DPMS power on state */ + + unsigned char SEQ01=0; + int DPMSSyncSelect=0; + + SEQ01 = 0x00; + DPMSSyncSelect = HSYNC_ON | VSYNC_ON; + + SEQ01 |= i810ReadControlMMIO(i810c, SRX, 0x01) & ~0x20; + i810WriteControlMMIO(i810c, SRX, 0x01, SEQ01); + + /* Set the DPMS mode */ + OUTREG8(DPMS_SYNC_SELECT, DPMSSyncSelect); + } + + return TRUE; +} + + +void +i810Disable(ScreenPtr pScreen) { + + KdScreenPriv(pScreen); + KdScreenInfo *screen = pScreenPriv->screen; + KdCardInfo *card = pScreenPriv->card; + I810CardInfo *i810c = card->driver; + + i810VGAPtr vgap = &i810c->vga; + + if (I810_DEBUG) + fprintf(stderr,"i810Disable\n"); + + i810Restore(screen->card); + + if (!i810UnbindGARTMemory(screen)) + return; + + i810VGALock(vgap); +} + + +static Bool +i810DPMS(ScreenPtr pScreen, int mode) +{ + KdScreenPriv(pScreen); + KdCardInfo *card = pScreenPriv->card; + I810CardInfo *i810c = card->driver; + + unsigned char SEQ01=0; + int DPMSSyncSelect=0; + + if (I810_DEBUG) + fprintf(stderr,"i810DPMS: %d\n",mode); + + switch (mode) { + case KD_DPMS_NORMAL: + /* Screen: On; HSync: On, VSync: On */ + SEQ01 = 0x00; + DPMSSyncSelect = HSYNC_ON | VSYNC_ON; + break; + case KD_DPMS_STANDBY: + /* Screen: Off; HSync: Off, VSync: On */ + SEQ01 = 0x20; + DPMSSyncSelect = HSYNC_OFF | VSYNC_ON; + break; + case KD_DPMS_SUSPEND: + /* Screen: Off; HSync: On, VSync: Off */ + SEQ01 = 0x20; + DPMSSyncSelect = HSYNC_ON | VSYNC_OFF; + break; + case KD_DPMS_POWERDOWN: + /* Screen: Off; HSync: Off, VSync: Off */ + SEQ01 = 0x20; + DPMSSyncSelect = HSYNC_OFF | VSYNC_OFF; + break; + } + + /* Turn the screen on/off */ + SEQ01 |= i810ReadControlMMIO(i810c, SRX, 0x01) & ~0x20; + i810WriteControlMMIO(i810c, SRX, 0x01, SEQ01); + + /* Set the DPMS mode */ + OUTREG8(DPMS_SYNC_SELECT, DPMSSyncSelect); + return TRUE; +} + + +void i810GetColors (ScreenPtr pScreen, int fb, int ndefs, xColorItem *c) { + + if (I810_DEBUG) + fprintf(stderr,"i810GetColors (NOT IMPLEMENTED)\n"); +} + +#define DACDelay(hw) \ + do { \ + unsigned char temp = Vminb((hw)->IOBase + VGA_IN_STAT_1_OFFSET); \ + temp = Vminb((hw)->IOBase + VGA_IN_STAT_1_OFFSET); \ + } while (0) + +void i810PutColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs) { + + KdScreenPriv(pScreen); + KdScreenInfo *screen = pScreenPriv->screen; + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + + i810VGAPtr vgap = &i810c->vga; + + if (I810_DEBUG) + fprintf(stderr,"i810PutColors\n"); + + while (ndef--) + { + mmioWriteDacWriteAddr(vgap, pdefs->pixel); + DACDelay(vgap); + mmioWriteDacData(vgap, pdefs->red); + DACDelay(vgap); + mmioWriteDacData(vgap, pdefs->green); + DACDelay(vgap); + mmioWriteDacData(vgap, pdefs->blue); + DACDelay(vgap); + + pdefs++; + } +} + + +KdCardFuncs i810Funcs = { + i810CardInit, /* cardinit */ + i810ScreenInit, /* scrinit */ + i810InitScreen, /* initScreen */ + i810Preserve, /* preserve */ + i810Enable, /* enable */ + i810DPMS, /* dpms */ + i810Disable, /* disable */ + i810Restore, /* restore */ + i810ScreenFini, /* scrfini */ + i810CardFini, /* cardfini */ + + i810CursorInit, /* initCursor */ + i810CursorEnable, /* enableCursor */ + i810CursorDisable, /* disableCursor */ + i810CursorFini, /* finiCursor */ + NULL, /* recolorCursor */ + + i810InitAccel, /* initAccel */ + i810EnableAccel, /* enableAccel */ + i810SyncAccel, /* syncAccel */ + i810DisableAccel, /* disableAccel */ + i810FiniAccel, /* finiAccel */ + + i810GetColors, /* getColors */ + i810PutColors, /* putColors */ +}; Index: xc/programs/Xserver/hw/kdrive/i810/i810.h diff -u /dev/null xc/programs/Xserver/hw/kdrive/i810/i810.h:1.1 --- /dev/null Mon Jun 4 12:40:16 2001 +++ xc/programs/Xserver/hw/kdrive/i810/i810.h Thu Mar 29 21:18:41 2001 @@ -0,0 +1,503 @@ +/* COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 2000, 2001 Nokia Home Communications + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY +SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + +X Window System is a trademark of The Open Group */ + +/* $XFree86: xc/programs/Xserver/hw/kdrive/i810/i810.h,v 1.1 2001/03/30 02:18:41 keithp Exp $ */ + +/* + * Author: + * Pontus Lidman + */ + +#ifndef _I810_H_ +#define _I810_H_ + +#include "i810_reg.h" + +/* Globals */ + +typedef struct _I810Rec *I810Ptr; + +/* Linear region allocated in framebuffer. + */ +typedef struct { + unsigned long Start; + unsigned long End; + unsigned long Size; +} I810MemRange; + +typedef struct { + int tail_mask; + I810MemRange mem; + unsigned char *virtual_start; + int head; + int tail; + int space; +} I810RingBuffer; + +typedef struct { + unsigned char DisplayControl; + unsigned char PixelPipeCfg0; + unsigned char PixelPipeCfg1; + unsigned char PixelPipeCfg2; + unsigned short VideoClk2_M; + unsigned short VideoClk2_N; + unsigned char VideoClk2_DivisorSel; + unsigned char AddressMapping; + unsigned char IOControl; + unsigned char BitBLTControl; + unsigned char ExtVertTotal; + unsigned char ExtVertDispEnd; + unsigned char ExtVertSyncStart; + unsigned char ExtVertBlankStart; + unsigned char ExtHorizTotal; + unsigned char ExtHorizBlank; + unsigned char ExtOffset; + unsigned char InterlaceControl; + unsigned int LMI_FIFO_Watermark; + + unsigned int LprbTail; + unsigned int LprbHead; + unsigned int LprbStart; + unsigned int LprbLen; + + unsigned int Fence[8]; + + unsigned short OverlayActiveStart; + unsigned short OverlayActiveEnd; + + +} I810RegRec, *I810RegPtr; + +#define minb(p) *(volatile CARD8 *)(i810c->MMIOBase + (p)) +#define moutb(p,v) *(volatile CARD8 *)(i810c->MMIOBase + (p)) = (v) + +#define OUT_RING(n) { \ + if (I810_DEBUG & DEBUG_VERBOSE_RING) \ + ErrorF( "OUT_RING %x: %x\n", outring, n); \ + *(volatile unsigned int *)(virt + outring) = n; \ + outring += 4; \ + outring &= ringmask; \ +} + +#define ADVANCE_LP_RING() { \ + i810c->LpRing.tail = outring; \ + OUTREG(LP_RING + RING_TAIL, outring); \ +} + +#ifdef __GNUC__ +#define LP_RING_MESSAGE(n) \ + ErrorF("BEGIN_LP_RING %d in %s\n", n, __FUNCTION__) +#else +#define LP_RING_MESSAGE(n) \ + ErrorF("BEGIN_LP_RING %d in %s:%d\n", n, __FILE__, __LINE__) +#endif + +#define BEGIN_LP_RING(n) \ + unsigned int outring, ringmask; \ + volatile unsigned char *virt; \ + if (n>2 && (I810_DEBUG&DEBUG_ALWAYS_SYNC)) i810Sync( screen ); \ + if (i810c->LpRing.space < n*4) i810WaitLpRing( screen, n*4, 0); \ + i810c->LpRing.space -= n*4; \ + if (I810_DEBUG & DEBUG_VERBOSE_RING) \ + LP_RING_MESSAGE(n); \ + outring = i810c->LpRing.tail; \ + ringmask = i810c->LpRing.tail_mask; \ + virt = i810c->LpRing.virtual_start; + +/* Memory mapped register access macros */ +#define INREG8(addr) *(volatile CARD8 *)(i810c->MMIOBase + (addr)) +#define INREG16(addr) *(volatile CARD16 *)(i810c->MMIOBase + (addr)) +#define INREG(addr) *(volatile CARD32 *)(i810c->MMIOBase + (addr)) + +#define OUTREG8(addr, val) do { \ + *(volatile CARD8 *)(i810c->MMIOBase + (addr)) = (val); \ + if (I810_DEBUG&DEBUG_VERBOSE_OUTREG) \ + ErrorF( "OUTREG8(%x, %x)\n", addr, val); \ +} while (0) + +#define OUTREG16(addr, val) do { \ + *(volatile CARD16 *)(i810c->MMIOBase + (addr)) = (val); \ + if (I810_DEBUG&DEBUG_VERBOSE_OUTREG) \ + ErrorF( "OUTREG16(%x, %x)\n", addr, val); \ +} while (0) + +#define OUTREG(addr, val) do { \ + *(volatile CARD32 *)(i810c->MMIOBase + (addr)) = (val); \ + if (I810_DEBUG&DEBUG_VERBOSE_OUTREG) \ + ErrorF( "OUTREG(%x, %x)\n", addr, val); \ +} while (0) + +/* To remove all debugging, make sure I810_DEBUG is defined as a + * preprocessor symbol, and equal to zero. + */ + +#define I810_DEBUG 0 + +#ifndef I810_DEBUG +#warning "Debugging enabled - expect reduced performance" +extern int I810_DEBUG; +#endif + +#define DEBUG_VERBOSE_ACCEL 0x1 +#define DEBUG_VERBOSE_SYNC 0x2 +#define DEBUG_VERBOSE_VGA 0x4 +#define DEBUG_VERBOSE_RING 0x8 +#define DEBUG_VERBOSE_OUTREG 0x10 +#define DEBUG_VERBOSE_MEMORY 0x20 +#define DEBUG_VERBOSE_CURSOR 0x40 +#define DEBUG_ALWAYS_SYNC 0x80 +#define DEBUG_VERBOSE_DRI 0x100 + + +/* Size of the mmio region. + */ +#define I810_REG_SIZE 0x80000 + +/* PCI identifiers */ +#ifndef PCI_CHIP_I810 +#define PCI_CHIP_I810 0x7121 +#define PCI_CHIP_I810_DC100 0x7123 +#define PCI_CHIP_I810_E 0x7125 +#define PCI_CHIP_I815 0x1132 +#define PCI_CHIP_I810_BRIDGE 0x7120 +#define PCI_CHIP_I810_DC100_BRIDGE 0x7122 +#define PCI_CHIP_I810_E_BRIDGE 0x7124 +#define PCI_CHIP_I815_BRIDGE 0x1130 +#endif + + +#define IS_I810(i810c) (i810c->PciInfo->chipType == PCI_CHIP_I810 || \ + i810c->PciInfo->chipType == PCI_CHIP_I810_DC100 || \ + i810c->PciInfo->chipType == PCI_CHIP_I810_E) +#define IS_I815(i810c) (i810c->PciInfo->chipType == PCI_CHIP_I815) + + +/* default number of VGA registers stored internally */ +#define VGA_NUM_CRTC 25 /* 0x19 */ +#define VGA_NUM_SEQ 5 +#define VGA_NUM_GFX 9 +#define VGA_NUM_ATTR 21 + +/* + * Settings of standard VGA registers. + */ +typedef struct { + unsigned char MiscOutReg; /* */ + unsigned char CRTC[VGA_NUM_CRTC]; /* Crtc Controller */ + unsigned char Sequencer[VGA_NUM_SEQ]; /* Video Sequencer */ + unsigned char Graphics[VGA_NUM_GFX]; /* Video Graphics */ + unsigned char Attribute[VGA_NUM_ATTR]; /* Video Atribute */ + unsigned char DAC[768]; /* Internal Colorlookuptable */ +} vgaRegRec, *vgaRegPtr; + + +typedef struct _i810VGARec *i810VGAPtr; + +/* VGA registers */ +typedef struct _i810VGARec { + int IOBase; /* I/O Base address */ + CARD8 * MMIOBase; /* Pointer to MMIO start */ + vgaRegRec SavedReg; /* saved registers */ + vgaRegRec ModeReg; /* register settings for + current mode */ + Bool ShowOverscan; + Bool paletteEnabled; + Bool cmapSaved; +} i810VGARec; + +typedef struct _i810CardInfo { + int videoRam; + int MaxClock; + long FbMapSize; + int cpp; /* chars per pixel */ + + unsigned long LinearAddr; + unsigned long MMIOAddr; + + unsigned char *MMIOBase; + unsigned char *FbBase; + + Bool GttBound; + Bool agpAcquired2d; + int VramKey; + unsigned long VramOffset; + int DcacheKey; + unsigned long DcacheOffset; + int HwcursKey; + unsigned long HwcursOffset; + + I810MemRange DcacheMem; + I810MemRange SysMem; + + I810MemRange SavedDcacheMem; + I810MemRange SavedSysMem; + + unsigned int bufferOffset; /* for I810SelectBuffer */ + Bool DoneFrontAlloc; + BoxRec FbMemBox; + I810MemRange FrontBuffer; + I810MemRange Scratch; + I810MemRange XvMem; + + int LmFreqSel; + + i810VGARec vga; + + I810RegRec SavedReg; + I810RegRec ModeReg; + I810RingBuffer LpRing; + + unsigned int BR[20]; + + int CursorOffset; + unsigned long CursorPhysical; + unsigned long CursorStart; + unsigned long OverlayPhysical; + unsigned long OverlayStart; + int colorKey; + + Bool NeedToSync; /* Need to sync accel stuff */ + + int nextColorExpandBuf; + + ScreenBlockHandlerProcPtr BlockHandler; + +#ifdef XV + KdVideoAdaptorPtr adaptor; +#endif + +} I810CardInfo; + +#define getI810CardInfo(kd) ((I810CardInfo *) ((kd)->card->driver)) +#define i810CardInfo(kd) I810CardInfo *i810c = getI810CardInfo(kd) + +#define getI810ScreenInfo(kd) ((I810ScreenInfo *) ((kd)->screen->driver)) +#define i810ScreenInfo(kd) I810ScreenInfo *i810s = getI810ScreenInfo(kd) + +typedef struct _i810Cursor { + int width, height; + int xhot, yhot; + Bool has_cursor; + CursorPtr pCursor; +} i810Cursor, *i810CursorPtr; + +typedef struct _i810ScreenInfo { + i810Cursor cursor; +} I810ScreenInfo; + +#define I810_CURSOR_HEIGHT 64 +#define I810_CURSOR_WIDTH 64 + +/* init functions (i810.c) */ + +Bool +i810CardInit (KdCardInfo *card); + +Bool +i810ScreenInit (KdScreenInfo *screen); + +/* The cursor functions (i810_cursor.c) */ + +Bool +i810CursorInit(ScreenPtr pScreen); + +void +i810CursorEnable (ScreenPtr pScreen); + +void +i810CursorDisable (ScreenPtr pScreen); + +void +i810CursorFini (ScreenPtr pScreen); + +/* Accel functions (i810draw.c) */ + +Bool +i810InitAccel(ScreenPtr); + +void +i810EnableAccel (ScreenPtr); + +void +i810SyncAccel (ScreenPtr); + +void +i810DisableAccel (ScreenPtr); + +void +i810FiniAccel (ScreenPtr); + +void +i810FillBoxSolid (KdScreenInfo *screen, int nBox, BoxPtr pBox, + unsigned long pixel, int alu, unsigned long planemask); + + +extern KdCardFuncs i810Funcs; + +/* Standard VGA registers */ + +#define VGA_ATTR_INDEX 0x3C0 +#define VGA_ATTR_DATA_W 0x3C0 +#define VGA_ATTR_DATA_R 0x3C1 +#define VGA_IN_STAT_0 0x3C2 /* read */ +#define VGA_MISC_OUT_W 0x3C2 /* write */ +#define VGA_ENABLE 0x3C3 +#define VGA_SEQ_INDEX 0x3C4 +#define VGA_SEQ_DATA 0x3C5 +#define VGA_DAC_MASK 0x3C6 +#define VGA_DAC_READ_ADDR 0x3C7 +#define VGA_DAC_WRITE_ADDR 0x3C8 +#define VGA_DAC_DATA 0x3C9 +#define VGA_FEATURE_R 0x3CA /* read */ +#define VGA_MISC_OUT_R 0x3CC /* read */ +#define VGA_GRAPH_INDEX 0x3CE +#define VGA_GRAPH_DATA 0x3CF + +#define VGA_IOBASE_MONO 0x3B0 +#define VGA_IOBASE_COLOR 0x3D0 + +#define VGA_CRTC_INDEX_OFFSET 0x04 +#define VGA_CRTC_DATA_OFFSET 0x05 +#define VGA_IN_STAT_1_OFFSET 0x0A /* read */ +#define VGA_FEATURE_W_OFFSET 0x0A /* write */ + +/* VGA stuff */ +#define BIT_PLANE 3 /* Which plane we write to in mono mode */ + +/* DAC indices for white and black */ +#define WHITE_VALUE 0x3F +#define BLACK_VALUE 0x00 +#define OVERSCAN_VALUE 0x01 + +#define OVERSCAN 0x11 /* Index of OverScan register */ + +void +i810VGAUnlock(i810VGAPtr vgap); + +void +i810VGALock(i810VGAPtr vgap); + +Bool +i810VGAInit(KdScreenInfo *scrninfp, const KdMonitorTiming *t); + +void +i810VGABlankScreen(KdCardInfo *card, Bool on); + +void +i810AdjustFrame(KdScreenInfo *screen, int x, int y, int flags); + +Bool +i810VGAMapMem(KdCardInfo *card); + +void +i810VGASave(KdCardInfo *card, vgaRegPtr save, int flags); + +void +i810PrintErrorState(KdCardInfo *card); + +void +i810VGAGetIOBase(i810VGAPtr vgap); + +/* + * MMIO versions of the register access functions. These require + * hwp->MemBase to be set in such a way that when the standard VGA port + * address is added the correct memory address results. + */ + +#define Vminb(p) ( *(volatile CARD8 *)(vgap->MMIOBase + (p))) +#define Vmoutb(p,v) ( *(volatile CARD8 *)(vgap->MMIOBase + (p)) = (v)) + +#define mmioWriteCrtc(vgap, index, value) { \ + Vmoutb(vgap->IOBase + VGA_CRTC_INDEX_OFFSET, index); \ + Vmoutb(vgap->IOBase + VGA_CRTC_DATA_OFFSET, value); \ +} + +#define mmioReadCrtc(vgap, index) ( \ + Vmoutb(vgap->IOBase + VGA_CRTC_INDEX_OFFSET, index), \ + Vminb(vgap->IOBase + VGA_CRTC_DATA_OFFSET) \ +) + +#define mmioWriteGr(vgap, index, value) { \ + Vmoutb(VGA_GRAPH_INDEX, index); \ + Vmoutb(VGA_GRAPH_DATA, value); \ +} + +#define mmioReadGr(vgap, index) ( \ + Vmoutb(VGA_GRAPH_INDEX, index), \ + Vminb(VGA_GRAPH_DATA) \ +) + +#define mmioWriteSeq(vgap, index, value) {\ + Vmoutb(VGA_SEQ_INDEX, index); \ + Vmoutb(VGA_SEQ_DATA, value); \ +} + +#define mmioReadSeq(vgap, index) ( \ + Vmoutb(VGA_SEQ_INDEX, index), \ + Vminb(VGA_SEQ_DATA) \ +) + +#define mmioWriteAttr(vgap, index, value) { \ + (void) Vminb(vgap->IOBase + VGA_IN_STAT_1_OFFSET); \ + Vmoutb(VGA_ATTR_INDEX, index); \ + Vmoutb(VGA_ATTR_DATA_W, value); \ +} + +#define mmioReadAttr(vgap, index) ( \ + (void) Vminb(vgap->IOBase + VGA_IN_STAT_1_OFFSET), \ + Vmoutb(VGA_ATTR_INDEX, index), \ + Vminb(VGA_ATTR_DATA_R) \ +) + +#define mmioWriteMiscOut(vgap, value) Vmoutb(VGA_MISC_OUT_W, value) + + +#define mmioReadMiscOut(vgap) Vminb(VGA_MISC_OUT_R) + +#define mmioEnablePalette(vgap) { \ + (void) Vminb(vgap->IOBase + VGA_IN_STAT_1_OFFSET); \ + Vmoutb(VGA_ATTR_INDEX, 0x00); \ + vgap->paletteEnabled = TRUE; \ +} + +#define mmioDisablePalette(vgap) { \ + (void) Vminb(vgap->IOBase + VGA_IN_STAT_1_OFFSET); \ + Vmoutb(VGA_ATTR_INDEX, 0x20); \ + vgap->paletteEnabled = FALSE; \ +} + +#define mmioWriteDacWriteAddr(vgap, value) Vmoutb(VGA_DAC_WRITE_ADDR, value) + +#define mmioWriteDacData(vgap, value) Vmoutb(VGA_DAC_DATA, value) + +#endif /* _I810_H_ */ Index: xc/programs/Xserver/hw/kdrive/i810/i810_cursor.c diff -u /dev/null xc/programs/Xserver/hw/kdrive/i810/i810_cursor.c:1.1 --- /dev/null Mon Jun 4 12:40:16 2001 +++ xc/programs/Xserver/hw/kdrive/i810/i810_cursor.c Thu Mar 29 21:18:41 2001 @@ -0,0 +1,409 @@ +/* COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 2000, 2001 Nokia Home Communications + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY +SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + +X Window System is a trademark of The Open Group */ + +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + + +/* $XFree86: xc/programs/Xserver/hw/kdrive/i810/i810_cursor.c,v 1.1 2001/03/30 02:18:41 keithp Exp $ */ + +/* i810_cursor.c: KDrive hardware cursor routines for the i810 chipset */ + +/* + * Authors: + * Keith Whitwell + * Pontus Lidman + * + */ + +#include "kdrive.h" +#include "kxv.h" +#include "i810.h" +#include "cursorstr.h" + +#define SetupCursor(s) KdScreenPriv(s); \ + i810CardInfo(pScreenPriv); \ + i810ScreenInfo(pScreenPriv); \ + i810Cursor *pCurPriv = &i810s->cursor + + +static void +writeStandardMMIO(I810CardInfo *i810c, int addr, CARD8 val) { + moutb(addr, val); +} + +void +_i810MoveCursor(ScreenPtr pScreen, int x, int y) { + SetupCursor(pScreen); + int flag; + + if (I810_DEBUG & DEBUG_VERBOSE_CURSOR) + ErrorF( "I810SetCursorPosition %d %d\n", x, y); + + x += i810c->CursorOffset; + + if (x >= 0) flag = CURSOR_X_POS; + else { + flag = CURSOR_X_NEG; + x=-x; + } + + OUTREG8( CURSOR_X_LO, x&0xFF); + OUTREG8( CURSOR_X_HI, (((x >> 8) & 0x07) | flag)); + + if (y >= 0) flag = CURSOR_Y_POS; + else { + flag = CURSOR_Y_NEG; + y=-y; + } + OUTREG8( CURSOR_Y_LO, y&0xFF); + OUTREG8( CURSOR_Y_HI, (((y >> 8) & 0x07) | flag)); + + /* Enable cursor */ + OUTREG( CURSOR_BASEADDR, i810c->CursorPhysical); + OUTREG8( CURSOR_CONTROL, CURSOR_ORIGIN_DISPLAY | CURSOR_MODE_64_3C); + +} + +static void i810LoadCursor(ScreenPtr pScreen, int x, int y); + +static void +i810MoveCursor (ScreenPtr pScreen, int x, int y) +{ + SetupCursor (pScreen); + + if (!pCurPriv->has_cursor) + return; + + if (!pScreenPriv->enabled) + return; + + _i810MoveCursor (pScreen, x, y); + + i810LoadCursor(pScreen, x, y); +} + +static void +_i810SetCursorColors(ScreenPtr pScreen) { /* int bg, int fg */ + + SetupCursor(pScreen); + int tmp; + + int bg = 0xffffff; + int fg = 0x000000; + + tmp=INREG8(PIXPIPE_CONFIG_0); + tmp |= EXTENDED_PALETTE; + OUTREG8( PIXPIPE_CONFIG_0, tmp); + + writeStandardMMIO(i810c, DACMASK, 0xFF); + writeStandardMMIO(i810c, DACWX, 0x04); + + writeStandardMMIO(i810c, DACDATA, (bg & 0x00FF0000) >> 16); + writeStandardMMIO(i810c, DACDATA, (bg & 0x0000FF00) >> 8); + writeStandardMMIO(i810c, DACDATA, (bg & 0x000000FF)); + + writeStandardMMIO(i810c, DACDATA, (fg & 0x00FF0000) >> 16); + writeStandardMMIO(i810c, DACDATA, (fg & 0x0000FF00) >> 8); + writeStandardMMIO(i810c, DACDATA, (fg & 0x000000FF)); + + tmp=INREG8( PIXPIPE_CONFIG_0 ); + tmp &= ~EXTENDED_PALETTE; + OUTREG8( PIXPIPE_CONFIG_0, tmp ); +} + +static void i810LoadCursor(ScreenPtr pScreen, int x, int y) { + + SetupCursor(pScreen); + + int w, h; + unsigned short r; + unsigned char *msk, *mskLine, *src, *srcLine; + + int i, j; + int src_stride, src_width; + + CursorPtr pCursor = pCurPriv->pCursor; + CursorBitsPtr bits = pCursor->bits; + CARD8 tmp; + unsigned char *ram, *ramLine; + + pCurPriv->pCursor = pCursor; + pCurPriv->xhot = pCursor->bits->xhot; + pCurPriv->yhot = pCursor->bits->yhot; + + ramLine = (unsigned char *)(i810c->FbBase + i810c->CursorStart); + mskLine = (unsigned char *) bits->mask; + srcLine = (unsigned char *) bits->source; + + h = bits->height; + if (h > I810_CURSOR_HEIGHT) + h = I810_CURSOR_HEIGHT; + + + src_stride = BitmapBytePad(bits->width); /* bytes per line */ + src_width = (bits->width + 7) >> 3; + + for (i = 0; i < I810_CURSOR_HEIGHT; i++) { + msk = mskLine; + src = srcLine; + ram = ramLine; + mskLine += src_stride; + srcLine += src_stride; + ramLine += I810_CURSOR_WIDTH / 4; + + for (j = 0; j < I810_CURSOR_WIDTH / 8; j++) { + + unsigned short m, s, b1, b2; + + if (i < h && j < src_width) + { + m = *msk++; + s = *src++ & m; + m = ~m; + /* mask off right side */ + if (j == src_width - 1 && (bits->width & 7)) + { + m |= 0xff << (bits->width & 7); + } + } + else + { + m = 0xff; + s = 0x00; + } + + /* The i810 stores the cursor in an interleaved bitmap format, + in reverse byte order */ + /* Not tested with cursors bigger than 16x16 !!! */ + + ram[8+(j ^ 1)] = s; /* b2 */ + ram[0+(j ^ 1)] = m; /* b1 */ + } + } + /* Set new color */ + _i810SetCursorColors (pScreen); + + /* Move to new position */ + _i810MoveCursor (pScreen, x, y); + + /* Enable cursor */ + OUTREG( CURSOR_BASEADDR, i810c->CursorPhysical); + OUTREG8( CURSOR_CONTROL, CURSOR_ORIGIN_DISPLAY | CURSOR_MODE_64_3C); + + tmp = INREG8( PIXPIPE_CONFIG_0 ); + tmp |= HW_CURSOR_ENABLE; + OUTREG8( PIXPIPE_CONFIG_0, tmp); +} + +static void +i810UnloadCursor(ScreenPtr pScreen) { + + SetupCursor(pScreen); + + unsigned char tmp; + + tmp=INREG8( PIXPIPE_CONFIG_0 ); + tmp &= ~HW_CURSOR_ENABLE; + OUTREG8( PIXPIPE_CONFIG_0, tmp); +} + + +static Bool +i810RealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) +{ + SetupCursor(pScreen); + + if (!pScreenPriv->enabled) + return TRUE; + + /* miRecolorCursor does this */ + if (pCurPriv->pCursor == pCursor) + { + if (pCursor) + { + int x, y; + + miPointerPosition (&x, &y); + i810LoadCursor (pScreen, x, y); + } + } + return TRUE; +} + +static Bool +i810UnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) +{ + return TRUE; +} + +static void +i810SetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) +{ + SetupCursor(pScreen); + + pCurPriv->pCursor = pCursor; + + if (!pScreenPriv->enabled) + return; + + if (pCursor) + i810LoadCursor (pScreen, x, y); + else + i810UnloadCursor (pScreen); +} + +miPointerSpriteFuncRec i810PointerSpriteFuncs = { + i810RealizeCursor, + i810UnrealizeCursor, + i810SetCursor, + i810MoveCursor, +}; + +static void +i810QueryBestSize (int class, + unsigned short *pwidth, unsigned short *pheight, + ScreenPtr pScreen) +{ + SetupCursor (pScreen); + + switch (class) + { + case CursorShape: + if (*pwidth > pCurPriv->width) + *pwidth = pCurPriv->width; + if (*pheight > pCurPriv->height) + *pheight = pCurPriv->height; + if (*pwidth > pScreen->width) + *pwidth = pScreen->width; + if (*pheight > pScreen->height) + *pheight = pScreen->height; + break; + default: + fbQueryBestSize (class, pwidth, pheight, pScreen); + break; + } +} + +Bool +i810CursorInit(ScreenPtr pScreen) +{ + + SetupCursor(pScreen); + + if (!i810c->CursorStart) { + pCurPriv->has_cursor = FALSE; + return FALSE; + } + + pCurPriv->width = I810_CURSOR_WIDTH; + pCurPriv->height= I810_CURSOR_HEIGHT; + pScreen->QueryBestSize = i810QueryBestSize; + miPointerInitialize (pScreen, + &i810PointerSpriteFuncs, + &kdPointerScreenFuncs, + FALSE); + pCurPriv->has_cursor = TRUE; + pCurPriv->pCursor = NULL; + return TRUE; +} + +void +i810CursorEnable (ScreenPtr pScreen) +{ + SetupCursor (pScreen); + + if (pCurPriv->has_cursor) + { + if (pCurPriv->pCursor) + { + int x, y; + + miPointerPosition (&x, &y); + i810LoadCursor (pScreen, x, y); + } + else + i810UnloadCursor (pScreen); + } +} + +void +i810CursorDisable (ScreenPtr pScreen) +{ + SetupCursor (pScreen); + + if (!pScreenPriv->enabled) + return; + + if (pCurPriv->has_cursor) + { + if (pCurPriv->pCursor) + { + i810UnloadCursor (pScreen); + } + } +} + +void +i810CursorFini (ScreenPtr pScreen) +{ + SetupCursor (pScreen); + + pCurPriv->pCursor = NULL; +} + Index: xc/programs/Xserver/hw/kdrive/i810/i810_reg.h diff -u /dev/null xc/programs/Xserver/hw/kdrive/i810/i810_reg.h:1.1 --- /dev/null Mon Jun 4 12:40:16 2001 +++ xc/programs/Xserver/hw/kdrive/i810/i810_reg.h Thu Mar 29 21:18:41 2001 @@ -0,0 +1,696 @@ +/* COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 2000, 2001 Nokia Home Communications + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY +SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + +X Window System is a trademark of The Open Group */ + +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ +/* $XFree86: xc/programs/Xserver/hw/kdrive/i810/i810_reg.h,v 1.1 2001/03/30 02:18:41 keithp Exp $ */ + +/* + * Authors: + * Keith Whitwell + * Pontus Lidman + * + * based on the i740 driver by + * Kevin E. Martin + * + * + */ + +/* I/O register offsets + */ +#define SRX 0x3C4 /* p208 */ +#define GRX 0x3CE /* p213 */ +#define ARX 0x3C0 /* p224 */ + +/* VGA Color Palette Registers */ +#define DACMASK 0x3C6 /* p232 */ +#define DACSTATE 0x3C7 /* p232 */ +#define DACRX 0x3C7 /* p233 */ +#define DACWX 0x3C8 /* p233 */ +#define DACDATA 0x3C9 /* p233 */ + +/* CRT Controller Registers (CRX) */ +#define START_ADDR_HI 0x0C /* p246 */ +#define START_ADDR_LO 0x0D /* p247 */ +#define VERT_SYNC_END 0x11 /* p249 */ +#define EXT_VERT_TOTAL 0x30 /* p257 */ +#define EXT_VERT_DISPLAY 0x31 /* p258 */ +#define EXT_VERT_SYNC_START 0x32 /* p259 */ +#define EXT_VERT_BLANK_START 0x33 /* p260 */ +#define EXT_HORIZ_TOTAL 0x35 /* p261 */ +#define EXT_HORIZ_BLANK 0x39 /* p261 */ +#define EXT_START_ADDR 0x40 /* p262 */ +#define EXT_START_ADDR_ENABLE 0x80 +#define EXT_OFFSET 0x41 /* p263 */ +#define EXT_START_ADDR_HI 0x42 /* p263 */ +#define INTERLACE_CNTL 0x70 /* p264 */ +#define INTERLACE_ENABLE 0x80 +#define INTERLACE_DISABLE 0x00 + +/* Miscellaneous Output Register + */ +#define MSR_R 0x3CC /* p207 */ +#define MSR_W 0x3C2 /* p207 */ +#define IO_ADDR_SELECT 0x01 + +#define MDA_BASE 0x3B0 /* p207 */ +#define CGA_BASE 0x3D0 /* p207 */ + +/* CR80 - IO Control, p264 + */ +#define IO_CTNL 0x80 +#define EXTENDED_ATTR_CNTL 0x02 +#define EXTENDED_CRTC_CNTL 0x01 + +/* GR10 - Address mapping, p221 + */ +#define ADDRESS_MAPPING 0x10 +#define PAGE_TO_LOCAL_MEM_ENABLE 0x10 +#define GTT_MEM_MAP_ENABLE 0x08 +#define PACKED_MODE_ENABLE 0x04 +#define LINEAR_MODE_ENABLE 0x02 +#define PAGE_MAPPING_ENABLE 0x01 + +/* Blitter control, p378 + */ +#define BITBLT_CNTL 0x7000c +#define COLEXP_MODE 0x30 +#define COLEXP_8BPP 0x00 +#define COLEXP_16BPP 0x10 +#define COLEXP_24BPP 0x20 +#define COLEXP_RESERVED 0x30 +#define BITBLT_STATUS 0x01 + +/* p375. + */ +#define DISPLAY_CNTL 0x70008 +#define VGA_WRAP_MODE 0x02 +#define VGA_WRAP_AT_256KB 0x00 +#define VGA_NO_WRAP 0x02 +#define GUI_MODE 0x01 +#define STANDARD_VGA_MODE 0x00 +#define HIRES_MODE 0x01 + +/* p375 + */ +#define PIXPIPE_CONFIG_0 0x70009 +#define DAC_8_BIT 0x80 +#define DAC_6_BIT 0x00 +#define HW_CURSOR_ENABLE 0x10 +#define EXTENDED_PALETTE 0x01 + +/* p375 + */ +#define PIXPIPE_CONFIG_1 0x7000a +#define DISPLAY_COLOR_MODE 0x0F +#define DISPLAY_VGA_MODE 0x00 +#define DISPLAY_8BPP_MODE 0x02 +#define DISPLAY_15BPP_MODE 0x04 +#define DISPLAY_16BPP_MODE 0x05 +#define DISPLAY_24BPP_MODE 0x06 +#define DISPLAY_32BPP_MODE 0x07 + +/* p375 + */ +#define PIXPIPE_CONFIG_2 0x7000b +#define DISPLAY_GAMMA_ENABLE 0x08 +#define DISPLAY_GAMMA_DISABLE 0x00 +#define OVERLAY_GAMMA_ENABLE 0x04 +#define OVERLAY_GAMMA_DISABLE 0x00 + + +/* p380 + */ +#define DISPLAY_BASE 0x70020 +#define DISPLAY_BASE_MASK 0x03fffffc + + +/* Cursor control registers, pp383-384 + */ +#define CURSOR_CONTROL 0x70080 +#define CURSOR_ORIGIN_SCREEN 0x00 +#define CURSOR_ORIGIN_DISPLAY 0x10 +#define CURSOR_MODE 0x07 +#define CURSOR_MODE_DISABLE 0x00 +#define CURSOR_MODE_32_4C_AX 0x01 +#define CURSOR_MODE_64_3C 0x04 +#define CURSOR_MODE_64_4C_AX 0x05 +#define CURSOR_MODE_64_4C 0x06 +#define CURSOR_MODE_RESERVED 0x07 +#define CURSOR_BASEADDR 0x70084 +#define CURSOR_BASEADDR_MASK 0x1FFFFF00 +#define CURSOR_X_LO 0x70088 +#define CURSOR_X_HI 0x70089 +#define CURSOR_X_POS 0x00 +#define CURSOR_X_NEG 0x80 +#define CURSOR_Y_LO 0x7008A +#define CURSOR_Y_HI 0x7008B +#define CURSOR_Y_POS 0x00 +#define CURSOR_Y_NEG 0x80 + + + +/* Similar registers exist in Device 0 on the i810 (pp55-65), but I'm + * not sure they refer to local (graphics) memory. + * + * These details are for the local memory control registers, + * (pp301-310). The test machines are not equiped with local memory, + * so nothing is tested. Only a single row seems to be supported. + */ +#define DRAM_ROW_TYPE 0x3000 +#define DRAM_ROW_0 0x01 +#define DRAM_ROW_0_SDRAM 0x01 +#define DRAM_ROW_0_EMPTY 0x00 +#define DRAM_ROW_CNTL_LO 0x3001 +#define DRAM_PAGE_MODE_CTRL 0x10 +#define DRAM_RAS_TO_CAS_OVRIDE 0x08 +#define DRAM_CAS_LATENCY 0x04 +#define DRAM_RAS_TIMING 0x02 +#define DRAM_RAS_PRECHARGE 0x01 +#define DRAM_ROW_CNTL_HI 0x3002 +#define DRAM_REFRESH_RATE 0x18 +#define DRAM_REFRESH_DISABLE 0x00 +#define DRAM_REFRESH_60HZ 0x08 +#define DRAM_REFRESH_FAST_TEST 0x10 +#define DRAM_REFRESH_RESERVED 0x18 +#define DRAM_SMS 0x07 +#define DRAM_SMS_NORMAL 0x00 +#define DRAM_SMS_NOP_ENABLE 0x01 +#define DRAM_SMS_ABPCE 0x02 +#define DRAM_SMS_MRCE 0x03 +#define DRAM_SMS_CBRCE 0x04 + +/* p307 + */ +#define DPMS_SYNC_SELECT 0x5002 +#define VSYNC_CNTL 0x08 +#define VSYNC_ON 0x00 +#define VSYNC_OFF 0x08 +#define HSYNC_CNTL 0x02 +#define HSYNC_ON 0x00 +#define HSYNC_OFF 0x02 + + + +/* p317, 319 + */ +#define VCLK2_VCO_M 0x6008 /* treat as 16 bit? (includes msbs) */ +#define VCLK2_VCO_N 0x600a +#define VCLK2_VCO_DIV_SEL 0x6012 +#define POST_DIV_SELECT 0x70 +#define POST_DIV_1 0x00 +#define POST_DIV_2 0x10 +#define POST_DIV_4 0x20 +#define POST_DIV_8 0x30 +#define POST_DIV_16 0x40 +#define POST_DIV_32 0x50 +#define VCO_LOOP_DIV_BY_4M 0x00 +#define VCO_LOOP_DIV_BY_16M 0x04 + + +/* Instruction Parser Mode Register + * - p281 + * - 2 new bits. + */ +#define INST_PM 0x20c0 +#define AGP_SYNC_PACKET_FLUSH_ENABLE 0x20 /* reserved */ +#define SYNC_PACKET_FLUSH_ENABLE 0x10 +#define TWO_D_INST_DISABLE 0x08 +#define THREE_D_INST_DISABLE 0x04 +#define STATE_VAR_UPDATE_DISABLE 0x02 +#define PAL_STIP_DISABLE 0x01 + +#define INST_DONE 0x2090 +#define INST_PS 0x20c4 + +#define MEMMODE 0x20dc + + +/* Instruction parser error register. p279 + */ +#define IPEIR 0x2088 +#define IPEHR 0x208C + + +/* General error reporting regs, p296 + */ +#define EIR 0x20B0 +#define EMR 0x20B4 +#define ESR 0x20B8 +#define IP_ERR 0x0001 +#define ERROR_RESERVED 0xffc6 + + +/* Interrupt Control Registers + * - new bits for i810 + * - new register hwstam (mask) + */ +#define HWSTAM 0x2098 /* p290 */ +#define IER 0x20a0 /* p291 */ +#define IIR 0x20a4 /* p292 */ +#define IMR 0x20a8 /* p293 */ +#define ISR 0x20ac /* p294 */ +#define HW_ERROR 0x8000 +#define SYNC_STATUS_TOGGLE 0x1000 +#define DPY_0_FLIP_PENDING 0x0800 +#define DPY_1_FLIP_PENDING 0x0400 /* not implemented on i810 */ +#define OVL_0_FLIP_PENDING 0x0200 +#define OVL_1_FLIP_PENDING 0x0100 /* not implemented on i810 */ +#define DPY_0_VBLANK 0x0080 +#define DPY_0_EVENT 0x0040 +#define DPY_1_VBLANK 0x0020 /* not implemented on i810 */ +#define DPY_1_EVENT 0x0010 /* not implemented on i810 */ +#define HOST_PORT_EVENT 0x0008 /* */ +#define CAPTURE_EVENT 0x0004 /* */ +#define USER_DEFINED 0x0002 +#define BREAKPOINT 0x0001 + + +#define INTR_RESERVED (0x6000 | \ + DPY_1_FLIP_PENDING | \ + OVL_1_FLIP_PENDING | \ + DPY_1_VBLANK | \ + DPY_1_EVENT | \ + HOST_PORT_EVENT | \ + CAPTURE_EVENT ) + +/* FIFO Watermark and Burst Length Control Register + * + * - different offset and contents on i810 (p299) (fewer bits per field) + * - some overlay fields added + * - what does it all mean? + */ +#define FWATER_BLC 0x20d8 +#define MM_BURST_LENGTH 0x00700000 +#define MM_FIFO_WATERMARK 0x0001F000 +#define LM_BURST_LENGTH 0x00000700 +#define LM_FIFO_WATERMARK 0x0000001F + + +/* Fence/Tiling ranges [0..7] + */ +#define FENCE 0x2000 +#define FENCE_NR 8 + +#define FENCE_START_MASK 0x03F80000 +#define FENCE_X_MAJOR 0x00000000 +#define FENCE_Y_MAJOR 0x00001000 +#define FENCE_SIZE_MASK 0x00000700 +#define FENCE_SIZE_512K 0x00000000 +#define FENCE_SIZE_1M 0x00000100 +#define FENCE_SIZE_2M 0x00000200 +#define FENCE_SIZE_4M 0x00000300 +#define FENCE_SIZE_8M 0x00000400 +#define FENCE_SIZE_16M 0x00000500 +#define FENCE_SIZE_32M 0x00000600 +#define FENCE_PITCH_MASK 0x00000070 +#define FENCE_PITCH_1 0x00000000 +#define FENCE_PITCH_2 0x00000010 +#define FENCE_PITCH_4 0x00000020 +#define FENCE_PITCH_8 0x00000030 +#define FENCE_PITCH_16 0x00000040 +#define FENCE_PITCH_32 0x00000050 +#define FENCE_VALID 0x00000001 + + +/* Registers to control page table, p274 + */ +#define PGETBL_CTL 0x2020 +#define PGETBL_ADDR_MASK 0xFFFFF000 +#define PGETBL_ENABLE_MASK 0x00000001 +#define PGETBL_ENABLED 0x00000001 + +/* Register containing pge table error results, p276 + */ +#define PGE_ERR 0x2024 +#define PGE_ERR_ADDR_MASK 0xFFFFF000 +#define PGE_ERR_ID_MASK 0x00000038 +#define PGE_ERR_CAPTURE 0x00000000 +#define PGE_ERR_OVERLAY 0x00000008 +#define PGE_ERR_DISPLAY 0x00000010 +#define PGE_ERR_HOST 0x00000018 +#define PGE_ERR_RENDER 0x00000020 +#define PGE_ERR_BLITTER 0x00000028 +#define PGE_ERR_MAPPING 0x00000030 +#define PGE_ERR_CMD_PARSER 0x00000038 +#define PGE_ERR_TYPE_MASK 0x00000007 +#define PGE_ERR_INV_TABLE 0x00000000 +#define PGE_ERR_INV_PTE 0x00000001 +#define PGE_ERR_MIXED_TYPES 0x00000002 +#define PGE_ERR_PAGE_MISS 0x00000003 +#define PGE_ERR_ILLEGAL_TRX 0x00000004 +#define PGE_ERR_LOCAL_MEM 0x00000005 +#define PGE_ERR_TILED 0x00000006 + + + +/* Page table entries loaded via mmio region, p323 + */ +#define PTE_BASE 0x10000 +#define PTE_ADDR_MASK 0x3FFFF000 +#define PTE_TYPE_MASK 0x00000006 +#define PTE_LOCAL 0x00000002 +#define PTE_MAIN_UNCACHED 0x00000000 +#define PTE_MAIN_CACHED 0x00000006 +#define PTE_VALID_MASK 0x00000001 +#define PTE_VALID 0x00000001 + + +/* Ring buffer registers, p277, overview p19 + */ +#define LP_RING 0x2030 +#define HP_RING 0x2040 + +#define RING_TAIL 0x00 +#define TAIL_ADDR 0x000FFFF8 + +#define RING_HEAD 0x04 +#define HEAD_WRAP_COUNT 0xFFE00000 +#define HEAD_WRAP_ONE 0x00200000 +#define HEAD_ADDR 0x001FFFFC + +#define RING_START 0x08 +#define START_ADDR 0x00FFFFF8 + +#define RING_LEN 0x0C +#define RING_NR_PAGES 0x000FF000 +#define RING_REPORT_MASK 0x00000006 +#define RING_REPORT_64K 0x00000002 +#define RING_REPORT_128K 0x00000004 +#define RING_NO_REPORT 0x00000000 +#define RING_VALID_MASK 0x00000001 +#define RING_VALID 0x00000001 +#define RING_INVALID 0x00000000 + + + +/* BitBlt Instructions + * + * There are many more masks & ranges yet to add. + */ +#define BR00_BITBLT_CLIENT 0x40000000 +#define BR00_OP_COLOR_BLT 0x10000000 +#define BR00_OP_SRC_COPY_BLT 0x10C00000 +#define BR00_OP_FULL_BLT 0x11400000 +#define BR00_OP_MONO_SRC_BLT 0x11800000 +#define BR00_OP_MONO_SRC_COPY_BLT 0x11000000 +#define BR00_OP_MONO_PAT_BLT 0x11C00000 +#define BR00_OP_MONO_SRC_COPY_IMMEDIATE_BLT (0x61 << 22) +#define BR00_OP_TEXT_IMMEDIATE_BLT 0xc000000 + + +#define BR00_TPCY_DISABLE 0x00000000 +#define BR00_TPCY_ENABLE 0x00000010 + +#define BR00_TPCY_ROP 0x00000000 +#define BR00_TPCY_NO_ROP 0x00000020 +#define BR00_TPCY_EQ 0x00000000 +#define BR00_TPCY_NOT_EQ 0x00000040 + +#define BR00_PAT_MSB_FIRST 0x00000000 /* ? */ + +#define BR00_PAT_VERT_ALIGN 0x000000e0 + +#define BR00_LENGTH 0x0000000F + +#define BR09_DEST_ADDR 0x03FFFFFF + +#define BR11_SOURCE_PITCH 0x00003FFF + +#define BR12_SOURCE_ADDR 0x03FFFFFF + +#define BR13_SOLID_PATTERN 0x80000000 +#define BR13_RIGHT_TO_LEFT 0x40000000 +#define BR13_LEFT_TO_RIGHT 0x00000000 +#define BR13_MONO_TRANSPCY 0x20000000 +#define BR13_USE_DYN_DEPTH 0x04000000 +#define BR13_DYN_8BPP 0x00000000 +#define BR13_DYN_16BPP 0x01000000 +#define BR13_DYN_24BPP 0x02000000 +#define BR13_ROP_MASK 0x00FF0000 +#define BR13_DEST_PITCH 0x0000FFFF +#define BR13_PITCH_SIGN_BIT 0x00008000 + +#define BR14_DEST_HEIGHT 0xFFFF0000 +#define BR14_DEST_WIDTH 0x0000FFFF + +#define BR15_PATTERN_ADDR 0x03FFFFFF + +#define BR16_SOLID_PAT_COLOR 0x00FFFFFF +#define BR16_BACKGND_PAT_CLR 0x00FFFFFF + +#define BR17_FGND_PAT_CLR 0x00FFFFFF + +#define BR18_SRC_BGND_CLR 0x00FFFFFF +#define BR19_SRC_FGND_CLR 0x00FFFFFF + + +/* Instruction parser instructions + */ + +#define INST_PARSER_CLIENT 0x00000000 +#define INST_OP_FLUSH 0x02000000 +#define INST_FLUSH_MAP_CACHE 0x00000001 + +#define INST_DEST_BUFFER_INFO 0x06800000 + +#define INST_FRONT_BUFFER_INFO 0x06000000 +#define FRONT_INFO_ASYNC_FLIP 1<<6 +#define FRONT_INFO_PITCH_B 8 + +#define GFX_OP_USER_INTERRUPT ((0<<29)|(2<<23)) + + +/* Registers in the i810 host-pci bridge pci config space which affect + * the i810 graphics operations. + */ +#define SMRAM_MISCC 0x70 +#define GMS 0x000000c0 +#define GMS_DISABLE 0x00000000 +#define GMS_ENABLE_BARE 0x00000040 +#define GMS_ENABLE_512K 0x00000080 +#define GMS_ENABLE_1M 0x000000c0 +#define USMM 0x00000030 +#define USMM_DISABLE 0x00000000 +#define USMM_TSEG_ZERO 0x00000010 +#define USMM_TSEG_512K 0x00000020 +#define USMM_TSEG_1M 0x00000030 +#define GFX_MEM_WIN_SIZE 0x00010000 +#define GFX_MEM_WIN_32M 0x00010000 +#define GFX_MEM_WIN_64M 0x00000000 + +/* Overkill? I don't know. Need to figure out top of mem to make the + * SMRAM calculations come out. Linux seems to have problems + * detecting it all on its own, so this seems a reasonable double + * check to any user supplied 'mem=...' boot param. + * + * ... unfortunately this reg doesn't work according to spec on the + * test hardware. + */ +#define WHTCFG_PAMR_DRP 0x50 +#define SYS_DRAM_ROW_0_SHIFT 16 +#define SYS_DRAM_ROW_1_SHIFT 20 +#define DRAM_MASK 0x0f +#define DRAM_VALUE_0 0 +#define DRAM_VALUE_1 8 +/* No 2 value defined */ +#define DRAM_VALUE_3 16 +#define DRAM_VALUE_4 16 +#define DRAM_VALUE_5 24 +#define DRAM_VALUE_6 32 +#define DRAM_VALUE_7 32 +#define DRAM_VALUE_8 48 +#define DRAM_VALUE_9 64 +#define DRAM_VALUE_A 64 +#define DRAM_VALUE_B 96 +#define DRAM_VALUE_C 128 +#define DRAM_VALUE_D 128 +#define DRAM_VALUE_E 192 +#define DRAM_VALUE_F 256 /* nice one, geezer */ +#define LM_FREQ_MASK 0x10 +#define LM_FREQ_133 0x10 +#define LM_FREQ_100 0x00 + + + + +/* These are 3d state registers, but the state is invarient, so we let + * the X server handle it: + */ + + + +/* GFXRENDERSTATE_COLOR_CHROMA_KEY, p135 + */ +#define GFX_OP_COLOR_CHROMA_KEY ((0x3<<29)|(0x1d<<24)|(0x2<<16)|0x1) +#define CC1_UPDATE_KILL_WRITE (1<<28) +#define CC1_ENABLE_KILL_WRITE (1<<27) +#define CC1_DISABLE_KILL_WRITE 0 +#define CC1_UPDATE_COLOR_IDX (1<<26) +#define CC1_UPDATE_CHROMA_LOW (1<<25) +#define CC1_UPDATE_CHROMA_HI (1<<24) +#define CC1_CHROMA_LOW_MASK ((1<<24)-1) +#define CC2_COLOR_IDX_SHIFT 24 +#define CC2_COLOR_IDX_MASK (0xff<<24) +#define CC2_CHROMA_HI_MASK ((1<<24)-1) + + +#define GFX_CMD_CONTEXT_SEL ((0<<29)|(0x5<<23)) +#define CS_UPDATE_LOAD (1<<17) +#define CS_UPDATE_USE (1<<16) +#define CS_UPDATE_LOAD (1<<17) +#define CS_LOAD_CTX0 0 +#define CS_LOAD_CTX1 (1<<8) +#define CS_USE_CTX0 0 +#define CS_USE_CTX1 (1<<0) + +/* 3D Rendering Engine */ + +#define RENDER_CLIENT 0x60000000 + +/* Primitive rendering instruction */ + +#define GFX_PRIMITIVE 0x1f000000 +#define PRIMITIVE_TRIANGLE 0 << 18 +#define PRIMITIVE_TRI_STRIP 1 << 18 +#define PRIMITIVE_TRI_REV_STRIP 2 << 18 +#define PRIMITIVE_TRI_FAN 3 << 18 +#define PRIMITIVE_POLYGON 4 << 18 +#define PRIMITIVE_LINE 5 << 18 +#define PRIMITIVE_LINE_STRIP 6 << 18 +#define PRIMITIVE_RECTANGLE 7 << 18 + +/* Vertex format instruction */ +#define GFX_VERTEX_FORMAT 0x05000000 +#define VERTEX_0_TEXCOORDS 0 << 8 +#define VERTEX_1_TEXCOORDS 1 << 8 +#define VERTEX_2_TEXCOORDS 2 << 8 +#define VERTEX_SPECULAR_FOG 1 << 7 +#define VERTEX_DIFFUSE_ALPHA 1 << 6 +#define VERTEX_Z_OFFSET 1 << 5 +#define VERTEX_POS_XYZ 1 << 1 +#define VERTEX_POS_XYZ_RHW 2 << 1 +#define VERTEX_POS_XY 3 << 1 +#define VERTEX_POS_XY_RHW 4 << 1 + +/* Drawing Rectangle Info instruction */ + +#define GFX_DRAWING_RECTANGLE_INFO 0x1d800003 +#define GFX_DRAWING_CLIP_DISABLE 1<<31 + +/* Boolean enable 1 */ +#define GFX_BOOLEAN_ENA_1 0x03000000 +#define BOOL1_ALPHA_SETUP_MASK 1<<17 +#define BOOL1_ALPHA_SETUP_BIT 1<<16 +#define BOOL1_FOG_ENABLE_MASK 1<<7 +#define BOOL1_FOG_ENABLE_BIT 1<<6 +#define BOOL1_ALPHA_TEST_MASK 1<<5 +#define BOOL1_ALPHA_TEST_BIT 1<<4 +#define BOOL1_BLEND_ENABLE_MASK 1<<3 +#define BOOL1_BLEND_ENABLE_BIT 1<<2 +#define BOOL1_Z_ENABLE_MASK 1<<1 +#define BOOL1_Z_ENABLE_BIT 1<<0 + +/* Boolean enable 2 */ +#define GFX_BOOLEAN_ENA_2 0x04000000 +#define BOOL2_MAPPING_CACHE_MASK 1<<17 +#define BOOL2_MAPPING_CACHE_BIT 1<<16 +#define BOOL2_ALPHA_DITHER_MASK 1<<15 +#define BOOL2_ALPHA_DITHER_BIT 1<<14 +#define BOOL2_FOG_DITHER_MASK 1<<13 +#define BOOL2_FOG_DITHER_BIT 1<<12 +#define BOOL2_SPECULAR_DITHER_MASK 1<<11 +#define BOOL2_SPECULAR_DITHER_BIT 1<<10 +#define BOOL2_COLOR_DITHER_MASK 1<<9 +#define BOOL2_COLOR_DITHER_BIT 1<<8 +#define BOOL2_FB_WRITE_MASK 1<<3 +#define BOOL2_FB_WRITE_BIT 1<<2 +#define BOOL2_Z_WRITE_MASK 1<<1 +#define BOOL2_Z_WRITE_BIT 1<<0 + +/* Dest buffer variables */ + +#define GFX_DEST_BUFFER_VARIABLES 0x1d850000 + +#define DEST_BUF_VAR_8BIT 0 << 8 +#define DEST_BUF_VAR_555 1 << 8 +#define DEST_BUF_VAR_565 2 << 8 + +/* map color blend stages */ + +#define GFX_MAP_COLOR_BLEND_STAGES 0 + +#define MAP_BLEND_STAGE_B 20 +#define MAP_BLEND_ACC_SEL_MASK 1<<19 +#define MAP_BLEND_ACC_SEL_BIT 1<<18 +#define MAP_BLEND_ARG1_MASK 1<<17 +#define MAP_BLEND_ARG1_B 14 +#define MAP_BLEND_REPLICATE_ARG1 1<<13 +#define MAP_BLEND_INVERT_ARG1 1<<12 + +#define MAP_BLEND_ARG2_MASK 1<<11 +#define MAP_BLEND_ARG2_B 8 +#define MAP_BLEND_REPLICATE_ARG2 1<<7 +#define MAP_BLEND_INVERT_ARG2 1<<6 + +#define MAP_BLEND_COLOR_OP_MASK 1<<5 +#define MAP_BLEND_COLOR_OP_B 0 + +#define GFX_SCISSOR_ENABLE 0x1c800000 + +#define SCISSOR_ENABLE_MASK 1<<1 +#define SCISSOR_ENABLE_BIT 1<<0 Index: xc/programs/Xserver/hw/kdrive/i810/i810_video.c diff -u /dev/null xc/programs/Xserver/hw/kdrive/i810/i810_video.c:1.1 --- /dev/null Mon Jun 4 12:40:16 2001 +++ xc/programs/Xserver/hw/kdrive/i810/i810_video.c Thu Mar 29 21:18:41 2001 @@ -0,0 +1,1165 @@ +/* COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 2000, 2001 Nokia Home Communications + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY +SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + +X Window System is a trademark of The Open Group */ + +/*************************************************************************** + +Copyright 2000 Intel Corporation. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL INTEL, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR +THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + +/* $XFree86: xc/programs/Xserver/hw/kdrive/i810/i810_video.c,v 1.1 2001/03/30 02:18:41 keithp Exp $ */ + +/* + * i810_video.c: i810 KDrive Xv driver. + * Based on the XFree86 i810 Xv driver by Jonathan Bian. + * + * Authors: + * Jonathan Bian + * Pontus Lidman + * + */ + +#include "kdrive.h" +#include "kxv.h" +#include "i810.h" + +#include "Xv.h" + +#include "../../xfree86/common/fourcc.h" + +typedef struct { + CARD32 size; + CARD32 offset; +} FBLinearRec, *FBLinearPtr; + +#define OFF_DELAY 250 /* milliseconds */ +#define FREE_DELAY 15000 + +#define OFF_TIMER 0x01 +#define FREE_TIMER 0x02 +#define CLIENT_VIDEO_ON 0x04 + +#define TIMER_MASK (OFF_TIMER | FREE_TIMER) + +static KdVideoAdaptorPtr i810SetupImageVideo(ScreenPtr); +static void i810StopVideo(KdScreenInfo *, pointer, Bool); +static int i810SetPortAttribute(KdScreenInfo *, Atom, int, pointer); +static int i810GetPortAttribute(KdScreenInfo *, Atom, int *, pointer); +static void i810QueryBestSize(KdScreenInfo *, Bool, + short, short, short, short, unsigned int *, unsigned int *, pointer); +static int i810PutImage( KdScreenInfo *, + short, short, short, short, short, short, short, short, + int, unsigned char*, short, short, Bool, RegionPtr, pointer); +static int i810QueryImageAttributes(KdScreenInfo *, + int, unsigned short *, unsigned short *, int *, int *); + +static void i810BlockHandler(int, pointer, pointer, pointer); + +#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) + +static Atom xvBrightness, xvContrast, xvColorKey; + +#define IMAGE_MAX_WIDTH 720 +#define IMAGE_MAX_HEIGHT 576 +#define Y_BUF_SIZE (IMAGE_MAX_WIDTH * IMAGE_MAX_HEIGHT) + +#define OVERLAY_UPDATE(p) OUTREG(0x30000, p | 0x80000000); + +/* + * OV0CMD - Overlay Command Register + */ +#define VERTICAL_CHROMINANCE_FILTER 0x70000000 +#define VC_SCALING_OFF 0x00000000 +#define VC_LINE_REPLICATION 0x10000000 +#define VC_UP_INTERPOLATION 0x20000000 +#define VC_PIXEL_DROPPING 0x50000000 +#define VC_DOWN_INTERPOLATION 0x60000000 +#define VERTICAL_LUMINANCE_FILTER 0x0E000000 +#define VL_SCALING_OFF 0x00000000 +#define VL_LINE_REPLICATION 0x02000000 +#define VL_UP_INTERPOLATION 0x04000000 +#define VL_PIXEL_DROPPING 0x0A000000 +#define VL_DOWN_INTERPOLATION 0x0C000000 +#define HORIZONTAL_CHROMINANCE_FILTER 0x01C00000 +#define HC_SCALING_OFF 0x00000000 +#define HC_LINE_REPLICATION 0x00400000 +#define HC_UP_INTERPOLATION 0x00800000 +#define HC_PIXEL_DROPPING 0x01400000 +#define HC_DOWN_INTERPOLATION 0x01800000 +#define HORIZONTAL_LUMINANCE_FILTER 0x00380000 +#define HL_SCALING_OFF 0x00000000 +#define HL_LINE_REPLICATION 0x00080000 +#define HL_UP_INTERPOLATION 0x00100000 +#define HL_PIXEL_DROPPING 0x00280000 +#define HL_DOWN_INTERPOLATION 0x00300000 + +#define Y_ADJUST 0x00010000 +#define OV_BYTE_ORDER 0x0000C000 +#define UV_SWAP 0x00004000 +#define Y_SWAP 0x00008000 +#define Y_AND_UV_SWAP 0x0000C000 +#define SOURCE_FORMAT 0x00003C00 +#define RGB_555 0x00000800 +#define RGB_565 0x00000C00 +#define YUV_422 0x00002000 +#define YUV_411 0x00002400 +#define YUV_420 0x00003000 +#define YUV_410 0x00003800 +#define BUFFER_AND_FIELD 0x00000006 +#define BUFFER0_FIELD0 0x00000000 +#define BUFFER1_FIELD0 0x00000004 +#define OVERLAY_ENABLE 0x00000001 + +/* + * DOV0STA - Display/Overlay 0 Status Register + */ +#define DOV0STA 0x30008 + +#define MINUV_SCALE 0x1 + +#define RGB16ToColorKey(c) \ + (((c & 0xF800) << 8) | ((c & 0x07E0) << 5) | ((c & 0x001F) << 3)) + +#define RGB15ToColorKey(c) \ + (((c & 0x7c00) << 9) | ((c & 0x03E0) << 6) | ((c & 0x001F) << 3)) + +Bool i810InitVideo(ScreenPtr pScreen) +{ + KdScreenPriv(pScreen); + KdScreenInfo *screen = pScreenPriv->screen; + KdVideoAdaptorPtr *adaptors, *newAdaptors = NULL; + KdVideoAdaptorPtr newAdaptor = NULL; + int num_adaptors; + +/* fprintf(stderr,"i810InitVideo\n"); */ + + if (screen->fb[0].bitsPerPixel != 8) + { + newAdaptor = i810SetupImageVideo(pScreen); + } + + num_adaptors = KdXVListGenericAdaptors(screen, &adaptors); + + if(newAdaptor) { + if(!num_adaptors) { + num_adaptors = 1; + adaptors = &newAdaptor; + } else { + newAdaptors = /* need to free this someplace */ + xalloc((num_adaptors + 1) * sizeof(KdVideoAdaptorPtr*)); + if(newAdaptors) { + memcpy(newAdaptors, adaptors, num_adaptors * + sizeof(KdVideoAdaptorPtr)); + newAdaptors[num_adaptors] = newAdaptor; + adaptors = newAdaptors; + num_adaptors++; + } + } + } + + if(num_adaptors) + KdXVScreenInit(pScreen, adaptors, num_adaptors); + + if(newAdaptors) + xfree(newAdaptors); + return TRUE; +} + +/* client libraries expect an encoding */ +static KdVideoEncodingRec DummyEncoding[1] = +{ + { + 0, + "XV_IMAGE", + IMAGE_MAX_WIDTH, IMAGE_MAX_HEIGHT, + {1, 1} + } +}; + +#define NUM_FORMATS 3 + +static KdVideoFormatRec Formats[NUM_FORMATS] = +{ + {15, TrueColor}, {16, TrueColor}, {24, TrueColor} +}; + +#define NUM_ATTRIBUTES 3 + +static KdAttributeRec Attributes[NUM_ATTRIBUTES] = +{ + {XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLORKEY"}, + {XvSettable | XvGettable, -128, 127, "XV_BRIGHTNESS"}, + {XvSettable | XvGettable, 0, 255, "XV_CONTRAST"} +}; + +#define NUM_IMAGES 4 + +static KdImageRec Images[NUM_IMAGES] = +{ + XVIMAGE_YUY2, + XVIMAGE_YV12, + XVIMAGE_I420, + XVIMAGE_UYVY +}; + +typedef struct { + CARD32 OBUF_0Y; + CARD32 OBUF_1Y; + CARD32 OBUF_0U; + CARD32 OBUF_0V; + CARD32 OBUF_1U; + CARD32 OBUF_1V; + CARD32 OV0STRIDE; + CARD32 YRGB_VPH; + CARD32 UV_VPH; + CARD32 HORZ_PH; + CARD32 INIT_PH; + CARD32 DWINPOS; + CARD32 DWINSZ; + CARD32 SWID; + CARD32 SWIDQW; + CARD32 SHEIGHT; + CARD32 YRGBSCALE; + CARD32 UVSCALE; + CARD32 OV0CLRC0; + CARD32 OV0CLRC1; + CARD32 DCLRKV; + CARD32 DCLRKM; + CARD32 SCLRKVH; + CARD32 SCLRKVL; + CARD32 SCLRKM; + CARD32 OV0CONF; + CARD32 OV0CMD; +} I810OverlayRegRec, *I810OverlayRegPtr; + +typedef struct { + CARD32 YBuf0offset; + CARD32 UBuf0offset; + CARD32 VBuf0offset; + + CARD32 YBuf1offset; + CARD32 UBuf1offset; + CARD32 VBuf1offset; + + unsigned char currentBuf; + + unsigned char brightness; + unsigned char contrast; + + RegionRec clip; + CARD32 colorKey; + + CARD32 videoStatus; + Time offTime; + Time freeTime; + FBLinearPtr linear; +} I810PortPrivRec, *I810PortPrivPtr; + +#define GET_PORT_PRIVATE(screen) \ + (I810PortPrivPtr)(((I810CardInfo *) (screen->card->driver))->adaptor->pPortPrivates[0].ptr) + +static void i810ResetVideo(KdScreenInfo *screen) +{ + ScreenPtr pScreen = screen->pScreen; + KdScreenPriv(pScreen); + KdCardInfo *card = pScreenPriv->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + + I810PortPrivPtr pPriv = i810c->adaptor->pPortPrivates[0].ptr; + I810OverlayRegPtr overlay = (I810OverlayRegPtr) (i810c->FbBase + i810c->OverlayStart); + + /* + * Default to maximum image size in YV12 + */ + + overlay->YRGB_VPH = 0; + overlay->UV_VPH = 0; + overlay->HORZ_PH = 0; + overlay->INIT_PH = 0; + overlay->DWINPOS = 0; + overlay->DWINSZ = (IMAGE_MAX_HEIGHT << 16) | IMAGE_MAX_WIDTH; + overlay->SWID = IMAGE_MAX_WIDTH | (IMAGE_MAX_WIDTH << 15); + overlay->SWIDQW = (IMAGE_MAX_WIDTH >> 3) | (IMAGE_MAX_WIDTH << 12); + overlay->SHEIGHT = IMAGE_MAX_HEIGHT | (IMAGE_MAX_HEIGHT << 15); + overlay->YRGBSCALE = 0x80004000; /* scale factor 1 */ + overlay->UVSCALE = 0x80004000; /* scale factor 1 */ + overlay->OV0CLRC0 = 0x4000; /* brightness: 0 contrast: 1.0 */ + overlay->OV0CLRC1 = 0x80; /* saturation: bypass */ + + /* + * Enable destination color keying + */ + switch(screen->fb[0].depth) { + case 16: overlay->DCLRKV = RGB16ToColorKey(pPriv->colorKey); + overlay->DCLRKM = 0x80070307; + break; + case 15: overlay->DCLRKV = RGB15ToColorKey(pPriv->colorKey); + overlay->DCLRKM = 0x80070707; + break; + default: overlay->DCLRKV = pPriv->colorKey; + overlay->DCLRKM = 0x80000000; + break; + } + + overlay->SCLRKVH = 0; + overlay->SCLRKVL = 0; + overlay->SCLRKM = 0; /* source color key disable */ + overlay->OV0CONF = 0; /* two 720 pixel line buffers */ + + overlay->OV0CMD = VC_UP_INTERPOLATION | HC_UP_INTERPOLATION | Y_ADJUST | + YUV_420; + + OVERLAY_UPDATE(i810c->OverlayPhysical); +} + + +static KdVideoAdaptorPtr +i810SetupImageVideo(ScreenPtr pScreen) +{ + KdScreenPriv(pScreen); + KdScreenInfo *screen = pScreenPriv->screen; + KdCardInfo *card = pScreenPriv->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + + + KdVideoAdaptorPtr adapt; + I810PortPrivPtr pPriv; + +/* fprintf(stderr,"i810SetupImageVideo\n"); */ + + if(!(adapt = xcalloc(1, sizeof(KdVideoAdaptorRec) + + sizeof(I810PortPrivRec) + + sizeof(DevUnion)))) + return NULL; + + adapt->type = XvWindowMask | XvInputMask | XvImageMask; + adapt->flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT; + adapt->name = "I810 Video Overlay"; + adapt->nEncodings = 1; + adapt->pEncodings = DummyEncoding; + adapt->nFormats = NUM_FORMATS; + adapt->pFormats = Formats; + adapt->nPorts = 1; + adapt->pPortPrivates = (DevUnion*)(&adapt[1]); + + pPriv = (I810PortPrivPtr)(&adapt->pPortPrivates[1]); + + adapt->pPortPrivates[0].ptr = (pointer)(pPriv); + adapt->pAttributes = Attributes; + adapt->nImages = NUM_IMAGES; + adapt->nAttributes = NUM_ATTRIBUTES; + adapt->pImages = Images; + adapt->PutVideo = NULL; + adapt->PutStill = NULL; + adapt->GetVideo = NULL; + adapt->GetStill = NULL; + adapt->StopVideo = i810StopVideo; + adapt->SetPortAttribute = i810SetPortAttribute; + adapt->GetPortAttribute = i810GetPortAttribute; + adapt->QueryBestSize = i810QueryBestSize; + adapt->PutImage = i810PutImage; + adapt->QueryImageAttributes = i810QueryImageAttributes; + + pPriv->colorKey = i810c->colorKey & ((1 << screen->fb[0].depth) - 1); + pPriv->videoStatus = 0; + pPriv->brightness = 0; + pPriv->contrast = 128; + pPriv->linear = NULL; + pPriv->currentBuf = 0; + + /* gotta uninit this someplace */ + REGION_INIT(pScreen, &pPriv->clip, NullBox, 0); + + i810c->adaptor = adapt; + + i810c->BlockHandler = pScreen->BlockHandler; + pScreen->BlockHandler = i810BlockHandler; + + xvBrightness = MAKE_ATOM("XV_BRIGHTNESS"); + xvContrast = MAKE_ATOM("XV_CONTRAST"); + xvColorKey = MAKE_ATOM("XV_COLORKEY"); + + i810ResetVideo(screen); + + return adapt; +} + + +static Bool +RegionsEqual(RegionPtr A, RegionPtr B) +{ + int *dataA, *dataB; + int num; + + num = REGION_NUM_RECTS(A); + if(num != REGION_NUM_RECTS(B)) + return FALSE; + + if((A->extents.x1 != B->extents.x1) || + (A->extents.x2 != B->extents.x2) || + (A->extents.y1 != B->extents.y1) || + (A->extents.y2 != B->extents.y2)) + return FALSE; + + dataA = (int*)REGION_RECTS(A); + dataB = (int*)REGION_RECTS(B); + + while(num--) { + if((dataA[0] != dataB[0]) || (dataA[1] != dataB[1])) + return FALSE; + dataA += 2; + dataB += 2; + } + + return TRUE; +} + + +/* I810ClipVideo - + + Takes the dst box in standard X BoxRec form (top and left + edges inclusive, bottom and right exclusive). The new dst + box is returned. The source boundaries are given (x1, y1 + inclusive, x2, y2 exclusive) and returned are the new source + boundaries in 16.16 fixed point. +*/ + +static void +I810ClipVideo( + BoxPtr dst, + INT32 *x1, + INT32 *x2, + INT32 *y1, + INT32 *y2, + BoxPtr extents, /* extents of the clip region */ + INT32 width, + INT32 height +){ + INT32 vscale, hscale, delta; + int diff; + + hscale = ((*x2 - *x1) << 16) / (dst->x2 - dst->x1); + vscale = ((*y2 - *y1) << 16) / (dst->y2 - dst->y1); + + *x1 <<= 16; *x2 <<= 16; + *y1 <<= 16; *y2 <<= 16; + + diff = extents->x1 - dst->x1; + if(diff > 0) { + dst->x1 = extents->x1; + *x1 += diff * hscale; + } + diff = dst->x2 - extents->x2; + if(diff > 0) { + dst->x2 = extents->x2; + *x2 -= diff * hscale; + } + diff = extents->y1 - dst->y1; + if(diff > 0) { + dst->y1 = extents->y1; + *y1 += diff * vscale; + } + diff = dst->y2 - extents->y2; + if(diff > 0) { + dst->y2 = extents->y2; + *y2 -= diff * vscale; + } + + if(*x1 < 0) { + diff = (- *x1 + hscale - 1)/ hscale; + dst->x1 += diff; + *x1 += diff * hscale; + } + delta = *x2 - (width << 16); + if(delta > 0) { + diff = (delta + hscale - 1)/ hscale; + dst->x2 -= diff; + *x2 -= diff * hscale; + } + if(*y1 < 0) { + diff = (- *y1 + vscale - 1)/ vscale; + dst->y1 += diff; + *y1 += diff * vscale; + } + delta = *y2 - (height << 16); + if(delta > 0) { + diff = (delta + vscale - 1)/ vscale; + dst->y2 -= diff; + *y2 -= diff * vscale; + } +} + +static void +i810StopVideo(KdScreenInfo *screen, pointer data, Bool exit) +{ + I810PortPrivPtr pPriv = (I810PortPrivPtr)data; + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + + I810OverlayRegPtr overlay = (I810OverlayRegPtr) (i810c->FbBase + i810c->OverlayStart); + + REGION_EMPTY(screen->pScreen, &pPriv->clip); + + if(exit) { + if(pPriv->videoStatus & CLIENT_VIDEO_ON) { + overlay->OV0CMD &= 0xFFFFFFFE; + OVERLAY_UPDATE(i810c->OverlayPhysical); + } + if(pPriv->linear) { + xfree(pPriv->linear); + pPriv->linear = NULL; + } + pPriv->videoStatus = 0; + } else { + if(pPriv->videoStatus & CLIENT_VIDEO_ON) { + pPriv->videoStatus |= OFF_TIMER; + pPriv->offTime = currentTime.milliseconds + OFF_DELAY; + } + } + +} + +static int +i810SetPortAttribute( + KdScreenInfo *screen, + Atom attribute, + int value, + pointer data +){ + I810PortPrivPtr pPriv = (I810PortPrivPtr)data; + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + + I810OverlayRegPtr overlay = (I810OverlayRegPtr) (i810c->FbBase + i810c->OverlayStart); + + if(attribute == xvBrightness) { + if((value < -128) || (value > 127)) + return BadValue; + pPriv->brightness = value; + overlay->OV0CLRC0 &= 0xFFFFFF00; + overlay->OV0CLRC0 |= value; + OVERLAY_UPDATE(i810c->OverlayPhysical); + } else + if(attribute == xvContrast) { + if((value < 0) || (value > 255)) + return BadValue; + pPriv->contrast = value; + overlay->OV0CLRC0 &= 0xFFFE00FF; + overlay->OV0CLRC0 |= value << 9; + OVERLAY_UPDATE(i810c->OverlayPhysical); + } else + if(attribute == xvColorKey) { + pPriv->colorKey = value; + switch(screen->fb[0].depth) { + case 16: overlay->DCLRKV = RGB16ToColorKey(pPriv->colorKey); + break; + case 15: overlay->DCLRKV = RGB15ToColorKey(pPriv->colorKey); + break; + default: overlay->DCLRKV = pPriv->colorKey; + break; + } + OVERLAY_UPDATE(i810c->OverlayPhysical); + REGION_EMPTY(screen->pScreen, &pPriv->clip); + } else return BadMatch; + + return Success; +} + +static int +i810GetPortAttribute( + KdScreenInfo *screen, + Atom attribute, + int *value, + pointer data +){ + I810PortPrivPtr pPriv = (I810PortPrivPtr)data; + + if(attribute == xvBrightness) { + *value = pPriv->brightness; + } else + if(attribute == xvContrast) { + *value = pPriv->contrast; + } else + if(attribute == xvColorKey) { + *value = pPriv->colorKey; + } else return BadMatch; + + return Success; +} + +static void +i810QueryBestSize( + KdScreenInfo *screen, + Bool motion, + short vid_w, short vid_h, + short drw_w, short drw_h, + unsigned int *p_w, unsigned int *p_h, + pointer data +){ + *p_w = drw_w; + *p_h = drw_h; +} + + +static void +I810CopyPackedData( + KdScreenInfo *screen, + unsigned char *buf, + int srcPitch, + int dstPitch, + int top, + int left, + int h, + int w + ) +{ + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + I810PortPrivPtr pPriv = i810c->adaptor->pPortPrivates[0].ptr; + unsigned char *src, *dst; + + src = buf + (top*srcPitch) + (left<<1); + + if (pPriv->currentBuf == 0) + dst = i810c->FbBase + pPriv->YBuf0offset; + else + dst = i810c->FbBase + pPriv->YBuf1offset; + + w <<= 1; + while(h--) { + memcpy(dst, src, w); + src += srcPitch; + dst += dstPitch; + } +} + +static void +i810CopyPlanarData( + KdScreenInfo *screen, + unsigned char *buf, + int srcPitch, + int dstPitch, /* of chroma */ + int srcH, + int top, + int left, + int h, + int w, + int id + ) +{ + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + I810PortPrivPtr pPriv = i810c->adaptor->pPortPrivates[0].ptr; + int i; + unsigned char *src1, *src2, *src3, *dst1, *dst2, *dst3; + + /* Copy Y data */ + src1 = buf + (top*srcPitch) + left; + if (pPriv->currentBuf == 0) + dst1 = i810c->FbBase + pPriv->YBuf0offset; + else + dst1 = i810c->FbBase + pPriv->YBuf1offset; + + for (i = 0; i < h; i++) { + memcpy(dst1, src1, w); + src1 += srcPitch; + dst1 += dstPitch << 1; + } + + /* Copy V data for YV12, or U data for I420 */ + src2 = buf + (srcH*srcPitch) + ((top*srcPitch)>>2) + (left>>1); + if (pPriv->currentBuf == 0) { + if (id == FOURCC_I420) + dst2 = i810c->FbBase + pPriv->UBuf0offset; + else + dst2 = i810c->FbBase + pPriv->VBuf0offset; + } else { + if (id == FOURCC_I420) + dst2 = i810c->FbBase + pPriv->UBuf1offset; + else + dst2 = i810c->FbBase + pPriv->VBuf1offset; + } + + for (i = 0; i < h/2; i++) { + memcpy(dst2, src2, w/2); + src2 += srcPitch>>1; + dst2 += dstPitch; + } + + /* Copy U data for YV12, or V data for I420 */ + src3 = buf + (srcH*srcPitch) + ((srcH*srcPitch)>>2) + ((top*srcPitch)>>2) + (left>>1); + if (pPriv->currentBuf == 0) { + if (id == FOURCC_I420) + dst3 = i810c->FbBase + pPriv->VBuf0offset; + else + dst3 = i810c->FbBase + pPriv->UBuf0offset; + } else { + if (id == FOURCC_I420) + dst3 = i810c->FbBase + pPriv->VBuf1offset; + else + dst3 = i810c->FbBase + pPriv->UBuf1offset; + } + + for (i = 0; i < h/2; i++) { + memcpy(dst3, src3, w/2); + src3 += srcPitch>>1; + dst3 += dstPitch; + } +} + +static void +i810DisplayVideo( + KdScreenInfo *screen, + int id, + short width, short height, + int dstPitch, /* of chroma for 4:2:0 */ + int x1, int y1, int x2, int y2, + BoxPtr dstBox, + short src_w, short src_h, + short drw_w, short drw_h +){ + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + I810PortPrivPtr pPriv = i810c->adaptor->pPortPrivates[0].ptr; + I810OverlayRegPtr overlay = (I810OverlayRegPtr) (i810c->FbBase + i810c->OverlayStart); + int xscaleInt, xscaleFract, yscaleInt, yscaleFract; + int xscaleIntUV = 0, xscaleFractUV = 0, yscaleIntUV = 0, yscaleFractUV = 0; + unsigned int swidth; + + switch(id) { + case FOURCC_YV12: + case FOURCC_I420: + swidth = (width + 7) & ~7; + overlay->SWID = (swidth << 15) | swidth; + overlay->SWIDQW = (swidth << 12) | (swidth >> 3); + break; + case FOURCC_UYVY: + case FOURCC_YUY2: + default: + swidth = ((width + 3) & ~3) << 1; + overlay->SWID = swidth; + overlay->SWIDQW = swidth >> 3; + break; + } + + overlay->SHEIGHT = height | (height << 15); + overlay->DWINPOS = (dstBox->y1 << 16) | dstBox->x1; + overlay->DWINSZ = ((dstBox->y2 - dstBox->y1) << 16) | + (dstBox->x2 - dstBox->x1); + + /* buffer locations */ + overlay->OBUF_0Y = pPriv->YBuf0offset; + overlay->OBUF_1Y = pPriv->YBuf1offset; + overlay->OBUF_0U = pPriv->UBuf0offset; + overlay->OBUF_0V = pPriv->VBuf0offset; + overlay->OBUF_1U = pPriv->UBuf1offset; + overlay->OBUF_1V = pPriv->VBuf1offset; + + /* + * Calculate horizontal and vertical scaling factors, default to 1:1 + */ + overlay->YRGBSCALE = 0x80004000; + overlay->UVSCALE = 0x80004000; + + /* + * Initially, YCbCr and Overlay Enable and + * vertical chrominance up interpolation and horozontal chrominance + * up interpolation + */ + overlay->OV0CMD = VC_UP_INTERPOLATION | HC_UP_INTERPOLATION | Y_ADJUST | + OVERLAY_ENABLE; + + if ((drw_w != src_w) || (drw_h != src_h)) + { + xscaleInt = (src_w / drw_w) & 0x3; + xscaleFract = (src_w << 12) / drw_w; + yscaleInt = (src_h / drw_h) & 0x3; + yscaleFract = (src_h << 12) / drw_h; + + overlay->YRGBSCALE = (xscaleInt << 15) | + ((xscaleFract & 0xFFF) << 3) | + (yscaleInt) | + ((yscaleFract & 0xFFF) << 20); + + if (drw_w > src_w) + { + /* horizontal up-scaling */ + overlay->OV0CMD &= ~HORIZONTAL_CHROMINANCE_FILTER; + overlay->OV0CMD &= ~HORIZONTAL_LUMINANCE_FILTER; + overlay->OV0CMD |= (HC_UP_INTERPOLATION | HL_UP_INTERPOLATION); + } + + if (drw_h > src_h) + { + /* vertical up-scaling */ + overlay->OV0CMD &= ~VERTICAL_CHROMINANCE_FILTER; + overlay->OV0CMD &= ~VERTICAL_LUMINANCE_FILTER; + overlay->OV0CMD |= (VC_UP_INTERPOLATION | VL_UP_INTERPOLATION); + } + + if (drw_w < src_w) + { + /* horizontal down-scaling */ + overlay->OV0CMD &= ~HORIZONTAL_CHROMINANCE_FILTER; + overlay->OV0CMD &= ~HORIZONTAL_LUMINANCE_FILTER; + overlay->OV0CMD |= (HC_DOWN_INTERPOLATION | HL_DOWN_INTERPOLATION); + } + + if (drw_h < src_h) + { + /* vertical down-scaling */ + overlay->OV0CMD &= ~VERTICAL_CHROMINANCE_FILTER; + overlay->OV0CMD &= ~VERTICAL_LUMINANCE_FILTER; + overlay->OV0CMD |= (VC_DOWN_INTERPOLATION | VL_DOWN_INTERPOLATION); + } + + /* now calculate the UV scaling factor */ + + if (xscaleFract) + { + xscaleFractUV = xscaleFract >> MINUV_SCALE; + overlay->OV0CMD &= ~HC_DOWN_INTERPOLATION; + overlay->OV0CMD |= HC_UP_INTERPOLATION; + } + + if (xscaleInt) + { + xscaleIntUV = xscaleInt >> MINUV_SCALE; + if (xscaleIntUV) + { + overlay->OV0CMD &= ~HC_UP_INTERPOLATION; + } + } + + if (yscaleFract) + { + yscaleFractUV = yscaleFract >> MINUV_SCALE; + overlay->OV0CMD &= ~VC_DOWN_INTERPOLATION; + overlay->OV0CMD |= VC_UP_INTERPOLATION; + } + + if (yscaleInt) + { + yscaleIntUV = yscaleInt >> MINUV_SCALE; + if (yscaleIntUV) + { + overlay->OV0CMD &= ~VC_UP_INTERPOLATION; + overlay->OV0CMD |= VC_DOWN_INTERPOLATION; + } + } + + overlay->UVSCALE = yscaleIntUV | ((xscaleFractUV & 0xFFF) << 3) | + ((yscaleFractUV & 0xFFF) << 20); + } + + switch(id) { + case FOURCC_YV12: + case FOURCC_I420: + overlay->OV0STRIDE = (dstPitch << 1) | (dstPitch << 16); + overlay->OV0CMD &= ~SOURCE_FORMAT; + overlay->OV0CMD |= YUV_420; + break; + case FOURCC_UYVY: + case FOURCC_YUY2: + default: + overlay->OV0STRIDE = dstPitch; + overlay->OV0CMD &= ~SOURCE_FORMAT; + overlay->OV0CMD |= YUV_422; + overlay->OV0CMD &= ~OV_BYTE_ORDER; + if (id == FOURCC_UYVY) + overlay->OV0CMD |= Y_SWAP; + break; + } + + overlay->OV0CMD &= ~BUFFER_AND_FIELD; + if (pPriv->currentBuf == 0) + overlay->OV0CMD |= BUFFER0_FIELD0; + else + overlay->OV0CMD |= BUFFER1_FIELD0; + + OVERLAY_UPDATE(i810c->OverlayPhysical); + +} + +static FBLinearPtr +i810AllocateMemory( + KdScreenInfo *screen, + FBLinearPtr linear, + int size +){ + KdCardInfo *card=screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + FBLinearPtr new_linear; + + if(linear) { + if(linear->size >= size) + return linear; + else + ErrorF("Ran out of memory for overlay buffer, requested size = %d\n",size); + } + + new_linear = xalloc(sizeof(FBLinearRec)); + new_linear->size = i810c->XvMem.Size; + new_linear->offset = i810c->XvMem.Start; + +/* fprintf(stderr,"Overlay mem offset %lx\n",new_linear->offset); */ + + return new_linear; +} + +static int +i810PutImage( + KdScreenInfo *screen, + short src_x, short src_y, + short drw_x, short drw_y, + short src_w, short src_h, + short drw_w, short drw_h, + int id, unsigned char* buf, + short width, short height, + Bool sync, + RegionPtr clipBoxes, pointer data +){ + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + I810PortPrivPtr pPriv = (I810PortPrivPtr)data; + INT32 x1, x2, y1, y2; + int srcPitch, dstPitch; + int top, left, npixels, nlines, size; + BoxRec dstBox; + + /* Clip */ + x1 = src_x; + x2 = src_x + src_w; + y1 = src_y; + y2 = src_y + src_h; + + dstBox.x1 = drw_x; + dstBox.x2 = drw_x + drw_w; + dstBox.y1 = drw_y; + dstBox.y2 = drw_y + drw_h; + + I810ClipVideo(&dstBox, &x1, &x2, &y1, &y2, + REGION_EXTENTS(pScreen, clipBoxes), width, height); + + if((x1 >= x2) || (y1 >= y2)) + return Success; + + switch(id) { + case FOURCC_YV12: + case FOURCC_I420: + srcPitch = (width + 3) & ~3; + dstPitch = ((width >> 1) + 7) & ~7; /* of chroma */ + size = dstPitch * height * 3; + break; + case FOURCC_UYVY: + case FOURCC_YUY2: + default: + srcPitch = (width << 1); + dstPitch = (srcPitch + 7) & ~7; + size = dstPitch * height; + break; + } + + if(!(pPriv->linear = i810AllocateMemory(screen, pPriv->linear, + (screen->fb[0].bitsPerPixel == 16) ? size : (size >> 1)))) + return BadAlloc; + + /* fixup pointers */ + pPriv->YBuf0offset = pPriv->linear->offset; + pPriv->UBuf0offset = pPriv->YBuf0offset + (dstPitch * 2 * height); + pPriv->VBuf0offset = pPriv->UBuf0offset + (dstPitch * height >> 1); + + pPriv->YBuf1offset = pPriv->linear->offset + size; + pPriv->UBuf1offset = pPriv->YBuf1offset + (dstPitch * 2 * height); + pPriv->VBuf1offset = pPriv->UBuf1offset + (dstPitch * height >> 1); + + /* wait for the last rendered buffer to be flipped in */ + while (((INREG(DOV0STA)&0x00100000)>>20) != pPriv->currentBuf); + + /* buffer swap */ + if (pPriv->currentBuf == 0) + pPriv->currentBuf = 1; + else + pPriv->currentBuf = 0; + + /* copy data */ + top = y1 >> 16; + left = (x1 >> 16) & ~1; + npixels = ((((x2 + 0xffff) >> 16) + 1) & ~1) - left; + + switch(id) { + case FOURCC_YV12: + case FOURCC_I420: + top &= ~1; + nlines = ((((y2 + 0xffff) >> 16) + 1) & ~1) - top; + i810CopyPlanarData(screen, buf, srcPitch, dstPitch, height, top, left, + nlines, npixels, id); + break; + case FOURCC_UYVY: + case FOURCC_YUY2: + default: + nlines = ((y2 + 0xffff) >> 16) - top; + I810CopyPackedData(screen, buf, srcPitch, dstPitch, top, left, nlines, + npixels); + break; + } + + /* update cliplist */ + if(!RegionsEqual(&pPriv->clip, clipBoxes)) { + REGION_COPY(pScreen, &pPriv->clip, clipBoxes); + i810FillBoxSolid(screen, REGION_NUM_RECTS(clipBoxes), + REGION_RECTS(clipBoxes), + pPriv->colorKey, GXcopy, ~0); + /* + XAAFillSolidRects(screen, pPriv->colorKey, GXcopy, ~0, + REGION_NUM_RECTS(clipBoxes), + REGION_RECTS(clipBoxes)); + */ + } + + + i810DisplayVideo(screen, id, width, height, dstPitch, + x1, y1, x2, y2, &dstBox, src_w, src_h, drw_w, drw_h); + + pPriv->videoStatus = CLIENT_VIDEO_ON; + + return Success; +} + + +static int +i810QueryImageAttributes( + KdScreenInfo *screen, + int id, + unsigned short *w, unsigned short *h, + int *pitches, int *offsets +){ + int size, tmp; + + if(*w > 720) *w = 720; + if(*h > 576) *h = 576; + + *w = (*w + 1) & ~1; + if(offsets) offsets[0] = 0; + + switch(id) { + case FOURCC_YV12: + case FOURCC_I420: + *h = (*h + 1) & ~1; + size = (*w + 3) & ~3; + if(pitches) pitches[0] = size; + size *= *h; + if(offsets) offsets[1] = size; + tmp = ((*w >> 1) + 3) & ~3; + if(pitches) pitches[1] = pitches[2] = tmp; + tmp *= (*h >> 1); + size += tmp; + if(offsets) offsets[2] = size; + size += tmp; + break; + case FOURCC_UYVY: + case FOURCC_YUY2: + default: + size = *w << 1; + if(pitches) pitches[0] = size; + size *= *h; + break; + } + + return size; +} + +static void +i810BlockHandler ( + int i, + pointer blockData, + pointer pTimeout, + pointer pReadmask +){ + ScreenPtr pScreen = screenInfo.screens[i]; + KdScreenPriv(pScreen); + KdScreenInfo *screen = pScreenPriv->screen; + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + I810PortPrivPtr pPriv = GET_PORT_PRIVATE(screen); + I810OverlayRegPtr overlay = (I810OverlayRegPtr) (i810c->FbBase + i810c->OverlayStart); + + pScreen->BlockHandler = i810c->BlockHandler; + + (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask); + + pScreen->BlockHandler = i810BlockHandler; + + if(pPriv->videoStatus & TIMER_MASK) { + UpdateCurrentTime(); + if(pPriv->videoStatus & OFF_TIMER) { + if(pPriv->offTime < currentTime.milliseconds) { + /* Turn off the overlay */ + overlay->OV0CMD &= 0xFFFFFFFE; + OVERLAY_UPDATE(i810c->OverlayPhysical); + + pPriv->videoStatus = FREE_TIMER; + pPriv->freeTime = currentTime.milliseconds + FREE_DELAY; + } + } else { /* FREE_TIMER */ + if(pPriv->freeTime < currentTime.milliseconds) { + if(pPriv->linear) { + xfree(pPriv->linear); + pPriv->linear = NULL; + } + pPriv->videoStatus = 0; + } + } + } +} Index: xc/programs/Xserver/hw/kdrive/i810/i810draw.c diff -u /dev/null xc/programs/Xserver/hw/kdrive/i810/i810draw.c:1.1 --- /dev/null Mon Jun 4 12:40:16 2001 +++ xc/programs/Xserver/hw/kdrive/i810/i810draw.c Thu Mar 29 21:18:41 2001 @@ -0,0 +1,603 @@ +/* COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 2000, 2001 Nokia Home Communications + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY +SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + +X Window System is a trademark of The Open Group */ + +/* Hardware accelerated drawing for KDrive i810 driver. + Author: Pontus Lidman +*/ + +#include "kdrive.h" +#ifdef XV +#include "kxv.h" +#endif +#include "i810.h" +#include "i810_reg.h" + +#include "Xmd.h" +#include "gcstruct.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "mistruct.h" +#include "fontstruct.h" +#include "dixfontstr.h" +#include "fb.h" +#include "migc.h" +#include "miline.h" +#include "picturestr.h" + +#define NUM_STACK_RECTS 1024 + +void +i810Sync( KdScreenInfo *screen ); +int +i810WaitLpRing( KdScreenInfo *screen, int n, int timeout_millis ); + +void +i810EmitInvarientState(KdScreenInfo *screen) +{ + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + + BEGIN_LP_RING( 10 ); + + OUT_RING( INST_PARSER_CLIENT | INST_OP_FLUSH | INST_FLUSH_MAP_CACHE ); + OUT_RING( GFX_CMD_CONTEXT_SEL | CS_UPDATE_USE | CS_USE_CTX0 ); + OUT_RING( INST_PARSER_CLIENT | INST_OP_FLUSH | INST_FLUSH_MAP_CACHE); + OUT_RING( 0 ); + + + OUT_RING( GFX_OP_COLOR_CHROMA_KEY ); + OUT_RING( CC1_UPDATE_KILL_WRITE | + CC1_DISABLE_KILL_WRITE | + CC1_UPDATE_COLOR_IDX | + CC1_UPDATE_CHROMA_LOW | + CC1_UPDATE_CHROMA_HI | + 0); + OUT_RING( 0 ); + OUT_RING( 0 ); + + /* No depth buffer in KDrive yet */ + /* OUT_RING( CMD_OP_Z_BUFFER_INFO ); */ + /* OUT_RING( pI810->DepthBuffer.Start | pI810->auxPitchBits); */ + + ADVANCE_LP_RING(); +} + +static unsigned int i810PatternRop[16] = { + 0x00, /* GXclear */ + 0xA0, /* GXand */ + 0x50, /* GXandReverse */ + 0xF0, /* GXcopy */ + 0x0A, /* GXandInvert */ + 0xAA, /* GXnoop */ + 0x5A, /* GXxor */ + 0xFA, /* GXor */ + 0x05, /* GXnor */ + 0xA5, /* GXequiv */ + 0x55, /* GXinvert */ + 0xF5, /* GXorReverse */ + 0x0F, /* GXcopyInvert */ + 0xAF, /* GXorInverted */ + 0x5F, /* GXnand */ + 0xFF /* GXset */ +}; + +void +i810SetupForSolidFill(KdScreenInfo *screen, int color, int rop, + unsigned int planemask) +{ + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + + if (I810_DEBUG & DEBUG_VERBOSE_ACCEL) + ErrorF( "i810SetupForFillRectSolid color: %x rop: %x mask: %x\n", + color, rop, planemask); + + /* Color blit, p166 */ + i810c->BR[13] = (BR13_SOLID_PATTERN | + (i810PatternRop[rop] << 16) | + (screen->width * i810c->cpp)); + i810c->BR[16] = color; +} + + +void +i810SubsequentSolidFillRect(KdScreenInfo *screen, int x, int y, int w, int h) +{ + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + + if (I810_DEBUG & DEBUG_VERBOSE_ACCEL) + ErrorF( "i810SubsequentFillRectSolid %d,%d %dx%d\n", + x,y,w,h); + + { + BEGIN_LP_RING(6); + + OUT_RING( BR00_BITBLT_CLIENT | BR00_OP_COLOR_BLT | 0x3 ); + OUT_RING( i810c->BR[13] ); + OUT_RING( (h << 16) | (w * i810c->cpp)); + OUT_RING( i810c->bufferOffset + + (y * screen->width + x) * i810c->cpp); + + OUT_RING( i810c->BR[16]); + OUT_RING( 0 ); /* pad to quadword */ + + ADVANCE_LP_RING(); + } +} + + +BOOL +i810FillOk (GCPtr pGC) +{ + FbBits depthMask; + + switch (pGC->fillStyle) { + case FillSolid: + return TRUE; + /* More cases later... */ + } + return FALSE; +} + +void +i810FillBoxSolid (KdScreenInfo *screen, int nBox, BoxPtr pBox, + unsigned long pixel, int alu, unsigned long planemask) +{ + i810SetupForSolidFill(screen, pixel, alu, planemask); + while (nBox--) + { + i810SubsequentSolidFillRect(screen, pBox->x1, pBox->y1, + pBox->x2-pBox->x1, pBox->y2-pBox->y1); + pBox++; + } + KdMarkSync(screen->pScreen); +} + + +void +i810PolyFillRect (DrawablePtr pDrawable, GCPtr pGC, + int nrectFill, xRectangle *prectInit) +{ + + + xRectangle *prect; + RegionPtr prgnClip; + register BoxPtr pbox; + register BoxPtr pboxClipped; + BoxPtr pboxClippedBase; + BoxPtr pextent; + BoxRec stackRects[NUM_STACK_RECTS]; + FbGCPrivPtr fbPriv = fbGetGCPrivate (pGC); + int numRects; + int n; + int xorg, yorg; + int x, y; + KdScreenPriv(pDrawable->pScreen); + KdScreenInfo *screen = pScreenPriv->screen; + + if (!i810FillOk (pGC)) + { + KdCheckPolyFillRect (pDrawable, pGC, nrectFill, prectInit); + return; + } + prgnClip = fbGetCompositeClip(pGC); + xorg = pDrawable->x; + yorg = pDrawable->y; + + if (xorg || yorg) + { + prect = prectInit; + n = nrectFill; + while(n--) + { + prect->x += xorg; + prect->y += yorg; + prect++; + } + } + + prect = prectInit; + + numRects = REGION_NUM_RECTS(prgnClip) * nrectFill; + if (numRects > NUM_STACK_RECTS) + { + pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec)); + if (!pboxClippedBase) + return; + } + else + pboxClippedBase = stackRects; + + pboxClipped = pboxClippedBase; + + if (REGION_NUM_RECTS(prgnClip) == 1) + { + int x1, y1, x2, y2, bx2, by2; + + pextent = REGION_RECTS(prgnClip); + x1 = pextent->x1; + y1 = pextent->y1; + x2 = pextent->x2; + y2 = pextent->y2; + while (nrectFill--) + { + if ((pboxClipped->x1 = prect->x) < x1) + pboxClipped->x1 = x1; + + if ((pboxClipped->y1 = prect->y) < y1) + pboxClipped->y1 = y1; + + bx2 = (int) prect->x + (int) prect->width; + if (bx2 > x2) + bx2 = x2; + pboxClipped->x2 = bx2; + + by2 = (int) prect->y + (int) prect->height; + if (by2 > y2) + by2 = y2; + pboxClipped->y2 = by2; + + prect++; + if ((pboxClipped->x1 < pboxClipped->x2) && + (pboxClipped->y1 < pboxClipped->y2)) + { + pboxClipped++; + } + } + } + else + { + int x1, y1, x2, y2, bx2, by2; + + pextent = REGION_EXTENTS(pGC->pScreen, prgnClip); + x1 = pextent->x1; + y1 = pextent->y1; + x2 = pextent->x2; + y2 = pextent->y2; + while (nrectFill--) + { + BoxRec box; + + if ((box.x1 = prect->x) < x1) + box.x1 = x1; + + if ((box.y1 = prect->y) < y1) + box.y1 = y1; + + bx2 = (int) prect->x + (int) prect->width; + if (bx2 > x2) + bx2 = x2; + box.x2 = bx2; + + by2 = (int) prect->y + (int) prect->height; + if (by2 > y2) + by2 = y2; + box.y2 = by2; + + prect++; + + if ((box.x1 >= box.x2) || (box.y1 >= box.y2)) + continue; + + n = REGION_NUM_RECTS (prgnClip); + pbox = REGION_RECTS(prgnClip); + + /* clip the rectangle to each box in the clip region + this is logically equivalent to calling Intersect() + */ + while(n--) + { + pboxClipped->x1 = max(box.x1, pbox->x1); + pboxClipped->y1 = max(box.y1, pbox->y1); + pboxClipped->x2 = min(box.x2, pbox->x2); + pboxClipped->y2 = min(box.y2, pbox->y2); + pbox++; + + /* see if clipping left anything */ + if(pboxClipped->x1 < pboxClipped->x2 && + pboxClipped->y1 < pboxClipped->y2) + { + pboxClipped++; + } + } + } + } + if (pboxClipped != pboxClippedBase) + { + switch (pGC->fillStyle) { + case FillSolid: + i810FillBoxSolid(screen, + pboxClipped-pboxClippedBase, pboxClippedBase, + pGC->fgPixel, pGC->alu, pGC->planemask); + break; + /* More cases later... */ + } + } + if (pboxClippedBase != stackRects) + xfree(pboxClippedBase); +} + +void +i810RefreshRing(KdScreenInfo *screen) +{ + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + + i810c->LpRing.head = INREG(LP_RING + RING_HEAD) & HEAD_ADDR; + i810c->LpRing.tail = INREG(LP_RING + RING_TAIL); + i810c->LpRing.space = i810c->LpRing.head - (i810c->LpRing.tail+8); + if (i810c->LpRing.space < 0) + i810c->LpRing.space += i810c->LpRing.mem.Size; + + i810c->NeedToSync = TRUE; +} + +int +i810WaitLpRing( KdScreenInfo *screen, int n, int timeout_millis ) +{ + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + I810RingBuffer *ring = &(i810c->LpRing); + int iters = 0; + int start = 0; + int now = 0; + int last_head = 0; + int first = 0; + + /* If your system hasn't moved the head pointer in 2 seconds, I'm going to + * call it crashed. + */ + if (timeout_millis == 0) + timeout_millis = 2000; + + if (I810_DEBUG) { + fprintf(stderr, "i810WaitLpRing %d\n", n); + first = GetTimeInMillis(); + } + + while (ring->space < n) + { + int i; + + ring->head = INREG(LP_RING + RING_HEAD) & HEAD_ADDR; + ring->space = ring->head - (ring->tail+8); + + if (ring->space < 0) + ring->space += ring->mem.Size; + + iters++; + now = GetTimeInMillis(); + if ( start == 0 || now < start || ring->head != last_head) { + if (I810_DEBUG) + if (now > start) + fprintf(stderr, "space: %d wanted %d\n", ring->space, n ); + start = now; + last_head = ring->head; + } else if ( now - start > timeout_millis ) { + + i810PrintErrorState( screen->card ); + fprintf(stderr, "space: %d wanted %d\n", ring->space, n ); + FatalError("lockup\n"); + } + + for (i = 0 ; i < 2000 ; i++) + ; + } + + if (I810_DEBUG) + { + now = GetTimeInMillis(); + if (now - first) { + fprintf(stderr,"Elapsed %d ms\n", now - first); + fprintf(stderr, "space: %d wanted %d\n", ring->space, n ); + } + } + + return iters; +} + +void +i810Sync( KdScreenInfo *screen ) +{ + KdCardInfo *card = screen->card; + I810CardInfo *i810c = card->driver; + + if (I810_DEBUG) + fprintf(stderr, "i810Sync\n"); + + /* Send a flush instruction and then wait till the ring is empty. + * This is stronger than waiting for the blitter to finish as it also + * flushes the internal graphics caches. + */ + { + BEGIN_LP_RING(2); + OUT_RING( INST_PARSER_CLIENT | INST_OP_FLUSH | INST_FLUSH_MAP_CACHE ); + OUT_RING( 0 ); /* pad to quadword */ + ADVANCE_LP_RING(); + } + + i810WaitLpRing(screen, i810c->LpRing.mem.Size - 8, 0 ); + + i810c->LpRing.space = i810c->LpRing.mem.Size - 8; + i810c->nextColorExpandBuf = 0; +} + +static const GCOps i810Ops = { + KdCheckFillSpans, + KdCheckSetSpans, + KdCheckPutImage, + KdCheckCopyArea, + KdCheckCopyPlane, + KdCheckPolyPoint, + KdCheckPolylines, + KdCheckPolySegment, + miPolyRectangle, + KdCheckPolyArc, + miFillPolygon, + i810PolyFillRect, + miPolyFillArc, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + KdCheckImageGlyphBlt, + KdCheckPolyGlyphBlt, + KdCheckPushPixels, +#ifdef NEED_LINEHELPER + ,NULL +#endif +}; + +void +i810ValidateGC (GCPtr pGC, Mask changes, DrawablePtr pDrawable) +{ + FbGCPrivPtr fbPriv = fbGetGCPrivate(pGC); + + fbValidateGC (pGC, changes, pDrawable); + + if (pDrawable->type == DRAWABLE_WINDOW) + pGC->ops = (GCOps *) &i810Ops; + else + pGC->ops = (GCOps *) &kdAsyncPixmapGCOps; +} + +GCFuncs i810GCFuncs = { + i810ValidateGC, + miChangeGC, + miCopyGC, + miDestroyGC, + miChangeClip, + miDestroyClip, + miCopyClip +}; + +int +i810CreateGC (GCPtr pGC) +{ + if (!fbCreateGC (pGC)) + return FALSE; + + if (pGC->depth != 1) + pGC->funcs = &i810GCFuncs; + + return TRUE; +} + +static void +i810SetRingRegs( KdScreenInfo *screen ) { + unsigned int itemp; + + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + + OUTREG(LP_RING + RING_TAIL, 0 ); + OUTREG(LP_RING + RING_HEAD, 0 ); + + itemp = INREG(LP_RING + RING_START); + itemp &= ~(START_ADDR); + itemp |= i810c->LpRing.mem.Start; + OUTREG(LP_RING + RING_START, itemp ); + + itemp = INREG(LP_RING + RING_LEN); + itemp &= ~(RING_NR_PAGES | RING_REPORT_MASK | RING_VALID_MASK); + itemp |= ((i810c->LpRing.mem.Size-4096) | RING_NO_REPORT | RING_VALID); + OUTREG(LP_RING + RING_LEN, itemp ); +} + +Bool +i810InitAccel(ScreenPtr pScreen) +{ + +/* fprintf(stderr,"i810InitAccel\n"); */ + + /* + * Hook up asynchronous drawing + */ + KdScreenInitAsync (pScreen); + /* + * Replace various fb screen functions + */ + pScreen->CreateGC = i810CreateGC; + + return TRUE; +} + +void +i810EnableAccel(ScreenPtr pScreen) +{ + + KdScreenPriv(pScreen); + KdScreenInfo *screen = pScreenPriv->screen; + KdCardInfo *card = screen->card; + I810CardInfo *i810c = (I810CardInfo *) card->driver; + +/* fprintf(stderr,"i810EnableAccel\n"); */ + + if (i810c->LpRing.mem.Size == 0) { + ErrorF("No memory for LpRing!! Acceleration not functional!!\n"); + } + + i810SetRingRegs( screen ); + + KdMarkSync (pScreen); +} + + +void +i810SyncAccel(ScreenPtr pScreen) +{ + KdScreenPriv(pScreen); + KdScreenInfo *screen = pScreenPriv->screen; + + i810Sync(screen); +} + +void +i810DisableAccel(ScreenPtr pScreen) +{ + KdScreenPriv(pScreen); + KdScreenInfo *screen = pScreenPriv->screen; + +/* fprintf(stderr,"i810DisableAccel\n"); */ + i810RefreshRing( screen ); + i810Sync( screen ); +} + +void +i810FiniAccel(ScreenPtr pScreen) +{ +/* fprintf(stderr,"i810FiniAccel\n"); */ + +} Index: xc/programs/Xserver/hw/kdrive/i810/i810draw.h diff -u /dev/null xc/programs/Xserver/hw/kdrive/i810/i810draw.h:1.1 --- /dev/null Mon Jun 4 12:40:16 2001 +++ xc/programs/Xserver/hw/kdrive/i810/i810draw.h Thu Mar 29 21:18:41 2001 @@ -0,0 +1,46 @@ +/* COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 2000, 2001 Nokia Home Communications + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY +SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + +X Window System is a trademark of The Open Group */ + +/* Hardware accelerated drawing for KDrive i810 driver, header file. + Author: Pontus Lidman +*/ + + +#ifndef _I810DRAW_H_ +#define _I810DRAW_H_ + +void i810RefreshRing(KdScreenInfo *screen); +int i810WaitLpRing( KdScreenInfo *screen, int n, int timeout_millis ); +void i810Sync( KdScreenInfo *screen ); + +#endif /* _I810DRAW_H_ */ Index: xc/programs/Xserver/hw/kdrive/i810/i810stub.c diff -u /dev/null xc/programs/Xserver/hw/kdrive/i810/i810stub.c:1.1 --- /dev/null Mon Jun 4 12:40:16 2001 +++ xc/programs/Xserver/hw/kdrive/i810/i810stub.c Thu Mar 29 21:18:41 2001 @@ -0,0 +1,80 @@ +/* COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 2000, 2001 Nokia Home Communications + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY +SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + +X Window System is a trademark of The Open Group */ + +/* Stub functions for the i810 KDrive driver + Author: Pontus Lidman +*/ + +#include "kdrive.h" +#include "kxv.h" +#include "i810.h" + +static const int i810Cards[]={ PCI_CHIP_I810, PCI_CHIP_I810_DC100, PCI_CHIP_I810_E }; + +#define numI810Cards (sizeof(i810Cards) / sizeof(i810Cards[0])) + +void +InitCard (char *name) +{ + KdCardAttr attr; + int i; + + Bool LinuxFindPci(CARD16, CARD16, CARD32, KdCardAttr *); + + for (i = 0; i < numI810Cards; i++) + if (LinuxFindPci (0x8086, i810Cards[i], 0, &attr)) + KdCardInfoAdd (&i810Funcs, &attr, (void *) i810Cards[i]); +} + + +void +InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) +{ + KdInitOutput (pScreenInfo, argc, argv); +} + +void +InitInput (int argc, char **argv) +{ + KdInitInput (&Ps2MouseFuncs, &LinuxKeyboardFuncs); +} + +int +ddxProcessArgument (int argc, char **argv, int i) +{ + int ret; + int KdProcessArgument(int, char **, int); + + ret = KdProcessArgument(argc, argv, i); + return ret; +} Index: xc/programs/Xserver/hw/kdrive/igs/igsreg.h diff -u xc/programs/Xserver/hw/kdrive/igs/igsreg.h:1.1 xc/programs/Xserver/hw/kdrive/igs/igsreg.h:1.2 --- xc/programs/Xserver/hw/kdrive/igs/igsreg.h:1.1 Wed May 24 19:52:48 2000 +++ xc/programs/Xserver/hw/kdrive/igs/igsreg.h Fri Mar 30 12:35:55 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/hw/kdrive/igs/igsreg.h,v 1.1 2000/05/24 23:52:48 keithp Exp $ + * $XFree86: xc/programs/Xserver/hw/kdrive/igs/igsreg.h,v 1.2 2001/03/30 17:35:55 keithp Exp $ * * Copyright © 2000 Keith Packard * @@ -46,7 +46,94 @@ #define IGS_INPUT_STATUS_1 (IGS_MISC_OUT+1) #define IGS_NREG (IGS_INPUT_STATUS_1+1) -#include "igsregs.t" +extern VgaReg igs_h_total[]; +extern VgaReg igs_h_de_end[]; +extern VgaReg igs_h_bstart[]; +extern VgaReg igs_h_bend[]; +extern VgaReg igs_de_skew[]; +extern VgaReg igs_ena_vr_access[]; +extern VgaReg igs_h_rstart[]; +extern VgaReg igs_h_rend[]; +extern VgaReg igs_h_rdelay[]; +extern VgaReg igs_v_total[]; +extern VgaReg igs_v_rstart[]; +extern VgaReg igs_v_rend[]; +extern VgaReg igs_clear_v_int[]; +extern VgaReg igs_disable_v_int[]; +extern VgaReg igs_bandwidth[]; +extern VgaReg igs_crt_protect[]; +extern VgaReg igs_v_de_end[]; +extern VgaReg igs_offset[]; +extern VgaReg igs_v_bstart[]; +extern VgaReg igs_v_bend[]; +extern VgaReg igs_linecomp[]; +extern VgaReg igs_ivideo[]; +extern VgaReg igs_num_fetch[]; +extern VgaReg igs_wcrt0[]; +extern VgaReg igs_wcrt1[]; +extern VgaReg igs_rcrts1[]; +extern VgaReg igs_selwk[]; +extern VgaReg igs_dot_clock_8[]; +extern VgaReg igs_screen_off[]; +extern VgaReg igs_enable_write_plane[]; +extern VgaReg igs_mexhsyn[]; +extern VgaReg igs_mexvsyn[]; +extern VgaReg igs_pci_burst_write[]; +extern VgaReg igs_pci_burst_read[]; +extern VgaReg igs_iow_retry[]; +extern VgaReg igs_mw_retry[]; +extern VgaReg igs_mr_retry[]; +extern VgaReg igs_biga22en[]; +extern VgaReg igs_biga24en[]; +extern VgaReg igs_biga22force[]; +extern VgaReg igs_bigswap[]; +#define IGS_BIGSWAP_8 0x3f +#define IGS_BIGSWAP_16 0x2a +#define IGS_BIGSWAP_32 0x00 +extern VgaReg igs_sprite_x[]; +extern VgaReg igs_sprite_preset_x[]; +extern VgaReg igs_sprite_y[]; +extern VgaReg igs_sprite_preset_y[]; +extern VgaReg igs_sprite_visible[]; +extern VgaReg igs_sprite_64x64[]; +extern VgaReg igs_mgrext[]; +extern VgaReg igs_hcshf[]; +extern VgaReg igs_mbpfix[]; +extern VgaReg igs_overscan_red[]; +extern VgaReg igs_overscan_green[]; +extern VgaReg igs_overscan_blue[]; +extern VgaReg igs_memgopg[]; +extern VgaReg igs_memr2wpg[]; +extern VgaReg igs_crtff16[]; +extern VgaReg igs_fifomust[]; +extern VgaReg igs_fifogen[]; +extern VgaReg igs_mode_sel[]; +#define IGS_MODE_TEXT 0 +#define IGS_MODE_8 1 +#define IGS_MODE_565 2 +#define IGS_MODE_5551 6 +#define IGS_MODE_8888 3 +#define IGS_MODE_888 4 +#define IGS_MODE_332 9 +#define IGS_MODE_4444 10 +extern VgaReg igs_sprite_addr[]; +extern VgaReg igs_fastmpie[]; +extern VgaReg igs_vclk_m[]; +extern VgaReg igs_vclk_n[]; +extern VgaReg igs_vfsel[]; +extern VgaReg igs_vclk_p[]; +extern VgaReg igs_frqlat[]; +extern VgaReg igs_dac_mask[]; +extern VgaReg igs_dac_read_index[]; +extern VgaReg igs_dac_write_index[]; +extern VgaReg igs_dac_data[]; +extern VgaReg igs_rampwdn[]; +extern VgaReg igs_dac6_8[]; +extern VgaReg igs_ramdacbypass[]; +extern VgaReg igs_dacpwdn[]; +extern VgaReg igs_cursor_read_index[]; +extern VgaReg igs_cursor_write_index[]; +extern VgaReg igs_cursor_data[]; #define igsGet(sv,r) VgaGet(&(sv)->card, (r)) #define igsGetImm(sv,r) VgaGetImm(&(sv)->card, (r)) Index: xc/programs/Xserver/hw/kdrive/linux/Imakefile diff -u xc/programs/Xserver/hw/kdrive/linux/Imakefile:1.4 xc/programs/Xserver/hw/kdrive/linux/Imakefile:1.5 --- xc/programs/Xserver/hw/kdrive/linux/Imakefile:1.4 Tue Sep 26 00:27:49 2000 +++ xc/programs/Xserver/hw/kdrive/linux/Imakefile Thu Mar 29 21:15:20 2001 @@ -1,5 +1,5 @@ XCOMM $XConsortium: Imakefile /main/10 1996/12/02 10:20:33 lehors $ -XCOMM $XFree86: xc/programs/Xserver/hw/kdrive/linux/Imakefile,v 1.4 2000/09/26 04:27:49 keithp Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/kdrive/linux/Imakefile,v 1.5 2001/03/30 02:15:20 keithp Exp $ KDRIVE=.. #include "../Kdrive.tmpl" @@ -8,9 +8,9 @@ TSOBJS = ts.o #endif -SRCS = keyboard.c linux.c ps2.c bus.c $(TSSRCS) +SRCS = keyboard.c linux.c ps2.c bus.c agp.c $(TSSRCS) -OBJS = keyboard.o linux.o ps2.o bus.o $(TSOBJS) +OBJS = keyboard.o linux.o ps2.o bus.o agp.o $(TSOBJS) INCLUDES = -I. $(KDINCS) Index: xc/programs/Xserver/hw/kdrive/linux/agp.c diff -u /dev/null xc/programs/Xserver/hw/kdrive/linux/agp.c:1.1 --- /dev/null Mon Jun 4 12:40:16 2001 +++ xc/programs/Xserver/hw/kdrive/linux/agp.c Thu Mar 29 21:18:41 2001 @@ -0,0 +1,348 @@ +/* + * Abstraction of the AGP GART interface. + * + * This version is for both Linux and FreeBSD. + * + * Copyright © 2000-2001 Nokia Home Communications + * Copyright © 2000 VA Linux Systems, Inc. + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY +SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + + */ + +/* $XFree86: xc/programs/Xserver/hw/kdrive/linux/agp.c,v 1.1 2001/03/30 02:18:41 keithp Exp $ */ + +/* + * Author: Pontus Lidman (adaption to KDrive) and others + */ + +#include "X.h" + +#include "Xdefs.h" +#include "Xmd.h" + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "agp.h" + +#if defined(linux) +#include + +#include "../../xfree86/os-support/linux/agpgart.h" + +#elif defined(__FreeBSD__) +#include +#include +#endif + +#ifndef AGP_DEVICE +#define AGP_DEVICE "/dev/agpgart" +#endif +/* AGP page size is independent of the host page size. */ +#ifndef AGP_PAGE_SIZE +#define AGP_PAGE_SIZE 4096 +#endif +#define AGPGART_MAJOR_VERSION 0 +#define AGPGART_MINOR_VERSION 99 + +static int gartFd = -1; +static int acquiredScreen = -1; + +/* + * Open /dev/agpgart. Keep it open until server exit. + */ + +static Bool +GARTInit() +{ + static Bool initDone = FALSE; + struct _agp_info agpinf; + + if (initDone) + return (gartFd != -1); + + initDone = TRUE; + + if (gartFd == -1) + gartFd = open(AGP_DEVICE, O_RDWR, 0); + else + return FALSE; + + if (gartFd == -1) { + fprintf(stderr, "Unable to open " AGP_DEVICE " (%s)\n", + strerror(errno)); + return FALSE; + } + + KdAcquireGART(-1); + /* Check the kernel driver version. */ + if (ioctl(gartFd, AGPIOC_INFO, &agpinf) != 0) { + fprintf(stderr, "GARTInit: AGPIOC_INFO failed (%s)\n", + strerror(errno)); + close(gartFd); + gartFd = -1; + return FALSE; + } + KdReleaseGART(-1); + +#if defined(linux) + /* Should this look for version >= rather than version == ? */ + if (agpinf.version.major != AGPGART_MAJOR_VERSION && + agpinf.version.minor != AGPGART_MINOR_VERSION) { + fprintf(stderr, + "Kernel agpgart driver version is not current" + " (%d.%d vs %d.%d)\n", + agpinf.version.major, agpinf.version.minor, + AGPGART_MAJOR_VERSION, AGPGART_MINOR_VERSION); + close(gartFd); + gartFd = -1; + return FALSE; + } +#endif + + return TRUE; +} + +Bool +KdAgpGARTSupported() +{ + return GARTInit(); +} + +AgpInfoPtr +KdGetAGPInfo(int screenNum) +{ + struct _agp_info agpinf; + AgpInfoPtr info; + + if (!GARTInit()) + return NULL; + + + if ((info = calloc(sizeof(AgpInfo), 1)) == NULL) { + fprintf(stderr, "Failed to allocate AgpInfo\n"); + return NULL; + } + + if (ioctl(gartFd, AGPIOC_INFO, &agpinf) != 0) { + fprintf(stderr, + "xf86GetAGPInfo: AGPIOC_INFO failed (%s)\n", + strerror(errno)); + return NULL; + } + + info->bridgeId = agpinf.bridge_id; + info->agpMode = agpinf.agp_mode; + info->base = agpinf.aper_base; + info->size = agpinf.aper_size; + info->totalPages = agpinf.pg_total; + info->systemPages = agpinf.pg_system; + info->usedPages = agpinf.pg_used; + + return info; +} + +/* + * XXX If multiple screens can acquire the GART, should we have a reference + * count instead of using acquiredScreen? + */ + +Bool +KdAcquireGART(int screenNum) +{ + if (screenNum != -1 && !GARTInit()) + return FALSE; + + if (screenNum == -1 || acquiredScreen != screenNum) { + if (ioctl(gartFd, AGPIOC_ACQUIRE, 0) != 0) { + fprintf(stderr, + "AGPIOC_ACQUIRE failed (%s)\n", + strerror(errno)); + return FALSE; + } + acquiredScreen = screenNum; + } + + return TRUE; +} + +Bool +KdReleaseGART(int screenNum) +{ + if (screenNum != -1 && !GARTInit()) + return FALSE; + + if (acquiredScreen == screenNum) { + if (ioctl(gartFd, AGPIOC_RELEASE, 0) != 0) { + fprintf(stderr, + "AGPIOC_RELEASE failed (%s)\n", + strerror(errno)); + return FALSE; + } + acquiredScreen = -1; + return TRUE; + } + return FALSE; +} + +int +KdAllocateGARTMemory(int screenNum, unsigned long size, int type, + unsigned long *physical) +{ + struct _agp_allocate alloc; + int pages; + + /* + * Allocates "size" bytes of GART memory (rounds up to the next + * page multiple) or type "type". A handle (key) for the allocated + * memory is returned. On error, the return value is -1. + */ + + if (!GARTInit() || acquiredScreen != screenNum) + return -1; + + pages = (size / AGP_PAGE_SIZE); + if (size % AGP_PAGE_SIZE != 0) + pages++; + + /* XXX check for pages == 0? */ + + alloc.pg_count = pages; + alloc.type = type; + + if (ioctl(gartFd, AGPIOC_ALLOCATE, &alloc) != 0) { + fprintf(stderr, "KdAllocateGARTMemory: " + "allocation of %d pages failed\n\t(%s)\n", pages, + strerror(errno)); + return -1; + } + + if (physical) + *physical = alloc.physical; + + return alloc.key; +} + + +/* Bind GART memory with "key" at "offset" */ +Bool +KdBindGARTMemory(int screenNum, int key, unsigned long offset) +{ + struct _agp_bind bind; + int pageOffset; + + if (!GARTInit() || acquiredScreen != screenNum) + return FALSE; + + if (acquiredScreen != screenNum) { + fprintf(stderr, + "AGP not acquired by this screen\n"); + return FALSE; + } + + if (offset % AGP_PAGE_SIZE != 0) { + fprintf(stderr, "KdBindGARTMemory: " + "offset (0x%lx) is not page-aligned (%d)\n", + offset, AGP_PAGE_SIZE); + return FALSE; + } + pageOffset = offset / AGP_PAGE_SIZE; + + bind.pg_start = pageOffset; + bind.key = key; + + if (ioctl(gartFd, AGPIOC_BIND, &bind) != 0) { + fprintf(stderr, "KdBindGARTMemory: " + "binding of gart memory with key %d\n" + "\tat offset 0x%lx failed (%s)\n", + key, offset, strerror(errno)); + return FALSE; + } + + return TRUE; +} + + +/* Unbind GART memory with "key" */ +Bool +KdUnbindGARTMemory(int screenNum, int key) +{ + struct _agp_unbind unbind; + + if (!GARTInit() || acquiredScreen != screenNum) + return FALSE; + + if (acquiredScreen != screenNum) { + fprintf(stderr, + "AGP not acquired by this screen\n"); + return FALSE; + } + + unbind.priority = 0; + unbind.key = key; + + if (ioctl(gartFd, AGPIOC_UNBIND, &unbind) != 0) { + fprintf(stderr, "KdUnbindGARTMemory: " + "unbinding of gart memory with key %d " + "failed (%s)\n", key, strerror(errno)); + return FALSE; + } + + return TRUE; +} + + +/* XXX Interface may change. */ +Bool +KdEnableAGP(int screenNum, CARD32 mode) +{ + agp_setup setup; + + if (!GARTInit() || acquiredScreen != screenNum) + return FALSE; + + setup.agp_mode = mode; + if (ioctl(gartFd, AGPIOC_SETUP, &setup) != 0) { + fprintf(stderr, "KdEnableAGP: " + "AGPIOC_SETUP with mode %ld failed (%s)\n", + mode, strerror(errno)); + return FALSE; + } + + return TRUE; +} + Index: xc/programs/Xserver/hw/kdrive/linux/agp.h diff -u /dev/null xc/programs/Xserver/hw/kdrive/linux/agp.h:1.1 --- /dev/null Mon Jun 4 12:40:16 2001 +++ xc/programs/Xserver/hw/kdrive/linux/agp.h Thu Mar 29 21:18:41 2001 @@ -0,0 +1,70 @@ +/* COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 2000, 2001 Nokia Home Communications + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY +SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + +X Window System is a trademark of The Open Group */ + +/* agp.h - header file for KDrive AGP GART interface + * + * Author: Pontus Lidman + * + */ + +#ifndef _AGP_H_ +#define _AGP_H_ + +#include "Xdefs.h" + +/* These two definitions must be consistent with the kernel's, + but using 1 or 2 in driver code is even uglier */ +#define AGP_DCACHE_MEMORY 1 +#define AGP_PHYS_MEMORY 2 + +typedef struct _AgpInfo { + CARD32 bridgeId; + CARD32 agpMode; + unsigned long base; + unsigned long size; + unsigned long totalPages; + unsigned long systemPages; + unsigned long usedPages; +} AgpInfo, *AgpInfoPtr; + +extern Bool KdAgpGARTSupported(void); +extern AgpInfoPtr KdGetAGPInfo(int screenNum); +extern Bool KdAcquireGART(int screenNum); +extern Bool KdReleaseGART(int screenNum); +extern int KdAllocateGARTMemory(int screenNum, unsigned long size, int type, + unsigned long *physical); +extern Bool KdBindGARTMemory(int screenNum, int key, unsigned long offset); +extern Bool KdUnbindGARTMemory(int screenNum, int key); +extern Bool KdEnableAGP(int screenNum, CARD32 mode); + +#endif /* _AGP_H_ */ Index: xc/programs/Xserver/hw/kdrive/linux/keyboard.c diff -u xc/programs/Xserver/hw/kdrive/linux/keyboard.c:1.5 xc/programs/Xserver/hw/kdrive/linux/keyboard.c:1.6 --- xc/programs/Xserver/hw/kdrive/linux/keyboard.c:1.5 Fri Dec 8 18:04:57 2000 +++ xc/programs/Xserver/hw/kdrive/linux/keyboard.c Thu Mar 29 21:15:20 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/hw/kdrive/linux/keyboard.c,v 1.5 2000/12/08 23:04:57 keithp Exp $ + * $XFree86: xc/programs/Xserver/hw/kdrive/linux/keyboard.c,v 1.6 2001/03/30 02:15:20 keithp Exp $ * * Copyright © 1999 Keith Packard * @@ -29,6 +29,7 @@ #define XK_PUBLISHING #include #include +#include extern int LinuxConsoleFd; Index: xc/programs/Xserver/hw/kdrive/linux/linux.c diff -u xc/programs/Xserver/hw/kdrive/linux/linux.c:1.4 xc/programs/Xserver/hw/kdrive/linux/linux.c:1.5 --- xc/programs/Xserver/hw/kdrive/linux/linux.c:1.4 Sun Aug 27 22:43:14 2000 +++ xc/programs/Xserver/hw/kdrive/linux/linux.c Thu Mar 29 21:15:20 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/hw/kdrive/linux/linux.c,v 1.4 2000/08/28 02:43:14 tsi Exp $ + * $XFree86: xc/programs/Xserver/hw/kdrive/linux/linux.c,v 1.5 2001/03/30 02:15:20 keithp Exp $ * * Copyright © 1999 Keith Packard * @@ -28,6 +28,7 @@ #include #include #include +#include #include static int vtno; @@ -174,11 +175,43 @@ n--; } attr->naddr = n; + attr->bus = bus; ret = TRUE; break; } fclose (f); return ret; +} + +unsigned char * +LinuxGetPciCfg(KdCardAttr *attr) { + char filename[256]; + FILE *f; + unsigned char *cfg; + int r; + + snprintf(filename, 255, "/proc/bus/pci/%02x/%02x.%x", + attr->bus >> 8, (attr->bus & 0xff) >> 3, attr->bus & 7); +/* fprintf(stderr,"Find card on path %s\n",filename); */ + + if (!(f=fopen(filename,"r"))) + return NULL; + + if (!(cfg=xalloc(256))) + { + fclose(f); + return NULL; + } + + if (256 != (r=fread(cfg, 1, 256, f))) + { + fprintf(stderr,"LinuxGetPciCfg: read %d, expected 256\n",r); + free(cfg); + cfg=NULL; + } + fclose(f); +/* fprintf(stderr,"LinuxGetPciCfg: success, returning %p\n",cfg); */ + return cfg; } void Index: xc/programs/Xserver/hw/kdrive/linux/ps2.c diff -u xc/programs/Xserver/hw/kdrive/linux/ps2.c:1.2 xc/programs/Xserver/hw/kdrive/linux/ps2.c:1.4 --- xc/programs/Xserver/hw/kdrive/linux/ps2.c:1.2 Wed Feb 23 15:30:00 2000 +++ xc/programs/Xserver/hw/kdrive/linux/ps2.c Sun Apr 1 10:00:04 2001 @@ -1,5 +1,5 @@ /* - * Id: ps2.c,v 1.1 1999/11/02 03:54:46 keithp Exp $ + * $XFree86: xc/programs/Xserver/hw/kdrive/linux/ps2.c,v 1.4 2001/04/01 14:00:04 tsi Exp $ * * Copyright © 1999 Keith Packard * @@ -115,6 +115,7 @@ if (ps2Port >= 0) return ps2Port; } + return -1; } void Index: xc/programs/Xserver/hw/kdrive/trident/trident.c diff -u xc/programs/Xserver/hw/kdrive/trident/trident.c:1.15 xc/programs/Xserver/hw/kdrive/trident/trident.c:1.16 --- xc/programs/Xserver/hw/kdrive/trident/trident.c:1.15 Wed Nov 29 03:42:25 2000 +++ xc/programs/Xserver/hw/kdrive/trident/trident.c Wed Mar 21 11:43:16 2001 @@ -1,6 +1,4 @@ /* - * $Id: trident.c,v 1.11 2000/09/24 13:52:40 alanh Exp $ - * * Copyright © 1999 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its @@ -21,7 +19,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/trident/trident.c,v 1.15 2000/11/29 08:42:25 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/trident/trident.c,v 1.16 2001/03/21 16:43:16 dawes Exp $ */ #include "trident.h" #define extern Index: xc/programs/Xserver/hw/kdrive/vesa/Xvesa.man diff -u xc/programs/Xserver/hw/kdrive/vesa/Xvesa.man:1.4 xc/programs/Xserver/hw/kdrive/vesa/Xvesa.man:1.6 --- xc/programs/Xserver/hw/kdrive/vesa/Xvesa.man:1.4 Thu Nov 30 19:01:32 2000 +++ xc/programs/Xserver/hw/kdrive/vesa/Xvesa.man Sat Jan 27 13:20:40 2001 @@ -1,5 +1,5 @@ -.\" $XFree86: xc/programs/Xserver/hw/kdrive/vesa/Xvesa.man,v 1.4 2000/12/01 00:01:32 keithp Exp $ -.TH Xvesa 1 +.\" $XFree86: xc/programs/Xserver/hw/kdrive/vesa/Xvesa.man,v 1.6 2001/01/27 18:20:40 dawes Exp $ +.TH Xvesa 1 __vendorversion__ .SH NAME Xvesa \- VESA Bios Extensions tiny X server .SH SYNOPSIS @@ -78,7 +78,7 @@ restoring the complete video card state has proven unreliable on most video cards. .SH SEE ALSO -X(1), Xserver(1), Xkdrive(1), xdm(1), xinit(1). +X(__miscmansuffix__), Xserver(1), Xkdrive(1), xdm(1), xinit(1). .SH AUTHORS The VESA driver was written by Juliusz Chroboczek who didn't realise what he was doing until it was too late. Keith Packard then added Index: xc/programs/Xserver/hw/sun/Imakefile diff -u xc/programs/Xserver/hw/sun/Imakefile:1.4 xc/programs/Xserver/hw/sun/Imakefile:1.6 --- xc/programs/Xserver/hw/sun/Imakefile:1.4 Sat Jun 17 14:23:23 2000 +++ xc/programs/Xserver/hw/sun/Imakefile Mon Apr 16 16:57:04 2001 @@ -1,6 +1,10 @@ -XCOMM $TOG: Imakefile /main/48 1997/11/13 15:48:43 msr $ -XCOMM $XFree86: xc/programs/Xserver/hw/sun/Imakefile,v 1.4 2000/06/17 18:23:23 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ + + + +XCOMM $XFree86: xc/programs/Xserver/hw/sun/Imakefile,v 1.6 2001/04/16 20:57:04 herrb Exp $ + #include SRCS1 = sunInit.c \ @@ -62,7 +66,7 @@ #ifndef i386Architecture sunInExMono.o: $(ICONFIGFILES) -ObjectFromSpecialSource(sunInExMono,../../mi/miinitext,-I$(EXTINCSRC) $(EXT_DEFINES) -UPEXEXT -UGLXEXT) +ObjectFromSpecialSource(sunInExMono,../../mi/miinitext,-I$(EXTINCSRC) $(EXT_DEFINES) -UPEXEXT -UGLXEXT -UXV -UXF86BIGFONT -UXF86MISC -URENDER) ObjectFromSpecialSource(sunInitMono,sunInit,-DSUNMAXDEPTH=1) ObjectFromSpecialSource(sunInitMulti,sunInit,-DSUNMAXDEPTH=32) #endif Index: xc/programs/Xserver/hw/sun/Xsun.man diff -u xc/programs/Xserver/hw/sun/Xsun.man:1.4 xc/programs/Xserver/hw/sun/Xsun.man:1.7 --- xc/programs/Xserver/hw/sun/Xsun.man:1.4 Sun Oct 4 05:38:32 1998 +++ xc/programs/Xserver/hw/sun/Xsun.man Sat Jan 27 13:20:40 2001 @@ -1,4 +1,4 @@ -.\" $TOG: Xsun.man /main/29 1998/02/10 13:17:41 kaleb $ +.\" $Xorg: Xsun.man,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ .\" Copyright 1988 Sun Microsystems, Inc. .\" Copyright 1993, 1994, 1998 The Open Group .\" @@ -19,7 +19,10 @@ .\" not be used in advertising or otherwise to promote the sale, use or .\" other dealings in this Software without prior written authorization .\" from The Open Group. -.TH XSUN 1 "Release 6.4" "X Version 11" +.\" +.\" $XFree86: xc/programs/Xserver/hw/sun/Xsun.man,v 1.7 2001/01/27 18:20:40 dawes Exp $ +.\" +.TH XSUN 1 __xorgversion__ .SH NAME Xsun, XsunMono, Xsun24 \- Sun server for X Version 11 .SH SYNOPSIS @@ -132,7 +135,7 @@ the (colon separated) list of display devices to use. .SH "SEE ALSO" .PP -X(1), Xserver(1), xdm(1), xinit(1) +X(__miscmansuffix__), Xserver(1), xdm(1), xinit(1) .SH BUGS The auto-configuration depends on there being appropriate special files in the Index: xc/programs/Xserver/hw/sun/constype.c diff -u xc/programs/Xserver/hw/sun/constype.c:3.4 xc/programs/Xserver/hw/sun/constype.c:3.5 --- xc/programs/Xserver/hw/sun/constype.c:3.4 Mon Dec 23 01:30:11 1996 +++ xc/programs/Xserver/hw/sun/constype.c Wed Jan 17 17:36:49 2001 @@ -1,6 +1,5 @@ /* - * $XConsortium: constype.c /main/9 1996/10/31 14:23:42 kaleb $ - * $XFree86: xc/programs/Xserver/hw/sun/constype.c,v 3.4 1996/12/23 06:30:11 dawes Exp $ + * $Xorg: constype.c,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ * * consoletype - utility to print out string identifying Sun console type * @@ -18,6 +17,7 @@ * * Author: Doug Moran, SRI */ +/* $XFree86: xc/programs/Xserver/hw/sun/constype.c,v 3.5 2001/01/17 22:36:49 dawes Exp $ */ /* SUN-SPOTS DIGEST Thursday, 17 March 1988 Volume 6 : Issue 31 Index: xc/programs/Xserver/hw/sun/constype.man diff -u xc/programs/Xserver/hw/sun/constype.man:1.4 xc/programs/Xserver/hw/sun/constype.man:1.6 --- xc/programs/Xserver/hw/sun/constype.man:1.4 Sun Oct 4 05:38:32 1998 +++ xc/programs/Xserver/hw/sun/constype.man Sat Jan 27 13:20:41 2001 @@ -1,5 +1,8 @@ -.\" $TOG: constype.man /main/13 1997/11/04 21:19:39 kaleb $ -.TH CONSTYPE 1 "Release 6.4" "X Version 11" +.\" $Xorg: constype.man,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ +.\" +.\" $XFree86: xc/programs/Xserver/hw/sun/constype.man,v 1.6 2001/01/27 18:20:41 dawes Exp $ +.\" +.TH CONSTYPE 1 __xorgversion__ .SH NAME constype \- print type of Sun console .SH SYNOPSIS Index: xc/programs/Xserver/hw/sun/kbd_mode.c diff -u xc/programs/Xserver/hw/sun/kbd_mode.c:3.7 xc/programs/Xserver/hw/sun/kbd_mode.c:3.8 --- xc/programs/Xserver/hw/sun/kbd_mode.c:3.7 Wed May 17 15:52:21 2000 +++ xc/programs/Xserver/hw/sun/kbd_mode.c Wed Jan 17 17:36:49 2001 @@ -1,4 +1,4 @@ -/* $TOG: kbd_mode.c /main/14 1998/02/10 13:16:06 kaleb $ */ +/* $Xorg: kbd_mode.c,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -27,7 +27,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/hw/sun/kbd_mode.c,v 3.7 2000/05/17 19:52:21 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sun/kbd_mode.c,v 3.8 2001/01/17 22:36:49 dawes Exp $ */ #ifndef lint static char sccsid[] = "@(#)kbd_mode.c 7.1 87/04/13"; Index: xc/programs/Xserver/hw/sun/kbd_mode.man diff -u xc/programs/Xserver/hw/sun/kbd_mode.man:1.4 xc/programs/Xserver/hw/sun/kbd_mode.man:1.6 --- xc/programs/Xserver/hw/sun/kbd_mode.man:1.4 Sun Oct 4 05:38:33 1998 +++ xc/programs/Xserver/hw/sun/kbd_mode.man Sat Jan 27 13:20:41 2001 @@ -1,4 +1,4 @@ -.\" $TOG: kbd_mode.man /main/14 1998/02/10 13:16:10 kaleb $ +.\" $Xorg: kbd_mode.man,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ .\" Copyright 1987 Sun Microsystems, Inc. .\" Copyright 1993, 1998 The Open Group .\" @@ -19,7 +19,10 @@ .\" not be used in advertising or otherwise to promote the sale, use or .\" other dealings in this Software without prior written authorization .\" from The Open Group. -.TH KBD_MODE 1 "Release 6.4" "X Version 11" +.\" +.\" $XFree86: xc/programs/Xserver/hw/sun/kbd_mode.man,v 1.6 2001/01/27 18:20:41 dawes Exp $ +.\" +.TH KBD_MODE 1 __xorgversion__ .SH NAME kbd_mode \- recover the Sun console keyboard .SH SYNOPSIS Index: xc/programs/Xserver/hw/sun/sun.h diff -u xc/programs/Xserver/hw/sun/sun.h:3.10 xc/programs/Xserver/hw/sun/sun.h:3.11 --- xc/programs/Xserver/hw/sun/sun.h:3.10 Tue Oct 24 14:07:47 2000 +++ xc/programs/Xserver/hw/sun/sun.h Wed Jan 17 17:36:49 2001 @@ -1,5 +1,5 @@ -/* $TOG: sun.h /main/61 1997/10/16 16:27:01 kaleb $ */ +/* $Xorg: sun.h,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ */ /*- * Copyright (c) 1987 by the Regents of the University of California @@ -13,7 +13,7 @@ * express or implied warranty. */ -/* $XFree86: xc/programs/Xserver/hw/sun/sun.h,v 3.10 2000/10/24 18:07:47 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sun/sun.h,v 3.11 2001/01/17 22:36:49 dawes Exp $ */ #ifndef _SUN_H_ #define _SUN_H_ Index: xc/programs/Xserver/hw/sun/sunCfb.c diff -u xc/programs/Xserver/hw/sun/sunCfb.c:3.11 xc/programs/Xserver/hw/sun/sunCfb.c:3.12 --- xc/programs/Xserver/hw/sun/sunCfb.c:3.11 Tue Oct 24 14:07:47 2000 +++ xc/programs/Xserver/hw/sun/sunCfb.c Wed Jan 17 17:36:50 2001 @@ -1,5 +1,5 @@ -/* $TOG: sunCfb.c /main/23 1998/02/10 13:16:19 kaleb $ */ +/* $Xorg: sunCfb.c,v 1.4 2000/08/17 19:48:29 cpqbld Exp $ */ /* Copyright 1990, 1998 The Open Group @@ -50,7 +50,7 @@ ********************************************************/ -/* $XFree86: xc/programs/Xserver/hw/sun/sunCfb.c,v 3.11 2000/10/24 18:07:47 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sun/sunCfb.c,v 3.12 2001/01/17 22:36:50 dawes Exp $ */ /* * Copyright 1987 by the Regents of the University of California @@ -303,7 +303,9 @@ #if !defined(i386) /* { */ #ifdef SVR4 /* { */ +#ifdef INCLUDE_CG2_HEADER /* { */ #include +#endif /* } INCLUDE_CG2_HEADER */ #else #ifndef CSRG_BASED /* { */ #include @@ -318,7 +320,7 @@ #endif /* } */ #endif /* } */ -#ifndef __bsdi__ /* { */ +#ifdef INCLUDE_CG2_HEADER typedef struct { struct cg2memfb mem; struct cg2fb regs; @@ -421,8 +423,7 @@ #endif /* ifndef LOWMEMFTPT */ return ret; } - -#endif /* } */ +#endif /* INCLUDE_CG2_HEADER */ #define CG4_HEIGHT 900 #define CG4_WIDTH 1152 Index: xc/programs/Xserver/hw/sun/sunCfb24.c diff -u xc/programs/Xserver/hw/sun/sunCfb24.c:1.1.1.2 xc/programs/Xserver/hw/sun/sunCfb24.c:1.1.1.3 --- xc/programs/Xserver/hw/sun/sunCfb24.c:1.1.1.2 Sun Sep 27 04:05:56 1998 +++ xc/programs/Xserver/hw/sun/sunCfb24.c Tue Jan 16 17:43:22 2001 @@ -1,5 +1,5 @@ -/* $TOG: sunCfb24.c /main/4 1998/02/10 13:16:15 kaleb $ */ +/* $Xorg: sunCfb24.c,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ */ /* Index: xc/programs/Xserver/hw/sun/sunCursor.c diff -u xc/programs/Xserver/hw/sun/sunCursor.c:3.1 xc/programs/Xserver/hw/sun/sunCursor.c:3.2 --- xc/programs/Xserver/hw/sun/sunCursor.c:3.1 Sun Oct 4 05:38:35 1998 +++ xc/programs/Xserver/hw/sun/sunCursor.c Wed Jan 17 17:36:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: sunCursor.c /main/45 1998/02/10 13:16:24 kaleb $ */ +/* $Xorg: sunCursor.c,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ */ /* Copyright 1988 Sun Microsystems, Inc. @@ -23,7 +23,7 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/hw/sun/sunCursor.c,v 3.1 1998/10/04 09:38:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sun/sunCursor.c,v 3.2 2001/01/17 22:36:50 dawes Exp $ */ /*- * sunCursor.c -- Index: xc/programs/Xserver/hw/sun/sunFbs.c diff -u xc/programs/Xserver/hw/sun/sunFbs.c:1.3 xc/programs/Xserver/hw/sun/sunFbs.c:1.4 --- xc/programs/Xserver/hw/sun/sunFbs.c:1.3 Sun Oct 4 05:38:35 1998 +++ xc/programs/Xserver/hw/sun/sunFbs.c Wed Jan 17 17:36:50 2001 @@ -1,5 +1,5 @@ -/* $TOG: sunFbs.c /main/10 1998/02/10 13:16:29 kaleb $ */ +/* $Xorg: sunFbs.c,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ */ /* Copyright 1990, 1993, 1998 The Open Group @@ -63,7 +63,7 @@ * express or implied warranty. */ -/* $XFree86: xc/programs/Xserver/hw/sun/sunFbs.c,v 1.3 1998/10/04 09:38:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sun/sunFbs.c,v 1.4 2001/01/17 22:36:50 dawes Exp $ */ /****************************************************************/ /* Modified from sunCG4C.c for X11R3 by Tom Jarmolowski */ Index: xc/programs/Xserver/hw/sun/sunGX.c diff -u xc/programs/Xserver/hw/sun/sunGX.c:1.3 xc/programs/Xserver/hw/sun/sunGX.c:1.4 --- xc/programs/Xserver/hw/sun/sunGX.c:1.3 Sun Oct 4 05:38:36 1998 +++ xc/programs/Xserver/hw/sun/sunGX.c Wed Jan 17 17:36:50 2001 @@ -1,5 +1,5 @@ #ifndef lint -static char *rid="$TOG: sunGX.c /main/28 1998/02/10 13:16:33 kaleb $"; +static char *rid="$Xorg: sunGX.c,v 1.4 2000/08/18 11:06:23 xorgcvs Exp $"; #endif /* lint */ /* Copyright 1991, 1998 The Open Group @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/hw/sun/sunGX.c,v 1.3 1998/10/04 09:38:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sun/sunGX.c,v 1.4 2001/01/17 22:36:50 dawes Exp $ */ #include "sun.h" Index: xc/programs/Xserver/hw/sun/sunGX.h diff -u xc/programs/Xserver/hw/sun/sunGX.h:1.1.1.2 xc/programs/Xserver/hw/sun/sunGX.h:1.1.1.3 --- xc/programs/Xserver/hw/sun/sunGX.h:1.1.1.2 Sun Sep 27 04:05:58 1998 +++ xc/programs/Xserver/hw/sun/sunGX.h Tue Jan 16 17:43:24 2001 @@ -1,5 +1,5 @@ /* - * $TOG: sunGX.h /main/5 1998/02/10 13:16:42 kaleb $ + * $Xorg: sunGX.h,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ * Copyright 1991, 1998 The Open Group Index: xc/programs/Xserver/hw/sun/sunInit.c diff -u xc/programs/Xserver/hw/sun/sunInit.c:3.7 xc/programs/Xserver/hw/sun/sunInit.c:3.9 --- xc/programs/Xserver/hw/sun/sunInit.c:3.7 Sun Oct 4 05:38:36 1998 +++ xc/programs/Xserver/hw/sun/sunInit.c Tue Jan 30 17:06:15 2001 @@ -1,4 +1,4 @@ -/* $TOG: sunInit.c /main/81 1998/02/10 13:16:47 kaleb $ */ +/* $Xorg: sunInit.c,v 1.4 2000/08/17 19:48:29 cpqbld Exp $ */ /* * sunInit.c -- * Initialization functions for screen/keyboard/mouse, etc. @@ -15,7 +15,7 @@ * * */ -/* $XFree86: xc/programs/Xserver/hw/sun/sunInit.c,v 3.7 1998/10/04 09:38:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sun/sunInit.c,v 3.9 2001/01/30 22:06:15 tsi Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -96,6 +96,7 @@ #define CG2I NULL #define CG4I NULL #else /* }{ */ +#ifdef INCLUDE_CG2_HEADER extern Bool sunCG2Init( #if NeedFunctionPrototypes int /* screen */, @@ -105,6 +106,7 @@ #endif ); #define CG2I sunCG2Init +#endif /* INCLUDE_CG2_HEADER */ extern Bool sunCG4Init( #if NeedFunctionPrototypes int /* screen */, @@ -197,7 +199,9 @@ { NULL, "SUN1BW (bw1)" }, { NULL, "SUN1COLOR (cg1)" }, { BW2I, "SUN2BW (bw2)" }, +#ifdef INCLUDE_CG2_HEADER { CG2I, "SUN2COLOR (cg2)" }, +#endif /* INCLUDE_CG2_HEADER */ { NULL, "SUN2GP (gp1/gp2)" }, { NULL, "SUN5COLOR (cg5/386i accel)" }, { CG3I, "SUN3COLOR (cg3)" }, @@ -665,7 +669,7 @@ int argc; char **argv; { - DevicePtr p, k; + pointer p, k; extern Bool mieqInit(); p = AddInputDevice(sunMouseProc, TRUE); @@ -849,9 +853,17 @@ return ret; } -extern BSFuncRec cfbBSFuncRec, cfb16BSFuncRec, cfb32BSFuncRec; -extern int cfb16ScreenPrivateIndex, cfb32ScreenPrivateIndex; -extern Bool cfbCloseScreen(), cfb16CloseScreen(), cfb32CloseScreen(); +/* Adapt cfb logic */ +#undef CFB_NEED_SCREEN_PRIVATE +#if !defined(SINGLEDEPTH) || defined(FORDE_SEPARATE_PRIVATE) +#define CFB_NEED_SCREEN_PRIVATE +#endif + +extern BSFuncRec cfbBSFuncRec, cfb16BSFuncRec, cfb32BSFuncRec; +extern Bool cfbCloseScreen(), cfb16CloseScreen(), cfb32CloseScreen(); +#ifdef CFB_NEED_SCREEN_PRIVATE +extern int cfb16ScreenPrivateIndex, cfb32ScreenPrivateIndex; +#endif Bool sunCfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp) @@ -862,7 +874,9 @@ int width; /* pixel width of frame buffer */ int bpp; { +#ifdef CFB_NEED_SCREEN_PRIVATE pointer oldDevPrivate; +#endif VisualPtr visuals; int nvisuals; DepthPtr depths; @@ -873,7 +887,9 @@ if (!cfbInitVisuals(&visuals, &depths, &nvisuals, &ndepths, &rootdepth, &defaultVisual, 1 << (bpp - 1), 8)) return FALSE; +#ifdef CFB_NEED_SCREEN_PRIVATE oldDevPrivate = pScreen->devPrivate; +#endif if (! miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, rootdepth, ndepths, depths, defaultVisual, nvisuals, visuals)) @@ -886,17 +902,21 @@ break; case 16: pScreen->CloseScreen = cfb16CloseScreen; + pScreen->BackingStoreFuncs = cfb16BSFuncRec; +#ifdef CFB_NEED_SCREEN_PRIVATE pScreen->devPrivates[cfb16ScreenPrivateIndex].ptr = pScreen->devPrivate; pScreen->devPrivate = oldDevPrivate; - pScreen->BackingStoreFuncs = cfb16BSFuncRec; +#endif break; case 32: pScreen->CloseScreen = cfb32CloseScreen; + pScreen->BackingStoreFuncs = cfb32BSFuncRec; +#ifdef CFB_NEED_SCREEN_PRIVATE pScreen->devPrivates[cfb32ScreenPrivateIndex].ptr = pScreen->devPrivate; pScreen->devPrivate = oldDevPrivate; - pScreen->BackingStoreFuncs = cfb32BSFuncRec; +#endif break; } return TRUE; Index: xc/programs/Xserver/hw/sun/sunIo.c diff -u xc/programs/Xserver/hw/sun/sunIo.c:3.4 xc/programs/Xserver/hw/sun/sunIo.c:3.5.2.1 --- xc/programs/Xserver/hw/sun/sunIo.c:3.4 Sun Oct 4 05:38:37 1998 +++ xc/programs/Xserver/hw/sun/sunIo.c Fri May 25 14:50:08 2001 @@ -1,4 +1,4 @@ -/* $TOG: sunIo.c /main/50 1998/02/10 13:16:53 kaleb $ */ +/* $Xorg: sunIo.c,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ */ /*- * sunIo.c -- * Functions to handle input from the keyboard and mouse. @@ -15,7 +15,7 @@ * * */ -/* $XFree86: xc/programs/Xserver/hw/sun/sunIo.c,v 3.4 1998/10/04 09:38:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sun/sunIo.c,v 3.5.2.1 2001/05/25 18:50:08 dawes Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -67,7 +67,7 @@ void ProcessInputEvents () { - (void) mieqProcessInputEvents (); + mieqProcessInputEvents (); miPointerUpdate (); } Index: xc/programs/Xserver/hw/sun/sunKbd.c diff -u xc/programs/Xserver/hw/sun/sunKbd.c:1.4 xc/programs/Xserver/hw/sun/sunKbd.c:1.5 --- xc/programs/Xserver/hw/sun/sunKbd.c:1.4 Sun Dec 20 06:57:33 1998 +++ xc/programs/Xserver/hw/sun/sunKbd.c Wed Jan 17 17:36:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: sunKbd.c /main/78 1998/02/10 13:16:57 kaleb $ */ +/* $Xorg: sunKbd.c,v 1.3 2000/08/17 19:48:30 cpqbld Exp $ */ /*- * Copyright 1987 by the Regents of the University of California * @@ -39,7 +39,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/hw/sun/sunKbd.c,v 1.4 1998/12/20 11:57:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sun/sunKbd.c,v 1.5 2001/01/17 22:36:50 dawes Exp $ */ #define NEED_EVENTS #include "sun.h" Index: xc/programs/Xserver/hw/sun/sunKeyMap.c diff -u xc/programs/Xserver/hw/sun/sunKeyMap.c:1.2 xc/programs/Xserver/hw/sun/sunKeyMap.c:1.3 --- xc/programs/Xserver/hw/sun/sunKeyMap.c:1.2 Sun Dec 20 06:57:34 1998 +++ xc/programs/Xserver/hw/sun/sunKeyMap.c Wed Jan 17 17:36:50 2001 @@ -1,4 +1,4 @@ -/* $TOG: sunKeyMap.c /main/33 1998/02/10 13:17:03 kaleb $ */ +/* $Xorg: sunKeyMap.c,v 1.3 2000/08/17 19:48:30 cpqbld Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -27,7 +27,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/hw/sun/sunKeyMap.c,v 1.2 1998/12/20 11:57:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sun/sunKeyMap.c,v 1.3 2001/01/17 22:36:50 dawes Exp $ */ #include "sun.h" #define XK_KATAKANA Index: xc/programs/Xserver/hw/sun/sunMfb.c diff -u xc/programs/Xserver/hw/sun/sunMfb.c:3.2 xc/programs/Xserver/hw/sun/sunMfb.c:3.3 --- xc/programs/Xserver/hw/sun/sunMfb.c:3.2 Sun Oct 4 05:38:38 1998 +++ xc/programs/Xserver/hw/sun/sunMfb.c Wed Jan 17 17:36:51 2001 @@ -1,5 +1,5 @@ -/* $TOG: sunMfb.c /main/6 1998/02/10 13:17:17 kaleb $ */ +/* $Xorg: sunMfb.c,v 1.3 2000/08/17 19:48:32 cpqbld Exp $ */ /* Copyright 1990, 1993, 1998 The Open Group @@ -20,7 +20,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/Xserver/hw/sun/sunMfb.c,v 3.2 1998/10/04 09:38:38 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sun/sunMfb.c,v 3.3 2001/01/17 22:36:51 dawes Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. Index: xc/programs/Xserver/hw/sun/sunMouse.c diff -u xc/programs/Xserver/hw/sun/sunMouse.c:1.1.1.3 xc/programs/Xserver/hw/sun/sunMouse.c:1.1.1.4 --- xc/programs/Xserver/hw/sun/sunMouse.c:1.1.1.3 Sun Sep 27 04:06:03 1998 +++ xc/programs/Xserver/hw/sun/sunMouse.c Tue Jan 16 17:43:27 2001 @@ -1,4 +1,4 @@ -/* $TOG: sunMouse.c /main/37 1998/02/10 13:17:21 kaleb $ */ +/* $Xorg: sunMouse.c,v 1.3 2000/08/17 19:48:32 cpqbld Exp $ */ /*- * Copyright 1987 by the Regents of the University of California * Index: xc/programs/Xserver/hw/sun/sunMultiDepth.c diff -u xc/programs/Xserver/hw/sun/sunMultiDepth.c:1.4 xc/programs/Xserver/hw/sun/sunMultiDepth.c:1.5 --- xc/programs/Xserver/hw/sun/sunMultiDepth.c:1.4 Sun Oct 4 05:38:39 1998 +++ xc/programs/Xserver/hw/sun/sunMultiDepth.c Wed Jan 17 17:36:51 2001 @@ -1,4 +1,4 @@ -/* $TOG: sunMultiDepth.c /main/3 1998/02/10 13:17:26 kaleb $ */ +/* $Xorg: sunMultiDepth.c,v 1.3 2000/08/17 19:48:32 cpqbld Exp $ */ /* Copyright 1992, 1998 The Open Group @@ -23,7 +23,7 @@ */ -/* $XFree86: xc/programs/Xserver/hw/sun/sunMultiDepth.c,v 1.4 1998/10/04 09:38:39 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sun/sunMultiDepth.c,v 1.5 2001/01/17 22:36:51 dawes Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/hw/sunAmoeba/Imakefile diff -u xc/programs/Xserver/hw/sunAmoeba/Imakefile:1.1.1.2 xc/programs/Xserver/hw/sunAmoeba/Imakefile:1.1.1.3 --- xc/programs/Xserver/hw/sunAmoeba/Imakefile:1.1.1.2 Sat Dec 21 22:37:14 1996 +++ xc/programs/Xserver/hw/sunAmoeba/Imakefile Tue Jan 16 17:43:28 2001 @@ -1,4 +1,4 @@ -XCOMM $XConsortium: Imakefile /main/2 1996/09/28 17:13:18 rws $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:33 cpqbld Exp $ #include SRCS1 = sunAmInit.c \ Index: xc/programs/Xserver/hw/sunAmoeba/sun.h diff -u xc/programs/Xserver/hw/sunAmoeba/sun.h:1.2 xc/programs/Xserver/hw/sunAmoeba/sun.h:1.3 --- xc/programs/Xserver/hw/sunAmoeba/sun.h:1.2 Sat Jun 27 08:53:54 1998 +++ xc/programs/Xserver/hw/sunAmoeba/sun.h Wed Jan 17 17:36:52 2001 @@ -1,5 +1,5 @@ -/* $XConsortium: sun.h /main/3 1996/10/31 14:15:43 kaleb $ */ +/* $Xorg: sun.h,v 1.3 2000/08/17 19:48:33 cpqbld Exp $ */ /*- * Copyright (c) 1987 by the Regents of the University of California @@ -13,7 +13,7 @@ * express or implied warranty. */ -/* $XFree86: xc/programs/Xserver/hw/sunAmoeba/sun.h,v 1.2 1998/06/27 12:53:54 hohndel Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sunAmoeba/sun.h,v 1.3 2001/01/17 22:36:52 dawes Exp $ */ #ifndef _SUN_H_ #define _SUN_H_ Index: xc/programs/Xserver/hw/sunAmoeba/sunAmInit.c diff -u xc/programs/Xserver/hw/sunAmoeba/sunAmInit.c:1.5 xc/programs/Xserver/hw/sunAmoeba/sunAmInit.c:1.6 --- xc/programs/Xserver/hw/sunAmoeba/sunAmInit.c:1.5 Sun Oct 4 05:38:41 1998 +++ xc/programs/Xserver/hw/sunAmoeba/sunAmInit.c Wed Jan 17 17:36:52 2001 @@ -1,4 +1,4 @@ -/* $TOG: sunAmInit.c /main/4 1998/02/10 13:17:32 kaleb $ */ +/* $Xorg: sunAmInit.c,v 1.3 2000/08/17 19:48:33 cpqbld Exp $ */ /* * sunAmInit.c -- * Amoeba implementation of initialization functions @@ -18,7 +18,7 @@ * */ -/* $XFree86: xc/programs/Xserver/hw/sunAmoeba/sunAmInit.c,v 1.5 1998/10/04 09:38:41 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sunAmoeba/sunAmInit.c,v 1.6 2001/01/17 22:36:52 dawes Exp $ */ /* This file was partly derived from sunInit.c (5.49 94/02/21 10:21:02) */ Index: xc/programs/Xserver/hw/sunAmoeba/sunAmIo.c diff -u xc/programs/Xserver/hw/sunAmoeba/sunAmIo.c:1.1.1.1 xc/programs/Xserver/hw/sunAmoeba/sunAmIo.c:1.1.1.2 --- xc/programs/Xserver/hw/sunAmoeba/sunAmIo.c:1.1.1.1 Wed Apr 27 03:17:36 1994 +++ xc/programs/Xserver/hw/sunAmoeba/sunAmIo.c Tue Jan 16 17:43:29 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: sunAmIo.c,v 1.1 94/04/01 17:54:49 dpw Exp $ */ +/* $Xorg: sunAmIo.c,v 1.3 2000/08/17 19:48:34 cpqbld Exp $ */ /*- * sunAmIo.c -- * Amoeba implementation of functions to handle input from Index: xc/programs/Xserver/hw/sunAmoeba/sunAmKbd.c diff -u xc/programs/Xserver/hw/sunAmoeba/sunAmKbd.c:1.1.1.2 xc/programs/Xserver/hw/sunAmoeba/sunAmKbd.c:1.1.1.3 --- xc/programs/Xserver/hw/sunAmoeba/sunAmKbd.c:1.1.1.2 Sun Sep 27 04:30:02 1998 +++ xc/programs/Xserver/hw/sunAmoeba/sunAmKbd.c Tue Jan 16 17:43:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: sunAmKbd.c /main/3 1998/02/10 13:17:46 kaleb $ */ +/* $Xorg: sunAmKbd.c,v 1.3 2000/08/17 19:48:34 cpqbld Exp $ */ /*- * Copyright 1987 by the Regents of the University of California * Index: xc/programs/Xserver/hw/sunAmoeba/sunAmMouse.c diff -u xc/programs/Xserver/hw/sunAmoeba/sunAmMouse.c:1.1.1.2 xc/programs/Xserver/hw/sunAmoeba/sunAmMouse.c:1.1.1.3 --- xc/programs/Xserver/hw/sunAmoeba/sunAmMouse.c:1.1.1.2 Sun Sep 27 04:30:03 1998 +++ xc/programs/Xserver/hw/sunAmoeba/sunAmMouse.c Tue Jan 16 17:43:30 2001 @@ -1,4 +1,4 @@ -/* $TOG: sunAmMouse.c /main/3 1998/02/10 13:17:51 kaleb $ */ +/* $Xorg: sunAmMouse.c,v 1.3 2000/08/17 19:48:34 cpqbld Exp $ */ /*- * Copyright 1987 by the Regents of the University of California Index: xc/programs/Xserver/hw/sunAmoeba/sunAmProbe.c diff -u xc/programs/Xserver/hw/sunAmoeba/sunAmProbe.c:1.1.1.2 xc/programs/Xserver/hw/sunAmoeba/sunAmProbe.c:1.1.1.3 --- xc/programs/Xserver/hw/sunAmoeba/sunAmProbe.c:1.1.1.2 Sun Sep 27 04:30:03 1998 +++ xc/programs/Xserver/hw/sunAmoeba/sunAmProbe.c Tue Jan 16 17:43:31 2001 @@ -1,4 +1,4 @@ -/* $TOG: sunAmProbe.c /main/3 1998/02/10 13:17:55 kaleb $ */ +/* $Xorg: sunAmProbe.c,v 1.3 2000/08/17 19:48:34 cpqbld Exp $ */ /*- * sunAmProbe.c: * Amoeba implementation of functions to probe and map in the Index: xc/programs/Xserver/hw/sunAmoeba/sunAmScreen.c diff -u xc/programs/Xserver/hw/sunAmoeba/sunAmScreen.c:1.1.1.1 xc/programs/Xserver/hw/sunAmoeba/sunAmScreen.c:1.1.1.2 --- xc/programs/Xserver/hw/sunAmoeba/sunAmScreen.c:1.1.1.1 Wed Apr 27 03:17:37 1994 +++ xc/programs/Xserver/hw/sunAmoeba/sunAmScreen.c Tue Jan 16 17:43:31 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: sunAmScreen.c,v 1.1 94/04/01 17:55:13 dpw Exp $ */ +/* $Xorg: sunAmScreen.c,v 1.3 2000/08/17 19:48:34 cpqbld Exp $ */ /* * Copyright 1993 Vrije Universiteit, The Netherlands * Index: xc/programs/Xserver/hw/sunAmoeba/sunCfb.c diff -u xc/programs/Xserver/hw/sunAmoeba/sunCfb.c:1.3 xc/programs/Xserver/hw/sunAmoeba/sunCfb.c:1.4 --- xc/programs/Xserver/hw/sunAmoeba/sunCfb.c:1.3 Sun Oct 4 05:38:42 1998 +++ xc/programs/Xserver/hw/sunAmoeba/sunCfb.c Wed Jan 17 17:36:52 2001 @@ -1,5 +1,5 @@ -/* $TOG: sunCfb.c /main/3 1998/02/10 13:18:04 kaleb $ */ +/* $Xorg: sunCfb.c,v 1.3 2000/08/17 19:48:35 cpqbld Exp $ */ /* Copyright 1990, 1998 The Open Group @@ -63,7 +63,7 @@ * express or implied warranty. */ -/* $XFree86: xc/programs/Xserver/hw/sunAmoeba/sunCfb.c,v 1.3 1998/10/04 09:38:42 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sunAmoeba/sunCfb.c,v 1.4 2001/01/17 22:36:52 dawes Exp $ */ /****************************************************************/ /* Modified from sunCG4C.c for X11R3 by Tom Jarmolowski */ Index: xc/programs/Xserver/hw/sunAmoeba/sunCursor.c diff -u xc/programs/Xserver/hw/sunAmoeba/sunCursor.c:1.1.1.1 xc/programs/Xserver/hw/sunAmoeba/sunCursor.c:1.1.1.2 --- xc/programs/Xserver/hw/sunAmoeba/sunCursor.c:1.1.1.1 Wed Apr 27 03:17:37 1994 +++ xc/programs/Xserver/hw/sunAmoeba/sunCursor.c Tue Jan 16 17:43:31 2001 @@ -1,4 +1,4 @@ -/* $XConsortium: sunCursor.c,v 5.17 94/04/01 17:55:24 dpw Exp $ */ +/* $Xorg: sunCursor.c,v 1.3 2000/08/17 19:48:35 cpqbld Exp $ */ /*- * sunCursor.c -- * Functions for maintaining the Sun software cursor... Index: xc/programs/Xserver/hw/sunAmoeba/sunFbs.c diff -u xc/programs/Xserver/hw/sunAmoeba/sunFbs.c:1.3 xc/programs/Xserver/hw/sunAmoeba/sunFbs.c:1.4 --- xc/programs/Xserver/hw/sunAmoeba/sunFbs.c:1.3 Sun Oct 4 05:38:42 1998 +++ xc/programs/Xserver/hw/sunAmoeba/sunFbs.c Wed Jan 17 17:36:52 2001 @@ -1,5 +1,5 @@ -/* $TOG: sunFbs.c /main/3 1998/02/10 13:18:13 kaleb $ */ +/* $Xorg: sunFbs.c,v 1.3 2000/08/17 19:48:35 cpqbld Exp $ */ /* Copyright 1990, 1993, 1998 The Open Group @@ -63,7 +63,7 @@ * express or implied warranty. */ -/* $XFree86: xc/programs/Xserver/hw/sunAmoeba/sunFbs.c,v 1.3 1998/10/04 09:38:42 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sunAmoeba/sunFbs.c,v 1.4 2001/01/17 22:36:52 dawes Exp $ */ /****************************************************************/ /* Modified from sunCG4C.c for X11R3 by Tom Jarmolowski */ Index: xc/programs/Xserver/hw/sunLynx/Imakefile diff -u xc/programs/Xserver/hw/sunLynx/Imakefile:3.1 xc/programs/Xserver/hw/sunLynx/Imakefile:3.2 --- xc/programs/Xserver/hw/sunLynx/Imakefile:3.1 Fri Dec 27 01:51:30 1996 +++ xc/programs/Xserver/hw/sunLynx/Imakefile Wed Jan 17 17:36:52 2001 @@ -1,8 +1,9 @@ -XCOMM $XConsortium: Imakefile /main/1 1996/10/31 14:20:29 kaleb $ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:36 cpqbld Exp $ -XCOMM $XFree86: xc/programs/Xserver/hw/sunLynx/Imakefile,v 3.1 1996/12/27 06:51:30 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/sunLynx/Imakefile,v 3.2 2001/01/17 22:36:52 dawes Exp $ + #include SRCS1 = sunLyInit.c \ Index: xc/programs/Xserver/hw/sunLynx/btreg.h diff -u xc/programs/Xserver/hw/sunLynx/btreg.h:3.1 xc/programs/Xserver/hw/sunLynx/btreg.h:3.2 --- xc/programs/Xserver/hw/sunLynx/btreg.h:3.1 Fri Dec 27 01:51:31 1996 +++ xc/programs/Xserver/hw/sunLynx/btreg.h Wed Jan 17 17:36:52 2001 @@ -1,10 +1,4 @@ -/* $XConsortium: btreg.h /main/1 1996/10/31 14:20:32 kaleb $ */ - - - -/* $NetBSD: btreg.h,v 1.2 1994/11/20 20:51:55 deraadt Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/sunLynx/btreg.h,v 3.1 1996/12/27 06:51:31 dawes Exp $ */ - +/* $Xorg: btreg.h,v 1.3 2000/08/17 19:48:36 cpqbld Exp $ */ /* * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. @@ -48,6 +42,8 @@ * * @(#)btreg.h 8.2 (Berkeley) 1/21/94 */ +/* $NetBSD: btreg.h,v 1.2 1994/11/20 20:51:55 deraadt Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sunLynx/btreg.h,v 3.2 2001/01/17 22:36:52 dawes Exp $ */ /* * Several Sun color frame buffers use some kind of Brooktree video Index: xc/programs/Xserver/hw/sunLynx/btvar.h diff -u xc/programs/Xserver/hw/sunLynx/btvar.h:3.1 xc/programs/Xserver/hw/sunLynx/btvar.h:3.2 --- xc/programs/Xserver/hw/sunLynx/btvar.h:3.1 Fri Dec 27 01:51:32 1996 +++ xc/programs/Xserver/hw/sunLynx/btvar.h Wed Jan 17 17:36:52 2001 @@ -1,10 +1,4 @@ -/* $XConsortium: btvar.h /main/1 1996/10/31 14:20:34 kaleb $ */ - - - -/* $NetBSD: btvar.h,v 1.2 1994/11/20 20:51:56 deraadt Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/sunLynx/btvar.h,v 3.1 1996/12/27 06:51:32 dawes Exp $ */ - +/* $Xorg: btvar.h,v 1.3 2000/08/17 19:48:36 cpqbld Exp $ */ /* * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. @@ -48,6 +42,8 @@ * * @(#)btvar.h 8.2 (Berkeley) 1/21/94 */ +/* $NetBSD: btvar.h,v 1.2 1994/11/20 20:51:56 deraadt Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sunLynx/btvar.h,v 3.2 2001/01/17 22:36:52 dawes Exp $ */ /* * Brooktree color frame buffer state variables (see btreg.h). Index: xc/programs/Xserver/hw/sunLynx/cgsixreg.h diff -u xc/programs/Xserver/hw/sunLynx/cgsixreg.h:3.1 xc/programs/Xserver/hw/sunLynx/cgsixreg.h:3.2 --- xc/programs/Xserver/hw/sunLynx/cgsixreg.h:3.1 Fri Dec 27 01:51:33 1996 +++ xc/programs/Xserver/hw/sunLynx/cgsixreg.h Wed Jan 17 17:36:52 2001 @@ -1,10 +1,4 @@ -/* $XConsortium: cgsixreg.h /main/1 1996/10/31 14:20:36 kaleb $ */ - - - -/* $NetBSD: cgsixreg.h,v 1.3 1994/11/20 20:52:00 deraadt Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/sunLynx/cgsixreg.h,v 3.1 1996/12/27 06:51:33 dawes Exp $ */ - +/* $Xorg: cgsixreg.h,v 1.3 2000/08/17 19:48:36 cpqbld Exp $ */ /* * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. @@ -48,6 +42,8 @@ * * @(#)cgsixreg.h 8.4 (Berkeley) 1/21/94 */ +/* $NetBSD: cgsixreg.h,v 1.3 1994/11/20 20:52:00 deraadt Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sunLynx/cgsixreg.h,v 3.2 2001/01/17 22:36:52 dawes Exp $ */ /* * CG6 display registers. (Note, I got tired of writing `cgsix' about Index: xc/programs/Xserver/hw/sunLynx/fbio.h diff -u xc/programs/Xserver/hw/sunLynx/fbio.h:3.1 xc/programs/Xserver/hw/sunLynx/fbio.h:3.2 --- xc/programs/Xserver/hw/sunLynx/fbio.h:3.1 Fri Dec 27 01:51:34 1996 +++ xc/programs/Xserver/hw/sunLynx/fbio.h Wed Jan 17 17:36:52 2001 @@ -1,10 +1,4 @@ -/* $XConsortium: fbio.h /main/1 1996/10/31 14:20:38 kaleb $ */ - - - -/* $NetBSD: fbio.h,v 1.3 1994/11/20 20:53:03 deraadt Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/sunLynx/fbio.h,v 3.1 1996/12/27 06:51:34 dawes Exp $ */ - +/* $Xorg: fbio.h,v 1.3 2000/08/17 19:48:36 cpqbld Exp $ */ /* * Copyright (c) 1992 Regents of the University of California. * All rights reserved. @@ -47,6 +41,8 @@ /* * Frame buffer ioctls (from Sprite, trimmed to essentials for X11). */ +/* $NetBSD: fbio.h,v 1.3 1994/11/20 20:53:03 deraadt Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sunLynx/fbio.h,v 3.2 2001/01/17 22:36:52 dawes Exp $ */ /* * Frame buffer type codes. Index: xc/programs/Xserver/hw/sunLynx/sun.h diff -u xc/programs/Xserver/hw/sunLynx/sun.h:3.5 xc/programs/Xserver/hw/sunLynx/sun.h:3.6 --- xc/programs/Xserver/hw/sunLynx/sun.h:3.5 Sat Jun 27 08:53:56 1998 +++ xc/programs/Xserver/hw/sunLynx/sun.h Wed Jan 17 17:36:52 2001 @@ -1,11 +1,7 @@ -/* $XConsortium: sun.h /main/1 1996/10/31 14:20:43 kaleb $ */ +/* $Xorg: sun.h,v 1.3 2000/08/17 19:48:36 cpqbld Exp $ */ - - /* This is sun.h modified for LynxOS */ -/* $XFree86: xc/programs/Xserver/hw/sunLynx/sun.h,v 3.5 1998/06/27 12:53:56 hohndel Exp $ */ - /*- * Copyright (c) 1987 by the Regents of the University of California * @@ -17,6 +13,7 @@ * software for any purpose. It is provided "as is" without * express or implied warranty. */ +/* $XFree86: xc/programs/Xserver/hw/sunLynx/sun.h,v 3.6 2001/01/17 22:36:52 dawes Exp $ */ #ifndef _SUN_H_ #define _SUN_H_ Index: xc/programs/Xserver/hw/sunLynx/sunLyCfb.c diff -u xc/programs/Xserver/hw/sunLynx/sunLyCfb.c:3.3 xc/programs/Xserver/hw/sunLynx/sunLyCfb.c:3.4 --- xc/programs/Xserver/hw/sunLynx/sunLyCfb.c:3.3 Sun Oct 4 05:38:46 1998 +++ xc/programs/Xserver/hw/sunLynx/sunLyCfb.c Wed Jan 17 17:36:53 2001 @@ -1,9 +1,4 @@ -/* $TOG: sunLyCfb.c /main/2 1998/02/10 13:22:34 kaleb $ */ - - - -/* $XFree86: xc/programs/Xserver/hw/sunLynx/sunLyCfb.c,v 3.3 1998/10/04 09:38:46 dawes Exp $ */ - +/* $Xorg: sunLyCfb.c,v 1.3 2000/08/17 19:48:36 cpqbld Exp $ */ /* * This is sunCfb.c modified for LynxOS * Copyright 1996 by Thomas Mueller @@ -27,6 +22,7 @@ * PERFORMANCE OF THIS SOFTWARE. * */ +/* $XFree86: xc/programs/Xserver/hw/sunLynx/sunLyCfb.c,v 3.4 2001/01/17 22:36:53 dawes Exp $ */ /* Copyright 1990, 1998 The Open Group Index: xc/programs/Xserver/hw/sunLynx/sunLyFbs.c diff -u xc/programs/Xserver/hw/sunLynx/sunLyFbs.c:3.4 xc/programs/Xserver/hw/sunLynx/sunLyFbs.c:3.5 --- xc/programs/Xserver/hw/sunLynx/sunLyFbs.c:3.4 Sun Oct 4 05:38:46 1998 +++ xc/programs/Xserver/hw/sunLynx/sunLyFbs.c Wed Jan 17 17:36:53 2001 @@ -1,9 +1,4 @@ -/* $TOG: sunLyFbs.c /main/2 1998/02/10 13:22:39 kaleb $ */ - - - -/* $XFree86: xc/programs/Xserver/hw/sunLynx/sunLyFbs.c,v 3.4 1998/10/04 09:38:46 dawes Exp $ */ - +/* $Xorg: sunLyFbs.c,v 1.3 2000/08/17 19:48:36 cpqbld Exp $ */ /* * This is sunFbs.c modified for LynxOS * Copyright 1996 by Thomas Mueller @@ -27,6 +22,7 @@ * PERFORMANCE OF THIS SOFTWARE. * */ +/* $XFree86: xc/programs/Xserver/hw/sunLynx/sunLyFbs.c,v 3.5 2001/01/17 22:36:53 dawes Exp $ */ /* Copyright 1990, 1993, 1998 The Open Group Index: xc/programs/Xserver/hw/sunLynx/sunLyInit.c diff -u xc/programs/Xserver/hw/sunLynx/sunLyInit.c:3.7 xc/programs/Xserver/hw/sunLynx/sunLyInit.c:3.8 --- xc/programs/Xserver/hw/sunLynx/sunLyInit.c:3.7 Sun Apr 4 04:46:06 1999 +++ xc/programs/Xserver/hw/sunLynx/sunLyInit.c Wed Jan 17 17:36:53 2001 @@ -1,5 +1,4 @@ -/* $TOG: sunLyInit.c /main/3 1998/02/10 13:22:44 kaleb $ */ - +/* $Xorg: sunLyInit.c,v 1.3 2000/08/17 19:48:36 cpqbld Exp $ */ /* * This is sunInit.c modified for LynxOS * Copyright 1996 by Thomas Mueller @@ -23,7 +22,7 @@ * PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/programs/Xserver/hw/sunLynx/sunLyInit.c,v 3.7 1999/04/04 08:46:06 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sunLynx/sunLyInit.c,v 3.8 2001/01/17 22:36:53 dawes Exp $ */ /* * Copyright 1987 by the Regents of the University of California Index: xc/programs/Xserver/hw/sunLynx/sunLyIo.c diff -u xc/programs/Xserver/hw/sunLynx/sunLyIo.c:3.3 xc/programs/Xserver/hw/sunLynx/sunLyIo.c:3.4.2.1 --- xc/programs/Xserver/hw/sunLynx/sunLyIo.c:3.3 Sun Oct 4 05:38:47 1998 +++ xc/programs/Xserver/hw/sunLynx/sunLyIo.c Fri May 25 14:50:08 2001 @@ -1,9 +1,4 @@ -/* $TOG: sunLyIo.c /main/2 1998/02/10 13:22:50 kaleb $ */ - - - -/* $XFree86: xc/programs/Xserver/hw/sunLynx/sunLyIo.c,v 3.3 1998/10/04 09:38:47 dawes Exp $ */ - +/* $Xorg: sunLyIo.c,v 1.3 2000/08/17 19:48:37 cpqbld Exp $ */ /*- * This is sunIo.c modified for LynxOS * Copyright 1996 by Thomas Mueller @@ -27,6 +22,7 @@ * PERFORMANCE OF THIS SOFTWARE. * */ +/* $XFree86: xc/programs/Xserver/hw/sunLynx/sunLyIo.c,v 3.4.2.1 2001/05/25 18:50:08 dawes Exp $ */ /* * @@ -94,7 +90,7 @@ void ProcessInputEvents () { - (void) mieqProcessInputEvents (); + mieqProcessInputEvents (); miPointerUpdate (); } Index: xc/programs/Xserver/hw/sunLynx/sunLyKbd.c diff -u xc/programs/Xserver/hw/sunLynx/sunLyKbd.c:3.4 xc/programs/Xserver/hw/sunLynx/sunLyKbd.c:3.5 --- xc/programs/Xserver/hw/sunLynx/sunLyKbd.c:3.4 Sun Oct 4 05:38:48 1998 +++ xc/programs/Xserver/hw/sunLynx/sunLyKbd.c Wed Jan 17 17:36:53 2001 @@ -1,9 +1,4 @@ -/* $TOG: sunLyKbd.c /main/2 1998/02/10 13:22:54 kaleb $ */ - - - -/* $XFree86: xc/programs/Xserver/hw/sunLynx/sunLyKbd.c,v 3.4 1998/10/04 09:38:48 dawes Exp $ */ - +/* $Xorg: sunLyKbd.c,v 1.3 2000/08/17 19:48:37 cpqbld Exp $ */ /* * This is sunKbd.c modified for LynxOS * Copyright 1996 by Thomas Mueller @@ -27,6 +22,7 @@ * PERFORMANCE OF THIS SOFTWARE. * */ +/* $XFree86: xc/programs/Xserver/hw/sunLynx/sunLyKbd.c,v 3.5 2001/01/17 22:36:53 dawes Exp $ */ /*- * Copyright 1987 by the Regents of the University of California Index: xc/programs/Xserver/hw/sunLynx/sunLyMouse.c diff -u xc/programs/Xserver/hw/sunLynx/sunLyMouse.c:3.2 xc/programs/Xserver/hw/sunLynx/sunLyMouse.c:3.3 --- xc/programs/Xserver/hw/sunLynx/sunLyMouse.c:3.2 Sun Oct 4 05:38:48 1998 +++ xc/programs/Xserver/hw/sunLynx/sunLyMouse.c Wed Jan 17 17:36:53 2001 @@ -1,9 +1,4 @@ -/* $TOG: sunLyMouse.c /main/2 1998/02/10 13:22:59 kaleb $ */ - - - -/* $XFree86: xc/programs/Xserver/hw/sunLynx/sunLyMouse.c,v 3.2 1998/10/04 09:38:48 dawes Exp $ */ - +/* $Xorg: sunLyMouse.c,v 1.3 2000/08/17 19:48:37 cpqbld Exp $ */ /* * This is sunMouse.c modified for LynxOS * Copyright 1996 by Thomas Mueller @@ -27,6 +22,7 @@ * PERFORMANCE OF THIS SOFTWARE. * */ +/* $XFree86: xc/programs/Xserver/hw/sunLynx/sunLyMouse.c,v 3.3 2001/01/17 22:36:53 dawes Exp $ */ /*- * Copyright 1987 by the Regents of the University of California Index: xc/programs/Xserver/hw/sunLynx/sunLyUtil.c diff -u xc/programs/Xserver/hw/sunLynx/sunLyUtil.c:3.1 xc/programs/Xserver/hw/sunLynx/sunLyUtil.c:3.2 --- xc/programs/Xserver/hw/sunLynx/sunLyUtil.c:3.1 Fri Dec 27 01:51:42 1996 +++ xc/programs/Xserver/hw/sunLynx/sunLyUtil.c Wed Jan 17 17:36:53 2001 @@ -1,9 +1,4 @@ -/* $XConsortium: sunLyUtil.c /main/1 1996/10/31 14:21:00 kaleb $ */ - - - -/* $XFree86: xc/programs/Xserver/hw/sunLynx/sunLyUtil.c,v 3.1 1996/12/27 06:51:42 dawes Exp $ */ - +/* $Xorg: sunLyUtil.c,v 1.3 2000/08/17 19:48:37 cpqbld Exp $ */ /* * CG3 and CG6 utility functions for LynxOS, derived from NetBSD * Copyright 1996 by Thomas Mueller @@ -27,6 +22,7 @@ * PERFORMANCE OF THIS SOFTWARE. * */ +/* $XFree86: xc/programs/Xserver/hw/sunLynx/sunLyUtil.c,v 3.2 2001/01/17 22:36:53 dawes Exp $ */ /* $NetBSD: bt_subr.c,v 1.4 1994/11/20 20:51:54 deraadt Exp $ */ Index: xc/programs/Xserver/hw/sunLynx/vuid_event.h diff -u xc/programs/Xserver/hw/sunLynx/vuid_event.h:3.1 xc/programs/Xserver/hw/sunLynx/vuid_event.h:3.2 --- xc/programs/Xserver/hw/sunLynx/vuid_event.h:3.1 Fri Dec 27 01:51:43 1996 +++ xc/programs/Xserver/hw/sunLynx/vuid_event.h Wed Jan 17 17:36:53 2001 @@ -1,10 +1,4 @@ -/* $XConsortium: vuid_event.h /main/1 1996/10/31 14:21:02 kaleb $ */ - - - -/* $NetBSD: vuid_event.h,v 1.2 1994/11/20 20:53:39 deraadt Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/sunLynx/vuid_event.h,v 3.1 1996/12/27 06:51:43 dawes Exp $ */ - +/* $Xorg: vuid_event.h,v 1.3 2000/08/17 19:48:38 cpqbld Exp $ */ /* * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -48,6 +42,8 @@ * * @(#)vuid_event.h 8.1 (Berkeley) 6/11/93 */ +/* $NetBSD: vuid_event.h,v 1.2 1994/11/20 20:53:39 deraadt Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sunLynx/vuid_event.h,v 3.2 2001/01/17 22:36:53 dawes Exp $ */ /* * The following is a minimal emulation of Sun's `Firm_event' structures Index: xc/programs/Xserver/hw/vfb/Imakefile diff -u xc/programs/Xserver/hw/vfb/Imakefile:3.24 xc/programs/Xserver/hw/vfb/Imakefile:3.29.2.1 --- xc/programs/Xserver/hw/vfb/Imakefile:3.24 Mon Dec 11 15:29:43 2000 +++ xc/programs/Xserver/hw/vfb/Imakefile Thu May 31 12:14:18 2001 @@ -1,5 +1,10 @@ -XCOMM $TOG: Imakefile /main/13 1998/03/24 13:27:03 kaleb $ -XCOMM $XFree86: xc/programs/Xserver/hw/vfb/Imakefile,v 3.24 2000/12/11 20:29:43 dawes Exp $ +XCOMM $Xorg: Imakefile,v 1.5 2000/08/17 19:48:38 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/hw/vfb/Imakefile,v 3.29.2.1 2001/05/31 16:14:18 dawes Exp $ + #include #if HasShm @@ -7,7 +12,13 @@ #endif XCOMM add more architectures here as we discover them -#if defined(HPArchitecture) || (defined(SparcArchitecture) && !defined(LynxOSArchitecture)) || SystemV4 || defined(OSF1Architecture) || defined(i386BsdArchitecture) || defined(LinuxArchitecture) +#if defined(HPArchitecture) || \ + (defined(SparcArchitecture) && !defined(LynxOSArchitecture)) || \ + SystemV4 || \ + defined(OSF1Architecture) || \ + defined(i386BsdArchitecture) || \ + defined(LinuxArchitecture) || \ + defined(DarwinArchitecture) MMAPDEF = -DHAS_MMAP #endif @@ -16,11 +27,6 @@ OBJS1 = os2_stubs.o #endif -#ifdef cygwinArchitecture -SRCS2 = ntux_xf.c -OBJS2 = ntux_xf.o -#endif - SRCSA = InitInput.c InitOutput.c stubs.c $(SRCS1) miinitext.c $(SRCS2) OBJSA = InitInput.o InitOutput.o stubs.o $(OBJS1) miinitext.o $(OBJS2) @@ -29,7 +35,7 @@ -I../../fb -I../../mfb -I../../mi -I../../include -I../../os \ -I$(EXTINCSRC) -I$(XINCLUDESRC) -I$(SERVERSRC)/render -DEFINES = ServerOSDefines $(SHMDEF) $(MMAPDEF) -UXFree86LOADER -UXF86DRI +DEFINES = $(OS_DEFINES) $(SHMDEF) $(MMAPDEF) -UXFree86LOADER -UXF86DRI #if BuildDPMS @@ -52,13 +58,12 @@ SpecialCObjectRule(InitInput,$(ICONFIGFILES),$(EXT_DEFINES)) LinkSourceFile(miinitext.c,$(SERVERSRC)/mi) -SpecialCObjectRule(miinitext,$(ICONFIGFILES),$(EXT_DEFINES) $(PAN_DEFINES) -DNO_HW_ONLY_EXTS -DNO_MODULE_EXTS $(EXT_MODULE_DEFINES) -UXFree86LOADER) +SpecialCObjectRule(miinitext,$(ICONFIGFILES),$(EXT_DEFINES) $(PAN_DEFINES) -DNO_HW_ONLY_EXTS -DNO_MODULE_EXTS $(EXT_MODULE_DEFINES) -UXFree86LOADER -UXF86DRI) #if BuildDPMS LinkSourceFile(dpmsstubs.c,$(SERVERSRC)/Xext) SpecialCObjectRule(dpmsstubs,$(ICONFIGFILES),$(EXT_DEFINES)) #endif -CppManTarget(Xvfb,) InstallManPage(Xvfb,$(MANDIR)) DependTarget() Index: xc/programs/Xserver/hw/vfb/InitInput.c diff -u xc/programs/Xserver/hw/vfb/InitInput.c:3.5 xc/programs/Xserver/hw/vfb/InitInput.c:3.7 --- xc/programs/Xserver/hw/vfb/InitInput.c:3.5 Thu Aug 10 13:40:31 2000 +++ xc/programs/Xserver/hw/vfb/InitInput.c Wed May 16 04:01:09 2001 @@ -1,4 +1,4 @@ -/* $TOG: InitInput.c /main/12 1998/02/10 13:23:52 kaleb $ */ +/* $Xorg: InitInput.c,v 1.3 2000/08/17 19:48:38 cpqbld Exp $ */ /* Copyright 1993, 1998 The Open Group @@ -22,10 +22,11 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/hw/vfb/InitInput.c,v 3.5 2000/08/10 17:40:31 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/vfb/InitInput.c,v 3.7 2001/05/16 08:01:09 alanh Exp $ */ #include "X11/X.h" #define NEED_EVENTS +#include "mi.h" #include "X11/Xproto.h" #include "scrnintstr.h" #include "inputstr.h" @@ -43,30 +44,6 @@ */ int xf86bpp = 8; #endif - -#ifdef __CYGWIN__ -extern void init_mouse( ); -extern void init_keyboard( ); -extern void term_mouse( ); -extern void term_keyboard( ); -extern void get_WinMappings( char *pKeySyms, unsigned char *p_modMap ); - - -CARD32 lastEventTime = 0; - -int TimeSinceLastInputEvent() -{ - if (lastEventTime == 0) - lastEventTime = GetTimeInMillis(); - return GetTimeInMillis() - lastEventTime; -} - -void SetTimeSinceLastInputEvent() -{ - lastEventTime = GetTimeInMillis(); -} -#endif - Bool LegalModifier(key, pDev) @@ -284,82 +261,13 @@ #undef INDEX } -#ifdef __CYGWIN__ -static int -winKeybdProc(pDevice, onoff) - DeviceIntPtr pDevice; - int onoff; -{ - KeySymsRec keySyms; - CARD8 modMap[MAP_LENGTH]; - int i; - DevicePtr pDev = (DevicePtr)pDevice; - - switch (onoff) - { - case DEVICE_INIT: - get_WinMappings(&keySyms, modMap); - InitKeyboardDeviceStruct(pDev, &keySyms, modMap, - (BellProcPtr)NoopDDA, (KbdCtrlProcPtr)NoopDDA); - init_keyboard(); - break; - case DEVICE_ON: - pDev->on = TRUE; - break; - case DEVICE_OFF: - pDev->on = FALSE; - break; - case DEVICE_CLOSE: - term_keyboard(); - break; - } - return Success; -} - static int -winMouseProc(pDevice, onoff) - DeviceIntPtr pDevice; - int onoff; -{ - BYTE map[4]; - DevicePtr pDev = (DevicePtr)pDevice; - - switch (onoff) - { - case DEVICE_INIT: - map[1] = 1; - map[2] = 2; - map[3] = 3; - InitPointerDeviceStruct(pDev, map, 3, miPointerGetMotionEvents, - (PtrCtrlProcPtr)NoopDDA, miPointerGetMotionBufferSize()); - init_mouse(); - break; - - case DEVICE_ON: - pDev->on = TRUE; - break; - - case DEVICE_OFF: - pDev->on = FALSE; - break; - - case DEVICE_CLOSE: - term_mouse(); - break; - } - return Success; -} -#endif /* __CYGWIN__ */ - - -static int vfbKeybdProc(pDevice, onoff) DeviceIntPtr pDevice; int onoff; { KeySymsRec keySyms; CARD8 modMap[MAP_LENGTH]; - int i; DevicePtr pDev = (DevicePtr)pDevice; switch (onoff) @@ -424,7 +332,7 @@ RegisterPointerDevice(p); RegisterKeyboardDevice(k); miRegisterPointerDevice(screenInfo.screens[0], p); - (void)mieqInit (k, p); + (void)mieqInit ((DevicePtr) k, (DevicePtr) p); } #ifdef XTESTEXT1 Index: xc/programs/Xserver/hw/vfb/InitOutput.c diff -u xc/programs/Xserver/hw/vfb/InitOutput.c:3.14 xc/programs/Xserver/hw/vfb/InitOutput.c:3.19 --- xc/programs/Xserver/hw/vfb/InitOutput.c:3.14 Thu Nov 16 14:44:52 2000 +++ xc/programs/Xserver/hw/vfb/InitOutput.c Wed May 16 10:06:28 2001 @@ -1,4 +1,4 @@ -/* $TOG: InitOutput.c /main/20 1998/02/10 13:23:56 kaleb $ */ +/* $Xorg: InitOutput.c,v 1.3 2000/08/17 19:48:38 cpqbld Exp $ */ /* Copyright 1993, 1998 The Open Group @@ -22,9 +22,9 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/hw/vfb/InitOutput.c,v 3.14 2000/11/16 19:44:52 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/vfb/InitOutput.c,v 3.19 2001/05/16 14:06:28 alanh Exp $ */ -#if defined(WIN32) && !defined(__CYGWIN__) +#if defined(WIN32) #include #endif #include @@ -55,29 +55,13 @@ #endif #include #ifdef HAS_SHM -#ifndef __CYGWIN__ #include -#else -#include -#endif #include #endif /* HAS_SHM */ #include "dix.h" #include "miline.h" +#include "mfb.h" -#ifdef __CYGWIN__ -/* - * NT UX defines/includes - */ -#include - -#define HAS_MMAP 1 - -extern char *get_surf( unsigned long size ); -extern char *get_framebuf( unsigned long size ); -extern int enable_ntux_xf( ); -#endif /* __CYGWIN__ */ - extern char *display; #define VFB_DEFAULT_WIDTH 1280 @@ -118,16 +102,14 @@ static int vfbNumScreens; static vfbScreenInfo vfbScreens[MAXSCREENS]; static Bool vfbPixmapDepths[33]; +#ifdef HAS_MMAP static char *pfbdir = NULL; +#endif typedef enum { NORMAL_MEMORY_FB, SHARED_MEMORY_FB, MMAPPED_FILE_FB } fbMemType; static fbMemType fbmemtype = NORMAL_MEMORY_FB; static char needswap = 0; static int lastScreen = -1; -#ifdef __CYGWIN__ -static int b_video_memory = 0; -#endif - #define swapcopy16(_dst, _src) \ if (needswap) { CARD16 _s = _src; cpswaps(_s, _dst); } \ else _dst = _src; @@ -196,6 +178,9 @@ } } break; +#else /* HAS_MMAP */ + case MMAPPED_FILE_FB: + break; #endif /* HAS_MMAP */ #ifdef HAS_SHM @@ -209,14 +194,14 @@ } } break; +#else /* HAS_SHM */ + case SHARED_MEMORY_FB: + break; #endif /* HAS_SHM */ case NORMAL_MEMORY_FB: for (i = 0; i < vfbNumScreens; i++) { -#ifdef __CYGWIN__ - if (!b_video_memory) -#endif Xfree(vfbScreens[i].pXWDHeader); } break; @@ -229,7 +214,14 @@ ddxGiveUp(); } +#ifdef __DARWIN__ void +DarwinHandleGUI(int argc, char *argv[]) +{ +} +#endif + +void OsVendorInit() { } @@ -564,21 +556,32 @@ XWDColor *pXWDCmap; int i; - if (pmap != InstalledMaps[pmap->pScreen->myNum]) return; + if (pmap != InstalledMaps[pmap->pScreen->myNum]) + { + return; + } pXWDCmap = vfbScreens[pmap->pScreen->myNum].pXWDCmap; if ((pmap->pVisual->class | DynamicClass) == DirectColor) + { return; + } for (i = 0; i < ndef; i++) { if (pdefs[i].flags & DoRed) + { swapcopy16(pXWDCmap[pdefs[i].pixel].red, pdefs[i].red); + } if (pdefs[i].flags & DoGreen) + { swapcopy16(pXWDCmap[pdefs[i].pixel].green, pdefs[i].green); + } if (pdefs[i].flags & DoBlue) + { swapcopy16(pXWDCmap[pdefs[i].pixel].blue, pdefs[i].blue); + } } } @@ -753,10 +756,14 @@ { #ifdef HAS_MMAP case MMAPPED_FILE_FB: vfbAllocateMmappedFramebuffer(pvfb); break; +#else + case MMAPPED_FILE_FB: break; #endif #ifdef HAS_SHM case SHARED_MEMORY_FB: vfbAllocateSharedMemoryFramebuffer(pvfb); break; +#else + case SHARED_MEMORY_FB: break; #endif case NORMAL_MEMORY_FB: @@ -768,17 +775,8 @@ { pvfb->pXWDCmap = (XWDColor *)((char *)pvfb->pXWDHeader + SIZEOF(XWDheader) + XWD_WINDOW_NAME_LEN); -#ifndef __CYGWIN__ pvfb->pfbMemory = (char *)(pvfb->pXWDCmap + pvfb->ncolors); -#else - pvfb->pfbMemory = - (char *)get_framebuf((unsigned long) - pvfb->paddedWidth * pvfb->height); - if (pvfb->pfbMemory) - b_video_memory = 1; - else - pvfb->pfbMemory = (char *)(pvfb->pXWDCmap + pvfb->ncolors); -#endif + return pvfb->pfbMemory; } else @@ -793,7 +791,6 @@ vfbScreenInfoPtr pvfb = &vfbScreens[pScreen->myNum]; XWDFileHeader *pXWDHeader = pvfb->pXWDHeader; char hostname[XWD_WINDOW_NAME_LEN]; - VisualPtr pVisual; unsigned long swaptest = 1; int i; @@ -967,12 +964,6 @@ { int i; int NumFormats = 0; - FILE *pf = stderr; - - -#ifdef __CYGWIN__ - enable_ntux_xf(); -#endif /* initialize pixmap formats */ Index: xc/programs/Xserver/hw/vfb/Xvfb.cpp diff -u xc/programs/Xserver/hw/vfb/Xvfb.cpp:1.2 xc/programs/Xserver/hw/vfb/Xvfb.cpp:removed --- xc/programs/Xserver/hw/vfb/Xvfb.cpp:1.2 Tue Dec 12 13:06:51 2000 +++ xc/programs/Xserver/hw/vfb/Xvfb.cpp Mon Jun 4 12:40:19 2001 @@ -1,127 +0,0 @@ -.\" $TOG: Xvfb.man /main/12 1998/02/10 13:24:06 kaleb $ -.\" Copyright 1993, 1998 The Open Group -.\" -.\" All Rights Reserved. -.\" -.\" The above copyright notice and this permission notice shall be included -.\" in all copies or substantial portions of the Software. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -.\" OTHER DEALINGS IN THE SOFTWARE. -.\" -.\" Except as contained in this notice, the name of The Open Group shall -.\" not be used in advertising or otherwise to promote the sale, use or -.\" other dealings in this Software without prior written authorization -.\" from The Open Group. -.\" -.\" $XFree86: xc/programs/Xserver/hw/vfb/Xvfb.cpp,v 1.2 2000/12/12 18:06:51 dawes Exp $ -.\" -.TH XVFB 1 "Release 6.4" "X Version 11" -.SH NAME -Xvfb \- virtual framebuffer X server for X Version 11 -.SH SYNOPSIS -.B Xvfb -[ option ] ... -.SH DESCRIPTION -.I Xvfb -is an X server that can run on machines with no display hardware -and no physical input devices. It emulates a dumb framebuffer using -virtual memory. -.PP -The primary use of this server was intended to be server testing. The -mfb or cfb code for any depth can be exercised with this server -without the need for real hardware that supports the desired depths. -The X community has found many other novel uses for \fIXvfb\fP, -including testing clients against unusual depths and screen -configurations, doing batch processing with \fIXvfb\fP as a background -rendering engine, load testing, as an aid to porting the X server to a -new platform, and providing an unobtrusive way to run applications -that don't really need an X server but insist on having one anyway. -.SH BUILDING -To build \fIXvfb\fP, put the following in your host.def and remake. -.PP -#define BuildServer YES /* if you aren't already building other servers */ -.br -#define XVirtualFramebufferServer YES - -.SH OPTIONS -.PP -In addition to the normal server options described in the \fIXserver(1)\fP -manual page, \fIXvfb\fP accepts the following command line switches: -.TP 4 -.B "\-screen \fIscreennum\fP \fIWxHxD\fP" -This option creates screen \fIscreennum\fP and sets its width, height, -and depth to W, H, and D respectively. By default, only screen 0 exists -and has the dimensions 1280x1024x8. -.TP 4 -.B "\-pixdepths \fIlist-of-depths\fP" -This option specifies a list of pixmap depths that the server should -support in addition to the depths implied by the supported screens. -\fIlist-of-depths\fP is a space-separated list of integers that can -have values from 1 to 32. -.TP 4 -.B "\-fbdir \fIframebuffer-directory\fP" -This option specifies the directory in which the memory mapped files -containing the framebuffer memory should be created. -See FILES. -This option only exists on machines that have the mmap and msync system -calls. -.TP 4 -.B "\-shmem" -This option specifies that the framebuffer should be put in shared memory. -The shared memory ID for each screen will be printed by the server. -The shared memory is in xwd format. -This option only exists on machines that support the System V shared memory -interface. -.PP -If neither \fB\-shmem\fP nor \fB\-fbdir\fP is specified, -the framebuffer memory will be allocated with malloc(). -.TP 4 -.B "\-linebias \fIn\fP" -This option specifies how to adjust the pixelization of thin lines. -The value \fIn\fP is a bitmask of octants in which to prefer an axial -step when the Bresenham error term is exactly zero. See the file -Xserver/mi/miline.h for more information. This option is probably only useful -to server developers to experiment with the range of line pixelization -possible with the cfb and mfb code. -.TP 4 -.B "\-blackpixel \fIpixel-value\fP, \-whitepixel \fIpixel-value\fP" -These options specify the black and white pixel values the server should use. -.SH FILES -The following files are created if the \-fbdir option is given. -.TP 4 -\fIframebuffer-directory\fP/Xvfb_screen -Memory mapped file containing screen n's framebuffer memory, one file -per screen. The file is in xwd format. Thus, taking a full-screen -snapshot can be done with a file copy command, and the resulting -snapshot will even contain the cursor image. -.SH EXAMPLES -.TP 8 -Xvfb :1 -screen 0 1600x1200x32 -The server will listen for connections as server number 1, and screen 0 -will be depth 32 1600x1200. -.TP 8 -Xvfb :1 -screen 1 1600x1200x16 -The server will listen for connections as server number 1, will have the -default screen configuration (one screen, 1280x1024x8), and screen 1 -will be depth 16 1600x1200. -.TP 8 -Xvfb -pixdepths 3 27 -fbdir /usr/tmp -The server will listen for connections as server number 0, will have the -default screen configuration (one screen, 1280x1024x8), -will also support pixmap -depths of 3 and 27, -and will use memory mapped files in /usr/tmp for the framebuffer. -.TP 8 -xwud -in /usr/tmp/Xvfb_screen0 -Displays screen 0 of the server started by the preceding example. -.SH "SEE ALSO" -.PP -X(__miscmansuffix__), Xserver(1), xwd(1), xwud(1), XWDFile.h -.SH AUTHORS -David P. Wiggins, The Open Group, Inc. Index: xc/programs/Xserver/hw/vfb/Xvfb.man diff -u /dev/null xc/programs/Xserver/hw/vfb/Xvfb.man:1.8 --- /dev/null Mon Jun 4 12:40:19 2001 +++ xc/programs/Xserver/hw/vfb/Xvfb.man Wed Feb 7 18:25:55 2001 @@ -0,0 +1,127 @@ +.\" $Xorg: Xvfb.man,v 1.3 2000/08/17 19:48:39 cpqbld Exp $ +.\" Copyright 1993, 1998 The Open Group +.\" +.\" All Rights Reserved. +.\" +.\" The above copyright notice and this permission notice shall be included +.\" in all copies or substantial portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +.\" OTHER DEALINGS IN THE SOFTWARE. +.\" +.\" Except as contained in this notice, the name of The Open Group shall +.\" not be used in advertising or otherwise to promote the sale, use or +.\" other dealings in this Software without prior written authorization +.\" from The Open Group. +.\" +.\" $XFree86: xc/programs/Xserver/hw/vfb/Xvfb.man,v 1.8 2001/02/07 23:25:55 dawes Exp $ +.\" +.TH XVFB 1 __xorgversion__ +.SH NAME +Xvfb \- virtual framebuffer X server for X Version 11 +.SH SYNOPSIS +.B Xvfb +[ option ] ... +.SH DESCRIPTION +.I Xvfb +is an X server that can run on machines with no display hardware +and no physical input devices. It emulates a dumb framebuffer using +virtual memory. +.PP +The primary use of this server was intended to be server testing. The +mfb or cfb code for any depth can be exercised with this server +without the need for real hardware that supports the desired depths. +The X community has found many other novel uses for \fIXvfb\fP, +including testing clients against unusual depths and screen +configurations, doing batch processing with \fIXvfb\fP as a background +rendering engine, load testing, as an aid to porting the X server to a +new platform, and providing an unobtrusive way to run applications +that don't really need an X server but insist on having one anyway. +.SH BUILDING +To build \fIXvfb\fP, put the following in your host.def and remake. +.PP +\&#define BuildServer YES /* if you aren't already building other servers */ +.br +\&#define XVirtualFramebufferServer YES + +.SH OPTIONS +.PP +In addition to the normal server options described in the \fIXserver(1)\fP +manual page, \fIXvfb\fP accepts the following command line switches: +.TP 4 +.B "\-screen \fIscreennum\fP \fIWxHxD\fP" +This option creates screen \fIscreennum\fP and sets its width, height, +and depth to W, H, and D respectively. By default, only screen 0 exists +and has the dimensions 1280x1024x8. +.TP 4 +.B "\-pixdepths \fIlist-of-depths\fP" +This option specifies a list of pixmap depths that the server should +support in addition to the depths implied by the supported screens. +\fIlist-of-depths\fP is a space-separated list of integers that can +have values from 1 to 32. +.TP 4 +.B "\-fbdir \fIframebuffer-directory\fP" +This option specifies the directory in which the memory mapped files +containing the framebuffer memory should be created. +See FILES. +This option only exists on machines that have the mmap and msync system +calls. +.TP 4 +.B "\-shmem" +This option specifies that the framebuffer should be put in shared memory. +The shared memory ID for each screen will be printed by the server. +The shared memory is in xwd format. +This option only exists on machines that support the System V shared memory +interface. +.PP +If neither \fB\-shmem\fP nor \fB\-fbdir\fP is specified, +the framebuffer memory will be allocated with malloc(). +.TP 4 +.B "\-linebias \fIn\fP" +This option specifies how to adjust the pixelization of thin lines. +The value \fIn\fP is a bitmask of octants in which to prefer an axial +step when the Bresenham error term is exactly zero. See the file +Xserver/mi/miline.h for more information. This option is probably only useful +to server developers to experiment with the range of line pixelization +possible with the cfb and mfb code. +.TP 4 +.B "\-blackpixel \fIpixel-value\fP, \-whitepixel \fIpixel-value\fP" +These options specify the black and white pixel values the server should use. +.SH FILES +The following files are created if the \-fbdir option is given. +.TP 4 +\fIframebuffer-directory\fP/Xvfb_screen +Memory mapped file containing screen n's framebuffer memory, one file +per screen. The file is in xwd format. Thus, taking a full-screen +snapshot can be done with a file copy command, and the resulting +snapshot will even contain the cursor image. +.SH EXAMPLES +.TP 8 +Xvfb :1 -screen 0 1600x1200x32 +The server will listen for connections as server number 1, and screen 0 +will be depth 32 1600x1200. +.TP 8 +Xvfb :1 -screen 1 1600x1200x16 +The server will listen for connections as server number 1, will have the +default screen configuration (one screen, 1280x1024x8), and screen 1 +will be depth 16 1600x1200. +.TP 8 +Xvfb -pixdepths 3 27 -fbdir /usr/tmp +The server will listen for connections as server number 0, will have the +default screen configuration (one screen, 1280x1024x8), +will also support pixmap +depths of 3 and 27, +and will use memory mapped files in /usr/tmp for the framebuffer. +.TP 8 +xwud -in /usr/tmp/Xvfb_screen0 +Displays screen 0 of the server started by the preceding example. +.SH "SEE ALSO" +.PP +X(__miscmansuffix__), Xserver(1), xwd(1), xwud(1), XWDFile.h +.SH AUTHORS +David P. Wiggins, The Open Group, Inc. Index: xc/programs/Xserver/hw/vfb/lk201kbd.h diff -u xc/programs/Xserver/hw/vfb/lk201kbd.h:1.1.1.2 xc/programs/Xserver/hw/vfb/lk201kbd.h:1.1.1.3 --- xc/programs/Xserver/hw/vfb/lk201kbd.h:1.1.1.2 Sun Sep 27 04:07:09 1998 +++ xc/programs/Xserver/hw/vfb/lk201kbd.h Tue Jan 16 17:43:41 2001 @@ -41,7 +41,7 @@ ******************************************************************/ -/* $TOG: lk201kbd.h /main/3 1998/02/10 13:24:01 kaleb $ */ +/* $Xorg: lk201kbd.h,v 1.3 2000/08/17 19:48:39 cpqbld Exp $ */ #define MIN_LK201_KEY 86 #define MAX_LK201_KEY 251 Index: xc/programs/Xserver/hw/vfb/ntux_xf.c diff -u xc/programs/Xserver/hw/vfb/ntux_xf.c:3.1 xc/programs/Xserver/hw/vfb/ntux_xf.c:removed --- xc/programs/Xserver/hw/vfb/ntux_xf.c:3.1 Thu Aug 10 13:40:31 2000 +++ xc/programs/Xserver/hw/vfb/ntux_xf.c Mon Jun 4 12:40:19 2001 @@ -1,133 +0,0 @@ -/* -* Copyright 2000 (C) Peter Busch -* All rights reserved. -NO WARRANTY; NO LIABILITY FOR DAMAGES: THE MATERIALS ARE PROVIDED "AS IS" -WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND INCLUDING WARRANTIES -OF SATISFACTORY QUALITY, MERCHANTABILITY, NONINFRINGEMENT OF THIRD-PARTY -INTELLECTUAL PROPERTY, OR FITNESS FOR ANY PARTICULAR PURPOSE. -IN NO EVENT SHALL Peter Busch BE LIABLE FOR ANY DAMAGES WHATSOEVER -(INCLUDING, WITHOUT LIMITATION, DIRECT OR INDIRECT DAMAGES, DAMAGES FOR -LOSS OF PROFITS, BUSINESS INTERRUPTION, LOSS OF INFORMATION) ARISING OUT -OF THE USE OF OR INABILITY TO USE THE MATERIALS, EVEN IF -Peter Busch HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -Without limiting the generality of the foregoing, no warranty is made -that the enclosed software will generate computer programs with the -characteristics or specifications desired by you or that the demo -software will be error-free. -THESE DISCLAIMERS OF WARRANTY CONSTITUTE AN ESSENTIAL PART OF THIS -AGREEMENT. -*/ -/* $XFree86: xc/programs/Xserver/hw/vfb/ntux_xf.c,v 3.1 2000/08/10 17:40:31 dawes Exp $ */ - -/* -* ntux_xf.c -* support code for the output enabled X vfb server -* contains the interface between the vfb source files and the ntux_ddx library -* Copyright (C) Peter Busch -* All rights reserved. -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* This code is BETA and will be part of the CYGWIN/XFREE Project. -* It may not be used for purposes other than to contribute to the -* CYGWIN/XFree project without prior written notice from the -* author. -* Any commercial use of this code will be permitted -* provided you contact Peter Busch at pbusch@dfki.de -*/ - - - -#include -#include -#include "keysym.h" - - -typedef char * (* _get_surface)( unsigned long size ); -typedef int (* _init_input)( void ); -typedef void (* _init_mouse)( ); -typedef void (* _init_keyboard)( ); -typedef void (* _term_mouse)( ); -typedef void (* _term_keyboard)( ); -typedef void (* _get_WinMap)( char *pKeySyms, unsigned char *p_modMap ); - - -HINSTANCE h_ntux_ddx = NULL; - -_get_surface ntux_surface = NULL; -_init_input init_input = NULL; -_init_mouse ntux_init_mouse = NULL; -_init_keyboard ntux_init_keyboard = NULL; -_term_mouse ntux_term_mouse = NULL; -_term_keyboard ntux_term_keyboard = NULL; -_get_WinMap ntux_getWinMap = NULL; - -int enable_ntux_xf( ) -{ - h_ntux_ddx = LoadLibrary( "ntux_ddx.dll" ); - if( h_ntux_ddx == NULL ) - return 0; - - ntux_surface = (_get_surface)GetProcAddress( h_ntux_ddx, "get_surface" ); - init_input = (_init_input)GetProcAddress( h_ntux_ddx, "init_input" ); - ntux_init_mouse = (_init_mouse)GetProcAddress( h_ntux_ddx, "init_mouse" ); - ntux_init_keyboard = (_init_keyboard)GetProcAddress( h_ntux_ddx, "init_keyboard" ); - ntux_term_mouse = (_term_mouse)GetProcAddress( h_ntux_ddx, "term_mouse" ); - ntux_term_keyboard = (_term_keyboard)GetProcAddress( h_ntux_ddx, "term_keyboard" ); - ntux_getWinMap = (_get_WinMap)GetProcAddress( h_ntux_ddx, "get_WinMap" ); - - OutputDebugString( "\nntux_ddx successfully loaded\n\n" ); - return 1; -} - - -char *get_framebuf( unsigned long size ) -{ - char msg[256]; - if( ntux_surface != NULL ) - { - fprintf( stderr, "get_framebuf : calling %08x with size = %08x\n", - ntux_surface, size - ); - return ntux_surface( size ); - } - return NULL; -} - - -void init_mouse( ) -{ - if( ntux_init_mouse != NULL ) - return ntux_init_mouse(); - return ; -} - -void init_keyboard( ) -{ - if( ntux_init_keyboard != NULL ) - return ntux_init_keyboard(); - return ; -} - -void term_mouse( ) -{ - if( ntux_term_mouse != NULL ) - return ntux_term_mouse(); - return ; -} - -void term_keyboard( ) -{ - if( ntux_term_keyboard != NULL ) - return ntux_term_keyboard(); - return ; -} - -void get_WinMappings( char *pKeySyms, unsigned char *p_modMap ) -{ - if( ntux_getWinMap != NULL ) - return ntux_getWinMap( pKeySyms, p_modMap ); - return ; -} - - -